@abyss-project/tools 1.0.0

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 (442) hide show
  1. package/.eslintrc.js +33 -0
  2. package/.prettierrc +5 -0
  3. package/dist/api/abyss.admin.api.d.ts +7 -0
  4. package/dist/api/abyss.admin.api.js +28 -0
  5. package/dist/api/atlas-document.api.d.ts +6 -0
  6. package/dist/api/atlas-document.api.js +26 -0
  7. package/dist/api/atlas-group.api.d.ts +6 -0
  8. package/dist/api/atlas-group.api.js +24 -0
  9. package/dist/api/atlas-page-content.api.d.ts +0 -0
  10. package/dist/api/atlas-page-content.api.js +1 -0
  11. package/dist/api/atlas-page.api.d.ts +10 -0
  12. package/dist/api/atlas-page.api.js +46 -0
  13. package/dist/api/atlas.api.d.ts +8 -0
  14. package/dist/api/atlas.api.js +35 -0
  15. package/dist/api/atlas.public.api.d.ts +4 -0
  16. package/dist/api/atlas.public.api.js +18 -0
  17. package/dist/api/board-card-checklist.api.d.ts +8 -0
  18. package/dist/api/board-card-checklist.api.js +32 -0
  19. package/dist/api/board-card-comment.api.d.ts +5 -0
  20. package/dist/api/board-card-comment.api.js +20 -0
  21. package/dist/api/board-card-document.api.d.ts +5 -0
  22. package/dist/api/board-card-document.api.js +20 -0
  23. package/dist/api/board-card.api.d.ts +11 -0
  24. package/dist/api/board-card.api.js +48 -0
  25. package/dist/api/board-column.api.d.ts +5 -0
  26. package/dist/api/board-column.api.js +20 -0
  27. package/dist/api/board-label.api.d.ts +8 -0
  28. package/dist/api/board-label.api.js +33 -0
  29. package/dist/api/board.api.d.ts +12 -0
  30. package/dist/api/board.api.js +41 -0
  31. package/dist/api/draw.api.d.ts +8 -0
  32. package/dist/api/draw.api.js +36 -0
  33. package/dist/api/draw.public.api.d.ts +5 -0
  34. package/dist/api/draw.public.api.js +20 -0
  35. package/dist/api/index.d.ts +26 -0
  36. package/dist/api/index.js +42 -0
  37. package/dist/api/memo.api.d.ts +8 -0
  38. package/dist/api/memo.api.js +36 -0
  39. package/dist/api/metrics.api.d.ts +2 -0
  40. package/dist/api/metrics.api.js +8 -0
  41. package/dist/api/retrospective-card.api.d.ts +6 -0
  42. package/dist/api/retrospective-card.api.js +26 -0
  43. package/dist/api/retrospective-member.api.d.ts +5 -0
  44. package/dist/api/retrospective-member.api.js +20 -0
  45. package/dist/api/retrospective-section.api.d.ts +6 -0
  46. package/dist/api/retrospective-section.api.js +26 -0
  47. package/dist/api/retrospective.api.d.ts +8 -0
  48. package/dist/api/retrospective.api.js +34 -0
  49. package/dist/api/retrospective.public.api.d.ts +11 -0
  50. package/dist/api/retrospective.public.api.js +44 -0
  51. package/dist/api/short-link.admin.api.d.ts +7 -0
  52. package/dist/api/short-link.admin.api.js +22 -0
  53. package/dist/api/short-link.api.d.ts +12 -0
  54. package/dist/api/short-link.api.js +48 -0
  55. package/dist/api/short-link.public.api.d.ts +8 -0
  56. package/dist/api/short-link.public.api.js +32 -0
  57. package/dist/api/user-tag.api.d.ts +9 -0
  58. package/dist/api/user-tag.api.js +36 -0
  59. package/dist/constants/atlas.constants.d.ts +2 -0
  60. package/dist/constants/atlas.constants.js +5 -0
  61. package/dist/constants/board.constants.d.ts +5 -0
  62. package/dist/constants/board.constants.js +8 -0
  63. package/dist/constants/index.d.ts +5 -0
  64. package/dist/constants/index.js +21 -0
  65. package/dist/constants/memo.constants.d.ts +3 -0
  66. package/dist/constants/memo.constants.js +6 -0
  67. package/dist/constants/short-link.constants.d.ts +8 -0
  68. package/dist/constants/short-link.constants.js +11 -0
  69. package/dist/constants/user-tag.constants.d.ts +3 -0
  70. package/dist/constants/user-tag.constants.js +6 -0
  71. package/dist/index.d.ts +262 -0
  72. package/dist/index.js +341 -0
  73. package/dist/server-sent-events/index.d.ts +10 -0
  74. package/dist/server-sent-events/index.js +28 -0
  75. package/dist/server-sent-events/protocols/atlas/atlas.sse-protocol.d.ts +74 -0
  76. package/dist/server-sent-events/protocols/atlas/atlas.sse-protocol.js +21 -0
  77. package/dist/server-sent-events/protocols/atlas/index.d.ts +1 -0
  78. package/dist/server-sent-events/protocols/atlas/index.js +17 -0
  79. package/dist/server-sent-events/protocols/board/board.sse-protocol.d.ts +91 -0
  80. package/dist/server-sent-events/protocols/board/board.sse-protocol.js +23 -0
  81. package/dist/server-sent-events/protocols/board/index.d.ts +1 -0
  82. package/dist/server-sent-events/protocols/board/index.js +17 -0
  83. package/dist/server-sent-events/protocols/board-card/board-card.sse-protocol.d.ts +18 -0
  84. package/dist/server-sent-events/protocols/board-card/board-card.sse-protocol.js +11 -0
  85. package/dist/server-sent-events/protocols/board-card/index.d.ts +1 -0
  86. package/dist/server-sent-events/protocols/board-card/index.js +17 -0
  87. package/dist/server-sent-events/protocols/index.d.ts +20 -0
  88. package/dist/server-sent-events/protocols/index.js +29 -0
  89. package/dist/server-sent-events/protocols/retrospective/index.d.ts +1 -0
  90. package/dist/server-sent-events/protocols/retrospective/index.js +17 -0
  91. package/dist/server-sent-events/protocols/retrospective/retrospective.sse-protocol.d.ts +69 -0
  92. package/dist/server-sent-events/protocols/retrospective/retrospective.sse-protocol.js +21 -0
  93. package/dist/server-sent-events/server-sent-events.manager.d.ts +23 -0
  94. package/dist/server-sent-events/server-sent-events.manager.js +59 -0
  95. package/dist/types/draw.type.d.ts +132 -0
  96. package/dist/types/draw.type.js +15 -0
  97. package/dist/types/enum/api-error.enum.d.ts +21 -0
  98. package/dist/types/enum/api-error.enum.js +26 -0
  99. package/dist/types/enum/board-activity.enum.d.ts +170 -0
  100. package/dist/types/enum/board-activity.enum.js +37 -0
  101. package/dist/types/enum/board-column-type.enum.d.ts +6 -0
  102. package/dist/types/enum/board-column-type.enum.js +10 -0
  103. package/dist/types/enum/index.d.ts +3 -0
  104. package/dist/types/enum/index.js +19 -0
  105. package/dist/types/index.d.ts +4 -0
  106. package/dist/types/index.js +19 -0
  107. package/dist/types/interface/api/index.d.ts +5 -0
  108. package/dist/types/interface/api/index.js +21 -0
  109. package/dist/types/interface/api/requests/abyss.admin.request.d.ts +14 -0
  110. package/dist/types/interface/api/requests/abyss.admin.request.js +2 -0
  111. package/dist/types/interface/api/requests/atlas-document.request.d.ts +26 -0
  112. package/dist/types/interface/api/requests/atlas-document.request.js +2 -0
  113. package/dist/types/interface/api/requests/atlas-group.request.d.ts +40 -0
  114. package/dist/types/interface/api/requests/atlas-group.request.js +2 -0
  115. package/dist/types/interface/api/requests/atlas-page.request.d.ts +72 -0
  116. package/dist/types/interface/api/requests/atlas-page.request.js +2 -0
  117. package/dist/types/interface/api/requests/atlas.public.request.d.ts +18 -0
  118. package/dist/types/interface/api/requests/atlas.public.request.js +2 -0
  119. package/dist/types/interface/api/requests/atlas.request.d.ts +33 -0
  120. package/dist/types/interface/api/requests/atlas.request.js +2 -0
  121. package/dist/types/interface/api/requests/board-card-checklist.request.d.ts +55 -0
  122. package/dist/types/interface/api/requests/board-card-checklist.request.js +2 -0
  123. package/dist/types/interface/api/requests/board-card-comment.request.d.ts +25 -0
  124. package/dist/types/interface/api/requests/board-card-comment.request.js +2 -0
  125. package/dist/types/interface/api/requests/board-card-document.request.d.ts +25 -0
  126. package/dist/types/interface/api/requests/board-card-document.request.js +2 -0
  127. package/dist/types/interface/api/requests/board-card.request.d.ts +77 -0
  128. package/dist/types/interface/api/requests/board-card.request.js +2 -0
  129. package/dist/types/interface/api/requests/board-column.request.d.ts +26 -0
  130. package/dist/types/interface/api/requests/board-column.request.js +2 -0
  131. package/dist/types/interface/api/requests/board-label.request.d.ts +36 -0
  132. package/dist/types/interface/api/requests/board-label.request.js +2 -0
  133. package/dist/types/interface/api/requests/board.request.d.ts +25 -0
  134. package/dist/types/interface/api/requests/board.request.js +2 -0
  135. package/dist/types/interface/api/requests/draw.public.request.d.ts +17 -0
  136. package/dist/types/interface/api/requests/draw.public.request.js +2 -0
  137. package/dist/types/interface/api/requests/draw.request.d.ts +31 -0
  138. package/dist/types/interface/api/requests/draw.request.js +2 -0
  139. package/dist/types/interface/api/requests/index.d.ts +26 -0
  140. package/dist/types/interface/api/requests/index.js +42 -0
  141. package/dist/types/interface/api/requests/memo.request.d.ts +29 -0
  142. package/dist/types/interface/api/requests/memo.request.js +2 -0
  143. package/dist/types/interface/api/requests/metrics.request.d.ts +3 -0
  144. package/dist/types/interface/api/requests/metrics.request.js +2 -0
  145. package/dist/types/interface/api/requests/retrospective-card.request.d.ts +32 -0
  146. package/dist/types/interface/api/requests/retrospective-card.request.js +2 -0
  147. package/dist/types/interface/api/requests/retrospective-member.request.d.ts +17 -0
  148. package/dist/types/interface/api/requests/retrospective-member.request.js +2 -0
  149. package/dist/types/interface/api/requests/retrospective-section.request.d.ts +36 -0
  150. package/dist/types/interface/api/requests/retrospective-section.request.js +2 -0
  151. package/dist/types/interface/api/requests/retrospective.public.request.d.ts +71 -0
  152. package/dist/types/interface/api/requests/retrospective.public.request.js +2 -0
  153. package/dist/types/interface/api/requests/retrospective.request.d.ts +39 -0
  154. package/dist/types/interface/api/requests/retrospective.request.js +2 -0
  155. package/dist/types/interface/api/requests/short-link.admin.request.d.ts +29 -0
  156. package/dist/types/interface/api/requests/short-link.admin.request.js +2 -0
  157. package/dist/types/interface/api/requests/short-link.public.request.d.ts +33 -0
  158. package/dist/types/interface/api/requests/short-link.public.request.js +2 -0
  159. package/dist/types/interface/api/requests/short-link.request.d.ts +47 -0
  160. package/dist/types/interface/api/requests/short-link.request.js +2 -0
  161. package/dist/types/interface/api/requests/user-tag.request.d.ts +37 -0
  162. package/dist/types/interface/api/requests/user-tag.request.js +2 -0
  163. package/dist/types/interface/api/responses/abyss.admin.response.d.ts +14 -0
  164. package/dist/types/interface/api/responses/abyss.admin.response.js +2 -0
  165. package/dist/types/interface/api/responses/atlas-document.response.d.ts +19 -0
  166. package/dist/types/interface/api/responses/atlas-document.response.js +2 -0
  167. package/dist/types/interface/api/responses/atlas-group.response.d.ts +19 -0
  168. package/dist/types/interface/api/responses/atlas-group.response.js +2 -0
  169. package/dist/types/interface/api/responses/atlas-page.response.d.ts +44 -0
  170. package/dist/types/interface/api/responses/atlas-page.response.js +2 -0
  171. package/dist/types/interface/api/responses/atlas.public.response.d.ts +18 -0
  172. package/dist/types/interface/api/responses/atlas.public.response.js +2 -0
  173. package/dist/types/interface/api/responses/atlas.response.d.ts +19 -0
  174. package/dist/types/interface/api/responses/atlas.response.js +2 -0
  175. package/dist/types/interface/api/responses/board-card-checklist.response.d.ts +27 -0
  176. package/dist/types/interface/api/responses/board-card-checklist.response.js +2 -0
  177. package/dist/types/interface/api/responses/board-card-comment.response.d.ts +17 -0
  178. package/dist/types/interface/api/responses/board-card-comment.response.js +2 -0
  179. package/dist/types/interface/api/responses/board-card-document.response.d.ts +20 -0
  180. package/dist/types/interface/api/responses/board-card-document.response.js +2 -0
  181. package/dist/types/interface/api/responses/board-card.response.d.ts +47 -0
  182. package/dist/types/interface/api/responses/board-card.response.js +2 -0
  183. package/dist/types/interface/api/responses/board-column.response.d.ts +17 -0
  184. package/dist/types/interface/api/responses/board-column.response.js +2 -0
  185. package/dist/types/interface/api/responses/board-label.response.d.ts +30 -0
  186. package/dist/types/interface/api/responses/board-label.response.js +2 -0
  187. package/dist/types/interface/api/responses/board.response.d.ts +59 -0
  188. package/dist/types/interface/api/responses/board.response.js +2 -0
  189. package/dist/types/interface/api/responses/draw.public.response.d.ts +17 -0
  190. package/dist/types/interface/api/responses/draw.public.response.js +2 -0
  191. package/dist/types/interface/api/responses/draw.response.d.ts +19 -0
  192. package/dist/types/interface/api/responses/draw.response.js +2 -0
  193. package/dist/types/interface/api/responses/index.d.ts +26 -0
  194. package/dist/types/interface/api/responses/index.js +42 -0
  195. package/dist/types/interface/api/responses/memo.response.d.ts +19 -0
  196. package/dist/types/interface/api/responses/memo.response.js +2 -0
  197. package/dist/types/interface/api/responses/metrics.response.d.ts +13 -0
  198. package/dist/types/interface/api/responses/metrics.response.js +2 -0
  199. package/dist/types/interface/api/responses/retrospective-card.response.d.ts +19 -0
  200. package/dist/types/interface/api/responses/retrospective-card.response.js +2 -0
  201. package/dist/types/interface/api/responses/retrospective-member.response.d.ts +18 -0
  202. package/dist/types/interface/api/responses/retrospective-member.response.js +2 -0
  203. package/dist/types/interface/api/responses/retrospective-section.response.d.ts +19 -0
  204. package/dist/types/interface/api/responses/retrospective-section.response.js +2 -0
  205. package/dist/types/interface/api/responses/retrospective.public.response.d.ts +36 -0
  206. package/dist/types/interface/api/responses/retrospective.public.response.js +2 -0
  207. package/dist/types/interface/api/responses/retrospective.response.d.ts +19 -0
  208. package/dist/types/interface/api/responses/retrospective.response.js +2 -0
  209. package/dist/types/interface/api/responses/short-link.admin.response.d.ts +17 -0
  210. package/dist/types/interface/api/responses/short-link.admin.response.js +2 -0
  211. package/dist/types/interface/api/responses/short-link.public.response.d.ts +21 -0
  212. package/dist/types/interface/api/responses/short-link.public.response.js +2 -0
  213. package/dist/types/interface/api/responses/short-link.response.d.ts +25 -0
  214. package/dist/types/interface/api/responses/short-link.response.js +2 -0
  215. package/dist/types/interface/api/responses/user-tag.response.d.ts +32 -0
  216. package/dist/types/interface/api/responses/user-tag.response.js +2 -0
  217. package/dist/types/interface/api/type-message/api-error.d.ts +6 -0
  218. package/dist/types/interface/api/type-message/api-error.js +2 -0
  219. package/dist/types/interface/api/type-message/base-paginate.d.ts +10 -0
  220. package/dist/types/interface/api/type-message/base-paginate.js +2 -0
  221. package/dist/types/interface/api/type-message/response.d.ts +5 -0
  222. package/dist/types/interface/api/type-message/response.js +2 -0
  223. package/dist/types/interface/index.d.ts +2 -0
  224. package/dist/types/interface/index.js +18 -0
  225. package/dist/types/interface/models/atlas-document.dto.d.ts +19 -0
  226. package/dist/types/interface/models/atlas-document.dto.js +2 -0
  227. package/dist/types/interface/models/atlas-group.dto.d.ts +18 -0
  228. package/dist/types/interface/models/atlas-group.dto.js +2 -0
  229. package/dist/types/interface/models/atlas-page-content.dto.d.ts +14 -0
  230. package/dist/types/interface/models/atlas-page-content.dto.js +2 -0
  231. package/dist/types/interface/models/atlas-page.dto.d.ts +23 -0
  232. package/dist/types/interface/models/atlas-page.dto.js +2 -0
  233. package/dist/types/interface/models/atlas.dto.d.ts +30 -0
  234. package/dist/types/interface/models/atlas.dto.js +2 -0
  235. package/dist/types/interface/models/board-activity.dto.d.ts +17 -0
  236. package/dist/types/interface/models/board-activity.dto.js +2 -0
  237. package/dist/types/interface/models/board-card-checklist-row.dto.d.ts +11 -0
  238. package/dist/types/interface/models/board-card-checklist-row.dto.js +2 -0
  239. package/dist/types/interface/models/board-card-checklist.dto.d.ts +13 -0
  240. package/dist/types/interface/models/board-card-checklist.dto.js +2 -0
  241. package/dist/types/interface/models/board-card-comment.dto.d.ts +12 -0
  242. package/dist/types/interface/models/board-card-comment.dto.js +2 -0
  243. package/dist/types/interface/models/board-card-document.dto.d.ts +19 -0
  244. package/dist/types/interface/models/board-card-document.dto.js +2 -0
  245. package/dist/types/interface/models/board-card-label.dto.d.ts +11 -0
  246. package/dist/types/interface/models/board-card-label.dto.js +2 -0
  247. package/dist/types/interface/models/board-card-member.dto.d.ts +11 -0
  248. package/dist/types/interface/models/board-card-member.dto.js +2 -0
  249. package/dist/types/interface/models/board-card.dto.d.ts +34 -0
  250. package/dist/types/interface/models/board-card.dto.js +2 -0
  251. package/dist/types/interface/models/board-column.dto.d.ts +14 -0
  252. package/dist/types/interface/models/board-column.dto.js +2 -0
  253. package/dist/types/interface/models/board-label.dto.d.ts +10 -0
  254. package/dist/types/interface/models/board-label.dto.js +2 -0
  255. package/dist/types/interface/models/board.dto.d.ts +29 -0
  256. package/dist/types/interface/models/board.dto.js +2 -0
  257. package/dist/types/interface/models/draw.dto.d.ts +25 -0
  258. package/dist/types/interface/models/draw.dto.js +2 -0
  259. package/dist/types/interface/models/index.d.ts +28 -0
  260. package/dist/types/interface/models/index.js +44 -0
  261. package/dist/types/interface/models/memo.dto.d.ts +19 -0
  262. package/dist/types/interface/models/memo.dto.js +2 -0
  263. package/dist/types/interface/models/organization.dto.d.ts +9 -0
  264. package/dist/types/interface/models/organization.dto.js +2 -0
  265. package/dist/types/interface/models/project.dto.d.ts +22 -0
  266. package/dist/types/interface/models/project.dto.js +2 -0
  267. package/dist/types/interface/models/retrospective-card.dto.d.ts +14 -0
  268. package/dist/types/interface/models/retrospective-card.dto.js +2 -0
  269. package/dist/types/interface/models/retrospective-member.dto.d.ts +12 -0
  270. package/dist/types/interface/models/retrospective-member.dto.js +2 -0
  271. package/dist/types/interface/models/retrospective-section.dto.d.ts +13 -0
  272. package/dist/types/interface/models/retrospective-section.dto.js +2 -0
  273. package/dist/types/interface/models/retrospective.dto.d.ts +29 -0
  274. package/dist/types/interface/models/retrospective.dto.js +2 -0
  275. package/dist/types/interface/models/short-link-click.dto.d.ts +30 -0
  276. package/dist/types/interface/models/short-link-click.dto.js +2 -0
  277. package/dist/types/interface/models/short-link.dto.d.ts +71 -0
  278. package/dist/types/interface/models/short-link.dto.js +2 -0
  279. package/dist/types/interface/models/user-tag.dto.d.ts +22 -0
  280. package/dist/types/interface/models/user-tag.dto.js +2 -0
  281. package/dist/types/interface/models/user.dto.d.ts +23 -0
  282. package/dist/types/interface/models/user.dto.js +2 -0
  283. package/dist/utils/board.utils.d.ts +5 -0
  284. package/dist/utils/board.utils.js +39 -0
  285. package/dist/utils/enum.utils.d.ts +1 -0
  286. package/dist/utils/enum.utils.js +9 -0
  287. package/dist/utils/error.utils.d.ts +15 -0
  288. package/dist/utils/error.utils.js +24 -0
  289. package/dist/utils/icons.utils.d.ts +75 -0
  290. package/dist/utils/icons.utils.js +86 -0
  291. package/dist/utils/index.d.ts +5 -0
  292. package/dist/utils/index.js +21 -0
  293. package/dist/utils/shape.utils.d.ts +26 -0
  294. package/dist/utils/shape.utils.js +181 -0
  295. package/package.json +53 -0
  296. package/src/api/abyss.admin.api.ts +60 -0
  297. package/src/api/atlas-document.api.ts +68 -0
  298. package/src/api/atlas-group.api.ts +69 -0
  299. package/src/api/atlas-page-content.api.ts +0 -0
  300. package/src/api/atlas-page.api.ts +124 -0
  301. package/src/api/atlas.api.ts +65 -0
  302. package/src/api/atlas.public.api.ts +42 -0
  303. package/src/api/board-card-checklist.api.ts +99 -0
  304. package/src/api/board-card-comment.api.ts +57 -0
  305. package/src/api/board-card-document.api.ts +57 -0
  306. package/src/api/board-card.api.ts +137 -0
  307. package/src/api/board-column.api.ts +54 -0
  308. package/src/api/board-label.api.ts +87 -0
  309. package/src/api/board.api.ts +67 -0
  310. package/src/api/draw.api.ts +58 -0
  311. package/src/api/draw.public.api.ts +48 -0
  312. package/src/api/index.ts +43 -0
  313. package/src/api/memo.api.ts +59 -0
  314. package/src/api/metrics.api.ts +15 -0
  315. package/src/api/retrospective-card.api.ts +74 -0
  316. package/src/api/retrospective-member.api.ts +54 -0
  317. package/src/api/retrospective-section.api.ts +74 -0
  318. package/src/api/retrospective.api.ts +86 -0
  319. package/src/api/retrospective.public.api.ts +147 -0
  320. package/src/api/short-link.admin.api.ts +39 -0
  321. package/src/api/short-link.api.ts +90 -0
  322. package/src/api/short-link.public.api.ts +60 -0
  323. package/src/api/user-tag.api.ts +70 -0
  324. package/src/constants/atlas.constants.ts +2 -0
  325. package/src/constants/board.constants.ts +7 -0
  326. package/src/constants/index.ts +5 -0
  327. package/src/constants/memo.constants.ts +3 -0
  328. package/src/constants/short-link.constants.ts +11 -0
  329. package/src/constants/user-tag.constants.ts +3 -0
  330. package/src/index.ts +541 -0
  331. package/src/server-sent-events/index.ts +13 -0
  332. package/src/server-sent-events/protocols/atlas/atlas.sse-protocol.ts +90 -0
  333. package/src/server-sent-events/protocols/atlas/index.ts +1 -0
  334. package/src/server-sent-events/protocols/board/board.sse-protocol.ts +115 -0
  335. package/src/server-sent-events/protocols/board/index.ts +1 -0
  336. package/src/server-sent-events/protocols/board-card/board-card.sse-protocol.ts +26 -0
  337. package/src/server-sent-events/protocols/board-card/index.ts +1 -0
  338. package/src/server-sent-events/protocols/index.ts +26 -0
  339. package/src/server-sent-events/protocols/retrospective/index.ts +1 -0
  340. package/src/server-sent-events/protocols/retrospective/retrospective.sse-protocol.ts +92 -0
  341. package/src/server-sent-events/server-sent-events.manager.ts +73 -0
  342. package/src/types/draw.type.ts +173 -0
  343. package/src/types/enum/api-error.enum.ts +23 -0
  344. package/src/types/enum/board-activity.enum.ts +189 -0
  345. package/src/types/enum/board-column-type.enum.ts +6 -0
  346. package/src/types/enum/index.ts +3 -0
  347. package/src/types/index.ts +5 -0
  348. package/src/types/interface/api/index.ts +5 -0
  349. package/src/types/interface/api/requests/abyss.admin.request.ts +16 -0
  350. package/src/types/interface/api/requests/atlas-document.request.ts +32 -0
  351. package/src/types/interface/api/requests/atlas-group.request.ts +45 -0
  352. package/src/types/interface/api/requests/atlas-page.request.ts +84 -0
  353. package/src/types/interface/api/requests/atlas.public.request.ts +21 -0
  354. package/src/types/interface/api/requests/atlas.request.ts +40 -0
  355. package/src/types/interface/api/requests/board-card-checklist.request.ts +61 -0
  356. package/src/types/interface/api/requests/board-card-comment.request.ts +28 -0
  357. package/src/types/interface/api/requests/board-card-document.request.ts +29 -0
  358. package/src/types/interface/api/requests/board-card.request.ts +86 -0
  359. package/src/types/interface/api/requests/board-column.request.ts +30 -0
  360. package/src/types/interface/api/requests/board-label.request.ts +42 -0
  361. package/src/types/interface/api/requests/board.request.ts +30 -0
  362. package/src/types/interface/api/requests/draw.public.request.ts +20 -0
  363. package/src/types/interface/api/requests/draw.request.ts +37 -0
  364. package/src/types/interface/api/requests/index.ts +26 -0
  365. package/src/types/interface/api/requests/memo.request.ts +35 -0
  366. package/src/types/interface/api/requests/metrics.request.ts +3 -0
  367. package/src/types/interface/api/requests/retrospective-card.request.ts +38 -0
  368. package/src/types/interface/api/requests/retrospective-member.request.ts +20 -0
  369. package/src/types/interface/api/requests/retrospective-section.request.ts +43 -0
  370. package/src/types/interface/api/requests/retrospective.public.request.ts +84 -0
  371. package/src/types/interface/api/requests/retrospective.request.ts +46 -0
  372. package/src/types/interface/api/requests/short-link.admin.request.ts +35 -0
  373. package/src/types/interface/api/requests/short-link.public.request.ts +40 -0
  374. package/src/types/interface/api/requests/short-link.request.ts +57 -0
  375. package/src/types/interface/api/requests/user-tag.request.ts +45 -0
  376. package/src/types/interface/api/responses/abyss.admin.response.ts +17 -0
  377. package/src/types/interface/api/responses/atlas-document.response.ts +24 -0
  378. package/src/types/interface/api/responses/atlas-group.response.ts +23 -0
  379. package/src/types/interface/api/responses/atlas-page.response.ts +53 -0
  380. package/src/types/interface/api/responses/atlas.public.response.ts +21 -0
  381. package/src/types/interface/api/responses/atlas.response.ts +23 -0
  382. package/src/types/interface/api/responses/board-card-checklist.response.ts +31 -0
  383. package/src/types/interface/api/responses/board-card-comment.response.ts +20 -0
  384. package/src/types/interface/api/responses/board-card-document.response.ts +21 -0
  385. package/src/types/interface/api/responses/board-card.response.ts +55 -0
  386. package/src/types/interface/api/responses/board-column.response.ts +20 -0
  387. package/src/types/interface/api/responses/board-label.response.ts +31 -0
  388. package/src/types/interface/api/responses/board.response.ts +68 -0
  389. package/src/types/interface/api/responses/draw.public.response.ts +20 -0
  390. package/src/types/interface/api/responses/draw.response.ts +23 -0
  391. package/src/types/interface/api/responses/index.ts +26 -0
  392. package/src/types/interface/api/responses/memo.response.ts +23 -0
  393. package/src/types/interface/api/responses/metrics.response.ts +16 -0
  394. package/src/types/interface/api/responses/retrospective-card.response.ts +23 -0
  395. package/src/types/interface/api/responses/retrospective-member.response.ts +22 -0
  396. package/src/types/interface/api/responses/retrospective-section.response.ts +23 -0
  397. package/src/types/interface/api/responses/retrospective.public.response.ts +57 -0
  398. package/src/types/interface/api/responses/retrospective.response.ts +23 -0
  399. package/src/types/interface/api/responses/short-link.admin.response.ts +21 -0
  400. package/src/types/interface/api/responses/short-link.public.response.ts +26 -0
  401. package/src/types/interface/api/responses/short-link.response.ts +31 -0
  402. package/src/types/interface/api/responses/user-tag.response.ts +38 -0
  403. package/src/types/interface/api/type-message/api-error.ts +7 -0
  404. package/src/types/interface/api/type-message/base-paginate.ts +11 -0
  405. package/src/types/interface/api/type-message/response.ts +6 -0
  406. package/src/types/interface/index.ts +2 -0
  407. package/src/types/interface/models/atlas-document.dto.ts +22 -0
  408. package/src/types/interface/models/atlas-group.dto.ts +21 -0
  409. package/src/types/interface/models/atlas-page-content.dto.ts +17 -0
  410. package/src/types/interface/models/atlas-page.dto.ts +26 -0
  411. package/src/types/interface/models/atlas.dto.ts +34 -0
  412. package/src/types/interface/models/board-activity.dto.ts +20 -0
  413. package/src/types/interface/models/board-card-checklist-row.dto.ts +14 -0
  414. package/src/types/interface/models/board-card-checklist.dto.ts +16 -0
  415. package/src/types/interface/models/board-card-comment.dto.ts +15 -0
  416. package/src/types/interface/models/board-card-document.dto.ts +22 -0
  417. package/src/types/interface/models/board-card-label.dto.ts +14 -0
  418. package/src/types/interface/models/board-card-member.dto.ts +14 -0
  419. package/src/types/interface/models/board-card.dto.ts +37 -0
  420. package/src/types/interface/models/board-column.dto.ts +17 -0
  421. package/src/types/interface/models/board-label.dto.ts +13 -0
  422. package/src/types/interface/models/board.dto.ts +32 -0
  423. package/src/types/interface/models/draw.dto.ts +28 -0
  424. package/src/types/interface/models/index.ts +28 -0
  425. package/src/types/interface/models/memo.dto.ts +22 -0
  426. package/src/types/interface/models/organization.dto.ts +12 -0
  427. package/src/types/interface/models/project.dto.ts +25 -0
  428. package/src/types/interface/models/retrospective-card.dto.ts +17 -0
  429. package/src/types/interface/models/retrospective-member.dto.ts +15 -0
  430. package/src/types/interface/models/retrospective-section.dto.ts +16 -0
  431. package/src/types/interface/models/retrospective.dto.ts +32 -0
  432. package/src/types/interface/models/short-link-click.dto.ts +33 -0
  433. package/src/types/interface/models/short-link.dto.ts +48 -0
  434. package/src/types/interface/models/user-tag.dto.ts +26 -0
  435. package/src/types/interface/models/user.dto.ts +26 -0
  436. package/src/utils/board.utils.ts +57 -0
  437. package/src/utils/enum.utils.ts +6 -0
  438. package/src/utils/error.utils.ts +30 -0
  439. package/src/utils/icons.utils.ts +96 -0
  440. package/src/utils/index.ts +5 -0
  441. package/src/utils/shape.utils.ts +296 -0
  442. package/tsconfig.json +24 -0
