@opengis/fastify-table 1.1.56 → 1.1.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (257) hide show
  1. package/index.js +27 -14
  2. package/package.json +9 -4
  3. package/{cron → server/plugins/cron}/funcs/addCron.js +12 -12
  4. package/server/plugins/cron/index.js +6 -0
  5. package/{crud → server/plugins/crud}/funcs/dataDelete.js +3 -1
  6. package/{crud → server/plugins/crud}/funcs/dataInsert.js +3 -0
  7. package/{crud → server/plugins/crud}/funcs/dataUpdate.js +3 -1
  8. package/{crud → server/plugins/crud}/funcs/getAccess.js +5 -3
  9. package/{crud → server/plugins/crud}/funcs/getOpt.js +2 -0
  10. package/{crud → server/plugins/crud}/funcs/getToken.js +4 -1
  11. package/{crud → server/plugins/crud}/funcs/setOpt.js +3 -0
  12. package/{crud → server/plugins/crud}/funcs/setToken.js +4 -1
  13. package/{crud → server/plugins/crud}/funcs/utils/getFolder.js +2 -1
  14. package/{crud → server/plugins/crud}/funcs/utils/logChanges.js +2 -2
  15. package/server/plugins/crud/index.js +23 -0
  16. package/{hook → server/plugins/hook}/funcs/addHook.js +1 -1
  17. package/{hook → server/plugins/hook}/funcs/applyHook.js +2 -2
  18. package/server/plugins/hook/index.js +8 -0
  19. package/{logger → server/plugins/logger}/createFileStream.js +1 -1
  20. package/{logger → server/plugins/logger}/getLogger.js +1 -1
  21. package/{migration → server/plugins/migration/funcs}/exec.migrations.js +1 -1
  22. package/server/plugins/migration/index.js +7 -0
  23. package/{pg → server/plugins/pg}/funcs/getPG.js +3 -3
  24. package/{pg → server/plugins/pg}/funcs/getPGAsync.js +3 -3
  25. package/{pg → server/plugins/pg}/funcs/init.js +2 -4
  26. package/{pg → server/plugins/pg}/index.js +5 -14
  27. package/{pg → server/plugins/pg}/pgClients.js +2 -1
  28. package/{policy → server/plugins/policy}/funcs/checkPolicy.js +1 -1
  29. package/{crud/controllers/utils → server/plugins/policy/funcs}/checkXSS.js +1 -4
  30. package/{policy → server/plugins/policy}/index.js +0 -2
  31. package/{policy/funcs → server/plugins/policy}/sqlInjection.js +1 -1
  32. package/{redis → server/plugins/redis}/funcs/getRedis.js +2 -1
  33. package/{redis → server/plugins/redis}/funcs/redisClients.js +1 -0
  34. package/{redis → server/plugins/redis}/index.js +2 -6
  35. package/{table → server/plugins/table}/funcs/getFilterSQL/index.js +3 -1
  36. package/{table/controllers/utils → server/plugins/table/funcs}/getSelectMeta.js +1 -10
  37. package/{table/controllers/utils → server/plugins/table/funcs}/getTemplate.js +2 -1
  38. package/{table/controllers/utils → server/plugins/table/funcs}/getTemplatePath.js +3 -3
  39. package/{table/controllers/utils → server/plugins/table/funcs}/getTemplates.js +2 -1
  40. package/{table/controllers/utils → server/plugins/table/funcs}/gisIRColumn.js +4 -7
  41. package/{table → server/plugins/table}/funcs/metaFormat/getSelectVal.js +4 -2
  42. package/{table → server/plugins/table}/funcs/metaFormat/index.js +3 -1
  43. package/server/plugins/table/index.js +13 -0
  44. package/{util → server/plugins/util/funcs}/eventStream.js +1 -0
  45. package/server/plugins/util/index.js +7 -0
  46. package/{cron → server/routes/cron}/controllers/cronApi.js +1 -1
  47. package/{cron → server/routes/cron}/index.js +5 -3
  48. package/{crud → server/routes/crud}/controllers/deleteCrud.js +2 -2
  49. package/{crud → server/routes/crud}/controllers/insert.js +5 -3
  50. package/{crud → server/routes/crud}/controllers/update.js +3 -3
  51. package/server/routes/crud/index.js +19 -0
  52. package/{util → server/routes/logger}/controllers/logger.file.js +5 -5
  53. package/{util → server/routes/logger}/controllers/utils/checkUserAccess.js +1 -1
  54. package/{util → server/routes/logger}/controllers/utils/getRootDir.js +4 -3
  55. package/server/routes/logger/index.js +15 -0
  56. package/{util → server/routes/properties}/controllers/properties.add.js +19 -20
  57. package/server/routes/properties/controllers/properties.get.js +17 -0
  58. package/{util → server/routes/properties}/index.js +5 -8
  59. package/{table → server/routes/table}/controllers/card.js +3 -5
  60. package/{table → server/routes/table}/controllers/data.js +4 -10
  61. package/{table → server/routes/table}/controllers/filter.js +3 -4
  62. package/{table → server/routes/table}/controllers/form.js +1 -1
  63. package/{table → server/routes/table}/controllers/search.js +15 -17
  64. package/{table → server/routes/table}/controllers/suggest.js +8 -7
  65. package/{table → server/routes/table}/controllers/table.js +5 -7
  66. package/{table → server/routes/table}/index.js +1 -10
  67. package/{table → server/routes/table}/schema.js +1 -1
  68. package/{util → server/routes/util}/controllers/next.id.js +1 -1
  69. package/server/routes/util/index.js +11 -0
  70. package/utils.js +58 -50
  71. package/.eslintrc.cjs +0 -44
  72. package/.gitlab-ci.yml +0 -18
  73. package/Changelog.md +0 -352
  74. package/cron/schema.js +0 -8
  75. package/crud/index.js +0 -31
  76. package/crud/schema.js +0 -11
  77. package/docs/.vitepress/abbr.mjs +0 -26
  78. package/docs/.vitepress/config.mjs +0 -127
  79. package/docs/.vitepress/navigation.mjs +0 -82
  80. package/docs/.vitepress/theme/Layout.vue +0 -17
  81. package/docs/.vitepress/theme/components/NavigationLinks.vue +0 -102
  82. package/docs/.vitepress/theme/components/Panzoom.vue +0 -169
  83. package/docs/.vitepress/theme/index.mjs +0 -15
  84. package/docs/.vitepress/theme/style.scss +0 -163
  85. package/docs/abbr.json +0 -4
  86. package/docs/api/cron/cronApi.md +0 -56
  87. package/docs/api/crud/deleteCrud.md +0 -58
  88. package/docs/api/crud/insert.md +0 -82
  89. package/docs/api/crud/update.md +0 -85
  90. package/docs/api/index.md +0 -47
  91. package/docs/api/notification/testEmail.md +0 -91
  92. package/docs/api/table/card.md +0 -73
  93. package/docs/api/table/data.md +0 -134
  94. package/docs/api/table/export.md +0 -60
  95. package/docs/api/table/filter.md +0 -104
  96. package/docs/api/table/form.md +0 -126
  97. package/docs/api/table/search.md +0 -123
  98. package/docs/api/table/suggest.md +0 -156
  99. package/docs/api/table/table.md +0 -107
  100. package/docs/api/user/user.cls.id.md +0 -77
  101. package/docs/api/user/user.cls.md +0 -49
  102. package/docs/api/user/user.cls.post.md +0 -62
  103. package/docs/api/user/user.info.md +0 -37
  104. package/docs/api/utils/logger.file.md +0 -61
  105. package/docs/api/utils/next.id.md +0 -34
  106. package/docs/api/utils/properties.add.md +0 -127
  107. package/docs/api/utils/properties.get.md +0 -73
  108. package/docs/api/utils/status.monitor.md +0 -36
  109. package/docs/api/widget/widget.del.md +0 -76
  110. package/docs/api/widget/widget.get.md +0 -233
  111. package/docs/api/widget/widget.set.md +0 -88
  112. package/docs/db/admin.md +0 -947
  113. package/docs/db/crm.md +0 -564
  114. package/docs/db/index.md +0 -9
  115. package/docs/db/log.md +0 -204
  116. package/docs/hook/card/afterCard.md +0 -20
  117. package/docs/hook/card/preCard.md +0 -25
  118. package/docs/hook/data/afterData.md +0 -26
  119. package/docs/hook/data/preData.md +0 -26
  120. package/docs/hook/deleteCrud/afterDelete.md +0 -21
  121. package/docs/hook/deleteCrud/preDelete.md +0 -26
  122. package/docs/hook/form/afterForm.md +0 -19
  123. package/docs/hook/form/preForm.md +0 -26
  124. package/docs/hook/getTemplate/afterTemplate.md +0 -24
  125. package/docs/hook/getTemplate/preTemplate.md +0 -29
  126. package/docs/hook/index.md +0 -45
  127. package/docs/hook/insert/afterInsert.md +0 -41
  128. package/docs/hook/insert/preInsert.md +0 -25
  129. package/docs/hook/table/afterTable.md +0 -20
  130. package/docs/hook/table/preTable.md +0 -25
  131. package/docs/hook/update/afterUpdate.md +0 -41
  132. package/docs/hook/update/preUpdate.md +0 -25
  133. package/docs/index.md +0 -42
  134. package/docs/public/fastify-dark.svg +0 -4
  135. package/docs/public/fastify.svg +0 -1
  136. package/docs/public/logo-short-dark.svg +0 -12
  137. package/docs/public/logo-short.svg +0 -11
  138. package/docs/public/logo.svg +0 -19
  139. package/docs/readme/index.md +0 -121
  140. package/docs/templates/card.md +0 -83
  141. package/docs/templates/cls.md +0 -29
  142. package/docs/templates/filters.md +0 -91
  143. package/docs/templates/forms.md +0 -139
  144. package/docs/templates/image.png +0 -0
  145. package/docs/templates/index.md +0 -28
  146. package/docs/templates/select.md +0 -90
  147. package/docs/templates/table.md +0 -162
  148. package/docs/utils/cron/addCron.md +0 -29
  149. package/docs/utils/crud/dataInsert.md +0 -52
  150. package/docs/utils/crud/dataUpdate.md +0 -53
  151. package/docs/utils/crud/getOpt.md +0 -34
  152. package/docs/utils/crud/isFileExists.md +0 -38
  153. package/docs/utils/crud/setOpt.md +0 -38
  154. package/docs/utils/hook/addHook.md +0 -74
  155. package/docs/utils/hook/applyHook.md +0 -64
  156. package/docs/utils/index.md +0 -48
  157. package/docs/utils/notification/addNotification.md +0 -28
  158. package/docs/utils/notification/notification.md +0 -41
  159. package/docs/utils/pg/autoIndex.md +0 -22
  160. package/docs/utils/pg/getMeta.md +0 -59
  161. package/docs/utils/pg/getPG.md +0 -34
  162. package/docs/utils/pg/init.md +0 -30
  163. package/docs/utils/pg/pg.md +0 -70
  164. package/docs/utils/redis/getRedis.md +0 -36
  165. package/docs/utils/redis/rclient.md +0 -74
  166. package/docs/utils/table/getForm.md +0 -69
  167. package/docs/utils/table/getMeta.md +0 -56
  168. package/docs/utils/table/getSelect.md +0 -39
  169. package/docs/utils/table/getSelectMeta.md +0 -47
  170. package/docs/utils/table/getTable.md +0 -78
  171. package/helper.js +0 -30
  172. package/module/core/select/core.user_mentioned.sql +0 -2
  173. package/module/test/cls/itree.composition.json +0 -26
  174. package/module/test/table/test.rest_zone.table.json +0 -266
  175. package/notification/controllers/readNotifications.js +0 -27
  176. package/notification/controllers/testEmail.js +0 -46
  177. package/notification/controllers/userNotifications.js +0 -61
  178. package/notification/controllers/utils/pin-m-ty-media-record-outline+303070.png +0 -0
  179. package/notification/funcs/addNotification.js +0 -21
  180. package/notification/funcs/sendNotification.js +0 -111
  181. package/notification/funcs/utils/sendEmail.js +0 -39
  182. package/notification/index.js +0 -18
  183. package/notification/schema.js +0 -10
  184. package/server.js +0 -26
  185. package/table/controllers/utils/getTemplate_old.js +0 -28
  186. package/test/api/applyHook.test.js +0 -95
  187. package/test/api/crud.test.js +0 -89
  188. package/test/api/crud.xss.test.js +0 -80
  189. package/test/api/notification.test.js +0 -48
  190. package/test/api/suggest.test.js +0 -66
  191. package/test/api/table.test.js +0 -134
  192. package/test/api/user.test.js +0 -85
  193. package/test/api/widget.test.js +0 -117
  194. package/test/config.example +0 -18
  195. package/test/funcs/pg.test.js +0 -34
  196. package/test/funcs/redis.test.js +0 -19
  197. package/test/helper/formatDate.test.js +0 -62
  198. package/test/templates/cls/itree.quality_condition.json +0 -20
  199. package/test/templates/cls/itree.recommend copy.json +0 -26
  200. package/test/templates/cls/itree.recommend.json +0 -26
  201. package/test/templates/cls/itree.type_plant.json +0 -65
  202. package/test/templates/cls/test.json +0 -10
  203. package/test/templates/form/cp_building.form.json +0 -33
  204. package/test/templates/select/account_id.json +0 -4
  205. package/test/templates/select/account_id.sql +0 -1
  206. package/test/templates/select/atu.nsdi.ato_level.json +0 -4
  207. package/test/templates/select/atu.nsdi.ato_level.sql +0 -11
  208. package/test/templates/select/contact_id.sql +0 -1
  209. package/test/templates/select/storage.data.json +0 -3
  210. package/test/templates/select/storage.data.sql +0 -1
  211. package/test/templates/select/test.storage.data.json +0 -4
  212. package/test/templates/select/test.storage.data.sql +0 -1
  213. package/test/templates/select/test.suggest.ato_new.json +0 -4
  214. package/test/templates/select/test.suggest.ato_new.sql +0 -26
  215. package/test/templates/select/test.suggest.data.json +0 -5
  216. package/test/templates/select/test.suggest.data.sql +0 -1
  217. package/test/templates/select/test.suggest.parent.sql +0 -2
  218. package/test/templates/table/gis.dataset.table.json +0 -21
  219. package/test/templates/table/green_space.table.json +0 -383
  220. package/test/templates/table/service.json +0 -18
  221. package/user/controllers/user.cls.id.js +0 -14
  222. package/user/controllers/user.cls.js +0 -71
  223. package/user/controllers/user.cls.post.js +0 -52
  224. package/user/controllers/user.info.js +0 -17
  225. package/user/index.js +0 -17
  226. package/user/schema.js +0 -17
  227. package/util/controllers/properties.get.js +0 -17
  228. package/util/schema.js +0 -19
  229. package/widget/controllers/utils/historyFormat.js +0 -76
  230. package/widget/controllers/utils/obj2db.js +0 -13
  231. package/widget/controllers/widget.del.js +0 -41
  232. package/widget/controllers/widget.get.js +0 -96
  233. package/widget/controllers/widget.set.js +0 -74
  234. package/widget/index.js +0 -40
  235. /package/{cron/controllers/utils → server/plugins/cron}/cronList.js +0 -0
  236. /package/{crud → server/plugins/crud}/funcs/isFileExists.js +0 -0
  237. /package/{hook/funcs → server/plugins/hook}/hookList.js +0 -0
  238. /package/{logger → server/plugins/logger}/getHooks.js +0 -0
  239. /package/{logger → server/plugins/logger}/labels.js +0 -0
  240. /package/{logger → server/plugins/logger}/logger.test.api.js +0 -0
  241. /package/{logger → server/plugins/logger}/serializers.js +0 -0
  242. /package/{pg → server/plugins/pg}/funcs/autoIndex.js +0 -0
  243. /package/{pg → server/plugins/pg}/funcs/getMeta.js +0 -0
  244. /package/{pg → server/plugins/pg}/funcs/pgClients.js +0 -0
  245. /package/{crud/controllers/utils → server/plugins/policy}/xssInjection.js +0 -0
  246. /package/{redis → server/plugins/redis}/client.js +0 -0
  247. /package/{table/controllers/utils → server/plugins/table/funcs}/addTemplateDir.js +0 -0
  248. /package/{table → server/plugins/table}/funcs/getFilterSQL/util/formatValue.js +0 -0
  249. /package/{table → server/plugins/table}/funcs/getFilterSQL/util/getCustomQuery.js +0 -0
  250. /package/{table → server/plugins/table}/funcs/getFilterSQL/util/getFilterQuery.js +0 -0
  251. /package/{table → server/plugins/table}/funcs/getFilterSQL/util/getOptimizedQuery.js +0 -0
  252. /package/{table → server/plugins/table}/funcs/getFilterSQL/util/getTableSql.js +0 -0
  253. /package/{table/controllers/utils → server/plugins/table/funcs}/getSelect.js +0 -0
  254. /package/{table/controllers/utils → server/plugins/table/funcs}/loadTemplate.js +0 -0
  255. /package/{table/controllers/utils → server/plugins/table/funcs}/loadTemplatePath.js +0 -0
  256. /package/{table/controllers/utils → server/plugins/table/funcs}/userTemplateDir.js +0 -0
  257. /package/{util → server/routes/util}/controllers/status.monitor.js +0 -0
