@futdevpro/fsm-dynamo 1.10.8 → 1.10.10

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.
@@ -5,15 +5,26 @@ import { DyFM_RangeValue } from '../control-models/range-value.control-model';
5
5
  *
6
6
  * it should be the value, a range or an array of the searching values
7
7
  */
8
- export type DyFM_DBĐFilter<T> = {
9
- [K in keyof T]?: T[K] | T[K][] | DyFM_RangeValue<T[K]> | DyFM_SpecialSearch<T[K]>;
8
+ export type DyFM_DBĐFilter<T_RootProperty> = {
9
+ [K in keyof T_RootProperty]?: T_RootProperty[K] | T_RootProperty[K][] | DyFM_RangeValue<T_RootProperty[K]> | DyFM_SpecialSearch<T_RootProperty> | DyFM_SpecialNestSearch<any>;
10
10
  };
11
11
  export interface DyFM_SpecialSearch<T> {
12
- specialSearchConfig: true;
13
- searchValue: T;
12
+ isSpecialSearch: true;
13
+ searchValue: T | T[];
14
14
  type: DyFM_SpecialSearch_Type;
15
- /** only required when searching nested property */
16
- propertyType?: DyFM_BasicProperty_Type;
15
+ }
16
+ /**
17
+ * searches for a nested property in the object
18
+ * can search for nested properties in arrays as well with the following syntax used in key:
19
+ * nestKeys: [ 'arrayProperty', '*', 'nestedPropertySearch' ]
20
+ */
21
+ export interface DyFM_SpecialNestSearch<T_NestedProperty> {
22
+ isSpecialNestSearch: true;
23
+ nestedPropertySearches: {
24
+ nestKeys: string[];
25
+ propertyType: DyFM_BasicProperty_Type;
26
+ search: T_NestedProperty | T_NestedProperty[] | DyFM_RangeValue<T_NestedProperty> | DyFM_SpecialSearch<T_NestedProperty>;
27
+ }[];
17
28
  }
18
29
  export declare enum DyFM_SpecialSearch_Type {
19
30
  /**
@@ -27,12 +38,6 @@ export declare enum DyFM_SpecialSearch_Type {
27
38
  /**
28
39
  * searches each word in the string, returns true if ALL words are found in the SAME order
29
40
  * */
30
- stringListSearchOrdered = "stringListSearchOrdered",
31
- /**
32
- * searches for a nested property in the object
33
- * can search for nested properties in arrays as well with the following syntax used in key:
34
- * 'arrayProperty[*].nestedPropertySearch'
35
- */
36
- nestedPropertySearch = "nestedPropertySearch"
41
+ stringListSearchOrdered = "stringListSearchOrdered"
37
42
  }
38
43
  //# sourceMappingURL=db-%C4%91filter.type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"db-đfilter.type.d.ts","sourceRoot":"","sources":["../../../src/_models/types/db-đfilter.type.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAE9E;;;;GAIG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI;KAC7B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,GAAG,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAClF,CAAC;AAEF,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,mBAAmB,EAAE,IAAI,CAAC;IAC1B,WAAW,EAAE,CAAC,CAAC;IACf,IAAI,EAAE,uBAAuB,CAAC;IAC9B,mDAAmD;IACnD,YAAY,CAAC,EAAE,uBAAuB,CAAC;CACxC;AAED,oBAAY,uBAAuB;IACjC;;SAEK;IACL,mBAAmB,wBAAwB;IAC3C;;SAEK;IACL,gBAAgB,qBAAqB;IACrC;;SAEK;IACL,uBAAuB,4BAA4B;IACnD;;;;OAIG;IACH,oBAAoB,yBAAyB;CAC9C"}
1
+ {"version":3,"file":"db-đfilter.type.d.ts","sourceRoot":"","sources":["../../../src/_models/types/db-đfilter.type.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAE9E;;;;GAIG;AACH,MAAM,MAAM,cAAc,CAAC,cAAc,IAAI;KAC1C,CAAC,IAAI,MAAM,cAAc,CAAC,CAAC,EAC1B,cAAc,CAAC,CAAC,CAAC,GACjB,cAAc,CAAC,CAAC,CAAC,EAAE,GACnB,eAAe,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,GAClC,kBAAkB,CAAC,cAAc,CAAC,GAClC,sBAAsB,CAAC,GAAG,CAAC;CAC9B,CAAC;AAEF,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,eAAe,EAAE,IAAI,CAAC;IACtB,WAAW,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;IACrB,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB,CAAC,gBAAgB;IACtD,mBAAmB,EAAE,IAAI,CAAC;IAC1B,sBAAsB,EAAE;QACtB,QAAQ,EAAE,MAAM,EAAE,CAAC;QACnB,YAAY,EAAE,uBAAuB,CAAC;QACtC,MAAM,EAAE,gBAAgB,GACtB,gBAAgB,EAAE,GAClB,eAAe,CAAC,gBAAgB,CAAC,GACjC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;KACxC,EAAE,CAAC;CACL;AAED,oBAAY,uBAAuB;IACjC;;SAEK;IACL,mBAAmB,wBAAwB;IAC3C;;SAEK;IACL,gBAAgB,qBAAqB;IACrC;;SAEK;IACL,uBAAuB,4BAA4B;CAOpD"}
@@ -18,8 +18,8 @@ var DyFM_SpecialSearch_Type;
18
18
  /**
19
19
  * searches for a nested property in the object
20
20
  * can search for nested properties in arrays as well with the following syntax used in key:
21
- * 'arrayProperty[*].nestedPropertySearch'
21
+ * nestKeys: [ 'arrayProperty', '*', 'nestedPropertySearch' ]
22
22
  */
23
- DyFM_SpecialSearch_Type["nestedPropertySearch"] = "nestedPropertySearch";
23
+ /* nestedPropertySearch = 'nestedPropertySearch', */
24
24
  })(DyFM_SpecialSearch_Type || (exports.DyFM_SpecialSearch_Type = DyFM_SpecialSearch_Type = {}));
