@intellegens/cornerstone-client 0.0.31 → 0.0.33
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/ReadSelectedDefinitionDto.d.ts +3 -3
- package/data/api/dto/ReadSelectedSearchDefinitionDto.d.ts +15 -0
- package/data/api/dto/{ReadSelectedFilteringPropertyDefinitionDto.d.ts → ReadSelectedSearchPropertyDefinitionDto.d.ts} +25 -25
- package/data/api/dto/index.d.ts +2 -2
- package/data/api/dto/index.js +2 -2
- package/data/api/enum/ReadSelectedComparisonOperator.d.ts +8 -0
- package/data/api/enum/ReadSelectedComparisonOperator.js +8 -3
- package/package.json +1 -1
- package/services/api/ApiReadControllerClient/index.d.ts +2 -2
- package/services/api/ApiReadControllerClient/index.js +2 -2
- package/data/api/dto/ReadSelectedFilteringDefinitionDto.d.ts +0 -14
- /package/data/api/dto/{ReadSelectedFilteringDefinitionDto.js → ReadSelectedSearchDefinitionDto.js} +0 -0
- /package/data/api/dto/{ReadSelectedFilteringPropertyDefinitionDto.js → ReadSelectedSearchPropertyDefinitionDto.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReadSelectedPaginationDefinitionDto, ReadSelectedOrderingDefinitionDto,
|
|
1
|
+
import { ReadSelectedPaginationDefinitionDto, ReadSelectedOrderingDefinitionDto, ReadSelectedSearchDefinitionDto } from '../..';
|
|
2
2
|
/**
|
|
3
3
|
* Defines the selection criteria for a controller to fetch multiple records
|
|
4
4
|
*/
|
|
@@ -12,7 +12,7 @@ export type ReadSelectedDefinitionDto = {
|
|
|
12
12
|
*/
|
|
13
13
|
orderingDefinition?: ReadSelectedOrderingDefinitionDto;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Search definition (supports both simple search and nested logical groups)
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
searchDefinition?: ReadSelectedSearchDefinitionDto;
|
|
18
18
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReadSelectedSearchPropertyDefinitionDto, ReadSelectedLogicalOperator } from '../..';
|
|
2
|
+
/**
|
|
3
|
+
* Defines the search options for a controller, including the logical operator and an array of property definitions.
|
|
4
|
+
* Supports both simple property search and nested logical groups.
|
|
5
|
+
*/
|
|
6
|
+
export type ReadSelectedSearchDefinitionDto = {
|
|
7
|
+
/**
|
|
8
|
+
* Logical operator to be used when applying the searches.
|
|
9
|
+
*/
|
|
10
|
+
logicalOperator: ReadSelectedLogicalOperator;
|
|
11
|
+
/**
|
|
12
|
+
* Array of search criteria that can be either simple property searches or full nested search definitions
|
|
13
|
+
*/
|
|
14
|
+
criteria: (ReadSelectedSearchPropertyDefinitionDto | ReadSelectedSearchDefinitionDto)[];
|
|
15
|
+
};
|
|
@@ -1,106 +1,106 @@
|
|
|
1
1
|
import { ReadSelectedComparisonOperator, ReadSelectedPropertyType } from '../..';
|
|
2
2
|
/**
|
|
3
|
-
* Defines a property used for
|
|
3
|
+
* Defines a property used for searching in a controller.
|
|
4
4
|
*/
|
|
5
|
-
export type
|
|
5
|
+
export type ReadSelectedSearchPropertyDefinitionDto = Partial_ReadSelectedSearchPropertyDefinition_IndependentProperties & Partial_ReadSelectedSearchPropertyDefinition_TypedValueProperty & Partial_ReadSelectedSearchPropertyDefinition_TypedComparisonOperators;
|
|
6
6
|
/**
|
|
7
7
|
* Defines independent properties
|
|
8
8
|
*/
|
|
9
|
-
type
|
|
9
|
+
type Partial_ReadSelectedSearchPropertyDefinition_IndependentProperties = {
|
|
10
10
|
/**
|
|
11
|
-
* The path to the property being
|
|
11
|
+
* The path to the property being searched.
|
|
12
12
|
*/
|
|
13
13
|
propertyPath: string;
|
|
14
14
|
/**
|
|
15
|
-
* The comparison operator to use for the
|
|
15
|
+
* The comparison operator to use for the search.
|
|
16
16
|
*/
|
|
17
17
|
comparisonOperator: ReadSelectedComparisonOperator;
|
|
18
18
|
/**
|
|
19
|
-
* The type of the property value being
|
|
19
|
+
* The type of the property value being searched.
|
|
20
20
|
*/
|
|
21
21
|
valueType: ReadSelectedPropertyType;
|
|
22
22
|
/**
|
|
23
|
-
* The value to use for the
|
|
23
|
+
* The value to use for the search.
|
|
24
24
|
*/
|
|
25
25
|
value: unknown;
|
|
26
26
|
};
|
|
27
27
|
/**
|
|
28
28
|
* Defines the dependence between the .valueType and the type of the .value properties
|
|
29
29
|
*/
|
|
30
|
-
type
|
|
30
|
+
type Partial_ReadSelectedSearchPropertyDefinition_TypedValueProperty = {
|
|
31
31
|
/**
|
|
32
|
-
* The type of the property value being
|
|
32
|
+
* The type of the property value being searched.
|
|
33
33
|
*/
|
|
34
34
|
valueType: ReadSelectedPropertyType.Bool;
|
|
35
35
|
/**
|
|
36
|
-
* The value to use for the
|
|
36
|
+
* The value to use for the search.
|
|
37
37
|
*/
|
|
38
38
|
value: boolean;
|
|
39
39
|
} | {
|
|
40
40
|
/**
|
|
41
|
-
* The type of the property value being
|
|
41
|
+
* The type of the property value being searched.
|
|
42
42
|
*/
|
|
43
43
|
valueType: ReadSelectedPropertyType.Int | ReadSelectedPropertyType.Short | ReadSelectedPropertyType.Long | ReadSelectedPropertyType.Decimal | ReadSelectedPropertyType.Double | ReadSelectedPropertyType.Float;
|
|
44
44
|
/**
|
|
45
|
-
* The value to use for the
|
|
45
|
+
* The value to use for the search.
|
|
46
46
|
*/
|
|
47
47
|
value: number;
|
|
48
48
|
} | {
|
|
49
49
|
/**
|
|
50
|
-
* The type of the property value being
|
|
50
|
+
* The type of the property value being searched.
|
|
51
51
|
*/
|
|
52
52
|
valueType: ReadSelectedPropertyType.String;
|
|
53
53
|
/**
|
|
54
|
-
* The value to use for the
|
|
54
|
+
* The value to use for the search.
|
|
55
55
|
*/
|
|
56
56
|
value: string;
|
|
57
57
|
} | {
|
|
58
58
|
/**
|
|
59
|
-
* The type of the property value being
|
|
59
|
+
* The type of the property value being searched.
|
|
60
60
|
*/
|
|
61
61
|
valueType: ReadSelectedPropertyType.DateTime | ReadSelectedPropertyType.DateTimeOffset | ReadSelectedPropertyType.TimeSpan | ReadSelectedPropertyType.DateOnly | ReadSelectedPropertyType.TimeOnly;
|
|
62
62
|
/**
|
|
63
|
-
* The value to use for the
|
|
63
|
+
* The value to use for the search.
|
|
64
64
|
*/
|
|
65
65
|
value: string;
|
|
66
66
|
};
|
|
67
67
|
/**
|
|
68
68
|
* Defines the dependence between the .valueType and the type of the .comparisonOperator properties
|
|
69
69
|
*/
|
|
70
|
-
type
|
|
70
|
+
type Partial_ReadSelectedSearchPropertyDefinition_TypedComparisonOperators = {
|
|
71
71
|
/**
|
|
72
|
-
* The type of the property value being
|
|
72
|
+
* The type of the property value being searched.
|
|
73
73
|
*/
|
|
74
74
|
valueType: ReadSelectedPropertyType.Bool;
|
|
75
75
|
/**
|
|
76
|
-
* The comparison operator to use for the
|
|
76
|
+
* The comparison operator to use for the search.
|
|
77
77
|
*/
|
|
78
78
|
comparisonOperator: ReadSelectedComparisonOperator.Equal | ReadSelectedComparisonOperator.NotEqual;
|
|
79
79
|
} | {
|
|
80
80
|
/**
|
|
81
|
-
* The type of the property value being
|
|
81
|
+
* The type of the property value being searched.
|
|
82
82
|
*/
|
|
83
83
|
valueType: ReadSelectedPropertyType.Int | ReadSelectedPropertyType.Short | ReadSelectedPropertyType.Long | ReadSelectedPropertyType.Decimal | ReadSelectedPropertyType.Double | ReadSelectedPropertyType.Float;
|
|
84
84
|
/**
|
|
85
|
-
* The comparison operator to use for the
|
|
85
|
+
* The comparison operator to use for the search.
|
|
86
86
|
*/
|
|
87
87
|
comparisonOperator: ReadSelectedComparisonOperator.Equal | ReadSelectedComparisonOperator.NotEqual | ReadSelectedComparisonOperator.LessThan | ReadSelectedComparisonOperator.LessOrEqual | ReadSelectedComparisonOperator.GreaterThan | ReadSelectedComparisonOperator.GreaterOrEqual;
|
|
88
88
|
} | {
|
|
89
89
|
/**
|
|
90
|
-
* The type of the property value being
|
|
90
|
+
* The type of the property value being searched.
|
|
91
91
|
*/
|
|
92
92
|
valueType: ReadSelectedPropertyType.String;
|
|
93
93
|
/**
|
|
94
|
-
* The comparison operator to use for the
|
|
94
|
+
* The comparison operator to use for the search.
|
|
95
95
|
*/
|
|
96
96
|
comparisonOperator: ReadSelectedComparisonOperator.Equal | ReadSelectedComparisonOperator.NotEqual | ReadSelectedComparisonOperator.Contains | ReadSelectedComparisonOperator.StartsWith | ReadSelectedComparisonOperator.EndsWith;
|
|
97
97
|
} | {
|
|
98
98
|
/**
|
|
99
|
-
* The type of the property value being
|
|
99
|
+
* The type of the property value being searched.
|
|
100
100
|
*/
|
|
101
101
|
valueType: ReadSelectedPropertyType.DateTime | ReadSelectedPropertyType.DateTimeOffset | ReadSelectedPropertyType.TimeSpan | ReadSelectedPropertyType.DateOnly | ReadSelectedPropertyType.TimeOnly;
|
|
102
102
|
/**
|
|
103
|
-
* The comparison operator to use for the
|
|
103
|
+
* The comparison operator to use for the search.
|
|
104
104
|
*/
|
|
105
105
|
comparisonOperator: ReadSelectedComparisonOperator.Equal | ReadSelectedComparisonOperator.NotEqual | ReadSelectedComparisonOperator.LessThan | ReadSelectedComparisonOperator.LessOrEqual | ReadSelectedComparisonOperator.GreaterThan | ReadSelectedComparisonOperator.GreaterOrEqual;
|
|
106
106
|
};
|
package/data/api/dto/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './ReadSelectedDefinitionDto';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
2
|
+
export * from './ReadSelectedSearchDefinitionDto';
|
|
3
|
+
export * from './ReadSelectedSearchPropertyDefinitionDto';
|
|
4
4
|
export * from './ReadSelectedOrderingDefinitionDto';
|
|
5
5
|
export * from './ReadSelectedOrderingPropertyDefinitionDto';
|
|
6
6
|
export * from './ReadSelectedPaginationDefinitionDto';
|
package/data/api/dto/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './ReadSelectedDefinitionDto';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
2
|
+
export * from './ReadSelectedSearchDefinitionDto';
|
|
3
|
+
export * from './ReadSelectedSearchPropertyDefinitionDto';
|
|
4
4
|
export * from './ReadSelectedOrderingDefinitionDto';
|
|
5
5
|
export * from './ReadSelectedOrderingPropertyDefinitionDto';
|
|
6
6
|
export * from './ReadSelectedPaginationDefinitionDto';
|
|
@@ -10,6 +10,14 @@ export declare enum ReadSelectedComparisonOperator {
|
|
|
10
10
|
* Represents the not equal comparison operator.
|
|
11
11
|
*/
|
|
12
12
|
NotEqual = 1,
|
|
13
|
+
/**
|
|
14
|
+
* Represents the is null comparison operator.
|
|
15
|
+
*/
|
|
16
|
+
IsNull = 2,
|
|
17
|
+
/**
|
|
18
|
+
* Represents the is not null comparison operator.
|
|
19
|
+
*/
|
|
20
|
+
IsNotNull = 3,
|
|
13
21
|
/**
|
|
14
22
|
* Represents the less than comparison operator.
|
|
15
23
|
*/
|
|
@@ -12,6 +12,14 @@ export var ReadSelectedComparisonOperator;
|
|
|
12
12
|
* Represents the not equal comparison operator.
|
|
13
13
|
*/
|
|
14
14
|
ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["NotEqual"] = 1] = "NotEqual";
|
|
15
|
+
/**
|
|
16
|
+
* Represents the is null comparison operator.
|
|
17
|
+
*/
|
|
18
|
+
ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["IsNull"] = 2] = "IsNull";
|
|
19
|
+
/**
|
|
20
|
+
* Represents the is not null comparison operator.
|
|
21
|
+
*/
|
|
22
|
+
ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["IsNotNull"] = 3] = "IsNotNull";
|
|
15
23
|
//#endregion
|
|
16
24
|
//#region Number
|
|
17
25
|
/**
|
|
@@ -45,7 +53,4 @@ export var ReadSelectedComparisonOperator;
|
|
|
45
53
|
*/
|
|
46
54
|
ReadSelectedComparisonOperator[ReadSelectedComparisonOperator["EndsWith"] = 202] = "EndsWith";
|
|
47
55
|
//#endregion
|
|
48
|
-
//#region Time
|
|
49
|
-
// ...
|
|
50
|
-
//#endregion
|
|
51
56
|
})(ReadSelectedComparisonOperator || (ReadSelectedComparisonOperator = {}));
|
package/package.json
CHANGED
|
@@ -30,8 +30,8 @@ export declare class ApiReadControllerClient<TKey, TDto extends IIdentifiable<TK
|
|
|
30
30
|
*/
|
|
31
31
|
protected get httpService(): IHttpService;
|
|
32
32
|
/**
|
|
33
|
-
* Fetches selected entities based on a
|
|
34
|
-
* @param {any} definition - The
|
|
33
|
+
* Fetches selected entities based on a search definition.
|
|
34
|
+
* @param {any} definition - The search definition object
|
|
35
35
|
* @param options - Optional read options
|
|
36
36
|
* @returns {Promise<ReadResult<TDto>>} The result of the read operation with metadata
|
|
37
37
|
*/
|
|
@@ -44,8 +44,8 @@ export class ApiReadControllerClient {
|
|
|
44
44
|
// #endregion
|
|
45
45
|
// #region API
|
|
46
46
|
/**
|
|
47
|
-
* Fetches selected entities based on a
|
|
48
|
-
* @param {any} definition - The
|
|
47
|
+
* Fetches selected entities based on a search definition.
|
|
48
|
+
* @param {any} definition - The search definition object
|
|
49
49
|
* @param options - Optional read options
|
|
50
50
|
* @returns {Promise<ReadResult<TDto>>} The result of the read operation with metadata
|
|
51
51
|
*/
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ReadSelectedFilteringPropertyDefinitionDto, ReadSelectedLogicalOperator } from '../..';
|
|
2
|
-
/**
|
|
3
|
-
* Defines the filtering options for a controller, including the logical operator and an array of property definitions.
|
|
4
|
-
*/
|
|
5
|
-
export type ReadSelectedFilteringDefinitionDto = {
|
|
6
|
-
/**
|
|
7
|
-
* Array of filtering property definitions to be applied.
|
|
8
|
-
*/
|
|
9
|
-
filters: ReadSelectedFilteringPropertyDefinitionDto[];
|
|
10
|
-
/**
|
|
11
|
-
* Logical operator to be used when applying the filters.
|
|
12
|
-
*/
|
|
13
|
-
logicalOperator: ReadSelectedLogicalOperator;
|
|
14
|
-
};
|
/package/data/api/dto/{ReadSelectedFilteringDefinitionDto.js → ReadSelectedSearchDefinitionDto.js}
RENAMED
|
File without changes
|
|
File without changes
|