package/src/index.ts ADDED
@@ -0,0 +1,541 @@
1
+ import axios from 'axios';
2
+ import axiosRetry, { IAxiosRetryConfig, isNetworkOrIdempotentRequestError } from 'axios-retry';
3
+ import * as abyssAdminApi from './api/abyss.admin.api';
4
+ import * as boardApi from './api/board.api';
5
+ import * as boardColumnApi from './api/board-column.api';
6
+ import * as boardCardApi from './api/board-card.api';
7
+ import * as boardLabelApi from './api/board-label.api';
8
+ import * as boardCardCommentApi from './api/board-card-comment.api';
9
+ import * as boardCardChecklistApi from './api/board-card-checklist.api';
10
+ import * as boardCardDocumentApi from './api/board-card-document.api';
11
+ import * as drawApi from './api/draw.api';
12
+ import * as drawPublicApi from './api/draw.public.api';
13
+ import * as retrospectiveApi from './api/retrospective.api';
14
+ import * as retrospectiveCardApi from './api/retrospective-card.api';
15
+ import * as retrospectiveMemberApi from './api/retrospective-member.api';
16
+ import * as retrospectiveSectionApi from './api/retrospective-section.api';
17
+ import * as retrospectivePublicApi from './api/retrospective.public.api';
18
+ import * as atlasApi from './api/atlas.api';
19
+ import * as atlasGroupApi from './api/atlas-group.api';
20
+ import * as atlasPageApi from './api/atlas-page.api';
21
+ import * as atlasDocumentApi from './api/atlas-document.api';
22
+ import * as atlasPublicApi from './api/atlas.public.api';
23
+ import * as memoApi from './api/memo.api';
24
+ import * as shortLinkApiModule from './api/short-link.api';
25
+ import * as shortLinkAdminApiModule from './api/short-link.admin.api';
26
+ import * as shortLinkPublicApiModule from './api/short-link.public.api';
27
+ import * as metricsApi from './api/metrics.api';
28
+ import * as userTagApi from './api/user-tag.api';
29
+
30
+ export * from './api';
31
+ export * from './types';
32
+ export * from './utils';
33
+ export * from './constants';
34
+ export * from './server-sent-events';
35
+
36
+ const DEFAULT_BASE_URL = 'https://tools-api.abyss-project.fr/api/';
37
+
38
+ export const API_KEY_HEADER = 'abyss-tools-api-key';
39
+ export const ADMIN_TOKEN_HEADER = 'abyss-admin-token';
40
+
41
+ const NUMBER_RETRY_API = 10;
42
+ const BASE_DELAY_BETWEEN_RETRY = 5000;
43
+ const RETRY_CODES = [
44
+ 502, // Bad Gateway
45
+ 503, // Service Unavailable
46
+ ];
47
+
48
+ type CoreConfig = {
49
+ token?: string;
50
+ apiKey?: string;
51
+ adminToken?: string;
52
+ baseURL?: string;
53
+ };
54
+
55
+ type AbyssToolsCoreSDK = {
56
+ abyss: {
57
+ admin: {
58
+ activateUserService: typeof abyssAdminApi.activateUserServiceAbyssAdmin;
59
+ deleteUser: typeof abyssAdminApi.deleteUserAbyssAdmin;
60
+ syncOrganization: typeof abyssAdminApi.syncOrganizationAbyssAdmin;
61
+ deleteOrganization: typeof abyssAdminApi.deleteOrganizationAbyssAdmin;
62
+ syncProject: typeof abyssAdminApi.syncProjectAbyssAdmin;
63
+ deleteProject: typeof abyssAdminApi.deleteProjectAbyssAdmin;
64
+ };
65
+ };
66
+ board: {
67
+ getBoard: typeof boardApi.getBoard;
68
+ getBySlugBoard: typeof boardApi.getBySlugBoard;
69
+ listBoard: typeof boardApi.listBoard;
70
+ listBoardProject: typeof boardApi.listBoardProject;
71
+ deleteBoard: typeof boardApi.deleteBoard;
72
+ updateBoard: typeof boardApi.updateBoard;
73
+ createBoard: typeof boardApi.createBoard;
74
+ createForProjectBoard: typeof boardApi.createForProjectBoard;
75
+ getNextCardPreviewBoard: typeof boardApi.getNextCardPreviewBoard;
76
+ };
77
+ boardColumn: {
78
+ getBoardColumn: typeof boardColumnApi.getBoardColumn;
79
+ deleteBoardColumn: typeof boardColumnApi.deleteBoardColumn;
80
+ updateBoardColumn: typeof boardColumnApi.updateBoardColumn;
81
+ createBoardColumn: typeof boardColumnApi.createBoardColumn;
82
+ };
83
+ boardCard: {
84
+ getBoardCard: typeof boardCardApi.getBoardCard;
85
+ getAllBoardCard: typeof boardCardApi.getAllBoardCard;
86
+ deleteBoardCard: typeof boardCardApi.deleteBoardCard;
87
+ updateBoardCard: typeof boardCardApi.updateBoardCard;
88
+ restoreBoardCard: typeof boardCardApi.restoreBoardCard;
89
+ createBoardCard: typeof boardCardApi.createBoardCard;
90
+ addMemberBoardCard: typeof boardCardApi.addMemberBoardCard;
91
+ removeMemberBoardCard: typeof boardCardApi.removeMemberBoardCard;
92
+ moveToBoardBoardCard: typeof boardCardApi.moveToBoardBoardCard;
93
+ searchBoardCard: typeof boardCardApi.searchBoardCard;
94
+ };
95
+ boardLabel: {
96
+ getBoardLabel: typeof boardLabelApi.getBoardLabel;
97
+ deleteBoardLabel: typeof boardLabelApi.deleteBoardLabel;
98
+ updateBoardLabel: typeof boardLabelApi.updateBoardLabel;
99
+ createBoardLabel: typeof boardLabelApi.createBoardLabel;
100
+ addBoardLabel: typeof boardLabelApi.addBoardLabel;
101
+ removeBoardLabel: typeof boardLabelApi.removeBoardLabel;
102
+ listBoardLabels: typeof boardLabelApi.listBoardLabels;
103
+ };
104
+ boardCardComment: {
105
+ getBoardCardComment: typeof boardCardCommentApi.getBoardCardComment;
106
+ deleteBoardCardComment: typeof boardCardCommentApi.deleteBoardCardComment;
107
+ updateBoardCardComment: typeof boardCardCommentApi.updateBoardCardComment;
108
+ createBoardCardComment: typeof boardCardCommentApi.createBoardCardComment;
109
+ };
110
+ boardCardChecklist: {
111
+ getBoardCardChecklist: typeof boardCardChecklistApi.getBoardCardChecklist;
112
+ deleteBoardCardChecklist: typeof boardCardChecklistApi.deleteBoardCardChecklist;
113
+ updateBoardCardChecklist: typeof boardCardChecklistApi.updateBoardCardChecklist;
114
+ createBoardCardChecklist: typeof boardCardChecklistApi.createBoardCardChecklist;
115
+ addRowBoardCardChecklist: typeof boardCardChecklistApi.addRowBoardCardChecklist;
116
+ removeRowBoardCardChecklist: typeof boardCardChecklistApi.removeRowBoardCardChecklist;
117
+ updateRowBoardCardChecklist: typeof boardCardChecklistApi.updateRowBoardCardChecklist;
118
+ };
119
+ boardCardDocument: {
120
+ getBoardCardDocument: typeof boardCardDocumentApi.getBoardCardDocument;
121
+ deleteBoardCardDocument: typeof boardCardDocumentApi.deleteBoardCardDocument;
122
+ getUploadPreSignedUrlBoardCardDocument: typeof boardCardDocumentApi.getUploadPreSignedUrlBoardCardDocument;
123
+ cloudImportBoardCardDocument: typeof boardCardDocumentApi.cloudImportBoardCardDocument;
124
+ };
125
+ draw: {
126
+ paginateDraw: typeof drawApi.paginateDraw;
127
+ paginateProjectDraw: typeof drawApi.paginateProjectDraw;
128
+ getDraw: typeof drawApi.getDraw;
129
+ deleteDraw: typeof drawApi.deleteDraw;
130
+ updateDraw: typeof drawApi.updateDraw;
131
+ createDraw: typeof drawApi.createDraw;
132
+ createForProjectDraw: typeof drawApi.createForProjectDraw;
133
+ public: {
134
+ getDrawPublic: typeof drawPublicApi.getDrawPublic;
135
+ deleteDrawPublic: typeof drawPublicApi.deleteDrawPublic;
136
+ updateDrawPublic: typeof drawPublicApi.updateDrawPublic;
137
+ createDrawPublic: typeof drawPublicApi.createDrawPublic;
138
+ };
139
+ };
140
+ retrospective: {
141
+ getRetrospective: typeof retrospectiveApi.getRetrospective;
142
+ paginateProjectRetrospective: typeof retrospectiveApi.paginateProjectRetrospective;
143
+ paginateRetrospective: typeof retrospectiveApi.paginateRetrospective;
144
+ createForProjectRetrospective: typeof retrospectiveApi.createForProjectRetrospective;
145
+ createRetrospective: typeof retrospectiveApi.createRetrospective;
146
+ updateRetrospective: typeof retrospectiveApi.updateRetrospective;
147
+ deleteRetrospective: typeof retrospectiveApi.deleteRetrospective;
148
+ public: {
149
+ getRetrospectivePublic: typeof retrospectivePublicApi.getRetrospectivePublic;
150
+ updateRetrospectivePublic: typeof retrospectivePublicApi.updateRetrospectivePublic;
151
+ createSectionRetrospectivePublic: typeof retrospectivePublicApi.createSectionRetrospectivePublic;
152
+ updateSectionRetrospectivePublic: typeof retrospectivePublicApi.updateSectionRetrospectivePublic;
153
+ deleteSectionRetrospectivePublic: typeof retrospectivePublicApi.deleteSectionRetrospectivePublic;
154
+ joinMemberRetrospectivePublic: typeof retrospectivePublicApi.joinMemberRetrospectivePublic;
155
+ updateMemberRetrospectivePublic: typeof retrospectivePublicApi.updateMemberRetrospectivePublic;
156
+ createCardRetrospectivePublic: typeof retrospectivePublicApi.createCardRetrospectivePublic;
157
+ updateCardRetrospectivePublic: typeof retrospectivePublicApi.updateCardRetrospectivePublic;
158
+ deleteCardRetrospectivePublic: typeof retrospectivePublicApi.deleteCardRetrospectivePublic;
159
+ };
160
+ };
161
+ retrospectiveCard: {
162
+ getRetrospectiveCard: typeof retrospectiveCardApi.getRetrospectiveCard;
163
+ paginateRetrospectiveCard: typeof retrospectiveCardApi.paginateRetrospectiveCard;
164
+ createRetrospectiveCard: typeof retrospectiveCardApi.createRetrospectiveCard;
165
+ updateRetrospectiveCard: typeof retrospectiveCardApi.updateRetrospectiveCard;
166
+ deleteRetrospectiveCard: typeof retrospectiveCardApi.deleteRetrospectiveCard;
167
+ };
168
+ retrospectiveMember: {
169
+ getRetrospectiveMember: typeof retrospectiveMemberApi.getRetrospectiveMember;
170
+ listRetrospectiveMember: typeof retrospectiveMemberApi.listRetrospectiveMember;
171
+ joinRetrospectiveMember: typeof retrospectiveMemberApi.joinRetrospectiveMember;
172
+ updateRetrospectiveMember: typeof retrospectiveMemberApi.updateRetrospectiveMember;
173
+ };
174
+ retrospectiveSection: {
175
+ getRetrospectiveSection: typeof retrospectiveSectionApi.getRetrospectiveSection;
176
+ paginateRetrospectiveSection: typeof retrospectiveSectionApi.paginateRetrospectiveSection;
177
+ createRetrospectiveSection: typeof retrospectiveSectionApi.createRetrospectiveSection;
178
+ updateRetrospectiveSection: typeof retrospectiveSectionApi.updateRetrospectiveSection;
179
+ deleteRetrospectiveSection: typeof retrospectiveSectionApi.deleteRetrospectiveSection;
180
+ };
181
+ atlas: {
182
+ paginateAtlas: typeof atlasApi.paginateAtlas;
183
+ paginateProjectAtlas: typeof atlasApi.paginateProjectAtlas;
184
+ getAtlas: typeof atlasApi.getAtlas;
185
+ deleteAtlas: typeof atlasApi.deleteAtlas;
186
+ updateAtlas: typeof atlasApi.updateAtlas;
187
+ createAtlas: typeof atlasApi.createAtlas;
188
+ createForProjectAtlas: typeof atlasApi.createForProjectAtlas;
189
+ public: {
190
+ getAtlasPublic: typeof atlasPublicApi.getAtlasPublic;
191
+ getPageAtlasPublic: typeof atlasPublicApi.getPageAtlasPublic;
192
+ searchContentAtlasPublic: typeof atlasPublicApi.searchContentAtlasPublic;
193
+ };
194
+ };
195
+ atlasGroup: {
196
+ paginateAtlasGroup: typeof atlasGroupApi.paginateAtlasGroup;
197
+ getAtlasGroup: typeof atlasGroupApi.getAtlasGroup;
198
+ deleteAtlasGroup: typeof atlasGroupApi.deleteAtlasGroup;
199
+ updateAtlasGroup: typeof atlasGroupApi.updateAtlasGroup;
200
+ createAtlasGroup: typeof atlasGroupApi.createAtlasGroup;
201
+ };
202
+ atlasPage: {
203
+ paginateAtlasPage: typeof atlasPageApi.paginateAtlasPage;
204
+ getAtlasPage: typeof atlasPageApi.getAtlasPage;
205
+ deleteAtlasPage: typeof atlasPageApi.deleteAtlasPage;
206
+ updateAtlasPage: typeof atlasPageApi.updateAtlasPage;
207
+ createAtlasPage: typeof atlasPageApi.createAtlasPage;
208
+ updateAtlasPageContent: typeof atlasPageApi.updateAtlasPageContent;
209
+ searchAtlasContent: typeof atlasPageApi.searchAtlasContent;
210
+ getAtlasPageContentHistory: typeof atlasPageApi.getAtlasPageContentHistory;
211
+ restoreAtlasPageContent: typeof atlasPageApi.restoreAtlasPageContent;
212
+ };
213
+ atlasDocument: {
214
+ getAtlasDocument: typeof atlasDocumentApi.getAtlasDocument;
215
+ deleteAtlasDocument: typeof atlasDocumentApi.deleteAtlasDocument;
216
+ getUploadPreSignedUrlAtlasDocument: typeof atlasDocumentApi.getUploadPreSignedUrlAtlasDocument;
217
+ paginateAtlasDocument: typeof atlasDocumentApi.paginateAtlasDocument;
218
+ listAtlasDocument: typeof atlasDocumentApi.listAtlasDocument;
219
+ };
220
+ memo: {
221
+ paginateMemo: typeof memoApi.paginateMemo;
222
+ paginateProjectMemo: typeof memoApi.paginateProjectMemo;
223
+ getMemo: typeof memoApi.getMemo;
224
+ deleteMemo: typeof memoApi.deleteMemo;
225
+ updateMemo: typeof memoApi.updateMemo;
226
+ createMemo: typeof memoApi.createMemo;
227
+ createForProjectMemo: typeof memoApi.createForProjectMemo;
228
+ };
229
+ shortLink: {
230
+ get: typeof shortLinkApiModule.shortLinkApi.get;
231
+ paginate: typeof shortLinkApiModule.shortLinkApi.paginate;
232
+ paginateProject: typeof shortLinkApiModule.shortLinkApi.paginateProject;
233
+ create: typeof shortLinkApiModule.shortLinkApi.create;
234
+ createForProject: typeof shortLinkApiModule.shortLinkApi.createForProject;
235
+ update: typeof shortLinkApiModule.shortLinkApi.update;
236
+ delete: typeof shortLinkApiModule.shortLinkApi.delete;
237
+ getStats: typeof shortLinkApiModule.shortLinkApi.getStats;
238
+ getClicks: typeof shortLinkApiModule.shortLinkApi.getClicks;
239
+ admin: {
240
+ paginate: typeof shortLinkAdminApiModule.shortLinkAdminApi.paginate;
241
+ get: typeof shortLinkAdminApiModule.shortLinkAdminApi.get;
242
+ update: typeof shortLinkAdminApiModule.shortLinkAdminApi.update;
243
+ delete: typeof shortLinkAdminApiModule.shortLinkAdminApi.delete;
244
+ };
245
+ public: {
246
+ createAnonymous: typeof shortLinkPublicApiModule.shortLinkPublicApi.createAnonymous;
247
+ redirect: typeof shortLinkPublicApiModule.shortLinkPublicApi.redirect;
248
+ getStats: typeof shortLinkPublicApiModule.shortLinkPublicApi.getStats;
249
+ getClicks: typeof shortLinkPublicApiModule.shortLinkPublicApi.getClicks;
250
+ renew: typeof shortLinkPublicApiModule.shortLinkPublicApi.renew;
251
+ };
252
+ };
253
+ metrics: {
254
+ getOrganizationToolsMetrics: typeof metricsApi.getOrganizationToolsMetrics;
255
+ };
256
+ userTag: {
257
+ listUserTag: typeof userTagApi.listUserTag;
258
+ createUserTag: typeof userTagApi.createUserTag;
259
+ updateUserTag: typeof userTagApi.updateUserTag;
260
+ deleteUserTag: typeof userTagApi.deleteUserTag;
261
+ assignTag: typeof userTagApi.assignTag;
262
+ unassignTag: typeof userTagApi.unassignTag;
263
+ getUserTagStats: typeof userTagApi.getUserTagStats;
264
+ getEntityTags: typeof userTagApi.getEntityTags;
265
+ };
266
+ };
267
+
268
+ export class AbyssToolsCore {
269
+ private static config = {
270
+ token: '',
271
+ apiKey: '',
272
+ adminToken: '',
273
+ baseURL: DEFAULT_BASE_URL,
274
+ };
275
+ static axios = axios.create({
276
+ baseURL: this.config.baseURL,
277
+ withCredentials: true,
278
+ });
279
+
280
+ private static _sdk: AbyssToolsCoreSDK | null = null;
281
+
282
+ public static get sdk(): AbyssToolsCoreSDK {
283
+ if (!AbyssToolsCore._sdk) {
284
+ AbyssToolsCore._sdk = AbyssToolsCore.buildSDK();
285
+ }
286
+ return AbyssToolsCore._sdk;
287
+ }
288
+
289
+ private static buildSDK(): AbyssToolsCoreSDK {
290
+ return {
291
+ abyss: {
292
+ admin: {
293
+ activateUserService: abyssAdminApi.activateUserServiceAbyssAdmin,
294
+ deleteUser: abyssAdminApi.deleteUserAbyssAdmin,
295
+ syncOrganization: abyssAdminApi.syncOrganizationAbyssAdmin,
296
+ deleteOrganization: abyssAdminApi.deleteOrganizationAbyssAdmin,
297
+ syncProject: abyssAdminApi.syncProjectAbyssAdmin,
298
+ deleteProject: abyssAdminApi.deleteProjectAbyssAdmin,
299
+ },
300
+ },
301
+ board: {
302
+ getBoard: boardApi.getBoard,
303
+ getBySlugBoard: boardApi.getBySlugBoard,
304
+ listBoard: boardApi.listBoard,
305
+ listBoardProject: boardApi.listBoardProject,
306
+ deleteBoard: boardApi.deleteBoard,
307
+ updateBoard: boardApi.updateBoard,
308
+ createBoard: boardApi.createBoard,
309
+ createForProjectBoard: boardApi.createForProjectBoard,
310
+ getNextCardPreviewBoard: boardApi.getNextCardPreviewBoard,
311
+ },
312
+ boardColumn: {
313
+ getBoardColumn: boardColumnApi.getBoardColumn,
314
+ deleteBoardColumn: boardColumnApi.deleteBoardColumn,
315
+ updateBoardColumn: boardColumnApi.updateBoardColumn,
316
+ createBoardColumn: boardColumnApi.createBoardColumn,
317
+ },
318
+ boardCard: {
319
+ getBoardCard: boardCardApi.getBoardCard,
320
+ getAllBoardCard: boardCardApi.getAllBoardCard,
321
+ deleteBoardCard: boardCardApi.deleteBoardCard,
322
+ updateBoardCard: boardCardApi.updateBoardCard,
323
+ restoreBoardCard: boardCardApi.restoreBoardCard,
324
+ createBoardCard: boardCardApi.createBoardCard,
325
+ addMemberBoardCard: boardCardApi.addMemberBoardCard,
326
+ removeMemberBoardCard: boardCardApi.removeMemberBoardCard,
327
+ moveToBoardBoardCard: boardCardApi.moveToBoardBoardCard,
328
+ searchBoardCard: boardCardApi.searchBoardCard,
329
+ },
330
+ boardLabel: {
331
+ getBoardLabel: boardLabelApi.getBoardLabel,
332
+ deleteBoardLabel: boardLabelApi.deleteBoardLabel,
333
+ updateBoardLabel: boardLabelApi.updateBoardLabel,
334
+ createBoardLabel: boardLabelApi.createBoardLabel,
335
+ addBoardLabel: boardLabelApi.addBoardLabel,
336
+ removeBoardLabel: boardLabelApi.removeBoardLabel,
337
+ listBoardLabels: boardLabelApi.listBoardLabels,
338
+ },
339
+ boardCardComment: {
340
+ getBoardCardComment: boardCardCommentApi.getBoardCardComment,
341
+ deleteBoardCardComment: boardCardCommentApi.deleteBoardCardComment,
342
+ updateBoardCardComment: boardCardCommentApi.updateBoardCardComment,
343
+ createBoardCardComment: boardCardCommentApi.createBoardCardComment,
344
+ },
345
+ boardCardChecklist: {
346
+ getBoardCardChecklist: boardCardChecklistApi.getBoardCardChecklist,
347
+ deleteBoardCardChecklist: boardCardChecklistApi.deleteBoardCardChecklist,
348
+ updateBoardCardChecklist: boardCardChecklistApi.updateBoardCardChecklist,
349
+ createBoardCardChecklist: boardCardChecklistApi.createBoardCardChecklist,
350
+ addRowBoardCardChecklist: boardCardChecklistApi.addRowBoardCardChecklist,
351
+ removeRowBoardCardChecklist: boardCardChecklistApi.removeRowBoardCardChecklist,
352
+ updateRowBoardCardChecklist: boardCardChecklistApi.updateRowBoardCardChecklist,
353
+ },
354
+ boardCardDocument: {
355
+ getBoardCardDocument: boardCardDocumentApi.getBoardCardDocument,
356
+ deleteBoardCardDocument: boardCardDocumentApi.deleteBoardCardDocument,
357
+ getUploadPreSignedUrlBoardCardDocument:
358
+ boardCardDocumentApi.getUploadPreSignedUrlBoardCardDocument,
359
+ cloudImportBoardCardDocument: boardCardDocumentApi.cloudImportBoardCardDocument,
360
+ },
361
+ draw: {
362
+ paginateDraw: drawApi.paginateDraw,
363
+ paginateProjectDraw: drawApi.paginateProjectDraw,
364
+ getDraw: drawApi.getDraw,
365
+ deleteDraw: drawApi.deleteDraw,
366
+ updateDraw: drawApi.updateDraw,
367
+ createDraw: drawApi.createDraw,
368
+ createForProjectDraw: drawApi.createForProjectDraw,
369
+ public: {
370
+ getDrawPublic: drawPublicApi.getDrawPublic,
371
+ deleteDrawPublic: drawPublicApi.deleteDrawPublic,
372
+ updateDrawPublic: drawPublicApi.updateDrawPublic,
373
+ createDrawPublic: drawPublicApi.createDrawPublic,
374
+ },
375
+ },
376
+ retrospective: {
377
+ getRetrospective: retrospectiveApi.getRetrospective,
378
+ paginateProjectRetrospective: retrospectiveApi.paginateProjectRetrospective,
379
+ paginateRetrospective: retrospectiveApi.paginateRetrospective,
380
+ createForProjectRetrospective: retrospectiveApi.createForProjectRetrospective,
381
+ createRetrospective: retrospectiveApi.createRetrospective,
382
+ updateRetrospective: retrospectiveApi.updateRetrospective,
383
+ deleteRetrospective: retrospectiveApi.deleteRetrospective,
384
+ public: {
385
+ getRetrospectivePublic: retrospectivePublicApi.getRetrospectivePublic,
386
+ updateRetrospectivePublic: retrospectivePublicApi.updateRetrospectivePublic,
387
+ createSectionRetrospectivePublic: retrospectivePublicApi.createSectionRetrospectivePublic,
388
+ updateSectionRetrospectivePublic: retrospectivePublicApi.updateSectionRetrospectivePublic,
389
+ deleteSectionRetrospectivePublic: retrospectivePublicApi.deleteSectionRetrospectivePublic,
390
+ joinMemberRetrospectivePublic: retrospectivePublicApi.joinMemberRetrospectivePublic,
391
+ updateMemberRetrospectivePublic: retrospectivePublicApi.updateMemberRetrospectivePublic,
392
+ createCardRetrospectivePublic: retrospectivePublicApi.createCardRetrospectivePublic,
393
+ updateCardRetrospectivePublic: retrospectivePublicApi.updateCardRetrospectivePublic,
394
+ deleteCardRetrospectivePublic: retrospectivePublicApi.deleteCardRetrospectivePublic,
395
+ },
396
+ },
397
+ retrospectiveCard: {
398
+ getRetrospectiveCard: retrospectiveCardApi.getRetrospectiveCard,
399
+ paginateRetrospectiveCard: retrospectiveCardApi.paginateRetrospectiveCard,
400
+ createRetrospectiveCard: retrospectiveCardApi.createRetrospectiveCard,
401
+ updateRetrospectiveCard: retrospectiveCardApi.updateRetrospectiveCard,
402
+ deleteRetrospectiveCard: retrospectiveCardApi.deleteRetrospectiveCard,
403
+ },
404
+ retrospectiveMember: {
405
+ getRetrospectiveMember: retrospectiveMemberApi.getRetrospectiveMember,
406
+ listRetrospectiveMember: retrospectiveMemberApi.listRetrospectiveMember,
407
+ joinRetrospectiveMember: retrospectiveMemberApi.joinRetrospectiveMember,
408
+ updateRetrospectiveMember: retrospectiveMemberApi.updateRetrospectiveMember,
409
+ },
410
+ retrospectiveSection: {
411
+ getRetrospectiveSection: retrospectiveSectionApi.getRetrospectiveSection,
412
+ paginateRetrospectiveSection: retrospectiveSectionApi.paginateRetrospectiveSection,
413
+ createRetrospectiveSection: retrospectiveSectionApi.createRetrospectiveSection,
414
+ updateRetrospectiveSection: retrospectiveSectionApi.updateRetrospectiveSection,
415
+ deleteRetrospectiveSection: retrospectiveSectionApi.deleteRetrospectiveSection,
416
+ },
417
+ atlas: {
418
+ paginateAtlas: atlasApi.paginateAtlas,
419
+ paginateProjectAtlas: atlasApi.paginateProjectAtlas,
420
+ getAtlas: atlasApi.getAtlas,
421
+ deleteAtlas: atlasApi.deleteAtlas,
422
+ updateAtlas: atlasApi.updateAtlas,
423
+ createAtlas: atlasApi.createAtlas,
424
+ createForProjectAtlas: atlasApi.createForProjectAtlas,
425
+ public: {
426
+ getAtlasPublic: atlasPublicApi.getAtlasPublic,
427
+ getPageAtlasPublic: atlasPublicApi.getPageAtlasPublic,
428
+ searchContentAtlasPublic: atlasPublicApi.searchContentAtlasPublic,
429
+ },
430
+ },
431
+ atlasGroup: {
432
+ paginateAtlasGroup: atlasGroupApi.paginateAtlasGroup,
433
+ getAtlasGroup: atlasGroupApi.getAtlasGroup,
434
+ deleteAtlasGroup: atlasGroupApi.deleteAtlasGroup,
435
+ updateAtlasGroup: atlasGroupApi.updateAtlasGroup,
436
+ createAtlasGroup: atlasGroupApi.createAtlasGroup,
437
+ },
438
+ atlasPage: {
439
+ paginateAtlasPage: atlasPageApi.paginateAtlasPage,
440
+ getAtlasPage: atlasPageApi.getAtlasPage,
441
+ deleteAtlasPage: atlasPageApi.deleteAtlasPage,
442
+ updateAtlasPage: atlasPageApi.updateAtlasPage,
443
+ createAtlasPage: atlasPageApi.createAtlasPage,
444
+ updateAtlasPageContent: atlasPageApi.updateAtlasPageContent,
445
+ searchAtlasContent: atlasPageApi.searchAtlasContent,
446
+ getAtlasPageContentHistory: atlasPageApi.getAtlasPageContentHistory,
447
+ restoreAtlasPageContent: atlasPageApi.restoreAtlasPageContent,
448
+ },
449
+ atlasDocument: {
450
+ getAtlasDocument: atlasDocumentApi.getAtlasDocument,
451
+ deleteAtlasDocument: atlasDocumentApi.deleteAtlasDocument,
452
+ getUploadPreSignedUrlAtlasDocument: atlasDocumentApi.getUploadPreSignedUrlAtlasDocument,
453
+ paginateAtlasDocument: atlasDocumentApi.paginateAtlasDocument,
454
+ listAtlasDocument: atlasDocumentApi.listAtlasDocument,
455
+ },
456
+ memo: {
457
+ paginateMemo: memoApi.paginateMemo,
458
+ paginateProjectMemo: memoApi.paginateProjectMemo,
459
+ getMemo: memoApi.getMemo,
460
+ deleteMemo: memoApi.deleteMemo,
461
+ updateMemo: memoApi.updateMemo,
462
+ createMemo: memoApi.createMemo,
463
+ createForProjectMemo: memoApi.createForProjectMemo,
464
+ },
465
+ shortLink: {
466
+ get: shortLinkApiModule.shortLinkApi.get,
467
+ paginate: shortLinkApiModule.shortLinkApi.paginate,
468
+ paginateProject: shortLinkApiModule.shortLinkApi.paginateProject,
469
+ create: shortLinkApiModule.shortLinkApi.create,
470
+ createForProject: shortLinkApiModule.shortLinkApi.createForProject,
471
+ update: shortLinkApiModule.shortLinkApi.update,
472
+ delete: shortLinkApiModule.shortLinkApi.delete,
473
+ getStats: shortLinkApiModule.shortLinkApi.getStats,
474
+ getClicks: shortLinkApiModule.shortLinkApi.getClicks,
475
+ admin: {
476
+ paginate: shortLinkAdminApiModule.shortLinkAdminApi.paginate,
477
+ get: shortLinkAdminApiModule.shortLinkAdminApi.get,
478
+ update: shortLinkAdminApiModule.shortLinkAdminApi.update,
479
+ delete: shortLinkAdminApiModule.shortLinkAdminApi.delete,
480
+ },
481
+ public: {
482
+ createAnonymous: shortLinkPublicApiModule.shortLinkPublicApi.createAnonymous,
483
+ redirect: shortLinkPublicApiModule.shortLinkPublicApi.redirect,
484
+ getStats: shortLinkPublicApiModule.shortLinkPublicApi.getStats,
485
+ getClicks: shortLinkPublicApiModule.shortLinkPublicApi.getClicks,
486
+ renew: shortLinkPublicApiModule.shortLinkPublicApi.renew,
487
+ },
488
+ },
489
+ metrics: {
490
+ getOrganizationToolsMetrics: metricsApi.getOrganizationToolsMetrics,
491
+ },
492
+ userTag: {
493
+ listUserTag: userTagApi.listUserTag,
494
+ createUserTag: userTagApi.createUserTag,
495
+ updateUserTag: userTagApi.updateUserTag,
496
+ deleteUserTag: userTagApi.deleteUserTag,
497
+ assignTag: userTagApi.assignTag,
498
+ unassignTag: userTagApi.unassignTag,
499
+ getUserTagStats: userTagApi.getUserTagStats,
500
+ getEntityTags: userTagApi.getEntityTags,
501
+ },
502
+ };
503
+ }
504
+
505
+ public static enableAxiosRetry(axiosRetryConfig?: IAxiosRetryConfig): void {
506
+ axiosRetry(AbyssToolsCore.axios, {
507
+ retries: NUMBER_RETRY_API,
508
+ retryDelay: (retryCount) => retryCount * BASE_DELAY_BETWEEN_RETRY,
509
+ retryCondition: (error) =>
510
+ isNetworkOrIdempotentRequestError(error) ||
511
+ RETRY_CODES.includes(error.response?.status || 502),
512
+ ...axiosRetryConfig,
513
+ });
514
+ }
515
+
516
+ public static setConfig(config: CoreConfig): void {
517
+ AbyssToolsCore._sdk = null;
518
+
519
+ AbyssToolsCore.config = { ...AbyssToolsCore.config, ...config };
520
+
521
+ if (config.baseURL) {
522
+ AbyssToolsCore.axios.defaults.baseURL = config.baseURL;
523
+ }
524
+
525
+ if (config.token) {
526
+ AbyssToolsCore.axios.defaults.headers.common.Authorization = `Bearer ${config.token}`;
527
+ }
528
+
529
+ if (config.apiKey) {
530
+ AbyssToolsCore.axios.defaults.headers.common[API_KEY_HEADER] = `${config.apiKey}`;
531
+ }
532
+
533
+ if (config.adminToken) {
534
+ AbyssToolsCore.axios.defaults.headers.common[ADMIN_TOKEN_HEADER] = `${config.adminToken}`;
535
+ }
536
+ }
537
+
538
+ public static getConfig(): CoreConfig {
539
+ return AbyssToolsCore.config;
540
+ }
541
+ }
@@ -0,0 +1,13 @@
1
+ export * from './server-sent-events.manager';
2
+ export * from './protocols';
3
+
4
+ export enum SSEChannels {
5
+ BOARD = 'sse:board',
6
+ BOARD_CARD = 'sse:board-card',
7
+ USER_NOTIFICATION = 'sse:user-notification',
8
+ RETROSPECTIVE = 'sse:retrospective',
9
+ ATLAS = 'sse:atlas',
10
+
11
+ // AbyssCloud
12
+ CLOUD = 'sse:cloud',
13
+ }
@@ -0,0 +1,90 @@
1
+ import { SystemSSEMessageContent } from '..';
2
+ import { ValueOf } from '../../../types';
3
+ import { IAtlas, IAtlasGroup, IAtlasPage, IAtlasDocument } from '../../../types/interface';
4
+
5
+ export enum AtlasSSEEvent {
6
+ ATLAS_UPDATED = 'ATLAS_UPDATED',
7
+ ATLAS_DELETED = 'ATLAS_DELETED',
8
+ GROUP_CREATED = 'GROUP_CREATED',
9
+ GROUP_UPDATED = 'GROUP_UPDATED',
10
+ GROUP_DELETED = 'GROUP_DELETED',
11
+ PAGE_CREATED = 'PAGE_CREATED',
12
+ PAGE_UPDATED = 'PAGE_UPDATED',
13
+ PAGE_DELETED = 'PAGE_DELETED',
14
+ PAGE_CONTENT_DIFF_UPDATED = 'PAGE_CONTENT_DIFF_UPDATED',
15
+ ATLAS_DOCUMENT_CREATE = 'ATLAS_DOCUMENT_CREATE',
16
+ ATLAS_DOCUMENT_DELETE = 'ATLAS_DOCUMENT_DELETE',
17
+ }
18
+
19
+ export type AtlasSSEMessageContent = ValueOf<
20
+ {
21
+ [K in AtlasSSEEvent]: {
22
+ type: K;
23
+ payload: SourceAtlasSSEEventPayload[K];
24
+ };
25
+ }
26
+ >;
27
+
28
+ export class SourceAtlasSSEEventPayload implements Record<AtlasSSEEvent, Record<string, any>> {
29
+ [AtlasSSEEvent.ATLAS_UPDATED]!: {
30
+ atlasId: string;
31
+ atlas: IAtlas;
32
+ };
33
+
34
+ [AtlasSSEEvent.ATLAS_DELETED]!: {
35
+ atlasId: string;
36
+ userId?: string;
37
+ };
38
+
39
+ [AtlasSSEEvent.GROUP_CREATED]!: {
40
+ atlasId: string;
41
+ group: IAtlasGroup;
42
+ };
43
+
44
+ [AtlasSSEEvent.GROUP_UPDATED]!: {
45
+ atlasId: string;
46
+ group: IAtlasGroup;
47
+ };
48
+
49
+ [AtlasSSEEvent.GROUP_DELETED]!: {
50
+ atlasId: string;
51
+ groupId: string;
52
+ };
53
+
54
+ [AtlasSSEEvent.PAGE_CREATED]!: {
55
+ atlasId: string;
56
+ page: IAtlasPage;
57
+ };
58
+
59
+ [AtlasSSEEvent.PAGE_UPDATED]!: {
60
+ atlasId: string;
61
+ page: IAtlasPage;
62
+ };
63
+
64
+ [AtlasSSEEvent.PAGE_DELETED]!: {
65
+ atlasId: string;
66
+ pageId: string;
67
+ };
68
+
69
+ [AtlasSSEEvent.PAGE_CONTENT_DIFF_UPDATED]!: {
70
+ atlasId: string;
71
+ pageId: string;
72
+ diff: string | null;
73
+ version: number;
74
+ lastModifiedByUserId?: string;
75
+ };
76
+
77
+ [AtlasSSEEvent.ATLAS_DOCUMENT_CREATE]!: {
78
+ atlasId: string;
79
+ atlasPageId: string;
80
+ atlasDocument: IAtlasDocument;
81
+ };
82
+
83
+ [AtlasSSEEvent.ATLAS_DOCUMENT_DELETE]!: {
84
+ atlasId: string;
85
+ atlasPageId: string;
86
+ atlasDocumentId: string;
87
+ };
88
+ }
89
+
90
+ export type AtlasSSEEventContent = AtlasSSEMessageContent | SystemSSEMessageContent;
@@ -0,0 +1 @@
1
+ export * from './atlas.sse-protocol';