@abyss-project/main 42.3.0 → 42.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.
Files changed (118) hide show
  1. package/dist/api/index.d.ts +3 -0
  2. package/dist/api/index.js +3 -0
  3. package/dist/api/index.js.map +1 -1
  4. package/dist/api/oauth-application.admin.api.d.ts +2 -0
  5. package/dist/api/oauth-application.admin.api.js +9 -0
  6. package/dist/api/oauth-application.admin.api.js.map +1 -0
  7. package/dist/api/oauth-application.api.d.ts +8 -0
  8. package/dist/api/oauth-application.api.js +30 -0
  9. package/dist/api/oauth-application.api.js.map +1 -0
  10. package/dist/api/oauth-authorization-request.api.d.ts +3 -2
  11. package/dist/api/oauth-authorization-request.api.js +5 -1
  12. package/dist/api/oauth-authorization-request.api.js.map +1 -1
  13. package/dist/api/oauth-grant.api.d.ts +4 -0
  14. package/dist/api/oauth-grant.api.js +15 -0
  15. package/dist/api/oauth-grant.api.js.map +1 -0
  16. package/dist/constants/index.d.ts +1 -0
  17. package/dist/constants/index.js +1 -0
  18. package/dist/constants/index.js.map +1 -1
  19. package/dist/constants/oauth-app.constants.d.ts +22 -0
  20. package/dist/constants/oauth-app.constants.js +66 -0
  21. package/dist/constants/oauth-app.constants.js.map +1 -0
  22. package/dist/constants/tests/oauth-app.constants.spec.js +90 -0
  23. package/dist/constants/tests/oauth-app.constants.spec.js.map +1 -0
  24. package/dist/constants/tests/service-conformity.spec.js +0 -14
  25. package/dist/constants/tests/service-conformity.spec.js.map +1 -1
  26. package/dist/index.d.ts +19 -5
  27. package/dist/index.js +19 -5
  28. package/dist/index.js.map +1 -1
  29. package/dist/permissions/ability.d.ts +1 -1
  30. package/dist/permissions/ability.js +2 -0
  31. package/dist/permissions/ability.js.map +1 -1
  32. package/dist/permissions/tests/ability.spec.js +17 -0
  33. package/dist/permissions/tests/ability.spec.js.map +1 -1
  34. package/dist/server/api-cors.util.d.ts +8 -0
  35. package/dist/server/api-cors.util.js +83 -1
  36. package/dist/server/api-cors.util.js.map +1 -1
  37. package/dist/server/index.d.ts +2 -0
  38. package/dist/server/index.js +2 -0
  39. package/dist/server/index.js.map +1 -1
  40. package/dist/server/oauth-access-token.util.d.ts +27 -0
  41. package/dist/server/oauth-access-token.util.js +99 -0
  42. package/dist/server/oauth-access-token.util.js.map +1 -0
  43. package/dist/server/oauth-request-guard.util.d.ts +39 -0
  44. package/dist/server/oauth-request-guard.util.js +78 -0
  45. package/dist/server/oauth-request-guard.util.js.map +1 -0
  46. package/dist/server/tests/api-cors-dynamic.util.spec.js +220 -0
  47. package/dist/server/tests/api-cors-dynamic.util.spec.js.map +1 -0
  48. package/dist/server/tests/oauth-access-token.util.spec.d.ts +1 -0
  49. package/dist/server/tests/oauth-access-token.util.spec.js +142 -0
  50. package/dist/server/tests/oauth-access-token.util.spec.js.map +1 -0
  51. package/dist/server/tests/oauth-request-guard.util.spec.d.ts +1 -0
  52. package/dist/server/tests/oauth-request-guard.util.spec.js +155 -0
  53. package/dist/server/tests/oauth-request-guard.util.spec.js.map +1 -0
  54. package/dist/types/enum/abyss-service.enum.d.ts +1 -2
  55. package/dist/types/enum/abyss-service.enum.js +0 -2
  56. package/dist/types/enum/abyss-service.enum.js.map +1 -1
  57. package/dist/types/enum/api-error.enum.d.ts +1 -0
  58. package/dist/types/enum/api-error.enum.js +1 -0
  59. package/dist/types/enum/api-error.enum.js.map +1 -1
  60. package/dist/types/enum/index.d.ts +1 -0
  61. package/dist/types/enum/index.js +1 -0
  62. package/dist/types/enum/index.js.map +1 -1
  63. package/dist/types/enum/oauth-app.enum.d.ts +59 -0
  64. package/dist/types/enum/oauth-app.enum.js +70 -0
  65. package/dist/types/enum/oauth-app.enum.js.map +1 -0
  66. package/dist/types/enum/project-access-permission.enum.d.ts +2 -1
  67. package/dist/types/enum/project-access-permission.enum.js +1 -0
  68. package/dist/types/enum/project-access-permission.enum.js.map +1 -1
  69. package/dist/types/interface/api/index.d.ts +5 -2
  70. package/dist/types/interface/api/index.js +5 -2
  71. package/dist/types/interface/api/index.js.map +1 -1
  72. package/dist/types/interface/api/requests/index.d.ts +2 -1
  73. package/dist/types/interface/api/requests/index.js +2 -1
  74. package/dist/types/interface/api/requests/index.js.map +1 -1
  75. package/dist/types/interface/api/requests/oauth-application.request.d.ts +34 -0
  76. package/dist/types/interface/api/{responses/user-alias.admin.response.js → requests/oauth-application.request.js} +1 -1
  77. package/dist/types/interface/api/requests/oauth-application.request.js.map +1 -0
  78. package/dist/types/interface/api/requests/oauth-authorization-request.request.d.ts +3 -0
  79. package/dist/types/interface/api/requests/oauth-grant.request.d.ts +3 -0
  80. package/dist/types/interface/api/requests/{user-alias.admin.request.js → oauth-grant.request.js} +1 -1
  81. package/dist/types/interface/api/requests/oauth-grant.request.js.map +1 -0
  82. package/dist/types/interface/api/responses/index.d.ts +3 -1
  83. package/dist/types/interface/api/responses/index.js +3 -1
  84. package/dist/types/interface/api/responses/index.js.map +1 -1
  85. package/dist/types/interface/api/responses/oauth-application.response.d.ts +43 -0
  86. package/dist/types/interface/api/responses/oauth-application.response.js +3 -0
  87. package/dist/types/interface/api/responses/oauth-application.response.js.map +1 -0
  88. package/dist/types/interface/api/responses/oauth-authorization-request.response.d.ts +24 -2
  89. package/dist/types/interface/api/responses/oauth-grant.response.d.ts +19 -0
  90. package/dist/types/interface/api/responses/oauth-grant.response.js +3 -0
  91. package/dist/types/interface/api/responses/oauth-grant.response.js.map +1 -0
  92. package/dist/types/interface/api/responses/oauth-userinfo.response.d.ts +8 -0
  93. package/dist/types/interface/api/responses/oauth-userinfo.response.js +3 -0
  94. package/dist/types/interface/api/responses/oauth-userinfo.response.js.map +1 -0
  95. package/dist/types/interface/mcp/mcp-oauth.d.ts +2 -0
  96. package/dist/utils/abyss.utils.d.ts +1 -1
  97. package/dist/utils/abyss.utils.js +0 -2
  98. package/dist/utils/abyss.utils.js.map +1 -1
  99. package/dist/utils/index.d.ts +0 -1
  100. package/dist/utils/index.js +0 -1
  101. package/dist/utils/index.js.map +1 -1
  102. package/package.json +3 -1
  103. package/dist/api/tests/sdk-user-alias-admin.spec.js +0 -25
  104. package/dist/api/tests/sdk-user-alias-admin.spec.js.map +0 -1
  105. package/dist/api/user-alias.admin.api.d.ts +0 -4
  106. package/dist/api/user-alias.admin.api.js +0 -16
  107. package/dist/api/user-alias.admin.api.js.map +0 -1
  108. package/dist/types/interface/api/requests/user-alias.admin.request.d.ts +0 -7
  109. package/dist/types/interface/api/requests/user-alias.admin.request.js.map +0 -1
  110. package/dist/types/interface/api/responses/user-alias.admin.response.d.ts +0 -11
  111. package/dist/types/interface/api/responses/user-alias.admin.response.js.map +0 -1
  112. package/dist/utils/feature-switch.utils.d.ts +0 -1
  113. package/dist/utils/feature-switch.utils.js +0 -15
  114. package/dist/utils/feature-switch.utils.js.map +0 -1
  115. package/dist/utils/tests/feature-switch.utils.spec.js +0 -17
  116. package/dist/utils/tests/feature-switch.utils.spec.js.map +0 -1
  117. /package/dist/{api/tests/sdk-user-alias-admin.spec.d.ts → constants/tests/oauth-app.constants.spec.d.ts} +0 -0
  118. /package/dist/{utils/tests/feature-switch.utils.spec.d.ts → server/tests/api-cors-dynamic.util.spec.d.ts} +0 -0
