@abyss-project/main 1.0.63 → 1.0.65

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 (92) hide show
  1. package/dist/api/draw.api.d.ts +8 -0
  2. package/dist/api/draw.api.js +36 -0
  3. package/dist/api/draw.public.api.d.ts +5 -0
  4. package/dist/api/draw.public.api.js +20 -0
  5. package/dist/api/index.d.ts +7 -0
  6. package/dist/api/index.js +7 -0
  7. package/dist/api/retrospective-card.api.d.ts +6 -0
  8. package/dist/api/retrospective-card.api.js +26 -0
  9. package/dist/api/retrospective-member.api.d.ts +5 -0
  10. package/dist/api/retrospective-member.api.js +20 -0
  11. package/dist/api/retrospective-section.api.d.ts +6 -0
  12. package/dist/api/retrospective-section.api.js +26 -0
  13. package/dist/api/retrospective.api.d.ts +8 -0
  14. package/dist/api/retrospective.api.js +34 -0
  15. package/dist/api/retrospective.public.api.d.ts +11 -0
  16. package/dist/api/retrospective.public.api.js +44 -0
  17. package/dist/index.d.ts +2 -0
  18. package/dist/index.js +6 -1
  19. package/dist/server-sent-events/index.d.ts +2 -1
  20. package/dist/server-sent-events/index.js +1 -0
  21. package/dist/server-sent-events/protocols/index.d.ts +1 -0
  22. package/dist/server-sent-events/protocols/index.js +1 -0
  23. package/dist/server-sent-events/protocols/retrospective/index.d.ts +1 -0
  24. package/dist/server-sent-events/protocols/retrospective/index.js +17 -0
  25. package/dist/server-sent-events/protocols/retrospective/retrospective.sse-protocol.d.ts +73 -0
  26. package/dist/server-sent-events/protocols/retrospective/retrospective.sse-protocol.js +22 -0
  27. package/dist/server-sent-events/server-sent-events.manager.d.ts +1 -1
  28. package/dist/server-sent-events/server-sent-events.manager.js +2 -1
  29. package/dist/types/draw.type.d.ts +106 -0
  30. package/dist/types/draw.type.js +14 -0
  31. package/dist/types/enum/abyss-application-event.enum.d.ts +24 -2
  32. package/dist/types/enum/abyss-application-event.enum.js +24 -2
  33. package/dist/types/enum/api-error.enum.d.ts +2 -1
  34. package/dist/types/enum/api-error.enum.js +1 -0
  35. package/dist/types/index.d.ts +1 -0
  36. package/dist/types/index.js +1 -0
  37. package/dist/types/interface/api/index.d.ts +14 -0
  38. package/dist/types/interface/api/index.js +14 -0
  39. package/dist/types/interface/api/requests/draw.public.request.d.ts +17 -0
  40. package/dist/types/interface/api/requests/draw.public.request.js +2 -0
  41. package/dist/types/interface/api/requests/draw.request.d.ts +31 -0
  42. package/dist/types/interface/api/requests/draw.request.js +2 -0
  43. package/dist/types/interface/api/requests/retrospective-card.request.d.ts +32 -0
  44. package/dist/types/interface/api/requests/retrospective-card.request.js +2 -0
  45. package/dist/types/interface/api/requests/retrospective-member.request.d.ts +17 -0
  46. package/dist/types/interface/api/requests/retrospective-member.request.js +2 -0
  47. package/dist/types/interface/api/requests/retrospective-section.request.d.ts +36 -0
  48. package/dist/types/interface/api/requests/retrospective-section.request.js +2 -0
  49. package/dist/types/interface/api/requests/retrospective.public.request.d.ts +71 -0
  50. package/dist/types/interface/api/requests/retrospective.public.request.js +2 -0
  51. package/dist/types/interface/api/requests/retrospective.request.d.ts +39 -0
  52. package/dist/types/interface/api/requests/retrospective.request.js +2 -0
  53. package/dist/types/interface/api/responses/draw.public.response.d.ts +17 -0
  54. package/dist/types/interface/api/responses/draw.public.response.js +2 -0
  55. package/dist/types/interface/api/responses/draw.response.d.ts +18 -0
  56. package/dist/types/interface/api/responses/draw.response.js +2 -0
  57. package/dist/types/interface/api/responses/project.response.d.ts +7 -0
  58. package/dist/types/interface/api/responses/retrospective-card.response.d.ts +18 -0
  59. package/dist/types/interface/api/responses/retrospective-card.response.js +2 -0
  60. package/dist/types/interface/api/responses/retrospective-member.response.d.ts +18 -0
  61. package/dist/types/interface/api/responses/retrospective-member.response.js +2 -0
  62. package/dist/types/interface/api/responses/retrospective-section.response.d.ts +18 -0
  63. package/dist/types/interface/api/responses/retrospective-section.response.js +2 -0
  64. package/dist/types/interface/api/responses/retrospective.public.response.d.ts +36 -0
  65. package/dist/types/interface/api/responses/retrospective.public.response.js +2 -0
  66. package/dist/types/interface/api/responses/retrospective.response.d.ts +18 -0
  67. package/dist/types/interface/api/responses/retrospective.response.js +2 -0
  68. package/dist/types/interface/index.d.ts +5 -0
  69. package/dist/types/interface/index.js +5 -0
  70. package/dist/types/interface/models/draw.model.d.ts +20 -0
  71. package/dist/types/interface/models/draw.model.js +2 -0
  72. package/dist/types/interface/models/project.model.d.ts +2 -0
  73. package/dist/types/interface/models/retrospective-card.model.d.ts +14 -0
  74. package/dist/types/interface/models/retrospective-card.model.js +2 -0
  75. package/dist/types/interface/models/retrospective-member.model.d.ts +12 -0
  76. package/dist/types/interface/models/retrospective-member.model.js +2 -0
  77. package/dist/types/interface/models/retrospective-section.model.d.ts +13 -0
  78. package/dist/types/interface/models/retrospective-section.model.js +2 -0
  79. package/dist/types/interface/models/retrospective.model.d.ts +24 -0
  80. package/dist/types/interface/models/retrospective.model.js +2 -0
  81. package/dist/types/interface/models/user.model.d.ts +2 -0
  82. package/dist/utils/compression.utils.d.ts +2 -0
  83. package/dist/utils/compression.utils.js +12 -0
  84. package/dist/utils/file.utils.d.ts +1 -0
  85. package/dist/utils/file.utils.js +22 -0
  86. package/dist/utils/icons.utils.d.ts +75 -0
  87. package/dist/utils/icons.utils.js +86 -0
  88. package/dist/utils/index.d.ts +4 -0
  89. package/dist/utils/index.js +4 -0
  90. package/dist/utils/shape.utils.d.ts +22 -0
  91. package/dist/utils/shape.utils.js +181 -0
  92. package/package.json +2 -1
