@abyss-project/tools 1.1.1 → 1.3.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 (186) hide show
  1. package/dist/api/beam.api.d.ts +2 -1
  2. package/dist/api/beam.api.js +10 -4
  3. package/dist/api/beam.api.js.map +1 -1
  4. package/dist/api/extraction-plan-preset.api.js +1 -1
  5. package/dist/api/extraction-plan-preset.api.js.map +1 -1
  6. package/dist/api/extraction-settings.api.js +1 -1
  7. package/dist/api/extraction-settings.api.js.map +1 -1
  8. package/dist/api/extraction.api.d.ts +5 -5
  9. package/dist/api/extraction.api.js +22 -5
  10. package/dist/api/extraction.api.js.map +1 -1
  11. package/dist/index.d.ts +4 -1
  12. package/dist/index.js +4 -1
  13. package/dist/index.js.map +1 -1
  14. package/dist/types/enum/beam.enum.d.ts +4 -0
  15. package/dist/types/enum/beam.enum.js +6 -1
  16. package/dist/types/enum/beam.enum.js.map +1 -1
  17. package/dist/types/interface/api/requests/beam.request.d.ts +16 -0
  18. package/dist/types/interface/api/requests/extraction.request.d.ts +8 -0
  19. package/dist/types/interface/api/responses/beam.response.d.ts +23 -1
  20. package/dist/types/interface/api/responses/extraction.response.d.ts +6 -0
  21. package/dist/types/interface/models/beam.dto.d.ts +13 -1
  22. package/dist/types/interface/models/extraction.dto.d.ts +8 -1
  23. package/dist/types/interface/models/extraction.dto.js.map +1 -1
  24. package/dist/utils/shape.utils.js +18 -18
  25. package/package.json +14 -9
  26. package/src/api/abyss.admin.api.ts +54 -54
  27. package/src/api/atlas-document.api.ts +68 -68
  28. package/src/api/atlas-group.api.ts +69 -69
  29. package/src/api/atlas-page.api.ts +124 -124
  30. package/src/api/atlas.api.ts +103 -103
  31. package/src/api/atlas.public.api.ts +42 -42
  32. package/src/api/beam.api.ts +29 -4
  33. package/src/api/board-card-checklist.api.ts +99 -99
  34. package/src/api/board-card-comment.api.ts +57 -57
  35. package/src/api/board-card-document.api.ts +57 -57
  36. package/src/api/board-card.api.ts +137 -137
  37. package/src/api/board-column.api.ts +54 -54
  38. package/src/api/board-label.api.ts +87 -87
  39. package/src/api/board.api.ts +122 -122
  40. package/src/api/draw.api.ts +97 -97
  41. package/src/api/draw.public.api.ts +48 -48
  42. package/src/api/extraction-plan-preset.api.ts +1 -1
  43. package/src/api/extraction-settings.api.ts +1 -1
  44. package/src/api/extraction.api.ts +58 -18
  45. package/src/api/memo.api.ts +97 -97
  46. package/src/api/metrics.api.ts +27 -27
  47. package/src/api/monitor.api.ts +6 -6
  48. package/src/api/organization.api.ts +14 -14
  49. package/src/api/retrospective-card.api.ts +74 -74
  50. package/src/api/retrospective-member.api.ts +54 -54
  51. package/src/api/retrospective-section.api.ts +74 -74
  52. package/src/api/retrospective.api.ts +124 -124
  53. package/src/api/retrospective.public.api.ts +147 -147
  54. package/src/api/short-link.admin.api.ts +39 -39
  55. package/src/api/short-link.api.ts +125 -125
  56. package/src/api/short-link.public.api.ts +60 -60
  57. package/src/api/tag.api.ts +72 -72
  58. package/src/api/tests/beam.api.spec.ts +64 -0
  59. package/src/constants/atlas.constants.ts +2 -2
  60. package/src/constants/board.constants.ts +7 -7
  61. package/src/constants/memo.constants.ts +3 -3
  62. package/src/constants/short-link.constants.ts +11 -11
  63. package/src/constants/tag.constants.ts +3 -3
  64. package/src/index.ts +10 -1
  65. package/src/server-sent-events/index.ts +13 -13
  66. package/src/server-sent-events/protocols/atlas/atlas.sse-protocol.ts +90 -90
  67. package/src/server-sent-events/protocols/atlas/index.ts +1 -1
  68. package/src/server-sent-events/protocols/board/board.sse-protocol.ts +115 -115
  69. package/src/server-sent-events/protocols/board/index.ts +1 -1
  70. package/src/server-sent-events/protocols/board-card/board-card.sse-protocol.ts +26 -26
  71. package/src/server-sent-events/protocols/board-card/index.ts +1 -1
  72. package/src/server-sent-events/protocols/index.ts +26 -26
  73. package/src/server-sent-events/protocols/retrospective/index.ts +1 -1
  74. package/src/server-sent-events/protocols/retrospective/retrospective.sse-protocol.ts +92 -92
  75. package/src/server-sent-events/server-sent-events.manager.ts +73 -73
  76. package/src/types/draw.type.ts +173 -173
  77. package/src/types/enum/api-error.enum.ts +23 -23
  78. package/src/types/enum/beam.enum.ts +8 -0
  79. package/src/types/enum/board-activity.enum.ts +189 -189
  80. package/src/types/enum/board-column-type.enum.ts +6 -6
  81. package/src/types/enum/pdf-operation.enum.ts +98 -98
  82. package/src/types/enum/rcb-bank.enum.ts +137 -137
  83. package/src/types/index.ts +5 -5
  84. package/src/types/interface/api/index.ts +5 -5
  85. package/src/types/interface/api/requests/abyss.admin.request.ts +20 -20
  86. package/src/types/interface/api/requests/atlas-document.request.ts +32 -32
  87. package/src/types/interface/api/requests/atlas-group.request.ts +45 -45
  88. package/src/types/interface/api/requests/atlas-page.request.ts +84 -84
  89. package/src/types/interface/api/requests/atlas.public.request.ts +21 -21
  90. package/src/types/interface/api/requests/atlas.request.ts +52 -52
  91. package/src/types/interface/api/requests/beam.request.ts +27 -2
  92. package/src/types/interface/api/requests/board-card-checklist.request.ts +61 -61
  93. package/src/types/interface/api/requests/board-card-comment.request.ts +28 -28
  94. package/src/types/interface/api/requests/board-card-document.request.ts +29 -29
  95. package/src/types/interface/api/requests/board-card.request.ts +86 -86
  96. package/src/types/interface/api/requests/board-column.request.ts +30 -30
  97. package/src/types/interface/api/requests/board-label.request.ts +42 -42
  98. package/src/types/interface/api/requests/board.request.ts +61 -61
  99. package/src/types/interface/api/requests/draw.public.request.ts +20 -20
  100. package/src/types/interface/api/requests/draw.request.ts +49 -49
  101. package/src/types/interface/api/requests/extraction.request.ts +22 -0
  102. package/src/types/interface/api/requests/memo.request.ts +49 -49
  103. package/src/types/interface/api/requests/metrics.request.ts +7 -7
  104. package/src/types/interface/api/requests/retrospective-card.request.ts +38 -38
  105. package/src/types/interface/api/requests/retrospective-member.request.ts +20 -20
  106. package/src/types/interface/api/requests/retrospective-section.request.ts +43 -43
  107. package/src/types/interface/api/requests/retrospective.public.request.ts +84 -84
  108. package/src/types/interface/api/requests/retrospective.request.ts +59 -59
  109. package/src/types/interface/api/requests/short-link.admin.request.ts +35 -35
  110. package/src/types/interface/api/requests/short-link.public.request.ts +40 -40
  111. package/src/types/interface/api/requests/short-link.request.ts +71 -71
  112. package/src/types/interface/api/requests/tag.request.ts +54 -54
  113. package/src/types/interface/api/requests/transfer.request.ts +3 -3
  114. package/src/types/interface/api/responses/abyss.admin.response.ts +28 -28
  115. package/src/types/interface/api/responses/atlas-document.response.ts +24 -24
  116. package/src/types/interface/api/responses/atlas-group.response.ts +23 -23
  117. package/src/types/interface/api/responses/atlas-page.response.ts +53 -53
  118. package/src/types/interface/api/responses/atlas.public.response.ts +21 -21
  119. package/src/types/interface/api/responses/atlas.response.ts +32 -32
  120. package/src/types/interface/api/responses/beam.response.ts +30 -1
  121. package/src/types/interface/api/responses/board-card-checklist.response.ts +31 -31
  122. package/src/types/interface/api/responses/board-card-comment.response.ts +20 -20
  123. package/src/types/interface/api/responses/board-card-document.response.ts +21 -21
  124. package/src/types/interface/api/responses/board-card.response.ts +55 -55
  125. package/src/types/interface/api/responses/board-column.response.ts +20 -20
  126. package/src/types/interface/api/responses/board-label.response.ts +31 -31
  127. package/src/types/interface/api/responses/board.response.ts +81 -81
  128. package/src/types/interface/api/responses/count.response.ts +9 -9
  129. package/src/types/interface/api/responses/draw.public.response.ts +22 -22
  130. package/src/types/interface/api/responses/draw.response.ts +32 -32
  131. package/src/types/interface/api/responses/enriched-paginate.response.ts +11 -11
  132. package/src/types/interface/api/responses/extraction.response.ts +19 -2
  133. package/src/types/interface/api/responses/memo.response.ts +32 -32
  134. package/src/types/interface/api/responses/metrics.response.ts +22 -22
  135. package/src/types/interface/api/responses/monitor.response.ts +8 -8
  136. package/src/types/interface/api/responses/recent.response.ts +18 -18
  137. package/src/types/interface/api/responses/retrospective-card.response.ts +23 -23
  138. package/src/types/interface/api/responses/retrospective-member.response.ts +22 -22
  139. package/src/types/interface/api/responses/retrospective-section.response.ts +23 -23
  140. package/src/types/interface/api/responses/retrospective.public.response.ts +57 -57
  141. package/src/types/interface/api/responses/retrospective.response.ts +32 -32
  142. package/src/types/interface/api/responses/short-link.admin.response.ts +21 -21
  143. package/src/types/interface/api/responses/short-link.public.response.ts +26 -26
  144. package/src/types/interface/api/responses/short-link.response.ts +38 -38
  145. package/src/types/interface/api/responses/tag.response.ts +38 -38
  146. package/src/types/interface/api/responses/transfer.response.ts +14 -14
  147. package/src/types/interface/api/type-message/api-error.ts +7 -7
  148. package/src/types/interface/api/type-message/base-paginate.ts +11 -11
  149. package/src/types/interface/api/type-message/response.ts +6 -6
  150. package/src/types/interface/index.ts +2 -2
  151. package/src/types/interface/models/atlas-document.dto.ts +22 -22
  152. package/src/types/interface/models/atlas-group.dto.ts +21 -21
  153. package/src/types/interface/models/atlas-page-content.dto.ts +17 -17
  154. package/src/types/interface/models/atlas-page.dto.ts +26 -26
  155. package/src/types/interface/models/atlas.dto.ts +34 -34
  156. package/src/types/interface/models/beam.dto.ts +20 -1
  157. package/src/types/interface/models/board-activity.dto.ts +20 -20
  158. package/src/types/interface/models/board-card-checklist-row.dto.ts +14 -14
  159. package/src/types/interface/models/board-card-checklist.dto.ts +16 -16
  160. package/src/types/interface/models/board-card-comment.dto.ts +15 -15
  161. package/src/types/interface/models/board-card-document.dto.ts +22 -22
  162. package/src/types/interface/models/board-card-label.dto.ts +14 -14
  163. package/src/types/interface/models/board-card-member.dto.ts +14 -14
  164. package/src/types/interface/models/board-card.dto.ts +37 -37
  165. package/src/types/interface/models/board-column.dto.ts +17 -17
  166. package/src/types/interface/models/board-label.dto.ts +13 -13
  167. package/src/types/interface/models/board.dto.ts +33 -33
  168. package/src/types/interface/models/content-share.dto.ts +16 -16
  169. package/src/types/interface/models/draw.dto.ts +30 -30
  170. package/src/types/interface/models/extraction.dto.ts +24 -6
  171. package/src/types/interface/models/memo.dto.ts +23 -23
  172. package/src/types/interface/models/project.dto.ts +25 -25
  173. package/src/types/interface/models/retrospective-card.dto.ts +17 -17
  174. package/src/types/interface/models/retrospective-member.dto.ts +15 -15
  175. package/src/types/interface/models/retrospective-section.dto.ts +16 -16
  176. package/src/types/interface/models/retrospective.dto.ts +32 -32
  177. package/src/types/interface/models/short-link-click.dto.ts +33 -33
  178. package/src/types/interface/models/short-link.dto.ts +49 -49
  179. package/src/types/interface/models/tag.dto.ts +26 -26
  180. package/src/types/interface/models/team.dto.ts +12 -12
  181. package/src/types/interface/models/user.dto.ts +26 -26
  182. package/src/utils/board.utils.ts +57 -57
  183. package/src/utils/enum.utils.ts +5 -5
  184. package/src/utils/error.utils.ts +30 -30
  185. package/src/utils/icons.utils.ts +96 -96
  186. package/src/utils/shape.utils.ts +292 -292
