@abyss-project/main 1.0.109 → 1.0.110
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.
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +3 -0
- package/dist/api/organization-member.api.d.ts +9 -0
- package/dist/api/organization-member.api.js +32 -0
- package/dist/api/team.api.d.ts +14 -0
- package/dist/api/team.api.js +52 -0
- package/dist/types/enum/abyss-application-event.enum.d.ts +1 -0
- package/dist/types/enum/abyss-application-event.enum.js +1 -0
- package/dist/types/enum/index.d.ts +1 -0
- package/dist/types/enum/index.js +1 -0
- package/dist/types/enum/organization-permission.enum.d.ts +13 -1
- package/dist/types/enum/organization-permission.enum.js +40 -2
- package/dist/types/interface/api/index.d.ts +4 -0
- package/dist/types/interface/api/index.js +4 -0
- package/dist/types/interface/api/requests/organization-member.request.d.ts +28 -0
- package/dist/types/interface/api/requests/organization-member.request.js +2 -0
- package/dist/types/interface/api/requests/team.request.d.ts +72 -0
- package/dist/types/interface/api/requests/team.request.js +2 -0
- package/dist/types/interface/api/responses/organization-member.response.d.ts +30 -0
- package/dist/types/interface/api/responses/organization-member.response.js +2 -0
- package/dist/types/interface/api/responses/team.response.d.ts +52 -0
- package/dist/types/interface/api/responses/team.response.js +2 -0
- package/dist/types/interface/index.d.ts +4 -0
- package/dist/types/interface/index.js +4 -0
- package/dist/types/interface/models/organization-member.model.d.ts +5 -3
- package/dist/types/interface/models/organization.model.d.ts +6 -0
- package/dist/types/interface/models/team-member.model.d.ts +11 -0
- package/dist/types/interface/models/team-member.model.js +2 -0
- package/dist/types/interface/models/team-project-access.model.d.ts +13 -0
- package/dist/types/interface/models/team-project-access.model.js +2 -0
- package/dist/types/interface/models/team.model.d.ts +19 -0
- package/dist/types/interface/models/team.model.js +2 -0
- package/dist/types/interface/models/token-history.model.d.ts +7 -1
- package/package.json +1 -1
package/dist/api/index.d.ts
CHANGED
package/dist/api/index.js
CHANGED
|
@@ -65,3 +65,6 @@ __exportStar(require("./report.api"), exports);
|
|
|
65
65
|
__exportStar(require("./report.admin.api"), exports);
|
|
66
66
|
__exportStar(require("./report.public.api"), exports);
|
|
67
67
|
__exportStar(require("./config.admin.api"), exports);
|
|
68
|
+
__exportStar(require("./organization.api"), exports);
|
|
69
|
+
__exportStar(require("./organization-member.api"), exports);
|
|
70
|
+
__exportStar(require("./team.api"), exports);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IInviteOrganizationMemberParams, IInviteOrganizationMemberBody, IListOrganizationMembersParams, IUpdateOrganizationMemberParams, IUpdateOrganizationMemberBody, IRemoveOrganizationMemberParams, IAcceptOrganizationInvitationParams, IDeclineOrganizationInvitationParams } from '../types/interface/api/requests/organization-member.request';
|
|
2
|
+
import type { IInviteOrganizationMemberResponse, IListOrganizationMembersResponse, IUpdateOrganizationMemberResponse, IRemoveOrganizationMemberResponse, IAcceptOrganizationInvitationResponse, IDeclineOrganizationInvitationResponse, IListMyOrganizationsResponse } from '../types/interface/api/responses/organization-member.response';
|
|
3
|
+
export declare const inviteOrganizationMember: (params: IInviteOrganizationMemberParams, body: IInviteOrganizationMemberBody) => Promise<IInviteOrganizationMemberResponse>;
|
|
4
|
+
export declare const listOrganizationMembers: (params: IListOrganizationMembersParams) => Promise<IListOrganizationMembersResponse>;
|
|
5
|
+
export declare const updateOrganizationMember: (params: IUpdateOrganizationMemberParams, body: IUpdateOrganizationMemberBody) => Promise<IUpdateOrganizationMemberResponse>;
|
|
6
|
+
export declare const removeOrganizationMember: (params: IRemoveOrganizationMemberParams) => Promise<IRemoveOrganizationMemberResponse>;
|
|
7
|
+
export declare const acceptOrganizationInvitation: (params: IAcceptOrganizationInvitationParams) => Promise<IAcceptOrganizationInvitationResponse>;
|
|
8
|
+
export declare const declineOrganizationInvitation: (params: IDeclineOrganizationInvitationParams) => Promise<IDeclineOrganizationInvitationResponse>;
|
|
9
|
+
export declare const listMyOrganizations: () => Promise<IListMyOrganizationsResponse>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listMyOrganizations = exports.declineOrganizationInvitation = exports.acceptOrganizationInvitation = exports.removeOrganizationMember = exports.updateOrganizationMember = exports.listOrganizationMembers = exports.inviteOrganizationMember = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const inviteOrganizationMember = async (params, body) => {
|
|
6
|
+
return (await __1.AbyssCore.axios.post(`organization/${params.organizationId}/member/invite`, body)).data;
|
|
7
|
+
};
|
|
8
|
+
exports.inviteOrganizationMember = inviteOrganizationMember;
|
|
9
|
+
const listOrganizationMembers = async (params) => {
|
|
10
|
+
return (await __1.AbyssCore.axios.get(`organization/${params.organizationId}/member`)).data;
|
|
11
|
+
};
|
|
12
|
+
exports.listOrganizationMembers = listOrganizationMembers;
|
|
13
|
+
const updateOrganizationMember = async (params, body) => {
|
|
14
|
+
return (await __1.AbyssCore.axios.put(`organization/${params.organizationId}/member/${params.memberId}/permissions`, body)).data;
|
|
15
|
+
};
|
|
16
|
+
exports.updateOrganizationMember = updateOrganizationMember;
|
|
17
|
+
const removeOrganizationMember = async (params) => {
|
|
18
|
+
return (await __1.AbyssCore.axios.delete(`organization/${params.organizationId}/member/${params.memberId}`)).data;
|
|
19
|
+
};
|
|
20
|
+
exports.removeOrganizationMember = removeOrganizationMember;
|
|
21
|
+
const acceptOrganizationInvitation = async (params) => {
|
|
22
|
+
return (await __1.AbyssCore.axios.post(`organization/member/${params.memberId}/accept`)).data;
|
|
23
|
+
};
|
|
24
|
+
exports.acceptOrganizationInvitation = acceptOrganizationInvitation;
|
|
25
|
+
const declineOrganizationInvitation = async (params) => {
|
|
26
|
+
return (await __1.AbyssCore.axios.post(`organization/member/${params.memberId}/decline`)).data;
|
|
27
|
+
};
|
|
28
|
+
exports.declineOrganizationInvitation = declineOrganizationInvitation;
|
|
29
|
+
const listMyOrganizations = async () => {
|
|
30
|
+
return (await __1.AbyssCore.axios.get(`organization/member/me`)).data;
|
|
31
|
+
};
|
|
32
|
+
exports.listMyOrganizations = listMyOrganizations;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ICreateTeamParams, ICreateTeamBody, IGetTeamParams, IListTeamsParams, IUpdateTeamParams, IUpdateTeamBody, IDeleteTeamParams, IAddTeamMemberParams, IAddTeamMemberBody, IRemoveTeamMemberParams, IListTeamMembersParams, IAddTeamProjectAccessParams, IAddTeamProjectAccessBody, IUpdateTeamProjectAccessParams, IUpdateTeamProjectAccessBody, IRemoveTeamProjectAccessParams, IListTeamProjectAccessParams } from '../types/interface/api/requests/team.request';
|
|
2
|
+
import type { ICreateTeamResponse, IGetTeamResponse, IListTeamsResponse, IUpdateTeamResponse, IDeleteTeamResponse, IAddTeamMemberResponse, IRemoveTeamMemberResponse, IListTeamMembersResponse, IAddTeamProjectAccessResponse, IUpdateTeamProjectAccessResponse, IRemoveTeamProjectAccessResponse, IListTeamProjectAccessResponse } from '../types/interface/api/responses/team.response';
|
|
3
|
+
export declare const createTeam: (params: ICreateTeamParams, body: ICreateTeamBody) => Promise<ICreateTeamResponse>;
|
|
4
|
+
export declare const getTeam: (params: IGetTeamParams) => Promise<IGetTeamResponse>;
|
|
5
|
+
export declare const listTeams: (params: IListTeamsParams) => Promise<IListTeamsResponse>;
|
|
6
|
+
export declare const updateTeam: (params: IUpdateTeamParams, body: IUpdateTeamBody) => Promise<IUpdateTeamResponse>;
|
|
7
|
+
export declare const deleteTeam: (params: IDeleteTeamParams) => Promise<IDeleteTeamResponse>;
|
|
8
|
+
export declare const addTeamMember: (params: IAddTeamMemberParams, body: IAddTeamMemberBody) => Promise<IAddTeamMemberResponse>;
|
|
9
|
+
export declare const removeTeamMember: (params: IRemoveTeamMemberParams) => Promise<IRemoveTeamMemberResponse>;
|
|
10
|
+
export declare const listTeamMembers: (params: IListTeamMembersParams) => Promise<IListTeamMembersResponse>;
|
|
11
|
+
export declare const addTeamProjectAccess: (params: IAddTeamProjectAccessParams, body: IAddTeamProjectAccessBody) => Promise<IAddTeamProjectAccessResponse>;
|
|
12
|
+
export declare const updateTeamProjectAccess: (params: IUpdateTeamProjectAccessParams, body: IUpdateTeamProjectAccessBody) => Promise<IUpdateTeamProjectAccessResponse>;
|
|
13
|
+
export declare const removeTeamProjectAccess: (params: IRemoveTeamProjectAccessParams) => Promise<IRemoveTeamProjectAccessResponse>;
|
|
14
|
+
export declare const listTeamProjectAccess: (params: IListTeamProjectAccessParams) => Promise<IListTeamProjectAccessResponse>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listTeamProjectAccess = exports.removeTeamProjectAccess = exports.updateTeamProjectAccess = exports.addTeamProjectAccess = exports.listTeamMembers = exports.removeTeamMember = exports.addTeamMember = exports.deleteTeam = exports.updateTeam = exports.listTeams = exports.getTeam = exports.createTeam = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const createTeam = async (params, body) => {
|
|
6
|
+
return (await __1.AbyssCore.axios.post(`organization/${params.organizationId}/team`, body)).data;
|
|
7
|
+
};
|
|
8
|
+
exports.createTeam = createTeam;
|
|
9
|
+
const getTeam = async (params) => {
|
|
10
|
+
return (await __1.AbyssCore.axios.get(`organization/${params.organizationId}/team/${params.teamId}`)).data;
|
|
11
|
+
};
|
|
12
|
+
exports.getTeam = getTeam;
|
|
13
|
+
const listTeams = async (params) => {
|
|
14
|
+
return (await __1.AbyssCore.axios.get(`organization/${params.organizationId}/team`)).data;
|
|
15
|
+
};
|
|
16
|
+
exports.listTeams = listTeams;
|
|
17
|
+
const updateTeam = async (params, body) => {
|
|
18
|
+
return (await __1.AbyssCore.axios.put(`organization/${params.organizationId}/team/${params.teamId}`, body)).data;
|
|
19
|
+
};
|
|
20
|
+
exports.updateTeam = updateTeam;
|
|
21
|
+
const deleteTeam = async (params) => {
|
|
22
|
+
return (await __1.AbyssCore.axios.delete(`organization/${params.organizationId}/team/${params.teamId}`)).data;
|
|
23
|
+
};
|
|
24
|
+
exports.deleteTeam = deleteTeam;
|
|
25
|
+
const addTeamMember = async (params, body) => {
|
|
26
|
+
return (await __1.AbyssCore.axios.post(`organization/${params.organizationId}/team/${params.teamId}/member`, body)).data;
|
|
27
|
+
};
|
|
28
|
+
exports.addTeamMember = addTeamMember;
|
|
29
|
+
const removeTeamMember = async (params) => {
|
|
30
|
+
return (await __1.AbyssCore.axios.delete(`organization/${params.organizationId}/team/${params.teamId}/member/${params.teamMemberId}`)).data;
|
|
31
|
+
};
|
|
32
|
+
exports.removeTeamMember = removeTeamMember;
|
|
33
|
+
const listTeamMembers = async (params) => {
|
|
34
|
+
return (await __1.AbyssCore.axios.get(`organization/${params.organizationId}/team/${params.teamId}/member`)).data;
|
|
35
|
+
};
|
|
36
|
+
exports.listTeamMembers = listTeamMembers;
|
|
37
|
+
const addTeamProjectAccess = async (params, body) => {
|
|
38
|
+
return (await __1.AbyssCore.axios.post(`organization/${params.organizationId}/team/${params.teamId}/project-access`, body)).data;
|
|
39
|
+
};
|
|
40
|
+
exports.addTeamProjectAccess = addTeamProjectAccess;
|
|
41
|
+
const updateTeamProjectAccess = async (params, body) => {
|
|
42
|
+
return (await __1.AbyssCore.axios.put(`organization/${params.organizationId}/team/${params.teamId}/project-access/${params.teamProjectAccessId}`, body)).data;
|
|
43
|
+
};
|
|
44
|
+
exports.updateTeamProjectAccess = updateTeamProjectAccess;
|
|
45
|
+
const removeTeamProjectAccess = async (params) => {
|
|
46
|
+
return (await __1.AbyssCore.axios.delete(`organization/${params.organizationId}/team/${params.teamId}/project-access/${params.teamProjectAccessId}`)).data;
|
|
47
|
+
};
|
|
48
|
+
exports.removeTeamProjectAccess = removeTeamProjectAccess;
|
|
49
|
+
const listTeamProjectAccess = async (params) => {
|
|
50
|
+
return (await __1.AbyssCore.axios.get(`organization/${params.organizationId}/team/${params.teamId}/project-access`)).data;
|
|
51
|
+
};
|
|
52
|
+
exports.listTeamProjectAccess = listTeamProjectAccess;
|
|
@@ -280,6 +280,7 @@ export declare enum AbyssApplicationEvent {
|
|
|
280
280
|
ABYSS_CONSOLE_WORKFLOW_TRIGGER_INTERNAL_TICKET_ASSIGN = "abyss-console.workflow.trigger.internal-ticket.assign",
|
|
281
281
|
ABYSS_CONSOLE_WORKFLOW_TRIGGER_INTERNAL_TICKET_UNASSIGN = "abyss-console.workflow.trigger.internal-ticket.unassign",
|
|
282
282
|
ABYSS_CONSOLE_WORKFLOW_TRIGGER_INTERNAL_TICKET_ACTIVITY = "abyss-console.workflow.trigger.internal-ticket.activity",
|
|
283
|
+
ABYSS_CONSOLE_WORKFLOW_TRIGGER_INTERNAL_TICKET_MESSAGE_REPLY = "abyss-console.workflow.trigger.internal-ticket.message-reply",
|
|
283
284
|
ABYSS_CONSOLE_WORKFLOW_STEP_CREATE = "abyss-console.workflow.step.create",
|
|
284
285
|
ABYSS_CONSOLE_WORKFLOW_STEP_UPDATE = "abyss-console.workflow.step.update",
|
|
285
286
|
ABYSS_CONSOLE_WORKFLOW_STEP_DELETE = "abyss-console.workflow.step.delete",
|
|
@@ -284,6 +284,7 @@ var AbyssApplicationEvent;
|
|
|
284
284
|
AbyssApplicationEvent["ABYSS_CONSOLE_WORKFLOW_TRIGGER_INTERNAL_TICKET_ASSIGN"] = "abyss-console.workflow.trigger.internal-ticket.assign";
|
|
285
285
|
AbyssApplicationEvent["ABYSS_CONSOLE_WORKFLOW_TRIGGER_INTERNAL_TICKET_UNASSIGN"] = "abyss-console.workflow.trigger.internal-ticket.unassign";
|
|
286
286
|
AbyssApplicationEvent["ABYSS_CONSOLE_WORKFLOW_TRIGGER_INTERNAL_TICKET_ACTIVITY"] = "abyss-console.workflow.trigger.internal-ticket.activity";
|
|
287
|
+
AbyssApplicationEvent["ABYSS_CONSOLE_WORKFLOW_TRIGGER_INTERNAL_TICKET_MESSAGE_REPLY"] = "abyss-console.workflow.trigger.internal-ticket.message-reply";
|
|
287
288
|
AbyssApplicationEvent["ABYSS_CONSOLE_WORKFLOW_STEP_CREATE"] = "abyss-console.workflow.step.create";
|
|
288
289
|
AbyssApplicationEvent["ABYSS_CONSOLE_WORKFLOW_STEP_UPDATE"] = "abyss-console.workflow.step.update";
|
|
289
290
|
AbyssApplicationEvent["ABYSS_CONSOLE_WORKFLOW_STEP_DELETE"] = "abyss-console.workflow.step.delete";
|
package/dist/types/enum/index.js
CHANGED
|
@@ -43,3 +43,4 @@ __exportStar(require("./measurement-unit.enum"), exports);
|
|
|
43
43
|
__exportStar(require("./organization-integration-type.enum"), exports);
|
|
44
44
|
__exportStar(require("./slack-webhook.enum"), exports);
|
|
45
45
|
__exportStar(require("./discord-webhook.enum"), exports);
|
|
46
|
+
__exportStar(require("./organization-permission.enum"), exports);
|
|
@@ -1,17 +1,29 @@
|
|
|
1
1
|
export declare enum OrganizationPermission {
|
|
2
|
+
ORG_FULL_ACCESS = "ORG_FULL_ACCESS",
|
|
2
3
|
ORG_UPDATE = "ORG_UPDATE",
|
|
3
4
|
ORG_DELETE = "ORG_DELETE",
|
|
5
|
+
ORG_TRANSFER_OWNERSHIP = "ORG_TRANSFER_OWNERSHIP",
|
|
4
6
|
ORG_BILLING_READ = "ORG_BILLING_READ",
|
|
5
7
|
ORG_BILLING_MANAGE = "ORG_BILLING_MANAGE",
|
|
6
8
|
MEMBER_INVITE = "MEMBER_INVITE",
|
|
7
9
|
MEMBER_REMOVE = "MEMBER_REMOVE",
|
|
8
|
-
|
|
10
|
+
MEMBER_UPDATE_PERMISSIONS = "MEMBER_UPDATE_PERMISSIONS",
|
|
11
|
+
MEMBER_VIEW = "MEMBER_VIEW",
|
|
9
12
|
TEAM_CREATE = "TEAM_CREATE",
|
|
10
13
|
TEAM_UPDATE = "TEAM_UPDATE",
|
|
11
14
|
TEAM_DELETE = "TEAM_DELETE",
|
|
15
|
+
TEAM_MANAGE_MEMBERS = "TEAM_MANAGE_MEMBERS",
|
|
12
16
|
PROJECT_CREATE = "PROJECT_CREATE",
|
|
13
17
|
PROJECT_DELETE = "PROJECT_DELETE",
|
|
18
|
+
PROJECT_VIEW_ALL = "PROJECT_VIEW_ALL",
|
|
19
|
+
INTEGRATION_MANAGE = "INTEGRATION_MANAGE",
|
|
14
20
|
TICKET_READ = "TICKET_READ",
|
|
15
21
|
TICKET_CREATE = "TICKET_CREATE",
|
|
16
22
|
TICKET_MANAGE = "TICKET_MANAGE"
|
|
17
23
|
}
|
|
24
|
+
export declare const ORGANIZATION_PERMISSION_PRESETS: {
|
|
25
|
+
readonly OWNER: OrganizationPermission[];
|
|
26
|
+
readonly ADMIN: OrganizationPermission[];
|
|
27
|
+
readonly MEMBER: OrganizationPermission[];
|
|
28
|
+
readonly VIEWER: OrganizationPermission[];
|
|
29
|
+
};
|
|
@@ -1,21 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OrganizationPermission = void 0;
|
|
3
|
+
exports.ORGANIZATION_PERMISSION_PRESETS = exports.OrganizationPermission = void 0;
|
|
4
4
|
var OrganizationPermission;
|
|
5
5
|
(function (OrganizationPermission) {
|
|
6
|
+
OrganizationPermission["ORG_FULL_ACCESS"] = "ORG_FULL_ACCESS";
|
|
6
7
|
OrganizationPermission["ORG_UPDATE"] = "ORG_UPDATE";
|
|
7
8
|
OrganizationPermission["ORG_DELETE"] = "ORG_DELETE";
|
|
9
|
+
OrganizationPermission["ORG_TRANSFER_OWNERSHIP"] = "ORG_TRANSFER_OWNERSHIP";
|
|
8
10
|
OrganizationPermission["ORG_BILLING_READ"] = "ORG_BILLING_READ";
|
|
9
11
|
OrganizationPermission["ORG_BILLING_MANAGE"] = "ORG_BILLING_MANAGE";
|
|
10
12
|
OrganizationPermission["MEMBER_INVITE"] = "MEMBER_INVITE";
|
|
11
13
|
OrganizationPermission["MEMBER_REMOVE"] = "MEMBER_REMOVE";
|
|
12
|
-
OrganizationPermission["
|
|
14
|
+
OrganizationPermission["MEMBER_UPDATE_PERMISSIONS"] = "MEMBER_UPDATE_PERMISSIONS";
|
|
15
|
+
OrganizationPermission["MEMBER_VIEW"] = "MEMBER_VIEW";
|
|
13
16
|
OrganizationPermission["TEAM_CREATE"] = "TEAM_CREATE";
|
|
14
17
|
OrganizationPermission["TEAM_UPDATE"] = "TEAM_UPDATE";
|
|
15
18
|
OrganizationPermission["TEAM_DELETE"] = "TEAM_DELETE";
|
|
19
|
+
OrganizationPermission["TEAM_MANAGE_MEMBERS"] = "TEAM_MANAGE_MEMBERS";
|
|
16
20
|
OrganizationPermission["PROJECT_CREATE"] = "PROJECT_CREATE";
|
|
17
21
|
OrganizationPermission["PROJECT_DELETE"] = "PROJECT_DELETE";
|
|
22
|
+
OrganizationPermission["PROJECT_VIEW_ALL"] = "PROJECT_VIEW_ALL";
|
|
23
|
+
OrganizationPermission["INTEGRATION_MANAGE"] = "INTEGRATION_MANAGE";
|
|
18
24
|
OrganizationPermission["TICKET_READ"] = "TICKET_READ";
|
|
19
25
|
OrganizationPermission["TICKET_CREATE"] = "TICKET_CREATE";
|
|
20
26
|
OrganizationPermission["TICKET_MANAGE"] = "TICKET_MANAGE";
|
|
21
27
|
})(OrganizationPermission || (exports.OrganizationPermission = OrganizationPermission = {}));
|
|
28
|
+
exports.ORGANIZATION_PERMISSION_PRESETS = {
|
|
29
|
+
OWNER: Object.values(OrganizationPermission),
|
|
30
|
+
ADMIN: [
|
|
31
|
+
OrganizationPermission.ORG_UPDATE,
|
|
32
|
+
OrganizationPermission.ORG_BILLING_READ,
|
|
33
|
+
OrganizationPermission.MEMBER_INVITE,
|
|
34
|
+
OrganizationPermission.MEMBER_REMOVE,
|
|
35
|
+
OrganizationPermission.MEMBER_UPDATE_PERMISSIONS,
|
|
36
|
+
OrganizationPermission.MEMBER_VIEW,
|
|
37
|
+
OrganizationPermission.TEAM_CREATE,
|
|
38
|
+
OrganizationPermission.TEAM_UPDATE,
|
|
39
|
+
OrganizationPermission.TEAM_DELETE,
|
|
40
|
+
OrganizationPermission.TEAM_MANAGE_MEMBERS,
|
|
41
|
+
OrganizationPermission.PROJECT_CREATE,
|
|
42
|
+
OrganizationPermission.PROJECT_DELETE,
|
|
43
|
+
OrganizationPermission.PROJECT_VIEW_ALL,
|
|
44
|
+
OrganizationPermission.INTEGRATION_MANAGE,
|
|
45
|
+
OrganizationPermission.TICKET_READ,
|
|
46
|
+
OrganizationPermission.TICKET_CREATE,
|
|
47
|
+
OrganizationPermission.TICKET_MANAGE,
|
|
48
|
+
],
|
|
49
|
+
MEMBER: [
|
|
50
|
+
OrganizationPermission.MEMBER_VIEW,
|
|
51
|
+
OrganizationPermission.PROJECT_CREATE,
|
|
52
|
+
OrganizationPermission.TICKET_READ,
|
|
53
|
+
OrganizationPermission.TICKET_CREATE,
|
|
54
|
+
],
|
|
55
|
+
VIEWER: [
|
|
56
|
+
OrganizationPermission.MEMBER_VIEW,
|
|
57
|
+
OrganizationPermission.TICKET_READ,
|
|
58
|
+
],
|
|
59
|
+
};
|
|
@@ -105,4 +105,8 @@ export * from './responses/organization.admin.response';
|
|
|
105
105
|
export * from './requests/organization.request';
|
|
106
106
|
export * from './responses/organization.response';
|
|
107
107
|
export * from './requests/organization-integration-webhook.request';
|
|
108
|
+
export * from './requests/organization-member.request';
|
|
109
|
+
export * from './responses/organization-member.response';
|
|
110
|
+
export * from './requests/team.request';
|
|
111
|
+
export * from './responses/team.response';
|
|
108
112
|
export * from './responses/config.admin.response';
|
|
@@ -121,4 +121,8 @@ __exportStar(require("./responses/organization.admin.response"), exports);
|
|
|
121
121
|
__exportStar(require("./requests/organization.request"), exports);
|
|
122
122
|
__exportStar(require("./responses/organization.response"), exports);
|
|
123
123
|
__exportStar(require("./requests/organization-integration-webhook.request"), exports);
|
|
124
|
+
__exportStar(require("./requests/organization-member.request"), exports);
|
|
125
|
+
__exportStar(require("./responses/organization-member.response"), exports);
|
|
126
|
+
__exportStar(require("./requests/team.request"), exports);
|
|
127
|
+
__exportStar(require("./responses/team.response"), exports);
|
|
124
128
|
__exportStar(require("./responses/config.admin.response"), exports);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { OrganizationPermission } from '../../../enum';
|
|
2
|
+
export interface IInviteOrganizationMemberParams {
|
|
3
|
+
organizationId: string;
|
|
4
|
+
}
|
|
5
|
+
export interface IInviteOrganizationMemberBody {
|
|
6
|
+
email: string;
|
|
7
|
+
permissions: OrganizationPermission[];
|
|
8
|
+
}
|
|
9
|
+
export interface IListOrganizationMembersParams {
|
|
10
|
+
organizationId: string;
|
|
11
|
+
}
|
|
12
|
+
export interface IUpdateOrganizationMemberParams {
|
|
13
|
+
organizationId: string;
|
|
14
|
+
memberId: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IUpdateOrganizationMemberBody {
|
|
17
|
+
permissions: OrganizationPermission[];
|
|
18
|
+
}
|
|
19
|
+
export interface IRemoveOrganizationMemberParams {
|
|
20
|
+
organizationId: string;
|
|
21
|
+
memberId: string;
|
|
22
|
+
}
|
|
23
|
+
export interface IAcceptOrganizationInvitationParams {
|
|
24
|
+
memberId: string;
|
|
25
|
+
}
|
|
26
|
+
export interface IDeclineOrganizationInvitationParams {
|
|
27
|
+
memberId: string;
|
|
28
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { OrganizationPermission, ProjectAccessPermission } from '../../../enum';
|
|
2
|
+
export interface ICreateTeamParams {
|
|
3
|
+
organizationId: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ICreateTeamBody {
|
|
6
|
+
name: string;
|
|
7
|
+
description?: string | null;
|
|
8
|
+
color?: string | null;
|
|
9
|
+
permissions: OrganizationPermission[];
|
|
10
|
+
}
|
|
11
|
+
export interface IGetTeamParams {
|
|
12
|
+
organizationId: string;
|
|
13
|
+
teamId: string;
|
|
14
|
+
}
|
|
15
|
+
export interface IListTeamsParams {
|
|
16
|
+
organizationId: string;
|
|
17
|
+
}
|
|
18
|
+
export interface IUpdateTeamParams {
|
|
19
|
+
organizationId: string;
|
|
20
|
+
teamId: string;
|
|
21
|
+
}
|
|
22
|
+
export interface IUpdateTeamBody {
|
|
23
|
+
name?: string;
|
|
24
|
+
description?: string | null;
|
|
25
|
+
color?: string | null;
|
|
26
|
+
permissions?: OrganizationPermission[];
|
|
27
|
+
}
|
|
28
|
+
export interface IDeleteTeamParams {
|
|
29
|
+
organizationId: string;
|
|
30
|
+
teamId: string;
|
|
31
|
+
}
|
|
32
|
+
export interface IAddTeamMemberParams {
|
|
33
|
+
organizationId: string;
|
|
34
|
+
teamId: string;
|
|
35
|
+
}
|
|
36
|
+
export interface IAddTeamMemberBody {
|
|
37
|
+
organizationMemberId: string;
|
|
38
|
+
}
|
|
39
|
+
export interface IRemoveTeamMemberParams {
|
|
40
|
+
organizationId: string;
|
|
41
|
+
teamId: string;
|
|
42
|
+
teamMemberId: string;
|
|
43
|
+
}
|
|
44
|
+
export interface IListTeamMembersParams {
|
|
45
|
+
organizationId: string;
|
|
46
|
+
teamId: string;
|
|
47
|
+
}
|
|
48
|
+
export interface IAddTeamProjectAccessParams {
|
|
49
|
+
organizationId: string;
|
|
50
|
+
teamId: string;
|
|
51
|
+
}
|
|
52
|
+
export interface IAddTeamProjectAccessBody {
|
|
53
|
+
projectId: string;
|
|
54
|
+
permission: ProjectAccessPermission[];
|
|
55
|
+
}
|
|
56
|
+
export interface IUpdateTeamProjectAccessParams {
|
|
57
|
+
organizationId: string;
|
|
58
|
+
teamId: string;
|
|
59
|
+
teamProjectAccessId: string;
|
|
60
|
+
}
|
|
61
|
+
export interface IUpdateTeamProjectAccessBody {
|
|
62
|
+
permission: ProjectAccessPermission[];
|
|
63
|
+
}
|
|
64
|
+
export interface IRemoveTeamProjectAccessParams {
|
|
65
|
+
organizationId: string;
|
|
66
|
+
teamId: string;
|
|
67
|
+
teamProjectAccessId: string;
|
|
68
|
+
}
|
|
69
|
+
export interface IListTeamProjectAccessParams {
|
|
70
|
+
organizationId: string;
|
|
71
|
+
teamId: string;
|
|
72
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { IOrganizationMember } from '../../models/organization-member.model';
|
|
2
|
+
import { IResponse } from '../type-message/response';
|
|
3
|
+
export interface IInviteOrganizationMemberData {
|
|
4
|
+
organizationMember: IOrganizationMember;
|
|
5
|
+
}
|
|
6
|
+
export type IInviteOrganizationMemberResponse = IResponse<IInviteOrganizationMemberData>;
|
|
7
|
+
export interface IListOrganizationMembersData {
|
|
8
|
+
organizationMembers: IOrganizationMember[];
|
|
9
|
+
}
|
|
10
|
+
export type IListOrganizationMembersResponse = IResponse<IListOrganizationMembersData>;
|
|
11
|
+
export interface IUpdateOrganizationMemberData {
|
|
12
|
+
organizationMember: IOrganizationMember;
|
|
13
|
+
}
|
|
14
|
+
export type IUpdateOrganizationMemberResponse = IResponse<IUpdateOrganizationMemberData>;
|
|
15
|
+
export interface IRemoveOrganizationMemberData {
|
|
16
|
+
deleted: boolean;
|
|
17
|
+
}
|
|
18
|
+
export type IRemoveOrganizationMemberResponse = IResponse<IRemoveOrganizationMemberData>;
|
|
19
|
+
export interface IAcceptOrganizationInvitationData {
|
|
20
|
+
organizationMember: IOrganizationMember;
|
|
21
|
+
}
|
|
22
|
+
export type IAcceptOrganizationInvitationResponse = IResponse<IAcceptOrganizationInvitationData>;
|
|
23
|
+
export interface IDeclineOrganizationInvitationData {
|
|
24
|
+
deleted: boolean;
|
|
25
|
+
}
|
|
26
|
+
export type IDeclineOrganizationInvitationResponse = IResponse<IDeclineOrganizationInvitationData>;
|
|
27
|
+
export interface IListMyOrganizationsData {
|
|
28
|
+
organizationMembers: IOrganizationMember[];
|
|
29
|
+
}
|
|
30
|
+
export type IListMyOrganizationsResponse = IResponse<IListMyOrganizationsData>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ITeam } from '../../models/team.model';
|
|
2
|
+
import { ITeamMember } from '../../models/team-member.model';
|
|
3
|
+
import { ITeamProjectAccess } from '../../models/team-project-access.model';
|
|
4
|
+
import { IResponse } from '../type-message/response';
|
|
5
|
+
export interface ICreateTeamData {
|
|
6
|
+
team: ITeam;
|
|
7
|
+
}
|
|
8
|
+
export type ICreateTeamResponse = IResponse<ICreateTeamData>;
|
|
9
|
+
export interface IGetTeamData {
|
|
10
|
+
team: ITeam;
|
|
11
|
+
}
|
|
12
|
+
export type IGetTeamResponse = IResponse<IGetTeamData>;
|
|
13
|
+
export interface IListTeamsData {
|
|
14
|
+
teams: ITeam[];
|
|
15
|
+
}
|
|
16
|
+
export type IListTeamsResponse = IResponse<IListTeamsData>;
|
|
17
|
+
export interface IUpdateTeamData {
|
|
18
|
+
team: ITeam;
|
|
19
|
+
}
|
|
20
|
+
export type IUpdateTeamResponse = IResponse<IUpdateTeamData>;
|
|
21
|
+
export interface IDeleteTeamData {
|
|
22
|
+
deleted: boolean;
|
|
23
|
+
}
|
|
24
|
+
export type IDeleteTeamResponse = IResponse<IDeleteTeamData>;
|
|
25
|
+
export interface IAddTeamMemberData {
|
|
26
|
+
teamMember: ITeamMember;
|
|
27
|
+
}
|
|
28
|
+
export type IAddTeamMemberResponse = IResponse<IAddTeamMemberData>;
|
|
29
|
+
export interface IRemoveTeamMemberData {
|
|
30
|
+
deleted: boolean;
|
|
31
|
+
}
|
|
32
|
+
export type IRemoveTeamMemberResponse = IResponse<IRemoveTeamMemberData>;
|
|
33
|
+
export interface IListTeamMembersData {
|
|
34
|
+
teamMembers: ITeamMember[];
|
|
35
|
+
}
|
|
36
|
+
export type IListTeamMembersResponse = IResponse<IListTeamMembersData>;
|
|
37
|
+
export interface IAddTeamProjectAccessData {
|
|
38
|
+
teamProjectAccess: ITeamProjectAccess;
|
|
39
|
+
}
|
|
40
|
+
export type IAddTeamProjectAccessResponse = IResponse<IAddTeamProjectAccessData>;
|
|
41
|
+
export interface IUpdateTeamProjectAccessData {
|
|
42
|
+
teamProjectAccess: ITeamProjectAccess;
|
|
43
|
+
}
|
|
44
|
+
export type IUpdateTeamProjectAccessResponse = IResponse<IUpdateTeamProjectAccessData>;
|
|
45
|
+
export interface IRemoveTeamProjectAccessData {
|
|
46
|
+
deleted: boolean;
|
|
47
|
+
}
|
|
48
|
+
export type IRemoveTeamProjectAccessResponse = IResponse<IRemoveTeamProjectAccessData>;
|
|
49
|
+
export interface IListTeamProjectAccessData {
|
|
50
|
+
teamProjectAccess: ITeamProjectAccess[];
|
|
51
|
+
}
|
|
52
|
+
export type IListTeamProjectAccessResponse = IResponse<IListTeamProjectAccessData>;
|
|
@@ -47,3 +47,7 @@ export * from './models/short-link-click.model';
|
|
|
47
47
|
export * from './models/report.model';
|
|
48
48
|
export * from './models/organization.model';
|
|
49
49
|
export * from './models/organization-integration.model';
|
|
50
|
+
export * from './models/organization-member.model';
|
|
51
|
+
export * from './models/team.model';
|
|
52
|
+
export * from './models/team-member.model';
|
|
53
|
+
export * from './models/team-project-access.model';
|
|
@@ -63,3 +63,7 @@ __exportStar(require("./models/short-link-click.model"), exports);
|
|
|
63
63
|
__exportStar(require("./models/report.model"), exports);
|
|
64
64
|
__exportStar(require("./models/organization.model"), exports);
|
|
65
65
|
__exportStar(require("./models/organization-integration.model"), exports);
|
|
66
|
+
__exportStar(require("./models/organization-member.model"), exports);
|
|
67
|
+
__exportStar(require("./models/team.model"), exports);
|
|
68
|
+
__exportStar(require("./models/team-member.model"), exports);
|
|
69
|
+
__exportStar(require("./models/team-project-access.model"), exports);
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import { OrganizationPermission
|
|
1
|
+
import { OrganizationPermission } from '../../enum';
|
|
2
2
|
import { IOrganization } from './organization.model';
|
|
3
3
|
import { IUser } from './user.model';
|
|
4
|
+
import { ITeamMember } from './team-member.model';
|
|
4
5
|
export interface IOrganizationMember {
|
|
5
6
|
id?: string;
|
|
6
7
|
organizationId: string;
|
|
7
8
|
userId: string;
|
|
8
|
-
|
|
9
|
-
customPermissions: OrganizationPermission[] | null;
|
|
9
|
+
permissions: OrganizationPermission[];
|
|
10
10
|
isConfirmed: boolean;
|
|
11
|
+
confirmedAt: Date | null;
|
|
11
12
|
joinedAt: Date;
|
|
12
13
|
updatedAt?: Date;
|
|
13
14
|
createdAt?: Date;
|
|
14
15
|
organization?: IOrganization;
|
|
15
16
|
user?: IUser;
|
|
17
|
+
teamMembers?: ITeamMember[];
|
|
16
18
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { IProject } from './project.model';
|
|
2
2
|
import { IOrganizationIntegration } from './organization-integration.model';
|
|
3
|
+
import { IOrganizationMember } from './organization-member.model';
|
|
4
|
+
import { ITeam } from './team.model';
|
|
3
5
|
export interface IOrganization {
|
|
4
6
|
id?: string;
|
|
5
7
|
name: string;
|
|
@@ -7,8 +9,12 @@ export interface IOrganization {
|
|
|
7
9
|
description: string | null;
|
|
8
10
|
pictureId: string | null;
|
|
9
11
|
pictureThumbnailId: string | null;
|
|
12
|
+
bannerId: string | null;
|
|
13
|
+
bannerThumbnailId: string | null;
|
|
10
14
|
updatedAt?: Date;
|
|
11
15
|
createdAt?: Date;
|
|
12
16
|
projects?: IProject[];
|
|
13
17
|
organizationIntegrations?: IOrganizationIntegration[];
|
|
18
|
+
organizationMembers?: IOrganizationMember[];
|
|
19
|
+
teams?: ITeam[];
|
|
14
20
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ITeam } from './team.model';
|
|
2
|
+
import { IOrganizationMember } from './organization-member.model';
|
|
3
|
+
export interface ITeamMember {
|
|
4
|
+
id?: string;
|
|
5
|
+
teamId: string;
|
|
6
|
+
organizationMemberId: string;
|
|
7
|
+
updatedAt?: Date;
|
|
8
|
+
createdAt?: Date;
|
|
9
|
+
team?: ITeam;
|
|
10
|
+
organizationMember?: IOrganizationMember;
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ProjectAccessPermission } from '../../enum';
|
|
2
|
+
import { ITeam } from './team.model';
|
|
3
|
+
import { IProject } from './project.model';
|
|
4
|
+
export interface ITeamProjectAccess {
|
|
5
|
+
id?: string;
|
|
6
|
+
teamId: string;
|
|
7
|
+
projectId: string;
|
|
8
|
+
permission: ProjectAccessPermission[];
|
|
9
|
+
updatedAt?: Date;
|
|
10
|
+
createdAt?: Date;
|
|
11
|
+
team?: ITeam;
|
|
12
|
+
project?: IProject;
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OrganizationPermission } from '../../enum';
|
|
2
|
+
import { IOrganization } from './organization.model';
|
|
3
|
+
import { ITeamMember } from './team-member.model';
|
|
4
|
+
import { ITeamProjectAccess } from './team-project-access.model';
|
|
5
|
+
export interface ITeam {
|
|
6
|
+
id?: string;
|
|
7
|
+
organizationId: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description: string | null;
|
|
10
|
+
color: string | null;
|
|
11
|
+
pictureId: string | null;
|
|
12
|
+
pictureThumbnailId: string | null;
|
|
13
|
+
permissions: OrganizationPermission[];
|
|
14
|
+
updatedAt?: Date;
|
|
15
|
+
createdAt?: Date;
|
|
16
|
+
organization?: IOrganization;
|
|
17
|
+
teamMembers?: ITeamMember[];
|
|
18
|
+
teamProjectAccess?: ITeamProjectAccess[];
|
|
19
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProjectAccessPermission, ProjectApplicationAccessPermission, TokenType } from '../../enum';
|
|
1
|
+
import { ProjectAccessPermission, ProjectApplicationAccessPermission, TokenType, OrganizationPermission } from '../../enum';
|
|
2
2
|
export interface ITokenHistory {
|
|
3
3
|
id?: string;
|
|
4
4
|
token: string;
|
|
@@ -12,12 +12,14 @@ export type TokenHistoryMetadataUserInvitationInternal = {
|
|
|
12
12
|
projectInvitation?: TokenHistoryMetadataProject & TokenHistoryMetadataExtendsUserInvitation;
|
|
13
13
|
cloudInvitation?: TokenHistoryMetadataCloud & TokenHistoryMetadataExtendsUserInvitation;
|
|
14
14
|
eventInvitation?: TokenHistoryMetadataEvent & TokenHistoryMetadataExtendsUserInvitation;
|
|
15
|
+
organizationInvitation?: TokenHistoryMetadataOrganization & TokenHistoryMetadataExtendsUserInvitation;
|
|
15
16
|
publicMailVerification?: TokenHistoryMetadataPublicEmailVerification;
|
|
16
17
|
};
|
|
17
18
|
export type TokenHistoryMetadataUserInvitation = {
|
|
18
19
|
projectInvitation?: TokenHistoryMetadataProject;
|
|
19
20
|
cloudInvitation?: TokenHistoryMetadataCloud;
|
|
20
21
|
eventInvitation?: TokenHistoryMetadataEvent;
|
|
22
|
+
organizationInvitation?: TokenHistoryMetadataOrganization;
|
|
21
23
|
publicMailVerification?: TokenHistoryMetadataPublicEmailVerification;
|
|
22
24
|
};
|
|
23
25
|
export type TokenHistoryMetadataProject = {
|
|
@@ -44,6 +46,10 @@ export type TokenHistoryMetadataEvent = {
|
|
|
44
46
|
export type TokenHistoryMetadataExtendsUserInvitation = {
|
|
45
47
|
inviterId: string;
|
|
46
48
|
};
|
|
49
|
+
export type TokenHistoryMetadataOrganization = {
|
|
50
|
+
organizationId: string;
|
|
51
|
+
permissions: OrganizationPermission[];
|
|
52
|
+
};
|
|
47
53
|
export type TokenHistoryMetadataPublicEmailVerification = {
|
|
48
54
|
email: string;
|
|
49
55
|
code: string;
|