@@ -0,0 +1,8 @@
1
+ import { ICreateDrawBody, ICreateDrawResponse, ICreateForProjectDrawParams, IDeleteDrawParams, IDeleteDrawResponse, IGetDrawParams, IGetDrawResponse, IPaginateDrawQuery, IPaginateDrawResponse, IPaginateProjectDrawParams, IUpdateDrawBody, IUpdateDrawParams, IUpdateDrawResponse } from '../types';
2
+ export declare const paginateDraw: (query: IPaginateDrawQuery) => Promise<IPaginateDrawResponse>;
3
+ export declare const paginateProjectDraw: (params: IPaginateProjectDrawParams, query: IPaginateDrawQuery) => Promise<IPaginateDrawResponse>;
4
+ export declare const getDraw: (params: IGetDrawParams) => Promise<IGetDrawResponse>;
5
+ export declare const deleteDraw: (params: IDeleteDrawParams) => Promise<IDeleteDrawResponse>;
6
+ export declare const updateDraw: (params: IUpdateDrawParams, body: IUpdateDrawBody) => Promise<IUpdateDrawResponse>;
7
+ export declare const createDraw: (body: ICreateDrawBody) => Promise<ICreateDrawResponse>;
8
+ export declare const createForProjectDraw: (params: ICreateForProjectDrawParams, body: ICreateDrawBody) => Promise<ICreateDrawResponse>;
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createForProjectDraw = exports.createDraw = exports.updateDraw = exports.deleteDraw = exports.getDraw = exports.paginateProjectDraw = exports.paginateDraw = void 0;
4
+ const __1 = require("..");
5
+ const paginateDraw = async (query) => {
6
+ return (await __1.AbyssCore.axios.get(`draw/paginate`, { params: query }))
7
+ .data;
8
+ };
9
+ exports.paginateDraw = paginateDraw;
10
+ const paginateProjectDraw = async (params, query) => {
11
+ return (await __1.AbyssCore.axios.get(`project/${params.projectId}/draw/paginate`, {
12
+ params: query,
13
+ })).data;
14
+ };
15
+ exports.paginateProjectDraw = paginateProjectDraw;
16
+ const getDraw = async (params) => {
17
+ return (await __1.AbyssCore.axios.get(`draw/${params.drawId}`)).data;
18
+ };
19
+ exports.getDraw = getDraw;
20
+ const deleteDraw = async (params) => {
21
+ return (await __1.AbyssCore.axios.delete(`draw/${params.drawId}`)).data;
22
+ };
23
+ exports.deleteDraw = deleteDraw;
24
+ const updateDraw = async (params, body) => {
25
+ return (await __1.AbyssCore.axios.put(`draw/${params.drawId}`, body)).data;
26
+ };
27
+ exports.updateDraw = updateDraw;
28
+ const createDraw = async (body) => {
29
+ return (await __1.AbyssCore.axios.post(`draw`, body)).data;
30
+ };
31
+ exports.createDraw = createDraw;
32
+ const createForProjectDraw = async (params, body) => {
33
+ return (await __1.AbyssCore.axios.post(`draw/project/${params.projectId}`, body))
34
+ .data;
35
+ };
36
+ exports.createForProjectDraw = createForProjectDraw;
@@ -0,0 +1,5 @@
1
+ import { ICreateDrawPublicBody, ICreateDrawPublicResponse, IDeleteDrawPublicParams, IDeleteDrawPublicResponse, IGetDrawPublicParams, IGetDrawPublicResponse, IUpdateDrawPublicBody, IUpdateDrawPublicParams, IUpdateDrawPublicResponse } from '../types';
2
+ export declare const getDrawPublic: (params: IGetDrawPublicParams) => Promise<IGetDrawPublicResponse>;
3
+ export declare const deleteDrawPublic: (params: IDeleteDrawPublicParams) => Promise<IDeleteDrawPublicResponse>;
4
+ export declare const updateDrawPublic: (params: IUpdateDrawPublicParams, body: IUpdateDrawPublicBody) => Promise<IUpdateDrawPublicResponse>;
5
+ export declare const createDrawPublic: (body: ICreateDrawPublicBody) => Promise<ICreateDrawPublicResponse>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createDrawPublic = exports.updateDrawPublic = exports.deleteDrawPublic = exports.getDrawPublic = void 0;
4
+ const __1 = require("..");
5
+ const getDrawPublic = async (params) => {
6
+ return (await __1.AbyssCore.axios.get(`draw/public/${params.publicAccessToken}`)).data;
7
+ };
8
+ exports.getDrawPublic = getDrawPublic;
9
+ const deleteDrawPublic = async (params) => {
10
+ return (await __1.AbyssCore.axios.delete(`draw/public/${params.publicAccessToken}`)).data;
11
+ };
12
+ exports.deleteDrawPublic = deleteDrawPublic;
13
+ const updateDrawPublic = async (params, body) => {
14
+ return (await __1.AbyssCore.axios.put(`draw/public/${params.publicAccessToken}`, body)).data;
15
+ };
16
+ exports.updateDrawPublic = updateDrawPublic;
17
+ const createDrawPublic = async (body) => {
18
+ return (await __1.AbyssCore.axios.post(`draw/public`, body)).data;
19
+ };
20
+ exports.createDrawPublic = createDrawPublic;
@@ -29,3 +29,10 @@ export * from './board-label.api';
29
29
  export * from './board-card-comment.api';
