@intellegens/cornerstone-client 0.0.21 → 0.0.23
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/data/api/dto/ReadSelectedDefinition.d.ts +3 -3
- package/data/api/dto/ReadSelectedDefinition.js +3 -3
- package/data/api/dto/ReadSelectedFilteringDefinition.d.ts +2 -2
- package/data/api/dto/ReadSelectedFilteringDefinition.js +2 -2
- package/data/api/dto/ReadSelectedFilteringPropertyDefinition.d.ts +4 -4
- package/data/api/dto/ReadSelectedFilteringPropertyDefinition.js +4 -4
- package/data/api/dto/ReadSelectedOrderingDefinition.d.ts +1 -1
- package/data/api/dto/ReadSelectedOrderingDefinition.js +1 -1
- package/data/api/dto/ReadSelectedOrderingPropertyDefinition.d.ts +2 -2
- package/data/api/dto/ReadSelectedOrderingPropertyDefinition.js +2 -2
- package/data/auth/User/index.d.ts +5 -5
- package/data/auth/UserInfo/index.d.ts +3 -3
- package/package.json +1 -1
- package/services/api/ApiCrudControllerClient/index.d.ts +2 -1
- package/services/api/ApiReadControllerClient/index.d.ts +1 -1
- package/services/api/UserManagementControllerClient/index.d.ts +3 -2
- package/services/api/UserManagementControllerClient/index.js +2 -2
- package/services/auth/client/AuthService/index.d.ts +1 -1
|
@@ -6,13 +6,13 @@ export declare class ReadSelectedDefinition {
|
|
|
6
6
|
/**
|
|
7
7
|
* Pagination definition
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
paginationDefinition?: ReadSelectedPaginationDefinition;
|
|
10
10
|
/**
|
|
11
11
|
* Ordering definition
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
orderingDefinition?: ReadSelectedOrderingDefinition;
|
|
14
14
|
/**
|
|
15
15
|
* Filtering definition
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
filteringDefinition?: ReadSelectedFilteringDefinition;
|
|
18
18
|
}
|
|
@@ -5,13 +5,13 @@ export class ReadSelectedDefinition {
|
|
|
5
5
|
/**
|
|
6
6
|
* Pagination definition
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
paginationDefinition;
|
|
9
9
|
/**
|
|
10
10
|
* Ordering definition
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
orderingDefinition;
|
|
13
13
|
/**
|
|
14
14
|
* Filtering definition
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
filteringDefinition;
|
|
17
17
|
}
|
|
@@ -6,9 +6,9 @@ export declare class ReadSelectedFilteringDefinition {
|
|
|
6
6
|
/**
|
|
7
7
|
* Array of filtering property definitions to be applied.
|
|
8
8
|
*/
|
|
9
|
-
Filters
|
|
9
|
+
Filters: ReadSelectedFilteringPropertyDefinition[];
|
|
10
10
|
/**
|
|
11
11
|
* Logical operator to be used when applying the filters.
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
logicalOperator: ReadSelectedLogicalOperator;
|
|
14
14
|
}
|
|
@@ -5,9 +5,9 @@ export class ReadSelectedFilteringDefinition {
|
|
|
5
5
|
/**
|
|
6
6
|
* Array of filtering property definitions to be applied.
|
|
7
7
|
*/
|
|
8
|
-
Filters;
|
|
8
|
+
Filters = [];
|
|
9
9
|
/**
|
|
10
10
|
* Logical operator to be used when applying the filters.
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
logicalOperator;
|
|
13
13
|
}
|
|
@@ -6,17 +6,17 @@ export declare class ReadSelectedFilteringPropertyDefinition {
|
|
|
6
6
|
/**
|
|
7
7
|
* The path to the property being filtered.
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
propertyPath: string;
|
|
10
10
|
/**
|
|
11
11
|
* The comparison operator to use for the filter.
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
comparisonOperator: ReadSelectedComparisonOperator;
|
|
14
14
|
/**
|
|
15
15
|
* The type of the property value being filtered.
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
valueType: ReadSelectedPropertyType;
|
|
18
18
|
/**
|
|
19
19
|
* The value to use for the filter.
|
|
20
20
|
*/
|
|
21
|
-
|
|
21
|
+
value: unknown;
|
|
22
22
|
}
|
|
@@ -5,17 +5,17 @@ export class ReadSelectedFilteringPropertyDefinition {
|
|
|
5
5
|
/**
|
|
6
6
|
* The path to the property being filtered.
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
propertyPath;
|
|
9
9
|
/**
|
|
10
10
|
* The comparison operator to use for the filter.
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
comparisonOperator;
|
|
13
13
|
/**
|
|
14
14
|
* The type of the property value being filtered.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
valueType;
|
|
17
17
|
/**
|
|
18
18
|
* The value to use for the filter.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
value = undefined;
|
|
21
21
|
}
|
|
@@ -3,5 +3,5 @@ import { ReadSelectedOrderingPropertyDefinition } from '../..';
|
|
|
3
3
|
* Represents the ordering definition for a controller.
|
|
4
4
|
*/
|
|
5
5
|
export declare class ReadSelectedOrderingDefinition {
|
|
6
|
-
|
|
6
|
+
order: ReadSelectedOrderingPropertyDefinition[];
|
|
7
7
|
}
|
|
@@ -6,9 +6,9 @@ export declare class ReadSelectedOrderingPropertyDefinition {
|
|
|
6
6
|
/**
|
|
7
7
|
* Gets or sets the property path.
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
propertyPath: string;
|
|
10
10
|
/**
|
|
11
11
|
* Gets or sets the sort direction.
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
direction: ReadSelectedOrderingDirection;
|
|
14
14
|
}
|
|
@@ -6,9 +6,9 @@ export class ReadSelectedOrderingPropertyDefinition {
|
|
|
6
6
|
/**
|
|
7
7
|
* Gets or sets the property path.
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
propertyPath;
|
|
10
10
|
/**
|
|
11
11
|
* Gets or sets the sort direction.
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
direction = ReadSelectedOrderingDirection.Ascending;
|
|
14
14
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Claim } from
|
|
1
|
+
import { Claim } from '../../../data';
|
|
2
|
+
import { IIdentifiable } from '../..';
|
|
2
3
|
/**
|
|
3
4
|
* Represents a user with an identifier and email address.
|
|
4
5
|
*
|
|
5
|
-
* @template
|
|
6
|
+
* @template TKey The type of the user identifier.
|
|
6
7
|
*
|
|
7
|
-
* @param {
|
|
8
|
+
* @param {TKey} id The unique identifier for the user.
|
|
8
9
|
* @param {string} email The email address associated with the user.
|
|
9
10
|
* @param {Claim[]} claims The claims associated with the user.
|
|
10
11
|
*/
|
|
11
|
-
export type User<
|
|
12
|
-
id: TId | undefined;
|
|
12
|
+
export type User<TKey> = IIdentifiable<TKey> & {
|
|
13
13
|
email: string;
|
|
14
14
|
claims: Claim[];
|
|
15
15
|
};
|
|
@@ -2,13 +2,13 @@ import { User } from '../..';
|
|
|
2
2
|
/**
|
|
3
3
|
* Represents user information along with access token expiry.
|
|
4
4
|
*
|
|
5
|
-
* @template
|
|
6
|
-
* @template TUser The type of the user object, defaulting to `User<
|
|
5
|
+
* @template TKey The type of the user identifier.
|
|
6
|
+
* @template TUser The type of the user object, defaulting to `User<TKey>`.
|
|
7
7
|
*
|
|
8
8
|
* @param {TUser} user The user object containing user details.
|
|
9
9
|
* @param {Date} accessTokenExpiry The date and time when the access token will expire.
|
|
10
10
|
*/
|
|
11
|
-
export type UserInfo<
|
|
11
|
+
export type UserInfo<TKey, TUser = User<TKey>> = {
|
|
12
12
|
user: TUser;
|
|
13
13
|
accessTokenExpiry: Date;
|
|
14
14
|
};
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ApiReadControllerClient } from '../..';
|
|
2
|
+
import { IIdentifiable } from '../../../data';
|
|
2
3
|
/**
|
|
3
4
|
* Generic API client for consuming any Cornerstone CrudController
|
|
4
5
|
*
|
|
@@ -7,7 +8,7 @@ import { ApiReadControllerClient } from '../..';
|
|
|
7
8
|
* @template TKey - Type of the entity key (e.g., number, string, GUID, etc.)
|
|
8
9
|
* @template TDto - Data Transfer Object representing the entity
|
|
9
10
|
*/
|
|
10
|
-
export declare class ApiCrudControllerClient<TKey, TDto
|
|
11
|
+
export declare class ApiCrudControllerClient<TKey, TDto extends IIdentifiable<TKey>> extends ApiReadControllerClient<TKey, TDto> {
|
|
11
12
|
/**
|
|
12
13
|
* Creates a new entity.
|
|
13
14
|
* @param dto - Insert request DTO
|
|
@@ -7,7 +7,7 @@ import { IIdentifiable, ReadSelectedDefinition } from '../../../data';
|
|
|
7
7
|
* @template TKey - Type of the entity key (e.g., number, string, GUID, etc.)
|
|
8
8
|
* @template TDto - Data Transfer Object representing the entity
|
|
9
9
|
*/
|
|
10
|
-
export declare class ApiReadControllerClient<TKey, TDto
|
|
10
|
+
export declare class ApiReadControllerClient<TKey, TDto extends IIdentifiable<TKey>> {
|
|
11
11
|
protected readonly baseControllerPath: string;
|
|
12
12
|
/**
|
|
13
13
|
* Constructor
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { ApiCrudControllerClient } from '../..';
|
|
2
|
+
import { User } from '../../../data';
|
|
2
3
|
/**
|
|
3
4
|
* Client for user management operations
|
|
4
5
|
*
|
|
5
6
|
* @export
|
|
6
7
|
* @class UserManagementControllerClient
|
|
7
8
|
* @template TKey - Type of the entity key (e.g., number, string, GUID, etc.)
|
|
8
|
-
* @template
|
|
9
|
+
* @template TUser - Data Transfer Object representing the user entity
|
|
9
10
|
*/
|
|
10
|
-
export declare class UserManagementControllerClient<TKey,
|
|
11
|
+
export declare class UserManagementControllerClient<TKey, TUser extends User<TKey>> extends ApiCrudControllerClient<TKey, TUser> {
|
|
11
12
|
/**
|
|
12
13
|
* Gets the roles assigned to a user
|
|
13
14
|
* @param id - The ID of the user
|
|
@@ -5,7 +5,7 @@ import { ApiCrudControllerClient, apiInitializationService } from '../..';
|
|
|
5
5
|
* @export
|
|
6
6
|
* @class UserManagementControllerClient
|
|
7
7
|
* @template TKey - Type of the entity key (e.g., number, string, GUID, etc.)
|
|
8
|
-
* @template
|
|
8
|
+
* @template TUser - Data Transfer Object representing the user entity
|
|
9
9
|
*/
|
|
10
10
|
export class UserManagementControllerClient extends ApiCrudControllerClient {
|
|
11
11
|
/**
|
|
@@ -76,7 +76,7 @@ export class UserManagementControllerClient extends ApiCrudControllerClient {
|
|
|
76
76
|
const response = await fetch(url, {
|
|
77
77
|
method: 'POST',
|
|
78
78
|
headers: {
|
|
79
|
-
'Content-Type': 'application/json'
|
|
79
|
+
'Content-Type': 'application/json',
|
|
80
80
|
},
|
|
81
81
|
body: JSON.stringify(newPassword),
|
|
82
82
|
credentials: 'include',
|
|
@@ -7,7 +7,7 @@ export { User, UserInfo };
|
|
|
7
7
|
* @export
|
|
8
8
|
* @class AuthService
|
|
9
9
|
*/
|
|
10
|
-
export declare class AuthService<
|
|
10
|
+
export declare class AuthService<TKey, TUser extends User<TKey> = User<TKey>> {
|
|
11
11
|
/**
|
|
12
12
|
* Holds currently authenticated user's details
|
|
13
13
|
*/
|