@@ -17,7 +17,6 @@ export * from './billing.response';
17
17
  export * from './content-share.response';
18
18
  export * from './crash-report.public.response';
19
19
  export * from './user-alias.public.response';
20
- export * from './user-alias.admin.response';
21
20
  export * from './gift-code.admin.response';
22
21
  export * from './gift-code.response';
23
22
  export * from './invitation.response';
@@ -56,6 +55,9 @@ export * from './session.response';
56
55
  export * from './trusted-device.response';
57
56
  export * from './mcp-connection.response';
58
57
  export * from './oauth-authorization-request.response';
58
+ export * from './oauth-application.response';
59
+ export * from './oauth-grant.response';
60
+ export * from './oauth-userinfo.response';
59
61
  export * from './activity.admin.response';
60
62
  export * from './referred-traffic.admin.response';
61
63
  export * from './short-link-protection.admin.response';
@@ -33,7 +33,6 @@ __exportStar(require("./billing.response"), exports);
33
33
  __exportStar(require("./content-share.response"), exports);
34
34
  __exportStar(require("./crash-report.public.response"), exports);
35
35
  __exportStar(require("./user-alias.public.response"), exports);
36
- __exportStar(require("./user-alias.admin.response"), exports);
37
36
  __exportStar(require("./gift-code.admin.response"), exports);