30
30
  export * from './board-card-checklist.api';
31
31
  export * from './board-card-document.api';
32
+ export * from './draw.api';
33
+ export * from './draw.public.api';
34
+ export * from './retrospective.api';
35
+ export * from './retrospective-card.api';
36
+ export * from './retrospective-member.api';
37
+ export * from './retrospective-section.api';
38
+ export * from './retrospective.public.api';
package/dist/api/index.js CHANGED
@@ -45,3 +45,10 @@ __exportStar(require("./board-label.api"), exports);
45
45
  __exportStar(require("./board-card-comment.api"), exports);
46
46
  __exportStar(require("./board-card-checklist.api"), exports);
47
47
  __exportStar(require("./board-card-document.api"), exports);
48
+ __exportStar(require("./draw.api"), exports);
49
+ __exportStar(require("./draw.public.api"), exports);
50
+ __exportStar(require("./retrospective.api"), exports);
51
+ __exportStar(require("./retrospective-card.api"), exports);
52
+ __exportStar(require("./retrospective-member.api"), exports);
53
+ __exportStar(require("./retrospective-section.api"), exports);
54
+ __exportStar(require("./retrospective.public.api"), exports);
@@ -0,0 +1,6 @@
1
+ import { IGetRetrospectiveCardParams, IGetRetrospectiveCardResponse, IPaginateRetrospectiveCardParams, IPaginateRetrospectiveCardQuery, IPaginateRetrospectiveCardResponse, ICreateRetrospectiveCardParams, ICreateRetrospectiveCardBody, ICreateRetrospectiveCardResponse, IUpdateRetrospectiveCardParams, IUpdateRetrospectiveCardBody, IUpdateRetrospectiveCardResponse, IDeleteRetrospectiveCardParams, IDeleteRetrospectiveCardResponse } from '../types';
2
+ export declare const getRetrospectiveCard: (params: IGetRetrospectiveCardParams) => Promise<IGetRetrospectiveCardResponse>;
3
+ export declare const paginateRetrospectiveCard: (params: IPaginateRetrospectiveCardParams, query?: IPaginateRetrospectiveCardQuery) => Promise<IPaginateRetrospectiveCardResponse>;
4
+ export declare const createRetrospectiveCard: (params: ICreateRetrospectiveCardParams, body: ICreateRetrospectiveCardBody) => Promise<ICreateRetrospectiveCardResponse>;
5
+ export declare const updateRetrospectiveCard: (params: IUpdateRetrospectiveCardParams, body: IUpdateRetrospectiveCardBody) => Promise<IUpdateRetrospectiveCardResponse>;
6
+ export declare const deleteRetrospectiveCard: (params: IDeleteRetrospectiveCardParams) => Promise<IDeleteRetrospectiveCardResponse>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteRetrospectiveCard = exports.updateRetrospectiveCard = exports.createRetrospectiveCard = exports.paginateRetrospectiveCard = exports.getRetrospectiveCard = void 0;
4
+ const __1 = require("..");
5
+ const getRetrospectiveCard = async (params) => {
6
+ return (await __1.AbyssCore.axios.get(`retrospective/${params.retrospectiveId}/card/${params.retrospectiveCardId}`)).data;
7
+ };
8
+ exports.getRetrospectiveCard = getRetrospectiveCard;
9
+ const paginateRetrospectiveCard = async (params, query) => {
10
+ return (await __1.AbyssCore.axios.get(`retrospective/${params.retrospectiveId}/card/paginate`, {
11
+ params: query,
12
+ })).data;
13
+ };
14
+ exports.paginateRetrospectiveCard = paginateRetrospectiveCard;
15
+ const createRetrospectiveCard = async (params, body) => {
16
+ return (await __1.AbyssCore.axios.post(`retrospective/${params.retrospectiveId}/card`, body)).data;
17
+ };
18
+ exports.createRetrospectiveCard = createRetrospectiveCard;
19
+ const updateRetrospectiveCard = async (params, body) => {
20
+ return (await __1.AbyssCore.axios.put(`retrospective/${params.retrospectiveId}/card/${params.retrospectiveCardId}`, body)).data;
21
+ };
22
+ exports.updateRetrospectiveCard = updateRetrospectiveCard;
23
+ const deleteRetrospectiveCard = async (params) => {
24
+ return (await __1.AbyssCore.axios.delete(`retrospective/${params.retrospectiveId}/card/${params.retrospectiveCardId}`)).data;
25
+ };
26
+ exports.deleteRetrospectiveCard = deleteRetrospectiveCard;
@@ -0,0 +1,5 @@
1
+ import { IGetRetrospectiveMemberParams, IGetRetrospectiveMemberResponse, IListRetrospectiveMemberParams, IListRetrospectiveMemberResponse, IJoinRetrospectiveMemberParams, IJoinRetrospectiveMemberResponse, IUpdateRetrospectiveMemberParams, IUpdateRetrospectiveMemberBody, IUpdateRetrospectiveMemberResponse } from '../types';
2
+ export declare const getRetrospectiveMember: (params: IGetRetrospectiveMemberParams) => Promise<IGetRetrospectiveMemberResponse>;
3
+ export declare const listRetrospectiveMember: (params: IListRetrospectiveMemberParams) => Promise<IListRetrospectiveMemberResponse>;
4
+ export declare const joinRetrospectiveMember: (params: IJoinRetrospectiveMemberParams) => Promise<IJoinRetrospectiveMemberResponse>;
5
+ export declare const updateRetrospectiveMember: (params: IUpdateRetrospectiveMemberParams, body: IUpdateRetrospectiveMemberBody) => Promise<IUpdateRetrospectiveMemberResponse>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateRetrospectiveMember = exports.joinRetrospectiveMember = exports.listRetrospectiveMember = exports.getRetrospectiveMember = void 0;
4
+ const __1 = require("..");
5
+ const getRetrospectiveMember = async (params) => {
6
+ return (await __1.AbyssCore.axios.get(`retrospective/${params.retrospectiveId}/member/${params.retrospectiveMemberId}`)).data;
7
+ };
8
+ exports.getRetrospectiveMember = getRetrospectiveMember;
9
+ const listRetrospectiveMember = async (params) => {
10
+ return (await __1.AbyssCore.axios.get(`retrospective/${params.retrospectiveId}/member/list`)).data;
11
+ };
12
+ exports.listRetrospectiveMember = listRetrospectiveMember;
13
+ const joinRetrospectiveMember = async (params) => {
14
+ return (await __1.AbyssCore.axios.post(`retrospective/${params.retrospectiveId}/member/join`)).data;
15
+ };
16
+ exports.joinRetrospectiveMember = joinRetrospectiveMember;
17
+ const updateRetrospectiveMember = async (params, body) => {
18
+ return (await __1.AbyssCore.axios.put(`retrospective/${params.retrospectiveId}/member`, body)).data;
19
+ };
20
+ exports.updateRetrospectiveMember = updateRetrospectiveMember;
@@ -0,0 +1,6 @@
1
+ import { IGetRetrospectiveSectionParams, IGetRetrospectiveSectionResponse, IPaginateRetrospectiveSectionParams, IPaginateRetrospectiveSectionQuery, IPaginateRetrospectiveSectionResponse, ICreateRetrospectiveSectionParams, ICreateRetrospectiveSectionBody, ICreateRetrospectiveSectionResponse, IUpdateRetrospectiveSectionParams, IUpdateRetrospectiveSectionBody, IUpdateRetrospectiveSectionResponse, IDeleteRetrospectiveSectionParams, IDeleteRetrospectiveSectionResponse } from '../types';
2
+ export declare const getRetrospectiveSection: (params: IGetRetrospectiveSectionParams) => Promise<IGetRetrospectiveSectionResponse>;
3
+ export declare const paginateRetrospectiveSection: (params: IPaginateRetrospectiveSectionParams, query?: IPaginateRetrospectiveSectionQuery) => Promise<IPaginateRetrospectiveSectionResponse>;
4
+ export declare const createRetrospectiveSection: (params: ICreateRetrospectiveSectionParams, body: ICreateRetrospectiveSectionBody) => Promise<ICreateRetrospectiveSectionResponse>;
5
+ export declare const updateRetrospectiveSection: (params: IUpdateRetrospectiveSectionParams, body: IUpdateRetrospectiveSectionBody) => Promise<IUpdateRetrospectiveSectionResponse>;
6
+ export declare const deleteRetrospectiveSection: (params: IDeleteRetrospectiveSectionParams) => Promise<IDeleteRetrospectiveSectionResponse>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteRetrospectiveSection = exports.updateRetrospectiveSection = exports.createRetrospectiveSection = exports.paginateRetrospectiveSection = exports.getRetrospectiveSection = void 0;
4
+ const __1 = require("..");
5
+ const getRetrospectiveSection = async (params) => {
6
+ return (await __1.AbyssCore.axios.get(`retrospective/${params.retrospectiveId}/section/${params.retrospectiveSectionId}`)).data;
7
+ };
8
+ exports.getRetrospectiveSection = getRetrospectiveSection;
9
+ const paginateRetrospectiveSection = async (params, query) => {
10
+ return (await __1.AbyssCore.axios.get(`retrospective/${params.retrospectiveId}/section/paginate`, {
11
+ params: query,
12
+ })).data;
13
+ };
14
+ exports.paginateRetrospectiveSection = paginateRetrospectiveSection;
15
+ const createRetrospectiveSection = async (params, body) => {
16
+ return (await __1.AbyssCore.axios.post(`retrospective/${params.retrospectiveId}/section`, body)).data;
17
+ };
18
+ exports.createRetrospectiveSection = createRetrospectiveSection;
19
+ const updateRetrospectiveSection = async (params, body) => {
20
+ return (await __1.AbyssCore.axios.put(`retrospective/${params.retrospectiveId}/section/${params.retrospectiveSectionId}`, body)).data;
21
+ };
22
+ exports.updateRetrospectiveSection = updateRetrospectiveSection;
23
+ const deleteRetrospectiveSection = async (params) => {
24
+ return (await __1.AbyssCore.axios.delete(`retrospective/${params.retrospectiveId}/section/${params.retrospectiveSectionId}`)).data;
25
+ };
26
+ exports.deleteRetrospectiveSection = deleteRetrospectiveSection;
@@ -0,0 +1,8 @@
1
+ import { IGetRetrospectiveParams, IGetRetrospectiveResponse, IPaginateProjectRetrospectiveParams, IPaginateRetrospectiveQuery, IPaginateRetrospectiveResponse, ICreateForProjectRetrospectiveParams, ICreateRetrospectiveBody, ICreateRetrospectiveResponse, IUpdateRetrospectiveParams, IUpdateRetrospectiveBody, IUpdateRetrospectiveResponse, IDeleteRetrospectiveParams, IDeleteRetrospectiveResponse } from '../types';
2
+ export declare const getRetrospective: (params: IGetRetrospectiveParams) => Promise<IGetRetrospectiveResponse>;
3
+ export declare const paginateProjectRetrospective: (params: IPaginateProjectRetrospectiveParams, query?: IPaginateRetrospectiveQuery) => Promise<IPaginateRetrospectiveResponse>;
4
+ export declare const paginateRetrospective: (query?: IPaginateRetrospectiveQuery) => Promise<IPaginateRetrospectiveResponse>;
5
+ export declare const createForProjectRetrospective: (params: ICreateForProjectRetrospectiveParams, body: ICreateRetrospectiveBody) => Promise<ICreateRetrospectiveResponse>;
6
+ export declare const createRetrospective: (body: ICreateRetrospectiveBody) => Promise<ICreateRetrospectiveResponse>;
7
+ export declare const updateRetrospective: (params: IUpdateRetrospectiveParams, body: IUpdateRetrospectiveBody) => Promise<IUpdateRetrospectiveResponse>;
8
+ export declare const deleteRetrospective: (params: IDeleteRetrospectiveParams) => Promise<IDeleteRetrospectiveResponse>;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteRetrospective = exports.updateRetrospective = exports.createRetrospective = exports.createForProjectRetrospective = exports.paginateRetrospective = exports.paginateProjectRetrospective = exports.getRetrospective = void 0;
4
+ const __1 = require("..");
5
+ const getRetrospective = async (params) => {
6
+ return (await __1.AbyssCore.axios.get(`retrospective/${params.retrospectiveId}`)).data;
7
+ };
8
+ exports.getRetrospective = getRetrospective;
9
+ const paginateProjectRetrospective = async (params, query) => {
10
+ return (await __1.AbyssCore.axios.get(`project/${params.projectId}/retrospective/paginate`, { params: query })).data;
11
+ };
12
+ exports.paginateProjectRetrospective = paginateProjectRetrospective;
13
+ const paginateRetrospective = async (query) => {
14
+ return (await __1.AbyssCore.axios.get(`retrospective/paginate`, {
15
+ params: query,
16
+ })).data;
17
+ };
18
+ exports.paginateRetrospective = paginateRetrospective;
19
+ const createForProjectRetrospective = async (params, body) => {
20
+ return (await __1.AbyssCore.axios.post(`project/${params.projectId}/retrospective`, body)).data;
21
+ };
22
+ exports.createForProjectRetrospective = createForProjectRetrospective;
23
+ const createRetrospective = async (body) => {
24
+ return (await __1.AbyssCore.axios.post(`retrospective`, body)).data;
25
+ };
26
+ exports.createRetrospective = createRetrospective;
27
+ const updateRetrospective = async (params, body) => {
28
+ return (await __1.AbyssCore.axios.put(`retrospective/${params.retrospectiveId}`, body)).data;
29
+ };
30
+ exports.updateRetrospective = updateRetrospective;
31
+ const deleteRetrospective = async (params) => {
32
+ return (await __1.AbyssCore.axios.delete(`retrospective/${params.retrospectiveId}`)).data;
33
+ };
34
+ exports.deleteRetrospective = deleteRetrospective;
@@ -0,0 +1,11 @@
1
+ import { IGetRetrospectivePublicParams, IGetRetrospectivePublicResponse, IUpdateRetrospectivePublicParams, IUpdateRetrospectivePublicBody, IUpdateRetrospectivePublicResponse, ICreateSectionRetrospectivePublicParams, ICreateSectionRetrospectivePublicBody, ICreateSectionRetrospectivePublicResponse, IUpdateSectionRetrospectivePublicParams, IUpdateSectionRetrospectivePublicBody, IUpdateSectionRetrospectivePublicResponse, IDeleteSectionRetrospectivePublicParams, IDeleteSectionRetrospectivePublicResponse, IJoinMemberRetrospectivePublicParams, IJoinMemberRetrospectivePublicResponse, IUpdateMemberRetrospectivePublicParams, IUpdateMemberRetrospectivePublicBody, IUpdateMemberRetrospectivePublicResponse, ICreateCardRetrospectivePublicParams, ICreateCardRetrospectivePublicBody, ICreateCardRetrospectivePublicResponse, IUpdateCardRetrospectivePublicParams, IUpdateCardRetrospectivePublicBody, IUpdateCardRetrospectivePublicResponse, IDeleteCardRetrospectivePublicParams, IDeleteCardRetrospectivePublicResponse } from '../types';
2
+ export declare const getRetrospectivePublic: (params: IGetRetrospectivePublicParams) => Promise<IGetRetrospectivePublicResponse>;
3
+ export declare const updateRetrospectivePublic: (params: IUpdateRetrospectivePublicParams, body: IUpdateRetrospectivePublicBody) => Promise<IUpdateRetrospectivePublicResponse>;
4
+ export declare const createSectionRetrospectivePublic: (params: ICreateSectionRetrospectivePublicParams, body: ICreateSectionRetrospectivePublicBody) => Promise<ICreateSectionRetrospectivePublicResponse>;
5
+ export declare const updateSectionRetrospectivePublic: (params: IUpdateSectionRetrospectivePublicParams, body: IUpdateSectionRetrospectivePublicBody) => Promise<IUpdateSectionRetrospectivePublicResponse>;
6
+ export declare const deleteSectionRetrospectivePublic: (params: IDeleteSectionRetrospectivePublicParams) => Promise<IDeleteSectionRetrospectivePublicResponse>;
7
+ export declare const joinMemberRetrospectivePublic: (params: IJoinMemberRetrospectivePublicParams) => Promise<IJoinMemberRetrospectivePublicResponse>;
8
+ export declare const updateMemberRetrospectivePublic: (params: IUpdateMemberRetrospectivePublicParams, body: IUpdateMemberRetrospectivePublicBody) => Promise<IUpdateMemberRetrospectivePublicResponse>;
9
+ export declare const createCardRetrospectivePublic: (params: ICreateCardRetrospectivePublicParams, body: ICreateCardRetrospectivePublicBody) => Promise<ICreateCardRetrospectivePublicResponse>;
10
+ export declare const updateCardRetrospectivePublic: (params: IUpdateCardRetrospectivePublicParams, body: IUpdateCardRetrospectivePublicBody) => Promise<IUpdateCardRetrospectivePublicResponse>;
11
+ export declare const deleteCardRetrospectivePublic: (params: IDeleteCardRetrospectivePublicParams) => Promise<IDeleteCardRetrospectivePublicResponse>;
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.deleteCardRetrospectivePublic = exports.updateCardRetrospectivePublic = exports.createCardRetrospectivePublic = exports.updateMemberRetrospectivePublic = exports.joinMemberRetrospectivePublic = exports.deleteSectionRetrospectivePublic = exports.updateSectionRetrospectivePublic = exports.createSectionRetrospectivePublic = exports.updateRetrospectivePublic = exports.getRetrospectivePublic = void 0;
4
+ const __1 = require("..");
5
+ const getRetrospectivePublic = async (params) => {
6
+ return (await __1.AbyssCore.axios.get(`retrospective/public/${params.accessToken}`)).data;
7
+ };
8
+ exports.getRetrospectivePublic = getRetrospectivePublic;
9
+ const updateRetrospectivePublic = async (params, body) => {
10
+ return (await __1.AbyssCore.axios.put(`retrospective/public/${params.accessToken}`, body)).data;
11
+ };
12
+ exports.updateRetrospectivePublic = updateRetrospectivePublic;
13
+ const createSectionRetrospectivePublic = async (params, body) => {
14
+ return (await __1.AbyssCore.axios.post(`retrospective/public/${params.accessToken}/section`, body)).data;
15
+ };
16
+ exports.createSectionRetrospectivePublic = createSectionRetrospectivePublic;
17
+ const updateSectionRetrospectivePublic = async (params, body) => {
18
+ return (await __1.AbyssCore.axios.put(`retrospective/public/${params.accessToken}/section/${params.retrospectiveSectionId}`, body)).data;
19
+ };
20
+ exports.updateSectionRetrospectivePublic = updateSectionRetrospectivePublic;
21
+ const deleteSectionRetrospectivePublic = async (params) => {
22
+ return (await __1.AbyssCore.axios.delete(`retrospective/public/${params.accessToken}/section/${params.retrospectiveSectionId}`)).data;
23
+ };
24
+ exports.deleteSectionRetrospectivePublic = deleteSectionRetrospectivePublic;
25
+ const joinMemberRetrospectivePublic = async (params) => {
26
+ return (await __1.AbyssCore.axios.post(`retrospective/public/${params.accessToken}/member/join`)).data;
27
+ };
28
+ exports.joinMemberRetrospectivePublic = joinMemberRetrospectivePublic;
29
+ const updateMemberRetrospectivePublic = async (params, body) => {
30
+ return (await __1.AbyssCore.axios.put(`retrospective/public/${params.accessToken}/member`, body)).data;
31
+ };
32
+ exports.updateMemberRetrospectivePublic = updateMemberRetrospectivePublic;
33
+ const createCardRetrospectivePublic = async (params, body) => {
34
+ return (await __1.AbyssCore.axios.post(`retrospective/public/${params.accessToken}/card`, body)).data;
35
+ };
36
+ exports.createCardRetrospectivePublic = createCardRetrospectivePublic;
37
+ const updateCardRetrospectivePublic = async (params, body) => {
38
+ return (await __1.AbyssCore.axios.put(`retrospective/public/${params.accessToken}/card/${params.retrospectiveCardId}`, body)).data;
39
+ };
40
+ exports.updateCardRetrospectivePublic = updateCardRetrospectivePublic;
41
+ const deleteCardRetrospectivePublic = async (params) => {
42
+ return (await __1.AbyssCore.axios.delete(`retrospective/public/${params.accessToken}/card/${params.retrospectiveCardId}`)).data;
43
+ };
44
+ exports.deleteCardRetrospectivePublic = deleteCardRetrospectivePublic;
package/dist/index.d.ts CHANGED
@@ -9,11 +9,13 @@ export * from './server-sent-events';
9
9
  export declare const DISCORD_URL = "https://discord.gg/PVMNgxJb8W";