@@ -1,49 +0,0 @@
1
- # `GET` /user-cls
2
-
3
- ## Опис
4
-
5
- ```example
6
- /api/user-cls
7
- ```
8
-
9
- Повертає перелік класифікаторів, в т.ч. користувацьких
10
-
11
- Параметр `id` наявний лише у користувацьких класифікаторів
12
-
13
- > [!NOTE]
14
- > Після додавання нового користувацького класифікатору
15
- > за умови заявності у проекті класифікатору із ідентичною назвою
16
- > до списку потрапить лише користувацький класифікатор
17
-
18
- ## Відповідь
19
-
20
- ::: details Приклад відповіді
21
-
22
- ```json
23
- {
24
- "rows": [
25
- {
26
- "id": "3043730850869937550",
27
- "name": "test.cls",
28
- "type": "json",
29
- "children": 1
30
- },
31
- {
32
- "id": "13d6800af35149b5a5efd7c6993bb49d",
33
- "name": "test.sql",
34
- "type": "sql",
35
- "sql": "select uid,login from admin.users where enabled"
36
- }
37
- ]
38
- }
39
- ```
40
-
41
- :::
42
-
43
- ## Статус коди
44
-
45
- | Ключ | Опис |
46
- | ---------------------------------------------------------- | ----------------------------------------- |
47
- | <Badge type="code_2xx" text="200" /> Success | Успішний запит |
48
- | <Badge type="code_4xx" text="404" /> Not Found | Інформації не знайдено |
49
- | <Badge type="code_5xx" text="500" /> Internal Server Error | Помилка на стороні сервера |
@@ -1,62 +0,0 @@
1
- # `POST` /user-cls
2
-
3
- ## Опис
4
-
5
- ```example
6
- /api/user-cls
7
- ```
8
-
9
- Повертає дані по окремому класифікатору, в т.ч. користувацькому
10
-
11
- Параметр `id` наявний лише у користувацьких класифікаторів
12
-
13
- ## Параметри
14
-
15
- ```scheme-api
16
- /api/user-cls
17
- ```
18
-
19
- :::tabs
20
-
21
- == body
22
-
23
- | Назва | Тип | Опис |
24
- | ----- | ------ | ------- |
25
- | name | String | Назва класифікатору |
26
- | children | Array | Масив об'єктів |
27
-
28
- :::
29
-
30
- ## Відповідь
31
-
32
- ::: details Приклад відповіді
33
-
34
- ```json
35
- {
36
- "id": "13d6800af35149b5a5efd7c6993bb49d",
37
- "children": [
38
- {
39
- "id": "get",
40
- "text": "Отримання"
41
- },
42
- {
43
- "id": "edit",
44
- "text": "Редагування"
45
- },
46
- {
47
- "id": "del",
48
- "text": "Видалення"
49
- }
50
- ]
51
- }
52
- ```
53
-
54
- :::
55
-
56
- ## Статус коди
57
-
58
- | Ключ | Опис |
59
- | ---------------------------------------------------------- | ----------------------------------------- |
60
- | <Badge type="code_2xx" text="200" /> Success | Успішний запит |
61
- | <Badge type="code_4xx" text="404" /> Not Found | Інформації не знайдено |
62
- | <Badge type="code_5xx" text="500" /> Internal Server Error | Помилка на стороні сервера |
@@ -1,37 +0,0 @@
1
- # `GET` /user-info
2
-
3
- ## Опис
4
-
5
- ```example
6
- /api/user-info
7
- ```
8
-
9
- Повертає дані користувача
10
-
11
- ## Відповідь
12
-
13
- ::: details Приклад відповіді
14
-
15
- ```json
16
- {
17
- "uid": "2",
18
- "user_name": "Name",
19
- "sur_name": "SurName",
20
- "father_name": "FatherName",
21
- "user_rnokpp": "3561804195",
22
- "user_type": "regular",
23
- "email": "user@gmail.com",
24
- "login": "testUser",
25
- "notifications": 0
26
- }
27
- ```
28
-
29
- :::
30
-
31
- ## Статус коди
32
-
33
- | Ключ | Опис |
34
- | ---------------------------------------------------------- | ----------------------------------------- |
35
- | <Badge type="code_2xx" text="200" /> Success | Успішний запит |
36
- | <Badge type="code_4xx" text="404" /> Not Found | Інформації не знайдено |
37
- | <Badge type="code_5xx" text="500" /> Internal Server Error | Помилка на стороні сервера |
@@ -1,61 +0,0 @@
1
- # `GET` logger-file
2
-
3
- ## Опис
4
-
5
- API для перегляду логів
6
-
7
- ```txt
8
- /logger-file/filter-list/2024-01-17.log?download=1&full=1
9
- ```
10
-
11
- ## Параметри
12
-
13
- :::tabs
14
-
15
- ==params
16
-
17
- | Назва | Тип | Опис |
18
- | ---------- | ------ | ---------- |
19
- | log_name | String | Назва логу |
20
- | YYYY-MM-DD | String | Дата |
21
-
22
- ==query
23
-
24
- | Назва | Тип | Опис |
25
- | -------- | ------- | ---------------- |
26
- | download | Boolean | Завантажити файл |
27
- | full | Boolean | Повна інформація |
28
- | dir | String | Директорія логів |
29
-
30
- :::
31
-
32
- ## Відповідь
33
-
34
- ::: tabs Приклад відповіді
35
-
36
- ===File
37
-
38
- ```md
39
- `auth` (4096 bytes)
40
- `autoindex` (4096 bytes)
41
- `error` (4096 bytes)
42
- `request` (4096 bytes)
43
-
44
- ```
45
-
46
- ===Directory
47
-
48
- ```json
49
- {"timestamp":"2024-01-17T17:34:13.188Z","level":"INFO","seq":1,"table":"pzf.pa.table","nocache":true,"lang":"ua"}
50
- ```
51
-
52
- :::
53
-
54
- ## Статус коди
55
-
56
- | Ключ | Опис |
57
- | ------------------------------------------------ | ----------------------------------------- |
58
- | <Badge type="code_2xx" text="200" /> Success | Успішний запит |
59
- | <Badge type="code_4xx" text="400" /> Bad Request | Неправильно сформований запит від клієнта |
60
- | <Badge type="code_4xx" text="403" /> Forbidden | Відмова запиту |
61
- | <Badge type="code_4xx" text="404" /> Not Found | Інформації не знайдено |
@@ -1,34 +0,0 @@
1
- # `GET` nextId
2
-
3
- ## Опис
4
-
5
- Отримує унікальний ідентифікатор
6
-
7
- Використовується при внесенні даних до БД
8
-
9
- ```example
10
- /api/next-id
11
- ```
12
-
13
- ## Параметри
14
-
15
- ## Відповідь
16
-
17
- ::: details Приклад відповіді
18
-
19
- ```json
20
- {
21
- "id": "e470ab4b168d415d9584346356feebba"
22
- }
23
- ```
24
-
25
- :::
26
-
27
- ## Статус коди
28
-
29
- | Ключ | Опис |
30
- | ---------------------------------------------------------- | ----------------------------------------- |
31
- | <Badge type="code_2xx" text="200" /> Success | Успішний запит |
32
- | <Badge type="code_4xx" text="400" /> Bad Request | Неправильно сформований запит від клієнта |
33
- | <Badge type="code_4xx" text="404" /> Not Found | Інформації не знайдено |
34
- | <Badge type="code_5xx" text="500" /> Internal Server Error | Помилка на стороні сервера |
@@ -1,127 +0,0 @@
1
- # `POST` properties.add
2
-
3
- ## Опис
4
-
5
- Додавання додаткових атрибутів
6
-
7
- Старі атрибути по ID автоматично видаляються з таблиці `crm.properties` за ID об'єкту
8
-
9
- ```example
10
- /api/properties/3388711308936348672
11
- ```
12
-
13
- ## Параметри
14
-
15
- ```scheme-api
16
- /api/properties/:id
17
- ```
18
-
19
- :::tabs
20
-
21
- == params
22
-
23
- | Назва | Тип | Опис |
24
- | ----- | ------ | ------- |
25
- | id | String | ID об'єкту |
26
-
27
- :::
28
-
29
- ## Відповідь
30
-
31
- ::: tabs
32
-
33
- ==Body
34
- ::: details Приклад тіла запиту
35
-
36
- ```json
37
- {
38
- "some_date": "2023-07-29T21:00:00.000Z",
39
- "name": "3point",
40
- "distance": 575894,
41
- "points": [
42
- {
43
- "type": "Point",
44
- "coordinates": [
45
- 32.0772124,
46
- 50.0983885
47
- ]
48
- },
49
- {
50
- "type": "Point",
51
- "coordinates": [
52
- 32.0721889,
53
- 50.0983289
54
- ]
55
- },
56
- {
57
- "type": "Point",
58
- "coordinates": [
59
- 32.0560069,
60
- 50.0980459
61
- ]
62
- }
63
- ]
64
- }
65
- ```
66
-
67
- ==Response
68
- ::: details Приклад відповіді
69
-
70
- ```json
71
- {
72
- "rows": [
73
- {
74
- "id": "ee72e0effc274cdf944e77c980f53c31",
75
- "type": "date",
76
- "value": "2023-07-30T21:00:00.000Z"
77
- },
78
- {
79
- "id": "2aa8b6799e4b4cfe86eb469966f963cb",
80
- "type": "text",
81
- "value": "3point"
82
- },
83
- {
84
- "id": "7e2a51d2d1e34d5f8825517d3e8bd257",
85
- "type": "json",
86
- "value": [
87
- {
88
- "type": "Point",
89
- "coordinates": [
90
- 32.0772124,
91
- 50.0983885
92
- ]
93
- },
94
- {
95
- "type": "Point",
96
- "coordinates": [
97
- 32.0721889,
98
- 50.0983289
99
- ]
100
- },
101
- {
102
- "type": "Point",
103
- "coordinates": [
104
- 32.0560069,
105
- 50.0980459
106
- ]
107
- }
108
- ]
109
- },
110
- {
111
- "id": "a8cba59f4db348ef858517ba024cf03e",
112
- "type": "int",
113
- "value": 575894
114
- }
115
- ]
116
- }
117
- ```
118
-
119
- :::
120
-
121
- ## Статус коди
122
-
123
- | Ключ | Опис |
124
- | ---------------------------------------------------------- | -------------------------- |
125
- | <Badge type="code_2xx" text="200" /> Success | Успішний запит |
126
- | <Badge type="code_4xx" text="404" /> Not Found | Інформації не знайдено |
127
- | <Badge type="code_5xx" text="500" /> Internal Server Error | Помилка на стороні сервера |
@@ -1,73 +0,0 @@
1
- # `GET` properties.get
2
-
3
- ## Опис
4
-
5
- Отримання додаткових атрибутів з таблиці `crm.properties` за ID об'єкту
6
-
7
- ```example
8
- /api/properties/3388711308936348672
9
- ```
10
-
11
- ## Параметри
12
-
13
- ```scheme-api
14
- /api/properties/:id
15
- ```
16
-
17
- :::tabs
18
-
19
- == params
20
-
21
- | Назва | Тип | Опис |
22
- | ----- | ------ | ------- |
23
- | id | String | ID об'єкту |
24
-
25
- :::
26
-
27
- ## Відповідь
28
-
29
- ::: tabs
30
-
31
- ==200
32
- ::: details Приклад відповіді
33
-
34
- ```json
35
- {
36
- "some_date": "2023-07-29T21:00:00.000Z",
37
- "name": "3point",
38
- "distance": 575894,
39
- "points": [
40
- {
41
- "type": "Point",
42
- "coordinates": [
43
- 32.0772124,
44
- 50.0983885
45
- ]
46
- },
47
- {
48
- "type": "Point",
49
- "coordinates": [
50
- 32.0721889,
51
- 50.0983289
52
- ]
53
- },
54
- {
55
- "type": "Point",
56
- "coordinates": [
57
- 32.0560069,
58
- 50.0980459
59
- ]
60
- }
61
- ]
62
- }
63
- ```
64
-
65
- :::
66
-
67
- ## Статус коди
68
-
69
- | Ключ | Опис |
70
- | ---------------------------------------------------------- | -------------------------- |
71
- | <Badge type="code_2xx" text="200" /> Success | Успішний запит |
72
- | <Badge type="code_4xx" text="404" /> Not Found | Інформації не знайдено |
73
- | <Badge type="code_5xx" text="500" /> Internal Server Error | Помилка на стороні сервера |
@@ -1,36 +0,0 @@
1
- # `GET` statusMonitor
2
-
3
- ## Опис
4
-
5
- Отримує поточний стан навантаження серверу
6
-
7
- ```example
8
- /api/status-monitor
9
- ```
10
-
11
- ## Параметри
12
-
13
- ## Відповідь
14
-
15
- ::: details Приклад відповіді
16
-
17
- ```json
18
- {
19
- "rss": "114.29 MB",
20
- "heapTotal": "37.25 MB",
21
- "heapUsed": "35.84 MB",
22
- "external": "5.99 MB",
23
- "arrayBuffers": "4.13 MB"
24
- }
25
- ```
26
-
27
- :::
28
-
29
- ## Статус коди
30
-
31
- | Ключ | Опис |
32
- | ---------------------------------------------------------- | ----------------------------------------- |
33
- | <Badge type="code_2xx" text="200" /> Success | Успішний запит |
34
- | <Badge type="code_4xx" text="400" /> Bad Request | Неправильно сформований запит від клієнта |
35
- | <Badge type="code_4xx" text="404" /> Not Found | Інформації не знайдено |
36
- | <Badge type="code_5xx" text="500" /> Internal Server Error | Помилка на стороні сервера |
@@ -1,76 +0,0 @@
1
- # `DELETE` WIDGET
2
-
3
- ## Опис
4
-
5
- Видалення даних віджету по id
6
-
7
- Видалення лише власних записів з БД
8
-
9
- Необхідна авторизація користувача
10
-
11
- ```example
12
- /api/widget/comment/1
13
- ```
14
-
15
- ## Параметри
16
-
17
- ```scheme-api
18
- /api/widget/:type/:id
19
- ```
20
-
21
- ::: tabs
22
-
23
- ===params
24
-
25
- | Назва | Тип | Опис |
26
- | ----- | ------ | ------------- |
27
- | type | String | Віджет |
28
- | id | String | ID об'єкту |
29
-
30
- :::
31
-
32
- ## Віджети
33
-
34
- - comment
35
- - history
36
- - checklist
37
- - file
38
- - gallery
39
-
40
- ## Відповідь
41
-
42
- ::: tabs
43
-
44
- ==200
45
- ::: details Приклад відповіді
46
-
47
- ```json
48
- {
49
- "data": {
50
- "rows": [
51
-
52
- ],
53
- "rowCount": "1"
54
- },
55
- "user": {
56
- "uid": "1",
57
- "name": "test user"
58
- }
59
- }
60
- ```
61
-
62
- ==403
63
-
64
- ```text
65
- access restricted
66
- ```
67
-
68
- :::
69
-
70
- ## Статус коди
71
-
72
- | Ключ | Опис |
73
- | ---------------------------------------------------------- | ----------------------------------------- |
74
- | <Badge type="code_2xx" text="200" /> Success | Успішний запит |
75
- | <Badge type="code_4xx" text="404" /> Not Found | Інформації не знайдено |
76
- | <Badge type="code_5xx" text="500" /> Internal Server Error | Помилка на стороні сервера |