38
37
  __exportStar(require("./gift-code.response"), exports);
39
38
  __exportStar(require("./invitation.response"), exports);
@@ -72,6 +71,9 @@ __exportStar(require("./session.response"), exports);
72
71
  __exportStar(require("./trusted-device.response"), exports);
73
72
  __exportStar(require("./mcp-connection.response"), exports);
74
73
  __exportStar(require("./oauth-authorization-request.response"), exports);
74
+ __exportStar(require("./oauth-application.response"), exports);
75
+ __exportStar(require("./oauth-grant.response"), exports);
76
+ __exportStar(require("./oauth-userinfo.response"), exports);
75
77
  __exportStar(require("./activity.admin.response"), exports);
76
78
  __exportStar(require("./referred-traffic.admin.response"), exports);
77
79
  __exportStar(require("./short-link-protection.admin.response"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mEAAiD;AACjD,+DAA6C;AAC7C,yDAAuC;AACvC,qEAAmD;AACnD,iEAA+C;AAC/C,uEAAqD;AACrD,mDAAiC;AACjC,kDAAgC;AAChC,6DAA2C;AAC3C,mEAAiD;AACjD,6DAA2C;AAC3C,0DAAwC;AACxC,wEAAsD;AACtD,iEAA+C;AAC/C,2DAAyC;AACzC,qDAAmC;AACnC,2DAAyC;AACzC,iEAA+C;AAC/C,+DAA6C;AAC7C,8DAA4C;AAC5C,6DAA2C;AAC3C,uDAAqC;AACrC,wDAAsC;AACtC,2DAAyC;AACzC,2DAAyC;AACzC,iDAA+B;AAC/B,qDAAmC;AACnC,8DAA4C;AAC5C,qDAAmC;AACnC,kEAAgD;AAChD,kFAAgE;AAChE,4EAA0D;AAC1D,iEAA+C;AAC/C,gEAA8C;AAC9C,0DAAwC;AACxC,kEAAgD;AAChD,mEAAiD;AACjD,sDAAoC;AACpC,kEAAgD;AAChD,4DAA0C;AAC1C,6DAA2C;AAC3C,8DAA4C;AAC5C,2DAAyC;AACzC,qDAAmC;AACnC,4DAA0C;AAC1C,kDAAgC;AAChC,iEAA+C;AAC/C,0DAAwC;AACxC,iEAA+C;AAC/C,qEAAmD;AACnD,+DAA6C;AAC7C,wDAAsC;AACtC,kDAAgC;AAChC,8DAA4C;AAC5C,qDAAmC;AACnC,4DAA0C;AAC1C,4DAA0C;AAC1C,yEAAuD;AACvD,4DAA0C;AAC1C,oEAAkD;AAClD,yEAAuD;AACvD,+DAA6C;AAC7C,2DAAyC;AACzC,iEAA+C;AAC/C,qDAAmC;AACnC,2DAAyC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mEAAiD;AACjD,+DAA6C;AAC7C,yDAAuC;AACvC,qEAAmD;AACnD,iEAA+C;AAC/C,uEAAqD;AACrD,mDAAiC;AACjC,kDAAgC;AAChC,6DAA2C;AAC3C,mEAAiD;AACjD,6DAA2C;AAC3C,0DAAwC;AACxC,wEAAsD;AACtD,iEAA+C;AAC/C,2DAAyC;AACzC,qDAAmC;AACnC,2DAAyC;AACzC,iEAA+C;AAC/C,+DAA6C;AAC7C,6DAA2C;AAC3C,uDAAqC;AACrC,wDAAsC;AACtC,2DAAyC;AACzC,2DAAyC;AACzC,iDAA+B;AAC/B,qDAAmC;AACnC,8DAA4C;AAC5C,qDAAmC;AACnC,kEAAgD;AAChD,kFAAgE;AAChE,4EAA0D;AAC1D,iEAA+C;AAC/C,gEAA8C;AAC9C,0DAAwC;AACxC,kEAAgD;AAChD,mEAAiD;AACjD,sDAAoC;AACpC,kEAAgD;AAChD,4DAA0C;AAC1C,6DAA2C;AAC3C,8DAA4C;AAC5C,2DAAyC;AACzC,qDAAmC;AACnC,4DAA0C;AAC1C,kDAAgC;AAChC,iEAA+C;AAC/C,0DAAwC;AACxC,iEAA+C;AAC/C,qEAAmD;AACnD,+DAA6C;AAC7C,wDAAsC;AACtC,kDAAgC;AAChC,8DAA4C;AAC5C,qDAAmC;AACnC,4DAA0C;AAC1C,4DAA0C;AAC1C,yEAAuD;AACvD,+DAA6C;AAC7C,yDAAuC;AACvC,4DAA0C;AAC1C,4DAA0C;AAC1C,oEAAkD;AAClD,yEAAuD;AACvD,+DAA6C;AAC7C,2DAAyC;AACzC,iEAA+C;AAC/C,qDAAmC;AACnC,2DAAyC"}
@@ -0,0 +1,43 @@
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
+ projectId: string;
13
+ connectedUserCount: number;
14
+ createdAt: Date;
15
+ updatedAt: Date;
16
+ }
17
+ export interface ICreateOAuthApplicationData {
18
+ application: IOAuthApplicationSummary;
19
+ clientSecret: string | null;
20
+ }
21
+ export interface IListOAuthApplicationProjectData {
22
+ applications: IOAuthApplicationSummary[];
23
+ }
24
+ export type IListOAuthApplicationProjectResponse = IResponse<IListOAuthApplicationProjectData>;
25
+ export type ICreateOAuthApplicationProjectResponse = IResponse<ICreateOAuthApplicationData>;
26
+ export interface IGetOAuthApplicationData {
27
+ application: IOAuthApplicationSummary;
28
+ }
29
+ export type IGetOAuthApplicationResponse = IResponse<IGetOAuthApplicationData>;
30
+ export interface IUpdateOAuthApplicationData {
31
+ application: IOAuthApplicationSummary;
32
+ }
33
+ export type IUpdateOAuthApplicationResponse = IResponse<IUpdateOAuthApplicationData>;
34
+ export type IDeleteOAuthApplicationResponse = void;
35
+ export interface IRegenerateSecretOAuthApplicationData {
36
+ application: IOAuthApplicationSummary;
37
+ clientSecret: string;
38
+ }
39
+ export type IRegenerateSecretOAuthApplicationResponse = IResponse<IRegenerateSecretOAuthApplicationData>;
40
+ export interface IListAllowedOriginsOAuthApplicationAdminData {
41
+ origins: string[];
42
+ }
43
+ export type IListAllowedOriginsOAuthApplicationAdminResponse = IResponse<IListAllowedOriginsOAuthApplicationAdminData>;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=oauth-application.response.js.map
@@ -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,10 +1,32 @@
1
- import type { IMcpOAuthAuthorizationRequestView } from '../../mcp/mcp-oauth';
1
+ import type { OAuthAuthorizationPrompt, 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
+ organizationName: string;
12
+ homepageUrl: string | null;
13
+ clientType: OAuthClientType;
14
+ };
15
+ redirectHost: string;
16
+ redirectWarning: boolean;
17
+ scopes: string[];
18
+ missingScopes: string[];
19
+ prompt: OAuthAuthorizationPrompt | null;
20
+ }
3
21
  export interface IGetOAuthAuthorizationRequestData {
4
- request: IMcpOAuthAuthorizationRequestView;
22
+ request: IMcpOAuthAuthorizationRequestView | IOAuthAppAuthorizationRequestView;
5
23
  }
