@abyss-project/tools 1.1.1 → 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 (166) hide show
  1. package/.eslintrc.js +33 -33
  2. package/.prettierrc +5 -5
  3. package/README.md +32 -32
  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.js +1 -1
  9. package/dist/api/extraction.api.js.map +1 -1
  10. package/dist/index.d.ts +1 -1
  11. package/dist/index.js +1 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/utils/shape.utils.js +18 -18
  14. package/package.json +14 -9
  15. package/src/api/abyss.admin.api.ts +54 -54
  16. package/src/api/atlas-document.api.ts +68 -68
  17. package/src/api/atlas-group.api.ts +69 -69
  18. package/src/api/atlas-page.api.ts +124 -124
  19. package/src/api/atlas.api.ts +103 -103
  20. package/src/api/atlas.public.api.ts +42 -42
  21. package/src/api/board-card-checklist.api.ts +99 -99
  22. package/src/api/board-card-comment.api.ts +57 -57
  23. package/src/api/board-card-document.api.ts +57 -57
  24. package/src/api/board-card.api.ts +137 -137
  25. package/src/api/board-column.api.ts +54 -54
  26. package/src/api/board-label.api.ts +87 -87
  27. package/src/api/board.api.ts +122 -122
  28. package/src/api/draw.api.ts +97 -97
  29. package/src/api/draw.public.api.ts +48 -48
  30. package/src/api/extraction-plan-preset.api.ts +1 -1
  31. package/src/api/extraction-settings.api.ts +1 -1
  32. package/src/api/extraction.api.ts +1 -1
  33. package/src/api/memo.api.ts +97 -97
  34. package/src/api/metrics.api.ts +27 -27
  35. package/src/api/monitor.api.ts +6 -6
  36. package/src/api/organization.api.ts +14 -14
  37. package/src/api/retrospective-card.api.ts +74 -74
  38. package/src/api/retrospective-member.api.ts +54 -54
  39. package/src/api/retrospective-section.api.ts +74 -74
  40. package/src/api/retrospective.api.ts +124 -124
  41. package/src/api/retrospective.public.api.ts +147 -147
  42. package/src/api/short-link.admin.api.ts +39 -39
  43. package/src/api/short-link.api.ts +125 -125
  44. package/src/api/short-link.public.api.ts +60 -60
  45. package/src/api/tag.api.ts +72 -72
  46. package/src/constants/atlas.constants.ts +2 -2
  47. package/src/constants/board.constants.ts +7 -7
  48. package/src/constants/memo.constants.ts +3 -3
  49. package/src/constants/short-link.constants.ts +11 -11
  50. package/src/constants/tag.constants.ts +3 -3
  51. package/src/index.ts +1 -1
  52. package/src/server-sent-events/index.ts +13 -13
  53. package/src/server-sent-events/protocols/atlas/atlas.sse-protocol.ts +90 -90
  54. package/src/server-sent-events/protocols/atlas/index.ts +1 -1
  55. package/src/server-sent-events/protocols/board/board.sse-protocol.ts +115 -115
  56. package/src/server-sent-events/protocols/board/index.ts +1 -1
  57. package/src/server-sent-events/protocols/board-card/board-card.sse-protocol.ts +26 -26
  58. package/src/server-sent-events/protocols/board-card/index.ts +1 -1
  59. package/src/server-sent-events/protocols/index.ts +26 -26
  60. package/src/server-sent-events/protocols/retrospective/index.ts +1 -1
  61. package/src/server-sent-events/protocols/retrospective/retrospective.sse-protocol.ts +92 -92
  62. package/src/server-sent-events/server-sent-events.manager.ts +73 -73
  63. package/src/types/draw.type.ts +173 -173
  64. package/src/types/enum/api-error.enum.ts +23 -23
  65. package/src/types/enum/board-activity.enum.ts +189 -189
  66. package/src/types/enum/board-column-type.enum.ts +6 -6
  67. package/src/types/enum/pdf-operation.enum.ts +98 -98
  68. package/src/types/enum/rcb-bank.enum.ts +137 -137
  69. package/src/types/index.ts +5 -5
  70. package/src/types/interface/api/index.ts +5 -5
  71. package/src/types/interface/api/requests/abyss.admin.request.ts +20 -20
  72. package/src/types/interface/api/requests/atlas-document.request.ts +32 -32
  73. package/src/types/interface/api/requests/atlas-group.request.ts +45 -45
  74. package/src/types/interface/api/requests/atlas-page.request.ts +84 -84
  75. package/src/types/interface/api/requests/atlas.public.request.ts +21 -21
  76. package/src/types/interface/api/requests/atlas.request.ts +52 -52
  77. package/src/types/interface/api/requests/board-card-checklist.request.ts +61 -61
  78. package/src/types/interface/api/requests/board-card-comment.request.ts +28 -28
  79. package/src/types/interface/api/requests/board-card-document.request.ts +29 -29
  80. package/src/types/interface/api/requests/board-card.request.ts +86 -86
  81. package/src/types/interface/api/requests/board-column.request.ts +30 -30
  82. package/src/types/interface/api/requests/board-label.request.ts +42 -42
  83. package/src/types/interface/api/requests/board.request.ts +61 -61
  84. package/src/types/interface/api/requests/draw.public.request.ts +20 -20
  85. package/src/types/interface/api/requests/draw.request.ts +49 -49
  86. package/src/types/interface/api/requests/memo.request.ts +49 -49
  87. package/src/types/interface/api/requests/metrics.request.ts +7 -7
  88. package/src/types/interface/api/requests/retrospective-card.request.ts +38 -38
  89. package/src/types/interface/api/requests/retrospective-member.request.ts +20 -20
  90. package/src/types/interface/api/requests/retrospective-section.request.ts +43 -43
  91. package/src/types/interface/api/requests/retrospective.public.request.ts +84 -84
  92. package/src/types/interface/api/requests/retrospective.request.ts +59 -59
  93. package/src/types/interface/api/requests/short-link.admin.request.ts +35 -35
  94. package/src/types/interface/api/requests/short-link.public.request.ts +40 -40
  95. package/src/types/interface/api/requests/short-link.request.ts +71 -71
  96. package/src/types/interface/api/requests/tag.request.ts +54 -54
  97. package/src/types/interface/api/requests/transfer.request.ts +3 -3
  98. package/src/types/interface/api/responses/abyss.admin.response.ts +28 -28
  99. package/src/types/interface/api/responses/atlas-document.response.ts +24 -24
  100. package/src/types/interface/api/responses/atlas-group.response.ts +23 -23
  101. package/src/types/interface/api/responses/atlas-page.response.ts +53 -53
  102. package/src/types/interface/api/responses/atlas.public.response.ts +21 -21
  103. package/src/types/interface/api/responses/atlas.response.ts +32 -32
  104. package/src/types/interface/api/responses/board-card-checklist.response.ts +31 -31
  105. package/src/types/interface/api/responses/board-card-comment.response.ts +20 -20
  106. package/src/types/interface/api/responses/board-card-document.response.ts +21 -21
  107. package/src/types/interface/api/responses/board-card.response.ts +55 -55
  108. package/src/types/interface/api/responses/board-column.response.ts +20 -20
  109. package/src/types/interface/api/responses/board-label.response.ts +31 -31
  110. package/src/types/interface/api/responses/board.response.ts +81 -81
  111. package/src/types/interface/api/responses/count.response.ts +9 -9
  112. package/src/types/interface/api/responses/draw.public.response.ts +22 -22
  113. package/src/types/interface/api/responses/draw.response.ts +32 -32
  114. package/src/types/interface/api/responses/enriched-paginate.response.ts +11 -11
  115. package/src/types/interface/api/responses/memo.response.ts +32 -32
  116. package/src/types/interface/api/responses/metrics.response.ts +22 -22
  117. package/src/types/interface/api/responses/monitor.response.ts +8 -8
  118. package/src/types/interface/api/responses/recent.response.ts +18 -18
  119. package/src/types/interface/api/responses/retrospective-card.response.ts +23 -23
  120. package/src/types/interface/api/responses/retrospective-member.response.ts +22 -22
  121. package/src/types/interface/api/responses/retrospective-section.response.ts +23 -23
  122. package/src/types/interface/api/responses/retrospective.public.response.ts +57 -57
  123. package/src/types/interface/api/responses/retrospective.response.ts +32 -32
  124. package/src/types/interface/api/responses/short-link.admin.response.ts +21 -21
  125. package/src/types/interface/api/responses/short-link.public.response.ts +26 -26
  126. package/src/types/interface/api/responses/short-link.response.ts +38 -38
  127. package/src/types/interface/api/responses/tag.response.ts +38 -38
  128. package/src/types/interface/api/responses/transfer.response.ts +14 -14
  129. package/src/types/interface/api/type-message/api-error.ts +7 -7
  130. package/src/types/interface/api/type-message/base-paginate.ts +11 -11
  131. package/src/types/interface/api/type-message/response.ts +6 -6
  132. package/src/types/interface/index.ts +2 -2
  133. package/src/types/interface/models/atlas-document.dto.ts +22 -22
  134. package/src/types/interface/models/atlas-group.dto.ts +21 -21
  135. package/src/types/interface/models/atlas-page-content.dto.ts +17 -17
  136. package/src/types/interface/models/atlas-page.dto.ts +26 -26
  137. package/src/types/interface/models/atlas.dto.ts +34 -34
  138. package/src/types/interface/models/board-activity.dto.ts +20 -20
  139. package/src/types/interface/models/board-card-checklist-row.dto.ts +14 -14
  140. package/src/types/interface/models/board-card-checklist.dto.ts +16 -16
  141. package/src/types/interface/models/board-card-comment.dto.ts +15 -15
  142. package/src/types/interface/models/board-card-document.dto.ts +22 -22
  143. package/src/types/interface/models/board-card-label.dto.ts +14 -14
  144. package/src/types/interface/models/board-card-member.dto.ts +14 -14
  145. package/src/types/interface/models/board-card.dto.ts +37 -37
  146. package/src/types/interface/models/board-column.dto.ts +17 -17
  147. package/src/types/interface/models/board-label.dto.ts +13 -13
  148. package/src/types/interface/models/board.dto.ts +33 -33
  149. package/src/types/interface/models/content-share.dto.ts +16 -16
  150. package/src/types/interface/models/draw.dto.ts +30 -30
  151. package/src/types/interface/models/memo.dto.ts +23 -23
  152. package/src/types/interface/models/project.dto.ts +25 -25
  153. package/src/types/interface/models/retrospective-card.dto.ts +17 -17
  154. package/src/types/interface/models/retrospective-member.dto.ts +15 -15
  155. package/src/types/interface/models/retrospective-section.dto.ts +16 -16
  156. package/src/types/interface/models/retrospective.dto.ts +32 -32
  157. package/src/types/interface/models/short-link-click.dto.ts +33 -33
  158. package/src/types/interface/models/short-link.dto.ts +49 -49
  159. package/src/types/interface/models/tag.dto.ts +26 -26
  160. package/src/types/interface/models/team.dto.ts +12 -12
  161. package/src/types/interface/models/user.dto.ts +26 -26
  162. package/src/utils/board.utils.ts +57 -57
  163. package/src/utils/enum.utils.ts +5 -5
  164. package/src/utils/error.utils.ts +30 -30
  165. package/src/utils/icons.utils.ts +96 -96
  166. package/src/utils/shape.utils.ts +292 -292
