@abyss-project/main 43.1.0 → 43.3.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.
Files changed (62) hide show
  1. package/dist/api/oauth-application.api.d.ts +3 -2
  2. package/dist/api/oauth-application.api.js +7 -1
  3. package/dist/api/oauth-application.api.js.map +1 -1
  4. package/dist/api/oauth-authorization-request.api.d.ts +3 -0
  5. package/dist/api/oauth-authorization-request.api.js +5 -1
  6. package/dist/api/oauth-authorization-request.api.js.map +1 -1
  7. package/dist/api/oauth-grant.api.d.ts +5 -2
  8. package/dist/api/oauth-grant.api.js +13 -1
  9. package/dist/api/oauth-grant.api.js.map +1 -1
  10. package/dist/api/project-access.admin.api.d.ts +2 -1
  11. package/dist/api/project-access.admin.api.js +5 -1
  12. package/dist/api/project-access.admin.api.js.map +1 -1
  13. package/dist/api/project.admin.api.d.ts +2 -1
  14. package/dist/api/project.admin.api.js +5 -1
  15. package/dist/api/project.admin.api.js.map +1 -1
  16. package/dist/api/tests/sdk-compute-applications.spec.d.ts +1 -0
  17. package/dist/api/tests/sdk-compute-applications.spec.js +31 -0
  18. package/dist/api/tests/sdk-compute-applications.spec.js.map +1 -0
  19. package/dist/constants/oauth-app.constants.d.ts +5 -0
  20. package/dist/constants/oauth-app.constants.js +6 -1
  21. package/dist/constants/oauth-app.constants.js.map +1 -1
  22. package/dist/constants/oauth-scope-catalogue.d.ts +1 -0
  23. package/dist/constants/oauth-scope-catalogue.js +4 -2
  24. package/dist/constants/oauth-scope-catalogue.js.map +1 -1
  25. package/dist/constants/tests/oauth-scope-catalogue.spec.js +14 -2
  26. package/dist/constants/tests/oauth-scope-catalogue.spec.js.map +1 -1
  27. package/dist/index.d.ts +7 -0
  28. package/dist/index.js +7 -0
  29. package/dist/index.js.map +1 -1
  30. package/dist/server/oauth-perimeter.util.d.ts +3 -1
  31. package/dist/server/oauth-perimeter.util.js +17 -8
  32. package/dist/server/oauth-perimeter.util.js.map +1 -1
  33. package/dist/server/tests/oauth-perimeter.util.spec.js +112 -0
  34. package/dist/server/tests/oauth-perimeter.util.spec.js.map +1 -1
  35. package/dist/types/enum/api-error.enum.d.ts +3 -0
  36. package/dist/types/enum/api-error.enum.js +3 -0
  37. package/dist/types/enum/api-error.enum.js.map +1 -1
  38. package/dist/types/enum/oauth-app.enum.d.ts +2 -1
  39. package/dist/types/enum/oauth-app.enum.js +1 -0
  40. package/dist/types/enum/oauth-app.enum.js.map +1 -1
  41. package/dist/types/enum/oauth-scope.enum.d.ts +6 -0
  42. package/dist/types/enum/oauth-scope.enum.js +8 -1
  43. package/dist/types/enum/oauth-scope.enum.js.map +1 -1
  44. package/dist/types/interface/api/index.d.ts +2 -0
  45. package/dist/types/interface/api/index.js +2 -0
  46. package/dist/types/interface/api/index.js.map +1 -1
  47. package/dist/types/interface/api/requests/oauth-application.request.d.ts +6 -0
  48. package/dist/types/interface/api/requests/oauth-authorization-request.request.d.ts +4 -0
  49. package/dist/types/interface/api/requests/oauth-grant.request.d.ts +11 -0
  50. package/dist/types/interface/api/requests/oauth-perimeter.request.d.ts +1 -0
  51. package/dist/types/interface/api/requests/project-access.admin.request.d.ts +8 -0
  52. package/dist/types/interface/api/requests/project-access.admin.request.js +2 -0
  53. package/dist/types/interface/api/requests/project-access.admin.request.js.map +1 -1
  54. package/dist/types/interface/api/requests/project.admin.request.d.ts +3 -0
  55. package/dist/types/interface/api/responses/oauth-application.response.d.ts +11 -0
  56. package/dist/types/interface/api/responses/oauth-authorization-request.response.d.ts +4 -0
  57. package/dist/types/interface/api/responses/oauth-grant.response.d.ts +24 -1
  58. package/dist/types/interface/api/responses/oauth-perimeter.response.d.ts +23 -1
  59. package/dist/types/interface/api/responses/project-access.admin.response.d.ts +9 -0
  60. package/dist/types/interface/api/responses/project.admin.response.d.ts +5 -0
  61. package/dist/utils/abyss.utils.d.ts +1 -1
  62. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ import type { OAuthScopeName } from '../../../../constants/oauth-scope-catalogue';
