@intellegens/cornerstone-client 0.0.9999-alpha-41 → 0.0.9999-alpha-43
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/adapters/collection-view-adapter.d.ts +123 -0
- package/dist/adapters/collection-view-adapter.integration.test.d.ts +1 -0
- package/dist/adapters/collection-view-adapter.integration.test.js +141 -0
- package/dist/adapters/collection-view-adapter.js +352 -0
- package/dist/adapters/index.d.ts +2 -2
- package/dist/adapters/index.js +2 -2
- package/dist/adapters/search-adapter.d.ts +83 -0
- package/dist/adapters/search-adapter.js +284 -0
- package/dist/data/api/dto/crud/crud-metadata-dto.js +1 -0
- package/dist/data/api/dto/crud/index.d.ts +1 -1
- package/dist/data/api/dto/crud/index.js +1 -1
- package/dist/data/api/dto/index.d.ts +1 -1
- package/dist/data/api/dto/index.js +1 -1
- package/dist/data/api/dto/property-path-dto.d.ts +4 -0
- package/dist/data/api/dto/property-path-dto.js +1 -0
- package/dist/data/api/dto/read/index.d.ts +10 -10
- package/dist/data/api/dto/read/index.js +10 -10
- package/dist/data/api/dto/read/read-metadata-dto.d.ts +8 -0
- package/dist/data/api/dto/read/read-metadata-dto.js +1 -0
- package/dist/data/api/dto/read/read-selected-definition-dto.d.ts +18 -0
- package/dist/data/api/dto/read/read-selected-definition-dto.js +1 -0
- package/dist/data/api/dto/read/read-selected-nested-collection-criteria-dto.d.ts +22 -0
- package/dist/data/api/dto/read/read-selected-nested-collection-criteria-dto.js +1 -0
- package/dist/data/api/dto/read/read-selected-nested-criteria-dto.d.ts +18 -0
- package/dist/data/api/dto/read/read-selected-nested-criteria-dto.js +1 -0
- package/dist/data/api/dto/read/read-selected-ordering-definition-dto.d.ts +7 -0
- package/dist/data/api/dto/read/read-selected-ordering-definition-dto.js +1 -0
- package/dist/data/api/dto/read/read-selected-ordering-property-definition-dto.d.ts +14 -0
- package/dist/data/api/dto/read/read-selected-ordering-property-definition-dto.js +1 -0
- package/dist/data/api/dto/read/read-selected-pagination-definition-dto.d.ts +13 -0
- package/dist/data/api/dto/read/read-selected-pagination-definition-dto.js +1 -0
- package/dist/data/api/dto/read/read-selected-search-definition-builder.d.ts +167 -0
- package/dist/data/api/dto/read/read-selected-search-definition-builder.js +267 -0
- package/dist/data/api/dto/read/read-selected-search-definition-dto.d.ts +33 -0
- package/dist/data/api/dto/read/read-selected-search-definition-dto.js +1 -0
- package/dist/data/api/dto/read/read-selected-search-property-definition-dto.d.ts +114 -0
- package/dist/data/api/dto/read/read-selected-search-property-definition-dto.js +1 -0
- package/dist/data/api/dto/read-options-dto.d.ts +8 -0
- package/dist/data/api/dto/read-options-dto.js +1 -0
- package/dist/data/api/dto/read-result-dto.d.ts +12 -0
- package/dist/data/api/dto/read-result-dto.js +1 -0
- package/dist/data/api/dto/read-result-metadata-dto.d.ts +8 -0
- package/dist/data/api/dto/read-result-metadata-dto.js +1 -0
- package/dist/data/api/dto/response/api-error-dto.d.ts +17 -0
- package/dist/data/api/dto/response/api-error-dto.js +1 -0
- package/dist/data/api/dto/response/api-error-response-dto.d.ts +11 -0
- package/dist/data/api/dto/response/api-error-response-dto.js +1 -0
- package/dist/data/api/dto/response/api-response-dto.d.ts +3 -0
- package/dist/data/api/dto/response/api-response-dto.js +1 -0
- package/dist/data/api/dto/response/api-success-response-dto.d.ts +13 -0
- package/dist/data/api/dto/response/api-success-response-dto.js +1 -0
- package/dist/data/api/dto/response/index.d.ts +5 -5
- package/dist/data/api/dto/response/index.js +5 -5
- package/dist/data/api/dto/response/metadata-dto.d.ts +25 -0
- package/dist/data/api/dto/response/metadata-dto.js +1 -0
- package/dist/data/api/enum/read/index.d.ts +5 -5
- package/dist/data/api/enum/read/index.js +5 -5
- package/dist/data/api/enum/read/read-selected-collection-operator.d.ts +16 -0
- package/dist/data/api/enum/read/read-selected-collection-operator.js +17 -0
- package/dist/data/api/enum/read/read-selected-comparison-operator.d.ts +69 -0
- package/dist/data/api/enum/read/read-selected-comparison-operator.js +76 -0
- package/dist/data/api/enum/read/read-selected-logical-operator.d.ts +15 -0
- package/dist/data/api/enum/read/read-selected-logical-operator.js +16 -0
- package/dist/data/api/enum/read/read-selected-ordering-direction.d.ts +13 -0
- package/dist/data/api/enum/read/read-selected-ordering-direction.js +14 -0
- package/dist/data/api/enum/read/read-selected-property-type.d.ts +66 -0
- package/dist/data/api/enum/read/read-selected-property-type.js +75 -0
- package/dist/data/api/enum/response/error-code.d.ts +14 -0
- package/dist/data/api/enum/response/error-code.js +15 -0
- package/dist/data/api/enum/response/index.d.ts +1 -1
- package/dist/data/api/enum/response/index.js +1 -1
- package/dist/data/api/interface/icommon-identifiable.d.ts +7 -0
- package/dist/data/api/interface/icommon-identifiable.js +1 -0
- package/dist/data/api/interface/iconcurrency-safe.d.ts +9 -0
- package/dist/data/api/interface/iconcurrency-safe.js +1 -0
- package/dist/data/api/interface/iidentifiable-secondary.d.ts +9 -0
- package/dist/data/api/interface/iidentifiable-secondary.js +1 -0
- package/dist/data/api/interface/iidentifiable.d.ts +11 -0
- package/dist/data/api/interface/iidentifiable.js +1 -0
- package/dist/data/api/interface/index.d.ts +4 -3
- package/dist/data/api/interface/index.js +4 -3
- package/dist/data/auth/dto/claim-dto.d.ts +4 -0
- package/dist/data/auth/dto/claim-dto.js +1 -0
- package/dist/data/auth/dto/index.d.ts +6 -5
- package/dist/data/auth/dto/index.js +6 -5
- package/dist/data/auth/dto/register-request-dto.d.ts +4 -0
- package/dist/data/auth/dto/register-request-dto.js +1 -0
- package/dist/data/auth/dto/role-dto.d.ts +5 -0
- package/dist/data/auth/dto/role-dto.js +1 -0
- package/dist/data/auth/dto/role-with-claims-dto.d.ts +5 -0
- package/dist/data/auth/dto/role-with-claims-dto.js +1 -0
- package/dist/data/auth/dto/sign-in-request-dto.d.ts +4 -0
- package/dist/data/auth/dto/sign-in-request-dto.js +1 -0
- package/dist/data/auth/dto/tokens-dto.d.ts +4 -0
- package/dist/data/auth/dto/tokens-dto.js +1 -0
- package/dist/data/auth/dto/user-dto.d.ts +16 -0
- package/dist/data/auth/dto/user-dto.js +1 -0
- package/dist/data/auth/dto/user-info-dto.d.ts +14 -0
- package/dist/data/auth/dto/user-info-dto.js +1 -0
- package/dist/services/api/api-crud-controller-client.d.ts +62 -0
- package/dist/services/api/api-crud-controller-client.integration.test.d.ts +1 -0
- package/dist/services/api/api-crud-controller-client.integration.test.js +34 -0
- package/dist/services/api/api-crud-controller-client.js +133 -0
- package/dist/services/api/api-initialization-service.d.ts +106 -0
- package/dist/services/api/api-initialization-service.js +207 -0
- package/dist/services/api/api-read-controller-client.d.ts +62 -0
- package/dist/services/api/api-read-controller-client.integration.test.d.ts +1 -0
- package/dist/services/api/api-read-controller-client.integration.test.js +59 -0
- package/dist/services/api/api-read-controller-client.js +129 -0
- package/dist/services/api/http-service/fetch-http-service.d.ts +7 -0
- package/dist/services/api/http-service/fetch-http-service.integration.test.d.ts +1 -0
- package/dist/services/api/http-service/fetch-http-service.integration.test.js +52 -0
- package/dist/services/api/http-service/fetch-http-service.js +29 -0
- package/dist/services/api/http-service/http-request-config.d.ts +10 -0
- package/dist/services/api/http-service/http-request-config.js +1 -0
- package/dist/services/api/http-service/http-response.d.ts +11 -0
- package/dist/services/api/http-service/http-response.js +3 -0
- package/dist/services/api/http-service/http-service.d.ts +5 -0
- package/dist/services/api/http-service/http-service.js +5 -0
- package/dist/services/api/http-service/ihttp-service.d.ts +13 -0
- package/dist/services/api/http-service/ihttp-service.js +3 -0
- package/dist/services/api/http-service/index.d.ts +5 -0
- package/dist/services/api/http-service/index.js +5 -0
- package/dist/services/api/index.d.ts +5 -5
- package/dist/services/api/index.js +5 -5
- package/dist/services/api/user-management-controller-client.d.ts +80 -0
- package/dist/services/api/user-management-controller-client.integration.test.d.ts +1 -0
- package/dist/services/api/user-management-controller-client.integration.test.js +60 -0
- package/dist/services/api/user-management-controller-client.js +291 -0
- package/dist/services/auth/client/auth-service.d.ts +75 -0
- package/dist/services/auth/client/auth-service.js +200 -0
- package/dist/services/auth/client/authorization-management-controller-client.d.ts +48 -0
- package/dist/services/auth/client/authorization-management-controller-client.integration.test.d.ts +1 -0
- package/dist/services/auth/client/authorization-management-controller-client.integration.test.js +89 -0
- package/dist/services/auth/client/authorization-management-controller-client.js +148 -0
- package/dist/services/auth/client/index.d.ts +2 -2
- package/dist/services/auth/client/index.js +2 -2
- package/dist/utils/authorization.d.ts +17 -0
- package/dist/utils/authorization.js +45 -0
- package/dist/utils/events.d.ts +19 -0
- package/dist/utils/events.js +12 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/result.d.ts +21 -0
- package/dist/utils/result.js +16 -0
- package/dist/utils/search.d.ts +34 -0
- package/dist/utils/search.js +106 -0
- package/package.json +6 -6
- package/src/adapters/collection-view-adapter.integration.test.ts +172 -0
- package/src/adapters/collection-view-adapter.ts +458 -0
- package/src/adapters/index.ts +2 -2
- package/src/adapters/search-adapter.ts +374 -0
- package/src/data/api/dto/crud/crud-metadata-dto.ts +4 -0
- package/src/data/api/dto/crud/index.ts +1 -1
- package/src/data/api/dto/index.ts +1 -1
- package/src/data/api/dto/read/index.ts +10 -10
- package/src/data/api/dto/read/{ReadSelectedSearchDefinitionBuilder.ts → read-selected-search-definition-builder.ts} +4 -4
- package/src/data/api/dto/{ReadResultDto.ts → read-result-dto.ts} +1 -1
- package/src/data/api/dto/response/{ApiErrorDto.ts → api-error-dto.ts} +1 -1
- package/src/data/api/dto/response/index.ts +5 -5
- package/src/data/api/enum/read/index.ts +5 -5
- package/src/data/api/enum/response/{ErrorCode.ts → error-code.ts} +1 -0
- package/src/data/api/enum/response/index.ts +1 -1
- package/src/data/api/interface/{ICommonIdentifiable.ts → icommon-identifiable.ts} +1 -1
- package/src/data/api/interface/{IConcurrencySafe.ts → iconcurrency-safe.ts} +1 -1
- package/src/data/api/interface/{IIdentifiable.ts → iidentifiable.ts} +1 -1
- package/src/data/api/interface/index.ts +4 -3
- package/src/data/auth/dto/index.ts +6 -5
- package/src/data/auth/dto/role-with-claims-dto.ts +6 -0
- package/src/data/auth/dto/{UserDto.ts → user-dto.ts} +5 -6
- package/src/services/api/{ApiCrudControllerClient/index.integration.test.ts → api-crud-controller-client.integration.test.ts} +1 -1
- package/src/services/api/{ApiCrudControllerClient/index.ts → api-crud-controller-client.ts} +62 -7
- package/src/services/api/{ApiInitializationService/index.ts → api-initialization-service.ts} +2 -4
- package/src/services/api/{ApiReadControllerClient/index.integration.test.ts → api-read-controller-client.integration.test.ts} +1 -1
- package/src/services/api/{ApiReadControllerClient/index.ts → api-read-controller-client.ts} +55 -6
- package/src/services/api/{HttpService/FetchHttpService.integration.test.ts → http-service/fetch-http-service.integration.test.ts} +1 -1
- package/src/services/api/http-service/http-service.ts +6 -0
- package/src/services/api/http-service/index.ts +5 -0
- package/src/services/api/index.ts +5 -5
- package/src/services/api/{UserManagementControllerClient/index.integration.test.ts → user-management-controller-client.integration.test.ts} +1 -1
- package/src/services/api/user-management-controller-client.ts +322 -0
- package/src/services/auth/client/index.ts +2 -2
- package/src/utils/events.ts +29 -0
- package/src/utils/index.ts +2 -0
- package/demo/index.ts +0 -29
- package/demo/public_html/favicon.ico +0 -0
- package/demo/public_html/index.html +0 -105
- package/demo/public_html/websettings.json +0 -3
- package/src/adapters/CollectionViewAdapter/index.integration.test.ts +0 -197
- package/src/adapters/CollectionViewAdapter/index.ts +0 -477
- package/src/adapters/SearchAdapter/index.ts +0 -302
- package/src/services/api/HttpService/index.ts +0 -12
- package/src/services/api/UserManagementControllerClient/index.ts +0 -134
- /package/{src/data/api/dto/crud/CrudMetadataDto.ts → dist/data/api/dto/crud/crud-metadata-dto.d.ts} +0 -0
- /package/src/data/api/dto/{PropertyPathDto.ts → property-path-dto.ts} +0 -0
- /package/src/data/api/dto/read/{ReadMetadataDto.ts → read-metadata-dto.ts} +0 -0
- /package/src/data/api/dto/read/{ReadSelectedDefinitionDto.ts → read-selected-definition-dto.ts} +0 -0
- /package/src/data/api/dto/read/{ReadSelectedNestedCollectionCriteriaDto.ts → read-selected-nested-collection-criteria-dto.ts} +0 -0
- /package/src/data/api/dto/read/{ReadSelectedNestedCriteriaDto.ts → read-selected-nested-criteria-dto.ts} +0 -0
- /package/src/data/api/dto/read/{ReadSelectedOrderingDefinitionDto.ts → read-selected-ordering-definition-dto.ts} +0 -0
- /package/src/data/api/dto/read/{ReadSelectedOrderingPropertyDefinitionDto.ts → read-selected-ordering-property-definition-dto.ts} +0 -0
- /package/src/data/api/dto/read/{ReadSelectedPaginationDefinitionDto.ts → read-selected-pagination-definition-dto.ts} +0 -0
- /package/src/data/api/dto/read/{ReadSelectedSearchDefinitionDto.ts → read-selected-search-definition-dto.ts} +0 -0
- /package/src/data/api/dto/read/{ReadSelectedSearchPropertyDefinitionDto.ts → read-selected-search-property-definition-dto.ts} +0 -0
- /package/src/data/api/dto/{ReadOptionsDto.ts → read-options-dto.ts} +0 -0
- /package/src/data/api/dto/{ReadResultMetadataDto.ts → read-result-metadata-dto.ts} +0 -0
- /package/src/data/api/dto/response/{ApiErrorResponseDto.ts → api-error-response-dto.ts} +0 -0
- /package/src/data/api/dto/response/{ApiResponseDto.ts → api-response-dto.ts} +0 -0
- /package/src/data/api/dto/response/{ApiSuccessResponseDto.ts → api-success-response-dto.ts} +0 -0
- /package/src/data/api/dto/response/{MetadataDto.ts → metadata-dto.ts} +0 -0
- /package/src/data/api/enum/read/{ReadSelectedCollectionOperator.ts → read-selected-collection-operator.ts} +0 -0
- /package/src/data/api/enum/read/{ReadSelectedComparisonOperator.ts → read-selected-comparison-operator.ts} +0 -0
- /package/src/data/api/enum/read/{ReadSelectedLogicalOperator.ts → read-selected-logical-operator.ts} +0 -0
- /package/src/data/api/enum/read/{ReadSelectedOrderingDirection.ts → read-selected-ordering-direction.ts} +0 -0
- /package/src/data/api/enum/read/{ReadSelectedPropertyType.ts → read-selected-property-type.ts} +0 -0
- /package/src/data/api/interface/{IIdentifiableSecondary.ts → iidentifiable-secondary.ts} +0 -0
- /package/src/data/auth/dto/{ClaimDto.ts → claim-dto.ts} +0 -0
- /package/src/data/auth/dto/{RegisterRequestDto.ts → register-request-dto.ts} +0 -0
- /package/src/data/auth/dto/{RoleDto.ts → role-dto.ts} +0 -0
- /package/src/data/auth/dto/{SignInRequestDto.ts → sign-in-request-dto.ts} +0 -0
- /package/src/data/auth/dto/{TokensDto.ts → tokens-dto.ts} +0 -0
- /package/src/data/auth/dto/{UserInfoDto.ts → user-info-dto.ts} +0 -0
- /package/src/services/api/{HttpService → http-service}/README.md +0 -0
- /package/src/services/api/{HttpService/FetchHttpService.ts → http-service/fetch-http-service.ts} +0 -0
- /package/src/services/api/{HttpService/HttpRequestConfig.ts → http-service/http-request-config.ts} +0 -0
- /package/src/services/api/{HttpService/HttpResponse.ts → http-service/http-response.ts} +0 -0
- /package/src/services/api/{HttpService/IHttpService.ts → http-service/ihttp-service.ts} +0 -0
- /package/src/services/auth/client/{AuthService/index.ts → auth-service.ts} +0 -0
- /package/src/services/auth/client/{AuthorizationManagementControllerClient/index.integration.test.ts → authorization-management-controller-client.integration.test.ts} +0 -0
- /package/src/services/auth/client/{AuthorizationManagementControllerClient/index.ts → authorization-management-controller-client.ts} +0 -0
- /package/src/utils/{authorization/index.ts → authorization.ts} +0 -0
- /package/src/utils/{result/index.ts → result.ts} +0 -0
- /package/src/utils/{search/index.ts → search.ts} +0 -0
package/dist/services/auth/client/authorization-management-controller-client.integration.test.js
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { beforeAll, beforeEach, describe, expect, it } from 'vitest';
|
|
2
|
+
import { AuthorizationManagementControllerClient } from '.';
|
|
3
|
+
import fetchOrig from 'node-fetch';
|
|
4
|
+
import fetchCookie from 'fetch-cookie';
|
|
5
|
+
import { CookieJar } from 'tough-cookie';
|
|
6
|
+
// Create a fetch instance that handles auth cookies
|
|
7
|
+
const jar = new CookieJar();
|
|
8
|
+
const cookieFetch = fetchCookie(fetchOrig, jar);
|
|
9
|
+
// Custom IHttpService implementation for tests
|
|
10
|
+
class CookieFetchHttpService {
|
|
11
|
+
async request(url, config) {
|
|
12
|
+
const response = await cookieFetch(url, {
|
|
13
|
+
method: config?.method || 'GET',
|
|
14
|
+
headers: config?.headers,
|
|
15
|
+
body: config?.body,
|
|
16
|
+
signal: config?.signal,
|
|
17
|
+
});
|
|
18
|
+
const headers = {};
|
|
19
|
+
response.headers.forEach((value, key) => {
|
|
20
|
+
headers[key] = value;
|
|
21
|
+
});
|
|
22
|
+
return {
|
|
23
|
+
ok: response.ok,
|
|
24
|
+
status: response.status,
|
|
25
|
+
statusText: response.statusText,
|
|
26
|
+
headers,
|
|
27
|
+
json: () => response.json(),
|
|
28
|
+
text: () => response.text(),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const credentials = {
|
|
33
|
+
username: 'admin@test.com',
|
|
34
|
+
password: 'Password1234!',
|
|
35
|
+
};
|
|
36
|
+
const baseUrl = 'http://localhost:5000/api';
|
|
37
|
+
describe('AuthorizationManagementControllerClient', () => {
|
|
38
|
+
let client;
|
|
39
|
+
let fetchService = new CookieFetchHttpService();
|
|
40
|
+
beforeAll(async () => {
|
|
41
|
+
await fetchService.request(`${baseUrl}/auth/signin`, {
|
|
42
|
+
method: 'POST',
|
|
43
|
+
headers: { 'Content-Type': 'application/json' },
|
|
44
|
+
body: JSON.stringify(credentials),
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
beforeEach(() => {
|
|
48
|
+
client = new AuthorizationManagementControllerClient('/AuthorizationManagement', fetchService);
|
|
49
|
+
});
|
|
50
|
+
it('should fetch all roles', async () => {
|
|
51
|
+
const result = (await client.getAllRoles(false));
|
|
52
|
+
expect(result.ok).toBe(true);
|
|
53
|
+
expect(result.result).toBeDefined();
|
|
54
|
+
});
|
|
55
|
+
it('should fetch all roles with claims', async () => {
|
|
56
|
+
const result = (await client.getAllRoles(true));
|
|
57
|
+
expect(result.ok).toBe(true);
|
|
58
|
+
expect(result.result).toBeDefined();
|
|
59
|
+
expect(result.result[0].claims).toBeDefined();
|
|
60
|
+
});
|
|
61
|
+
it('should return role with claims by name', async () => {
|
|
62
|
+
const newRole = { name: 'New Role Test Claims', claims: [{ type: 'Test Claim Type', value: 'Test Claim Value' }] };
|
|
63
|
+
const create = (await client.upsertRole(newRole));
|
|
64
|
+
expect(create.ok).toBe(true);
|
|
65
|
+
const result = (await client.getRoleWithClaims(newRole.name));
|
|
66
|
+
expect(result.ok).toBe(true);
|
|
67
|
+
expect(result.result).toBeDefined();
|
|
68
|
+
expect(result.result.claims).toBeDefined();
|
|
69
|
+
expect(result.result.name).toBe(newRole.name);
|
|
70
|
+
expect(result.result.claims.length).toBe(newRole.claims.length);
|
|
71
|
+
expect(result.result.claims).toEqual(newRole.claims);
|
|
72
|
+
});
|
|
73
|
+
it('should create a new role with claims', async () => {
|
|
74
|
+
const newRole = { name: 'New Role', claims: [{ type: 'Test Claim Type', value: 'Test Claim Value' }] };
|
|
75
|
+
const result = (await client.upsertRole(newRole));
|
|
76
|
+
expect(result.ok).toBe(true);
|
|
77
|
+
expect(result.result).toBeDefined();
|
|
78
|
+
expect(result.result.name).toBe(newRole.name);
|
|
79
|
+
expect(result.result.claims.length).toBe(newRole.claims.length);
|
|
80
|
+
expect(result.result.claims).toEqual(newRole.claims);
|
|
81
|
+
});
|
|
82
|
+
it('should delete role', async () => {
|
|
83
|
+
const role = { name: 'Temp Role', claims: [] };
|
|
84
|
+
const create = (await client.upsertRole(role));
|
|
85
|
+
expect(create.ok).toBe(true);
|
|
86
|
+
const deleteResult = await client.deleteRole(role.name);
|
|
87
|
+
expect(deleteResult.ok).toBe(true);
|
|
88
|
+
});
|
|
89
|
+
});
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { apiInitializationService } from '../..';
|
|
2
|
+
import { ErrorCode } from '../../../data';
|
|
3
|
+
import { fail, ok } from '../../../utils/result';
|
|
4
|
+
/**
|
|
5
|
+
* Client for authorization management operations
|
|
6
|
+
*
|
|
7
|
+
* @export
|
|
8
|
+
* @class AuthorizationManagementControllerClient
|
|
9
|
+
*/
|
|
10
|
+
export class AuthorizationManagementControllerClient {
|
|
11
|
+
baseControllerPath;
|
|
12
|
+
/**
|
|
13
|
+
* Constructor
|
|
14
|
+
* @param baseControllerPath Base path to API controller
|
|
15
|
+
* @param httpService HTTP service implementation to use for requests
|
|
16
|
+
*/
|
|
17
|
+
constructor(baseControllerPath = 'AuthorizationManagement', httpService) {
|
|
18
|
+
this.baseControllerPath = baseControllerPath;
|
|
19
|
+
this._httpService = httpService;
|
|
20
|
+
}
|
|
21
|
+
// #region HTTP service
|
|
22
|
+
_httpService = undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Gets globally selected HTTP service
|
|
25
|
+
*/
|
|
26
|
+
get httpService() {
|
|
27
|
+
return this._httpService || apiInitializationService._getHttpService();
|
|
28
|
+
}
|
|
29
|
+
// #endregion
|
|
30
|
+
/**
|
|
31
|
+
* Gets all roles in the system
|
|
32
|
+
* @param includeClaims - Whether to include claims in the response
|
|
33
|
+
* @param signal - Optional cancellation signal
|
|
34
|
+
* @returns List of all roles
|
|
35
|
+
*/
|
|
36
|
+
async getAllRoles(includeClaims, signal) {
|
|
37
|
+
try {
|
|
38
|
+
const url = await apiInitializationService.getApiUrl(this.baseControllerPath, `/GetAllRoles?includeClaims=${includeClaims}`);
|
|
39
|
+
const res = await this.httpService.request(url, {
|
|
40
|
+
credentials: 'include',
|
|
41
|
+
signal,
|
|
42
|
+
});
|
|
43
|
+
if (!res.ok) {
|
|
44
|
+
return fail(await res.json());
|
|
45
|
+
}
|
|
46
|
+
return ok(await res.json());
|
|
47
|
+
}
|
|
48
|
+
catch (err) {
|
|
49
|
+
console.error(err);
|
|
50
|
+
return fail({
|
|
51
|
+
error: {
|
|
52
|
+
code: ErrorCode.UnknownError,
|
|
53
|
+
message: 'Unknown error fetching all roles',
|
|
54
|
+
metadata: {},
|
|
55
|
+
},
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Gets a role with its claims
|
|
61
|
+
* @param roleName - The name of the role
|
|
62
|
+
* @param signal
|
|
63
|
+
* @returns The role with its claims
|
|
64
|
+
*/
|
|
65
|
+
async getRoleWithClaims(roleName, signal) {
|
|
66
|
+
try {
|
|
67
|
+
const url = await apiInitializationService.getApiUrl(this.baseControllerPath, `/GetRoleWithClaims/${encodeURIComponent(roleName)}`);
|
|
68
|
+
const res = await this.httpService.request(url, {
|
|
69
|
+
credentials: 'include',
|
|
70
|
+
signal,
|
|
71
|
+
});
|
|
72
|
+
if (!res.ok) {
|
|
73
|
+
return fail(await res.json());
|
|
74
|
+
}
|
|
75
|
+
return ok(await res.json());
|
|
76
|
+
}
|
|
77
|
+
catch (err) {
|
|
78
|
+
console.error(err);
|
|
79
|
+
return fail({
|
|
80
|
+
error: {
|
|
81
|
+
code: ErrorCode.UnknownError,
|
|
82
|
+
message: 'Unknown error fetching role with claims',
|
|
83
|
+
metadata: {},
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Creates or updates a role
|
|
90
|
+
* @param roleDto - The role to create or update
|
|
91
|
+
* @returns The created or updated role
|
|
92
|
+
*/
|
|
93
|
+
async upsertRole(roleDto) {
|
|
94
|
+
try {
|
|
95
|
+
const url = await apiInitializationService.getApiUrl(this.baseControllerPath, `/UpsertRole`);
|
|
96
|
+
const res = await this.httpService.request(url, {
|
|
97
|
+
method: 'PUT',
|
|
98
|
+
headers: {
|
|
99
|
+
'Content-Type': 'application/json',
|
|
100
|
+
},
|
|
101
|
+
body: JSON.stringify(roleDto),
|
|
102
|
+
credentials: 'include',
|
|
103
|
+
});
|
|
104
|
+
if (!res.ok) {
|
|
105
|
+
return fail(await res.json());
|
|
106
|
+
}
|
|
107
|
+
return ok(await res.json());
|
|
108
|
+
}
|
|
109
|
+
catch (err) {
|
|
110
|
+
console.error(err);
|
|
111
|
+
return fail({
|
|
112
|
+
error: {
|
|
113
|
+
code: ErrorCode.UnknownError,
|
|
114
|
+
message: 'Unknown error upserting role',
|
|
115
|
+
metadata: {},
|
|
116
|
+
},
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Deletes a role
|
|
122
|
+
* @param roleName - The name of the role to delete
|
|
123
|
+
* @returns Promise that resolves when the role is deleted successfully
|
|
124
|
+
*/
|
|
125
|
+
async deleteRole(roleName) {
|
|
126
|
+
try {
|
|
127
|
+
const url = await apiInitializationService.getApiUrl(this.baseControllerPath, `/DeleteRole/${encodeURIComponent(roleName)}`);
|
|
128
|
+
const res = await this.httpService.request(url, {
|
|
129
|
+
method: 'DELETE',
|
|
130
|
+
credentials: 'include',
|
|
131
|
+
});
|
|
132
|
+
if (!res.ok) {
|
|
133
|
+
return fail(await res.json());
|
|
134
|
+
}
|
|
135
|
+
return ok(undefined);
|
|
136
|
+
}
|
|
137
|
+
catch (err) {
|
|
138
|
+
console.error(err);
|
|
139
|
+
return fail({
|
|
140
|
+
error: {
|
|
141
|
+
code: ErrorCode.UnknownError,
|
|
142
|
+
message: `Unknown error while deleting the role ${roleName}`,
|
|
143
|
+
metadata: {},
|
|
144
|
+
},
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './authorization-management-controller-client';
|
|
2
|
+
export * from './auth-service';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
1
|
+
export * from './authorization-management-controller-client';
|
|
2
|
+
export * from './auth-service';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { IPolicy } from '../data';
|
|
2
|
+
/**
|
|
3
|
+
* Checks if a policy is valid for the given parameters.
|
|
4
|
+
*
|
|
5
|
+
* @param policy Policy to check, either an instance or a class.
|
|
6
|
+
* @param params Parameters to pass to the policy check function.
|
|
7
|
+
* @returns A promise that resolves if the policy is valid, rejects otherwise.
|
|
8
|
+
*/
|
|
9
|
+
export declare function check<TParams extends unknown[]>(policy: IPolicy<TParams> | (new () => IPolicy<TParams>), ...params: TParams): Promise<boolean>;
|
|
10
|
+
/**
|
|
11
|
+
* Composes multiple policies into a single policy.
|
|
12
|
+
*
|
|
13
|
+
* @param composition Composition method, either 'AND' or 'OR'.
|
|
14
|
+
* @param policies Policies to compose.
|
|
15
|
+
* @returns A new policy that represents the composition of the policies.
|
|
16
|
+
*/
|
|
17
|
+
export declare function compose<TParams extends unknown[]>(composition: 'AND' | 'OR', ...policies: IPolicy<TParams>[]): IPolicy<TParams>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { PolicyBase } from '../data';
|
|
2
|
+
/**
|
|
3
|
+
* Checks if a policy is valid for the given parameters.
|
|
4
|
+
*
|
|
5
|
+
* @param policy Policy to check, either an instance or a class.
|
|
6
|
+
* @param params Parameters to pass to the policy check function.
|
|
7
|
+
* @returns A promise that resolves if the policy is valid, rejects otherwise.
|
|
8
|
+
*/
|
|
9
|
+
export async function check(policy, ...params) {
|
|
10
|
+
// If passed an instance of a policy
|
|
11
|
+
if (policy instanceof PolicyBase) {
|
|
12
|
+
return policy.check(...params);
|
|
13
|
+
}
|
|
14
|
+
// If passed a policy class
|
|
15
|
+
else {
|
|
16
|
+
return new policy().check(...params);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Composes multiple policies into a single policy.
|
|
21
|
+
*
|
|
22
|
+
* @param composition Composition method, either 'AND' or 'OR'.
|
|
23
|
+
* @param policies Policies to compose.
|
|
24
|
+
* @returns A new policy that represents the composition of the policies.
|
|
25
|
+
*/
|
|
26
|
+
export function compose(composition, ...policies) {
|
|
27
|
+
return {
|
|
28
|
+
check: async (...params) => {
|
|
29
|
+
// Check all policies
|
|
30
|
+
if (composition === 'AND') {
|
|
31
|
+
const results = await Promise.allSettled(policies.map(policy => policy.check(...params)));
|
|
32
|
+
return results.every(result => result);
|
|
33
|
+
}
|
|
34
|
+
// Check any policies, exit as soon as any are true
|
|
35
|
+
else if (composition === 'OR') {
|
|
36
|
+
const results = await Promise.allSettled(policies.map(policy => policy.check(...params)));
|
|
37
|
+
return results.some(result => result);
|
|
38
|
+
}
|
|
39
|
+
// Invalid composition
|
|
40
|
+
else {
|
|
41
|
+
throw new Error('Invalid composition');
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
};
|
|
45
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare class SingularEventTarget<T> {
|
|
2
|
+
private _target;
|
|
3
|
+
addEventListener(callback: EventListenerOrEventListenerObject, options?: AddEventListenerOptions | boolean): void;
|
|
4
|
+
removeEventListener(callback: EventListenerOrEventListenerObject, options?: EventListenerOptions | boolean): void;
|
|
5
|
+
dispatchEvent(value: T): void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Defines a readable property with a companion change event target.
|
|
9
|
+
* Use with intersection types to compose observable interfaces.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* type MyObservable = IHasObservableProperty<'name', string>
|
|
13
|
+
* & IHasObservableProperty<'age', number>;
|
|
14
|
+
*/
|
|
15
|
+
export type IHasObservableProperty<TName extends string, T> = {
|
|
16
|
+
readonly [K in TName]: T;
|
|
17
|
+
} & {
|
|
18
|
+
readonly [K in `${TName}Changed`]: SingularEventTarget<T>;
|
|
19
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export class SingularEventTarget {
|
|
2
|
+
_target = new EventTarget();
|
|
3
|
+
addEventListener(callback, options) {
|
|
4
|
+
this._target.addEventListener('change', callback, options);
|
|
5
|
+
}
|
|
6
|
+
removeEventListener(callback, options) {
|
|
7
|
+
this._target.removeEventListener('change', callback, options);
|
|
8
|
+
}
|
|
9
|
+
dispatchEvent(value) {
|
|
10
|
+
this._target.dispatchEvent(new CustomEvent('change', { detail: value }));
|
|
11
|
+
}
|
|
12
|
+
}
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
type TResultBase = {
|
|
2
|
+
readonly ok: boolean;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* Represents a result of an operation.
|
|
6
|
+
* It can be either a success or an error.
|
|
7
|
+
*/
|
|
8
|
+
export type Result<TSuccess extends TResultBase, TError extends TResultBase> = TSuccess | TError;
|
|
9
|
+
/**
|
|
10
|
+
* Creates a success result from the given argument.
|
|
11
|
+
* @param arg - The argument to create a success result from.
|
|
12
|
+
* @returns A success result.
|
|
13
|
+
*/
|
|
14
|
+
export declare function ok<TSuccess extends TResultBase, TError extends TResultBase>(arg?: Omit<TSuccess, 'ok'>): Result<TSuccess, TError>;
|
|
15
|
+
/**
|
|
16
|
+
* Creates an error result from the given argument.
|
|
17
|
+
* @param arg - The argument to create an error result from.
|
|
18
|
+
* @returns An error result.
|
|
19
|
+
*/
|
|
20
|
+
export declare function fail<TSuccess extends TResultBase, TError extends TResultBase>(arg: Omit<TError, 'ok'>): Result<TSuccess, TError>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a success result from the given argument.
|
|
3
|
+
* @param arg - The argument to create a success result from.
|
|
4
|
+
* @returns A success result.
|
|
5
|
+
*/
|
|
6
|
+
export function ok(arg) {
|
|
7
|
+
return { ok: true, ...arg };
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Creates an error result from the given argument.
|
|
11
|
+
* @param arg - The argument to create an error result from.
|
|
12
|
+
* @returns An error result.
|
|
13
|
+
*/
|
|
14
|
+
export function fail(arg) {
|
|
15
|
+
return { ok: false, ...arg };
|
|
16
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ReadSelectedComparisonOperator, ReadSelectedLogicalOperator, ReadSelectedPropertyType, ReadSelectedSearchDefinitionDto } from '../data';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a ReadSelectedSearchDefinitionDto ready to be used with the CollectionViewAdapter
|
|
4
|
+
*
|
|
5
|
+
* @param logicalOperator - specify `ReadSelectedLogicalOperator` that will apply to all ReadSelectedSearchPropertyDefinitionDto property definitions included in this search definition
|
|
6
|
+
* @param conditions - Variable number of condition objects containing:
|
|
7
|
+
* - propertyName: The property name from the DTO to search on
|
|
8
|
+
* - operator: The `ReadSelectedComparisonOperator` enum
|
|
9
|
+
* - value: The value to compare against
|
|
10
|
+
* - valueType: The `ReadSelectedPropertyType` being compared
|
|
11
|
+
*/
|
|
12
|
+
export declare function condition<T>(logicalOperator: ReadSelectedLogicalOperator, ...conditions: Array<{
|
|
13
|
+
propertyName: keyof T;
|
|
14
|
+
operator: ReadSelectedComparisonOperator;
|
|
15
|
+
value: unknown;
|
|
16
|
+
valueType: ReadSelectedPropertyType;
|
|
17
|
+
}>): ReadSelectedSearchDefinitionDto<T>;
|
|
18
|
+
/**
|
|
19
|
+
* Combines multiple ReadSelectedSearchDefinitionDto with AND logic
|
|
20
|
+
*/
|
|
21
|
+
export declare function and<T>(...definitions: ReadSelectedSearchDefinitionDto<T>[]): ReadSelectedSearchDefinitionDto<T>;
|
|
22
|
+
/**
|
|
23
|
+
* Combines multiple ReadSelectedSearchDefinitionDto with OR logic
|
|
24
|
+
*/
|
|
25
|
+
export declare function or<T>(...definitions: ReadSelectedSearchDefinitionDto<T>[]): ReadSelectedSearchDefinitionDto<T>;
|
|
26
|
+
/**
|
|
27
|
+
* Preset implementation for filtering by searchTerm. String types will search by provided `textSearchableProperties` with `ReadSelectedComparisonOperator.Contains`. Numeric types will search by provided `numericSearchableProperties`, `parseInt` the search term and use `ReadSelectedComparisonOperator.Equal`.
|
|
28
|
+
*/
|
|
29
|
+
export declare function searchTerm<T>(searchTerm: string, textSearchableProperties: (keyof T)[], numericSearchableProperties: (keyof T)[]): void | ReadSelectedSearchDefinitionDto<T>;
|
|
30
|
+
/**
|
|
31
|
+
* Preset implementation for filtering a date range. User may select desired `ReadSelectedComparisonOperator` and `ReadSelectedPropertyType` for the from and to dates. Valid object property must be provided for `searchableProperty`.
|
|
32
|
+
*/
|
|
33
|
+
export declare function dateInterval<T>(fromDate: Date, toDate: Date, fromDateComparisonOperator: ReadSelectedComparisonOperator, toDateComparisonOperator: ReadSelectedComparisonOperator, valueType: ReadSelectedPropertyType, searchableProperty: keyof T): void | ReadSelectedSearchDefinitionDto<T>;
|
|
34
|
+
export declare function toPascalCase<T>(str: keyof T): keyof T;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { ReadSelectedComparisonOperator, ReadSelectedLogicalOperator, ReadSelectedPropertyType, } from '../data';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a ReadSelectedSearchDefinitionDto ready to be used with the CollectionViewAdapter
|
|
4
|
+
*
|
|
5
|
+
* @param logicalOperator - specify `ReadSelectedLogicalOperator` that will apply to all ReadSelectedSearchPropertyDefinitionDto property definitions included in this search definition
|
|
6
|
+
* @param conditions - Variable number of condition objects containing:
|
|
7
|
+
* - propertyName: The property name from the DTO to search on
|
|
8
|
+
* - operator: The `ReadSelectedComparisonOperator` enum
|
|
9
|
+
* - value: The value to compare against
|
|
10
|
+
* - valueType: The `ReadSelectedPropertyType` being compared
|
|
11
|
+
*/
|
|
12
|
+
export function condition(logicalOperator, ...conditions) {
|
|
13
|
+
return {
|
|
14
|
+
logicalOperator: logicalOperator,
|
|
15
|
+
propertyCriteria: conditions.map(condition => ({
|
|
16
|
+
propertyName: toPascalCase(condition.propertyName),
|
|
17
|
+
comparisonOperator: condition.operator,
|
|
18
|
+
valueType: condition.valueType,
|
|
19
|
+
value: condition.value,
|
|
20
|
+
})),
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Combines multiple ReadSelectedSearchDefinitionDto with AND logic
|
|
25
|
+
*/
|
|
26
|
+
export function and(...definitions) {
|
|
27
|
+
return {
|
|
28
|
+
logicalOperator: ReadSelectedLogicalOperator.And,
|
|
29
|
+
searches: definitions,
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Combines multiple ReadSelectedSearchDefinitionDto with OR logic
|
|
34
|
+
*/
|
|
35
|
+
export function or(...definitions) {
|
|
36
|
+
return {
|
|
37
|
+
logicalOperator: ReadSelectedLogicalOperator.Or,
|
|
38
|
+
searches: definitions,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Preset implementation for filtering by searchTerm. String types will search by provided `textSearchableProperties` with `ReadSelectedComparisonOperator.Contains`. Numeric types will search by provided `numericSearchableProperties`, `parseInt` the search term and use `ReadSelectedComparisonOperator.Equal`.
|
|
43
|
+
*/
|
|
44
|
+
export function searchTerm(searchTerm, textSearchableProperties, numericSearchableProperties) {
|
|
45
|
+
let comparisonOperator;
|
|
46
|
+
let valueType;
|
|
47
|
+
let searchableProperties;
|
|
48
|
+
let searchValue;
|
|
49
|
+
try {
|
|
50
|
+
const numericValue = parseInt(searchTerm);
|
|
51
|
+
if (!Number.isNaN(numericValue) && String(numericValue) === searchTerm.trim()) {
|
|
52
|
+
comparisonOperator = ReadSelectedComparisonOperator.Equal;
|
|
53
|
+
valueType = ReadSelectedPropertyType.Int;
|
|
54
|
+
searchableProperties = numericSearchableProperties;
|
|
55
|
+
searchValue = numericValue;
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
comparisonOperator = ReadSelectedComparisonOperator.Contains;
|
|
59
|
+
valueType = ReadSelectedPropertyType.String;
|
|
60
|
+
searchableProperties = textSearchableProperties;
|
|
61
|
+
searchValue = searchTerm;
|
|
62
|
+
}
|
|
63
|
+
const searchConditions = searchableProperties.map(propertyName => ({
|
|
64
|
+
propertyName: toPascalCase(propertyName),
|
|
65
|
+
operator: comparisonOperator,
|
|
66
|
+
value: searchValue,
|
|
67
|
+
valueType: valueType,
|
|
68
|
+
}));
|
|
69
|
+
return condition(ReadSelectedLogicalOperator.Or, ...searchConditions);
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Preset implementation for filtering a date range. User may select desired `ReadSelectedComparisonOperator` and `ReadSelectedPropertyType` for the from and to dates. Valid object property must be provided for `searchableProperty`.
|
|
77
|
+
*/
|
|
78
|
+
export function dateInterval(fromDate, toDate, fromDateComparisonOperator, toDateComparisonOperator, valueType, searchableProperty) {
|
|
79
|
+
try {
|
|
80
|
+
if (!(valueType === ReadSelectedPropertyType.DateOnly ||
|
|
81
|
+
valueType === ReadSelectedPropertyType.DateTime ||
|
|
82
|
+
valueType === ReadSelectedPropertyType.DateTimeOffset)) {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
return condition(ReadSelectedLogicalOperator.And, {
|
|
86
|
+
propertyName: toPascalCase(searchableProperty),
|
|
87
|
+
operator: fromDateComparisonOperator,
|
|
88
|
+
value: fromDate,
|
|
89
|
+
valueType: valueType,
|
|
90
|
+
}, {
|
|
91
|
+
propertyName: toPascalCase(searchableProperty),
|
|
92
|
+
operator: toDateComparisonOperator,
|
|
93
|
+
value: toDate,
|
|
94
|
+
valueType: valueType,
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
catch {
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
export function toPascalCase(str) {
|
|
102
|
+
if (typeof str !== 'string') {
|
|
103
|
+
return str;
|
|
104
|
+
}
|
|
105
|
+
return (str.charAt(0).toUpperCase() + str.slice(1));
|
|
106
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intellegens/cornerstone-client",
|
|
3
|
-
"version": "0.0.9999-alpha-
|
|
3
|
+
"version": "0.0.9999-alpha-43",
|
|
4
4
|
"private": false,
|
|
5
5
|
"publishable": true,
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -16,18 +16,18 @@
|
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@eslint/js": "^10.0.1",
|
|
18
18
|
"@types/express": "^5.0.6",
|
|
19
|
-
"@types/node": "^25.
|
|
20
|
-
"eslint": "^10.0.
|
|
19
|
+
"@types/node": "^25.4.0",
|
|
20
|
+
"eslint": "^10.0.3",
|
|
21
21
|
"eslint-config-prettier": "^10.1.8",
|
|
22
22
|
"express": "^5.2.1",
|
|
23
|
-
"globals": "^17.
|
|
23
|
+
"globals": "^17.4.0",
|
|
24
24
|
"prettier": "^3.8.1",
|
|
25
25
|
"rxjs": "~7.8.2",
|
|
26
26
|
"tsc-alias": "^1.8.16",
|
|
27
|
-
"typescript-eslint": "^8.
|
|
27
|
+
"typescript-eslint": "^8.57.0",
|
|
28
28
|
"vite": "7.3.1",
|
|
29
29
|
"vitest": "^4.0.18",
|
|
30
|
-
"@vitest/coverage-v8": "^
|
|
30
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
31
31
|
"zod": "^3.25.76"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|