@@ -1,68 +1,68 @@
1
- import { AbyssToolsCore } from '..';
2
- import {
3
- IDeleteAtlasDocumentParams,
4
- IDeleteAtlasDocumentResponse,
5
- IGetAtlasDocumentParams,
6
- IGetAtlasDocumentResponse,
7
- IGetUploadPreSignedUrlAtlasDocumentBody,
8
- IGetUploadPreSignedUrlAtlasDocumentParams,
9
- IGetUploadPreSignedUrlAtlasDocumentResponse,
10
- IPaginateAtlasDocumentParams,
11
- IPaginateAtlasDocumentQuery,
12
- IPaginateAtlasDocumentResponse,
13
- IListAtlasDocumentParams,
14
- IListAtlasDocumentResponse,
15
- } from '../types';
16
-
17
- export const getAtlasDocument = async (
18
- params: IGetAtlasDocumentParams,
19
- ): Promise<IGetAtlasDocumentResponse> => {
20
- return (
21
- await AbyssToolsCore.axios.get<IGetAtlasDocumentResponse>(
22
- `atlas/${params.atlasId}/document/${params.atlasDocumentId}`,
23
- )
24
- ).data;
25
- };
26
-
27
- export const deleteAtlasDocument = async (
28
- params: IDeleteAtlasDocumentParams,
29
- ): Promise<IDeleteAtlasDocumentResponse> => {
30
- return (
31
- await AbyssToolsCore.axios.delete<IDeleteAtlasDocumentResponse>(
32
- `atlas/${params.atlasId}/document/${params.atlasDocumentId}`,
33
- )
34
- ).data;
35
- };
36
-
37
- export const getUploadPreSignedUrlAtlasDocument = async (
38
- params: IGetUploadPreSignedUrlAtlasDocumentParams,
39
- body: IGetUploadPreSignedUrlAtlasDocumentBody,
40
- ): Promise<IGetUploadPreSignedUrlAtlasDocumentResponse> => {
41
- return (
42
- await AbyssToolsCore.axios.post<IGetUploadPreSignedUrlAtlasDocumentResponse>(
43
- `atlas/${params.atlasId}/document/${params.atlasPageId}`,
44
- body,
45
- )
46
- ).data;
47
- };
48
-
49
- export const paginateAtlasDocument = async (
50
- params: IPaginateAtlasDocumentParams,
51
- query?: IPaginateAtlasDocumentQuery,
52
- ): Promise<IPaginateAtlasDocumentResponse> => {
53
- return (
54
- await AbyssToolsCore.axios.get<IPaginateAtlasDocumentResponse>(`atlas/${params.atlasId}/document`, {
55
- params: query,
56
- })
57
- ).data;
58
- };
59
-
60
- export const listAtlasDocument = async (
61
- params: IListAtlasDocumentParams,
62
- ): Promise<IListAtlasDocumentResponse> => {
63
- return (
64
- await AbyssToolsCore.axios.get<IListAtlasDocumentResponse>(
65
- `atlas/${params.atlasId}/document/page/${params.atlasPageId}`,
66
- )
67
- ).data;
68
- };
1
+ import { AbyssToolsCore } from '..';
2
+ import {
3
+ IDeleteAtlasDocumentParams,
4
+ IDeleteAtlasDocumentResponse,
5
+ IGetAtlasDocumentParams,
6
+ IGetAtlasDocumentResponse,
7
+ IGetUploadPreSignedUrlAtlasDocumentBody,
8
+ IGetUploadPreSignedUrlAtlasDocumentParams,
9
+ IGetUploadPreSignedUrlAtlasDocumentResponse,
10
+ IPaginateAtlasDocumentParams,
11
+ IPaginateAtlasDocumentQuery,
12
+ IPaginateAtlasDocumentResponse,
13
+ IListAtlasDocumentParams,
14
+ IListAtlasDocumentResponse,
15
+ } from '../types';
16
+
17
+ export const getAtlasDocument = async (
18
+ params: IGetAtlasDocumentParams,
19
+ ): Promise<IGetAtlasDocumentResponse> => {
20
+ return (
21
+ await AbyssToolsCore.axios.get<IGetAtlasDocumentResponse>(
22
+ `atlas/${params.atlasId}/document/${params.atlasDocumentId}`,
23
+ )
24
+ ).data;
25
+ };
26
+
27
+ export const deleteAtlasDocument = async (
28
+ params: IDeleteAtlasDocumentParams,
29
+ ): Promise<IDeleteAtlasDocumentResponse> => {
30
+ return (
31
+ await AbyssToolsCore.axios.delete<IDeleteAtlasDocumentResponse>(
32
+ `atlas/${params.atlasId}/document/${params.atlasDocumentId}`,
33
+ )
34
+ ).data;
35
+ };
36
+
37
+ export const getUploadPreSignedUrlAtlasDocument = async (
38
+ params: IGetUploadPreSignedUrlAtlasDocumentParams,
39
+ body: IGetUploadPreSignedUrlAtlasDocumentBody,
40
+ ): Promise<IGetUploadPreSignedUrlAtlasDocumentResponse> => {
41
+ return (
42
+ await AbyssToolsCore.axios.post<IGetUploadPreSignedUrlAtlasDocumentResponse>(
43
+ `atlas/${params.atlasId}/document/${params.atlasPageId}`,
44
+ body,
45
+ )
46
+ ).data;
47
+ };
48
+
49
+ export const paginateAtlasDocument = async (
50
+ params: IPaginateAtlasDocumentParams,
51
+ query?: IPaginateAtlasDocumentQuery,
52
+ ): Promise<IPaginateAtlasDocumentResponse> => {
53
+ return (
54
+ await AbyssToolsCore.axios.get<IPaginateAtlasDocumentResponse>(`atlas/${params.atlasId}/document`, {
55
+ params: query,
56
+ })
57
+ ).data;
58
+ };
59
+
60
+ export const listAtlasDocument = async (
61
+ params: IListAtlasDocumentParams,
62
+ ): Promise<IListAtlasDocumentResponse> => {
63
+ return (
64
+ await AbyssToolsCore.axios.get<IListAtlasDocumentResponse>(
65
+ `atlas/${params.atlasId}/document/page/${params.atlasPageId}`,
66
+ )
67
+ ).data;
68
+ };
@@ -1,69 +1,69 @@
1
- import { AbyssToolsCore } from '..';
2
- import {
3
- ICreateAtlasGroupBody,
4
- ICreateAtlasGroupParams,
5
- ICreateAtlasGroupResponse,
6
- IDeleteAtlasGroupParams,
7
- IDeleteAtlasGroupResponse,
8
- IGetAtlasGroupParams,
9
- IGetAtlasGroupResponse,
10
- IPaginateAtlasGroupParams,
11
- IPaginateAtlasGroupQuery,
12
- IPaginateAtlasGroupResponse,
13
- IUpdateAtlasGroupBody,
14
- IUpdateAtlasGroupParams,
15
- IUpdateAtlasGroupResponse,
16
- } from '../types';
17
-
18
- export const paginateAtlasGroup = async (
19
- params: IPaginateAtlasGroupParams,
20
- query: IPaginateAtlasGroupQuery,
21
- ): Promise<IPaginateAtlasGroupResponse> => {
22
- return (
23
- await AbyssToolsCore.axios.get<IPaginateAtlasGroupResponse>(
24
- `atlas/${params.atlasId}/group/paginate`,
25
- { params: query },
26
- )
27
- ).data;
28
- };
29
-
30
- export const getAtlasGroup = async (
31
- params: IGetAtlasGroupParams,
32
- ): Promise<IGetAtlasGroupResponse> => {
33
- return (
34
- await AbyssToolsCore.axios.get<IGetAtlasGroupResponse>(
35
- `atlas/${params.atlasId}/group/${params.atlasGroupId}`,
36
- )
37
- ).data;
38
- };
39
-
40
- export const deleteAtlasGroup = async (
41
- params: IDeleteAtlasGroupParams,
42
- ): Promise<IDeleteAtlasGroupResponse> => {
43
- return (
44
- await AbyssToolsCore.axios.delete<IDeleteAtlasGroupResponse>(
45
- `atlas/${params.atlasId}/group/${params.atlasGroupId}`,
46
- )
47
- ).data;
48
- };
49
-
50
- export const updateAtlasGroup = async (
51
- params: IUpdateAtlasGroupParams,
52
- body: IUpdateAtlasGroupBody,
53
- ): Promise<IUpdateAtlasGroupResponse> => {
54
- return (
55
- await AbyssToolsCore.axios.put<IUpdateAtlasGroupResponse>(
56
- `atlas/${params.atlasId}/group/${params.atlasGroupId}`,
57
- body,
58
- )
59
- ).data;
60
- };
61
-
62
- export const createAtlasGroup = async (
63
- params: ICreateAtlasGroupParams,
64
- body: ICreateAtlasGroupBody,
65
- ): Promise<ICreateAtlasGroupResponse> => {
66
- return (
67
- await AbyssToolsCore.axios.post<ICreateAtlasGroupResponse>(`atlas/${params.atlasId}/group`, body)
68
- ).data;
69
- };
1
+ import { AbyssToolsCore } from '..';
2
+ import {
3
+ ICreateAtlasGroupBody,
4
+ ICreateAtlasGroupParams,
5
+ ICreateAtlasGroupResponse,
6
+ IDeleteAtlasGroupParams,
7
+ IDeleteAtlasGroupResponse,
8
+ IGetAtlasGroupParams,
9
+ IGetAtlasGroupResponse,
10
+ IPaginateAtlasGroupParams,
11
+ IPaginateAtlasGroupQuery,
12
+ IPaginateAtlasGroupResponse,
13
+ IUpdateAtlasGroupBody,
14
+ IUpdateAtlasGroupParams,
15
+ IUpdateAtlasGroupResponse,
16
+ } from '../types';
17
+
18
+ export const paginateAtlasGroup = async (
19
+ params: IPaginateAtlasGroupParams,
20
+ query: IPaginateAtlasGroupQuery,
21
+ ): Promise<IPaginateAtlasGroupResponse> => {
22
+ return (
23
+ await AbyssToolsCore.axios.get<IPaginateAtlasGroupResponse>(
24
+ `atlas/${params.atlasId}/group/paginate`,
25
+ { params: query },
26
+ )
27
+ ).data;
28
+ };
29
+
30
+ export const getAtlasGroup = async (
31
+ params: IGetAtlasGroupParams,
32
+ ): Promise<IGetAtlasGroupResponse> => {
33
+ return (
34
+ await AbyssToolsCore.axios.get<IGetAtlasGroupResponse>(
35
+ `atlas/${params.atlasId}/group/${params.atlasGroupId}`,
36
+ )
37
+ ).data;
38
+ };
39
+
40
+ export const deleteAtlasGroup = async (
41
+ params: IDeleteAtlasGroupParams,
42
+ ): Promise<IDeleteAtlasGroupResponse> => {
43
+ return (
44
+ await AbyssToolsCore.axios.delete<IDeleteAtlasGroupResponse>(
45
+ `atlas/${params.atlasId}/group/${params.atlasGroupId}`,
46
+ )
47
+ ).data;
48
+ };
49
+
50
+ export const updateAtlasGroup = async (
51
+ params: IUpdateAtlasGroupParams,
52
+ body: IUpdateAtlasGroupBody,
53
+ ): Promise<IUpdateAtlasGroupResponse> => {
54
+ return (
55
+ await AbyssToolsCore.axios.put<IUpdateAtlasGroupResponse>(
56
+ `atlas/${params.atlasId}/group/${params.atlasGroupId}`,
57
+ body,
58
+ )
59
+ ).data;
60
+ };
61
+
62
+ export const createAtlasGroup = async (
63
+ params: ICreateAtlasGroupParams,
64
+ body: ICreateAtlasGroupBody,
65
+ ): Promise<ICreateAtlasGroupResponse> => {
66
+ return (
67
+ await AbyssToolsCore.axios.post<ICreateAtlasGroupResponse>(`atlas/${params.atlasId}/group`, body)
68
+ ).data;
69
+ };
@@ -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
+ };