10
10
  export declare const API_KEY_PROJECT_HEADER = "abyss-main-project-api-key";
11
11
  export declare const ADMIN_TOKEN_HEADER = "abyss-admin-token";
12
+ export declare const ABYSS_USER_ANONYMOUS_IDENTIFIER = "abyss_user_anonymous_identifier";
12
13
  type CoreConfig = {
13
14
  token?: string;
14
15
  projectApiKey?: string;
15
16
  adminToken?: string;
16
17
  baseURL?: string;
18
+ abyssUserAnonymousIdentifier?: string;
17
19
  };
18
20
  export declare class AbyssCore {
19
21
  private static config;
package/dist/index.js CHANGED
@@ -30,7 +30,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
30
30
  };
31
31
  var _a;
32
32
  Object.defineProperty(exports, "__esModule", { value: true });
33
- exports.AbyssCore = exports.ADMIN_TOKEN_HEADER = exports.API_KEY_PROJECT_HEADER = exports.DISCORD_URL = void 0;
33
+ exports.AbyssCore = exports.ABYSS_USER_ANONYMOUS_IDENTIFIER = exports.ADMIN_TOKEN_HEADER = exports.API_KEY_PROJECT_HEADER = exports.DISCORD_URL = void 0;
34
34
  const axios_1 = __importDefault(require("axios"));