6
24
  export type IGetOAuthAuthorizationRequestResponse = IResponse<IGetOAuthAuthorizationRequestData>;
7
25
  export interface IDecideMcpOAuthAuthorizationRequestData {
8
26
  redirectTo: string;
9
27
  }
10
28
  export type IDecideMcpOAuthAuthorizationRequestResponse = IResponse<IDecideMcpOAuthAuthorizationRequestData>;
29
+ export interface ILoginRequiredOAuthAuthorizationRequestData {
30
+ redirectTo: string;
31
+ }
32
+ export type ILoginRequiredOAuthAuthorizationRequestResponse = IResponse<ILoginRequiredOAuthAuthorizationRequestData>;
@@ -0,0 +1,19 @@
1
+ import type { IResponse } from '../type-message/response';
2
+ export interface IOAuthGrantSummary {
3
+ id: string;
4
+ application: {
5
+ id: string;
6
+ name: string;
7
+ ownerName: string;
8
+ organizationName: string;
9
+ homepageUrl: string | null;
10
+ };
11
+ scopes: string[];
12
+ createdAt: Date;
13
+ lastUsedAt: Date | null;
14
+ }
15
+ export interface IListOAuthGrantUserData {
16
+ grants: IOAuthGrantSummary[];
17
+ }
18
+ export type IListOAuthGrantUserResponse = IResponse<IListOAuthGrantUserData>;
19
+ export type IRevokeOAuthGrantResponse = void;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=oauth-grant.response.js.map
@@ -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,8 @@
1
+ export interface IOAuthUserInfoResponse {
2
+ sub: string;
3
+ name?: string;
4
+ preferred_username?: string;
5
+ picture?: string;
6
+ email?: string;
7
+ email_verified?: boolean;
8
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=oauth-userinfo.response.js.map
@@ -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;
@@ -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" | "Play" | "Spotlight" | "Form" | "Training" | "Console" | "Workspace" | "Extract" | "Beam" | "Link" | "Flow" | "Reflex" | undefined;
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;
@@ -20,8 +20,6 @@ const getServiceName = (service) => {
20
20
  return 'Banking';
21
21
  case types_1.AbyssGame.ODYSSEY:
22
22
  return 'Odyssey';
23
- case types_1.AbyssGame.PLAY:
24
- return 'Play';
25
23
  case types_1.AbyssService.ABYSS_SPOTLIGHT:
26
24
  return 'Spotlight';
27
25
  case types_1.AbyssService.ABYSS_FORM:
@@ -1 +1 @@
1
- {"version":3,"file":"abyss.utils.js","sourceRoot":"","sources":["../../src/utils/abyss.utils.ts"],"names":[],"mappings":";;;AAAA,oCAAuE;AAEhE,MAAM,cAAc,GAAG,CAAC,OAA2B,EAAE,EAAE;IAC5D,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,oBAAY,CAAC,cAAc;YAC9B,OAAO,OAAO,CAAC;QAEjB,KAAK,oBAAY,CAAC,WAAW;YAC3B,OAAO,OAAO,CAAC;QAEjB,KAAK,oBAAY,CAAC,WAAW;YAC3B,OAAO,OAAO,CAAC;QAEjB,KAAK,oBAAY,CAAC,aAAa;YAC7B,OAAO,SAAS,CAAC;QAEnB,KAAK,oBAAY,CAAC,aAAa;YAC7B,OAAO,SAAS,CAAC;QAEnB,KAAK,oBAAY,CAAC,cAAc;YAC9B,OAAO,UAAU,CAAC;QAEpB,KAAK,oBAAY,CAAC,aAAa;YAC7B,OAAO,SAAS,CAAC;QAEnB,KAAK,iBAAS,CAAC,OAAO;YACpB,OAAO,SAAS,CAAC;QAEnB,KAAK,iBAAS,CAAC,IAAI;YACjB,OAAO,MAAM,CAAC;QAEhB,KAAK,oBAAY,CAAC,eAAe;YAC/B,OAAO,WAAW,CAAC;QAErB,KAAK,oBAAY,CAAC,UAAU;YAC1B,OAAO,MAAM,CAAC;QAEhB,KAAK,oBAAY,CAAC,cAAc;YAC9B,OAAO,UAAU,CAAC;QAEpB,KAAK,oBAAY,CAAC,aAAa;YAC7B,OAAO,SAAS,CAAC;QAEnB,KAAK,oBAAY,CAAC,eAAe;YAC/B,OAAO,WAAW,CAAC;QAErB,KAAK,oBAAY,CAAC,aAAa;YAC7B,OAAO,SAAS,CAAC;QAEnB,KAAK,oBAAY,CAAC,UAAU;YAC1B,OAAO,MAAM,CAAC;QAEhB,KAAK,oBAAY,CAAC,UAAU;YAC1B,OAAO,MAAM,CAAC;QAEhB,KAAK,oBAAY,CAAC,UAAU;YAC1B,OAAO,MAAM,CAAC;QAEhB,KAAK,oBAAY,CAAC,YAAY;YAC5B,OAAO,QAAQ,CAAC;QAElB;YACE,MAAM;IACV,CAAC;AACH,CAAC,CAAC;AA9DW,QAAA,cAAc,kBA8DzB"}
1
+ {"version":3,"file":"abyss.utils.js","sourceRoot":"","sources":["../../src/utils/abyss.utils.ts"],"names":[],"mappings":";;;AAAA,oCAAuE;AAEhE,MAAM,cAAc,GAAG,CAAC,OAA2B,EAAE,EAAE;IAC5D,QAAQ,OAAO,EAAE,CAAC;QAChB,KAAK,oBAAY,CAAC,cAAc;YAC9B,OAAO,OAAO,CAAC;QAEjB,KAAK,oBAAY,CAAC,WAAW;YAC3B,OAAO,OAAO,CAAC;QAEjB,KAAK,oBAAY,CAAC,WAAW;YAC3B,OAAO,OAAO,CAAC;QAEjB,KAAK,oBAAY,CAAC,aAAa;YAC7B,OAAO,SAAS,CAAC;QAEnB,KAAK,oBAAY,CAAC,aAAa;YAC7B,OAAO,SAAS,CAAC;QAEnB,KAAK,oBAAY,CAAC,cAAc;YAC9B,OAAO,UAAU,CAAC;QAEpB,KAAK,oBAAY,CAAC,aAAa;YAC7B,OAAO,SAAS,CAAC;QAEnB,KAAK,iBAAS,CAAC,OAAO;YACpB,OAAO,SAAS,CAAC;QAEnB,KAAK,oBAAY,CAAC,eAAe;YAC/B,OAAO,WAAW,CAAC;QAErB,KAAK,oBAAY,CAAC,UAAU;YAC1B,OAAO,MAAM,CAAC;QAEhB,KAAK,oBAAY,CAAC,cAAc;YAC9B,OAAO,UAAU,CAAC;QAEpB,KAAK,oBAAY,CAAC,aAAa;YAC7B,OAAO,SAAS,CAAC;QAEnB,KAAK,oBAAY,CAAC,eAAe;YAC/B,OAAO,WAAW,CAAC;QAErB,KAAK,oBAAY,CAAC,aAAa;YAC7B,OAAO,SAAS,CAAC;QAEnB,KAAK,oBAAY,CAAC,UAAU;YAC1B,OAAO,MAAM,CAAC;QAEhB,KAAK,oBAAY,CAAC,UAAU;YAC1B,OAAO,MAAM,CAAC;QAEhB,KAAK,oBAAY,CAAC,UAAU;YAC1B,OAAO,MAAM,CAAC;QAEhB,KAAK,oBAAY,CAAC,YAAY;YAC5B,OAAO,QAAQ,CAAC;QAElB;YACE,MAAM;IACV,CAAC;AACH,CAAC,CAAC;AA3DW,QAAA,cAAc,kBA2DzB"}
@@ -33,4 +33,3 @@ export * from './billing-deep-link.utils';
33
33
  export * from './board-card-due.utils';
34
34
  export * from './retention-rule.utils';
35
35
  export * from './time-zone.utils';
36
- export * from './feature-switch.utils';
@@ -49,5 +49,4 @@ __exportStar(require("./billing-deep-link.utils"), exports);
49
49
  __exportStar(require("./board-card-due.utils"), exports);
50
50
  __exportStar(require("./retention-rule.utils"), exports);
51
51
  __exportStar(require("./time-zone.utils"), exports);
52
- __exportStar(require("./feature-switch.utils"), exports);
53
52
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,gDAA8B;AAC9B,0DAAwC;AACxC,+CAA6B;AAC7B,iDAA+B;AAC/B,uDAAqC;AACrC,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,+CAA6B;AAC7B,sDAAoC;AACpC,iDAA+B;AAC/B,mDAAiC;AACjC,mDAAiC;AACjC,sDAAoC;AACpC,kDAAgC;AAChC,0DAAwC;AACxC,wDAAsC;AACtC,wDAAsC;AACtC,wDAAsC;AACtC,6DAA2C;AAC3C,8DAA4C;AAC5C,qDAAmC;AACnC,0DAAwC;AACxC,6DAA2C;AAC3C,uDAAqC;AACrC,0DAAwC;AACxC,iEAA+C;AAI/C,kDAAgC;AAChC,wDAAsC;AACtC,4DAA0C;AAC1C,yDAAuC;AACvC,yDAAuC;AACvC,oDAAkC;AAClC,yDAAuC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,gDAA8B;AAC9B,0DAAwC;AACxC,+CAA6B;AAC7B,iDAA+B;AAC/B,uDAAqC;AACrC,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,gDAA8B;AAC9B,+CAA6B;AAC7B,sDAAoC;AACpC,iDAA+B;AAC/B,mDAAiC;AACjC,mDAAiC;AACjC,sDAAoC;AACpC,kDAAgC;AAChC,0DAAwC;AACxC,wDAAsC;AACtC,wDAAsC;AACtC,wDAAsC;AACtC,6DAA2C;AAC3C,8DAA4C;AAC5C,qDAAmC;AACnC,0DAAwC;AACxC,6DAA2C;AAC3C,uDAAqC;AACrC,0DAAwC;AACxC,iEAA+C;AAI/C,kDAAgC;AAChC,wDAAsC;AACtC,4DAA0C;AAC1C,yDAAuC;AACvC,yDAAuC;AACvC,oDAAkC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abyss-project/main",
3
- "version": "42.3.0",
3
+ "version": "42.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",
@@ -1,25 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const __1 = require("../..");
4
- describe('SDK — admin alias routes (#858)', () => {
5
- afterEach(() => {
6
- jest.restoreAllMocks();
7
- });
8
- it('draws a suggestion through the admin route, in the language asked', async () => {
9
- const body = { data: { alias: 'SwiftFox4821' } };
10
- jest.spyOn(__1.AbyssCore.axios, 'get').mockResolvedValue({ status: 200, data: body });
11
- await expect(__1.AbyssCore.sdk.userAlias.admin.suggest({ language: __1.UserLanguage.ENGLISH })).resolves.toEqual(body);
12
- expect(__1.AbyssCore.axios.get).toHaveBeenCalledWith('user-alias/admin/suggest', {
13
- params: { language: __1.UserLanguage.ENGLISH },
14
- });
15
- });
16
- it('checks an alias through the admin route', async () => {
17
- const body = { data: { available: true } };
18
- jest.spyOn(__1.AbyssCore.axios, 'post').mockResolvedValue({ status: 200, data: body });
19
- await expect(__1.AbyssCore.sdk.userAlias.admin.check({ alias: 'Visitor1234' })).resolves.toEqual(body);
20
- expect(__1.AbyssCore.axios.post).toHaveBeenCalledWith('user-alias/admin/check', {
21
- alias: 'Visitor1234',
22
- });
23
- });
24
- });
25
- //# sourceMappingURL=sdk-user-alias-admin.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sdk-user-alias-admin.spec.js","sourceRoot":"","sources":["../../../src/api/tests/sdk-user-alias-admin.spec.ts"],"names":[],"mappings":";;AAAA,6BAAgD;AAEhD,QAAQ,CAAC,iCAAiC,EAAE,GAAG,EAAE;IAC/C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,eAAe,EAAE,CAAC;IACzB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mEAAmE,EAAE,KAAK,IAAI,EAAE;QACjF,MAAM,IAAI,GAAG,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,CAAC;QACjD,IAAI,CAAC,KAAK,CAAC,aAAS,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAElF,MAAM,MAAM,CACV,aAAS,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,gBAAY,CAAC,OAAO,EAAE,CAAC,CAC1E,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACzB,MAAM,CAAC,aAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,oBAAoB,CAAC,0BAA0B,EAAE;YAC3E,MAAM,EAAE,EAAE,QAAQ,EAAE,gBAAY,CAAC,OAAO,EAAE;SAC3C,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yCAAyC,EAAE,KAAK,IAAI,EAAE;QACvD,MAAM,IAAI,GAAG,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC;QAC3C,IAAI,CAAC,KAAK,CAAC,aAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,iBAAiB,CAAC,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAEnF,MAAM,MAAM,CAAC,aAAS,CAAC,GAAG,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAC1F,IAAI,CACL,CAAC;QACF,MAAM,CAAC,aAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,oBAAoB,CAAC,wBAAwB,EAAE;YAC1E,KAAK,EAAE,aAAa;SACrB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,4 +0,0 @@
1
- import type { ICheckUserAliasAdminBody, ISuggestUserAliasAdminQuery } from '../types/interface/api/requests/user-alias.admin.request';
2
- import type { ICheckUserAliasAdminResponse, ISuggestUserAliasAdminResponse } from '../types/interface/api/responses/user-alias.admin.response';
3
- export declare const suggestUserAliasAdmin: (query: ISuggestUserAliasAdminQuery) => Promise<ISuggestUserAliasAdminResponse>;
4
- export declare const checkUserAliasAdmin: (body: ICheckUserAliasAdminBody) => Promise<ICheckUserAliasAdminResponse>;
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.checkUserAliasAdmin = exports.suggestUserAliasAdmin = void 0;
4
- const __1 = require("..");
5
- const suggestUserAliasAdmin = async (query) => {
6
- return (await __1.AbyssCore.axios.get('user-alias/admin/suggest', {
7
- params: query,
8
- })).data;
9
- };
10
- exports.suggestUserAliasAdmin = suggestUserAliasAdmin;
11
- const checkUserAliasAdmin = async (body) => {
12
- return (await __1.AbyssCore.axios.post('user-alias/admin/check', body))
13
- .data;
14
- };
15
- exports.checkUserAliasAdmin = checkUserAliasAdmin;
16
- //# sourceMappingURL=user-alias.admin.api.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-alias.admin.api.js","sourceRoot":"","sources":["../../src/api/user-alias.admin.api.ts"],"names":[],"mappings":";;;AAAA,0BAA+B;AAUxB,MAAM,qBAAqB,GAAG,KAAK,EACxC,KAAkC,EACO,EAAE;IAC3C,OAAO,CACL,MAAM,aAAS,CAAC,KAAK,CAAC,GAAG,CAAiC,0BAA0B,EAAE;QACpF,MAAM,EAAE,KAAK;KACd,CAAC,CACH,CAAC,IAAI,CAAC;AACT,CAAC,CAAC;AARW,QAAA,qBAAqB,yBAQhC;AAEK,MAAM,mBAAmB,GAAG,KAAK,EACtC,IAA8B,EACS,EAAE;IACzC,OAAO,CAAC,MAAM,aAAS,CAAC,KAAK,CAAC,IAAI,CAA+B,wBAAwB,EAAE,IAAI,CAAC,CAAC;SAC9F,IAAI,CAAC;AACV,CAAC,CAAC;AALW,QAAA,mBAAmB,uBAK9B"}
@@ -1,7 +0,0 @@
1
- import type { UserLanguage } from '../../../enum';
2
- export interface ISuggestUserAliasAdminQuery {
3
- language: UserLanguage;
4
- }
5
- export interface ICheckUserAliasAdminBody {
6
- alias: string;
7
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-alias.admin.request.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/requests/user-alias.admin.request.ts"],"names":[],"mappings":""}
@@ -1,11 +0,0 @@
1
- import type { AliasRejectionReason } from '../../../enum';
2
- import type { IResponse } from '../..';
3
- export interface ISuggestUserAliasAdminData {
4
- alias: string;
5
- }
6
- export type ISuggestUserAliasAdminResponse = IResponse<ISuggestUserAliasAdminData>;
7
- export interface ICheckUserAliasAdminData {
8
- available: boolean;
9
- reason?: AliasRejectionReason;
10
- }
11
- export type ICheckUserAliasAdminResponse = IResponse<ICheckUserAliasAdminData>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-alias.admin.response.js","sourceRoot":"","sources":["../../../../../src/types/interface/api/responses/user-alias.admin.response.ts"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- export declare const readFeatureSwitch: (name: string, value: string | undefined) => boolean;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.readFeatureSwitch = void 0;
4
- const readFeatureSwitch = (name, value) => {
5
- const normalized = value?.trim().toLowerCase();
6
- if (!normalized) {
7
- return false;
8
- }
9
- if (normalized !== 'true' && normalized !== 'false') {
10
- throw new Error(`${name} should be true or false`);
11
- }
12
- return normalized === 'true';
13
- };
14
- exports.readFeatureSwitch = readFeatureSwitch;
15
- //# sourceMappingURL=feature-switch.utils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"feature-switch.utils.js","sourceRoot":"","sources":["../../src/utils/feature-switch.utils.ts"],"names":[],"mappings":";;;AAKO,MAAM,iBAAiB,GAAG,CAAC,IAAY,EAAE,KAAyB,EAAW,EAAE;IACpF,MAAM,UAAU,GAAG,KAAK,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IAC/C,IAAI,CAAC,UAAU,EAAE,CAAC;QAChB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,UAAU,KAAK,MAAM,IAAI,UAAU,KAAK,OAAO,EAAE,CAAC;QACpD,MAAM,IAAI,KAAK,CAAC,GAAG,IAAI,0BAA0B,CAAC,CAAC;IACrD,CAAC;IACD,OAAO,UAAU,KAAK,MAAM,CAAC;AAC/B,CAAC,CAAC;AATW,QAAA,iBAAiB,qBAS5B"}
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const feature_switch_utils_1 = require("../feature-switch.utils");
4
- describe('readFeatureSwitch', () => {
5
- it.each([undefined, '', ' '])('is off when the variable is %p', (value) => {
6
- expect((0, feature_switch_utils_1.readFeatureSwitch)('VITE_X', value)).toBe(false);
7
- });
8
- it('reads true and false as written', () => {
9
- expect((0, feature_switch_utils_1.readFeatureSwitch)('VITE_X', 'true')).toBe(true);
10
- expect((0, feature_switch_utils_1.readFeatureSwitch)('VITE_X', ' TRUE ')).toBe(true);
11
- expect((0, feature_switch_utils_1.readFeatureSwitch)('VITE_X', 'false')).toBe(false);
12
- });
13
- it.each(['1', 'yes', 'ture', 'on'])('refuses %p and names the variable', (value) => {
14
- expect(() => (0, feature_switch_utils_1.readFeatureSwitch)('VITE_X', value)).toThrow('VITE_X should be true or false');
15
- });
16
- });
17
- //# sourceMappingURL=feature-switch.utils.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"feature-switch.utils.spec.js","sourceRoot":"","sources":["../../../src/utils/tests/feature-switch.utils.spec.ts"],"names":[],"mappings":";;AAAA,kEAA4D;AAE5D,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,gCAAgC,EAAE,CAAC,KAAK,EAAE,EAAE;QAC1E,MAAM,CAAC,IAAA,wCAAiB,EAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACzD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iCAAiC,EAAE,GAAG,EAAE;QACzC,MAAM,CAAC,IAAA,wCAAiB,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACvD,MAAM,CAAC,IAAA,wCAAiB,EAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzD,MAAM,CAAC,IAAA,wCAAiB,EAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC3D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,mCAAmC,EAAE,CAAC,KAAK,EAAE,EAAE;QACjF,MAAM,CAAC,GAAG,EAAE,CAAC,IAAA,wCAAiB,EAAC,QAAQ,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC;IAC7F,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}