Compare commits

...

293 Commits

Author SHA1 Message Date
Alex Ant 3be56ba462 chore(release): publish 2025-02-07 19:35:06 +05:00
Alex Ant f7adf8457b Dockerfile fix 2025-02-07 19:25:01 +05:00
Alex Ant 80b8856f15 fix 2025-02-07 18:48:44 +05:00
Alex Ant 0860f47d88 capital sdk mutations 2025-02-07 18:39:39 +05:00
Alex Ant 382b75fccf cooplace 2025-01-30 19:25:35 +05:00
Alex Ant d3dacbd32d add production cooperative to the list 2025-01-28 23:08:02 +05:00
Alex Ant 6c51e4b596 fix selectBranch bug and add IP for entrepreneur user 2025-01-28 16:27:22 +05:00
Alex Ant d0bd4428be chore(release): publish 2025-01-27 11:08:26 +05:00
Alex Ant 43ffcb7362 update 2025-01-27 10:54:50 +05:00
Alex Ant ca5dfca290 update table style on documents 2025-01-27 10:29:08 +05:00
Alex Ant 8a495eff37 add new templates for documents and fix QR-pay interface 2025-01-27 10:07:52 +05:00
Alex Ant bee6af12fb get COOPBACK const from system.info everywhere 2025-01-23 18:52:33 +05:00
Alex Ant 4a3dfc3eb7 update 2025-01-22 17:49:33 +05:00
Alex Ant 4e87a4adc4 fix init process 2025-01-22 16:08:24 +05:00
Alex Ant d9bb9d5884 update system info 2025-01-22 12:23:34 +05:00
Alex Ant 562be0cb89 update 2025-01-21 17:51:03 +05:00
Alex Ant 2fdc86af97 chore(release): publish 2025-01-19 18:52:27 +05:00
Alex Ant 220d1225b2 update 2025-01-19 17:04:34 +05:00
Alex Ant e047a6e449 remove username input on getAccounts & remove deleteAccount mutation on SDK 2025-01-19 16:34:54 +05:00
Alex Ant 97b21a9d69 chore(release): publish 2025-01-18 16:15:43 +05:00
Alex Ant 9be9570dea document and blockchain classes on SDK, move sign documents on signup to use SDK 2025-01-18 16:11:32 +05:00
Alex Ant cbfe37dbba chore(release): publish 2025-01-17 13:52:58 +05:00
Alex Ant bf176a2c05 fix connection button only for voskhod coops 2025-01-17 13:50:36 +05:00
Alex Ant 173c51eb26 connection button for coops on desktop 2025-01-17 13:46:47 +05:00
Alex Ant 71dbb090fb memberButton for access to coop settings 2025-01-17 13:02:40 +05:00
Alex Ant 832133e6cc Canvas SDK class 2025-01-17 12:57:46 +05:00
Alex Ant 2730a92b01 update 2025-01-16 19:54:20 +05:00
Alex Ant 40fb5c80eb update 2025-01-16 19:45:35 +05:00
Alex Ant 6c65095961 add account class 2025-01-16 17:46:08 +05:00
Alex Ant d02f7ae7bc rollback 2025-01-16 12:40:17 +05:00
Alex Ant 9f0b4b24ba update SDK 2025-01-16 12:34:04 +05:00
Alex Ant 237357c1d5 canvas class and update types on dto 2025-01-16 12:30:57 +05:00
Alex Ant aefb1caf57 update 2025-01-16 12:17:00 +05:00
Alex Ant a3328e7ef0 move to sdk login 2025-01-16 12:09:04 +05:00
Alex Ant db24588273 fix paymentMethods orders 2025-01-15 13:47:58 +05:00
Alex Ant 2cabeeb6bd temp fix order id bug 2025-01-15 10:52:02 +05:00
Alex Ant 88352202b0 update 2025-01-14 21:50:45 +05:00
Alex Ant e02d8a949b update 2025-01-14 20:40:26 +05:00
Alex Ant e7e5457cf2 uppdate 2025-01-14 20:39:39 +05:00
Alex Ant 29b98b0f7d add login method to SDK 2025-01-14 20:32:49 +05:00
Alex Ant ae7378f474 update 2025-01-14 18:07:31 +05:00
Alex Ant b05c17bee4 chore(release): publish 2025-01-14 17:50:44 +05:00
Alex Ant a2d3dac226 chore(release): publish 2025-01-14 17:41:40 +05:00
Alex Ant a8ec41e255 fix 2025-01-14 13:48:53 +05:00
Alex Ant 1d16062961 renaming and sdk 2025-01-14 13:45:45 +05:00
Alex Ant 2a614e8656 move to sdk #1 2025-01-14 12:32:58 +05:00
Alex Ant baaaaf01bf sdk-client docs 2025-01-10 10:35:54 +05:00
Alex Ant 20f1fc51b1 hard payment migration 2025-01-01 21:07:59 +05:00
Alex Ant d749ebf981 add a lot of queries and mutations 2025-01-01 12:06:41 +05:00
Alex Ant 04364c503c chore(release): publish 2024-12-24 23:43:08 +05:00
Alex Ant ae2a040fe4 free decision 2024-12-24 22:45:50 +05:00
Alex Ant 0debf23b5e move to a documented ql-client 2024-12-23 13:45:49 +05:00
Alex Ant 55e7849b43 visual fixs 2024-12-21 18:37:31 +05:00
Alex Ant 34d9a73677 Merge branch 'dev' into testnet 2024-12-20 21:04:35 +05:00
Alex Ant 0b9ccf5bc0 update 2024-12-20 21:04:07 +05:00
Alex Ant 48e72bb9df update 2024-12-20 21:03:36 +05:00
Alex Ant 35aed44bcb update card and add selectors for generate free decision and selectBranch documents 2024-12-20 21:02:19 +05:00
Alex Ant e4cf693c0d Merge branch 'testnet' 2024-12-20 16:47:35 +05:00
Alex Ant f0755f5f90 update 2024-12-20 16:47:29 +05:00
Alex Ant bdfc6af688 selectors update coopjs 2024-12-20 16:26:26 +05:00
Alex Ant 31b4061a43 resolver of free decision 2024-12-20 14:44:20 +05:00
Alex Ant a1b80f0323 drafts migration complete 2024-12-18 13:36:52 +05:00
Alex Ant 1678686ce7 freeDecision and projectFreeDecision document templates 2024-12-18 13:29:10 +05:00
Alex Ant c25d05196d generate selectBranch document throw graphql 2024-12-16 20:16:44 +05:00
Alex Ant bdddc7ad03 selectBranch for added members 2024-12-14 21:09:13 +05:00
Alex Ant 1d1ad4f9fa branches 2024-12-11 21:01:22 +05:00
Alex Ant 099fcc7981 update! 2024-12-05 19:00:58 +05:00
Alex Ant 2ef44e45f6 from 2024-12-03 20:19:36 +05:00
Alex Ant ebe62d0498 migrate 2024-12-03 19:11:46 +05:00
Alex Ant 6472b20ea4 branches auto enable 2024-12-03 14:00:11 +05:00
Alex Ant 69cdb2d754 enable / disable branches 2024-12-02 16:11:05 +05:00
Alex Ant f7d8000b48 coopjs mutations and queries for branches 2024-11-29 21:10:54 +05:00
Alex Ant a44afbe1b9 make branches happen #1 2024-11-19 22:19:26 +05:00
Alex Ant 662da1b8a9 update 2024-11-15 16:24:39 +05:00
Alex Ant 2a3d743204 router refactoring 2024-11-14 20:30:39 +05:00
Alex Ant 7241ee4c7a pre-release 2024-11-14 20:08:56 +05:00
Alex Ant 5c084d6e8b add reflect-metadata 2024-11-10 20:03:16 +05:00
Alex Ant 1060c7fdfc package fix 2024-11-10 19:53:15 +05:00
Alex Ant b5d6c0e0b3 fix bug on parser with return function 2024-11-10 17:42:59 +05:00
Alex Ant d69644350e integration coopjs & terminal 2024-11-10 17:33:29 +05:00
Alex Ant 8634622a6a coopjs 0.01 2024-11-09 21:24:29 +05:00
Alex Ant cc73554350 graphql & apollo server & guards & documentator prototype 2024-11-07 21:06:17 +05:00
Alex Ant 8adf93d592 graphql implementation 2024-11-07 19:42:17 +05:00
Alex Ant 6bd60ddf96 extensions #3 2024-11-07 12:43:33 +05:00
Alex Ant ea5bcbe4dd extensions #2 2024-11-07 10:38:36 +05:00
Alex Ant 541b49069d nestjs & postgres migration #1 2024-11-06 10:54:38 +05:00
Alex Ant ba868866ec postgres initialization 2024-11-04 12:48:58 +05:00
Alex Ant 606ae48f13 update 2024-11-04 11:54:33 +05:00
Alex Ant 09c5445f83 nestjs but fix 2024-11-04 11:46:26 +05:00
Alex Ant 4a0a18a7b0 nestjs integration 2024-11-03 20:18:40 +05:00
Alex Ant ed9d1ab738 test 2024-11-03 14:25:08 +05:00
Alex Ant a61e8084dd fix 2024-11-03 14:13:39 +05:00
Alex Ant e169380178 make settings visible only for logged in 2024-11-03 14:09:15 +05:00
Alex Ant b07d4ef6c3 fix cooperative settings for everone 2024-11-03 13:49:39 +05:00
Alex Ant 4c713c7652 make common header layout and better settings menu 2024-11-03 13:22:24 +05:00
Alex Ant 90e8c6b3c4 chore(release): publish 2024-10-30 19:49:43 +05:00
Alex Ant 07bf05cb2c normal plugin model with some payment plugins 2024-10-30 19:42:48 +05:00
Alex Ant 49d29902a8 update 2024-10-29 23:42:49 +05:00
Alex Ant 32a90c2a9e controller-next initialization 2024-10-29 23:42:14 +05:00
Alex Ant 16ed2c1517 support 2024-10-29 11:50:49 +05:00
Alex Ant 8bb0f1c799 chore(release): publish 2024-10-28 21:49:21 +05:00
Alex Ant f14fe2dd64 update cardcoop 2024-10-28 20:45:08 +05:00
Alex Ant 884f0ee0de changeAuthorizedHome 2024-10-28 19:47:55 +05:00
Alex Ant 744270f48c update 2024-10-28 19:42:04 +05:00
Alex Ant c30849be3c cardcoop on a main screen 2024-10-28 19:06:15 +05:00
Alex Ant f295ac8b4d separated settings page 2024-10-28 17:56:40 +05:00
Alex Ant 9469a8f43d update 2024-10-28 14:18:07 +05:00
Alex Ant 786799ca40 update 2024-10-28 14:16:53 +05:00
Alex Ant aa6238cf5a fix 2024-10-28 13:38:54 +05:00
Alex Ant 1ed31ee2e2 update 2024-10-28 13:26:42 +05:00
Alex Ant 7d8c12977c generateOptions for Documents 2024-10-28 13:15:07 +05:00
Alex Ant 81ee1d63a6 Merge branch 'main' into dev 2024-10-28 11:59:00 +05:00
Alex Ant cf1c1b3198 chore(release): publish 2024-10-28 11:55:43 +05:00
Alex Ant bc7b1e8472 update 2024-10-28 11:55:02 +05:00
Alex Ant 7319c41cc1 chore(release): publish 2024-10-28 11:51:09 +05:00
Alex Ant 2f09fc32c0 finish bugfix 2024-10-28 11:50:41 +05:00
Alex Ant f85b3f54a1 chore(release): publish 2024-10-28 10:49:06 +05:00
Alex Ant 1a68669d6d update Dockerfile 2024-10-28 10:48:04 +05:00
Alex Ant 6345c2d414 chore(release): publish 2024-10-28 10:16:08 +05:00
Alex Ant 87930cad75 update 2024-10-28 10:14:41 +05:00
Alex Ant 3ab2232121 Dockerfile 2024-10-28 10:06:40 +05:00
Alex Ant 9719e25421 move to weasyprint 2024-10-28 10:03:29 +05:00
Alex Ant 8e1f998c39 try to fix it ! 2024-10-27 20:34:08 +05:00
Alex Ant deb1c224f8 update 2024-10-27 19:33:06 +05:00
Alex Ant b2fa79898a arial embded font 2024-10-27 17:56:49 +05:00
Alex Ant da2759a3c6 update 2024-10-27 15:29:12 +05:00
Alex Ant f6bc696426 add common Arial font 2024-10-27 15:09:17 +05:00
Alex Ant da653e9b32 looking for bug #2 2024-10-27 12:46:47 +05:00
Alex Ant 227e153bde looking for bug 2024-10-27 12:03:18 +05:00
Alex Ant 12f906b9b0 update 2024-10-26 21:09:25 +05:00
Alex Ant c8236d4d10 update 2024-10-26 21:01:26 +05:00
Alex Ant e2006da50d TSK-289 Устранить избыточное сохранение документа при регенерации (1) 2024-10-26 20:20:05 +05:00
Alex Ant 433a7d3641 chore(release): publish 2024-10-26 17:45:45 +05:00
Alex Ant 6b41c74b43 regenerate document button, some bugs and fixs 2024-10-26 17:38:12 +05:00
Alex Ant cc3e7ff7c6 fix bug auto powerup on every restart 2024-10-26 13:42:11 +05:00
Alex Ant a35a6bf642 separate init payment factory 2024-10-26 13:10:52 +05:00
Alex Ant 9ecd523646 fix double subscriber bug 2024-10-26 12:52:24 +05:00
Alex Ant e7f896c38e update notification template 2024-10-26 10:49:28 +05:00
Alex Ant 624ec743b1 fix bug loading button 2024-10-25 19:26:41 +05:00
Alex Ant 553c5745ef fix update soviet bug 2024-10-25 16:46:26 +05:00
Alex Ant 3f2779ca3d fix bug voskhod everywhere 2024-10-25 16:42:18 +05:00
Alex Ant e51b962627 databazor bug fix 2024-10-25 16:20:58 +05:00
Alex Ant f709e135b6 Merge branch 'testnet' 2024-10-25 11:10:33 +05:00
Alex Ant 50b48aa247 update 2024-10-24 11:44:05 +05:00
Alex Ant 508f2abc82 update 2024-10-24 11:37:39 +05:00
Alex Ant 42ec56e578 fix 2024-10-24 11:26:07 +05:00
Alex Ant 92673dac6e chore(release): publish 2024-10-23 21:21:41 +05:00
Alex Ant daf57aba35 fix 2024-10-23 21:21:00 +05:00
Alex Ant dee629c429 chore(release): publish 2024-10-23 21:16:50 +05:00
Alex Ant 67f9092350 fix lib 2024-10-23 21:15:52 +05:00
Alex Ant 88691d47a5 chore(release): publish 2024-10-23 21:02:47 +05:00
Alex Ant 0fdd9bc803 update 2024-10-23 21:02:25 +05:00
Alex Ant 8452c607b4 chore(release): publish 2024-10-23 20:57:27 +05:00
Alex Ant 4fc57c2d57 update 2024-10-23 20:56:58 +05:00
Alex Ant 9f0b707a30 chore(release): publish 2024-10-23 20:51:30 +05:00
Alex Ant 511bc351d5 publish 2024-10-23 20:49:38 +05:00
Alex Ant 56ee3e962c chore(release): publish 2024-10-23 20:42:13 +05:00
Alex Ant 2781e8519d fix 2024-10-23 20:40:34 +05:00
Alex Ant 46575348fe chore(release): publish 2024-10-23 20:24:23 +05:00
Alex Ant bae2ca646b publish again 2024-10-23 20:24:00 +05:00
Alex Ant 0686c6ab00 chore(release): publish 2024-10-23 20:20:51 +05:00
Alex Ant db04b66ce5 update 2024-10-23 20:20:25 +05:00
Alex Ant c43c8a29af chore(release): publish 2024-10-23 20:17:40 +05:00
Alex Ant aaea18abe1 publish 2024-10-23 20:16:35 +05:00
Alex Ant 0b6076cb61 chore(release): publish 2024-10-23 20:10:05 +05:00
Alex Ant 3b6d02f02c fix 2024-10-23 20:08:45 +05:00
Alex Ant 625a0586a3 public 2024-10-23 20:06:22 +05:00
Alex Ant 10d63ca586 powerup is private plugin 2024-10-23 20:06:01 +05:00
Alex Ant d2697bf9de make library from terminal 2024-10-23 20:04:34 +05:00
Alex Ant fa8c8843e2 make powerup private plugin 2024-10-19 22:07:20 +05:00
Alex Ant 7b59ea4b96 chore(release): publish 2024-10-19 22:03:06 +05:00
Alex Ant 058215934e Merge branch 'testnet' 2024-10-19 22:02:08 +05:00
Alex Ant 1d724d841f plugin factory and powerup plugin 2024-10-19 21:58:34 +05:00
Alex Ant 32db2100de implementation plugins worker system 2024-10-18 11:27:39 +05:00
Alex Ant 095c77b65b chore(release): publish 2024-10-17 16:20:02 +05:00
Alex Ant c1c07bff8f plugin factory and powerup plugin sketch 2024-10-17 16:18:39 +05:00
Alex Ant 1206bd0e98 fix voskhod everywhere bug 2024-10-17 13:22:35 +05:00
Alex Ant 67bcd1b307 update text on install 2024-10-17 10:52:06 +05:00
Alex Ant 31ef70e433 health check 2024-10-16 13:56:37 +05:00
Alex Ant afb12961d2 fix launch errors 2024-10-16 13:38:08 +05:00
Alex Ant 3dbd40e334 bug fix soviet update 2024-10-16 11:10:18 +05:00
Alex Ant bc5d6e38c8 console.error(e 2024-10-15 23:37:27 +05:00
Alex Ant 5a39143051 openReplay connection 2024-10-14 21:24:45 +05:00
Alex Ant 18e9571877 fix css bug 2024-10-13 16:52:55 +05:00
Alex Ant a828f4c831 chore(release): publish 2024-10-13 16:26:37 +05:00
Alex Ant 54ac12f250 update migrations 2024-10-13 16:24:26 +05:00
Alex Ant 9a6a72f605 feat: запрос соглашений
fix: интерфейс
2024-10-13 16:13:52 +05:00
Alex Ant 03949489e8 docs: добавлен файл конвенции коммитов 2024-10-13 13:19:16 +05:00
Alex Ant 8ebd735e7e update 2024-10-13 13:08:59 +05:00
Alex Ant 39246da73f update amount in agreement and fix bug in terminal 2024-10-13 12:00:39 +05:00
Alex Ant bf33f60368 cooperative connection 2024-10-13 11:50:22 +05:00
Alex Ant 492a613769 fix bugs 2024-10-12 00:59:58 +05:00
Alex Ant 2c02c3434e update 2024-10-12 00:51:37 +05:00
Alex Ant a186ddd9d2 chore(release): publish 2024-10-12 00:46:06 +05:00
Alex Ant 4b0c7a5e4e update 2024-10-12 00:45:35 +05:00
Alex Ant 54cfbe3ab6 fix 2024-10-12 00:39:07 +05:00
Alex Ant 02015cf0b8 update migrator package.json 2024-10-12 00:37:39 +05:00
Alex Ant 416e4d3598 interface rework & documents style change 2024-10-12 00:31:52 +05:00
Alex Ant e0d9c4b0ea make migrator private 2024-10-10 20:55:46 +05:00
Alex Ant 2659e3bc09 migrator release 2024-10-10 20:54:27 +05:00
Alex Ant d296167b6a agreementChecker fix, payment description fix, loader on add user 2024-10-10 20:41:18 +05:00
Alex Ant 89b0aa7fec chore(release): publish 2024-10-10 18:38:19 +05:00
Alex Ant 787aadf444 fix bugs 2024-10-10 18:09:22 +05:00
Alex Ant d67161a29b slice secret 2024-10-10 15:02:12 +05:00
Alex Ant 7f4777ead4 правка текста вступительного взноса 2024-10-10 14:41:26 +05:00
Alex Ant 1e2147b143 fix aggregation 2 2024-10-10 12:09:10 +05:00
Alex Ant 9f0a2fbf63 chore(release): publish 2024-10-10 11:28:11 +05:00
Alex Ant 7804851bc9 update agregate pipeline 2024-10-10 11:15:47 +05:00
Alex Ant adc50dd89e chore(release): publish 2024-10-09 22:20:55 +05:00
Alex Ant 5378cf5ddc template fix 2024-10-09 22:14:11 +05:00
Alex Ant a733bb605f fix model 2024-10-09 14:17:19 +05:00
Alex Ant aaa1b5a264 test update 2024-10-09 14:01:21 +05:00
Alex Ant 5855cdee65 install process 2024-10-09 13:46:08 +05:00
Alex Ant c0d584e644 TSK-225 vaultModel and wif store for cooperative operations 2024-10-04 12:01:44 +05:00
Alex Ant 955f0f473e fix bug 2024-09-30 23:10:59 +05:00
Alex Ant 9ceb888124 update 2024-09-30 22:13:59 +05:00
Alex Ant e902933693 update 2024-09-30 21:43:41 +05:00
Alex Ant e07b47fb10 update 2024-09-30 21:37:54 +05:00
Alex Ant 5bf08d9701 update 2024-09-30 21:33:02 +05:00
Alex Ant 597fa1e6fa update package 2024-09-30 21:21:45 +05:00
Alex Ant dda3ec0ba0 chore(release): publish 2024-09-30 21:09:57 +05:00
Alex Ant 991f08c749 dompurify and coopback <br> fix 2024-09-30 21:08:26 +05:00
Alex Ant 923865cd7c bug fix #3 2024-09-30 20:00:25 +05:00
Alex Ant 606aee8ccd chore(release): publish 2024-09-30 17:24:04 +05:00
Alex Ant 4a1cb27d0a big bug #2 2024-09-30 17:21:38 +05:00
Alex Ant 26cd7f3a12 chore(release): publish 2024-09-30 17:09:39 +05:00
Alex Ant f4045dbc56 chore(release): publish 2024-09-30 17:07:54 +05:00
Alex Ant 33c2b24550 fix bug of parallel generation 2024-09-30 17:06:17 +05:00
Alex Ant cd86f3c8ea redis auth 2024-09-30 15:15:57 +05:00
Alex Ant 58026ebc2d fix redis auth 2024-09-30 15:07:33 +05:00
Alex Ant 9183275dad redis authentification 2024-09-30 15:00:38 +05:00
Alex Ant 5e3a625d95 chore(release): publish 2024-09-30 14:52:28 +05:00
Alex Ant 3297f9d2d2 update package.json 2024-09-30 14:51:18 +05:00
Alex Ant 29b8306a28 chore(release): publish 2024-09-29 19:17:36 +05:00
Alex Ant d84746bac6 add compression package 2024-09-29 19:14:12 +05:00
Alex Ant 4eacf2ff0b chore(release): publish 2024-09-29 19:01:29 +05:00
Alex Ant a68e0d6f61 update 2024-09-29 18:57:09 +05:00
Alex Ant ddf44304c7 order_id -> order_num, stable initial_order 2024-09-29 15:28:16 +05:00
Alex Ant 789d98f58e chore(release): publish 2024-09-29 09:39:57 +05:00
Alex Ant 205574620d Merge branch 'testnet' 2024-09-29 09:39:19 +05:00
Alex Ant d9bae12b31 chore(release): publish 2024-09-29 09:36:26 +05:00
Alex Ant c951190794 update 2024-09-29 09:34:32 +05:00
Alex Ant d4e1d69c3c update 2024-09-29 09:29:53 +05:00
Alex Ant f93a32c07b update 2024-09-29 09:25:10 +05:00
Alex Ant 8e7c152c0d update 2024-09-29 09:23:20 +05:00
Alex Ant 6a64404f20 update 2024-09-29 09:19:43 +05:00
Alex Ant 1a09589add from-packages 2024-09-29 09:18:03 +05:00
Alex Ant d0f9072ab5 fixed packet version 2024-09-29 09:15:58 +05:00
Alex Ant 011ed9f2d8 update 2024-09-29 09:11:57 +05:00
Alex Ant 12332f83d9 Merge branch 'dev' into testnet 2024-09-29 09:05:09 +05:00
Alex Ant 8f75829948 update 2024-09-29 09:04:53 +05:00
Alex Ant a7ffedb3b2 update 2024-09-29 09:03:14 +05:00
Alex Ant 378d3b9747 update 2024-09-29 09:02:06 +05:00
Alex Ant 5ba05409c4 chore(release): publish
- coopback@1.7.38-alpha.3
 - coopdoc-generator-ts@1.0.21-alpha.3
 - cooptypes@1.0.26-alpha.3
 - coop-notificator@0.0.29-alpha.3
 - terminal@0.1.51-alpha.3
2024-09-29 08:58:35 +05:00
Alex Ant d86beef58f document updates 2024-09-29 08:57:37 +05:00
Alex Ant 7315d67c9f chore(release): publish
- coopback@1.7.38-alpha.2
 - coopdoc-generator-ts@1.0.21-alpha.2
 - cooptypes@1.0.26-alpha.2
 - coop-notificator@0.0.29-alpha.2
 - terminal@0.1.51-alpha.2
2024-09-28 19:43:01 +05:00
Alex Ant 59d79b8c7a update order statuses, list order statuses, add passport data, update registry documents 2024-09-28 19:41:12 +05:00
Alex Ant 3df97653a2 TSK-181 StatusPage and setStatus for orders [pre] 2024-09-26 21:30:08 +05:00
Alex Ant 948d55e418 download qr and show order data 2024-09-23 21:18:10 +05:00
Alex Ant 1d2c7281b1 sberbankPollingProvider prototype 2024-09-23 12:46:12 +05:00
Alex Ant 35759b943c chore(release): publish
- coopback@1.7.38-alpha.1
 - coopdoc-generator-ts@1.0.21-alpha.1
 - cooptypes@1.0.26-alpha.1
 - coop-notificator@0.0.29-alpha.1
 - terminal@0.1.51-alpha.1
2024-09-20 12:13:47 +05:00
Alex Ant 29da33e200 update 2024-09-20 12:12:06 +05:00
Alex Ant 1d758f8126 gitignore 2024-09-20 10:09:54 +05:00
Alex Ant b663dac2ab delete logs 2024-09-20 10:09:32 +05:00
Alex Ant 485a3971e9 update 2024-09-20 10:09:13 +05:00
Alex Ant 36b5d64ca6 chore(release): publish
- coopback@1.7.38-alpha.0
 - coopdoc-generator-ts@1.0.21-alpha.0
 - cooptypes@1.0.26-alpha.0
 - coop-notificator@0.0.29-alpha.0
 - terminal@0.1.51-alpha.0
2024-09-16 12:14:29 +05:00
Alex Ant 8462a709bc hz 2024-09-16 12:13:44 +05:00
Alex Ant 20cabe8362 update 2024-09-16 12:00:54 +05:00
Alex Ant 6967864361 chore(release): publish
- coopback@1.7.37-alpha.3
 - coopdoc-generator-ts@1.0.11-alpha.2
 - terminal@0.1.41-alpha.2
2024-09-16 11:58:50 +05:00
Alex Ant a6ee3840ae update 2024-09-16 11:57:43 +05:00
Alex Ant 01de6139df update 2024-09-16 11:46:48 +05:00
Alex Ant 6ba0924f6c chore(release): publish
- coopback@1.7.37-alpha.2
 - coopdoc-generator-ts@1.0.11-alpha.2
 - cooptypes@1.0.22-alpha.6
 - coop-notificator@0.0.28-alpha.1
 - terminal@0.1.41-alpha.1
2024-09-16 11:44:22 +05:00
Alex Ant 00c75d1fd8 update 2024-09-16 11:43:37 +05:00
Alex Ant 93f28fa9d5 update 2024-09-16 11:38:25 +05:00
Alex Ant 0aed10eb8b chore(release): publish
- coopback@1.7.37-alpha.1
 - coopdoc-generator-ts@1.0.11-alpha.1
 - cooptypes@1.0.22-alpha.6
 - coop-notificator@0.0.28-alpha.0
 - terminal@0.1.41-alpha.0
2024-09-16 11:37:13 +05:00
Alex Ant d84d687eee update 2024-09-16 11:36:50 +05:00
Alex Ant d046f56832 update 2024-09-16 11:34:07 +05:00
Alex Ant 0af1fbf313 update 2024-09-16 11:24:50 +05:00
Alex Ant e9aaf4309e chore(release): publish
- cooparser-ts@1.0.20-alpha.0
 - coopback@1.7.37-alpha.0
 - coopdoc-generator-ts@1.0.11-alpha.0
 - cooptypes@1.0.22-alpha.6
 - coop-notificator@0.0.27
 - terminal@0.1.40
2024-09-16 11:19:45 +05:00
Alex Ant 80fa1085d2 FUCK 2024-09-16 11:13:22 +05:00
Alex Ant 88195291fd update 2024-09-16 11:09:40 +05:00
Alex Ant 39ad600d00 update 2024-09-16 10:58:59 +05:00
Alex Ant c63a3aba6b update 2024-09-16 10:41:15 +05:00
Alex Ant 782ecbe307 dfdf 2024-09-16 10:36:54 +05:00
Alex Ant f75bbfa048 fix 2024-09-16 10:15:16 +05:00
Alex Ant 3a772cc983 herna 2024-09-16 10:00:29 +05:00
Alex Ant 807113523e documents update 2024-09-16 09:52:00 +05:00
Alex Ant 7df2af8611 update 2024-09-15 17:28:33 +05:00
Alex Ant 10c1697b00 update 2024-09-15 17:23:58 +05:00
Alex Ant 742e5d38ab chore(release): publish
- coopback@1.7.35-alpha.5
 - coopdoc-generator-ts@1.0.79-alpha.5
 - cooptypes@1.0.22-alpha.5
 - coop-notificator@0.0.26-alpha.5
 - terminal@0.1.39-alpha.5
2024-09-15 17:20:44 +05:00
Alex Ant 1d3e7f8af0 update 2024-09-15 17:19:13 +05:00
Alex Ant c99bacab64 before update 2024-09-15 10:40:18 +05:00
Alex Ant 95d7555ebc ssr & covars -> vars 2024-09-15 09:38:02 +05:00
2425 changed files with 1066329 additions and 12692 deletions
Vendored
BIN
View File
Binary file not shown.
+1
View File
@@ -1,2 +1,3 @@
node_modules/
lerna-debug.log
components/controller/graph.png
+1 -1
View File
@@ -6,7 +6,7 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": ["source.fixAll.eslint"],
"eslint.validate": ["javascript", "typescript", "vue"],
"typescript.tsdk": "node_modules/typescript/lib",
// "typescript.tsdk": "node_modules/typescript/lib",
"i18n-ally.localesPaths": ["src/i18n"],
"typescript.format.enable": true,
"typescript.format.indentSwitchCase": false,
+196
View File
@@ -0,0 +1,196 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.2.7](https://github.com/coopenomics/monocoop/compare/v2.2.6...v2.2.7) (2025-02-07)
**Note:** Version bump only for package monocoop
## [2.2.6](https://github.com/coopenomics/monocoop/compare/v2.2.6-alpha.0...v2.2.6) (2025-01-27)
**Note:** Version bump only for package monocoop
## [2.2.5](https://github.com/coopenomics/monocoop/compare/v2.2.4...v2.2.5) (2025-01-18)
**Note:** Version bump only for package monocoop
## [2.2.4](https://github.com/coopenomics/monocoop/compare/v2.2.0...v2.2.4) (2025-01-17)
**Note:** Version bump only for package monocoop
## [2.2.3](https://github.com/coopenomics/monocoop/compare/v2.2.0...v2.2.3) (2025-01-16)
**Note:** Version bump only for package monocoop
## [2.2.1](https://github.com/coopenomics/monocoop/compare/v2.2.0...v2.2.1) (2025-01-14)
**Note:** Version bump only for package monocoop
## [2.1.9](https://github.com/coopenomics/monocoop/compare/v2.1.8...v2.1.9) (2025-01-14)
**Note:** Version bump only for package monocoop
## [2.1.8](https://github.com/coopenomics/monocoop/compare/v2.1.6...v2.1.8) (2024-12-24)
**Note:** Version bump only for package monocoop
## [2.1.7](https://github.com/coopenomics/monocoop/compare/v2.1.6...v2.1.7) (2024-12-03)
**Note:** Version bump only for package monocoop
## [2.1.6](https://github.com/coopenomics/monocoop/compare/v2.1.5...v2.1.6) (2024-10-30)
**Note:** Version bump only for package monocoop
## [2.1.5](https://github.com/coopenomics/monocoop/compare/v2.1.4...v2.1.5) (2024-10-28)
**Note:** Version bump only for package monocoop
## [2.1.4](https://github.com/coopenomics/monocoop/compare/v2.1.4-alpha.2...v2.1.4) (2024-10-28)
**Note:** Version bump only for package monocoop
## [2.1.3](https://github.com/coopenomics/monocoop/compare/v2.1.2-alpha.10...v2.1.3) (2024-10-26)
## [2.1.2](https://github.com/coopenomics/monocoop/compare/v2.1.1...v2.1.2) (2024-10-19)
**Note:** Version bump only for package monocoop
## [2.1.2](https://github.com/coopenomics/monocoop/compare/v2.1.1...v2.1.2) (2024-10-19)
**Note:** Version bump only for package monocoop
# [2.1.0](https://github.com/coopenomics/monocoop/compare/v2.0.10-alpha.3...v2.1.0) (2024-10-13)
### Features
* запрос соглашений ([9a6a72f](https://github.com/coopenomics/monocoop/commit/9a6a72f605ba52eef2ed6f18ccee6fbed287ea00))
## [2.0.9](https://github.com/coopenomics/monocoop/compare/v2.0.8...v2.0.9) (2024-10-10)
**Note:** Version bump only for package monocoop
## [2.0.8](https://github.com/coopenomics/monocoop/compare/v2.0.7...v2.0.8) (2024-10-09)
**Note:** Version bump only for package monocoop
## [2.0.7](https://github.com/coopenomics/monocoop/compare/v2.0.6...v2.0.7) (2024-09-30)
**Note:** Version bump only for package monocoop
## [2.0.6](https://github.com/coopenomics/monocoop/compare/v2.0.5...v2.0.6) (2024-09-30)
**Note:** Version bump only for package monocoop
## [2.0.5](https://github.com/coopenomics/monocoop/compare/v2.0.5-alpha.0...v2.0.5) (2024-09-30)
**Note:** Version bump only for package monocoop
## [2.0.2](https://github.com/coopenomics/monocoop/compare/v2.0.2-alpha.1...v2.0.2) (2024-09-29)
**Note:** Version bump only for package monocoop
# 2.1.0 (2024-09-29)
### Bug Fixes
* **importers:** исправлена ошибка в импорте модуля @wharfkit/contract ([bf89032](https://github.com/coopenomics/monocoop/commit/bf89032d8f66444804a2521f4eb96ffc75b0f605))
* **terminal:** исправлен шрифт в README ([889447a](https://github.com/coopenomics/monocoop/commit/889447a93ceadb577613ddb5b1cb2ef1cc3d54b6))
* **terminal:** исправлено описание проекта ([989b318](https://github.com/coopenomics/monocoop/commit/989b3180ded99a871e018cf26e6c493449223c01))
* **terminal:** fix typo in README.md ([fdf9996](https://github.com/coopenomics/monocoop/commit/fdf999619d2d69e960b062fe6815f5b057c95f48))
### Features
* добавлен docker-compose.yaml ([6a46697](https://github.com/coopenomics/monocoop/commit/6a46697c9d6cc3cde14dbce8f70997c00f9850de))
* **package:** добавлен скрипт gpt-commit для удобного коммита ([e0b5107](https://github.com/coopenomics/monocoop/commit/e0b510799bb0ac68890d572deb652beefd0651c4))
* **terminal:** добавлена поддержка новых команд ([73e4ca2](https://github.com/coopenomics/monocoop/commit/73e4ca226acebcbea3ae59a62def99d86efb1353))
+39
View File
@@ -0,0 +1,39 @@
k# Conventional Commits
### Основные типы коммитов:
- **`feat`**: Добавление новой функциональности (feature).
- Пример: `feat: добавлена возможность загрузки файлов`
- **`fix`**: Исправление бага.
- Пример: `fix: исправлена ошибка отображения кнопки на мобильных устройствах`
- **`chore`**: Изменения, не влияющие на исходный код (например, обновление зависимостей или инструментария).
- Пример: `chore: обновление зависимостей`
- **`docs`**: Изменения в документации.
- Пример: `docs: обновлено руководство пользователя`
- **`style`**: Изменения стиля кода, не влияющие на его функциональность (форматирование, пробелы, и т.д.).
- Пример: `style: исправлены отступы в коде`
- **`refactor`**: Изменения в коде, которые не исправляют баги и не добавляют новую функциональность.
- Пример: `refactor: улучшена структура класса`
- **`perf`**: Изменения, направленные на улучшение производительности.
- Пример: `perf: оптимизирована работа с массивами`
- **`test`**: Добавление или изменение тестов.
- Пример: `test: добавлен тест для проверки функции отправки сообщений`
### Дополнительные типы коммитов:
- **`build`**: Изменения, связанные с процессом сборки или зависимостями.
- Пример: `build: обновление конфигурации Webpack`
- **`ci`**: Изменения, касающиеся настроек непрерывной интеграции (например, Travis, Jenkins).
- Пример: `ci: настройка Travis для автоматических сборок`
- **`revert`**: Откат на предыдущие изменения.
- Пример: `revert: откат коммита e0b5107`
+15 -1
View File
@@ -1,4 +1,18 @@
# MONOCOOP
Моно-репозиторий компонент Цифрового Кооператива.
Моно-репозиторий компонент клиента системы электронного документооборота для потребительских и производственных кооперативов.
## Инициализация
```
curl -X POST http://127.0.0.1:2998/v1/system/init \
-H "Content-Type: application/json" \
-H "server-secret: SECRET" \
-d @init-cooperative1.json
```
## Лицензия
Продукт Потребительского Кооператива "ВОСХОД" распространяется по лицензии BY-NC-SA 4.0.
Разрешено делиться, копировать и распространять материал на любом носителе и форме, адаптировать, делать ремиксы, видоизменять и создавать новое, опираясь на этот материал. При использовании, Вы должны обеспечить указание авторства, предоставить ссылку, и обозначить изменения, если таковые были сделаны. Если вы перерабатываете, преобразовываете материал или берёте его за основу для производного произведения, вы должны распространять переделанные вами части материала на условиях той же лицензии , в соответствии с которой распространяется оригинал. Запрещено коммерческое использование материала. Использование в коммерческих целях – это использование, в первую очередь направленное на получение коммерческого преимущества или денежного вознаграждения.
Юридический текст лицензии: https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode.ru
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
@@ -5,11 +5,7 @@
"browser": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:prettier/recommended"],
"plugins": ["@typescript-eslint", "prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
@@ -18,7 +14,8 @@
"project": "./tsconfig.json"
},
"rules": {
"no-console": "warn",
"@typescript-eslint/no-explicit-any": "off",
"no-console": "off",
"func-names": "off",
"no-underscore-dangle": "off",
"consistent-return": "off",
@@ -12,4 +12,7 @@ yarn-error.log
coverage
.env-mixed
.env-local
.env-local
logs
logs/*
@@ -3,6 +3,178 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.2.7](https://github.com/hagopj13/node-express-boilerplate/compare/v2.2.6...v2.2.7) (2025-02-07)
**Note:** Version bump only for package @coopenomics/controller
## [2.2.6](https://github.com/hagopj13/node-express-boilerplate/compare/v2.2.6-alpha.0...v2.2.6) (2025-01-27)
**Note:** Version bump only for package @coopenomics/controller
## [2.2.5](https://github.com/hagopj13/node-express-boilerplate/compare/v2.2.4...v2.2.5) (2025-01-18)
**Note:** Version bump only for package @coopenomics/controller
## [2.2.4](https://github.com/hagopj13/node-express-boilerplate/compare/v2.2.0...v2.2.4) (2025-01-17)
**Note:** Version bump only for package @coopenomics/controller
## [2.2.3](https://github.com/hagopj13/node-express-boilerplate/compare/v2.2.0...v2.2.3) (2025-01-16)
**Note:** Version bump only for package @coopenomics/controller
## [2.2.1](https://github.com/hagopj13/node-express-boilerplate/compare/v2.2.0...v2.2.1) (2025-01-14)
**Note:** Version bump only for package @coopenomics/controller
## [2.1.9](https://github.com/hagopj13/node-express-boilerplate/compare/v2.1.8...v2.1.9) (2025-01-14)
**Note:** Version bump only for package @coopenomics/controller
## [2.1.8](https://github.com/hagopj13/node-express-boilerplate/compare/v2.1.6...v2.1.8) (2024-12-24)
**Note:** Version bump only for package @coopenomics/controller
## [2.1.7](https://github.com/hagopj13/node-express-boilerplate/compare/v2.1.6...v2.1.7) (2024-12-03)
**Note:** Version bump only for package @coopenomics/controller
## [2.1.6](https://github.com/hagopj13/node-express-boilerplate/compare/v2.1.5...v2.1.6) (2024-10-30)
**Note:** Version bump only for package @coopenomics/controller
## [2.1.5](https://github.com/hagopj13/node-express-boilerplate/compare/v2.1.4...v2.1.5) (2024-10-28)
**Note:** Version bump only for package @coopenomics/controller
## [2.1.4](https://github.com/hagopj13/node-express-boilerplate/compare/v2.1.4-alpha.2...v2.1.4) (2024-10-28)
**Note:** Version bump only for package @coopenomics/controller
## [2.1.3](https://github.com/hagopj13/node-express-boilerplate/compare/v2.1.2-alpha.10...v2.1.3) (2024-10-26)
## [2.1.2](https://github.com/hagopj13/node-express-boilerplate/compare/v2.1.1...v2.1.2) (2024-10-19)
**Note:** Version bump only for package @coopenomics/controller
## [2.1.2](https://github.com/hagopj13/node-express-boilerplate/compare/v2.1.1...v2.1.2) (2024-10-19)
**Note:** Version bump only for package coopback
# [2.1.0](https://github.com/hagopj13/node-express-boilerplate/compare/v2.0.10-alpha.3...v2.1.0) (2024-10-13)
**Note:** Version bump only for package coopback
## [2.0.8](https://github.com/hagopj13/node-express-boilerplate/compare/v2.0.7...v2.0.8) (2024-10-09)
**Note:** Version bump only for package coopback
## [2.0.7](https://github.com/hagopj13/node-express-boilerplate/compare/v2.0.6...v2.0.7) (2024-09-30)
**Note:** Version bump only for package coopback
## [2.0.6](https://github.com/hagopj13/node-express-boilerplate/compare/v2.0.5...v2.0.6) (2024-09-30)
**Note:** Version bump only for package coopback
## [2.0.5](https://github.com/hagopj13/node-express-boilerplate/compare/v2.0.5-alpha.0...v2.0.5) (2024-09-30)
**Note:** Version bump only for package coopback
## [2.0.2](https://github.com/hagopj13/node-express-boilerplate/compare/v2.0.2-alpha.1...v2.0.2) (2024-09-29)
**Note:** Version bump only for package coopback
## [1.7.38](https://github.com/hagopj13/node-express-boilerplate/compare/coopback@1.7.38-alpha.3...coopback@1.7.38) (2024-09-29)
**Note:** Version bump only for package coopback
## [1.7.34](https://github.com/hagopj13/node-express-boilerplate/compare/coopback@1.7.33...coopback@1.7.34) (2024-08-25)
**Note:** Version bump only for package coopback
+40
View File
@@ -0,0 +1,40 @@
# Базовый образ Node.js на Alpine
FROM node:alpine AS base
# Включение pnpm
# Устанавливаем pnpm без использования corepack
RUN npm install -g pnpm@8.15.4
# Устанавливаем рабочую директорию
WORKDIR /app
# Копируем package.json
COPY package.json ./
# Установка системных зависимостей для WeasyPrint и создание виртуального окружения
RUN apk add --no-cache \
python3 \
py3-pip \
gcc \
musl-dev \
python3-dev \
pango \
zlib-dev \
jpeg-dev \
openjpeg-dev \
g++ \
libffi-dev \
harfbuzz-subset \
&& python3 -m venv /venv \
&& /venv/bin/pip install WeasyPrint==62.3 \
&& rm -rf /var/cache/*
# Установка пути к виртуальному окружению в PATH
ENV PATH="/venv/bin:$PATH"
# Проверка наличия команды weasyprint
RUN weasyprint --version
# CMD для запуска weasyprint
# CMD ["weasyprint", "input.html", "output.pdf"]
+1
View File
@@ -0,0 +1 @@
# CONTROLLER
+14
View File
@@ -0,0 +1,14 @@
overwrite: true
schema: './schema.gql' # Укажите путь к вашей схеме (или URL сервера)
documents: './src/modules/**/operations/*.graphql' # Путь, где будут храниться запросы
generates:
../coopjs/src/sdk/index.ts:
plugins:
- 'typescript'
- 'typescript-operations'
- 'typescript-graphql-request' # Плагин для генерации клиента
config:
rawRequest: true
namingConvention:
typeNames: keep # Оставляем типы без изменений
transformUnderscore: true
@@ -1,12 +1,12 @@
{
"name": "create-nodejs-express-app",
"version": "1.7.35-alpha.4",
"version": "2.2.7",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "create-nodejs-express-app",
"version": "1.7.35-alpha.4",
"version": "2.2.7",
"license": "MIT",
"dependencies": {
"@a2seven/yoo-checkout": "^1.1.4",
@@ -1,8 +1,8 @@
{
"name": "coopback",
"version": "1.7.35-alpha.4",
"name": "@coopenomics/controller",
"version": "2.2.7",
"description": "",
"private": true,
"private": false,
"bin": "bin/createNodejsApp.js",
"main": "src/index.ts",
"repository": "https://github.com/hagopj13/node-express-boilerplate.git",
@@ -12,11 +12,14 @@
"engines": {
"node": ">=12.0.0"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"deploy-testnet": "git checkout testnet && git merge main && git push origin testnet && git checkout main",
"deploy-production": "git checkout production && git merge testnet && git push origin production && git checkout main",
"start": "ts-node src/index.ts",
"dev": "concurrently -n 'CONTROLLER' -c 'bgCyan.black' \"nodemon --watch src --ext ts,js,env --exec 'ts-node' src/index.ts\"",
"start": "ts-node -r tsconfig-paths/register src/index.ts",
"dev": "concurrently -n 'CONTROLLER' -c 'bgCyan.black' \"nodemon --watch src --ext ts,js,env --exec 'ts-node -r tsconfig-paths/register' src/index.ts\"",
"test": "jest -i --colors --testTimeout=120000",
"test:watch": "jest -i --watchAll",
"coverage": "jest -i --coverage",
@@ -33,7 +36,9 @@
"swagger": "ts-node scripts/swagger.ts",
"typecheck": "tsc --noEmit",
"docs-watch": "swagger-ui-watcher ./src/docs/swagger.json",
"docs": "ts-node scripts/swagger.ts && redoc-cli bundle ./src/docs/swagger.json -o ./docs/index.html"
"docs": "spectaql spectaql-config.yml",
"docs2": "ts-node scripts/swagger.ts && redoc-cli bundle ./src/docs/swagger.json -o ./docs/index.html",
"generate-client": "zeus ./schema.gql ../sdk/src --subscriptions graphql-ws && cp -r ./src/types/shared/* ../sdk/src/types/controller"
},
"keywords": [
"node",
@@ -58,13 +63,34 @@
],
"dependencies": {
"@a2seven/yoo-checkout": "^1.1.4",
"@coopenomics/factory": "workspace:*",
"@graphql-codegen/typescript-graphql-request": "^6.2.0",
"@graphql-codegen/typescript-resolvers": "^4.4.0",
"@graphql-tools/schema": "^10.0.7",
"@graphql-tools/utils": "^10.5.5",
"@nestjs/apollo": "^12.2.1",
"@nestjs/bull": "^10.2.1",
"@nestjs/common": "^10.0.0",
"@nestjs/config": "^3.2.3",
"@nestjs/core": "^10.0.0",
"@nestjs/graphql": "^12.2.1",
"@nestjs/mongoose": "^10.1.0",
"@nestjs/passport": "^10.0.3",
"@nestjs/platform-express": "^10.0.0",
"@nestjs/throttler": "^6.3.0",
"@nestjs/typeorm": "^10.0.2",
"@types/jest": "^29.5.12",
"@types/supertest": "^6.0.2",
"@wharfkit/antelope": "^1.0.7",
"@wharfkit/contract": "^1.1.5",
"@wharfkit/session": "^1.4.0",
"@wharfkit/wallet-plugin-privatekey": "^1.1.0",
"apollo-server-express": "^3.13.0",
"axios": "^1.6.2",
"bcryptjs": "^2.4.3",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
"compression": "^1.7.4",
"coopdoc-generator-ts": "workspace:*",
"cooptypes": "workspace:*",
"cors": "^2.8.5",
"cross-env": "^7.0.0",
@@ -78,37 +104,66 @@
"express-mongo-sanitize": "^2.0.0",
"express-rate-limit": "^5.0.0",
"faker": "^5.1.0",
"glob": "^11.0.0",
"graphql": "^16.9.0",
"graphql-request": "^7.1.2",
"graphql-scalars": "^1.24.0",
"graphql-tools": "^9.0.2",
"graphql-type-json": "^0.3.2",
"graphql-ws": "^5.16.0",
"helmet": "^4.1.0",
"html-pdf-node": "^1.0.8",
"http-proxy-middleware": "^3.0.3",
"http-status": "^1.4.0",
"ioredis": "^5.4.1",
"ip": "^2.0.1",
"isomorphic-fetch": "^3.0.0",
"jest": "^29.7.0",
"joi": "^17.13.1",
"joi-to-json": "^4.3.0",
"joi-to-typescript": "^4.13.0",
"jsonwebtoken": "^8.5.1",
"jspdf": "^2.5.1",
"lodash": "^4.17.21",
"moment": "^2.24.0",
"mongoose": "^8.5.2",
"mongoose-sequence": "^6.0.1",
"morgan": "^1.9.1",
"node-cron": "^3.0.3",
"nodemailer": "^6.3.1",
"nunjucks": "^3.2.4",
"passport": "^0.4.0",
"passport-jwt": "^4.0.0",
"pdf-lib": "^1.17.1",
"pm2": "^5.1.0",
"reflect-metadata": "^0.1.13",
"socket.io-client": "^4.7.5",
"spectaql": "^3.0.2",
"swagger-jsdoc": "^6.0.8",
"swagger-ui-express": "^4.1.6",
"threads": "^1.7.0",
"ts-jest": "^29.1.3",
"ts-node": "^10.9.2",
"tsd": "^0.31.0",
"tsoa": "^6.4.0",
"typedoc": "^0.25.13",
"typeorm": "0.3.20",
"uuid": "^11.0.0",
"validator": "^13.0.0",
"winston": "^3.2.1",
"xss-clean": "^0.1.1"
"winston-daily-rotate-file": "^5.0.0",
"ws": "^8.18.0",
"xss-clean": "^0.1.1",
"zeus": "^3.3.2",
"zod": "^3.23.8",
"zod-to-json-schema": "^3.23.5"
},
"devDependencies": {
"@antfu/eslint-config": "^2.24.1",
"@graphql-codegen/cli": "^5.0.3",
"@graphql-codegen/typescript": "^4.1.1",
"@graphql-codegen/typescript-apollo-client-helpers": "^3.0.0",
"@graphql-codegen/typescript-operations": "^4.3.1",
"@redocly/cli": "^1.18.0",
"@types/express": "^4.17.21",
"@types/faker": "^6.6.9",
@@ -124,10 +179,13 @@
"eslint-plugin-jest": "^24.0.1",
"eslint-plugin-prettier": "^3.1.1",
"eslint-plugin-security": "^1.4.0",
"graphql-zeus": "^7.0.1",
"node-mocks-http": "^1.8.0",
"nodemon": "^2.0.0",
"prettier": "^2.0.5",
"supertest": "^6.0.1",
"tsconfig-paths": "^4.2.0",
"typescript": "^5.4.2"
}
},
"gitHead": "b05c17bee481d90c4cd82aa2a34ac428f8263a5f"
}
File diff suppressed because it is too large Load Diff
@@ -27,14 +27,13 @@ async function init() {
last_name: 'Иванов',
middle_name: 'Иванович',
birthdate: '2000-01-01',
phone: '+1234567890',
phone: '+72234567890',
email: 'ivanov.ivan@example.com',
full_address: 'Переулок Иванов д. 1',
},
});
const user = await userService.getUserByUsername('ant');
user.status = 'active';
user.is_registered = true;
await user.save();
@@ -45,7 +44,6 @@ async function init() {
role: 'user',
type: 'organization',
organization_data: {
is_cooperative: true,
type: 'coop',
short_name: '"ПК ТЕСТ-Восход"',
full_name: 'Потребительский Кооператив "ТЕСТ-ВОСХОД"',
@@ -62,13 +60,14 @@ async function init() {
email: 'chairman.voskhod@gmail.com',
phone: '+77077770707',
details: {
inn: '1234567890',
ogrn: '1234567890123',
kpp: '123456789',
inn: '71234567890',
ogrn: '71234567890123',
},
bank_account: {
account_number: '40817810099910004312',
currency: 'RUB',
card_number: '1234567890123456',
card_number: '71234567890123456',
bank_name: 'Sberbank',
details: {
bik: '123456789',
+34
View File
@@ -0,0 +1,34 @@
spectaql:
targetDir: ../docs/graphql
introspection:
url: 'http://localhost:2998/v1/graphql'
info:
title: 'API-Документация'
description: 'MONO - автономная и единая точка доступа к кооперативной экономике. MONO предоставляет методы для извлечения (QUERIES), изменения (MUTATIONS) и подписок (SUBSCRIPTIONS) на информацию в локальной базе данных кооператива и распределенной базе данных кооперативной экономики, используя технологию GRAPHQL.'
# This is non-standard and optional. If omitted, will use "title". Also, only relevant
# when building non-embedded.
x-htmlTitle: Your HTML page title here
termsOfService: 'https://цифровой-кооператив.рф'
contact:
# name: YourSite Support
email: support@coopenomics.world
# url: https://yoursite.com/support
license:
name: BY-NC-SA 4.0
url: 'https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode.ru'
# x-introItems:
# Can be a Title (for the Nav panel) + URL to simply add a link to somewhere
# - title: A silly link to our website!
# url: http://yoursite.com
# Can be a Title (for the Nav panel) + description (for the Content panel)
# - title: Important thing 1
# description: Some important stuff we wanted you to know. Supports `markdown`
# # Can be a Title (for the Nav panel) + file that gets loaded (for the Content panel)
# - title: Content from file that supports markdown
# file: ./examples/data/intro-items-markdown.md
# If you really want to hide the "Documentation by" at the bottom of your output, you can do so here
# Default: false
x-hidePoweredBy: true
+8
View File
@@ -0,0 +1,8 @@
# TEST
testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttest
test
st
test
st
+27
View File
@@ -0,0 +1,27 @@
// app.module.ts
import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { DomainModule } from './domain/domain.module';
import { ApplicationModule } from './modules/application.module';
import { InfrastructureModule } from './infrastructure/infrastructure.module';
import { ThrottlerModule } from '@nestjs/throttler';
@Module({
imports: [
ConfigModule.forRoot({
isGlobal: true, // Чтобы .env был доступен глобально
}),
ThrottlerModule.forRoot([
{
ttl: 60000,
limit: 50,
},
]),
DomainModule,
ApplicationModule,
InfrastructureModule,
],
providers: [],
exports: [],
})
export class AppModule {}
@@ -14,14 +14,6 @@ import routes from './routes/v1/index';
import { errorConverter, errorHandler } from './middlewares/error';
import ApiError from './utils/ApiError';
// import { connectGenerator } from './services/data.service';
// Подключите генератор
// connectGenerator()
// .then(() => {})
// .catch((error) => {
// console.error('Failed to connect generator:', error);
// });
const app = express();
if (config.env !== 'test') {
@@ -30,7 +22,7 @@ if (config.env !== 'test') {
}
// set security HTTP headers
app.use(helmet());
app.use(helmet({hsts: false}));
// parse json request body
app.use(express.json());
@@ -61,8 +53,12 @@ if (config.env === 'production') {
// v1 api routes
app.use('/v1', routes);
// send back a 404 error for any unknown api request
// Обработка остальных маршрутов, включая неизвестные
app.use((req, res, next) => {
if (req.path === '/v1/graphql') {
// Пропустить обработку для маршрута /graphql и позволить NestJS обработать запрос
return next();
}
next(new ApiError(httpStatus.NOT_FOUND, 'Not found'));
});
+134
View File
@@ -0,0 +1,134 @@
import dotenv from 'dotenv';
import { z } from 'zod';
import path from 'path';
dotenv.config({ path: path.join(__dirname, '../../.env') });
const envVarsSchema = z.object({
NODE_ENV: z.enum(['production', 'development', 'test']),
BASE_URL: z.string(),
SERVER_SECRET: z.string(),
PORT: z
.string()
.default('3000')
.transform((val) => parseInt(val, 10)),
MONGODB_URL: z.string().describe('Mongo DB url'),
JWT_SECRET: z.string().describe('JWT secret key'),
JWT_ACCESS_EXPIRATION_MINUTES: z
.string()
.default('30')
.transform((val) => parseInt(val, 10)),
JWT_REFRESH_EXPIRATION_DAYS: z
.string()
.default('30')
.transform((val) => parseInt(val, 10)),
JWT_RESET_PASSWORD_EXPIRATION_MINUTES: z
.string()
.default('10')
.transform((val) => parseInt(val, 10)),
JWT_VERIFY_EMAIL_EXPIRATION_MINUTES: z
.string()
.default('10')
.transform((val) => parseInt(val, 10)),
JWT_INVITE_EXPIRATION_MINUTES: z
.string()
.default('3600')
.transform((val) => parseInt(val, 10)),
SMTP_HOST: z.string().default(''), // Задаём пустую строку по умолчанию
SMTP_PORT: z
.string()
.default('587') // Пример порта по умолчанию
.transform((val) => parseInt(val, 10)),
SMTP_USERNAME: z.string().default(''), // Пустая строка для необязательного значения
SMTP_PASSWORD: z.string().default(''), // Пустая строка для необязательного значения
EMAIL_FROM: z.string().default(''), // Пустая строка для необязательного значения
COOPNAME: z.string().default('default_coopname'), // Задаём дефолтное значение
GRAPHQL_SERVICE: z.string().default('http://localhost:4090').describe('адрес сервиса GRAPHQL'),
// Новые переменные для PostgreSQL
POSTGRES_HOST: z.string().default('127.0.0.1'),
POSTGRES_PORT: z
.string()
.default('5432')
.transform((val) => parseInt(val, 10)),
POSTGRES_USERNAME: z.string(),
POSTGRES_PASSWORD: z.string(),
POSTGRES_DATABASE: z.string(),
REDIS_HOST: z.string(),
REDIS_PORT: z
.string()
.default('6379')
.transform((val) => parseInt(val, 10)),
REDIS_PASSWORD: z.string(),
BLOCKCHAIN_RPC: z.string(),
CHAIN_ID: z.string(),
});
// Валидация переменных окружения
const envVars = envVarsSchema.safeParse(process.env);
if (!envVars.success) {
const formattedErrors = envVars.error.format();
const errorMessages = Object.keys(formattedErrors)
.filter((key) => key !== '_errors')
.map((key) => `${key}: параметр не установлен`)
.join('\n');
console.error('❌ Ошибка конфигурации:\n', errorMessages);
process.exit(1); // Завершаем приложение в случае ошибки
}
// Экспорт настроек
export default {
env: envVars.data.NODE_ENV,
base_url: envVars.data.BASE_URL,
port: envVars.data.PORT,
server_secret: envVars.data.SERVER_SECRET,
blockchain: {
url: envVars.data.BLOCKCHAIN_RPC,
id: envVars.data.CHAIN_ID,
},
mongoose: {
url: envVars.data.MONGODB_URL + (envVars.data.NODE_ENV === 'test' ? '-test' : ''),
options: {
// useCreateIndex: true,
// useNewUrlParser: true,
// useUnifiedTopology: true,
},
},
jwt: {
secret: envVars.data.JWT_SECRET,
accessExpirationMinutes: envVars.data.JWT_ACCESS_EXPIRATION_MINUTES,
refreshExpirationDays: envVars.data.JWT_REFRESH_EXPIRATION_DAYS,
resetPasswordExpirationMinutes: envVars.data.JWT_RESET_PASSWORD_EXPIRATION_MINUTES,
verifyEmailExpirationMinutes: envVars.data.JWT_VERIFY_EMAIL_EXPIRATION_MINUTES,
inviteExpirationMinutes: envVars.data.JWT_INVITE_EXPIRATION_MINUTES,
},
email: {
smtp: {
host: envVars.data.SMTP_HOST,
port: envVars.data.SMTP_PORT,
auth: {
user: envVars.data.SMTP_USERNAME,
pass: envVars.data.SMTP_PASSWORD,
},
},
from: envVars.data.EMAIL_FROM,
},
coopname: envVars.data.COOPNAME,
graphql_service: envVars.data.GRAPHQL_SERVICE,
postgres: {
host: envVars.data.POSTGRES_HOST,
port: envVars.data.POSTGRES_PORT,
username: envVars.data.POSTGRES_USERNAME,
password: envVars.data.POSTGRES_PASSWORD,
database: envVars.data.POSTGRES_DATABASE,
},
redis: {
host: envVars.data.REDIS_HOST,
port: envVars.data.REDIS_PORT,
password: envVars.data.REDIS_PASSWORD,
},
};
@@ -0,0 +1,52 @@
import winston from 'winston';
import DailyRotateFile from 'winston-daily-rotate-file';
import config from './config';
const enumerateErrorFormat = winston.format((info) => {
if (info instanceof Error) {
Object.assign(info, { message: info.stack });
}
return info;
});
const logger = winston.createLogger({
level: config.env === 'development' ? 'debug' : 'info',
format: winston.format.combine(
winston.format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }),
enumerateErrorFormat(),
winston.format.colorize(),
winston.format.splat(),
winston.format.printf(({ timestamp, level, message, context, meta, ...restMeta }) => {
// Проверяем, является ли meta строкой
const contextString = typeof meta === 'string' ? `[${meta}]` : context ? `[${context}]` : '';
const metaString = typeof meta === 'object' && Object.keys(meta).length ? ` - ${JSON.stringify(meta)}` : '';
const additionalMetaString = Object.keys(restMeta).length ? ` - ${JSON.stringify(restMeta)}` : '';
return `${timestamp} ${level}: ${contextString} ${message}${metaString}${additionalMetaString}`;
})
),
transports: [
new DailyRotateFile({
filename: 'logs/application-%DATE%.log',
datePattern: 'YYYY-MM-DD',
zippedArchive: true,
maxSize: '20m',
maxFiles: '30d',
level: 'info',
}),
new DailyRotateFile({
filename: 'logs/error-%DATE%.log',
datePattern: 'YYYY-MM-DD',
zippedArchive: true,
maxSize: '20m',
maxFiles: '30d',
level: 'error',
}),
new winston.transports.Console({
stderrLevels: ['error'],
level: 'info',
}),
],
});
export default logger;
@@ -1,10 +1,16 @@
import morgan from 'morgan'
import config from './config'
import logger from './logger'
import morgan from 'morgan';
import config from './config';
import logger from './logger';
morgan.token('message', (req, res) => res.locals.errorMessage || '');
const getIpFormat = () => (config.env === 'production' ? ':remote-addr - ' : '');
// Новый токен для определения IP с проверкой нескольких заголовков
morgan.token('client-ip', (req) => {
return req.headers['cf-connecting-ip'] || req.headers['x-forwarded-for'] || req.connection.remoteAddress;
});
// Форматы с использованием нового токена 'client-ip'
const getIpFormat = () => (config.env === 'production' ? ':client-ip - ' : ':remote-addr - ');
const successResponseFormat = `${getIpFormat()}:method :url :status - :response-time ms`;
const errorResponseFormat = `${getIpFormat()}:method :url :status - :response-time ms - message: :message`;
@@ -21,4 +27,4 @@ const errorHandler = morgan(errorResponseFormat, {
export default {
successHandler,
errorHandler,
}
};
+35
View File
@@ -0,0 +1,35 @@
const user = [
'getSelf',
'initialPayment',
'getMyDocuments',
'getMyOrders',
'sendVerificationEmail',
'manageMyMethods',
'createDeposit',
'joinCooperative',
'getVars',
'readGraph',
];
const member = [
...user,
'getUsers',
'manageUsers',
'loadAgenda',
'loadStaff',
'getDocuments',
'loadInfo',
'manageOrders',
'regenerateDocument',
];
const chairman = [...user, ...member, 'addUser', 'setVars', 'manageSettings', 'setWif', 'setPlugin'];
const allRoles = {
user,
member,
chairman,
};
export const roles = Object.keys(allRoles);
export const roleRights = new Map(Object.entries(allRoles));
@@ -1,7 +1,7 @@
export const tokenTypes = {
ACCESS: 'access',
REFRESH: 'refresh',
RESET_PASSWORD: 'resetPassword',
RESET_KEY: 'resetPassword',
VERIFY_EMAIL: 'verifyEmail',
INVITE: 'invite',
};
@@ -14,8 +14,8 @@ export const getDocuments = catchAsync(async (req: RGetDocuments, res) => {
const filter = req.query?.filter;
const limit = req.query?.limit as number;
const page = req.query?.page as number;
const documents = await documentService.queryDocuments(filter, page, limit);
const type = req.query?.type as string;
const documents = await documentService.queryDocuments(type, filter, page, limit);
res.status(httpStatus.OK).send(documents);
});
@@ -1,8 +1,11 @@
export * as authController from './auth.controller';
export * as userController from './user.controller';
export * as documentController from './document.controller';
export * as paymentController from './payment.controller';
export * as orderController from './order.controller';
export * as coopController from './coop.controller';
export * as notifyController from './notify.controller';
export * as monoController from './mono.controller';
export * as systemController from './system.controller';
export * as participantController from './participant.controller';
export * as methodController from './method.controller';
export * as settingController from './setting.controller';
export * as pluginController from './plugin.controller';
@@ -0,0 +1,54 @@
import http from 'http-status';
import catchAsync from '../utils/catchAsync';
import { methodService } from '../services';
import { IGetResponse } from '../types/common';
import ApiError from '../utils/ApiError';
import httpStatus from 'http-status';
import { Cooperative } from 'cooptypes';
import { getUserByUsername } from '../services/user.service';
import type { RDeletePaymentMethod, RGetListPaymentMethods, RSavePaymentMethod } from '../types';
export const listPaymentMethods = catchAsync(async (req: RGetListPaymentMethods, res) => {
const filter = req.params?.username ? { username: req.params.username } : {};
const methods: IGetResponse<any> = await methodService.listPaymentMethods({ ...filter });
res.status(httpStatus.OK).send(methods);
});
export const addPaymentMethod = catchAsync(async (req: RSavePaymentMethod, res) => {
if (req.params?.username != req.body.username)
throw new ApiError(httpStatus.BAD_REQUEST, 'username в params и body должны совпадать');
const user = await getUserByUsername(req.body.username);
const method = req.body as any;
if (method.method_type === 'sbp' && !method.data.phone)
throw new ApiError(httpStatus.BAD_REQUEST, 'Не указан телефон для метода СБП');
if (method.method_type === 'bank_transfer' && !method.data.account_number)
throw new ApiError(httpStatus.BAD_REQUEST, 'Не верно указаны реквизиты для банковского платежа');
const paymentData: Cooperative.Payments.IPaymentData = {
username: req.body.username,
method_id: String(req.body.method_id),
// eslint-disable-next-line @typescript-eslint/no-explicit-any
method_type: req.body.method_type,
is_default: false,
data: req.body.data,
};
await methodService.savePaymentMethod(paymentData);
res.status(httpStatus.OK).send();
});
export const deletePaymentMethod = catchAsync(async (req: RDeletePaymentMethod, res) => {
await methodService.deletePaymentMethod({
username: req.params?.username,
method_id: req.body.method_id,
});
res.status(httpStatus.OK).send();
});
@@ -0,0 +1,63 @@
import http from 'http-status';
import catchAsync from '../utils/catchAsync';
import { orderService } from '../services';
import { ICreateDeposit } from '../types';
import { Request, Response } from 'express';
import httpStatus from 'http-status';
import pick from '../utils/pick';
import logger from '../config/logger';
import { ProviderInteractor } from '~/domain/provider/provider.interactor';
import { nestApp } from '..';
export const catchIPN = catchAsync(async (req: Request, res: Response) => {
const providerName = req.params.provider;
logger.info(`Recieve new IPN for provider ${providerName}`, { body: req.body, source: 'catchIPN' });
const providerInteractor = nestApp.get(ProviderInteractor);
const provider = providerInteractor.getProvider(providerName);
// Обрабатываем IPN данные
await provider.handleIPN(req.body);
res.status(200).send();
});
export const createDeposit = catchAsync(async (req: any, res: Response) => {
const username = req.user.username;
const result = await orderService.createDeposit(username, req.body as ICreateDeposit);
res.status(http.CREATED).send(result);
});
export const createInitialPayment = catchAsync(async (req: any, res: Response) => {
const username = req.user.username;
const result = await orderService.createInitialOrder(username);
res.status(http.CREATED).send(result);
});
export const getOrders = catchAsync(async (req: Request, res: Response) => {
const filter = pick(req.query, ['username', 'id', 'order_num', 'status']);
const options = pick(req.query, ['sortBy', 'limit', 'page']);
const orders = await orderService.getOrders(filter, options);
res.status(httpStatus.OK).send(orders);
});
export const getMyOrders = catchAsync(async (req: Request, res: Response) => {
console.log(req.params);
const filter = pick(req.query, ['status', 'id']);
const options = pick(req.query, ['sortBy', 'limit', 'page']);
filter.username = req.params.username;
const orders = await orderService.getOrders(filter, options);
res.status(httpStatus.OK).send(orders);
});
export const setStatus = catchAsync(async (req: Request, res: Response) => {
const { status, id } = req.body;
await orderService.setStatus(id, status);
res.status(httpStatus.OK).send();
});
@@ -0,0 +1,57 @@
import { Response } from 'express';
import { pluginService } from '../services';
import httpStatus from 'http-status';
import type { RGetPluginConfig, RGetPluginList, RGetPluginSchema, RSetPlugin } from '../types';
import ApiError from '../utils/ApiError';
import catchAsync from '../utils/catchAsync';
import pick from '../utils/pick';
import { ExtensionDomainInteractor } from '~/domain/extension/interactors/extension-domain.interactor';
import { nestApp } from '..';
export const getPluginList = catchAsync(async (req: RGetPluginList, res: Response) => {
const filter = pick(req.query, ['name']);
const options = pick(req.query, ['sortBy', 'limit', 'page']);
const plugins = await pluginService.queryPlugins(filter, options);
res.send(plugins);
});
// Контроллер для обновления параметров плагинов
export const setPluginConfig = catchAsync(async (req: RSetPlugin, res: Response) => {
const { name, config, enabled } = req.body;
try {
const updatedConfig = await pluginService.updatePluginConfig(name, enabled, config);
const extensionDomainInteractor = nestApp.get(ExtensionDomainInteractor);
if (enabled == false) await extensionDomainInteractor.terminateApp(name);
else await extensionDomainInteractor.restartApp(name);
res.status(httpStatus.OK).json({
message: `Конфигурация плагина ${name} успешно обновлена`,
config: updatedConfig,
});
} catch (e: any) {
throw new ApiError(httpStatus.BAD_REQUEST, e.message);
}
});
// Контроллер для обновления параметров плагинов
export const getPluginSchema = catchAsync(async (req: RGetPluginSchema, res: Response) => {
const { name } = req.query;
try {
const schema = pluginService.getPluginSchema(name);
res.status(httpStatus.OK).json(schema);
} catch (e: any) {
throw new ApiError(httpStatus.BAD_REQUEST, e.message);
}
});
// Контроллер для обновления параметров плагинов
export const getPluginConfig = catchAsync(async (req: RGetPluginConfig, res: Response) => {
const { name } = req.query;
const config = await pluginService.getPluginConfig(name);
res.status(httpStatus.OK).json(config);
});
@@ -0,0 +1,18 @@
import { settingService } from '../services';
import catchAsync from '../utils/catchAsync';
import httpStatus from 'http-status';
export const updateSettings = catchAsync(async (req, res) => {
const { settings } = req.body;
await settingService.updateSettings(settings);
res.status(httpStatus.OK).send();
});
export const getSettings = catchAsync(async (req, res) => {
const settings = await settingService.getSettings();
res.status(httpStatus.OK).send(settings);
});
@@ -0,0 +1,57 @@
import httpStatus from 'http-status';
import { getMonoStatus } from '../services/system.service';
import { getBlockchainInfo } from '../services/blockchain.service';
import { IHealthResponse, IInstall, RInstall } from '../types';
import { Request, Response } from 'express';
import catchAsync from '../utils/catchAsync';
import { systemService } from '../services';
import type { IInit, ISetVars, RInit, RSetVars, RSetWif } from '../types/auto-generated/system.validation';
import logger from '../config/logger';
export const init = catchAsync(async (req: RInit, res: Response) => {
const { body } = req;
await systemService.init(body as IInit);
res.status(httpStatus.OK).send();
});
export const install = catchAsync(async (req: RInstall, res: Response) => {
const { body } = req;
await systemService.install(body as IInstall);
logger.info('System installed');
res.status(httpStatus.OK).send();
});
export const setWif = catchAsync(async (req: RSetWif, res: Response) => {
await systemService.setWif(req.body);
res.status(httpStatus.OK).send();
});
export const getHealth = catchAsync(async (req: Request, res: Response) => {
const status = await getMonoStatus();
const blockchain = await getBlockchainInfo();
const result: IHealthResponse = {
status,
blockchain,
};
res.status(httpStatus.OK).send(result);
});
export const setVars = catchAsync(async (req: RSetVars, res: Response) => {
await systemService.setVars(req.body as ISetVars);
res.status(httpStatus.OK).send();
});
export const getVarsSchema = catchAsync(async (req: RSetVars, res: Response) => {
const schema = await systemService.getVarsSchema();
res.status(httpStatus.OK).send(schema);
});
export const getVars = catchAsync(async (req: RSetVars, res: Response) => {
const vars = await systemService.getVars();
res.status(httpStatus.OK).send(vars);
});
@@ -5,12 +5,26 @@ import { userService, tokenService, emailService, blockchainService } from '../s
import { IAddUser, ICreateUser, RCreateUser } from '../types';
import httpStatus from 'http-status';
import pick from '../utils/pick';
import { IGetResponse } from '../types/common';
import { IUser, userStatus } from '../models/user.model';
// import { IGetResponse } from '../types/common';
import { IUser, userStatus } from '../types';
import { Request, Response } from 'express';
import { generateUsername } from '../../tests/utils/generateUsername';
import { generateUsername } from '../utils/generate-username';
import config from '../config/config';
import logger from '../config/logger';
// import { Body, Controller, Get, Path, Post, Query, Route, SuccessResponse } from 'tsoa';
// @Route('users')
// export default class UsersController extends Controller {
// @SuccessResponse(201, 'Created') // Указываем статус 201 и описание
// @Post()
// public async createUser(@Body() req: RCreateUser): Promise<{ user: IUser; tokens: any }> {
// const user = await userService.createUser(req.body);
// const tokens = await tokenService.generateAuthTokens(user);
// this.setStatus(201); // Устанавливаем статус 201 Created
// return { user, tokens }; // Возвращаем объект в ответ
// }
// }
/**
* Порядок регистрации:
@@ -27,6 +41,7 @@ import logger from '../config/logger';
* 11. (trx confirmpay) Пользователь подписывает велком-письмо с подтверждением собственноручности оплаты (транзакция в блокчейне для активации)
* 12. Регистрация продолжается ожиданием решения совета
*/
export const createUser = catchAsync(async (req: RCreateUser, res) => {
const user = await userService.createUser(req.body);
const tokens = await tokenService.generateAuthTokens(user);
@@ -47,13 +62,15 @@ export const addUser = catchAsync(async (req: Request, res: Response) => {
const user = await userService.createUser(newUser);
user.status = userStatus['4_Registered'];
user.is_registered = true;
user.has_account = true;
await user.save();
try {
await blockchainService.addUser({
...body,
...newUser,
registrator: config.service_username,
registrator: config.coopname,
referer: body.referer ? body.referer : '',
coopname: config.coopname,
meta: '',
@@ -70,45 +87,6 @@ export const addUser = catchAsync(async (req: Request, res: Response) => {
res.status(httpStatus.CREATED).send({ user });
});
export const getUsers = catchAsync(async (req, res) => {
const filter = pick(req.query, ['username', 'role']);
const options = pick(req.query, ['sortBy', 'limit', 'page']);
const users = await userService.queryUsers(filter, options);
const result = {} as IGetResponse<IUser>;
const data = [] as any;
for await (const user of users.results) {
const json = user.toJSON();
if (user.type != 'service') {
json.private_data = await user.getPrivateData();
data.push(json);
}
}
result.results = data;
result.limit = users.limit;
result.page = users.page;
result.totalPages = users.totalPages;
result.totalResults = users.totalResults;
res.send(result);
});
export const getUser = catchAsync(async (req, res) => {
const user = await userService.getUserByUsername(req.params.username);
if (!user) {
throw new ApiError(http.NOT_FOUND, 'Пользователь не найден');
}
const json = user.toJSON();
if (user.type != 'service') {
json.private_data = await user.getPrivateData();
}
res.send(json);
});
export const updateUser = catchAsync(async (req, res) => {
if (req.user.role !== 'member' && req.user.role !== 'chairman')
throw new ApiError(httpStatus.FORBIDDEN, 'Только председатель или член совета может обновить данные пользователя');
@@ -118,6 +96,23 @@ export const updateUser = catchAsync(async (req, res) => {
});
export const deleteUser = catchAsync(async (req, res) => {
if (req.user.role !== 'member' && req.user.role !== 'chairman')
throw new ApiError(httpStatus.FORBIDDEN, 'Только председатель или член совета может обновить данные пользователя');
await userService.deleteUserByUsername(req.params.username);
res.status(http.NO_CONTENT).send();
});
export const getUsers = catchAsync(async (req, res) => {
const filter = pick(req.query, ['username', 'role']);
const options = pick(req.query, ['sortBy', 'limit', 'page']);
const users = await userService.queryUsers(filter, options);
res.send(users);
});
export const getUser = catchAsync(async (req, res) => {
const user = await userService.getUserByUsername(req.params.username);
res.send(user);
});
@@ -2,6 +2,8 @@ import { io, Socket } from 'socket.io-client';
import { IAction } from '../types/common';
import { SovietContract } from 'cooptypes';
import { wsService } from '../services';
import logger from '../config/logger';
import config from '../config/config';
let clientSocket: Socket | undefined;
@@ -10,7 +12,7 @@ export const initSocketConnection = (serverUrl: string): void => {
clientSocket = io(serverUrl);
clientSocket.on('connect', () => {
console.log('Успешное подключение к серверу оповещений.');
logger.info('Success connection to notification server', { source: 'initSocketConnection' });
});
clientSocket.on('event', (event: IAction) => {
@@ -18,7 +20,7 @@ export const initSocketConnection = (serverUrl: string): void => {
});
clientSocket.on('connect_error', (error: Error) => {
console.error('Ошибка подключения к серверу оповещений:');
logger.error('Fail connect to notification server', { source: 'initSocketConnection' });
});
};
@@ -26,13 +28,19 @@ export const initSocketConnection = (serverUrl: string): void => {
export const closeSocketConnection = (): void => {
if (clientSocket) {
clientSocket.disconnect();
console.log('Client disconnected from server');
logger.info('Client disconnected from server', { source: 'closeSocketConnection' });
clientSocket = undefined;
}
};
async function processEvent(event: IAction) {
if (event.receiver === SovietContract.contractName.production && event.name === 'updateboard') {
wsService.updateBoard(event.data);
if (event.receiver === config.coopname) {
if (event.name === 'updateboard') {
wsService.updateBoard(event.data);
}
if (event.name === 'createboard') {
wsService.updateBoard(event.data);
}
}
}
@@ -14,73 +14,6 @@
}
],
"paths": {
"/auth/register": {
"post": {
"summary": "Register as user",
"tags": [
"Auth"
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"name",
"email",
"password"
],
"properties": {
"name": {
"type": "string"
},
"email": {
"type": "string",
"format": "email",
"description": "must be unique"
},
"password": {
"type": "string",
"format": "password",
"minLength": 8,
"description": "At least one number and one letter"
}
},
"example": {
"name": "fake name",
"email": "fake@example.com",
"password": "password1"
}
}
}
}
},
"responses": {
"201": {
"description": "Created",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"user": {
"$ref": "#/components/schemas/User"
},
"tokens": {
"$ref": "#/components/schemas/AuthTokens"
}
}
}
}
}
},
"400": {
"$ref": "#/components/responses/DuplicateEmail"
}
}
}
},
"/auth/login": {
"post": {
"summary": "Login",
@@ -844,11 +777,11 @@
"ICreatedPayment": {
"type": "object",
"required": [
"order_id",
"order_num",
"confirmation_token"
],
"properties": {
"order_id": {
"order_num": {
"type": "number"
},
"confirmation_token": {
@@ -1290,7 +1223,7 @@
"tags": [
{
"name": "Auth",
"description": "Authentication"
"description": "Управление аудентификацией"
},
{
"name": "Orders",
@@ -3,7 +3,7 @@ import config from '../config/config';
const swaggerDef = {
openapi: '3.0.0',
info: {
title: "API Цифрового Кооператива",
title: 'API Цифрового Кооператива',
// description: `Модуль предоставляет:
// - API для хранения персональных данных пользователей
@@ -0,0 +1,12 @@
// domain/account/account-domain.module.ts
import { Module } from '@nestjs/common';
import { AccountDomainInteractor } from './interactors/account.interactor';
import { AccountDomainService } from '~/domain/account/services/account-domain.service';
@Module({
imports: [],
providers: [AccountDomainService, AccountDomainInteractor],
exports: [AccountDomainInteractor, AccountDomainService],
})
export class AccountDomainModule {}
@@ -0,0 +1,16 @@
import { RegistratorContract, type SovietContract } from 'cooptypes';
import type { BlockchainAccountInterface } from '~/types/shared';
import type { MonoAccountDomainInterface } from '../interfaces/mono-account-domain.interface';
export class AccountDomainEntity {
public readonly username!: string;
public blockchain_account!: BlockchainAccountInterface | null;
public user_account!: RegistratorContract.Tables.Accounts.IAccount | null;
public provider_account!: MonoAccountDomainInterface | null;
public participant_account!: SovietContract.Tables.Participants.IParticipants | null;
// public cardcoop_account!: ?
constructor(data: AccountDomainEntity) {
Object.assign(this, data);
}
}
@@ -0,0 +1,116 @@
import { AccountDomainEntity } from '../entities/account-domain.entity';
import config from '~/config/config';
import { AccountDomainService } from '~/domain/account/services/account-domain.service';
import { Inject, Injectable } from '@nestjs/common';
import { tokenService, userService } from '~/services';
import type { MonoAccountDomainInterface } from '../interfaces/mono-account-domain.interface';
import type { GetAccountsInputDomainInterface } from '../interfaces/get-accounts-input.interface';
import type {
PaginationInputDomainInterface,
PaginationResultDomainInterface,
} from '~/domain/common/interfaces/pagination.interface';
import type { QueryResultLegacy } from '~/domain/common/interfaces/query-result-legacy-domain.interface';
import type { RegisterAccountDomainInterface } from '../interfaces/register-account-input.interface';
import type { RegisteredAccountDomainInterface } from '../interfaces/registeted-account.interface';
import type { UpdateAccountDomainInterface } from '../interfaces/update-account-input.interface';
import { AccountType } from '~/modules/account/enum/account-type.enum';
import { ORGANIZATION_REPOSITORY, OrganizationRepository } from '~/domain/common/repositories/organization.repository';
import { INDIVIDUAL_REPOSITORY, IndividualRepository } from '~/domain/common/repositories/individual.repository';
import { ENTREPRENEUR_REPOSITORY, EntrepreneurRepository } from '~/domain/common/repositories/entrepreneur.repository';
import { IndividualDomainEntity } from '~/domain/branch/entities/individual-domain.entity';
import { OrganizationDomainEntity } from '~/domain/branch/entities/organization-domain.entity';
import { EntrepreneurDomainEntity } from '~/domain/branch/entities/entrepreneur-domain.entity';
@Injectable()
export class AccountDomainInteractor {
constructor(
private readonly accountDomainService: AccountDomainService,
@Inject(ORGANIZATION_REPOSITORY) private readonly organizationRepository: OrganizationRepository,
@Inject(INDIVIDUAL_REPOSITORY) private readonly individualRepository: IndividualRepository,
@Inject(ENTREPRENEUR_REPOSITORY) private readonly entrepreneurRepository: EntrepreneurRepository
) {}
async updateAccount(data: UpdateAccountDomainInterface): Promise<AccountDomainEntity> {
await userService.updateUserByUsername(data.username, {
email: data.email,
});
// обновляем данные в хранилище
if (data.type === AccountType.Individual && data.individual_data) {
//здесь и далее мы подставляем email и username т.к. они требуются в интерфесе генератора
const individual = new IndividualDomainEntity({ ...data.individual_data, username: data.username, email: data.email });
await this.individualRepository.create(individual);
} else if (data.type === AccountType.Organization && data.organization_data) {
const organization = new OrganizationDomainEntity({
...data.organization_data,
username: data.username,
email: data.email,
});
await this.organizationRepository.create(organization);
} else if (data.type === AccountType.Entrepreneur && data.entrepreneur_data) {
const entrepreneur = new EntrepreneurDomainEntity({
...data.entrepreneur_data,
username: data.username,
email: data.email,
});
await this.entrepreneurRepository.create(entrepreneur);
}
return await this.getAccount(data.username);
}
async deleteAccount(username: string): Promise<void> {
await userService.deleteUserByUsername(username);
}
async registerAccount(data: RegisterAccountDomainInterface): Promise<RegisteredAccountDomainInterface> {
//TODO refactor after migrate from mongo
const user = await userService.createUser({ ...data, role: 'user' });
const tokens = await tokenService.generateAuthTokens(user);
const account = await this.getAccount(data.username);
const result: RegisteredAccountDomainInterface = {
account,
tokens,
};
return result;
}
async getAccount(username: string): Promise<AccountDomainEntity> {
return await this.accountDomainService.getAccount(username);
}
async getAccounts(
data: GetAccountsInputDomainInterface,
options: PaginationInputDomainInterface
): Promise<PaginationResultDomainInterface<AccountDomainEntity>> {
const provider_accounts = (await userService.queryUsers(data, options)) as QueryResultLegacy<MonoAccountDomainInterface>;
const result: PaginationResultDomainInterface<AccountDomainEntity> = {
items: [],
totalCount: provider_accounts.totalResults,
totalPages: provider_accounts.totalPages,
currentPage: provider_accounts.page,
};
for (const account of provider_accounts.results) {
const user_account = await this.accountDomainService.getUserAccount(account.username);
const blockchain_account = await this.accountDomainService.getBlockchainAccount(account.username);
const participant_account = await this.accountDomainService.getParticipantAccount(config.coopname, account.username);
const item = new AccountDomainEntity({
username: account.username,
user_account,
blockchain_account,
provider_account: account,
participant_account,
});
result.items.push(item);
}
return result;
}
}
@@ -0,0 +1,15 @@
import type { RegistratorContract, SovietContract } from 'cooptypes';
import type { BlockchainAccountInterface } from '~/types/shared';
export interface AccountBlockchainPort {
getBlockchainAccount(username: string): Promise<BlockchainAccountInterface | null>;
getCooperatorAccount(coopname: string): Promise<RegistratorContract.Tables.Cooperatives.ICooperative | null>;
getParticipantAccount(
coopname: string,
username: string
): Promise<SovietContract.Tables.Participants.IParticipants | null>;
getUserAccount(username: string): Promise<RegistratorContract.Tables.Accounts.IAccount | null>;
addParticipantAccount(data: RegistratorContract.Actions.AddUser.IAddUser): Promise<void>;
}
export const ACCOUNT_BLOCKCHAIN_PORT = Symbol('AccountBlockchainPort');
@@ -0,0 +1,5 @@
import type { Cooperative } from 'cooptypes';
export type CreateOrganizationDataInputDomainInterface = Omit<Cooperative.Users.IOrganizationData, 'username'> & {
bank_account: Cooperative.Payments.IBankAccount;
};
@@ -0,0 +1,3 @@
export interface GetAccountsInputDomainInterface {
role?: string;
}
@@ -0,0 +1,25 @@
export enum MonoAccountStatusDomainInterface {
'Created' = 'created',
'Joined' = 'joined',
'Payed' = 'payed',
'Registered' = 'registered',
'Active' = 'active',
'Failed' = 'failed',
'Refunded' = 'refunded',
'Blocked' = 'blocked',
}
export interface MonoAccountDomainInterface {
username: string;
status: MonoAccountStatusDomainInterface;
message?: string;
is_registered: boolean;
has_account: boolean;
type: 'individual' | 'entrepreneur' | 'organization';
public_key: string;
referer: string;
email: string;
role: string;
is_email_verified: boolean;
initial_order?: string;
}
@@ -0,0 +1,15 @@
import type { Cooperative } from 'cooptypes';
import type { CreateOrganizationDataInputDomainInterface } from './create-organization-data-input-domain.interface';
export interface RegisterAccountDomainInterface {
email: string;
entrepreneur_data?: Omit<Cooperative.Users.IEntrepreneurData, 'username'> & {
bank_account: Cooperative.Payments.IBankAccount;
};
individual_data?: Omit<Cooperative.Users.IIndividualData, 'username'>;
organization_data?: CreateOrganizationDataInputDomainInterface;
public_key?: string;
referer?: string;
type: 'individual' | 'entrepreneur' | 'organization';
username: string;
}
@@ -0,0 +1,7 @@
import type { AccountDomainEntity } from '../entities/account-domain.entity';
import type { TokensDomainInterface } from './tokens-domain.interface';
export interface RegisteredAccountDomainInterface {
account: AccountDomainEntity;
tokens: TokensDomainInterface;
}
@@ -0,0 +1,4 @@
export interface TokenDomainInterface {
token: string;
expires: Date;
}
@@ -0,0 +1,6 @@
import type { TokenDomainInterface } from './token-domain.interface';
export interface TokensDomainInterface {
access: TokenDomainInterface;
refresh: TokenDomainInterface;
}
@@ -0,0 +1,14 @@
import type { Cooperative } from 'cooptypes';
import type { OrganizationType } from '~/modules/account/enum/organization-type.enum';
export interface UpdateAccountDomainInterface {
email: string;
entrepreneur_data?: Omit<Cooperative.Users.IEntrepreneurData, 'username'>;
individual_data?: Omit<Cooperative.Users.IIndividualData, 'username'>;
organization_data?: Omit<Cooperative.Users.IOrganizationData, 'username' | 'type'> & { type: OrganizationType };
public_key?: string;
referer?: string;
role: 'user';
type: 'individual' | 'entrepreneur' | 'organization';
username: string;
}
@@ -0,0 +1,72 @@
import { BadRequestException, Inject, Injectable } from '@nestjs/common';
import type { BlockchainAccountInterface } from '~/types/shared';
import { ACCOUNT_BLOCKCHAIN_PORT, type AccountBlockchainPort } from '../interfaces/account-blockchain.port';
import type { RegistratorContract, SovietContract } from 'cooptypes';
import config from '~/config/config';
import { AccountDomainEntity } from '../entities/account-domain.entity';
import type { MonoAccountDomainInterface } from '../interfaces/mono-account-domain.interface';
import { userService } from '~/services';
import type { RegisterAccountDomainInterface } from '../interfaces/register-account-input.interface';
import { userStatus } from '~/types';
@Injectable()
export class AccountDomainService {
constructor(@Inject(ACCOUNT_BLOCKCHAIN_PORT) private readonly accountBlockchainPort: AccountBlockchainPort) {}
async addProviderAccount(data: RegisterAccountDomainInterface): Promise<MonoAccountDomainInterface> {
//TODO refactor it after migrate from mongo
const user = await userService.createUser({ ...data, role: 'user' });
user.status = userStatus['4_Registered'];
user.is_registered = true;
user.has_account = true;
await user.save();
return user as unknown as MonoAccountDomainInterface;
}
async addParticipantAccount(data: RegistratorContract.Actions.AddUser.IAddUser): Promise<void> {
try {
await this.accountBlockchainPort.addParticipantAccount(data);
} catch (e: any) {
// удаляем аккаунт провайдера если транзакция в блокчейн не прошла (для возможности повтора)
await userService.deleteUserByUsername(data.username);
throw new BadRequestException(e.message);
}
}
async getAccount(username: string): Promise<AccountDomainEntity> {
const user_account = await this.getUserAccount(username);
const blockchain_account = await this.getBlockchainAccount(username);
const participant_account = await this.getParticipantAccount(config.coopname, username);
//TODO refactor after migrate from mongo
const provider_account = (await userService.findUser(username)) as unknown as MonoAccountDomainInterface;
return new AccountDomainEntity({
username,
user_account,
blockchain_account,
provider_account: provider_account,
participant_account,
});
}
async getBlockchainAccount(username: string): Promise<BlockchainAccountInterface | null> {
return await this.accountBlockchainPort.getBlockchainAccount(username);
}
async getCooperatorAccount(username: string): Promise<RegistratorContract.Tables.Cooperatives.ICooperative | null> {
return await this.accountBlockchainPort.getCooperatorAccount(username);
}
async getParticipantAccount(
coopname: string,
username: string
): Promise<SovietContract.Tables.Participants.IParticipants | null> {
return await this.accountBlockchainPort.getParticipantAccount(coopname, username);
}
async getUserAccount(username: string): Promise<RegistratorContract.Tables.Accounts.IAccount | null> {
return await this.accountBlockchainPort.getUserAccount(username);
}
}
@@ -0,0 +1,10 @@
import { Module } from '@nestjs/common';
import { DocumentDomainModule } from '../document/document.module';
import { AgendaDomainInteractor } from './interactors/agenda-domain.interactor';
@Module({
imports: [DocumentDomainModule],
providers: [AgendaDomainInteractor],
exports: [AgendaDomainInteractor],
})
export class AgendaDomainModule {}
@@ -0,0 +1,82 @@
import { DocumentDomainService } from '~/domain/document/services/document-domain.service';
import { Injectable } from '@nestjs/common';
import { blockchainService } from '~/services';
import config from '~/config/config';
import { SovietContract } from 'cooptypes';
import type { AgendaWithDocumentsDomainInterface } from '../interfaces/agenda-with-documents-domain.interface';
import { getActions } from '~/utils/getFetch';
import type { VotingAgendaDomainInterface } from '../interfaces/voting-agenda-domain.interface';
@Injectable()
export class AgendaDomainInteractor {
constructor(private readonly documentDomainService: DocumentDomainService) {}
async getAgenda(): Promise<AgendaWithDocumentsDomainInterface[]> {
// Шаг 1: Загрузить повестку дня
const agenda = await this.loadAgenda(config.coopname);
// Шаг 2: Построить комплексную повестку (complexAgenda)
const complexAgenda: AgendaWithDocumentsDomainInterface[] = [];
for (const { action, table } of agenda) {
// Создание пакета документов для каждого действия
const documents = await this.documentDomainService.buildDocumentPackage(action);
// Проверяем наличие заявления, прежде чем добавлять в комплексную повестку
// Делаем только потому что в локальной разработке заявлений после перезапуска блокчейна может и не быть в истории цепочки,
// а это ломает отображение на фронте. При нормальные условиях заявление всегда должно быть.
if (documents.statement?.document) {
complexAgenda.push({
table,
action,
documents,
});
}
}
// Шаг 3: Вернуть итоговую комплексную повестку
return complexAgenda;
}
/**
* Загружает повестку дня (agenda) на основании решений и связанных действий.
*/
async loadAgenda(coopname: string): Promise<VotingAgendaDomainInterface[]> {
//TODO блокчейн-адаптер здесь повесить
const api = await blockchainService.getApi();
// Загружаем таблицу решений
const decisions = (await blockchainService.lazyFetch(
api,
SovietContract.contractName.production as string,
coopname,
'decisions'
)) as SovietContract.Tables.Decisions.IDecision[];
const agenda: VotingAgendaDomainInterface[] = [];
for (const decision of decisions) {
// Ищем экшен, связанный с конкретным решением
const actionResponse = await getActions(`${process.env.SIMPLE_EXPLORER_API}/get-actions`, {
filter: JSON.stringify({
account: SovietContract.contractName.production,
name: SovietContract.Actions.Registry.NewSubmitted.actionName,
receiver: process.env.COOPNAME,
'data.decision_id': String(decision.id),
}),
page: 1,
limit: 1,
});
const action = actionResponse?.results?.[0];
if (action) {
agenda.push({
table: decision,
action,
});
}
}
return agenda;
}
}
@@ -0,0 +1,7 @@
import type { GeneratedDocumentDomainInterface } from '~/domain/document/interfaces/generated-document-domain.interface';
import type { ExtendedBlockchainActionDomainInterface } from './extended-blockchain-action-domain.interface';
export interface ActDetailDomainInterface {
action?: ExtendedBlockchainActionDomainInterface;
document?: GeneratedDocumentDomainInterface;
}
@@ -0,0 +1,6 @@
import type { DocumentPackageDomainInterface } from './document-package-domain.interface';
import type { VotingAgendaDomainInterface } from './voting-agenda-domain.interface';
export interface AgendaWithDocumentsDomainInterface extends VotingAgendaDomainInterface {
documents: DocumentPackageDomainInterface;
}
@@ -0,0 +1,3 @@
import type { Cooperative } from 'cooptypes';
export type BlockchainActionDomainInterface = Cooperative.Blockchain.IAction;
@@ -0,0 +1,9 @@
import type { GeneratedDocumentDomainInterface } from '~/domain/document/interfaces/generated-document-domain.interface';
import type { ExtendedBlockchainActionDomainInterface } from './extended-blockchain-action-domain.interface';
export interface DecisionDetailDomainInterface {
action: ExtendedBlockchainActionDomainInterface;
document: GeneratedDocumentDomainInterface;
votes_for: ExtendedBlockchainActionDomainInterface[];
votes_against: ExtendedBlockchainActionDomainInterface[];
}
@@ -0,0 +1,11 @@
import type { GeneratedDocumentDomainInterface } from '~/domain/document/interfaces/generated-document-domain.interface';
import type { ActDetailDomainInterface } from './act-detail-domain.interface';
import type { DecisionDetailDomainInterface } from './decision-detail-domain.interface';
import type { StatementDetailDomainInterface } from './statement-detail-domain.interface';
export interface DocumentPackageDomainInterface {
statement: StatementDetailDomainInterface;
decision: DecisionDetailDomainInterface;
acts: ActDetailDomainInterface[];
links: GeneratedDocumentDomainInterface[];
}
@@ -0,0 +1,7 @@
import type { DocumentPackageDomainInterface } from './document-package-domain.interface';
export interface DocumentPackagesResponseDomainInterface {
results: DocumentPackageDomainInterface[];
page: number;
limit: number;
}

Some files were not shown because too many files have changed in this diff Show More