35
35
  const axios_retry_1 = __importStar(require("axios-retry"));
36
36
  __exportStar(require("./api"), exports);
@@ -44,6 +44,7 @@ const DEFAULT_BASE_URL = 'https://app-api.abyss-project.fr/api/';
44
44
  exports.DISCORD_URL = 'https://discord.gg/PVMNgxJb8W';
45
45
  exports.API_KEY_PROJECT_HEADER = 'abyss-main-project-api-key';
46
46
  exports.ADMIN_TOKEN_HEADER = 'abyss-admin-token';
47
+ exports.ABYSS_USER_ANONYMOUS_IDENTIFIER = 'abyss_user_anonymous_identifier';
47
48
  const NUMBER_RETRY_API = 10;
48
49
  const BASE_DELAY_BETWEEN_RETRY = 5000;
49
50
  const RETRY_CODES = [
@@ -77,6 +78,9 @@ class AbyssCore {
77
78
  if (config.adminToken) {
78
79
  _a.axios.defaults.headers.common[exports.ADMIN_TOKEN_HEADER] = `${config.adminToken}`;
79
80
  }
81
+ if (config.abyssUserAnonymousIdentifier) {
82
+ _a.axios.defaults.headers.common[exports.ABYSS_USER_ANONYMOUS_IDENTIFIER] = `${config.abyssUserAnonymousIdentifier}`;
83
+ }
80
84
  }
81
85
  static getConfig() {
82
86
  return _a.config;
@@ -90,5 +94,6 @@ AbyssCore.config = {
90
94
  applicationId: '',
91
95
  adminToken: '',
92
96
  baseURL: DEFAULT_BASE_URL,
97
+ abyssUserAnonymousIdentifier: '',
93
98
  };
94
99
  AbyssCore.axios = axios_1.default.create({ baseURL: _a.config.baseURL });
@@ -3,5 +3,6 @@ export * from './protocols';
3
3
  export declare enum SSEChannels {
4
4
  BOARD = "sse:board",
5
5
  BOARD_CARD = "sse:board-card",
6
- USER_NOTIFICATION = "sse:user-notification"
6
+ USER_NOTIFICATION = "sse:user-notification",
7
+ RETROSPECTIVE = "sse:retrospective"
7
8
  }
@@ -22,4 +22,5 @@ var SSEChannels;
22
22
  SSEChannels["BOARD"] = "sse:board";
23
23
  SSEChannels["BOARD_CARD"] = "sse:board-card";
24
24
  SSEChannels["USER_NOTIFICATION"] = "sse:user-notification";
25
+ SSEChannels["RETROSPECTIVE"] = "sse:retrospective";
25
26
  })(SSEChannels || (exports.SSEChannels = SSEChannels = {}));
