@abyss-project/main 1.0.108 → 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/auth.api.d.ts +3 -1
- package/dist/api/auth.api.js +13 -1
- package/dist/api/config.admin.api.d.ts +2 -0
- package/dist/api/config.admin.api.js +8 -0
- package/dist/api/index.d.ts +4 -0
- package/dist/api/index.js +4 -0
- package/dist/api/organization-member.api.d.ts +9 -0
- package/dist/api/organization-member.api.js +32 -0
- package/dist/api/organization.admin.api.d.ts +2 -1
- package/dist/api/organization.admin.api.js +5 -1
- package/dist/api/organization.api.d.ts +9 -0
- package/dist/api/organization.api.js +28 -0
- package/dist/api/team.api.d.ts +14 -0
- package/dist/api/team.api.js +52 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +16 -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/discord-webhook.enum.d.ts +8 -0
- package/dist/types/enum/discord-webhook.enum.js +13 -0
- package/dist/types/enum/index.d.ts +3 -0
- package/dist/types/enum/index.js +3 -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/enum/slack-webhook.enum.d.ts +8 -0
- package/dist/types/enum/slack-webhook.enum.js +13 -0
- package/dist/types/interface/api/index.d.ts +6 -0
- package/dist/types/interface/api/index.js +6 -0
- package/dist/types/interface/api/requests/auth.request.d.ts +2 -0
- package/dist/types/interface/api/requests/organization-integration-webhook.request.d.ts +71 -0
- package/dist/types/interface/api/requests/organization-integration-webhook.request.js +2 -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/organization.admin.request.d.ts +3 -0
- package/dist/types/interface/api/requests/organization.request.d.ts +20 -1
- 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/auth.response.d.ts +4 -2
- package/dist/types/interface/api/responses/config.admin.response.d.ts +7 -0
- package/dist/types/interface/api/responses/config.admin.response.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/organization.admin.response.d.ts +23 -10
- package/dist/types/interface/api/responses/organization.response.d.ts +18 -1
- package/dist/types/interface/api/responses/project-access.admin.response.d.ts +5 -2
- 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 +5 -0
- package/dist/types/interface/index.js +5 -0
- package/dist/types/interface/models/organization-integration.model.d.ts +24 -0
- package/dist/types/interface/models/organization-integration.model.js +2 -0
- package/dist/types/interface/models/organization-member.model.d.ts +5 -3
- package/dist/types/interface/models/organization.model.d.ts +8 -22
- 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 +2 -2
package/dist/api/auth.api.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { ILoginAuthBody, ILoginAuthResponse, IRefreshAuthResponse, ISignupAuthBody, ISignupAuthResponse, IOAuthAuthBody, IOAuthAuthResponse, ISendEmailVerificationAuthBody, ISendEmailVerificationAuthResponse, IVerifyEmailAuthQuery, IVerifyEmailAuthResponse, ISendEmailResetPasswordAuthBody, ISendEmailResetPasswordAuthResponse, IResetPasswordAuthBody, IResetPasswordAuthQuery, IResetPasswordAuthResponse, IActivateServiceAuthQuery, IActivateServiceAuthResponse, IGetEmailVerificationCodeAuthBody, IGetEmailVerificationCodeAuthResponse, IGetEmailVerificationTokenAuthResponse, IGetEmailVerificationTokenAuthBody, IGetConnectUrlGoogleAuthQuery, IGetConnectUrlGoogleAuthResponse } from '../types';
|
|
1
|
+
import { ILoginAuthBody, ILoginAuthResponse, IRefreshAuthResponse, ISignupAuthBody, ISignupAuthResponse, IOAuthAuthBody, IOAuthAuthResponse, ISendEmailVerificationAuthBody, ISendEmailVerificationAuthResponse, IVerifyEmailAuthQuery, IVerifyEmailAuthResponse, ISendEmailResetPasswordAuthBody, ISendEmailResetPasswordAuthResponse, IResetPasswordAuthBody, IResetPasswordAuthQuery, IResetPasswordAuthResponse, IActivateServiceAuthQuery, IActivateServiceAuthResponse, IGetEmailVerificationCodeAuthBody, IGetEmailVerificationCodeAuthResponse, IGetEmailVerificationTokenAuthResponse, IGetEmailVerificationTokenAuthBody, IGetConnectUrlGoogleAuthQuery, IGetConnectUrlGoogleAuthResponse, IGetConnectUrlDiscordAuthQuery, IGetConnectUrlDiscordAuthResponse, IGetConnectUrlSlackAuthQuery, IGetConnectUrlSlackAuthResponse } from '../types';
|
|
2
2
|
export declare const login: (body: ILoginAuthBody) => Promise<ILoginAuthResponse>;
|
|
3
3
|
export declare const refresh: () => Promise<IRefreshAuthResponse>;
|
|
4
4
|
export declare const register: (body: ISignupAuthBody) => Promise<ISignupAuthResponse>;
|
|
5
5
|
export declare const oauth: (body: IOAuthAuthBody) => Promise<IOAuthAuthResponse>;
|
|
6
6
|
export declare const getConnectUrlGoogleAuth: (query: IGetConnectUrlGoogleAuthQuery) => Promise<IGetConnectUrlGoogleAuthResponse>;
|
|
7
|
+
export declare const getConnectUrlDiscordAuth: (query: IGetConnectUrlDiscordAuthQuery) => Promise<IGetConnectUrlDiscordAuthResponse>;
|
|
8
|
+
export declare const getConnectUrlSlackAuth: (query: IGetConnectUrlSlackAuthQuery) => Promise<IGetConnectUrlSlackAuthResponse>;
|
|
7
9
|
export declare const sendVerificationEmail: (body: ISendEmailVerificationAuthBody) => Promise<ISendEmailVerificationAuthResponse>;
|
|
8
10
|
export declare const verifyEmail: (query: IVerifyEmailAuthQuery) => Promise<IVerifyEmailAuthResponse>;
|
|
9
11
|
export declare const sendEmailResetPassword: (body: ISendEmailResetPasswordAuthBody) => Promise<ISendEmailResetPasswordAuthResponse>;
|
package/dist/api/auth.api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getEmailVerificationToken = exports.getEmailVerificationCode = exports.activateService = exports.resetPassword = exports.sendEmailResetPassword = exports.verifyEmail = exports.sendVerificationEmail = exports.getConnectUrlGoogleAuth = exports.oauth = exports.register = exports.refresh = exports.login = void 0;
|
|
3
|
+
exports.getEmailVerificationToken = exports.getEmailVerificationCode = exports.activateService = exports.resetPassword = exports.sendEmailResetPassword = exports.verifyEmail = exports.sendVerificationEmail = exports.getConnectUrlSlackAuth = exports.getConnectUrlDiscordAuth = exports.getConnectUrlGoogleAuth = exports.oauth = exports.register = exports.refresh = exports.login = void 0;
|
|
4
4
|
const __1 = require("..");
|
|
5
5
|
const login = async (body) => {
|
|
6
6
|
const response = await __1.AbyssCore.axios.post('auth/login', body);
|
|
@@ -39,6 +39,18 @@ const getConnectUrlGoogleAuth = async (query) => {
|
|
|
39
39
|
})).data;
|
|
40
40
|
};
|
|
41
41
|
exports.getConnectUrlGoogleAuth = getConnectUrlGoogleAuth;
|
|
42
|
+
const getConnectUrlDiscordAuth = async (query) => {
|
|
43
|
+
return (await __1.AbyssCore.axios.get('auth/oauth/discord', {
|
|
44
|
+
params: query,
|
|
45
|
+
})).data;
|
|
46
|
+
};
|
|
47
|
+
exports.getConnectUrlDiscordAuth = getConnectUrlDiscordAuth;
|
|
48
|
+
const getConnectUrlSlackAuth = async (query) => {
|
|
49
|
+
return (await __1.AbyssCore.axios.get('auth/oauth/slack', {
|
|
50
|
+
params: query,
|
|
51
|
+
})).data;
|
|
52
|
+
};
|
|
53
|
+
exports.getConnectUrlSlackAuth = getConnectUrlSlackAuth;
|
|
42
54
|
const sendVerificationEmail = async (body) => {
|
|
43
55
|
return (await __1.AbyssCore.axios.post('auth/send-verification-email', body)).data;
|
|
44
56
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getWorkflowConfigAdmin = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const getWorkflowConfigAdmin = async () => {
|
|
6
|
+
return (await __1.AbyssCore.axios.get(`config/admin/workflow`)).data;
|
|
7
|
+
};
|
|
8
|
+
exports.getWorkflowConfigAdmin = getWorkflowConfigAdmin;
|
package/dist/api/index.d.ts
CHANGED
|
@@ -48,3 +48,7 @@ export * from './short-link.public.api';
|
|
|
48
48
|
export * from './report.api';
|
|
49
49
|
export * from './report.admin.api';
|
|
50
50
|
export * from './report.public.api';
|
|
51
|
+
export * from './config.admin.api';
|
|
52
|
+
export * from './organization.api';
|
|
53
|
+
export * from './organization-member.api';
|
|
54
|
+
export * from './team.api';
|
package/dist/api/index.js
CHANGED
|
@@ -64,3 +64,7 @@ __exportStar(require("./short-link.public.api"), exports);
|
|
|
64
64
|
__exportStar(require("./report.api"), exports);
|
|
65
65
|
__exportStar(require("./report.admin.api"), exports);
|
|
66
66
|
__exportStar(require("./report.public.api"), exports);
|
|
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;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { IGetOrganizationIntegrationAdminParams, IGetOrganizationIntegrationAdminResponse, IGetUserOAuthMetadataAdminParams, IGetUserOAuthMetadataAdminResponse } from '../types';
|
|
1
|
+
import { IGetOrganizationAdminParams, IGetOrganizationAdminResponse, IGetOrganizationIntegrationAdminParams, IGetOrganizationIntegrationAdminResponse, IGetUserOAuthMetadataAdminParams, IGetUserOAuthMetadataAdminResponse } from '../types';
|
|
2
|
+
export declare const getOrganizationAdmin: (params: IGetOrganizationAdminParams) => Promise<IGetOrganizationAdminResponse>;
|
|
2
3
|
export declare const getOrganizationIntegrationAdmin: (params: IGetOrganizationIntegrationAdminParams) => Promise<IGetOrganizationIntegrationAdminResponse>;
|
|
3
4
|
export declare const getUserOAuthMetadataAdmin: (params: IGetUserOAuthMetadataAdminParams) => Promise<IGetUserOAuthMetadataAdminResponse>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getUserOAuthMetadataAdmin = exports.getOrganizationIntegrationAdmin = void 0;
|
|
3
|
+
exports.getUserOAuthMetadataAdmin = exports.getOrganizationIntegrationAdmin = exports.getOrganizationAdmin = void 0;
|
|
4
4
|
const __1 = require("..");
|
|
5
|
+
const getOrganizationAdmin = async (params) => {
|
|
6
|
+
return (await __1.AbyssCore.axios.get(`organization/admin/${params.organizationId}`)).data;
|
|
7
|
+
};
|
|
8
|
+
exports.getOrganizationAdmin = getOrganizationAdmin;
|
|
5
9
|
const getOrganizationIntegrationAdmin = async (params) => {
|
|
6
10
|
return (await __1.AbyssCore.axios.get(`organization/admin/${params.organizationId}/integration/${params.type}`)).data;
|
|
7
11
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { IGetSlackInstallUrlParams, ISlackCallbackParams, ISlackCallbackBody, IGetDiscordInstallUrlParams, IDiscordCallbackParams, IDiscordCallbackBody } from '../types/interface/api/requests/organization.request';
|
|
2
|
+
import type { IGetSlackInstallUrlResponse, IGetDiscordInstallUrlResponse, ICreateOrganizationIntegrationResponse, IGetOrganizationResponse, IDeleteOrganizationIntegrationResponse } from '../types/interface/api/responses/organization.response';
|
|
3
|
+
import type { IGetOrganizationParams, IDeleteOrganizationIntegrationParams } from '../types/interface/api/requests/organization.request';
|
|
4
|
+
export declare const getOrganization: (params: IGetOrganizationParams) => Promise<IGetOrganizationResponse>;
|
|
5
|
+
export declare const getSlackInstallUrl: (params: IGetSlackInstallUrlParams) => Promise<IGetSlackInstallUrlResponse>;
|
|
6
|
+
export declare const slackCallback: (params: ISlackCallbackParams, body: ISlackCallbackBody) => Promise<ICreateOrganizationIntegrationResponse>;
|
|
7
|
+
export declare const getDiscordInstallUrl: (params: IGetDiscordInstallUrlParams) => Promise<IGetDiscordInstallUrlResponse>;
|
|
8
|
+
export declare const discordCallback: (params: IDiscordCallbackParams, body: IDiscordCallbackBody) => Promise<ICreateOrganizationIntegrationResponse>;
|
|
9
|
+
export declare const deleteIntegration: (params: IDeleteOrganizationIntegrationParams) => Promise<IDeleteOrganizationIntegrationResponse>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteIntegration = exports.discordCallback = exports.getDiscordInstallUrl = exports.slackCallback = exports.getSlackInstallUrl = exports.getOrganization = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const getOrganization = async (params) => {
|
|
6
|
+
return (await __1.AbyssCore.axios.get(`organization/${params.organizationId}`)).data;
|
|
7
|
+
};
|
|
8
|
+
exports.getOrganization = getOrganization;
|
|
9
|
+
const getSlackInstallUrl = async (params) => {
|
|
10
|
+
return (await __1.AbyssCore.axios.get(`organization/${params.organizationId}/slack/install-url`)).data;
|
|
11
|
+
};
|
|
12
|
+
exports.getSlackInstallUrl = getSlackInstallUrl;
|
|
13
|
+
const slackCallback = async (params, body) => {
|
|
14
|
+
return (await __1.AbyssCore.axios.post(`organization/${params.organizationId}/slack/callback`, body)).data;
|
|
15
|
+
};
|
|
16
|
+
exports.slackCallback = slackCallback;
|
|
17
|
+
const getDiscordInstallUrl = async (params) => {
|
|
18
|
+
return (await __1.AbyssCore.axios.get(`organization/${params.organizationId}/discord/install-url`)).data;
|
|
19
|
+
};
|
|
20
|
+
exports.getDiscordInstallUrl = getDiscordInstallUrl;
|
|
21
|
+
const discordCallback = async (params, body) => {
|
|
22
|
+
return (await __1.AbyssCore.axios.post(`organization/${params.organizationId}/discord/callback`, body)).data;
|
|
23
|
+
};
|
|
24
|
+
exports.discordCallback = discordCallback;
|
|
25
|
+
const deleteIntegration = async (params) => {
|
|
26
|
+
return (await __1.AbyssCore.axios.delete(`organization/${params.organizationId}/integration/${params.type}`)).data;
|
|
27
|
+
};
|
|
28
|
+
exports.deleteIntegration = deleteIntegration;
|
|
@@ -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;
|
package/dist/index.d.ts
CHANGED
|
@@ -50,6 +50,8 @@ import * as reportApiModule from './api/report.api';
|
|
|
50
50
|
import * as reportAdminApiModule from './api/report.admin.api';
|
|
51
51
|
import * as reportPublicApiModule from './api/report.public.api';
|
|
52
52
|
import * as organizationAdminApi from './api/organization.admin.api';
|
|
53
|
+
import * as organizationApi from './api/organization.api';
|
|
54
|
+
import * as configAdminApi from './api/config.admin.api';
|
|
53
55
|
export * from './api';
|
|
54
56
|
export * from './types';
|
|
55
57
|
export * from './utils';
|
|
@@ -75,6 +77,8 @@ type AbyssCoreSDK = {
|
|
|
75
77
|
register: typeof authApi.register;
|
|
76
78
|
oauth: typeof authApi.oauth;
|
|
77
79
|
getConnectUrlGoogleAuth: typeof authApi.getConnectUrlGoogleAuth;
|
|
80
|
+
getConnectUrlDiscordAuth: typeof authApi.getConnectUrlDiscordAuth;
|
|
81
|
+
getConnectUrlSlackAuth: typeof authApi.getConnectUrlSlackAuth;
|
|
78
82
|
sendVerificationEmail: typeof authApi.sendVerificationEmail;
|
|
79
83
|
verifyEmail: typeof authApi.verifyEmail;
|
|
80
84
|
sendEmailResetPassword: typeof authApi.sendEmailResetPassword;
|
|
@@ -501,11 +505,23 @@ type AbyssCoreSDK = {
|
|
|
501
505
|
};
|
|
502
506
|
};
|
|
503
507
|
organization: {
|
|
508
|
+
getOrganization: typeof organizationApi.getOrganization;
|
|
509
|
+
getSlackInstallUrl: typeof organizationApi.getSlackInstallUrl;
|
|
510
|
+
slackCallback: typeof organizationApi.slackCallback;
|
|
511
|
+
getDiscordInstallUrl: typeof organizationApi.getDiscordInstallUrl;
|
|
512
|
+
discordCallback: typeof organizationApi.discordCallback;
|
|
513
|
+
deleteIntegration: typeof organizationApi.deleteIntegration;
|
|
504
514
|
admin: {
|
|
515
|
+
getOrganizationAdmin: typeof organizationAdminApi.getOrganizationAdmin;
|
|
505
516
|
getOrganizationIntegrationAdmin: typeof organizationAdminApi.getOrganizationIntegrationAdmin;
|
|
506
517
|
getUserOAuthMetadataAdmin: typeof organizationAdminApi.getUserOAuthMetadataAdmin;
|
|
507
518
|
};
|
|
508
519
|
};
|
|
520
|
+
config: {
|
|
521
|
+
admin: {
|
|
522
|
+
getWorkflowConfigAdmin: typeof configAdminApi.getWorkflowConfigAdmin;
|
|
523
|
+
};
|
|
524
|
+
};
|
|
509
525
|
};
|
|
510
526
|
export declare class AbyssCore {
|
|
511
527
|
private static config;
|
package/dist/index.js
CHANGED
|
@@ -84,6 +84,8 @@ const reportApiModule = __importStar(require("./api/report.api"));
|
|
|
84
84
|
const reportAdminApiModule = __importStar(require("./api/report.admin.api"));
|
|
85
85
|
const reportPublicApiModule = __importStar(require("./api/report.public.api"));
|
|
86
86
|
const organizationAdminApi = __importStar(require("./api/organization.admin.api"));
|
|
87
|
+
const organizationApi = __importStar(require("./api/organization.api"));
|
|
88
|
+
const configAdminApi = __importStar(require("./api/config.admin.api"));
|
|
87
89
|
__exportStar(require("./api"), exports);
|
|
88
90
|
__exportStar(require("./types"), exports);
|
|
89
91
|
__exportStar(require("./utils"), exports);
|
|
@@ -117,6 +119,8 @@ class AbyssCore {
|
|
|
117
119
|
register: authApi.register,
|
|
118
120
|
oauth: authApi.oauth,
|
|
119
121
|
getConnectUrlGoogleAuth: authApi.getConnectUrlGoogleAuth,
|
|
122
|
+
getConnectUrlDiscordAuth: authApi.getConnectUrlDiscordAuth,
|
|
123
|
+
getConnectUrlSlackAuth: authApi.getConnectUrlSlackAuth,
|
|
120
124
|
sendVerificationEmail: authApi.sendVerificationEmail,
|
|
121
125
|
verifyEmail: authApi.verifyEmail,
|
|
122
126
|
sendEmailResetPassword: authApi.sendEmailResetPassword,
|
|
@@ -543,11 +547,23 @@ class AbyssCore {
|
|
|
543
547
|
},
|
|
544
548
|
},
|
|
545
549
|
organization: {
|
|
550
|
+
getOrganization: organizationApi.getOrganization,
|
|
551
|
+
getSlackInstallUrl: organizationApi.getSlackInstallUrl,
|
|
552
|
+
slackCallback: organizationApi.slackCallback,
|
|
553
|
+
getDiscordInstallUrl: organizationApi.getDiscordInstallUrl,
|
|
554
|
+
discordCallback: organizationApi.discordCallback,
|
|
555
|
+
deleteIntegration: organizationApi.deleteIntegration,
|
|
546
556
|
admin: {
|
|
557
|
+
getOrganizationAdmin: organizationAdminApi.getOrganizationAdmin,
|
|
547
558
|
getOrganizationIntegrationAdmin: organizationAdminApi.getOrganizationIntegrationAdmin,
|
|
548
559
|
getUserOAuthMetadataAdmin: organizationAdminApi.getUserOAuthMetadataAdmin,
|
|
549
560
|
},
|
|
550
561
|
},
|
|
562
|
+
config: {
|
|
563
|
+
admin: {
|
|
564
|
+
getWorkflowConfigAdmin: configAdminApi.getWorkflowConfigAdmin,
|
|
565
|
+
},
|
|
566
|
+
},
|
|
551
567
|
};
|
|
552
568
|
}
|
|
553
569
|
static enableAxiosRetry(axiosRetryConfig) {
|
|
@@ -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";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DiscordWebhookEventType = exports.DiscordWebhookType = void 0;
|
|
4
|
+
var DiscordWebhookType;
|
|
5
|
+
(function (DiscordWebhookType) {
|
|
6
|
+
DiscordWebhookType[DiscordWebhookType["PING"] = 0] = "PING";
|
|
7
|
+
DiscordWebhookType[DiscordWebhookType["EVENT"] = 1] = "EVENT";
|
|
8
|
+
})(DiscordWebhookType || (exports.DiscordWebhookType = DiscordWebhookType = {}));
|
|
9
|
+
var DiscordWebhookEventType;
|
|
10
|
+
(function (DiscordWebhookEventType) {
|
|
11
|
+
DiscordWebhookEventType["APPLICATION_AUTHORIZED"] = "APPLICATION_AUTHORIZED";
|
|
12
|
+
DiscordWebhookEventType["APPLICATION_DEAUTHORIZED"] = "APPLICATION_DEAUTHORIZED";
|
|
13
|
+
})(DiscordWebhookEventType || (exports.DiscordWebhookEventType = DiscordWebhookEventType = {}));
|
|
@@ -25,3 +25,6 @@ export * from './board-activity.enum';
|
|
|
25
25
|
export * from './user-agent.enum';
|
|
26
26
|
export * from './measurement-unit.enum';
|
|
27
27
|
export * from './organization-integration-type.enum';
|
|
28
|
+
export * from './slack-webhook.enum';
|
|
29
|
+
export * from './discord-webhook.enum';
|
|
30
|
+
export * from './organization-permission.enum';
|
package/dist/types/enum/index.js
CHANGED
|
@@ -41,3 +41,6 @@ __exportStar(require("./board-activity.enum"), exports);
|
|
|
41
41
|
__exportStar(require("./user-agent.enum"), exports);
|
|
42
42
|
__exportStar(require("./measurement-unit.enum"), exports);
|
|
43
43
|
__exportStar(require("./organization-integration-type.enum"), exports);
|
|
44
|
+
__exportStar(require("./slack-webhook.enum"), exports);
|
|
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
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlackWebhookEventType = exports.SlackWebhookType = void 0;
|
|
4
|
+
var SlackWebhookType;
|
|
5
|
+
(function (SlackWebhookType) {
|
|
6
|
+
SlackWebhookType["URL_VERIFICATION"] = "url_verification";
|
|
7
|
+
SlackWebhookType["EVENT_CALLBACK"] = "event_callback";
|
|
8
|
+
})(SlackWebhookType || (exports.SlackWebhookType = SlackWebhookType = {}));
|
|
9
|
+
var SlackWebhookEventType;
|
|
10
|
+
(function (SlackWebhookEventType) {
|
|
11
|
+
SlackWebhookEventType["APP_UNINSTALLED"] = "app_uninstalled";
|
|
12
|
+
SlackWebhookEventType["TOKENS_REVOKED"] = "tokens_revoked";
|
|
13
|
+
})(SlackWebhookEventType || (exports.SlackWebhookEventType = SlackWebhookEventType = {}));
|
|
@@ -104,3 +104,9 @@ export * from './requests/organization.admin.request';
|
|
|
104
104
|
export * from './responses/organization.admin.response';
|
|
105
105
|
export * from './requests/organization.request';
|
|
106
106
|
export * from './responses/organization.response';
|
|
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';
|
|
112
|
+
export * from './responses/config.admin.response';
|
|
@@ -120,3 +120,9 @@ __exportStar(require("./requests/organization.admin.request"), exports);
|
|
|
120
120
|
__exportStar(require("./responses/organization.admin.response"), exports);
|
|
121
121
|
__exportStar(require("./requests/organization.request"), exports);
|
|
122
122
|
__exportStar(require("./responses/organization.response"), exports);
|
|
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);
|
|
128
|
+
__exportStar(require("./responses/config.admin.response"), exports);
|
|
@@ -46,3 +46,5 @@ export interface IGetEmailVerificationTokenAuthBody {
|
|
|
46
46
|
code: string;
|
|
47
47
|
}
|
|
48
48
|
export type IGetConnectUrlGoogleAuthQuery = Record<string, string>;
|
|
49
|
+
export type IGetConnectUrlDiscordAuthQuery = Record<string, string>;
|
|
50
|
+
export type IGetConnectUrlSlackAuthQuery = Record<string, string>;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { SlackWebhookType, SlackWebhookEventType, DiscordWebhookType, DiscordWebhookEventType } from '../../../enum';
|
|
2
|
+
export interface ISlackWebhookUrlVerificationBody {
|
|
3
|
+
type: SlackWebhookType.URL_VERIFICATION;
|
|
4
|
+
token: string;
|
|
5
|
+
challenge: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ISlackAppUninstalledEvent {
|
|
8
|
+
type: SlackWebhookEventType.APP_UNINSTALLED;
|
|
9
|
+
}
|
|
10
|
+
export interface ISlackTokensRevokedEvent {
|
|
11
|
+
type: SlackWebhookEventType.TOKENS_REVOKED;
|
|
12
|
+
tokens: {
|
|
13
|
+
oauth: string[];
|
|
14
|
+
bot: string[];
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export type ISlackWebhookEvent = ISlackAppUninstalledEvent | ISlackTokensRevokedEvent;
|
|
18
|
+
export interface ISlackWebhookEventCallbackBody {
|
|
19
|
+
type: SlackWebhookType.EVENT_CALLBACK;
|
|
20
|
+
token: string;
|
|
21
|
+
team_id: string;
|
|
22
|
+
api_app_id: string;
|
|
23
|
+
event: ISlackWebhookEvent;
|
|
24
|
+
}
|
|
25
|
+
export type ISlackWebhookBody = ISlackWebhookUrlVerificationBody | ISlackWebhookEventCallbackBody;
|
|
26
|
+
export interface IDiscordWebhookGuild {
|
|
27
|
+
id: string;
|
|
28
|
+
name: string;
|
|
29
|
+
}
|
|
30
|
+
export interface IDiscordWebhookPingBody {
|
|
31
|
+
type: DiscordWebhookType.PING;
|
|
32
|
+
application_id: string;
|
|
33
|
+
}
|
|
34
|
+
export interface IDiscordWebhookApplicationAuthorizedData {
|
|
35
|
+
integration_type?: number;
|
|
36
|
+
user: {
|
|
37
|
+
id: string;
|
|
38
|
+
username: string;
|
|
39
|
+
discriminator: string;
|
|
40
|
+
avatar: string | null;
|
|
41
|
+
};
|
|
42
|
+
scopes: string[];
|
|
43
|
+
guild?: IDiscordWebhookGuild;
|
|
44
|
+
}
|
|
45
|
+
export interface IDiscordWebhookApplicationAuthorizedEvent {
|
|
46
|
+
type: DiscordWebhookEventType.APPLICATION_AUTHORIZED;
|
|
47
|
+
timestamp: string;
|
|
48
|
+
data: IDiscordWebhookApplicationAuthorizedData;
|
|
49
|
+
}
|
|
50
|
+
export interface IDiscordWebhookApplicationDeauthorizedData {
|
|
51
|
+
integration_type?: number;
|
|
52
|
+
user: {
|
|
53
|
+
id: string;
|
|
54
|
+
username: string;
|
|
55
|
+
discriminator: string;
|
|
56
|
+
avatar: string | null;
|
|
57
|
+
};
|
|
58
|
+
guild?: IDiscordWebhookGuild;
|
|
59
|
+
}
|
|
60
|
+
export interface IDiscordWebhookApplicationDeauthorizedEvent {
|
|
61
|
+
type: DiscordWebhookEventType.APPLICATION_DEAUTHORIZED;
|
|
62
|
+
timestamp: string;
|
|
63
|
+
data: IDiscordWebhookApplicationDeauthorizedData;
|
|
64
|
+
}
|
|
65
|
+
export type IDiscordWebhookEvent = IDiscordWebhookApplicationAuthorizedEvent | IDiscordWebhookApplicationDeauthorizedEvent;
|
|
66
|
+
export interface IDiscordWebhookEventBody {
|
|
67
|
+
type: DiscordWebhookType.EVENT;
|
|
68
|
+
application_id: string;
|
|
69
|
+
event: IDiscordWebhookEvent;
|
|
70
|
+
}
|
|
71
|
+
export type IDiscordWebhookBody = IDiscordWebhookPingBody | IDiscordWebhookEventBody;
|