25
25
  //# sourceMappingURL=db-%C4%91filter.type.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"db-đfilter.type.js","sourceRoot":"","sources":["../../../src/_models/types/db-đfilter.type.ts"],"names":[],"mappings":";;;AAsBA,IAAY,uBAmBX;AAnBD,WAAY,uBAAuB;IACjC;;SAEK;IACL,sEAA2C,CAAA;IAC3C;;SAEK;IACL,gEAAqC,CAAA;IACrC;;SAEK;IACL,8EAAmD,CAAA;IACnD;;;;OAIG;IACH,wEAA6C,CAAA;AAC/C,CAAC,EAnBW,uBAAuB,uCAAvB,uBAAuB,QAmBlC"}
1
+ {"version":3,"file":"db-đfilter.type.js","sourceRoot":"","sources":["../../../src/_models/types/db-đfilter.type.ts"],"names":[],"mappings":";;;AA0CA,IAAY,uBAmBX;AAnBD,WAAY,uBAAuB;IACjC;;SAEK;IACL,sEAA2C,CAAA;IAC3C;;SAEK;IACL,gEAAqC,CAAA;IACrC;;SAEK;IACL,8EAAmD,CAAA;IACnD;;;;OAIG;IACH,oDAAoD;AACtD,CAAC,EAnBW,uBAAuB,uCAAvB,uBAAuB,QAmBlC"}
@@ -1,5 +1,9 @@
1
1
  export type DyFM_DBĐSort = {
2
- key: string;
2
+ /**
3
+ * the key to sort by
4
+ * (can be an array that is used for sorting by nested properties)
5
+ */
6
+ key: string | string[];
3
7
  order: 1 | -1 | 'asc' | 'desc' | 'ascending' | 'descending';
4
8
  };