@@ -2,6 +2,7 @@ import { ValueOf } from '../..';
2
2
  export * from './user-notification';
3
3
  export * from './board';
4
4
  export * from './board-card';
5
+ export * from './retrospective';
5
6
  export declare enum SYSTEM_PROTOCOL_EVENTS {
6
7
  PING = "PING"
7
8
  }
@@ -18,6 +18,7 @@ exports.SystemSSEEventPayload = exports.SYSTEM_PROTOCOL_EVENTS = void 0;
18
18
  __exportStar(require("./user-notification"), exports);
19
19
  __exportStar(require("./board"), exports);
20
20
  __exportStar(require("./board-card"), exports);
21
+ __exportStar(require("./retrospective"), exports);
21
22
  var SYSTEM_PROTOCOL_EVENTS;
22
23
  (function (SYSTEM_PROTOCOL_EVENTS) {
23
24
  SYSTEM_PROTOCOL_EVENTS["PING"] = "PING";
@@ -0,0 +1 @@
1
+ export * from './retrospective.sse-protocol';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./retrospective.sse-protocol"), exports);
@@ -0,0 +1,73 @@
1
+ import { SystemSSEMessageContent } from '..';
2
+ import { ValueOf } from '../../../types';
3
+ import { IRetrospective, IRetrospectiveCard, IRetrospectiveSection, IRetrospectiveMember } from '../../../types/interface';
4
+ export declare enum RetrospectiveSSEEvent {
5
+ USER_NOTIFICATION_CREATED = "USER_NOTIFICATION_CREATED",
6
+ RETROSPECTIVE_UPDATED = "RETROSPECTIVE_UPDATED",
7
+ RETROSPECTIVE_DELETED = "RETROSPECTIVE_DELETED",
8
+ CARD_CREATED = "CARD_CREATED",
9
+ CARD_UPDATED = "CARD_UPDATED",
10
+ CARD_DELETED = "CARD_DELETED",
11
+ SECTION_CREATED = "SECTION_CREATED",
12
+ SECTION_UPDATED = "SECTION_UPDATED",
13
+ SECTION_DELETED = "SECTION_DELETED",
14
+ MEMBER_JOINED = "MEMBER_JOINED",
15
+ MEMBER_UPDATED = "MEMBER_UPDATED",
16
+ MEMBER_LEFT = "MEMBER_LEFT"
17
+ }
18
+ export type RetrospectiveSSEMessageContent = ValueOf<{
19
+ [K in RetrospectiveSSEEvent]: {
20
+ type: K;
21
+ payload: SourceRetrospectiveSSEEventPayload[K];
22
+ };
23
+ }>;
24
+ export declare class SourceRetrospectiveSSEEventPayload implements Record<RetrospectiveSSEEvent, Record<string, any>> {
25
+ [RetrospectiveSSEEvent.USER_NOTIFICATION_CREATED]: {
26
+ retrospectiveId: string;
27
+ };
28
+ [RetrospectiveSSEEvent.RETROSPECTIVE_UPDATED]: {
29
+ retrospectiveId: string;
30
+ retrospective: IRetrospective;
31
+ };
32
+ [RetrospectiveSSEEvent.RETROSPECTIVE_DELETED]: {
33
+ retrospectiveId: string;
34
+ userId?: string;
35
+ };
36
+ [RetrospectiveSSEEvent.CARD_CREATED]: {
37
+ retrospectiveId: string;
38
+ card: IRetrospectiveCard;
39
+ };
40
+ [RetrospectiveSSEEvent.CARD_UPDATED]: {
41
+ retrospectiveId: string;
42
+ card: IRetrospectiveCard;
43
+ };
44
+ [RetrospectiveSSEEvent.CARD_DELETED]: {
45
+ retrospectiveId: string;
46
+ cardId: string;
47
+ };
48
+ [RetrospectiveSSEEvent.SECTION_CREATED]: {
49
+ retrospectiveId: string;
50
+ section: IRetrospectiveSection;
51
+ };
52
+ [RetrospectiveSSEEvent.SECTION_UPDATED]: {
53
+ retrospectiveId: string;
54
+ section: IRetrospectiveSection;
55
+ };
56
+ [RetrospectiveSSEEvent.SECTION_DELETED]: {
57
+ retrospectiveId: string;
58
+ sectionId: string;
59
+ };
60
+ [RetrospectiveSSEEvent.MEMBER_JOINED]: {
61
+ retrospectiveId: string;
62
+ member: IRetrospectiveMember;
63
+ };
64
+ [RetrospectiveSSEEvent.MEMBER_UPDATED]: {
65
+ retrospectiveId: string;
66
+ member: IRetrospectiveMember;
67
+ };
68
+ [RetrospectiveSSEEvent.MEMBER_LEFT]: {
69
+ retrospectiveId: string;
70
+ memberId: string;
71
+ };
72
+ }
73
+ export type RetrospectiveSSEEventContent = RetrospectiveSSEMessageContent | SystemSSEMessageContent;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SourceRetrospectiveSSEEventPayload = exports.RetrospectiveSSEEvent = void 0;
4
+ var RetrospectiveSSEEvent;
5
+ (function (RetrospectiveSSEEvent) {
6
+ RetrospectiveSSEEvent["USER_NOTIFICATION_CREATED"] = "USER_NOTIFICATION_CREATED";
7
+ RetrospectiveSSEEvent["RETROSPECTIVE_UPDATED"] = "RETROSPECTIVE_UPDATED";
8
+ RetrospectiveSSEEvent["RETROSPECTIVE_DELETED"] = "RETROSPECTIVE_DELETED";
9
+ RetrospectiveSSEEvent["CARD_CREATED"] = "CARD_CREATED";
10
+ RetrospectiveSSEEvent["CARD_UPDATED"] = "CARD_UPDATED";
11
+ RetrospectiveSSEEvent["CARD_DELETED"] = "CARD_DELETED";
12
+ RetrospectiveSSEEvent["SECTION_CREATED"] = "SECTION_CREATED";
13
+ RetrospectiveSSEEvent["SECTION_UPDATED"] = "SECTION_UPDATED";
14
+ RetrospectiveSSEEvent["SECTION_DELETED"] = "SECTION_DELETED";
15
+ RetrospectiveSSEEvent["MEMBER_JOINED"] = "MEMBER_JOINED";
16
+ RetrospectiveSSEEvent["MEMBER_UPDATED"] = "MEMBER_UPDATED";
17
+ RetrospectiveSSEEvent["MEMBER_LEFT"] = "MEMBER_LEFT";
18
+ })(RetrospectiveSSEEvent || (exports.RetrospectiveSSEEvent = RetrospectiveSSEEvent = {}));
19
+ class SourceRetrospectiveSSEEventPayload {
20
+ }
21
+ exports.SourceRetrospectiveSSEEventPayload = SourceRetrospectiveSSEEventPayload;
22
+ RetrospectiveSSEEvent.USER_NOTIFICATION_CREATED, RetrospectiveSSEEvent.RETROSPECTIVE_UPDATED, RetrospectiveSSEEvent.RETROSPECTIVE_DELETED, RetrospectiveSSEEvent.CARD_CREATED, RetrospectiveSSEEvent.CARD_UPDATED, RetrospectiveSSEEvent.CARD_DELETED, RetrospectiveSSEEvent.SECTION_CREATED, RetrospectiveSSEEvent.SECTION_UPDATED, RetrospectiveSSEEvent.SECTION_DELETED, RetrospectiveSSEEvent.MEMBER_JOINED, RetrospectiveSSEEvent.MEMBER_UPDATED, RetrospectiveSSEEvent.MEMBER_LEFT;
@@ -16,7 +16,7 @@ export declare class ServerSentEventsManager<T extends ServerSentEventBaseContex
16
16
  private channel;
17
17
  private contexts;
18
18
  constructor(channelName: string);
19
- add(key: string, context: T): void;
19
+ add(key: string, context: T, onClose: () => void): void;
20
20
  sendToContext(key: string, data: P, { senderId }?: {
21
21
  senderId?: string;
22
22
  }): void;
@@ -15,7 +15,7 @@ class ServerSentEventsManager {
15
15
  this.channel = channelName;
16
16
  this.contexts = new Map();
17
17
  }
18
- add(key, context) {
18
+ add(key, context, onClose) {
19
19
  var _a, _b;
20
20
  context.res.setHeader('Content-Type', 'text/event-stream');
21
21
  context.res.setHeader('Cache-Control', 'no-cache');
@@ -40,6 +40,7 @@ class ServerSentEventsManager {
40
40
  }, 10000);
41
41
  context.res.on('close', () => {
42
42
  clearInterval(pingTimeout);
43
+ onClose();
43
44
  const row = this.contexts.get(key);
44
45
  row === null || row === void 0 ? void 0 : row.delete(context);
45
46
  });