@@ -1,124 +1,124 @@
1
- import { AbyssToolsCore } from '..';
2
- import {
3
- ICreateAtlasPageBody,
4
- ICreateAtlasPageParams,
5
- ICreateAtlasPageResponse,
6
- IDeleteAtlasPageParams,
7
- IDeleteAtlasPageResponse,
8
- IGetAtlasPageParams,
9
- IGetAtlasPageResponse,
10
- IPaginateAtlasPageParams,
11
- IPaginateAtlasPageQuery,
12
- IPaginateAtlasPageResponse,
13
- IUpdateAtlasPageBody,
14
- IUpdateAtlasPageParams,
15
- IUpdateAtlasPageResponse,
16
- IUpdateAtlasPageContentParams,
17
- IUpdateAtlasPageContentBody,
18
- IUpdateAtlasPageContentResponse,
19
- ISearchAtlasContentParams,
20
- ISearchAtlasContentQuery,
21
- ISearchAtlasContentResponse,
22
- IGetAtlasPageContentHistoryParams,
23
- IGetAtlasPageContentHistoryQuery,
24
- IGetAtlasPageContentHistoryResponse,
25
- IRestoreAtlasPageContentParams,
26
- IRestoreAtlasPageContentResponse,
27
- } from '../types';
28
-
29
- export const paginateAtlasPage = async (
30
- params: IPaginateAtlasPageParams,
31
- query: IPaginateAtlasPageQuery,
32
- ): Promise<IPaginateAtlasPageResponse> => {
33
- return (
34
- await AbyssToolsCore.axios.get<IPaginateAtlasPageResponse>(`atlas/${params.atlasId}/page/paginate`, {
35
- params: query,
36
- })
37
- ).data;
38
- };
39
-
40
- export const getAtlasPage = async (params: IGetAtlasPageParams): Promise<IGetAtlasPageResponse> => {
41
- return (
42
- await AbyssToolsCore.axios.get<IGetAtlasPageResponse>(
43
- `atlas/${params.atlasId}/page/${params.atlasPageId}`,
44
- )
45
- ).data;
46
- };
47
-
48
- export const deleteAtlasPage = async (
49
- params: IDeleteAtlasPageParams,
50
- ): Promise<IDeleteAtlasPageResponse> => {
51
- return (
52
- await AbyssToolsCore.axios.delete<IDeleteAtlasPageResponse>(
53
- `atlas/${params.atlasId}/page/${params.atlasPageId}`,
54
- )
55
- ).data;
56
- };
57
-
58
- export const updateAtlasPage = async (
59
- params: IUpdateAtlasPageParams,
60
- body: IUpdateAtlasPageBody,
61
- ): Promise<IUpdateAtlasPageResponse> => {
62
- return (
63
- await AbyssToolsCore.axios.put<IUpdateAtlasPageResponse>(
64
- `atlas/${params.atlasId}/page/${params.atlasPageId}`,
65
- body,
66
- )
67
- ).data;
68
- };
69
-
70
- export const createAtlasPage = async (
71
- params: ICreateAtlasPageParams,
72
- body: ICreateAtlasPageBody,
73
- ): Promise<ICreateAtlasPageResponse> => {
74
- return (
75
- await AbyssToolsCore.axios.post<ICreateAtlasPageResponse>(`atlas/${params.atlasId}/page`, body)
76
- ).data;
77
- };
78
-
79
- export const updateAtlasPageContent = async (
80
- params: IUpdateAtlasPageContentParams,
81
- body: IUpdateAtlasPageContentBody,
82
- ): Promise<IUpdateAtlasPageContentResponse> => {
83
- return (
84
- await AbyssToolsCore.axios.put<IUpdateAtlasPageContentResponse>(
85
- `atlas/${params.atlasId}/page/${params.atlasPageId}/content`,
86
- body,
87
- )
88
- ).data;
89
- };
90
-
91
- export const searchAtlasContent = async (
92
- params: ISearchAtlasContentParams,
93
- query: ISearchAtlasContentQuery,
94
- ): Promise<ISearchAtlasContentResponse> => {
95
- return (
96
- await AbyssToolsCore.axios.get<ISearchAtlasContentResponse>(`atlas/${params.atlasId}/page/search`, {
97
- params: query,
98
- })
99
- ).data;
100
- };
101
-
102
- export const getAtlasPageContentHistory = async (
103
- params: IGetAtlasPageContentHistoryParams,
104
- query: IGetAtlasPageContentHistoryQuery,
105
- ): Promise<IGetAtlasPageContentHistoryResponse> => {
106
- return (
107
- await AbyssToolsCore.axios.get<IGetAtlasPageContentHistoryResponse>(
108
- `atlas/${params.atlasId}/page/${params.atlasPageId}/content/history`,
109
- {
110
- params: query,
111
- },
112
- )
113
- ).data;
114
- };
115
-
116
- export const restoreAtlasPageContent = async (
117
- params: IRestoreAtlasPageContentParams,
118
- ): Promise<IRestoreAtlasPageContentResponse> => {
119
- return (
120
- await AbyssToolsCore.axios.put<IRestoreAtlasPageContentResponse>(
121
- `atlas/${params.atlasId}/page/${params.atlasPageId}/content/restore/${params.version}`,
122
- )
123
- ).data;
124
- };
1
+ import { AbyssToolsCore } from '..';
2
+ import {
3
+ ICreateAtlasPageBody,
4
+ ICreateAtlasPageParams,
5
+ ICreateAtlasPageResponse,
6
+ IDeleteAtlasPageParams,
7
+ IDeleteAtlasPageResponse,
8
+ IGetAtlasPageParams,
9
+ IGetAtlasPageResponse,
10
+ IPaginateAtlasPageParams,
11
+ IPaginateAtlasPageQuery,
12
+ IPaginateAtlasPageResponse,
13
+ IUpdateAtlasPageBody,
14
+ IUpdateAtlasPageParams,
15
+ IUpdateAtlasPageResponse,
16
+ IUpdateAtlasPageContentParams,
17
+ IUpdateAtlasPageContentBody,
18
+ IUpdateAtlasPageContentResponse,
19
+ ISearchAtlasContentParams,
20
+ ISearchAtlasContentQuery,
21
+ ISearchAtlasContentResponse,
22
+ IGetAtlasPageContentHistoryParams,
23
+ IGetAtlasPageContentHistoryQuery,
24
+ IGetAtlasPageContentHistoryResponse,
25
+ IRestoreAtlasPageContentParams,
26
+ IRestoreAtlasPageContentResponse,
27
+ } from '../types';
28
+
29
+ export const paginateAtlasPage = async (
30
+ params: IPaginateAtlasPageParams,
31
+ query: IPaginateAtlasPageQuery,
32
+ ): Promise<IPaginateAtlasPageResponse> => {
33
+ return (
34
+ await AbyssToolsCore.axios.get<IPaginateAtlasPageResponse>(`atlas/${params.atlasId}/page/paginate`, {
35
+ params: query,
36
+ })
37
+ ).data;
38
+ };
39
+
40
+ export const getAtlasPage = async (params: IGetAtlasPageParams): Promise<IGetAtlasPageResponse> => {
41
+ return (
42
+ await AbyssToolsCore.axios.get<IGetAtlasPageResponse>(
43
+ `atlas/${params.atlasId}/page/${params.atlasPageId}`,
44
+ )
45
+ ).data;
46
+ };
47
+
48
+ export const deleteAtlasPage = async (
49
+ params: IDeleteAtlasPageParams,
50
+ ): Promise<IDeleteAtlasPageResponse> => {
51
+ return (
52
+ await AbyssToolsCore.axios.delete<IDeleteAtlasPageResponse>(
53
+ `atlas/${params.atlasId}/page/${params.atlasPageId}`,
54
+ )
55
+ ).data;
56
+ };
57
+
58
+ export const updateAtlasPage = async (
59
+ params: IUpdateAtlasPageParams,
60
+ body: IUpdateAtlasPageBody,
61
+ ): Promise<IUpdateAtlasPageResponse> => {
62
+ return (
63
+ await AbyssToolsCore.axios.put<IUpdateAtlasPageResponse>(
64
+ `atlas/${params.atlasId}/page/${params.atlasPageId}`,
65
+ body,
66
+ )
67
+ ).data;
68
+ };
69
+
70
+ export const createAtlasPage = async (
71
+ params: ICreateAtlasPageParams,
72
+ body: ICreateAtlasPageBody,
73
+ ): Promise<ICreateAtlasPageResponse> => {
74
+ return (
75
+ await AbyssToolsCore.axios.post<ICreateAtlasPageResponse>(`atlas/${params.atlasId}/page`, body)
76
+ ).data;
77
+ };
78
+
79
+ export const updateAtlasPageContent = async (
80
+ params: IUpdateAtlasPageContentParams,
81
+ body: IUpdateAtlasPageContentBody,
82
+ ): Promise<IUpdateAtlasPageContentResponse> => {
83
+ return (
84
+ await AbyssToolsCore.axios.put<IUpdateAtlasPageContentResponse>(
85
+ `atlas/${params.atlasId}/page/${params.atlasPageId}/content`,
86
+ body,
87
+ )
88
+ ).data;
89
+ };
90
+
91
+ export const searchAtlasContent = async (
92
+ params: ISearchAtlasContentParams,
93
+ query: ISearchAtlasContentQuery,
94
+ ): Promise<ISearchAtlasContentResponse> => {
95
+ return (
96
+ await AbyssToolsCore.axios.get<ISearchAtlasContentResponse>(`atlas/${params.atlasId}/page/search`, {
97
+ params: query,
98
+ })
99
+ ).data;
100
+ };
101
+
102
+ export const getAtlasPageContentHistory = async (
103
+ params: IGetAtlasPageContentHistoryParams,
104
+ query: IGetAtlasPageContentHistoryQuery,
105
+ ): Promise<IGetAtlasPageContentHistoryResponse> => {
106
+ return (
107
+ await AbyssToolsCore.axios.get<IGetAtlasPageContentHistoryResponse>(
108
+ `atlas/${params.atlasId}/page/${params.atlasPageId}/content/history`,
109
+ {
110
+ params: query,
111
+ },
112
+ )
113
+ ).data;
114
+ };
115
+
116
+ export const restoreAtlasPageContent = async (
117
+ params: IRestoreAtlasPageContentParams,
118
+ ): Promise<IRestoreAtlasPageContentResponse> => {
119
+ return (
120
+ await AbyssToolsCore.axios.put<IRestoreAtlasPageContentResponse>(
121
+ `atlas/${params.atlasId}/page/${params.atlasPageId}/content/restore/${params.version}`,
122
+ )
123
+ ).data;
124
+ };
@@ -1,103 +1,103 @@
1
- import { AbyssToolsCore } from '..';
2
- import {
3
- ICreateAtlasBody,
4
- ICreateAtlasResponse,
5
- ICreateForOrganizationAtlasParams,
6
- IDeleteAtlasParams,
7
- IDeleteAtlasResponse,
8
- IGetAtlasParams,
9
- IGetAtlasResponse,
10
- IPaginateAtlasQuery,
11
- IPaginateAtlasResponse,
12
- IPaginateProjectAtlasParams,
13
- IUpdateAtlasBody,
14
- IUpdateAtlasParams,
15
- IUpdateAtlasResponse,
16
- IPaginateOrganizationAtlasParams,
17
- ITransferContentBody,
18
- ITransferAtlasResponse,
19
- ICountOrganizationResponse,
20
- } from '../types';
21
-
22
- export const paginateAtlas = async (
23
- query: IPaginateAtlasQuery,
24
- ): Promise<IPaginateAtlasResponse> => {
25
- return (await AbyssToolsCore.axios.get<IPaginateAtlasResponse>(`atlas/paginate`, { params: query }))
26
- .data;
27
- };
28
-
29
- export const paginateProjectAtlas = async (
30
- params: IPaginateProjectAtlasParams,
31
- query: IPaginateAtlasQuery,
32
- ): Promise<IPaginateAtlasResponse> => {
33
- return (
34
- await AbyssToolsCore.axios.get<IPaginateAtlasResponse>(
35
- `project/${params.projectId}/atlas/paginate`,
36
- {
37
- params: query,
38
- },
39
- )
40
- ).data;
41
- };
42
-
43
- export const getAtlas = async (params: IGetAtlasParams): Promise<IGetAtlasResponse> => {
44
- return (await AbyssToolsCore.axios.get<IGetAtlasResponse>(`atlas/${params.atlasId}`)).data;
45
- };
46
-
47
- export const deleteAtlas = async (params: IDeleteAtlasParams): Promise<IDeleteAtlasResponse> => {
48
- return (await AbyssToolsCore.axios.delete<IDeleteAtlasResponse>(`atlas/${params.atlasId}`)).data;
49
- };
50
-
51
- export const updateAtlas = async (
52
- params: IUpdateAtlasParams,
53
- body: IUpdateAtlasBody,
54
- ): Promise<IUpdateAtlasResponse> => {
55
- return (await AbyssToolsCore.axios.put<IUpdateAtlasResponse>(`atlas/${params.atlasId}`, body)).data;
56
- };
57
-
58
- export const createAtlas = async (body: ICreateAtlasBody): Promise<ICreateAtlasResponse> => {
59
- return (await AbyssToolsCore.axios.post<ICreateAtlasResponse>(`atlas`, body)).data;
60
- };
61
-
62
- export const createForOrganizationAtlas = async (
63
- params: ICreateForOrganizationAtlasParams,
64
- body: ICreateAtlasBody,
65
- ): Promise<ICreateAtlasResponse> => {
66
- return (
67
- await AbyssToolsCore.axios.post<ICreateAtlasResponse>(`atlas/organization/${params.organizationId}`, body)
68
- ).data;
69
- };
70
-
71
- export const paginateOrganizationAtlas = async (
72
- params: IPaginateOrganizationAtlasParams,
73
- query: IPaginateAtlasQuery,
74
- ): Promise<IPaginateAtlasResponse> => {
75
- return (
76
- await AbyssToolsCore.axios.get<IPaginateAtlasResponse>(
77
- `organization/${params.organizationId}/atlas/paginate`,
78
- { params: query },
79
- )
80
- ).data;
81
- };
82
-
83
- export const transferAtlas = async (
84
- params: { atlasId: string },
85
- body: ITransferContentBody,
86
- ): Promise<ITransferAtlasResponse> => {
87
- return (
88
- await AbyssToolsCore.axios.post<ITransferAtlasResponse>(
89
- `atlas/${params.atlasId}/transfer`,
90
- body,
91
- )
92
- ).data;
93
- };
94
-
95
- export const countOrganizationAtlas = async (
96
- params: { organizationId: string },
97
- ): Promise<ICountOrganizationResponse> => {
98
- return (
99
- await AbyssToolsCore.axios.get<ICountOrganizationResponse>(
100
- `atlas/organization/${params.organizationId}/count`,
101
- )
102
- ).data;
103
- };
1
+ import { AbyssToolsCore } from '..';
2
+ import {
3
+ ICreateAtlasBody,
4
+ ICreateAtlasResponse,
5
+ ICreateForOrganizationAtlasParams,
6
+ IDeleteAtlasParams,
7
+ IDeleteAtlasResponse,
8
+ IGetAtlasParams,
9
+ IGetAtlasResponse,
10
+ IPaginateAtlasQuery,
11
+ IPaginateAtlasResponse,
12
+ IPaginateProjectAtlasParams,
13
+ IUpdateAtlasBody,
14
+ IUpdateAtlasParams,
15
+ IUpdateAtlasResponse,
16
+ IPaginateOrganizationAtlasParams,
17
+ ITransferContentBody,
18
+ ITransferAtlasResponse,
19
+ ICountOrganizationResponse,
20
+ } from '../types';
21
+
22
+ export const paginateAtlas = async (
23
+ query: IPaginateAtlasQuery,
24
+ ): Promise<IPaginateAtlasResponse> => {
25
+ return (await AbyssToolsCore.axios.get<IPaginateAtlasResponse>(`atlas/paginate`, { params: query }))
26
+ .data;
27
+ };
28
+
29
+ export const paginateProjectAtlas = async (
30
+ params: IPaginateProjectAtlasParams,
31
+ query: IPaginateAtlasQuery,
32
+ ): Promise<IPaginateAtlasResponse> => {
33
+ return (
34
+ await AbyssToolsCore.axios.get<IPaginateAtlasResponse>(
35
+ `project/${params.projectId}/atlas/paginate`,
36
+ {
37
+ params: query,
38
+ },
39
+ )
40
+ ).data;
41
+ };
42
+
43
+ export const getAtlas = async (params: IGetAtlasParams): Promise<IGetAtlasResponse> => {
44
+ return (await AbyssToolsCore.axios.get<IGetAtlasResponse>(`atlas/${params.atlasId}`)).data;
45
+ };
46
+
47
+ export const deleteAtlas = async (params: IDeleteAtlasParams): Promise<IDeleteAtlasResponse> => {
48
+ return (await AbyssToolsCore.axios.delete<IDeleteAtlasResponse>(`atlas/${params.atlasId}`)).data;
49
+ };
50
+
51
+ export const updateAtlas = async (
52
+ params: IUpdateAtlasParams,
53
+ body: IUpdateAtlasBody,
54
+ ): Promise<IUpdateAtlasResponse> => {
55
+ return (await AbyssToolsCore.axios.put<IUpdateAtlasResponse>(`atlas/${params.atlasId}`, body)).data;
56
+ };
57
+
58
+ export const createAtlas = async (body: ICreateAtlasBody): Promise<ICreateAtlasResponse> => {
59
+ return (await AbyssToolsCore.axios.post<ICreateAtlasResponse>(`atlas`, body)).data;
60
+ };
61
+
62
+ export const createForOrganizationAtlas = async (
63
+ params: ICreateForOrganizationAtlasParams,
64
+ body: ICreateAtlasBody,
65
+ ): Promise<ICreateAtlasResponse> => {
66
+ return (
67
+ await AbyssToolsCore.axios.post<ICreateAtlasResponse>(`atlas/organization/${params.organizationId}`, body)
68
+ ).data;
69
+ };
70
+
71
+ export const paginateOrganizationAtlas = async (
72
+ params: IPaginateOrganizationAtlasParams,
73
+ query: IPaginateAtlasQuery,
74
+ ): Promise<IPaginateAtlasResponse> => {
75
+ return (
76
+ await AbyssToolsCore.axios.get<IPaginateAtlasResponse>(
77
+ `organization/${params.organizationId}/atlas/paginate`,
78
+ { params: query },
79
+ )
80
+ ).data;
81
+ };
82
+
83
+ export const transferAtlas = async (
84
+ params: { atlasId: string },
85
+ body: ITransferContentBody,
86
+ ): Promise<ITransferAtlasResponse> => {
87
+ return (
88
+ await AbyssToolsCore.axios.post<ITransferAtlasResponse>(
89
+ `atlas/${params.atlasId}/transfer`,
90
+ body,
91
+ )
92
+ ).data;
93
+ };
94
+
95
+ export const countOrganizationAtlas = async (
96
+ params: { organizationId: string },
97
+ ): Promise<ICountOrganizationResponse> => {
98
+ return (
99
+ await AbyssToolsCore.axios.get<ICountOrganizationResponse>(
100
+ `atlas/organization/${params.organizationId}/count`,
101
+ )
102
+ ).data;
103
+ };
@@ -1,42 +1,42 @@
1
- import { AbyssToolsCore } from '..';
2
- import {
3
- IGetAtlasPublicParams,
4
- IGetAtlasPublicResponse,
5
- IGetPageAtlasPublicParams,
6
- IGetPageAtlasPublicResponse,
7
- ISearchContentAtlasPublicParams,
8
- ISearchContentAtlasPublicQuery,
9
- ISearchContentAtlasPublicResponse,
10
- } from '../types';
11
-
12
- export const getAtlasPublic = async (
13
- params: IGetAtlasPublicParams,
14
- ): Promise<IGetAtlasPublicResponse> => {
15
- return (
16
- await AbyssToolsCore.axios.get<IGetAtlasPublicResponse>(`atlas/public/${params.publicAccessToken}`)
17
- ).data;
18
- };
19
-
20
- export const getPageAtlasPublic = async (
21
- params: IGetPageAtlasPublicParams,
22
- ): Promise<IGetPageAtlasPublicResponse> => {
23
- return (
24
- await AbyssToolsCore.axios.get<IGetPageAtlasPublicResponse>(
25
- `atlas/public/${params.publicAccessToken}/page/${params.atlasPageId}`,
26
- )
27
- ).data;
28
- };
29
-
30
- export const searchContentAtlasPublic = async (
31
- params: ISearchContentAtlasPublicParams,
32
- query: ISearchContentAtlasPublicQuery,
33
- ): Promise<ISearchContentAtlasPublicResponse> => {
34
- return (
35
- await AbyssToolsCore.axios.get<ISearchContentAtlasPublicResponse>(
36
- `atlas/public/${params.publicAccessToken}/search`,
37
- {
38
- params: query,
39
- },
40
- )
41
- ).data;
42
- };
1
+ import { AbyssToolsCore } from '..';
2
+ import {
3
+ IGetAtlasPublicParams,
4
+ IGetAtlasPublicResponse,
5
+ IGetPageAtlasPublicParams,
6
+ IGetPageAtlasPublicResponse,
7
+ ISearchContentAtlasPublicParams,
8
+ ISearchContentAtlasPublicQuery,
9
+ ISearchContentAtlasPublicResponse,
10
+ } from '../types';
11
+
12
+ export const getAtlasPublic = async (
13
+ params: IGetAtlasPublicParams,
14
+ ): Promise<IGetAtlasPublicResponse> => {
15
+ return (
16
+ await AbyssToolsCore.axios.get<IGetAtlasPublicResponse>(`atlas/public/${params.publicAccessToken}`)
17
+ ).data;
18
+ };
19
+
20
+ export const getPageAtlasPublic = async (
21
+ params: IGetPageAtlasPublicParams,
22
+ ): Promise<IGetPageAtlasPublicResponse> => {
23
+ return (
24
+ await AbyssToolsCore.axios.get<IGetPageAtlasPublicResponse>(
25
+ `atlas/public/${params.publicAccessToken}/page/${params.atlasPageId}`,
26
+ )
27
+ ).data;
28
+ };
29
+
30
+ export const searchContentAtlasPublic = async (
31
+ params: ISearchContentAtlasPublicParams,
32
+ query: ISearchContentAtlasPublicQuery,
33
+ ): Promise<ISearchContentAtlasPublicResponse> => {
34
+ return (
35
+ await AbyssToolsCore.axios.get<ISearchContentAtlasPublicResponse>(
36
+ `atlas/public/${params.publicAccessToken}/search`,
37
+ {
38
+ params: query,
39
+ },
40
+ )
41
+ ).data;
42
+ };
@@ -42,6 +42,9 @@ import type {
42
42
  IAddRecipientsBeamBody,
43
43
  IAddRecipientsBeamResponse,
44
44
  IListRecipientsBeamResponse,
45
+ IGetBeamStatsParams,
46
+ IGetBeamStatsQuery,
47
+ IGetBeamStatsResponse,
45
48
  } from '../types';