5
9
  //# sourceMappingURL=db-%C4%91sort.type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"db-đsort.type.d.ts","sourceRoot":"","sources":["../../../src/_models/types/db-đsort.type.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,YAAY,CAAC;CAC7D,CAAA"}
1
+ {"version":3,"file":"db-đsort.type.d.ts","sourceRoot":"","sources":["../../../src/_models/types/db-đsort.type.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,YAAY,GAAG;IACzB;;;OAGG;IACH,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACvB,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,YAAY,CAAC;CAC7D,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@futdevpro/fsm-dynamo",
3
- "version": "01.10.08",
3
+ "version": "01.10.10",
4
4
  "description": "Full Stack Model Collection for Dynamic (NodeJS-Typescript) Framework called Dynamo, by Future Development Ltd.",
5
5
  "scripts": {
6
6
  "prep": "npm i pnpm -g && npm i rimraf nodemon -g",
@@ -8,16 +8,36 @@ import { DyFM_RangeValue } from '../control-models/range-value.control-model';
8
8
  *
9
9
  * it should be the value, a range or an array of the searching values
10
10
  */
11
- export type DyFM_DBĐFilter<T> = {
12
- [K in keyof T]?: T[K] | T[K][] | DyFM_RangeValue<T[K]> | DyFM_SpecialSearch<T[K]>
11
+ export type DyFM_DBĐFilter<T_RootProperty> = {
12
+ [K in keyof T_RootProperty]?:
13
+ T_RootProperty[K] |
14
+ T_RootProperty[K][] |
15
+ DyFM_RangeValue<T_RootProperty[K]> |
16
+ DyFM_SpecialSearch<T_RootProperty> |
17
+ DyFM_SpecialNestSearch<any>;
13
18
  };
14
19
 
15
20
  export interface DyFM_SpecialSearch<T> {
16
- specialSearchConfig: true;
17
- searchValue: T;
21
+ isSpecialSearch: true;
22
+ searchValue: T | T[];
18
23
  type: DyFM_SpecialSearch_Type;
19
- /** only required when searching nested property */
20
- propertyType?: DyFM_BasicProperty_Type;
24
+ }
25
+
26
+ /**
27
+ * searches for a nested property in the object
28
+ * can search for nested properties in arrays as well with the following syntax used in key:
29
+ * nestKeys: [ 'arrayProperty', '*', 'nestedPropertySearch' ]
30
+ */
31
+ export interface DyFM_SpecialNestSearch<T_NestedProperty> {
32
+ isSpecialNestSearch: true;
33
+ nestedPropertySearches: {
34
+ nestKeys: string[];
35
+ propertyType: DyFM_BasicProperty_Type;
36
+ search: T_NestedProperty |
37
+ T_NestedProperty[] |
38
+ DyFM_RangeValue<T_NestedProperty> |
39
+ DyFM_SpecialSearch<T_NestedProperty>;
40
+ }[];
21
41
  }
22
42
 
23
43
  export enum DyFM_SpecialSearch_Type {
@@ -36,9 +56,9 @@ export enum DyFM_SpecialSearch_Type {
36
56
  /**
37
57
  * searches for a nested property in the object
38
58
  * can search for nested properties in arrays as well with the following syntax used in key:
39
- * 'arrayProperty[*].nestedPropertySearch'
59
+ * nestKeys: [ 'arrayProperty', '*', 'nestedPropertySearch' ]
40
60
  */
41
- nestedPropertySearch = 'nestedPropertySearch',
61
+ /* nestedPropertySearch = 'nestedPropertySearch', */
42
62
  }
43
63
 
44
64
 
@@ -1,7 +1,11 @@
1
1
 
2
2
 
3
3
  export type DyFM_DBĐSort = {
4
- key: string;
4
+ /**
5
+ * the key to sort by
6
+ * (can be an array that is used for sorting by nested properties)
7
+ */
8
+ key: string | string[];
5
9
  order: 1 | -1 | 'asc' | 'desc' | 'ascending' | 'descending';
6
10
  }
7
11
 
Binary file