@abyss-project/tools 1.0.5 → 1.2.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 (347) hide show
  1. package/.eslintrc.js +33 -33
  2. package/.prettierrc +5 -5
  3. package/README.md +32 -32
  4. package/dist/api/beam.api.d.ts +48 -0
  5. package/dist/api/beam.api.js +104 -0
  6. package/dist/api/beam.api.js.map +1 -0
  7. package/dist/api/extraction-plan-preset.api.d.ts +9 -0
  8. package/dist/api/extraction-plan-preset.api.js +23 -0
  9. package/dist/api/extraction-plan-preset.api.js.map +1 -0
  10. package/dist/api/extraction-plan-preset.api.test.d.ts +1 -0
  11. package/dist/api/extraction-plan-preset.api.test.js +41 -0
  12. package/dist/api/extraction-plan-preset.api.test.js.map +1 -0
  13. package/dist/api/extraction-settings.api.d.ts +4 -0
  14. package/dist/api/extraction-settings.api.js +22 -0
  15. package/dist/api/extraction-settings.api.js.map +1 -0
  16. package/dist/api/extraction.api.d.ts +74 -0
  17. package/dist/api/extraction.api.js +416 -0
  18. package/dist/api/extraction.api.js.map +1 -0
  19. package/dist/api/index.d.ts +4 -1
  20. package/dist/api/index.js +4 -1
  21. package/dist/api/index.js.map +1 -1
  22. package/dist/constants/beam.constants.d.ts +1 -0
  23. package/dist/constants/beam.constants.js +5 -0
  24. package/dist/constants/beam.constants.js.map +1 -0
  25. package/dist/constants/index.d.ts +1 -0
  26. package/dist/constants/index.js +1 -0
  27. package/dist/constants/index.js.map +1 -1
  28. package/dist/index.d.ts +108 -59
  29. package/dist/index.js +106 -59
  30. package/dist/index.js.map +1 -1
  31. package/dist/types/enum/beam.enum.d.ts +12 -0
  32. package/dist/types/enum/beam.enum.js +18 -0
  33. package/dist/types/enum/beam.enum.js.map +1 -0
  34. package/dist/types/enum/combine-strategy.enum.d.ts +5 -0
  35. package/dist/types/enum/combine-strategy.enum.js +10 -0
  36. package/dist/types/enum/combine-strategy.enum.js.map +1 -0
  37. package/dist/types/enum/content-share.enum.d.ts +3 -1
  38. package/dist/types/enum/content-share.enum.js +2 -0
  39. package/dist/types/enum/content-share.enum.js.map +1 -1
  40. package/dist/types/enum/document-type.enum.d.ts +9 -0
  41. package/dist/types/enum/document-type.enum.js +14 -0
  42. package/dist/types/enum/document-type.enum.js.map +1 -0
  43. package/dist/types/enum/extraction-feedback-issue-type.enum.d.ts +8 -0
  44. package/dist/types/enum/extraction-feedback-issue-type.enum.js +13 -0
  45. package/dist/types/enum/extraction-feedback-issue-type.enum.js.map +1 -0
  46. package/dist/types/enum/extraction-warning.enum.d.ts +7 -0
  47. package/dist/types/enum/extraction-warning.enum.js +12 -0
  48. package/dist/types/enum/extraction-warning.enum.js.map +1 -0
  49. package/dist/types/enum/index.d.ts +7 -0
  50. package/dist/types/enum/index.js +7 -0
  51. package/dist/types/enum/index.js.map +1 -1
  52. package/dist/types/enum/interpreter-kind.enum.d.ts +5 -0
  53. package/dist/types/enum/interpreter-kind.enum.js +10 -0
  54. package/dist/types/enum/interpreter-kind.enum.js.map +1 -0
  55. package/dist/types/enum/provider-kind.enum.d.ts +10 -0
  56. package/dist/types/enum/provider-kind.enum.js +16 -0
  57. package/dist/types/enum/provider-kind.enum.js.map +1 -0
  58. package/dist/types/interface/api/requests/beam.request.d.ts +122 -0
  59. package/dist/types/interface/api/{responses/pdf.response.js → requests/beam.request.js} +1 -1
  60. package/dist/types/interface/api/requests/beam.request.js.map +1 -0
  61. package/dist/types/interface/api/requests/{rcb.request.d.ts → extraction.request.d.ts} +81 -52
  62. package/dist/types/interface/api/requests/{pdf.public.request.js → extraction.request.js} +1 -1
  63. package/dist/types/interface/api/requests/extraction.request.js.map +1 -0
  64. package/dist/types/interface/api/requests/index.d.ts +2 -1
  65. package/dist/types/interface/api/requests/index.js +2 -1
  66. package/dist/types/interface/api/requests/index.js.map +1 -1
  67. package/dist/types/interface/api/responses/beam.response.d.ts +92 -0
  68. package/dist/types/interface/api/responses/{rcb.response.js → beam.response.js} +1 -1
  69. package/dist/types/interface/api/responses/beam.response.js.map +1 -0
  70. package/dist/types/interface/api/responses/extraction.response.d.ts +403 -0
  71. package/dist/types/interface/api/{requests/user-tag.request.js → responses/extraction.response.js} +1 -1
  72. package/dist/types/interface/api/responses/extraction.response.js.map +1 -0
  73. package/dist/types/interface/api/responses/index.d.ts +2 -1
  74. package/dist/types/interface/api/responses/index.js +2 -1
  75. package/dist/types/interface/api/responses/index.js.map +1 -1
  76. package/dist/types/interface/models/beam.dto.d.ts +58 -0
  77. package/dist/types/interface/{api/requests/pdf.request.js → models/beam.dto.js} +1 -1
  78. package/dist/types/interface/models/beam.dto.js.map +1 -0
  79. package/dist/types/interface/models/extraction-fetched-provenance.dto.test.d.ts +1 -0
  80. package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js +159 -0
  81. package/dist/types/interface/models/extraction-fetched-provenance.dto.test.js.map +1 -0
  82. package/dist/types/interface/models/extraction-plan.dto.d.ts +163 -0
  83. package/dist/types/interface/models/extraction-plan.dto.js +11 -0
  84. package/dist/types/interface/models/extraction-plan.dto.js.map +1 -0
  85. package/dist/types/interface/models/extraction-plan.dto.test.d.ts +1 -0
  86. package/dist/types/interface/models/extraction-plan.dto.test.js +35 -0
  87. package/dist/types/interface/models/extraction-plan.dto.test.js.map +1 -0
  88. package/dist/types/interface/models/extraction-spatial-template.dto.d.ts +37 -0
  89. package/dist/types/interface/{api/requests/rcb.request.js → models/extraction-spatial-template.dto.js} +1 -1
  90. package/dist/types/interface/models/extraction-spatial-template.dto.js.map +1 -0
  91. package/dist/types/interface/models/extraction-spatial-template.dto.test.d.ts +1 -0
  92. package/dist/types/interface/models/extraction-spatial-template.dto.test.js +15 -0
  93. package/dist/types/interface/models/extraction-spatial-template.dto.test.js.map +1 -0
  94. package/dist/types/interface/models/{rcb.dto.d.ts → extraction.dto.d.ts} +64 -48
  95. package/dist/types/interface/models/extraction.dto.js +28 -0
  96. package/dist/types/interface/models/extraction.dto.js.map +1 -0
  97. package/dist/types/interface/models/index.d.ts +4 -1
  98. package/dist/types/interface/models/index.js +4 -1
  99. package/dist/types/interface/models/index.js.map +1 -1
  100. package/dist/types/interface/models/organization.dto.d.ts +2 -0
  101. package/dist/utils/{rcb-webhook.utils.d.ts → extraction-webhook.utils.d.ts} +2 -2
  102. package/dist/utils/{rcb-webhook.utils.js → extraction-webhook.utils.js} +4 -4
  103. package/dist/utils/extraction-webhook.utils.js.map +1 -0
  104. package/dist/utils/index.d.ts +1 -1
  105. package/dist/utils/index.js +1 -1
  106. package/dist/utils/index.js.map +1 -1
  107. package/dist/utils/shape.utils.js +18 -18
  108. package/package.json +14 -9
  109. package/src/api/abyss.admin.api.ts +54 -54
  110. package/src/api/atlas-document.api.ts +68 -68
  111. package/src/api/atlas-group.api.ts +69 -69
  112. package/src/api/atlas-page.api.ts +124 -124
  113. package/src/api/atlas.api.ts +103 -103
  114. package/src/api/atlas.public.api.ts +42 -42
  115. package/src/api/beam.api.ts +300 -0
  116. package/src/api/board-card-checklist.api.ts +99 -99
  117. package/src/api/board-card-comment.api.ts +57 -57
  118. package/src/api/board-card-document.api.ts +57 -57
  119. package/src/api/board-card.api.ts +137 -137
  120. package/src/api/board-column.api.ts +54 -54
  121. package/src/api/board-label.api.ts +87 -87
  122. package/src/api/board.api.ts +122 -122
  123. package/src/api/draw.api.ts +97 -97
  124. package/src/api/draw.public.api.ts +48 -48
  125. package/src/api/extraction-plan-preset.api.test.ts +24 -0
  126. package/src/api/extraction-plan-preset.api.ts +51 -0
  127. package/src/api/extraction-settings.api.ts +59 -0
  128. package/src/api/extraction.api.ts +899 -0
  129. package/src/api/index.ts +56 -51
  130. package/src/api/memo.api.ts +97 -97
  131. package/src/api/metrics.api.ts +27 -27
  132. package/src/api/monitor.api.ts +6 -6
  133. package/src/api/organization.api.ts +14 -14
  134. package/src/api/retrospective-card.api.ts +74 -74
  135. package/src/api/retrospective-member.api.ts +54 -54
  136. package/src/api/retrospective-section.api.ts +74 -74
  137. package/src/api/retrospective.api.ts +124 -124
  138. package/src/api/retrospective.public.api.ts +147 -147
  139. package/src/api/short-link.admin.api.ts +39 -39
  140. package/src/api/short-link.api.ts +125 -125
  141. package/src/api/short-link.public.api.ts +60 -60
  142. package/src/api/tag.api.ts +72 -72
  143. package/src/api/tests/beam.api.spec.ts +42 -0
  144. package/src/constants/atlas.constants.ts +2 -2
  145. package/src/constants/beam.constants.ts +4 -0
  146. package/src/constants/board.constants.ts +7 -7
  147. package/src/constants/index.ts +6 -5
  148. package/src/constants/memo.constants.ts +3 -3
  149. package/src/constants/short-link.constants.ts +11 -11
  150. package/src/constants/tag.constants.ts +3 -3
  151. package/src/index.ts +840 -747
  152. package/src/server-sent-events/index.ts +13 -13
  153. package/src/server-sent-events/protocols/atlas/atlas.sse-protocol.ts +90 -90
  154. package/src/server-sent-events/protocols/atlas/index.ts +1 -1
  155. package/src/server-sent-events/protocols/board/board.sse-protocol.ts +115 -115
  156. package/src/server-sent-events/protocols/board/index.ts +1 -1
  157. package/src/server-sent-events/protocols/board-card/board-card.sse-protocol.ts +26 -26
  158. package/src/server-sent-events/protocols/board-card/index.ts +1 -1
  159. package/src/server-sent-events/protocols/index.ts +26 -26
  160. package/src/server-sent-events/protocols/retrospective/index.ts +1 -1
  161. package/src/server-sent-events/protocols/retrospective/retrospective.sse-protocol.ts +92 -92
  162. package/src/server-sent-events/server-sent-events.manager.ts +73 -73
  163. package/src/types/draw.type.ts +173 -173
  164. package/src/types/enum/api-error.enum.ts +23 -23
  165. package/src/types/enum/beam.enum.ts +24 -0
  166. package/src/types/enum/board-activity.enum.ts +189 -189
  167. package/src/types/enum/board-column-type.enum.ts +6 -6
  168. package/src/types/enum/combine-strategy.enum.ts +7 -0
  169. package/src/types/enum/content-share.enum.ts +38 -36
  170. package/src/types/enum/document-type.enum.ts +10 -0
  171. package/src/types/enum/extraction-feedback-issue-type.enum.ts +10 -0
  172. package/src/types/enum/extraction-warning.enum.ts +21 -0
  173. package/src/types/enum/index.ts +13 -6
  174. package/src/types/enum/interpreter-kind.enum.ts +7 -0
  175. package/src/types/enum/pdf-operation.enum.ts +98 -98
  176. package/src/types/enum/provider-kind.enum.ts +13 -0
  177. package/src/types/enum/rcb-bank.enum.ts +137 -137
  178. package/src/types/index.ts +5 -5
  179. package/src/types/interface/api/index.ts +5 -5
  180. package/src/types/interface/api/requests/abyss.admin.request.ts +20 -20
  181. package/src/types/interface/api/requests/atlas-document.request.ts +32 -32
  182. package/src/types/interface/api/requests/atlas-group.request.ts +45 -45
  183. package/src/types/interface/api/requests/atlas-page.request.ts +84 -84
  184. package/src/types/interface/api/requests/atlas.public.request.ts +21 -21
  185. package/src/types/interface/api/requests/atlas.request.ts +52 -52
  186. package/src/types/interface/api/requests/beam.request.ts +152 -0
  187. package/src/types/interface/api/requests/board-card-checklist.request.ts +61 -61
  188. package/src/types/interface/api/requests/board-card-comment.request.ts +28 -28
  189. package/src/types/interface/api/requests/board-card-document.request.ts +29 -29
  190. package/src/types/interface/api/requests/board-card.request.ts +86 -86
  191. package/src/types/interface/api/requests/board-column.request.ts +30 -30
  192. package/src/types/interface/api/requests/board-label.request.ts +42 -42
  193. package/src/types/interface/api/requests/board.request.ts +61 -61
  194. package/src/types/interface/api/requests/draw.public.request.ts +20 -20
  195. package/src/types/interface/api/requests/draw.request.ts +49 -49
  196. package/src/types/interface/api/requests/extraction.request.ts +366 -0
  197. package/src/types/interface/api/requests/index.ts +29 -28
  198. package/src/types/interface/api/requests/memo.request.ts +49 -49
  199. package/src/types/interface/api/requests/metrics.request.ts +7 -7
  200. package/src/types/interface/api/requests/retrospective-card.request.ts +38 -38
  201. package/src/types/interface/api/requests/retrospective-member.request.ts +20 -20
  202. package/src/types/interface/api/requests/retrospective-section.request.ts +43 -43
  203. package/src/types/interface/api/requests/retrospective.public.request.ts +84 -84
  204. package/src/types/interface/api/requests/retrospective.request.ts +59 -59
  205. package/src/types/interface/api/requests/short-link.admin.request.ts +35 -35
  206. package/src/types/interface/api/requests/short-link.public.request.ts +40 -40
  207. package/src/types/interface/api/requests/short-link.request.ts +71 -71
  208. package/src/types/interface/api/requests/tag.request.ts +54 -54
  209. package/src/types/interface/api/requests/transfer.request.ts +3 -3
  210. package/src/types/interface/api/responses/abyss.admin.response.ts +28 -28
  211. package/src/types/interface/api/responses/atlas-document.response.ts +24 -24
  212. package/src/types/interface/api/responses/atlas-group.response.ts +23 -23
  213. package/src/types/interface/api/responses/atlas-page.response.ts +53 -53
  214. package/src/types/interface/api/responses/atlas.public.response.ts +21 -21
  215. package/src/types/interface/api/responses/atlas.response.ts +32 -32
  216. package/src/types/interface/api/responses/beam.response.ts +122 -0
  217. package/src/types/interface/api/responses/board-card-checklist.response.ts +31 -31
  218. package/src/types/interface/api/responses/board-card-comment.response.ts +20 -20
  219. package/src/types/interface/api/responses/board-card-document.response.ts +21 -21
  220. package/src/types/interface/api/responses/board-card.response.ts +55 -55
  221. package/src/types/interface/api/responses/board-column.response.ts +20 -20
  222. package/src/types/interface/api/responses/board-label.response.ts +31 -31
  223. package/src/types/interface/api/responses/board.response.ts +81 -81
  224. package/src/types/interface/api/responses/count.response.ts +9 -9
  225. package/src/types/interface/api/responses/draw.public.response.ts +22 -22
  226. package/src/types/interface/api/responses/draw.response.ts +32 -32
  227. package/src/types/interface/api/responses/enriched-paginate.response.ts +11 -11
  228. package/src/types/interface/api/responses/extraction.response.ts +454 -0
  229. package/src/types/interface/api/responses/index.ts +33 -32
  230. package/src/types/interface/api/responses/memo.response.ts +32 -32
  231. package/src/types/interface/api/responses/metrics.response.ts +22 -22
  232. package/src/types/interface/api/responses/monitor.response.ts +8 -8
  233. package/src/types/interface/api/responses/recent.response.ts +18 -18
  234. package/src/types/interface/api/responses/retrospective-card.response.ts +23 -23
  235. package/src/types/interface/api/responses/retrospective-member.response.ts +22 -22
  236. package/src/types/interface/api/responses/retrospective-section.response.ts +23 -23
  237. package/src/types/interface/api/responses/retrospective.public.response.ts +57 -57
  238. package/src/types/interface/api/responses/retrospective.response.ts +32 -32
  239. package/src/types/interface/api/responses/short-link.admin.response.ts +21 -21
  240. package/src/types/interface/api/responses/short-link.public.response.ts +26 -26
  241. package/src/types/interface/api/responses/short-link.response.ts +38 -38
  242. package/src/types/interface/api/responses/tag.response.ts +38 -38
  243. package/src/types/interface/api/responses/transfer.response.ts +14 -14
  244. package/src/types/interface/api/type-message/api-error.ts +7 -7
  245. package/src/types/interface/api/type-message/base-paginate.ts +11 -11
  246. package/src/types/interface/api/type-message/response.ts +6 -6
  247. package/src/types/interface/index.ts +2 -2
  248. package/src/types/interface/models/atlas-document.dto.ts +22 -22
  249. package/src/types/interface/models/atlas-group.dto.ts +21 -21
  250. package/src/types/interface/models/atlas-page-content.dto.ts +17 -17
  251. package/src/types/interface/models/atlas-page.dto.ts +26 -26
  252. package/src/types/interface/models/atlas.dto.ts +34 -34
  253. package/src/types/interface/models/beam.dto.ts +67 -0
  254. package/src/types/interface/models/board-activity.dto.ts +20 -20
  255. package/src/types/interface/models/board-card-checklist-row.dto.ts +14 -14
  256. package/src/types/interface/models/board-card-checklist.dto.ts +16 -16
  257. package/src/types/interface/models/board-card-comment.dto.ts +15 -15
  258. package/src/types/interface/models/board-card-document.dto.ts +22 -22
  259. package/src/types/interface/models/board-card-label.dto.ts +14 -14
  260. package/src/types/interface/models/board-card-member.dto.ts +14 -14
  261. package/src/types/interface/models/board-card.dto.ts +37 -37
  262. package/src/types/interface/models/board-column.dto.ts +17 -17
  263. package/src/types/interface/models/board-label.dto.ts +13 -13
  264. package/src/types/interface/models/board.dto.ts +33 -33
  265. package/src/types/interface/models/content-share.dto.ts +16 -16
  266. package/src/types/interface/models/draw.dto.ts +30 -30
  267. package/src/types/interface/models/extraction-fetched-provenance.dto.test.ts +193 -0
  268. package/src/types/interface/models/extraction-plan.dto.test.ts +47 -0
  269. package/src/types/interface/models/extraction-plan.dto.ts +241 -0
  270. package/src/types/interface/models/extraction-spatial-template.dto.test.ts +27 -0
  271. package/src/types/interface/models/extraction-spatial-template.dto.ts +48 -0
  272. package/src/types/interface/models/{rcb.dto.ts → extraction.dto.ts} +317 -267
  273. package/src/types/interface/models/index.ts +34 -31
  274. package/src/types/interface/models/memo.dto.ts +23 -23
  275. package/src/types/interface/models/organization.dto.ts +21 -12
  276. package/src/types/interface/models/project.dto.ts +25 -25
  277. package/src/types/interface/models/retrospective-card.dto.ts +17 -17
  278. package/src/types/interface/models/retrospective-member.dto.ts +15 -15
  279. package/src/types/interface/models/retrospective-section.dto.ts +16 -16
  280. package/src/types/interface/models/retrospective.dto.ts +32 -32
  281. package/src/types/interface/models/short-link-click.dto.ts +33 -33
  282. package/src/types/interface/models/short-link.dto.ts +49 -49
  283. package/src/types/interface/models/tag.dto.ts +26 -26
  284. package/src/types/interface/models/team.dto.ts +12 -12
  285. package/src/types/interface/models/user.dto.ts +26 -26
  286. package/src/types/tests/beam-management-types.spec.ts +38 -0
  287. package/src/types/tests/beam-share-enums.spec.ts +11 -0
  288. package/src/types/tests/beam.dto.spec.ts +61 -0
  289. package/src/types/tests/beam.request-response.spec.ts +43 -0
  290. package/src/utils/board.utils.ts +57 -57
  291. package/src/utils/enum.utils.ts +5 -5
  292. package/src/utils/error.utils.ts +30 -30
  293. package/src/utils/{rcb-webhook.utils.ts → extraction-webhook.utils.ts} +30 -30
  294. package/src/utils/icons.utils.ts +96 -96
  295. package/src/utils/index.ts +6 -6
  296. package/src/utils/shape.utils.ts +292 -292
  297. package/tsconfig.json +36 -35
  298. package/dist/api/atlas-page-content.api.d.ts +0 -0
  299. package/dist/api/atlas-page-content.api.js +0 -2
  300. package/dist/api/atlas-page-content.api.js.map +0 -1
  301. package/dist/api/pdf.api.d.ts +0 -15
  302. package/dist/api/pdf.api.js +0 -61
  303. package/dist/api/pdf.api.js.map +0 -1
  304. package/dist/api/pdf.public.api.d.ts +0 -8
  305. package/dist/api/pdf.public.api.js +0 -33
  306. package/dist/api/pdf.public.api.js.map +0 -1
  307. package/dist/api/rcb.api.d.ts +0 -72
  308. package/dist/api/rcb.api.js +0 -400
  309. package/dist/api/rcb.api.js.map +0 -1
  310. package/dist/api/user-tag.api.d.ts +0 -9
  311. package/dist/api/user-tag.api.js +0 -37
  312. package/dist/api/user-tag.api.js.map +0 -1
  313. package/dist/constants/user-tag.constants.d.ts +0 -3
  314. package/dist/constants/user-tag.constants.js +0 -7
  315. package/dist/constants/user-tag.constants.js.map +0 -1
  316. package/dist/types/enum/pdf-session.enum.d.ts +0 -10
  317. package/dist/types/enum/pdf-session.enum.js +0 -16
  318. package/dist/types/enum/pdf-session.enum.js.map +0 -1
  319. package/dist/types/interface/api/requests/pdf.public.request.d.ts +0 -19
  320. package/dist/types/interface/api/requests/pdf.public.request.js.map +0 -1
  321. package/dist/types/interface/api/requests/pdf.request.d.ts +0 -50
  322. package/dist/types/interface/api/requests/pdf.request.js.map +0 -1
  323. package/dist/types/interface/api/requests/rcb.request.js.map +0 -1
  324. package/dist/types/interface/api/requests/user-tag.request.d.ts +0 -44
  325. package/dist/types/interface/api/requests/user-tag.request.js.map +0 -1
  326. package/dist/types/interface/api/responses/pdf.public.response.d.ts +0 -33
  327. package/dist/types/interface/api/responses/pdf.public.response.js +0 -3
  328. package/dist/types/interface/api/responses/pdf.public.response.js.map +0 -1
  329. package/dist/types/interface/api/responses/pdf.response.d.ts +0 -35
  330. package/dist/types/interface/api/responses/pdf.response.js.map +0 -1
  331. package/dist/types/interface/api/responses/rcb.response.d.ts +0 -376
  332. package/dist/types/interface/api/responses/rcb.response.js.map +0 -1
  333. package/dist/types/interface/api/responses/user-tag.response.d.ts +0 -32
  334. package/dist/types/interface/api/responses/user-tag.response.js +0 -3
  335. package/dist/types/interface/api/responses/user-tag.response.js.map +0 -1
  336. package/dist/types/interface/models/pdf-session.dto.d.ts +0 -28
  337. package/dist/types/interface/models/pdf-session.dto.js +0 -3
  338. package/dist/types/interface/models/pdf-session.dto.js.map +0 -1
  339. package/dist/types/interface/models/rcb.dto.js +0 -26
  340. package/dist/types/interface/models/rcb.dto.js.map +0 -1
  341. package/dist/types/interface/models/user-tag.dto.d.ts +0 -22
  342. package/dist/types/interface/models/user-tag.dto.js +0 -3
  343. package/dist/types/interface/models/user-tag.dto.js.map +0 -1
  344. package/dist/utils/rcb-webhook.utils.js.map +0 -1
  345. package/src/api/rcb.api.ts +0 -829
  346. package/src/types/interface/api/requests/rcb.request.ts +0 -267
  347. package/src/types/interface/api/responses/rcb.response.ts +0 -399