1
2
  import type { OAuthClientType } from '../../../enum/oauth-app.enum';
2
3
  export interface IListOAuthApplicationProjectParams {
3
4
  projectId: string;
@@ -12,6 +13,7 @@ export interface ICreateOAuthApplicationBody {
12
13
  clientType: OAuthClientType;
13
14
  redirectUris: string[];
14
15
  allowedOrigins?: string[];
16
+ scopes: OAuthScopeName[];
15
17
  }
16
18
  export interface IGetOAuthApplicationParams {
17
19
  applicationId: string;
@@ -25,10 +27,14 @@ export interface IUpdateOAuthApplicationBody {
25
27
  homepageUrl?: string | null;
26
28
  redirectUris?: string[];
27
29
  allowedOrigins?: string[];
30
+ scopes?: OAuthScopeName[];
28
31
  }
29
32
  export interface IDeleteOAuthApplicationParams {
30
33
  applicationId: string;
31
34
  }
35
+ export interface IListNamesOAuthApplicationQuery {
36
+ clientIds: string[];
37
+ }
32
38
  export interface IRegenerateSecretOAuthApplicationParams {
33
39
  applicationId: string;
34
40
  }
@@ -1,5 +1,7 @@
1
1
  import type { McpScopeType } from '../../../enum/mcp.enum';
2
2
  import type { McpOAuthDecision } from '../../../enum/mcp-oauth.enum';
3
+ import type { OAuthScopeName } from '../../../../constants/oauth-scope-catalogue';
4
+ import type { IOAuthPerimeterEntryInput } from './oauth-perimeter.request';
3
5
  export interface IGetOAuthAuthorizationRequestParams {
4
6
  requestId: string;
5
7
  }
@@ -14,4 +16,6 @@ export interface IDecideMcpOAuthAuthorizationRequestBody {
14
16
  scopeType?: McpScopeType;
15
17
  scopeId?: string | null;
16
18
  name?: string;
19
+ scopes?: OAuthScopeName[];
20
+ perimeter?: IOAuthPerimeterEntryInput[];
17
21
  }
@@ -1,3 +1,14 @@
1
+ export interface IGetOAuthGrantParams {
2
+ grantId: string;
3
+ }
1
4
  export interface IRevokeOAuthGrantParams {
2
5
  grantId: string;
3
6
  }
7
+ export interface IRemoveScopeOAuthGrantParams {
8
+ grantId: string;
9
+ scope: string;
10
+ }
11
+ export interface IRemoveResourceOAuthGrantParams {
12
+ grantId: string;
13
+ resourceId: string;
14
+ }
@@ -13,6 +13,7 @@ export interface IListPerimeterCandidatesOAuthAuthorizationRequestParams {
13
13
  }
14
14
  export interface IListPerimeterCandidatesOAuthAuthorizationRequestQuery {
15
15
  service: OAuthService;
16
+ unit: OAuthPerimeterCandidateUnit;
16
17
  parent?: string;
17
18
  search?: string;
18
19
  cursor?: string;
@@ -70,6 +70,14 @@ export type IComputeUsersWithPermissionsProjectAccessAdminBody = {
70
70
  })[];
71
71
  };
72
72
  };