46
49
  import { BEAM_MANAGE_TOKEN_HEADER } from '../constants/beam.constants';
47
50
 
@@ -51,6 +54,10 @@ import { BEAM_MANAGE_TOKEN_HEADER } from '../constants/beam.constants';
51
54
  const manageTokenHeader = (manageToken?: string): { headers?: Record<string, string> } =>
52
55
  manageToken ? { headers: { [BEAM_MANAGE_TOKEN_HEADER]: manageToken } } : {};
53
56
 
57
+ // renew/reactivate POST body: only carry `days` when the caller requested a
58
+ // specific extension window (the API clamps it to the tier cap; default 7).
59
+ const renewalBody = (days?: number): { days?: number } => (days !== undefined ? { days } : {});
60
+
54
61
  export const beamApi = {
55
62
  get: async (params: IGetBeamParams): Promise<IGetBeamResponse> => {
56
63
  const response = await AbyssToolsCore.axios.get<IGetBeamResponse>(`/beam/${params.beamId}`);
@@ -138,13 +145,31 @@ export const beamApi = {
138
145
 
139
146
  renew: async (params: IRenewBeamParams): Promise<IRenewBeamResponse> => {
140
147
  return (
141
- await AbyssToolsCore.axios.post<IRenewBeamResponse>(`/beam/${params.beamId}/renew`)
148
+ await AbyssToolsCore.axios.post<IRenewBeamResponse>(
149
+ `/beam/${params.beamId}/renew`,
150
+ renewalBody(params.days),
151
+ )
142
152
  ).data;
143
153
  },
144
154
 
145
155
  reactivate: async (params: IReactivateBeamParams): Promise<IReactivateBeamResponse> => {
146
156
  return (
147
- await AbyssToolsCore.axios.post<IReactivateBeamResponse>(`/beam/${params.beamId}/reactivate`)
157
+ await AbyssToolsCore.axios.post<IReactivateBeamResponse>(
158
+ `/beam/${params.beamId}/reactivate`,
159
+ renewalBody(params.days),
160
+ )
161
+ ).data;
162
+ },
163
+
164
+ // Owner download stats (MANAGE-gated): per-day series + recent events + totals.
165
+ stats: async (
166
+ params: IGetBeamStatsParams,
167
+ query?: IGetBeamStatsQuery,
168
+ ): Promise<IGetBeamStatsResponse> => {
169
+ return (
170
+ await AbyssToolsCore.axios.get<IGetBeamStatsResponse>(`/beam/${params.beamId}/stats`, {
171
+ params: query,
172
+ })
148
173
  ).data;
149
174
  },
150
175
 
@@ -258,7 +283,7 @@ export const beamApi = {
258
283
  return (
259
284
  await AbyssToolsCore.axios.post<IRenewBeamResponse>(
260
285
  `/beam/${params.beamId}/renew`,
261
- undefined,
286
+ renewalBody(params.days),
262
287
  manageTokenHeader(params.manageToken),
263
288
  )
264
289
  ).data;
@@ -269,7 +294,7 @@ export const beamApi = {
269
294
  return (
270
295
  await AbyssToolsCore.axios.post<IReactivateBeamResponse>(
271
296
  `/beam/${params.beamId}/reactivate`,
272
- undefined,
297
+ renewalBody(params.days),
273
298
  manageTokenHeader(params.manageToken),
274
299
  )
275
300
  ).data;