package/src/index.ts CHANGED
@@ -1,747 +1,840 @@
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 organizationApi from './api/organization.api';
29
- import * as tagApi from './api/tag.api';
30
- import * as rcbApi from './api/rcb.api';
31
- import * as monitorApi from './api/monitor.api';
32
-
33
- export * from './api';
34
- export * from './types';
35
- export * from './utils';
36
- export * from './constants';
37
- export * from './server-sent-events';
38
-
39
- const DEFAULT_BASE_URL = 'https://tools-api.abyss-project.fr/api/';
40
-
41
- export const API_KEY_HEADER = 'abyss-tools-api-key';
42
- export const ADMIN_TOKEN_HEADER = 'abyss-admin-token';
43
-
44
- const NUMBER_RETRY_API = 10;
45
- const BASE_DELAY_BETWEEN_RETRY = 5000;
46
- const RETRY_CODES = [
47
- 502, // Bad Gateway
48
- 503, // Service Unavailable
49
- ];
50
-
51
- type CoreConfig = {
52
- token?: string;
53
- apiKey?: string;
54
- adminToken?: string;
55
- baseURL?: string;
56
- };
57
-
58
- type AbyssToolsCoreSDK = {
59
- abyss: {
60
- admin: {
61
- activateUserService: typeof abyssAdminApi.activateUserServiceAbyssAdmin;
62
- syncOrganization: typeof abyssAdminApi.syncOrganizationAbyssAdmin;
63
- syncProject: typeof abyssAdminApi.syncProjectAbyssAdmin;
64
- getProjectContentSummary: typeof abyssAdminApi.getProjectContentSummary;
65
- };
66
- };
67
- board: {
68
- get: typeof boardApi.getBoard;
69
- getBySlug: typeof boardApi.getBySlugBoard;
70
- list: typeof boardApi.listBoard;
71
- listProject: typeof boardApi.listBoardProject;
72
- listOrganization: typeof boardApi.listBoardOrganization;
73
- paginateOrganization: typeof boardApi.paginateOrganizationBoard;
74
- delete: typeof boardApi.deleteBoard;
75
- update: typeof boardApi.updateBoard;
76
- create: typeof boardApi.createBoard;
77
- createForOrganization: typeof boardApi.createForOrganizationBoard;
78
- getNextCardPreview: typeof boardApi.getNextCardPreviewBoard;
79
- transfer: typeof boardApi.transferBoard;
80
- countOrganization: typeof boardApi.countOrganizationBoard;
81
- };
82
- boardColumn: {
83
- get: typeof boardColumnApi.getBoardColumn;
84
- delete: typeof boardColumnApi.deleteBoardColumn;
85
- update: typeof boardColumnApi.updateBoardColumn;
86
- create: typeof boardColumnApi.createBoardColumn;
87
- };
88
- boardCard: {
89
- get: typeof boardCardApi.getBoardCard;
90
- getAll: typeof boardCardApi.getAllBoardCard;
91
- delete: typeof boardCardApi.deleteBoardCard;
92
- update: typeof boardCardApi.updateBoardCard;
93
- restore: typeof boardCardApi.restoreBoardCard;
94
- create: typeof boardCardApi.createBoardCard;
95
- addMember: typeof boardCardApi.addMemberBoardCard;
96
- removeMember: typeof boardCardApi.removeMemberBoardCard;
97
- moveToBoard: typeof boardCardApi.moveToBoardBoardCard;
98
- search: typeof boardCardApi.searchBoardCard;
99
- };
100
- boardLabel: {
101
- get: typeof boardLabelApi.getBoardLabel;
102
- delete: typeof boardLabelApi.deleteBoardLabel;
103
- update: typeof boardLabelApi.updateBoardLabel;
104
- create: typeof boardLabelApi.createBoardLabel;
105
- add: typeof boardLabelApi.addBoardLabel;
106
- remove: typeof boardLabelApi.removeBoardLabel;
107
- list: typeof boardLabelApi.listBoardLabels;
108
- };
109
- boardCardComment: {
110
- get: typeof boardCardCommentApi.getBoardCardComment;
111
- delete: typeof boardCardCommentApi.deleteBoardCardComment;
112
- update: typeof boardCardCommentApi.updateBoardCardComment;
113
- create: typeof boardCardCommentApi.createBoardCardComment;
114
- };
115
- boardCardChecklist: {
116
- get: typeof boardCardChecklistApi.getBoardCardChecklist;
117
- delete: typeof boardCardChecklistApi.deleteBoardCardChecklist;
118
- update: typeof boardCardChecklistApi.updateBoardCardChecklist;
119
- create: typeof boardCardChecklistApi.createBoardCardChecklist;
120
- addRow: typeof boardCardChecklistApi.addRowBoardCardChecklist;
121
- removeRow: typeof boardCardChecklistApi.removeRowBoardCardChecklist;
122
- updateRow: typeof boardCardChecklistApi.updateRowBoardCardChecklist;
123
- };
124
- boardCardDocument: {
125
- get: typeof boardCardDocumentApi.getBoardCardDocument;
126
- delete: typeof boardCardDocumentApi.deleteBoardCardDocument;
127
- getUploadPreSignedUrl: typeof boardCardDocumentApi.getUploadPreSignedUrlBoardCardDocument;
128
- cloudImport: typeof boardCardDocumentApi.cloudImportBoardCardDocument;
129
- };
130
- draw: {
131
- paginate: typeof drawApi.paginateDraw;
132
- paginateProject: typeof drawApi.paginateProjectDraw;
133
- paginateOrganization: typeof drawApi.paginateOrganizationDraw;
134
- get: typeof drawApi.getDraw;
135
- delete: typeof drawApi.deleteDraw;
136
- update: typeof drawApi.updateDraw;
137
- create: typeof drawApi.createDraw;
138
- createForOrganization: typeof drawApi.createForOrganizationDraw;
139
- transfer: typeof drawApi.transferDraw;
140
- countOrganization: typeof drawApi.countOrganizationDraw;
141
- public: {
142
- get: typeof drawPublicApi.getDrawPublic;
143
- delete: typeof drawPublicApi.deleteDrawPublic;
144
- update: typeof drawPublicApi.updateDrawPublic;
145
- create: typeof drawPublicApi.createDrawPublic;
146
- };
147
- };
148
- retrospective: {
149
- get: typeof retrospectiveApi.getRetrospective;
150
- paginateProject: typeof retrospectiveApi.paginateProjectRetrospective;
151
- paginateOrganization: typeof retrospectiveApi.paginateOrganizationRetrospective;
152
- paginate: typeof retrospectiveApi.paginateRetrospective;
153
- create: typeof retrospectiveApi.createRetrospective;
154
- createForOrganization: typeof retrospectiveApi.createForOrganizationRetrospective;
155
- update: typeof retrospectiveApi.updateRetrospective;
156
- delete: typeof retrospectiveApi.deleteRetrospective;
157
- transfer: typeof retrospectiveApi.transferRetrospective;
158
- countOrganization: typeof retrospectiveApi.countOrganizationRetrospective;
159
- public: {
160
- get: typeof retrospectivePublicApi.getRetrospectivePublic;
161
- update: typeof retrospectivePublicApi.updateRetrospectivePublic;
162
- createSection: typeof retrospectivePublicApi.createSectionRetrospectivePublic;
163
- updateSection: typeof retrospectivePublicApi.updateSectionRetrospectivePublic;
164
- deleteSection: typeof retrospectivePublicApi.deleteSectionRetrospectivePublic;
165
- joinMember: typeof retrospectivePublicApi.joinMemberRetrospectivePublic;
166
- updateMember: typeof retrospectivePublicApi.updateMemberRetrospectivePublic;
167
- createCard: typeof retrospectivePublicApi.createCardRetrospectivePublic;
168
- updateCard: typeof retrospectivePublicApi.updateCardRetrospectivePublic;
169
- deleteCard: typeof retrospectivePublicApi.deleteCardRetrospectivePublic;
170
- };
171
- };
172
- retrospectiveCard: {
173
- get: typeof retrospectiveCardApi.getRetrospectiveCard;
174
- paginate: typeof retrospectiveCardApi.paginateRetrospectiveCard;
175
- create: typeof retrospectiveCardApi.createRetrospectiveCard;
176
- update: typeof retrospectiveCardApi.updateRetrospectiveCard;
177
- delete: typeof retrospectiveCardApi.deleteRetrospectiveCard;
178
- };
179
- retrospectiveMember: {
180
- get: typeof retrospectiveMemberApi.getRetrospectiveMember;
181
- list: typeof retrospectiveMemberApi.listRetrospectiveMember;
182
- join: typeof retrospectiveMemberApi.joinRetrospectiveMember;
183
- update: typeof retrospectiveMemberApi.updateRetrospectiveMember;
184
- };
185
- retrospectiveSection: {
186
- get: typeof retrospectiveSectionApi.getRetrospectiveSection;
187
- paginate: typeof retrospectiveSectionApi.paginateRetrospectiveSection;
188
- create: typeof retrospectiveSectionApi.createRetrospectiveSection;
189
- update: typeof retrospectiveSectionApi.updateRetrospectiveSection;
190
- delete: typeof retrospectiveSectionApi.deleteRetrospectiveSection;
191
- };
192
- atlas: {
193
- paginate: typeof atlasApi.paginateAtlas;
194
- paginateProject: typeof atlasApi.paginateProjectAtlas;
195
- paginateOrganization: typeof atlasApi.paginateOrganizationAtlas;
196
- get: typeof atlasApi.getAtlas;
197
- delete: typeof atlasApi.deleteAtlas;
198
- update: typeof atlasApi.updateAtlas;
199
- create: typeof atlasApi.createAtlas;
200
- createForOrganization: typeof atlasApi.createForOrganizationAtlas;
201
- transfer: typeof atlasApi.transferAtlas;
202
- countOrganization: typeof atlasApi.countOrganizationAtlas;
203
- public: {
204
- get: typeof atlasPublicApi.getAtlasPublic;
205
- getPage: typeof atlasPublicApi.getPageAtlasPublic;
206
- searchContent: typeof atlasPublicApi.searchContentAtlasPublic;
207
- };
208
- };
209
- atlasGroup: {
210
- paginate: typeof atlasGroupApi.paginateAtlasGroup;
211
- get: typeof atlasGroupApi.getAtlasGroup;
212
- delete: typeof atlasGroupApi.deleteAtlasGroup;
213
- update: typeof atlasGroupApi.updateAtlasGroup;
214
- create: typeof atlasGroupApi.createAtlasGroup;
215
- };
216
- atlasPage: {
217
- paginate: typeof atlasPageApi.paginateAtlasPage;
218
- get: typeof atlasPageApi.getAtlasPage;
219
- delete: typeof atlasPageApi.deleteAtlasPage;
220
- update: typeof atlasPageApi.updateAtlasPage;
221
- create: typeof atlasPageApi.createAtlasPage;
222
- updateContent: typeof atlasPageApi.updateAtlasPageContent;
223
- searchContent: typeof atlasPageApi.searchAtlasContent;
224
- getContentHistory: typeof atlasPageApi.getAtlasPageContentHistory;
225
- restoreContent: typeof atlasPageApi.restoreAtlasPageContent;
226
- };
227
- atlasDocument: {
228
- get: typeof atlasDocumentApi.getAtlasDocument;
229
- delete: typeof atlasDocumentApi.deleteAtlasDocument;
230
- getUploadPreSignedUrl: typeof atlasDocumentApi.getUploadPreSignedUrlAtlasDocument;
231
- paginate: typeof atlasDocumentApi.paginateAtlasDocument;
232
- list: typeof atlasDocumentApi.listAtlasDocument;
233
- };
234
- memo: {
235
- paginate: typeof memoApi.paginateMemo;
236
- paginateProject: typeof memoApi.paginateProjectMemo;
237
- paginateOrganization: typeof memoApi.paginateOrganizationMemo;
238
- get: typeof memoApi.getMemo;
239
- delete: typeof memoApi.deleteMemo;
240
- update: typeof memoApi.updateMemo;
241
- create: typeof memoApi.createMemo;
242
- createForOrganization: typeof memoApi.createForOrganizationMemo;
243
- transfer: typeof memoApi.transferMemo;
244
- countOrganization: typeof memoApi.countOrganizationMemo;
245
- };
246
- shortLink: {
247
- get: typeof shortLinkApiModule.shortLinkApi.get;
248
- paginate: typeof shortLinkApiModule.shortLinkApi.paginate;
249
- paginateProject: typeof shortLinkApiModule.shortLinkApi.paginateProject;
250
- paginateOrganization: typeof shortLinkApiModule.shortLinkApi.paginateOrganization;
251
- create: typeof shortLinkApiModule.shortLinkApi.create;
252
- createForOrganization: typeof shortLinkApiModule.shortLinkApi.createForOrganization;
253
- update: typeof shortLinkApiModule.shortLinkApi.update;
254
- delete: typeof shortLinkApiModule.shortLinkApi.delete;
255
- getStats: typeof shortLinkApiModule.shortLinkApi.getStats;
256
- getClicks: typeof shortLinkApiModule.shortLinkApi.getClicks;
257
- transfer: typeof shortLinkApiModule.shortLinkApi.transfer;
258
- countOrganization: typeof shortLinkApiModule.shortLinkApi.countOrganization;
259
- admin: {
260
- paginate: typeof shortLinkAdminApiModule.shortLinkAdminApi.paginate;
261
- get: typeof shortLinkAdminApiModule.shortLinkAdminApi.get;
262
- update: typeof shortLinkAdminApiModule.shortLinkAdminApi.update;
263
- delete: typeof shortLinkAdminApiModule.shortLinkAdminApi.delete;
264
- };
265
- public: {
266
- createAnonymous: typeof shortLinkPublicApiModule.shortLinkPublicApi.createAnonymous;
267
- redirect: typeof shortLinkPublicApiModule.shortLinkPublicApi.redirect;
268
- getStats: typeof shortLinkPublicApiModule.shortLinkPublicApi.getStats;
269
- getClicks: typeof shortLinkPublicApiModule.shortLinkPublicApi.getClicks;
270
- renew: typeof shortLinkPublicApiModule.shortLinkPublicApi.renew;
271
- };
272
- };
273
- metrics: {
274
- getOrganizationTools: typeof metricsApi.getOrganizationToolsMetrics;
275
- getProjectTools: typeof metricsApi.getProjectToolsMetrics;
276
- };
277
- monitor: {
278
- up: typeof monitorApi.upMonitor;
279
- };
280
- tag: {
281
- list: typeof tagApi.listTag;
282
- create: typeof tagApi.createTag;
283
- update: typeof tagApi.updateTag;
284
- delete: typeof tagApi.deleteTag;
285
- assign: typeof tagApi.assignTag;
286
- unassign: typeof tagApi.unassignTag;
287
- getStats: typeof tagApi.getTagStats;
288
- getEntityTags: typeof tagApi.getEntityTags;
289
- };
290
- organization: {
291
- recent: typeof organizationApi.recentOrganization;
292
- };
293
- rcb: {
294
- health: typeof rcbApi.healthRcb;
295
- stats: typeof rcbApi.statsRcb;
296
- changelog: typeof rcbApi.changelogRcb;
297
- /** Direct aliases kept for back-compat with existing front-v2 code. */
298
- detect: typeof rcbApi.detectRcb;
299
- quota: typeof rcbApi.getQuotaRcb;
300
- extract: {
301
- sync: typeof rcbApi.extractSyncRcb;
302
- queue: typeof rcbApi.extractQueueRcb;
303
- bulk: typeof rcbApi.extractBulkRcb;
304
- detect: typeof rcbApi.detectRcb;
305
- detectBulk: typeof rcbApi.detectBulkRcb;
306
- };
307
- files: {
308
- list: typeof rcbApi.listFilesRcb;
309
- listShared: typeof rcbApi.listSharedFilesRcb;
310
- get: typeof rcbApi.getFileRcb;
311
- patch: typeof rcbApi.patchFileRcb;
312
- listExtractions: typeof rcbApi.listFileExtractionsRcb;
313
- downloadBundle: typeof rcbApi.downloadFileBundleRcb;
314
- };
315
- extractions: {
316
- get: typeof rcbApi.getExtractionRcb;
317
- patch: typeof rcbApi.patchExtractionRcb;
318
- searchRecords: typeof rcbApi.searchExtractionRecordsRcb;
319
- export: typeof rcbApi.exportExtractionRcb;
320
- asyncExport: typeof rcbApi.asyncExportExtractionRcb;
321
- getExportJob: typeof rcbApi.getExportJobRcb;
322
- diff: typeof rcbApi.diffExtractionsRcb;
323
- };
324
- templates: {
325
- list: typeof rcbApi.listTemplatesRcb;
326
- get: typeof rcbApi.getTemplateRcb;
327
- create: typeof rcbApi.createTemplateRcb;
328
- update: typeof rcbApi.updateTemplateRcb;
329
- patchMeta: typeof rcbApi.patchTemplateMetaRcb;
330
- delete: typeof rcbApi.deleteTemplateRcb;
331
- listVersions: typeof rcbApi.listTemplateVersionsRcb;
332
- exportCollection: typeof rcbApi.exportTemplateCollectionRcb;
333
- importCollection: typeof rcbApi.importTemplateCollectionRcb;
334
- };
335
- jobs: {
336
- get: typeof rcbApi.getJobRcb;
337
- retry: typeof rcbApi.retryJobRcb;
338
- cancel: typeof rcbApi.cancelJobRcb;
339
- };
340
- feedback: {
341
- submit: typeof rcbApi.submitFeedbackRcb;
342
- list: typeof rcbApi.listFeedbackRcb;
343
- get: typeof rcbApi.getFeedbackRcb;
344
- patch: typeof rcbApi.patchFeedbackRcb;
345
- };
346
- usage: {
347
- list: typeof rcbApi.listUsageRcb;
348
- summary: typeof rcbApi.summaryUsageRcb;
349
- quota: typeof rcbApi.getQuotaRcb;
350
- };
351
- share: {
352
- mint: typeof rcbApi.mintShareExtractionRcb;
353
- revoke: typeof rcbApi.revokeShareExtractionRcb;
354
- public: { get: typeof rcbApi.getSharedExtractionRcbPublic };
355
- };
356
- // Webhook delivery history (existing).
357
- webhookDeliveries: {
358
- list: typeof rcbApi.listWebhookDeliveriesRcb;
359
- get: typeof rcbApi.getWebhookDeliveryRcb;
360
- replay: typeof rcbApi.replayWebhookDeliveryRcb;
361
- };
362
- // Webhook subscriptions (NEW — managed registrations).
363
- webhook: {
364
- paginate: typeof rcbApi.paginateRcbWebhook;
365
- get: typeof rcbApi.getRcbWebhook;
366
- create: typeof rcbApi.createRcbWebhook;
367
- update: typeof rcbApi.updateRcbWebhook;
368
- delete: typeof rcbApi.deleteRcbWebhook;
369
- resetSecret: typeof rcbApi.resetSecretRcbWebhook;
370
- };
371
- };
372
- };
373
-
374
- export class AbyssToolsCore {
375
- private static config = {
376
- token: '',
377
- apiKey: '',
378
- adminToken: '',
379
- baseURL: DEFAULT_BASE_URL,
380
- };
381
- static axios = axios.create({
382
- baseURL: this.config.baseURL,
383
- withCredentials: true,
384
- });
385
-
386
- private static _sdk: AbyssToolsCoreSDK | null = null;
387
-
388
- public static get sdk(): AbyssToolsCoreSDK {
389
- if (!AbyssToolsCore._sdk) {
390
- AbyssToolsCore._sdk = AbyssToolsCore.buildSDK();
391
- }
392
- return AbyssToolsCore._sdk;
393
- }
394
-
395
- private static buildSDK(): AbyssToolsCoreSDK {
396
- return {
397
- abyss: {
398
- admin: {
399
- activateUserService: abyssAdminApi.activateUserServiceAbyssAdmin,
400
- syncOrganization: abyssAdminApi.syncOrganizationAbyssAdmin,
401
- syncProject: abyssAdminApi.syncProjectAbyssAdmin,
402
- getProjectContentSummary: abyssAdminApi.getProjectContentSummary,
403
- },
404
- },
405
- board: {
406
- get: boardApi.getBoard,
407
- getBySlug: boardApi.getBySlugBoard,
408
- list: boardApi.listBoard,
409
- listProject: boardApi.listBoardProject,
410
- listOrganization: boardApi.listBoardOrganization,
411
- paginateOrganization: boardApi.paginateOrganizationBoard,
412
- delete: boardApi.deleteBoard,
413
- update: boardApi.updateBoard,
414
- create: boardApi.createBoard,
415
- createForOrganization: boardApi.createForOrganizationBoard,
416
- getNextCardPreview: boardApi.getNextCardPreviewBoard,
417
- transfer: boardApi.transferBoard,
418
- countOrganization: boardApi.countOrganizationBoard,
419
- },
420
- boardColumn: {
421
- get: boardColumnApi.getBoardColumn,
422
- delete: boardColumnApi.deleteBoardColumn,
423
- update: boardColumnApi.updateBoardColumn,
424
- create: boardColumnApi.createBoardColumn,
425
- },
426
- boardCard: {
427
- get: boardCardApi.getBoardCard,
428
- getAll: boardCardApi.getAllBoardCard,
429
- delete: boardCardApi.deleteBoardCard,
430
- update: boardCardApi.updateBoardCard,
431
- restore: boardCardApi.restoreBoardCard,
432
- create: boardCardApi.createBoardCard,
433
- addMember: boardCardApi.addMemberBoardCard,
434
- removeMember: boardCardApi.removeMemberBoardCard,
435
- moveToBoard: boardCardApi.moveToBoardBoardCard,
436
- search: boardCardApi.searchBoardCard,
437
- },
438
- boardLabel: {
439
- get: boardLabelApi.getBoardLabel,
440
- delete: boardLabelApi.deleteBoardLabel,
441
- update: boardLabelApi.updateBoardLabel,
442
- create: boardLabelApi.createBoardLabel,
443
- add: boardLabelApi.addBoardLabel,
444
- remove: boardLabelApi.removeBoardLabel,
445
- list: boardLabelApi.listBoardLabels,
446
- },
447
- boardCardComment: {
448
- get: boardCardCommentApi.getBoardCardComment,
449
- delete: boardCardCommentApi.deleteBoardCardComment,
450
- update: boardCardCommentApi.updateBoardCardComment,
451
- create: boardCardCommentApi.createBoardCardComment,
452
- },
453
- boardCardChecklist: {
454
- get: boardCardChecklistApi.getBoardCardChecklist,
455
- delete: boardCardChecklistApi.deleteBoardCardChecklist,
456
- update: boardCardChecklistApi.updateBoardCardChecklist,
457
- create: boardCardChecklistApi.createBoardCardChecklist,
458
- addRow: boardCardChecklistApi.addRowBoardCardChecklist,
459
- removeRow: boardCardChecklistApi.removeRowBoardCardChecklist,
460
- updateRow: boardCardChecklistApi.updateRowBoardCardChecklist,
461
- },
462
- boardCardDocument: {
463
- get: boardCardDocumentApi.getBoardCardDocument,
464
- delete: boardCardDocumentApi.deleteBoardCardDocument,
465
- getUploadPreSignedUrl:
466
- boardCardDocumentApi.getUploadPreSignedUrlBoardCardDocument,
467
- cloudImport: boardCardDocumentApi.cloudImportBoardCardDocument,
468
- },
469
- draw: {
470
- paginate: drawApi.paginateDraw,
471
- paginateProject: drawApi.paginateProjectDraw,
472
- paginateOrganization: drawApi.paginateOrganizationDraw,
473
- get: drawApi.getDraw,
474
- delete: drawApi.deleteDraw,
475
- update: drawApi.updateDraw,
476
- create: drawApi.createDraw,
477
- createForOrganization: drawApi.createForOrganizationDraw,
478
- transfer: drawApi.transferDraw,
479
- countOrganization: drawApi.countOrganizationDraw,
480
- public: {
481
- get: drawPublicApi.getDrawPublic,
482
- delete: drawPublicApi.deleteDrawPublic,
483
- update: drawPublicApi.updateDrawPublic,
484
- create: drawPublicApi.createDrawPublic,
485
- },
486
- },
487
- retrospective: {
488
- get: retrospectiveApi.getRetrospective,
489
- paginateProject: retrospectiveApi.paginateProjectRetrospective,
490
- paginateOrganization: retrospectiveApi.paginateOrganizationRetrospective,
491
- paginate: retrospectiveApi.paginateRetrospective,
492
- create: retrospectiveApi.createRetrospective,
493
- createForOrganization: retrospectiveApi.createForOrganizationRetrospective,
494
- update: retrospectiveApi.updateRetrospective,
495
- delete: retrospectiveApi.deleteRetrospective,
496
- transfer: retrospectiveApi.transferRetrospective,
497
- countOrganization: retrospectiveApi.countOrganizationRetrospective,
498
- public: {
499
- get: retrospectivePublicApi.getRetrospectivePublic,
500
- update: retrospectivePublicApi.updateRetrospectivePublic,
501
- createSection: retrospectivePublicApi.createSectionRetrospectivePublic,
502
- updateSection: retrospectivePublicApi.updateSectionRetrospectivePublic,
503
- deleteSection: retrospectivePublicApi.deleteSectionRetrospectivePublic,
504
- joinMember: retrospectivePublicApi.joinMemberRetrospectivePublic,
505
- updateMember: retrospectivePublicApi.updateMemberRetrospectivePublic,
506
- createCard: retrospectivePublicApi.createCardRetrospectivePublic,
507
- updateCard: retrospectivePublicApi.updateCardRetrospectivePublic,
508
- deleteCard: retrospectivePublicApi.deleteCardRetrospectivePublic,
509
- },
510
- },
511
- retrospectiveCard: {
512
- get: retrospectiveCardApi.getRetrospectiveCard,
513
- paginate: retrospectiveCardApi.paginateRetrospectiveCard,
514
- create: retrospectiveCardApi.createRetrospectiveCard,
515
- update: retrospectiveCardApi.updateRetrospectiveCard,
516
- delete: retrospectiveCardApi.deleteRetrospectiveCard,
517
- },
518
- retrospectiveMember: {
519
- get: retrospectiveMemberApi.getRetrospectiveMember,
520
- list: retrospectiveMemberApi.listRetrospectiveMember,
521
- join: retrospectiveMemberApi.joinRetrospectiveMember,
522
- update: retrospectiveMemberApi.updateRetrospectiveMember,
523
- },
524
- retrospectiveSection: {
525
- get: retrospectiveSectionApi.getRetrospectiveSection,
526
- paginate: retrospectiveSectionApi.paginateRetrospectiveSection,
527
- create: retrospectiveSectionApi.createRetrospectiveSection,
528
- update: retrospectiveSectionApi.updateRetrospectiveSection,
529
- delete: retrospectiveSectionApi.deleteRetrospectiveSection,
530
- },
531
- atlas: {
532
- paginate: atlasApi.paginateAtlas,
533
- paginateProject: atlasApi.paginateProjectAtlas,
534
- paginateOrganization: atlasApi.paginateOrganizationAtlas,
535
- get: atlasApi.getAtlas,
536
- delete: atlasApi.deleteAtlas,
537
- update: atlasApi.updateAtlas,
538
- create: atlasApi.createAtlas,
539
- createForOrganization: atlasApi.createForOrganizationAtlas,
540
- transfer: atlasApi.transferAtlas,
541
- countOrganization: atlasApi.countOrganizationAtlas,
542
- public: {
543
- get: atlasPublicApi.getAtlasPublic,
544
- getPage: atlasPublicApi.getPageAtlasPublic,
545
- searchContent: atlasPublicApi.searchContentAtlasPublic,
546
- },
547
- },
548
- atlasGroup: {
549
- paginate: atlasGroupApi.paginateAtlasGroup,
550
- get: atlasGroupApi.getAtlasGroup,
551
- delete: atlasGroupApi.deleteAtlasGroup,
552
- update: atlasGroupApi.updateAtlasGroup,
553
- create: atlasGroupApi.createAtlasGroup,
554
- },
555
- atlasPage: {
556
- paginate: atlasPageApi.paginateAtlasPage,
557
- get: atlasPageApi.getAtlasPage,
558
- delete: atlasPageApi.deleteAtlasPage,
559
- update: atlasPageApi.updateAtlasPage,
560
- create: atlasPageApi.createAtlasPage,
561
- updateContent: atlasPageApi.updateAtlasPageContent,
562
- searchContent: atlasPageApi.searchAtlasContent,
563
- getContentHistory: atlasPageApi.getAtlasPageContentHistory,
564
- restoreContent: atlasPageApi.restoreAtlasPageContent,
565
- },
566
- atlasDocument: {
567
- get: atlasDocumentApi.getAtlasDocument,
568
- delete: atlasDocumentApi.deleteAtlasDocument,
569
- getUploadPreSignedUrl: atlasDocumentApi.getUploadPreSignedUrlAtlasDocument,
570
- paginate: atlasDocumentApi.paginateAtlasDocument,
571
- list: atlasDocumentApi.listAtlasDocument,
572
- },
573
- memo: {
574
- paginate: memoApi.paginateMemo,
575
- paginateProject: memoApi.paginateProjectMemo,
576
- paginateOrganization: memoApi.paginateOrganizationMemo,
577
- get: memoApi.getMemo,
578
- delete: memoApi.deleteMemo,
579
- update: memoApi.updateMemo,
580
- create: memoApi.createMemo,
581
- createForOrganization: memoApi.createForOrganizationMemo,
582
- transfer: memoApi.transferMemo,
583
- countOrganization: memoApi.countOrganizationMemo,
584
- },
585
- shortLink: {
586
- get: shortLinkApiModule.shortLinkApi.get,
587
- paginate: shortLinkApiModule.shortLinkApi.paginate,
588
- paginateProject: shortLinkApiModule.shortLinkApi.paginateProject,
589
- paginateOrganization: shortLinkApiModule.shortLinkApi.paginateOrganization,
590
- create: shortLinkApiModule.shortLinkApi.create,
591
- createForOrganization: shortLinkApiModule.shortLinkApi.createForOrganization,
592
- update: shortLinkApiModule.shortLinkApi.update,
593
- delete: shortLinkApiModule.shortLinkApi.delete,
594
- getStats: shortLinkApiModule.shortLinkApi.getStats,
595
- getClicks: shortLinkApiModule.shortLinkApi.getClicks,
596
- transfer: shortLinkApiModule.shortLinkApi.transfer,
597
- countOrganization: shortLinkApiModule.shortLinkApi.countOrganization,
598
- admin: {
599
- paginate: shortLinkAdminApiModule.shortLinkAdminApi.paginate,
600
- get: shortLinkAdminApiModule.shortLinkAdminApi.get,
601
- update: shortLinkAdminApiModule.shortLinkAdminApi.update,
602
- delete: shortLinkAdminApiModule.shortLinkAdminApi.delete,
603
- },
604
- public: {
605
- createAnonymous: shortLinkPublicApiModule.shortLinkPublicApi.createAnonymous,
606
- redirect: shortLinkPublicApiModule.shortLinkPublicApi.redirect,
607
- getStats: shortLinkPublicApiModule.shortLinkPublicApi.getStats,
608
- getClicks: shortLinkPublicApiModule.shortLinkPublicApi.getClicks,
609
- renew: shortLinkPublicApiModule.shortLinkPublicApi.renew,
610
- },
611
- },
612
- metrics: {
613
- getOrganizationTools: metricsApi.getOrganizationToolsMetrics,
614
- getProjectTools: metricsApi.getProjectToolsMetrics,
615
- },
616
- monitor: {
617
- up: monitorApi.upMonitor,
618
- },
619
- tag: {
620
- list: tagApi.listTag,
621
- create: tagApi.createTag,
622
- update: tagApi.updateTag,
623
- delete: tagApi.deleteTag,
624
- assign: tagApi.assignTag,
625
- unassign: tagApi.unassignTag,
626
- getStats: tagApi.getTagStats,
627
- getEntityTags: tagApi.getEntityTags,
628
- },
629
- organization: {
630
- recent: organizationApi.recentOrganization,
631
- },
632
- rcb: {
633
- health: rcbApi.healthRcb,
634
- stats: rcbApi.statsRcb,
635
- changelog: rcbApi.changelogRcb,
636
- detect: rcbApi.detectRcb,
637
- quota: rcbApi.getQuotaRcb,
638
- extract: {
639
- sync: rcbApi.extractSyncRcb,
640
- queue: rcbApi.extractQueueRcb,
641
- bulk: rcbApi.extractBulkRcb,
642
- detect: rcbApi.detectRcb,
643
- detectBulk: rcbApi.detectBulkRcb,
644
- },
645
- files: {
646
- list: rcbApi.listFilesRcb,
647
- listShared: rcbApi.listSharedFilesRcb,
648
- get: rcbApi.getFileRcb,
649
- patch: rcbApi.patchFileRcb,
650
- listExtractions: rcbApi.listFileExtractionsRcb,
651
- downloadBundle: rcbApi.downloadFileBundleRcb,
652
- },
653
- extractions: {
654
- get: rcbApi.getExtractionRcb,
655
- patch: rcbApi.patchExtractionRcb,
656
- searchRecords: rcbApi.searchExtractionRecordsRcb,
657
- export: rcbApi.exportExtractionRcb,
658
- asyncExport: rcbApi.asyncExportExtractionRcb,
659
- getExportJob: rcbApi.getExportJobRcb,
660
- diff: rcbApi.diffExtractionsRcb,
661
- },
662
- templates: {
663
- list: rcbApi.listTemplatesRcb,
664
- get: rcbApi.getTemplateRcb,
665
- create: rcbApi.createTemplateRcb,
666
- update: rcbApi.updateTemplateRcb,
667
- patchMeta: rcbApi.patchTemplateMetaRcb,
668
- delete: rcbApi.deleteTemplateRcb,
669
- listVersions: rcbApi.listTemplateVersionsRcb,
670
- exportCollection: rcbApi.exportTemplateCollectionRcb,
671
- importCollection: rcbApi.importTemplateCollectionRcb,
672
- },
673
- jobs: {
674
- get: rcbApi.getJobRcb,
675
- retry: rcbApi.retryJobRcb,
676
- cancel: rcbApi.cancelJobRcb,
677
- },
678
- feedback: {
679
- submit: rcbApi.submitFeedbackRcb,
680
- list: rcbApi.listFeedbackRcb,
681
- get: rcbApi.getFeedbackRcb,
682
- patch: rcbApi.patchFeedbackRcb,
683
- },
684
- usage: {
685
- list: rcbApi.listUsageRcb,
686
- summary: rcbApi.summaryUsageRcb,
687
- quota: rcbApi.getQuotaRcb,
688
- },
689
- share: {
690
- mint: rcbApi.mintShareExtractionRcb,
691
- revoke: rcbApi.revokeShareExtractionRcb,
692
- public: { get: rcbApi.getSharedExtractionRcbPublic },
693
- },
694
- webhookDeliveries: {
695
- list: rcbApi.listWebhookDeliveriesRcb,
696
- get: rcbApi.getWebhookDeliveryRcb,
697
- replay: rcbApi.replayWebhookDeliveryRcb,
698
- },
699
- webhook: {
700
- paginate: rcbApi.paginateRcbWebhook,
701
- get: rcbApi.getRcbWebhook,
702
- create: rcbApi.createRcbWebhook,
703
- update: rcbApi.updateRcbWebhook,
704
- delete: rcbApi.deleteRcbWebhook,
705
- resetSecret: rcbApi.resetSecretRcbWebhook,
706
- },
707
- },
708
- };
709
- }
710
-
711
- public static enableAxiosRetry(axiosRetryConfig?: IAxiosRetryConfig): void {
712
- axiosRetry(AbyssToolsCore.axios, {
713
- retries: NUMBER_RETRY_API,
714
- retryDelay: (retryCount) => retryCount * BASE_DELAY_BETWEEN_RETRY,
715
- retryCondition: (error) =>
716
- isNetworkOrIdempotentRequestError(error) ||
717
- RETRY_CODES.includes(error.response?.status || 502),
718
- ...axiosRetryConfig,
719
- });
720
- }
721
-
722
- public static setConfig(config: CoreConfig): void {
723
- AbyssToolsCore._sdk = null;
724
-
725
- AbyssToolsCore.config = { ...AbyssToolsCore.config, ...config };
726
-
727
- if (config.baseURL) {
728
- AbyssToolsCore.axios.defaults.baseURL = config.baseURL;
729
- }
730
-
731
- if (config.token) {
732
- AbyssToolsCore.axios.defaults.headers.common.Authorization = `Bearer ${config.token}`;
733
- }
734
-
735
- if (config.apiKey) {
736
- AbyssToolsCore.axios.defaults.headers.common[API_KEY_HEADER] = `${config.apiKey}`;
737
- }
738
-
739
- if (config.adminToken) {
740
- AbyssToolsCore.axios.defaults.headers.common[ADMIN_TOKEN_HEADER] = `${config.adminToken}`;
741
- }
742
- }
743
-
744
- public static getConfig(): CoreConfig {
745
- return AbyssToolsCore.config;
746
- }
747
- }
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 beamApiModule from './api/beam.api';
28
+ import * as metricsApi from './api/metrics.api';
29
+ import * as organizationApi from './api/organization.api';
30
+ import * as tagApi from './api/tag.api';
31
+ import * as extractionApi from './api/extraction.api';
32
+ import * as extractionSettingsApi from './api/extraction-settings.api';
33
+ import * as extractionPlanPresetApi from './api/extraction-plan-preset.api';
34
+ import * as monitorApi from './api/monitor.api';
35
+
36
+ export * from './api';
37
+ export * from './types';
38
+ export * from './utils';
39
+ export * from './constants';
40
+ export * from './server-sent-events';
41
+
42
+ const DEFAULT_BASE_URL = 'https://tools-api.abyss-project.fr/api/';
43
+
44
+ export const API_KEY_HEADER = 'abyss-api-key';
45
+ export const ADMIN_TOKEN_HEADER = 'abyss-admin-token';
46
+
47
+ const NUMBER_RETRY_API = 10;
48
+ const BASE_DELAY_BETWEEN_RETRY = 5000;
49
+ const RETRY_CODES = [
50
+ 502, // Bad Gateway
51
+ 503, // Service Unavailable
52
+ ];
53
+
54
+ type CoreConfig = {
55
+ token?: string;
56
+ apiKey?: string;
57
+ adminToken?: string;
58
+ baseURL?: string;
59
+ };
60
+
61
+ type AbyssToolsCoreSDK = {
62
+ abyss: {
63
+ admin: {
64
+ activateUserService: typeof abyssAdminApi.activateUserServiceAbyssAdmin;
65
+ syncOrganization: typeof abyssAdminApi.syncOrganizationAbyssAdmin;
66
+ syncProject: typeof abyssAdminApi.syncProjectAbyssAdmin;
67
+ getProjectContentSummary: typeof abyssAdminApi.getProjectContentSummary;
68
+ };
69
+ };
70
+ board: {
71
+ get: typeof boardApi.getBoard;
72
+ getBySlug: typeof boardApi.getBySlugBoard;
73
+ list: typeof boardApi.listBoard;
74
+ listProject: typeof boardApi.listBoardProject;
75
+ listOrganization: typeof boardApi.listBoardOrganization;
76
+ paginateOrganization: typeof boardApi.paginateOrganizationBoard;
77
+ delete: typeof boardApi.deleteBoard;
78
+ update: typeof boardApi.updateBoard;
79
+ create: typeof boardApi.createBoard;
80
+ createForOrganization: typeof boardApi.createForOrganizationBoard;
81
+ getNextCardPreview: typeof boardApi.getNextCardPreviewBoard;
82
+ transfer: typeof boardApi.transferBoard;
83
+ countOrganization: typeof boardApi.countOrganizationBoard;
84
+ };
85
+ boardColumn: {
86
+ get: typeof boardColumnApi.getBoardColumn;
87
+ delete: typeof boardColumnApi.deleteBoardColumn;
88
+ update: typeof boardColumnApi.updateBoardColumn;
89
+ create: typeof boardColumnApi.createBoardColumn;
90
+ };
91
+ boardCard: {
92
+ get: typeof boardCardApi.getBoardCard;
93
+ getAll: typeof boardCardApi.getAllBoardCard;
94
+ delete: typeof boardCardApi.deleteBoardCard;
95
+ update: typeof boardCardApi.updateBoardCard;
96
+ restore: typeof boardCardApi.restoreBoardCard;
97
+ create: typeof boardCardApi.createBoardCard;
98
+ addMember: typeof boardCardApi.addMemberBoardCard;
99
+ removeMember: typeof boardCardApi.removeMemberBoardCard;
100
+ moveToBoard: typeof boardCardApi.moveToBoardBoardCard;
101
+ search: typeof boardCardApi.searchBoardCard;
102
+ };
103
+ boardLabel: {
104
+ get: typeof boardLabelApi.getBoardLabel;
105
+ delete: typeof boardLabelApi.deleteBoardLabel;
106
+ update: typeof boardLabelApi.updateBoardLabel;
107
+ create: typeof boardLabelApi.createBoardLabel;
108
+ add: typeof boardLabelApi.addBoardLabel;
109
+ remove: typeof boardLabelApi.removeBoardLabel;
110
+ list: typeof boardLabelApi.listBoardLabels;
111
+ };
112
+ boardCardComment: {
113
+ get: typeof boardCardCommentApi.getBoardCardComment;
114
+ delete: typeof boardCardCommentApi.deleteBoardCardComment;
115
+ update: typeof boardCardCommentApi.updateBoardCardComment;
116
+ create: typeof boardCardCommentApi.createBoardCardComment;
117
+ };
118
+ boardCardChecklist: {
119
+ get: typeof boardCardChecklistApi.getBoardCardChecklist;
120
+ delete: typeof boardCardChecklistApi.deleteBoardCardChecklist;
121
+ update: typeof boardCardChecklistApi.updateBoardCardChecklist;
122
+ create: typeof boardCardChecklistApi.createBoardCardChecklist;
123
+ addRow: typeof boardCardChecklistApi.addRowBoardCardChecklist;
124
+ removeRow: typeof boardCardChecklistApi.removeRowBoardCardChecklist;
125
+ updateRow: typeof boardCardChecklistApi.updateRowBoardCardChecklist;
126
+ };
127
+ boardCardDocument: {
128
+ get: typeof boardCardDocumentApi.getBoardCardDocument;
129
+ delete: typeof boardCardDocumentApi.deleteBoardCardDocument;
130
+ getUploadPreSignedUrl: typeof boardCardDocumentApi.getUploadPreSignedUrlBoardCardDocument;
131
+ cloudImport: typeof boardCardDocumentApi.cloudImportBoardCardDocument;
132
+ };
133
+ draw: {
134
+ paginate: typeof drawApi.paginateDraw;
135
+ paginateProject: typeof drawApi.paginateProjectDraw;
136
+ paginateOrganization: typeof drawApi.paginateOrganizationDraw;
137
+ get: typeof drawApi.getDraw;
138
+ delete: typeof drawApi.deleteDraw;
139
+ update: typeof drawApi.updateDraw;
140
+ create: typeof drawApi.createDraw;
141
+ createForOrganization: typeof drawApi.createForOrganizationDraw;
142
+ transfer: typeof drawApi.transferDraw;
143
+ countOrganization: typeof drawApi.countOrganizationDraw;
144
+ public: {
145
+ get: typeof drawPublicApi.getDrawPublic;
146
+ delete: typeof drawPublicApi.deleteDrawPublic;
147
+ update: typeof drawPublicApi.updateDrawPublic;
148
+ create: typeof drawPublicApi.createDrawPublic;
149
+ };
150
+ };
151
+ retrospective: {
152
+ get: typeof retrospectiveApi.getRetrospective;
153
+ paginateProject: typeof retrospectiveApi.paginateProjectRetrospective;
154
+ paginateOrganization: typeof retrospectiveApi.paginateOrganizationRetrospective;
155
+ paginate: typeof retrospectiveApi.paginateRetrospective;
156
+ create: typeof retrospectiveApi.createRetrospective;
157
+ createForOrganization: typeof retrospectiveApi.createForOrganizationRetrospective;
158
+ update: typeof retrospectiveApi.updateRetrospective;
159
+ delete: typeof retrospectiveApi.deleteRetrospective;
160
+ transfer: typeof retrospectiveApi.transferRetrospective;
161
+ countOrganization: typeof retrospectiveApi.countOrganizationRetrospective;
162
+ public: {
163
+ get: typeof retrospectivePublicApi.getRetrospectivePublic;
164
+ update: typeof retrospectivePublicApi.updateRetrospectivePublic;
165
+ createSection: typeof retrospectivePublicApi.createSectionRetrospectivePublic;
166
+ updateSection: typeof retrospectivePublicApi.updateSectionRetrospectivePublic;
167
+ deleteSection: typeof retrospectivePublicApi.deleteSectionRetrospectivePublic;
168
+ joinMember: typeof retrospectivePublicApi.joinMemberRetrospectivePublic;
169
+ updateMember: typeof retrospectivePublicApi.updateMemberRetrospectivePublic;
170
+ createCard: typeof retrospectivePublicApi.createCardRetrospectivePublic;
171
+ updateCard: typeof retrospectivePublicApi.updateCardRetrospectivePublic;
172
+ deleteCard: typeof retrospectivePublicApi.deleteCardRetrospectivePublic;
173
+ };
174
+ };
175
+ retrospectiveCard: {
176
+ get: typeof retrospectiveCardApi.getRetrospectiveCard;
177
+ paginate: typeof retrospectiveCardApi.paginateRetrospectiveCard;
178
+ create: typeof retrospectiveCardApi.createRetrospectiveCard;
179
+ update: typeof retrospectiveCardApi.updateRetrospectiveCard;
180
+ delete: typeof retrospectiveCardApi.deleteRetrospectiveCard;
181
+ };
182
+ retrospectiveMember: {
183
+ get: typeof retrospectiveMemberApi.getRetrospectiveMember;
184
+ list: typeof retrospectiveMemberApi.listRetrospectiveMember;
185
+ join: typeof retrospectiveMemberApi.joinRetrospectiveMember;
186
+ update: typeof retrospectiveMemberApi.updateRetrospectiveMember;
187
+ };
188
+ retrospectiveSection: {
189
+ get: typeof retrospectiveSectionApi.getRetrospectiveSection;
190
+ paginate: typeof retrospectiveSectionApi.paginateRetrospectiveSection;
191
+ create: typeof retrospectiveSectionApi.createRetrospectiveSection;
192
+ update: typeof retrospectiveSectionApi.updateRetrospectiveSection;
193
+ delete: typeof retrospectiveSectionApi.deleteRetrospectiveSection;
194
+ };
195
+ atlas: {
196
+ paginate: typeof atlasApi.paginateAtlas;
197
+ paginateProject: typeof atlasApi.paginateProjectAtlas;
198
+ paginateOrganization: typeof atlasApi.paginateOrganizationAtlas;
199
+ get: typeof atlasApi.getAtlas;
200
+ delete: typeof atlasApi.deleteAtlas;
201
+ update: typeof atlasApi.updateAtlas;
202
+ create: typeof atlasApi.createAtlas;
203
+ createForOrganization: typeof atlasApi.createForOrganizationAtlas;
204
+ transfer: typeof atlasApi.transferAtlas;
205
+ countOrganization: typeof atlasApi.countOrganizationAtlas;
206
+ public: {
207
+ get: typeof atlasPublicApi.getAtlasPublic;
208
+ getPage: typeof atlasPublicApi.getPageAtlasPublic;
209
+ searchContent: typeof atlasPublicApi.searchContentAtlasPublic;
210
+ };
211
+ };
212
+ atlasGroup: {
213
+ paginate: typeof atlasGroupApi.paginateAtlasGroup;
214
+ get: typeof atlasGroupApi.getAtlasGroup;
215
+ delete: typeof atlasGroupApi.deleteAtlasGroup;
216
+ update: typeof atlasGroupApi.updateAtlasGroup;
217
+ create: typeof atlasGroupApi.createAtlasGroup;
218
+ };
219
+ atlasPage: {
220
+ paginate: typeof atlasPageApi.paginateAtlasPage;
221
+ get: typeof atlasPageApi.getAtlasPage;
222
+ delete: typeof atlasPageApi.deleteAtlasPage;
223
+ update: typeof atlasPageApi.updateAtlasPage;
224
+ create: typeof atlasPageApi.createAtlasPage;
225
+ updateContent: typeof atlasPageApi.updateAtlasPageContent;
226
+ searchContent: typeof atlasPageApi.searchAtlasContent;
227
+ getContentHistory: typeof atlasPageApi.getAtlasPageContentHistory;
228
+ restoreContent: typeof atlasPageApi.restoreAtlasPageContent;
229
+ };
230
+ atlasDocument: {
231
+ get: typeof atlasDocumentApi.getAtlasDocument;
232
+ delete: typeof atlasDocumentApi.deleteAtlasDocument;
233
+ getUploadPreSignedUrl: typeof atlasDocumentApi.getUploadPreSignedUrlAtlasDocument;
234
+ paginate: typeof atlasDocumentApi.paginateAtlasDocument;
235
+ list: typeof atlasDocumentApi.listAtlasDocument;
236
+ };
237
+ memo: {
238
+ paginate: typeof memoApi.paginateMemo;
239
+ paginateProject: typeof memoApi.paginateProjectMemo;
240
+ paginateOrganization: typeof memoApi.paginateOrganizationMemo;
241
+ get: typeof memoApi.getMemo;
242
+ delete: typeof memoApi.deleteMemo;
243
+ update: typeof memoApi.updateMemo;
244
+ create: typeof memoApi.createMemo;
245
+ createForOrganization: typeof memoApi.createForOrganizationMemo;
246
+ transfer: typeof memoApi.transferMemo;
247
+ countOrganization: typeof memoApi.countOrganizationMemo;
248
+ };
249
+ shortLink: {
250
+ get: typeof shortLinkApiModule.shortLinkApi.get;
251
+ paginate: typeof shortLinkApiModule.shortLinkApi.paginate;
252
+ paginateProject: typeof shortLinkApiModule.shortLinkApi.paginateProject;
253
+ paginateOrganization: typeof shortLinkApiModule.shortLinkApi.paginateOrganization;
254
+ create: typeof shortLinkApiModule.shortLinkApi.create;
255
+ createForOrganization: typeof shortLinkApiModule.shortLinkApi.createForOrganization;
256
+ update: typeof shortLinkApiModule.shortLinkApi.update;
257
+ delete: typeof shortLinkApiModule.shortLinkApi.delete;
258
+ getStats: typeof shortLinkApiModule.shortLinkApi.getStats;
259
+ getClicks: typeof shortLinkApiModule.shortLinkApi.getClicks;
260
+ transfer: typeof shortLinkApiModule.shortLinkApi.transfer;
261
+ countOrganization: typeof shortLinkApiModule.shortLinkApi.countOrganization;
262
+ admin: {
263
+ paginate: typeof shortLinkAdminApiModule.shortLinkAdminApi.paginate;
264
+ get: typeof shortLinkAdminApiModule.shortLinkAdminApi.get;
265
+ update: typeof shortLinkAdminApiModule.shortLinkAdminApi.update;
266
+ delete: typeof shortLinkAdminApiModule.shortLinkAdminApi.delete;
267
+ };
268
+ public: {
269
+ createAnonymous: typeof shortLinkPublicApiModule.shortLinkPublicApi.createAnonymous;
270
+ redirect: typeof shortLinkPublicApiModule.shortLinkPublicApi.redirect;
271
+ getStats: typeof shortLinkPublicApiModule.shortLinkPublicApi.getStats;
272
+ getClicks: typeof shortLinkPublicApiModule.shortLinkPublicApi.getClicks;
273
+ renew: typeof shortLinkPublicApiModule.shortLinkPublicApi.renew;
274
+ };
275
+ };
276
+ beam: {
277
+ get: typeof beamApiModule.beamApi.get;
278
+ getBySlug: typeof beamApiModule.beamApi.getBySlug;
279
+ unlock: typeof beamApiModule.beamApi.unlock;
280
+ paginate: typeof beamApiModule.beamApi.paginate;
281
+ paginateProject: typeof beamApiModule.beamApi.paginateProject;
282
+ paginateOrganization: typeof beamApiModule.beamApi.paginateOrganization;
283
+ create: typeof beamApiModule.beamApi.create;
284
+ createForOrganization: typeof beamApiModule.beamApi.createForOrganization;
285
+ update: typeof beamApiModule.beamApi.update;
286
+ delete: typeof beamApiModule.beamApi.delete;
287
+ renew: typeof beamApiModule.beamApi.renew;
288
+ reactivate: typeof beamApiModule.beamApi.reactivate;
289
+ share: {
290
+ create: typeof beamApiModule.beamApi.share.create;
291
+ list: typeof beamApiModule.beamApi.share.list;
292
+ revoke: typeof beamApiModule.beamApi.share.revoke;
293
+ };
294
+ recipients: {
295
+ add: typeof beamApiModule.beamApi.recipients.add;
296
+ list: typeof beamApiModule.beamApi.recipients.list;
297
+ };
298
+ addFiles: typeof beamApiModule.beamApi.addFiles;
299
+ importCloudFiles: typeof beamApiModule.beamApi.importCloudFiles;
300
+ finalize: typeof beamApiModule.beamApi.finalize;
301
+ public: {
302
+ create: typeof beamApiModule.beamApi.public.create;
303
+ addFiles: typeof beamApiModule.beamApi.public.addFiles;
304
+ finalize: typeof beamApiModule.beamApi.public.finalize;
305
+ renew: typeof beamApiModule.beamApi.public.renew;
306
+ reactivate: typeof beamApiModule.beamApi.public.reactivate;
307
+ update: typeof beamApiModule.beamApi.public.update;
308
+ delete: typeof beamApiModule.beamApi.public.delete;
309
+ };
310
+ };
311
+ metrics: {
312
+ getOrganizationTools: typeof metricsApi.getOrganizationToolsMetrics;
313
+ getProjectTools: typeof metricsApi.getProjectToolsMetrics;
314
+ };
315
+ monitor: {
316
+ up: typeof monitorApi.upMonitor;
317
+ };
318
+ tag: {
319
+ list: typeof tagApi.listTag;
320
+ create: typeof tagApi.createTag;
321
+ update: typeof tagApi.updateTag;
322
+ delete: typeof tagApi.deleteTag;
323
+ assign: typeof tagApi.assignTag;
324
+ unassign: typeof tagApi.unassignTag;
325
+ getStats: typeof tagApi.getTagStats;
326
+ getEntityTags: typeof tagApi.getEntityTags;
327
+ };
328
+ organization: {
329
+ recent: typeof organizationApi.recentOrganization;
330
+ };
331
+ extract: {
332
+ health: typeof extractionApi.health;
333
+ stats: typeof extractionApi.stats;
334
+ changelog: typeof extractionApi.changelog;
335
+ detect: typeof extractionApi.detect;
336
+ detectBulk: typeof extractionApi.detectBulk;
337
+ run: typeof extractionApi.extractSync;
338
+ runQueue: typeof extractionApi.extractQueue;
339
+ runBulk: typeof extractionApi.extractBulk;
340
+ files: {
341
+ list: typeof extractionApi.listFiles;
342
+ listShared: typeof extractionApi.listSharedFiles;
343
+ get: typeof extractionApi.getFile;
344
+ patch: typeof extractionApi.patchFile;
345
+ listExtractions: typeof extractionApi.listFileExtractions;
346
+ downloadBundle: typeof extractionApi.downloadFileBundle;
347
+ };
348
+ extractions: {
349
+ get: typeof extractionApi.getExtraction;
350
+ patch: typeof extractionApi.patchExtraction;
351
+ searchRecords: typeof extractionApi.searchExtractionRecords;
352
+ export: typeof extractionApi.exportExtraction;
353
+ asyncExport: typeof extractionApi.asyncExportExtraction;
354
+ getExportJob: typeof extractionApi.getExportJob;
355
+ diff: typeof extractionApi.diffExtractions;
356
+ /** Opt a specific extraction in/out of the improvement-training dataset. */
357
+ toggleTraining: typeof extractionApi.toggleExtractionTraining;
358
+ };
359
+ templates: {
360
+ list: typeof extractionApi.listTemplates;
361
+ get: typeof extractionApi.getTemplate;
362
+ create: typeof extractionApi.createTemplate;
363
+ update: typeof extractionApi.updateTemplate;
364
+ patchMeta: typeof extractionApi.patchTemplateMeta;
365
+ delete: typeof extractionApi.deleteTemplate;
366
+ listVersions: typeof extractionApi.listTemplateVersions;
367
+ exportCollection: typeof extractionApi.exportTemplateCollection;
368
+ importCollection: typeof extractionApi.importTemplateCollection;
369
+ };
370
+ jobs: {
371
+ get: typeof extractionApi.getJob;
372
+ retry: typeof extractionApi.retryJob;
373
+ cancel: typeof extractionApi.cancelJob;
374
+ };
375
+ feedback: {
376
+ submit: typeof extractionApi.submitFeedback;
377
+ list: typeof extractionApi.listFeedback;
378
+ get: typeof extractionApi.getFeedback;
379
+ patch: typeof extractionApi.patchFeedback;
380
+ };
381
+ usage: {
382
+ list: typeof extractionApi.listUsage;
383
+ summary: typeof extractionApi.summaryUsage;
384
+ };
385
+ share: {
386
+ mint: typeof extractionApi.mintShareExtraction;
387
+ revoke: typeof extractionApi.revokeShareExtraction;
388
+ public: { get: typeof extractionApi.getSharedExtractionPublic };
389
+ };
390
+ // Webhook delivery history.
391
+ webhookDeliveries: {
392
+ list: typeof extractionApi.listWebhookDeliveries;
393
+ get: typeof extractionApi.getWebhookDelivery;
394
+ replay: typeof extractionApi.replayWebhookDelivery;
395
+ };
396
+ // Webhook subscriptions (managed registrations).
397
+ webhook: {
398
+ paginate: typeof extractionApi.paginateExtractionWebhook;
399
+ get: typeof extractionApi.getExtractionWebhook;
400
+ create: typeof extractionApi.createExtractionWebhook;
401
+ update: typeof extractionApi.updateExtractionWebhook;
402
+ delete: typeof extractionApi.deleteExtractionWebhook;
403
+ resetSecret: typeof extractionApi.resetSecretExtractionWebhook;
404
+ };
405
+ // Per-scope improvement-consent settings (P4).
406
+ settings: {
407
+ get: typeof extractionSettingsApi.getExtractionSettings;
408
+ upsert: typeof extractionSettingsApi.upsertExtractionSettings;
409
+ };
410
+ // Provider/interpreter capabilities (V2-P1).
411
+ modes: { list: typeof extractionPlanPresetApi.listModes };
412
+ // Saved extraction plan presets CRUD (V2-P1).
413
+ plans: {
414
+ list: typeof extractionPlanPresetApi.listExtractionPlanPresets;
415
+ get: typeof extractionPlanPresetApi.getExtractionPlanPreset;
416
+ create: typeof extractionPlanPresetApi.createExtractionPlanPreset;
417
+ update: typeof extractionPlanPresetApi.updateExtractionPlanPreset;
418
+ delete: typeof extractionPlanPresetApi.deleteExtractionPlanPreset;
419
+ setDefault: typeof extractionPlanPresetApi.setDefaultExtractionPlanPreset;
420
+ };
421
+ };
422
+ };
423
+
424
+ export class AbyssToolsCore {
425
+ private static config = {
426
+ token: '',
427
+ apiKey: '',
428
+ adminToken: '',
429
+ baseURL: DEFAULT_BASE_URL,
430
+ };
431
+ static axios = axios.create({
432
+ baseURL: this.config.baseURL,
433
+ withCredentials: true,
434
+ });
435
+
436
+ private static _sdk: AbyssToolsCoreSDK | null = null;
437
+
438
+ public static get sdk(): AbyssToolsCoreSDK {
439
+ if (!AbyssToolsCore._sdk) {
440
+ AbyssToolsCore._sdk = AbyssToolsCore.buildSDK();
441
+ }
442
+ return AbyssToolsCore._sdk;
443
+ }
444
+
445
+ private static buildSDK(): AbyssToolsCoreSDK {
446
+ return {
447
+ abyss: {
448
+ admin: {
449
+ activateUserService: abyssAdminApi.activateUserServiceAbyssAdmin,
450
+ syncOrganization: abyssAdminApi.syncOrganizationAbyssAdmin,
451
+ syncProject: abyssAdminApi.syncProjectAbyssAdmin,
452
+ getProjectContentSummary: abyssAdminApi.getProjectContentSummary,
453
+ },
454
+ },
455
+ board: {
456
+ get: boardApi.getBoard,
457
+ getBySlug: boardApi.getBySlugBoard,
458
+ list: boardApi.listBoard,
459
+ listProject: boardApi.listBoardProject,
460
+ listOrganization: boardApi.listBoardOrganization,
461
+ paginateOrganization: boardApi.paginateOrganizationBoard,
462
+ delete: boardApi.deleteBoard,
463
+ update: boardApi.updateBoard,
464
+ create: boardApi.createBoard,
465
+ createForOrganization: boardApi.createForOrganizationBoard,
466
+ getNextCardPreview: boardApi.getNextCardPreviewBoard,
467
+ transfer: boardApi.transferBoard,
468
+ countOrganization: boardApi.countOrganizationBoard,
469
+ },
470
+ boardColumn: {
471
+ get: boardColumnApi.getBoardColumn,
472
+ delete: boardColumnApi.deleteBoardColumn,
473
+ update: boardColumnApi.updateBoardColumn,
474
+ create: boardColumnApi.createBoardColumn,
475
+ },
476
+ boardCard: {
477
+ get: boardCardApi.getBoardCard,
478
+ getAll: boardCardApi.getAllBoardCard,
479
+ delete: boardCardApi.deleteBoardCard,
480
+ update: boardCardApi.updateBoardCard,
481
+ restore: boardCardApi.restoreBoardCard,
482
+ create: boardCardApi.createBoardCard,
483
+ addMember: boardCardApi.addMemberBoardCard,
484
+ removeMember: boardCardApi.removeMemberBoardCard,
485
+ moveToBoard: boardCardApi.moveToBoardBoardCard,
486
+ search: boardCardApi.searchBoardCard,
487
+ },
488
+ boardLabel: {
489
+ get: boardLabelApi.getBoardLabel,
490
+ delete: boardLabelApi.deleteBoardLabel,
491
+ update: boardLabelApi.updateBoardLabel,
492
+ create: boardLabelApi.createBoardLabel,
493
+ add: boardLabelApi.addBoardLabel,
494
+ remove: boardLabelApi.removeBoardLabel,
495
+ list: boardLabelApi.listBoardLabels,
496
+ },
497
+ boardCardComment: {
498
+ get: boardCardCommentApi.getBoardCardComment,
499
+ delete: boardCardCommentApi.deleteBoardCardComment,
500
+ update: boardCardCommentApi.updateBoardCardComment,
501
+ create: boardCardCommentApi.createBoardCardComment,
502
+ },
503
+ boardCardChecklist: {
504
+ get: boardCardChecklistApi.getBoardCardChecklist,
505
+ delete: boardCardChecklistApi.deleteBoardCardChecklist,
506
+ update: boardCardChecklistApi.updateBoardCardChecklist,
507
+ create: boardCardChecklistApi.createBoardCardChecklist,
508
+ addRow: boardCardChecklistApi.addRowBoardCardChecklist,
509
+ removeRow: boardCardChecklistApi.removeRowBoardCardChecklist,
510
+ updateRow: boardCardChecklistApi.updateRowBoardCardChecklist,
511
+ },
512
+ boardCardDocument: {
513
+ get: boardCardDocumentApi.getBoardCardDocument,
514
+ delete: boardCardDocumentApi.deleteBoardCardDocument,
515
+ getUploadPreSignedUrl: boardCardDocumentApi.getUploadPreSignedUrlBoardCardDocument,
516
+ cloudImport: boardCardDocumentApi.cloudImportBoardCardDocument,
517
+ },
518
+ draw: {
519
+ paginate: drawApi.paginateDraw,
520
+ paginateProject: drawApi.paginateProjectDraw,
521
+ paginateOrganization: drawApi.paginateOrganizationDraw,
522
+ get: drawApi.getDraw,
523
+ delete: drawApi.deleteDraw,
524
+ update: drawApi.updateDraw,
525
+ create: drawApi.createDraw,
526
+ createForOrganization: drawApi.createForOrganizationDraw,
527
+ transfer: drawApi.transferDraw,
528
+ countOrganization: drawApi.countOrganizationDraw,
529
+ public: {
530
+ get: drawPublicApi.getDrawPublic,
531
+ delete: drawPublicApi.deleteDrawPublic,
532
+ update: drawPublicApi.updateDrawPublic,
533
+ create: drawPublicApi.createDrawPublic,
534
+ },
535
+ },
536
+ retrospective: {
537
+ get: retrospectiveApi.getRetrospective,
538
+ paginateProject: retrospectiveApi.paginateProjectRetrospective,
539
+ paginateOrganization: retrospectiveApi.paginateOrganizationRetrospective,
540
+ paginate: retrospectiveApi.paginateRetrospective,
541
+ create: retrospectiveApi.createRetrospective,
542
+ createForOrganization: retrospectiveApi.createForOrganizationRetrospective,
543
+ update: retrospectiveApi.updateRetrospective,
544
+ delete: retrospectiveApi.deleteRetrospective,
545
+ transfer: retrospectiveApi.transferRetrospective,
546
+ countOrganization: retrospectiveApi.countOrganizationRetrospective,
547
+ public: {
548
+ get: retrospectivePublicApi.getRetrospectivePublic,
549
+ update: retrospectivePublicApi.updateRetrospectivePublic,
550
+ createSection: retrospectivePublicApi.createSectionRetrospectivePublic,
551
+ updateSection: retrospectivePublicApi.updateSectionRetrospectivePublic,
552
+ deleteSection: retrospectivePublicApi.deleteSectionRetrospectivePublic,
553
+ joinMember: retrospectivePublicApi.joinMemberRetrospectivePublic,
554
+ updateMember: retrospectivePublicApi.updateMemberRetrospectivePublic,
555
+ createCard: retrospectivePublicApi.createCardRetrospectivePublic,
556
+ updateCard: retrospectivePublicApi.updateCardRetrospectivePublic,
557
+ deleteCard: retrospectivePublicApi.deleteCardRetrospectivePublic,
558
+ },
559
+ },
560
+ retrospectiveCard: {
561
+ get: retrospectiveCardApi.getRetrospectiveCard,
562
+ paginate: retrospectiveCardApi.paginateRetrospectiveCard,
563
+ create: retrospectiveCardApi.createRetrospectiveCard,
564
+ update: retrospectiveCardApi.updateRetrospectiveCard,
565
+ delete: retrospectiveCardApi.deleteRetrospectiveCard,
566
+ },
567
+ retrospectiveMember: {
568
+ get: retrospectiveMemberApi.getRetrospectiveMember,
569
+ list: retrospectiveMemberApi.listRetrospectiveMember,
570
+ join: retrospectiveMemberApi.joinRetrospectiveMember,
571
+ update: retrospectiveMemberApi.updateRetrospectiveMember,
572
+ },
573
+ retrospectiveSection: {
574
+ get: retrospectiveSectionApi.getRetrospectiveSection,
575
+ paginate: retrospectiveSectionApi.paginateRetrospectiveSection,
576
+ create: retrospectiveSectionApi.createRetrospectiveSection,
577
+ update: retrospectiveSectionApi.updateRetrospectiveSection,
578
+ delete: retrospectiveSectionApi.deleteRetrospectiveSection,
579
+ },
580
+ atlas: {
581
+ paginate: atlasApi.paginateAtlas,
582
+ paginateProject: atlasApi.paginateProjectAtlas,
583
+ paginateOrganization: atlasApi.paginateOrganizationAtlas,
584
+ get: atlasApi.getAtlas,
585
+ delete: atlasApi.deleteAtlas,
586
+ update: atlasApi.updateAtlas,
587
+ create: atlasApi.createAtlas,
588
+ createForOrganization: atlasApi.createForOrganizationAtlas,
589
+ transfer: atlasApi.transferAtlas,
590
+ countOrganization: atlasApi.countOrganizationAtlas,
591
+ public: {
592
+ get: atlasPublicApi.getAtlasPublic,
593
+ getPage: atlasPublicApi.getPageAtlasPublic,
594
+ searchContent: atlasPublicApi.searchContentAtlasPublic,
595
+ },
596
+ },
597
+ atlasGroup: {
598
+ paginate: atlasGroupApi.paginateAtlasGroup,
599
+ get: atlasGroupApi.getAtlasGroup,
600
+ delete: atlasGroupApi.deleteAtlasGroup,
601
+ update: atlasGroupApi.updateAtlasGroup,
602
+ create: atlasGroupApi.createAtlasGroup,
603
+ },
604
+ atlasPage: {
605
+ paginate: atlasPageApi.paginateAtlasPage,
606
+ get: atlasPageApi.getAtlasPage,
607
+ delete: atlasPageApi.deleteAtlasPage,
608
+ update: atlasPageApi.updateAtlasPage,
609
+ create: atlasPageApi.createAtlasPage,
610
+ updateContent: atlasPageApi.updateAtlasPageContent,
611
+ searchContent: atlasPageApi.searchAtlasContent,
612
+ getContentHistory: atlasPageApi.getAtlasPageContentHistory,
613
+ restoreContent: atlasPageApi.restoreAtlasPageContent,
614
+ },
615
+ atlasDocument: {
616
+ get: atlasDocumentApi.getAtlasDocument,
617
+ delete: atlasDocumentApi.deleteAtlasDocument,
618
+ getUploadPreSignedUrl: atlasDocumentApi.getUploadPreSignedUrlAtlasDocument,
619
+ paginate: atlasDocumentApi.paginateAtlasDocument,
620
+ list: atlasDocumentApi.listAtlasDocument,
621
+ },
622
+ memo: {
623
+ paginate: memoApi.paginateMemo,
624
+ paginateProject: memoApi.paginateProjectMemo,
625
+ paginateOrganization: memoApi.paginateOrganizationMemo,
626
+ get: memoApi.getMemo,
627
+ delete: memoApi.deleteMemo,
628
+ update: memoApi.updateMemo,
629
+ create: memoApi.createMemo,
630
+ createForOrganization: memoApi.createForOrganizationMemo,
631
+ transfer: memoApi.transferMemo,
632
+ countOrganization: memoApi.countOrganizationMemo,
633
+ },
634
+ shortLink: {
635
+ get: shortLinkApiModule.shortLinkApi.get,
636
+ paginate: shortLinkApiModule.shortLinkApi.paginate,
637
+ paginateProject: shortLinkApiModule.shortLinkApi.paginateProject,
638
+ paginateOrganization: shortLinkApiModule.shortLinkApi.paginateOrganization,
639
+ create: shortLinkApiModule.shortLinkApi.create,
640
+ createForOrganization: shortLinkApiModule.shortLinkApi.createForOrganization,
641
+ update: shortLinkApiModule.shortLinkApi.update,
642
+ delete: shortLinkApiModule.shortLinkApi.delete,
643
+ getStats: shortLinkApiModule.shortLinkApi.getStats,
644
+ getClicks: shortLinkApiModule.shortLinkApi.getClicks,
645
+ transfer: shortLinkApiModule.shortLinkApi.transfer,
646
+ countOrganization: shortLinkApiModule.shortLinkApi.countOrganization,
647
+ admin: {
648
+ paginate: shortLinkAdminApiModule.shortLinkAdminApi.paginate,
649
+ get: shortLinkAdminApiModule.shortLinkAdminApi.get,
650
+ update: shortLinkAdminApiModule.shortLinkAdminApi.update,
651
+ delete: shortLinkAdminApiModule.shortLinkAdminApi.delete,
652
+ },
653
+ public: {
654
+ createAnonymous: shortLinkPublicApiModule.shortLinkPublicApi.createAnonymous,
655
+ redirect: shortLinkPublicApiModule.shortLinkPublicApi.redirect,
656
+ getStats: shortLinkPublicApiModule.shortLinkPublicApi.getStats,
657
+ getClicks: shortLinkPublicApiModule.shortLinkPublicApi.getClicks,
658
+ renew: shortLinkPublicApiModule.shortLinkPublicApi.renew,
659
+ },
660
+ },
661
+ beam: {
662
+ get: beamApiModule.beamApi.get,
663
+ getBySlug: beamApiModule.beamApi.getBySlug,
664
+ unlock: beamApiModule.beamApi.unlock,
665
+ paginate: beamApiModule.beamApi.paginate,
666
+ paginateProject: beamApiModule.beamApi.paginateProject,
667
+ paginateOrganization: beamApiModule.beamApi.paginateOrganization,
668
+ create: beamApiModule.beamApi.create,
669
+ createForOrganization: beamApiModule.beamApi.createForOrganization,
670
+ update: beamApiModule.beamApi.update,
671
+ delete: beamApiModule.beamApi.delete,
672
+ renew: beamApiModule.beamApi.renew,
673
+ reactivate: beamApiModule.beamApi.reactivate,
674
+ share: {
675
+ create: beamApiModule.beamApi.share.create,
676
+ list: beamApiModule.beamApi.share.list,
677
+ revoke: beamApiModule.beamApi.share.revoke,
678
+ },
679
+ recipients: {
680
+ add: beamApiModule.beamApi.recipients.add,
681
+ list: beamApiModule.beamApi.recipients.list,
682
+ },
683
+ addFiles: beamApiModule.beamApi.addFiles,
684
+ importCloudFiles: beamApiModule.beamApi.importCloudFiles,
685
+ finalize: beamApiModule.beamApi.finalize,
686
+ public: {
687
+ create: beamApiModule.beamApi.public.create,
688
+ addFiles: beamApiModule.beamApi.public.addFiles,
689
+ finalize: beamApiModule.beamApi.public.finalize,
690
+ renew: beamApiModule.beamApi.public.renew,
691
+ reactivate: beamApiModule.beamApi.public.reactivate,
692
+ update: beamApiModule.beamApi.public.update,
693
+ delete: beamApiModule.beamApi.public.delete,
694
+ },
695
+ },
696
+ metrics: {
697
+ getOrganizationTools: metricsApi.getOrganizationToolsMetrics,
698
+ getProjectTools: metricsApi.getProjectToolsMetrics,
699
+ },
700
+ monitor: {
701
+ up: monitorApi.upMonitor,
702
+ },
703
+ tag: {
704
+ list: tagApi.listTag,
705
+ create: tagApi.createTag,
706
+ update: tagApi.updateTag,
707
+ delete: tagApi.deleteTag,
708
+ assign: tagApi.assignTag,
709
+ unassign: tagApi.unassignTag,
710
+ getStats: tagApi.getTagStats,
711
+ getEntityTags: tagApi.getEntityTags,
712
+ },
713
+ organization: {
714
+ recent: organizationApi.recentOrganization,
715
+ },
716
+ extract: {
717
+ health: extractionApi.health,
718
+ stats: extractionApi.stats,
719
+ changelog: extractionApi.changelog,
720
+ detect: extractionApi.detect,
721
+ detectBulk: extractionApi.detectBulk,
722
+ run: extractionApi.extractSync,
723
+ runQueue: extractionApi.extractQueue,
724
+ runBulk: extractionApi.extractBulk,
725
+ files: {
726
+ list: extractionApi.listFiles,
727
+ listShared: extractionApi.listSharedFiles,
728
+ get: extractionApi.getFile,
729
+ patch: extractionApi.patchFile,
730
+ listExtractions: extractionApi.listFileExtractions,
731
+ downloadBundle: extractionApi.downloadFileBundle,
732
+ },
733
+ extractions: {
734
+ get: extractionApi.getExtraction,
735
+ patch: extractionApi.patchExtraction,
736
+ searchRecords: extractionApi.searchExtractionRecords,
737
+ export: extractionApi.exportExtraction,
738
+ asyncExport: extractionApi.asyncExportExtraction,
739
+ getExportJob: extractionApi.getExportJob,
740
+ diff: extractionApi.diffExtractions,
741
+ toggleTraining: extractionApi.toggleExtractionTraining,
742
+ },
743
+ templates: {
744
+ list: extractionApi.listTemplates,
745
+ get: extractionApi.getTemplate,
746
+ create: extractionApi.createTemplate,
747
+ update: extractionApi.updateTemplate,
748
+ patchMeta: extractionApi.patchTemplateMeta,
749
+ delete: extractionApi.deleteTemplate,
750
+ listVersions: extractionApi.listTemplateVersions,
751
+ exportCollection: extractionApi.exportTemplateCollection,
752
+ importCollection: extractionApi.importTemplateCollection,
753
+ },
754
+ jobs: {
755
+ get: extractionApi.getJob,
756
+ retry: extractionApi.retryJob,
757
+ cancel: extractionApi.cancelJob,
758
+ },
759
+ feedback: {
760
+ submit: extractionApi.submitFeedback,
761
+ list: extractionApi.listFeedback,
762
+ get: extractionApi.getFeedback,
763
+ patch: extractionApi.patchFeedback,
764
+ },
765
+ usage: {
766
+ list: extractionApi.listUsage,
767
+ summary: extractionApi.summaryUsage,
768
+ },
769
+ share: {
770
+ mint: extractionApi.mintShareExtraction,
771
+ revoke: extractionApi.revokeShareExtraction,
772
+ public: { get: extractionApi.getSharedExtractionPublic },
773
+ },
774
+ webhookDeliveries: {
775
+ list: extractionApi.listWebhookDeliveries,
776
+ get: extractionApi.getWebhookDelivery,
777
+ replay: extractionApi.replayWebhookDelivery,
778
+ },
779
+ webhook: {
780
+ paginate: extractionApi.paginateExtractionWebhook,
781
+ get: extractionApi.getExtractionWebhook,
782
+ create: extractionApi.createExtractionWebhook,
783
+ update: extractionApi.updateExtractionWebhook,
784
+ delete: extractionApi.deleteExtractionWebhook,
785
+ resetSecret: extractionApi.resetSecretExtractionWebhook,
786
+ },
787
+ settings: {
788
+ get: extractionSettingsApi.getExtractionSettings,
789
+ upsert: extractionSettingsApi.upsertExtractionSettings,
790
+ },
791
+ modes: { list: extractionPlanPresetApi.listModes },
792
+ plans: {
793
+ list: extractionPlanPresetApi.listExtractionPlanPresets,
794
+ get: extractionPlanPresetApi.getExtractionPlanPreset,
795
+ create: extractionPlanPresetApi.createExtractionPlanPreset,
796
+ update: extractionPlanPresetApi.updateExtractionPlanPreset,
797
+ delete: extractionPlanPresetApi.deleteExtractionPlanPreset,
798
+ setDefault: extractionPlanPresetApi.setDefaultExtractionPlanPreset,
799
+ },
800
+ },
801
+ };
802
+ }
803
+
804
+ public static enableAxiosRetry(axiosRetryConfig?: IAxiosRetryConfig): void {
805
+ axiosRetry(AbyssToolsCore.axios, {
806
+ retries: NUMBER_RETRY_API,
807
+ retryDelay: (retryCount) => retryCount * BASE_DELAY_BETWEEN_RETRY,
808
+ retryCondition: (error) =>
809
+ isNetworkOrIdempotentRequestError(error) ||
810
+ RETRY_CODES.includes(error.response?.status || 502),
811
+ ...axiosRetryConfig,
812
+ });
813
+ }
814
+
815
+ public static setConfig(config: CoreConfig): void {
816
+ AbyssToolsCore._sdk = null;
817
+
818
+ AbyssToolsCore.config = { ...AbyssToolsCore.config, ...config };
819
+
820
+ if (config.baseURL) {
821
+ AbyssToolsCore.axios.defaults.baseURL = config.baseURL;
822
+ }
823
+
824
+ if (config.token) {
825
+ AbyssToolsCore.axios.defaults.headers.common.Authorization = `Bearer ${config.token}`;
826
+ }
827
+
828
+ if (config.apiKey) {
829
+ AbyssToolsCore.axios.defaults.headers.common[API_KEY_HEADER] = `${config.apiKey}`;
830
+ }
831
+
832
+ if (config.adminToken) {
833
+ AbyssToolsCore.axios.defaults.headers.common[ADMIN_TOKEN_HEADER] = `${config.adminToken}`;
834
+ }
835
+ }
836
+
837
+ public static getConfig(): CoreConfig {
838
+ return AbyssToolsCore.config;
839
+ }
840
+ }