@abyss-project/main 1.0.107 → 1.0.109
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 +1 -0
- package/dist/api/index.js +1 -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/index.d.ts +16 -0
- package/dist/index.js +16 -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 -1
- package/dist/types/enum/index.js +3 -1
- package/dist/types/enum/organization-integration-type.enum.d.ts +4 -0
- package/dist/types/enum/organization-integration-type.enum.js +8 -0
- 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 +2 -0
- package/dist/types/interface/api/index.js +2 -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.admin.request.d.ts +5 -1
- package/dist/types/interface/api/requests/organization.request.d.ts +24 -3
- 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.admin.response.d.ts +24 -9
- 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/index.d.ts +1 -0
- package/dist/types/interface/index.js +1 -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.model.d.ts +3 -14
- package/dist/types/interface/models/project.model.d.ts +2 -2
- 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
package/dist/api/index.js
CHANGED
|
@@ -64,3 +64,4 @@ __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);
|
|
@@ -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;
|
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) {
|
|
@@ -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 = {}));
|
|
@@ -24,4 +24,6 @@ export * from './board-column-type.enum';
|
|
|
24
24
|
export * from './board-activity.enum';
|
|
25
25
|
export * from './user-agent.enum';
|
|
26
26
|
export * from './measurement-unit.enum';
|
|
27
|
-
export * from './integration-type.enum';
|
|
27
|
+
export * from './organization-integration-type.enum';
|
|
28
|
+
export * from './slack-webhook.enum';
|
|
29
|
+
export * from './discord-webhook.enum';
|
package/dist/types/enum/index.js
CHANGED
|
@@ -40,4 +40,6 @@ __exportStar(require("./board-column-type.enum"), exports);
|
|
|
40
40
|
__exportStar(require("./board-activity.enum"), exports);
|
|
41
41
|
__exportStar(require("./user-agent.enum"), exports);
|
|
42
42
|
__exportStar(require("./measurement-unit.enum"), exports);
|
|
43
|
-
__exportStar(require("./integration-type.enum"), exports);
|
|
43
|
+
__exportStar(require("./organization-integration-type.enum"), exports);
|
|
44
|
+
__exportStar(require("./slack-webhook.enum"), exports);
|
|
45
|
+
__exportStar(require("./discord-webhook.enum"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.OrganizationIntegrationType = void 0;
|
|
4
|
+
var OrganizationIntegrationType;
|
|
5
|
+
(function (OrganizationIntegrationType) {
|
|
6
|
+
OrganizationIntegrationType["SLACK"] = "SLACK";
|
|
7
|
+
OrganizationIntegrationType["DISCORD"] = "DISCORD";
|
|
8
|
+
})(OrganizationIntegrationType || (exports.OrganizationIntegrationType = OrganizationIntegrationType = {}));
|
|
@@ -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,5 @@ 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 './responses/config.admin.response';
|
|
@@ -120,3 +120,5 @@ __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("./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;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { OrganizationIntegrationType } from '../../../enum';
|
|
2
|
+
export interface IGetOrganizationAdminParams {
|
|
3
|
+
organizationId: string;
|
|
4
|
+
}
|
|
1
5
|
export interface IGetOrganizationIntegrationAdminParams {
|
|
2
6
|
organizationId: string;
|
|
3
|
-
type:
|
|
7
|
+
type: OrganizationIntegrationType;
|
|
4
8
|
}
|
|
5
9
|
export interface IGetUserOAuthMetadataAdminParams {
|
|
6
10
|
userId: string;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { OrganizationIntegrationType } from '../../../enum';
|
|
2
|
+
import { OrganizationIntegrationConfig } from '../../models/organization-integration.model';
|
|
1
3
|
export interface ICreateOrganizationBody {
|
|
2
4
|
name: string;
|
|
3
5
|
description?: string | null;
|
|
@@ -19,13 +21,32 @@ export interface ICreateOrganizationIntegrationParams {
|
|
|
19
21
|
organizationId: string;
|
|
20
22
|
}
|
|
21
23
|
export interface ICreateOrganizationIntegrationBody {
|
|
22
|
-
type:
|
|
24
|
+
type: OrganizationIntegrationType;
|
|
23
25
|
botToken: string;
|
|
26
|
+
scope: string[];
|
|
24
27
|
teamId?: string | null;
|
|
25
28
|
guildId?: string | null;
|
|
26
|
-
config?:
|
|
29
|
+
config?: OrganizationIntegrationConfig | null;
|
|
27
30
|
}
|
|
28
31
|
export interface IDeleteOrganizationIntegrationParams {
|
|
29
32
|
organizationId: string;
|
|
30
|
-
type:
|
|
33
|
+
type: OrganizationIntegrationType;
|
|
34
|
+
}
|
|
35
|
+
export interface IGetSlackInstallUrlParams {
|
|
36
|
+
organizationId: string;
|
|
37
|
+
}
|
|
38
|
+
export interface ISlackCallbackParams {
|
|
39
|
+
organizationId: string;
|
|
40
|
+
}
|
|
41
|
+
export interface ISlackCallbackBody {
|
|
42
|
+
code: string;
|
|
43
|
+
}
|
|
44
|
+
export interface IGetDiscordInstallUrlParams {
|
|
45
|
+
organizationId: string;
|
|
46
|
+
}
|
|
47
|
+
export interface IDiscordCallbackParams {
|
|
48
|
+
organizationId: string;
|
|
49
|
+
}
|
|
50
|
+
export interface IDiscordCallbackBody {
|
|
51
|
+
code: string;
|
|
31
52
|
}
|
|
@@ -48,7 +48,9 @@ export interface IGetEmailVerificationTokenAuthData {
|
|
|
48
48
|
email: string;
|
|
49
49
|
}
|
|
50
50
|
export type IGetEmailVerificationTokenAuthResponse = IResponse<IGetEmailVerificationTokenAuthData>;
|
|
51
|
-
export interface
|
|
51
|
+
export interface IGetConnectUrlAuthData {
|
|
52
52
|
connectUrl: string;
|
|
53
53
|
}
|
|
54
|
-
export type IGetConnectUrlGoogleAuthResponse = IResponse<
|
|
54
|
+
export type IGetConnectUrlGoogleAuthResponse = IResponse<IGetConnectUrlAuthData>;
|
|
55
|
+
export type IGetConnectUrlDiscordAuthResponse = IResponse<IGetConnectUrlAuthData>;
|
|
56
|
+
export type IGetConnectUrlSlackAuthResponse = IResponse<IGetConnectUrlAuthData>;
|
|
@@ -1,14 +1,29 @@
|
|
|
1
|
+
import { OrganizationIntegrationType } from '../../../enum';
|
|
2
|
+
import { OrganizationIntegrationConfig } from '../../models/organization-integration.model';
|
|
1
3
|
import { IResponse } from '../type-message/response';
|
|
2
|
-
export interface
|
|
3
|
-
|
|
4
|
+
export interface IOrganizationIntegrationAdminData {
|
|
5
|
+
id: string;
|
|
6
|
+
organizationId: string;
|
|
7
|
+
type: OrganizationIntegrationType;
|
|
8
|
+
botToken: string;
|
|
9
|
+
scope: string[];
|
|
10
|
+
disabledAt: Date | null;
|
|
11
|
+
teamId: string | null;
|
|
12
|
+
guildId: string | null;
|
|
13
|
+
config: OrganizationIntegrationConfig | null;
|
|
14
|
+
}
|
|
15
|
+
export interface IGetOrganizationAdminData {
|
|
16
|
+
organization: {
|
|
4
17
|
id: string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
18
|
+
name: string;
|
|
19
|
+
slug: string;
|
|
20
|
+
description: string | null;
|
|
21
|
+
organizationIntegrations: IOrganizationIntegrationAdminData[];
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export type IGetOrganizationAdminResponse = IResponse<IGetOrganizationAdminData>;
|
|
25
|
+
export interface IGetOrganizationIntegrationAdminData {
|
|
26
|
+
integration: IOrganizationIntegrationAdminData | null;
|
|
12
27
|
}
|
|
13
28
|
export type IGetOrganizationIntegrationAdminResponse = IResponse<IGetOrganizationIntegrationAdminData>;
|
|
14
29
|
export interface IGetUserOAuthMetadataAdminData {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { IOrganization
|
|
1
|
+
import { IOrganization } from '../../models/organization.model';
|
|
2
|
+
import { ISafeOrganizationIntegration, IOrganizationIntegration } from '../../models/organization-integration.model';
|
|
2
3
|
import { IResponse } from '../type-message/response';
|
|
3
4
|
export interface ICreateOrganizationData {
|
|
4
5
|
organization: IOrganization;
|
|
@@ -28,3 +29,19 @@ export interface IDeleteOrganizationIntegrationData {
|
|
|
28
29
|
deleted: boolean;
|
|
29
30
|
}
|
|
30
31
|
export type IDeleteOrganizationIntegrationResponse = IResponse<IDeleteOrganizationIntegrationData>;
|
|
32
|
+
export interface IGetSlackInstallUrlData {
|
|
33
|
+
url: string;
|
|
34
|
+
}
|
|
35
|
+
export type IGetSlackInstallUrlResponse = IResponse<IGetSlackInstallUrlData>;
|
|
36
|
+
export interface IGetDiscordInstallUrlData {
|
|
37
|
+
url: string;
|
|
38
|
+
}
|
|
39
|
+
export type IGetDiscordInstallUrlResponse = IResponse<IGetDiscordInstallUrlData>;
|
|
40
|
+
export interface ISlackCallbackData {
|
|
41
|
+
integration: ISafeOrganizationIntegration;
|
|
42
|
+
}
|
|
43
|
+
export type ISlackCallbackResponse = IResponse<ISlackCallbackData>;
|
|
44
|
+
export interface IDiscordCallbackData {
|
|
45
|
+
integration: ISafeOrganizationIntegration;
|
|
46
|
+
}
|
|
47
|
+
export type IDiscordCallbackResponse = IResponse<IDiscordCallbackData>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BasePaginate } from '..';
|
|
2
|
-
import { ProjectAccessPermission } from '../../../enum';
|
|
2
|
+
import { OAuthAccountType, ProjectAccessPermission } from '../../../enum';
|
|
3
3
|
import { IProjectAccess } from '../../models/project-access.model';
|
|
4
4
|
import { IProjectApplicationAccess } from '../../models/project-application-access.model';
|
|
5
5
|
import { IUser } from '../../models/user.model';
|
|
@@ -60,7 +60,10 @@ export interface IListMembersProjectAccessAdminMember {
|
|
|
60
60
|
name: string | null;
|
|
61
61
|
familyName: string | null;
|
|
62
62
|
permissions: string[];
|
|
63
|
-
oauthProviders:
|
|
63
|
+
oauthProviders: {
|
|
64
|
+
type: OAuthAccountType;
|
|
65
|
+
accountId: string;
|
|
66
|
+
}[];
|
|
64
67
|
}
|
|
65
68
|
export interface IListMembersProjectAccessAdminData {
|
|
66
69
|
members: IListMembersProjectAccessAdminMember[];
|
|
@@ -62,3 +62,4 @@ __exportStar(require("./models/short-link.model"), exports);
|
|
|
62
62
|
__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
|
+
__exportStar(require("./models/organization-integration.model"), exports);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { OrganizationIntegrationType } from '../../enum';
|
|
2
|
+
import { IOrganization } from './organization.model';
|
|
3
|
+
export interface ISlackOrganizationIntegrationConfig {
|
|
4
|
+
teamName: string;
|
|
5
|
+
}
|
|
6
|
+
export interface IDiscordOrganizationIntegrationConfig {
|
|
7
|
+
guildName?: string;
|
|
8
|
+
}
|
|
9
|
+
export type OrganizationIntegrationConfig = ISlackOrganizationIntegrationConfig | IDiscordOrganizationIntegrationConfig;
|
|
10
|
+
export interface IOrganizationIntegration {
|
|
11
|
+
id?: string;
|
|
12
|
+
organizationId: string;
|
|
13
|
+
type: OrganizationIntegrationType;
|
|
14
|
+
botToken: string;
|
|
15
|
+
teamId: string | null;
|
|
16
|
+
guildId: string | null;
|
|
17
|
+
scope: string[];
|
|
18
|
+
disabledAt: Date | null;
|
|
19
|
+
config: OrganizationIntegrationConfig | null;
|
|
20
|
+
updatedAt?: Date;
|
|
21
|
+
createdAt?: Date;
|
|
22
|
+
organization?: IOrganization;
|
|
23
|
+
}
|
|
24
|
+
export type ISafeOrganizationIntegration = Omit<IOrganizationIntegration, 'botToken'>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IProject } from './project.model';
|
|
2
|
+
import { IOrganizationIntegration } from './organization-integration.model';
|
|
2
3
|
export interface IOrganization {
|
|
3
4
|
id?: string;
|
|
4
5
|
name: string;
|
|
@@ -8,18 +9,6 @@ export interface IOrganization {
|
|
|
8
9
|
pictureThumbnailId: string | null;
|
|
9
10
|
updatedAt?: Date;
|
|
10
11
|
createdAt?: Date;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
export interface IOrganizationIntegration {
|
|
15
|
-
id?: string;
|
|
16
|
-
organizationId: string;
|
|
17
|
-
type: string;
|
|
18
|
-
botToken: string;
|
|
19
|
-
teamId: string | null;
|
|
20
|
-
guildId: string | null;
|
|
21
|
-
config: Record<string, any> | null;
|
|
22
|
-
updatedAt?: Date;
|
|
23
|
-
createdAt?: Date;
|
|
24
|
-
organization?: IOrganization;
|
|
12
|
+
projects?: IProject[];
|
|
13
|
+
organizationIntegrations?: IOrganizationIntegration[];
|
|
25
14
|
}
|
|
@@ -15,7 +15,7 @@ export interface IProject {
|
|
|
15
15
|
id?: string;
|
|
16
16
|
name: string;
|
|
17
17
|
description: string | null;
|
|
18
|
-
organizationId: string
|
|
18
|
+
organizationId: string;
|
|
19
19
|
userId: string;
|
|
20
20
|
pictureId: string | null;
|
|
21
21
|
pictureThumbnailId: string | null;
|
|
@@ -23,7 +23,7 @@ export interface IProject {
|
|
|
23
23
|
ownerSettings: IProjectAccessSettings;
|
|
24
24
|
updatedAt?: Date;
|
|
25
25
|
createdAt?: Date;
|
|
26
|
-
organization?: IOrganization
|
|
26
|
+
organization?: IOrganization;
|
|
27
27
|
user?: IUser;
|
|
28
28
|
projectAccess?: IProjectAccess[];
|
|
29
29
|
projectAuthentication?: IProjectAuthentication[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abyss-project/main",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.109",
|
|
4
4
|
"description": "Core package to interact with Abyss-Project",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"homepage": "https://gitlab.com/abyss-group",
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"axios": "^1.2.2",
|
|
20
|
-
"axios-retry": "^
|
|
20
|
+
"axios-retry": "^4.5.0",
|
|
21
21
|
"byte-size": "^8.1.0",
|
|
22
22
|
"date-fns": "^2.29.3",
|
|
23
23
|
"dayjs": "^1.10.7",
|