@abyss-project/main 40.4.0 → 40.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.js +3 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/oauth-application.admin.api.d.ts +2 -0
- package/dist/api/oauth-application.admin.api.js +9 -0
- package/dist/api/oauth-application.admin.api.js.map +1 -0
- package/dist/api/oauth-application.api.d.ts +10 -0
- package/dist/api/oauth-application.api.js +39 -0
- package/dist/api/oauth-application.api.js.map +1 -0
- package/dist/api/oauth-grant.api.d.ts +4 -0
- package/dist/api/oauth-grant.api.js +15 -0
- package/dist/api/oauth-grant.api.js.map +1 -0
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.js +1 -0
- package/dist/constants/index.js.map +1 -1
- package/dist/constants/oauth-app.constants.d.ts +19 -0
- package/dist/constants/oauth-app.constants.js +63 -0
- package/dist/constants/oauth-app.constants.js.map +1 -0
- package/dist/constants/tests/oauth-app.constants.spec.d.ts +1 -0
- package/dist/constants/tests/oauth-app.constants.spec.js +88 -0
- package/dist/constants/tests/oauth-app.constants.spec.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/dist/server/api-cors.util.d.ts +8 -0
- package/dist/server/api-cors.util.js +83 -1
- package/dist/server/api-cors.util.js.map +1 -1
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.js +2 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/oauth-access-token.util.d.ts +27 -0
- package/dist/server/oauth-access-token.util.js +99 -0
- package/dist/server/oauth-access-token.util.js.map +1 -0
- package/dist/server/oauth-request-guard.util.d.ts +30 -0
- package/dist/server/oauth-request-guard.util.js +36 -0
- package/dist/server/oauth-request-guard.util.js.map +1 -0
- package/dist/server/tests/api-cors-dynamic.util.spec.d.ts +1 -0
- package/dist/server/tests/api-cors-dynamic.util.spec.js +220 -0
- package/dist/server/tests/api-cors-dynamic.util.spec.js.map +1 -0
- package/dist/server/tests/oauth-access-token.util.spec.d.ts +1 -0
- package/dist/server/tests/oauth-access-token.util.spec.js +142 -0
- package/dist/server/tests/oauth-access-token.util.spec.js.map +1 -0
- package/dist/server/tests/oauth-request-guard.util.spec.d.ts +1 -0
- package/dist/server/tests/oauth-request-guard.util.spec.js +68 -0
- package/dist/server/tests/oauth-request-guard.util.spec.js.map +1 -0
- package/dist/types/enum/api-error.enum.d.ts +1 -0
- package/dist/types/enum/api-error.enum.js +1 -0
- package/dist/types/enum/api-error.enum.js.map +1 -1
- package/dist/types/enum/index.d.ts +1 -0
- package/dist/types/enum/index.js +1 -0
- package/dist/types/enum/index.js.map +1 -1
- package/dist/types/enum/oauth-app.enum.d.ts +58 -0
- package/dist/types/enum/oauth-app.enum.js +69 -0
- package/dist/types/enum/oauth-app.enum.js.map +1 -0
- package/dist/types/interface/api/index.d.ts +5 -0
- package/dist/types/interface/api/index.js +5 -0
- package/dist/types/interface/api/index.js.map +1 -1
- package/dist/types/interface/api/requests/index.d.ts +2 -0
- package/dist/types/interface/api/requests/index.js +2 -0
- package/dist/types/interface/api/requests/index.js.map +1 -1
- package/dist/types/interface/api/requests/oauth-application.request.d.ts +34 -0
- package/dist/types/interface/api/requests/oauth-application.request.js +3 -0
- package/dist/types/interface/api/requests/oauth-application.request.js.map +1 -0
- package/dist/types/interface/api/requests/oauth-grant.request.d.ts +3 -0
- package/dist/types/interface/api/requests/oauth-grant.request.js +3 -0
- package/dist/types/interface/api/requests/oauth-grant.request.js.map +1 -0
- package/dist/types/interface/api/responses/index.d.ts +3 -0
- package/dist/types/interface/api/responses/index.js +3 -0
- package/dist/types/interface/api/responses/index.js.map +1 -1
- package/dist/types/interface/api/responses/oauth-application.response.d.ts +49 -0
- package/dist/types/interface/api/responses/oauth-application.response.js +3 -0
- package/dist/types/interface/api/responses/oauth-application.response.js.map +1 -0
- package/dist/types/interface/api/responses/oauth-authorization-request.response.d.ts +19 -2
- package/dist/types/interface/api/responses/oauth-grant.response.d.ts +20 -0
- package/dist/types/interface/api/responses/oauth-grant.response.js +3 -0
- package/dist/types/interface/api/responses/oauth-grant.response.js.map +1 -0
- package/dist/types/interface/api/responses/oauth-userinfo.response.d.ts +7 -0
- package/dist/types/interface/api/responses/oauth-userinfo.response.js +3 -0
- package/dist/types/interface/api/responses/oauth-userinfo.response.js.map +1 -0
- package/dist/types/interface/mcp/mcp-oauth.d.ts +2 -0
- package/package.json +3 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { OAuthClientType } from '../../../enum/oauth-app.enum';
|
|
2
|
+
import type { IResponse } from '../type-message/response';
|
|
3
|
+
export interface IOAuthApplicationSummary {
|
|
4
|
+
id: string;
|
|
5
|
+
clientId: string;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string | null;
|
|
8
|
+
homepageUrl: string | null;
|
|
9
|
+
clientType: OAuthClientType;
|
|
10
|
+
redirectUris: string[];
|
|
11
|
+
allowedOrigins: string[];
|
|
12
|
+
ownerUserId: string | null;
|
|
13
|
+
ownerOrganizationId: string | null;
|
|
14
|
+
connectedUserCount: number;
|
|
15
|
+
createdAt: Date;
|
|
16
|
+
updatedAt: Date;
|
|
17
|
+
}
|
|
18
|
+
export interface ICreateOAuthApplicationData {
|
|
19
|
+
application: IOAuthApplicationSummary;
|
|
20
|
+
clientSecret: string | null;
|
|
21
|
+
}
|
|
22
|
+
export interface IListOAuthApplicationUserData {
|
|
23
|
+
applications: IOAuthApplicationSummary[];
|
|
24
|
+
}
|
|
25
|
+
export type IListOAuthApplicationUserResponse = IResponse<IListOAuthApplicationUserData>;
|
|
26
|
+
export type ICreateOAuthApplicationUserResponse = IResponse<ICreateOAuthApplicationData>;
|
|
27
|
+
export interface IListOAuthApplicationOrganizationData {
|
|
28
|
+
applications: IOAuthApplicationSummary[];
|
|
29
|
+
}
|
|
30
|
+
export type IListOAuthApplicationOrganizationResponse = IResponse<IListOAuthApplicationOrganizationData>;
|
|
31
|
+
export type ICreateOAuthApplicationOrganizationResponse = IResponse<ICreateOAuthApplicationData>;
|
|
32
|
+
export interface IGetOAuthApplicationData {
|
|
33
|
+
application: IOAuthApplicationSummary;
|
|
34
|
+
}
|
|
35
|
+
export type IGetOAuthApplicationResponse = IResponse<IGetOAuthApplicationData>;
|
|
36
|
+
export interface IUpdateOAuthApplicationData {
|
|
37
|
+
application: IOAuthApplicationSummary;
|
|
38
|
+
}
|
|
39
|
+
export type IUpdateOAuthApplicationResponse = IResponse<IUpdateOAuthApplicationData>;
|
|
40
|
+
export type IDeleteOAuthApplicationResponse = void;
|
|
41
|
+
export interface IRegenerateSecretOAuthApplicationData {
|
|
42
|
+
application: IOAuthApplicationSummary;
|
|
43
|
+
clientSecret: string;
|
|
44
|
+
}
|
|
45
|
+
export type IRegenerateSecretOAuthApplicationResponse = IResponse<IRegenerateSecretOAuthApplicationData>;
|
|
46
|
+
export interface IListAllowedOriginsOAuthApplicationAdminData {
|
|
47
|
+
origins: string[];
|
|
48
|
+
}
|
|
49
|
+
export type IListAllowedOriginsOAuthApplicationAdminResponse = IResponse<IListAllowedOriginsOAuthApplicationAdminData>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-application.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/oauth-application.response.ts"],"names":[],"mappings":""}
|
|
@@ -1,7 +1,24 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OAuthAppOwnerKind, OAuthAuthorizationRequestKind, OAuthClientType } from '../../../enum/oauth-app.enum';
|
|
2
|
+
import type { IMcpOAuthAuthorizationRequestView, McpOAuthAuthorizationRequestStatus } from '../../mcp/mcp-oauth';
|
|
2
3
|
import type { IResponse } from '../type-message/response';
|
|
4
|
+
export interface IOAuthAppAuthorizationRequestView {
|
|
5
|
+
kind: OAuthAuthorizationRequestKind.APP;
|
|
6
|
+
id: string;
|
|
7
|
+
status: McpOAuthAuthorizationRequestStatus;
|
|
8
|
+
application: {
|
|
9
|
+
name: string;
|
|
10
|
+
ownerName: string;
|
|
11
|
+
ownerKind: OAuthAppOwnerKind;
|
|
12
|
+
homepageUrl: string | null;
|
|
13
|
+
clientType: OAuthClientType;
|
|
14
|
+
};
|
|
15
|
+
redirectHost: string;
|
|
16
|
+
redirectWarning: boolean;
|
|
17
|
+
scopes: string[];
|
|
18
|
+
missingScopes: string[];
|
|
19
|
+
}
|
|
3
20
|
export interface IGetOAuthAuthorizationRequestData {
|
|
4
|
-
request: IMcpOAuthAuthorizationRequestView;
|
|
21
|
+
request: IMcpOAuthAuthorizationRequestView | IOAuthAppAuthorizationRequestView;
|
|
5
22
|
}
|
|
6
23
|
export type IGetOAuthAuthorizationRequestResponse = IResponse<IGetOAuthAuthorizationRequestData>;
|
|
7
24
|
export interface IDecideMcpOAuthAuthorizationRequestData {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { OAuthAppOwnerKind } from '../../../enum/oauth-app.enum';
|
|
2
|
+
import type { IResponse } from '../type-message/response';
|
|
3
|
+
export interface IOAuthGrantSummary {
|
|
4
|
+
id: string;
|
|
5
|
+
application: {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
ownerName: string;
|
|
9
|
+
ownerKind: OAuthAppOwnerKind;
|
|
10
|
+
homepageUrl: string | null;
|
|
11
|
+
};
|
|
12
|
+
scopes: string[];
|
|
13
|
+
createdAt: Date;
|
|
14
|
+
lastUsedAt: Date | null;
|
|
15
|
+
}
|
|
16
|
+
export interface IListOAuthGrantUserData {
|
|
17
|
+
grants: IOAuthGrantSummary[];
|
|
18
|
+
}
|
|
19
|
+
export type IListOAuthGrantUserResponse = IResponse<IListOAuthGrantUserData>;
|
|
20
|
+
export type IRevokeOAuthGrantResponse = void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-grant.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/oauth-grant.response.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth-userinfo.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/oauth-userinfo.response.ts"],"names":[],"mappings":""}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { McpFunctionalScope, McpScopeType } from '../../enum/mcp.enum';
|
|
2
2
|
import type { McpOAuthClientSource } from '../../enum/mcp-oauth.enum';
|
|
3
|
+
import type { OAuthAuthorizationRequestKind } from '../../enum/oauth-app.enum';
|
|
3
4
|
export type McpOAuthAuthorizationRequestStatus = 'OPEN' | 'EXPIRED' | 'CONSUMED';
|
|
4
5
|
export interface IMcpOAuthApprovedScope {
|
|
5
6
|
scopeType: McpScopeType;
|
|
6
7
|
scopeId: string | null;
|
|
7
8
|
}
|
|
8
9
|
export interface IMcpOAuthAuthorizationRequestView {
|
|
10
|
+
kind: OAuthAuthorizationRequestKind.MCP;
|
|
9
11
|
id: string;
|
|
10
12
|
client: {
|
|
11
13
|
name: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abyss-project/main",
|
|
3
|
-
"version": "40.
|
|
3
|
+
"version": "40.5.0",
|
|
4
4
|
"description": "Core package to interact with Abyss-Project",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -61,6 +61,7 @@
|
|
|
61
61
|
"byte-size": "^8.1.0",
|
|
62
62
|
"date-fns": "^2.29.3",
|
|
63
63
|
"dayjs": "^1.10.7",
|
|
64
|
+
"jsonwebtoken": "^9.0.0",
|
|
64
65
|
"lodash": "^4.17.21",
|
|
65
66
|
"lz-string": "^1.5.0",
|
|
66
67
|
"reflect-metadata": "^0.1.13",
|
|
@@ -72,6 +73,7 @@
|
|
|
72
73
|
"@types/express": "^4.17.21",
|
|
73
74
|
"@types/express-serve-static-core": "^4.17.28",
|
|
74
75
|
"@types/jest": "^29.5.5",
|
|
76
|
+
"@types/jsonwebtoken": "^9.0.1",
|
|
75
77
|
"@types/lodash": "^4.14.177",
|
|
76
78
|
"@types/node": "^20.11.0",
|
|
77
79
|
"@types/uuid": "^9.0.0",
|