@intellegens/cornerstone-client 0.0.32 → 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.
@@ -1,4 +1,4 @@
1
- import { ReadSelectedPaginationDefinitionDto, ReadSelectedOrderingDefinitionDto, ReadSelectedFilteringDefinitionDto } from '../..';
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
- * Filtering definition
15
+ * Search definition (supports both simple search and nested logical groups)
16
16
  */
17
- filteringDefinition?: ReadSelectedFilteringDefinitionDto;
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 filtering in a controller.
3
+ * Defines a property used for searching in a controller.
4
4
  */
5
- export type ReadSelectedFilteringPropertyDefinitionDto = Partial_ReadSelectedFilteringPropertyDefinition_IndependentProperties & Partial_ReadSelectedFilteringPropertyDefinition_TypedValueProperty & Partial_ReadSelectedFilteringPropertyDefinition_TypedComparisonOperators;
5
+ export type ReadSelectedSearchPropertyDefinitionDto = Partial_ReadSelectedSearchPropertyDefinition_IndependentProperties & Partial_ReadSelectedSearchPropertyDefinition_TypedValueProperty & Partial_ReadSelectedSearchPropertyDefinition_TypedComparisonOperators;
6
6
  /**
7
7
  * Defines independent properties
8
8
  */
9
- type Partial_ReadSelectedFilteringPropertyDefinition_IndependentProperties = {
9
+ type Partial_ReadSelectedSearchPropertyDefinition_IndependentProperties = {
10
10
  /**
11
- * The path to the property being filtered.
11
+ * The path to the property being searched.
12
12
  */
13
13
  propertyPath: string;
14
14
  /**
15
- * The comparison operator to use for the filter.
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 filtered.
19
+ * The type of the property value being searched.
20
20
  */
21
21
  valueType: ReadSelectedPropertyType;
22
22
  /**
23
- * The value to use for the filter.
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 Partial_ReadSelectedFilteringPropertyDefinition_TypedValueProperty = {
30
+ type Partial_ReadSelectedSearchPropertyDefinition_TypedValueProperty = {
31
31
  /**
32
- * The type of the property value being filtered.
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 filter.
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 filtered.
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 filter.
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 filtered.
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 filter.
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 filtered.
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 filter.
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 Partial_ReadSelectedFilteringPropertyDefinition_TypedComparisonOperators = {
70
+ type Partial_ReadSelectedSearchPropertyDefinition_TypedComparisonOperators = {
71
71
  /**
72
- * The type of the property value being filtered.
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 filter.
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 filtered.
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 filter.
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 filtered.
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 filter.
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 filtered.
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 filter.
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
  };
@@ -1,6 +1,6 @@
1
1
  export * from './ReadSelectedDefinitionDto';
2
- export * from './ReadSelectedFilteringDefinitionDto';
3
- export * from './ReadSelectedFilteringPropertyDefinitionDto';
2
+ export * from './ReadSelectedSearchDefinitionDto';
3
+ export * from './ReadSelectedSearchPropertyDefinitionDto';
4
4
  export * from './ReadSelectedOrderingDefinitionDto';
5
5
  export * from './ReadSelectedOrderingPropertyDefinitionDto';
6
6
  export * from './ReadSelectedPaginationDefinitionDto';
@@ -1,6 +1,6 @@
1
1
  export * from './ReadSelectedDefinitionDto';
2
- export * from './ReadSelectedFilteringDefinitionDto';
3
- export * from './ReadSelectedFilteringPropertyDefinitionDto';
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intellegens/cornerstone-client",
3
- "version": "0.0.32",
3
+ "version": "0.0.33",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -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 filter definition.
34
- * @param {any} definition - The filter definition object
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 filter definition.
48
- * @param {any} definition - The filter definition object
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
- };