73
+ export declare const COMPUTE_APPLICATIONS_MAX_IDS = 500;
74
+ export interface IComputeApplicationsProjectAccessAdminParams {
75
+ projectId: string;
76
+ }
77
+ export interface IComputeApplicationsProjectAccessAdminBody {
78
+ userId: string;
79
+ applicationIds?: string[];
80
+ }
73
81
  export interface IComputeProjectAccessAdminParams {
74
82
  projectId: string;
75
83
  }
@@ -1,3 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.COMPUTE_APPLICATIONS_MAX_IDS = void 0;
4
+ exports.COMPUTE_APPLICATIONS_MAX_IDS = 500;
3
5
  //# sourceMappingURL=project-access.admin.request.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"project-access.admin.request.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/requests/project-access.admin.request.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"project-access.admin.request.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/requests/project-access.admin.request.ts"],"names":[],"mappings":";;;AA8Fa,QAAA,4BAA4B,GAAG,GAAG,CAAC"}
@@ -9,6 +9,9 @@ export interface IActivateServiceProjectAdminQuery {
9
9
  export interface IGetProjectAdminParams {
10
10
  projectId: string;
11
11
  }
12
+ export interface IListOpenableProjectAdminParams {
13
+ userId: string;
14
+ }
12
15
  export interface IListProjectAdminParams {
13
16
  userId: string;
14
17
  }
@@ -1,3 +1,4 @@
1
+ import type { OAuthScopeName } from '../../../../constants/oauth-scope-catalogue';
1
2
  import type { OAuthClientType } from '../../../enum/oauth-app.enum';
2
3
  import type { IResponse } from '../type-message/response';
3
4
  export interface IOAuthApplicationSummary {
@@ -11,6 +12,8 @@ export interface IOAuthApplicationSummary {
11
12
  allowedOrigins: string[];
12
13
  projectId: string;
13
14
  connectedUserCount: number;
15
+ scopes: OAuthScopeName[];
16
+ connectedUserCountByScope: Partial<Record<OAuthScopeName, number>>;
14
17
  createdAt: Date;
15
18
  updatedAt: Date;
16
19
  }
@@ -37,6 +40,14 @@ export interface IRegenerateSecretOAuthApplicationData {
37
40
  clientSecret: string;
38
41
  }
39
42
  export type IRegenerateSecretOAuthApplicationResponse = IResponse<IRegenerateSecretOAuthApplicationData>;
43
+ export interface IOAuthApplicationName {
44
+ clientId: string;
45
+ name: string;
46
+ }
47
+ export interface IListNamesOAuthApplicationData {
48
+ applications: IOAuthApplicationName[];
49
+ }
50
+ export type IListNamesOAuthApplicationResponse = IResponse<IListNamesOAuthApplicationData>;
40
51
  export interface IListAllowedOriginsOAuthApplicationAdminData {
41
52
  origins: string[];
42
53
  }
@@ -1,5 +1,7 @@
1
1
  import type { OAuthAuthorizationPrompt, OAuthAuthorizationRequestKind, OAuthClientType } from '../../../enum/oauth-app.enum';
2
2
  import type { IMcpOAuthAuthorizationRequestView, McpOAuthAuthorizationRequestStatus } from '../../mcp/mcp-oauth';
3
+ import type { OAuthScopeName } from '../../../../constants/oauth-scope-catalogue';
4
+ import type { IOAuthGrantResource } from './oauth-grant.response';
3
5
  import type { IResponse } from '../type-message/response';
4
6
  export interface IOAuthAppAuthorizationRequestView {
5
7
  kind: OAuthAuthorizationRequestKind.APP;
@@ -16,6 +18,8 @@ export interface IOAuthAppAuthorizationRequestView {
16
18
  redirectWarning: boolean;
17
19
  scopes: string[];
18
20
  missingScopes: string[];
21
+ grantedScopes: OAuthScopeName[];
22
+ perimeter: IOAuthGrantResource[];
19
23
  prompt: OAuthAuthorizationPrompt | null;
20
24
  }
21
25
  export interface IGetOAuthAuthorizationRequestData {
@@ -1,4 +1,16 @@
1
+ import type { OAuthScopeName } from '../../../../constants/oauth-scope-catalogue';
2
+ import type { OAuthPerimeterUnit, OAuthService } from '../../../enum/oauth-scope.enum';
1
3
  import type { IResponse } from '../type-message/response';
4
+ import type { IOAuthPerimeterSpace } from './oauth-perimeter.response';
5
+ export interface IOAuthGrantResource {
6
+ id: string;
7
+ service: OAuthService;
8
+ unit: OAuthPerimeterUnit;
9
+ resourceId: string | null;
10
+ environmentIds: string[] | null;
11
+ label: string;
12
+ space?: IOAuthPerimeterSpace;
13
+ }
2
14
  export interface IOAuthGrantSummary {
3
15
  id: string;
4
16
  application: {
@@ -8,12 +20,23 @@ export interface IOAuthGrantSummary {
8
20
  organizationName: string;
9
21
  homepageUrl: string | null;
10
22
  };
11
- scopes: string[];
23
+ scopes: OAuthScopeName[];
12
24
  createdAt: Date;
13
25
  lastUsedAt: Date | null;
14
26
  }
27
+ export interface IOAuthGrantDetail extends IOAuthGrantSummary {
28
+ resources: IOAuthGrantResource[];
29
+ }
15
30
  export interface IListOAuthGrantUserData {
16
31
  grants: IOAuthGrantSummary[];
17
32
  }
18
33
  export type IListOAuthGrantUserResponse = IResponse<IListOAuthGrantUserData>;
34
+ export interface IGetOAuthGrantData {
35
+ grant: IOAuthGrantDetail;
36
+ removedResources: IOAuthGrantResource[];
37
+ unreachableServices: OAuthService[];
38
+ }
39
+ export type IGetOAuthGrantResponse = IResponse<IGetOAuthGrantData>;
19
40
  export type IRevokeOAuthGrantResponse = void;
41
+ export type IRemoveScopeOAuthGrantResponse = void;
42
+ export type IRemoveResourceOAuthGrantResponse = void;
@@ -1,5 +1,18 @@
1
1
  import type { IOAuthPerimeterResourceInput, OAuthPerimeterCandidateUnit } from '../requests/oauth-perimeter.request';
2
+ import type { OAuthPerimeterSpaceType } from '../../../enum/oauth-scope.enum';
2
3
  import type { IResponse } from '../type-message/response';
4
+ export interface IOAuthPerimeterSpaceOwner {
5
+ type: OAuthPerimeterSpaceType;
6
+ organizationId: string | null;
7
+ projectId: string | null;
8
+ ownerUserId: string | null;
9
+ }
10
+ export interface IOAuthPerimeterSpace extends IOAuthPerimeterSpaceOwner {
11
+ organizationName: string | null;
12
+ projectName: string | null;
13
+ ownerName: string | null;
14
+ isOwnSpace: boolean;
15
+ }
3
16
  export interface IOAuthPerimeterCandidate {
4
17
  id: string | null;
5
18
  name: string;
@@ -7,15 +20,24 @@ export interface IOAuthPerimeterCandidate {
7
20
  parentId: string | null;
8
21
  kind?: string;
9
22
  isProduction?: boolean;
23
+ space?: IOAuthPerimeterSpace;
24
+ }
25
+ export interface IOAuthPerimeterAdminCandidate extends Omit<IOAuthPerimeterCandidate, 'space'> {
26
+ space?: IOAuthPerimeterSpaceOwner;
10
27
  }
11
28
  export interface IListOAuthPerimeterCandidatesData {
12
29
  candidates: IOAuthPerimeterCandidate[];
13
30
  nextCursor: string | null;
14
31
  }
15
32
  export type IListPerimeterCandidatesOAuthAuthorizationRequestResponse = IResponse<IListOAuthPerimeterCandidatesData>;
16
- export type IListOAuthPerimeterCandidatesAdminResponse = IResponse<IListOAuthPerimeterCandidatesData>;
33
+ export interface IListOAuthPerimeterCandidatesAdminData {
34
+ candidates: IOAuthPerimeterAdminCandidate[];
35
+ nextCursor: string | null;
36
+ }
37
+ export type IListOAuthPerimeterCandidatesAdminResponse = IResponse<IListOAuthPerimeterCandidatesAdminData>;
17
38
  export interface IOAuthPerimeterResolvedEntry extends IOAuthPerimeterResourceInput {
18
39
  label: string;
40
+ space?: IOAuthPerimeterSpaceOwner;
19
41
  }
20
42
  export interface IResolveOAuthPerimeterAdminData {
21
43
  entries: IOAuthPerimeterResolvedEntry[];
@@ -34,6 +34,15 @@ export interface IComputeApplicationProjectAccessAdminData {
34
34
  isDemo: boolean;
35
35
  }
36
36
  export type IComputeApplicationProjectAccessAdminResponse = IResponse<IComputeApplicationProjectAccessAdminData>;
37
+ export interface IComputedApplicationAccess {
38
+ applicationId: string;
39
+ permission: ProjectApplicationAccessPermission[];
40
+ }
41
+ export interface IComputeApplicationsProjectAccessAdminData {
42
+ applications: IComputedApplicationAccess[];
43
+ isDemo: boolean;
44
+ }
45
+ export type IComputeApplicationsProjectAccessAdminResponse = IResponse<IComputeApplicationsProjectAccessAdminData>;
37
46
  export interface IComputeNotificationAccessProjectAccessAdminData {
38
47
  user: IUser[];
39
48
  }
@@ -11,6 +11,11 @@ export interface IListProjectAdminData {
11
11
  sharedProjects: ProjectWithoutApplication[];
12
12
  }
13
13
  export type IListProjectAdminResponse = IResponse<IListProjectAdminData>;
14
+ export type OpenableProjectAdmin = Pick<IProject, 'id' | 'name' | 'organizationId'>;
15
+ export interface IListOpenableProjectAdminData {
16
+ projects: OpenableProjectAdmin[];
17
+ }
18
+ export type IListOpenableProjectAdminResponse = IResponse<IListOpenableProjectAdminData>;
14
19
  export type IPaginateProjectAdminResponse = IResponse<BasePaginate<IProject>>;
15
20
  export interface IDeleteProjectAdminData {
16
21
  }
@@ -1,2 +1,2 @@
1
1
  import { ActivatableService } from '../types';
2
- export declare const getServiceName: (service: ActivatableService) => "Abyss" | "Cloud" | "Crypt" | "Storage" | "Monitor" | "Memories" | "Banking" | "Odyssey" | "Spotlight" | "Form" | "Training" | "Console" | "Workspace" | "Extract" | "Beam" | "Link" | "Flow" | "Reflex" | undefined;
2
+ export declare const getServiceName: (service: ActivatableService) => "Form" | "Abyss" | "Cloud" | "Crypt" | "Storage" | "Monitor" | "Memories" | "Banking" | "Odyssey" | "Spotlight" | "Training" | "Console" | "Workspace" | "Extract" | "Beam" | "Link" | "Flow" | "Reflex" | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abyss-project/main",
3
- "version": "43.1.0",
3
+ "version": "43.3.0",
4
4
  "description": "Core package to interact with Abyss-Project",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",