@futdevpro/fsm-dynamo 1.10.12 → 1.10.15

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,8 +5,8 @@ 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_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>;
8
+ export type DyFM_DBĐFilter<T> = {
9
+ [K in keyof T]?: T[K] | T[K][] | DyFM_RangeValue<T[K]> | DyFM_SpecialSearch<T[K]> | DyFM_SpecialNestSearch;
10
10
  };
11
11
  export interface DyFM_SpecialSearch<T> {
12
12
  isSpecialSearch: true;
@@ -14,17 +14,20 @@ export interface DyFM_SpecialSearch<T> {
14
14
  type: DyFM_SpecialSearch_Type;
15
15
  }
16
16
  /**
17
- * searches for a nested property in the object
17
+ * searches for a nested properties in the object
18
+ */
19
+ export interface DyFM_SpecialNestSearch {
20
+ isSpecialNestSearch: true;
21
+ nestedPropertySearches: DyFM_NestPropertySearch<any>[];
22
+ }
23
+ /**
18
24
  * can search for nested properties in arrays as well with the following syntax used in key:
19
25
  * nestKeys: [ 'arrayProperty', '*', 'nestedPropertySearch' ]
20
26
  */
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
- }[];
27
+ export interface DyFM_NestPropertySearch<T> {
28
+ nestKeys: string[];
29
+ valueType: DyFM_BasicProperty_Type;
30
+ search: T | T[] | DyFM_RangeValue<T> | DyFM_SpecialSearch<T>;
28
31
  }
29
32
  export declare enum DyFM_SpecialSearch_Type {
30
33
  /**
@@ -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;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"}
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,EAAG,CAAC,CAAC,CAAC,CAAC,GACJ,CAAC,CAAC,CAAC,CAAC,EAAE,GACN,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACrB,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GACxB,sBAAsB;CACzC,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;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,mBAAmB,EAAE,IAAI,CAAC;IAC1B,sBAAsB,EAAE,uBAAuB,CAAC,GAAG,CAAC,EAAE,CAAC;CACxD;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB,CAAC,CAAC;IACxC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,uBAAuB,CAAC;IACnC,MAAM,EAAE,CAAC,GACD,CAAC,EAAE,GACH,eAAe,CAAC,CAAC,CAAC,GAClB,kBAAkB,CAAC,CAAC,CAAC,CAAC;CAC/B;AAED,oBAAY,uBAAuB;IACjC;;SAEK;IACL,mBAAmB,wBAAwB;IAC3C;;SAEK;IACL,gBAAgB,qBAAqB;IACrC;;SAEK;IACL,uBAAuB,4BAA4B;CACpD"}
@@ -15,11 +15,5 @@ var DyFM_SpecialSearch_Type;
15
15
  * searches each word in the string, returns true if ALL words are found in the SAME order
16
16
  * */
17
17
  DyFM_SpecialSearch_Type["stringListSearchOrdered"] = "stringListSearchOrdered";
18
- /**
19
- * searches for a nested property in the object
20
- * can search for nested properties in arrays as well with the following syntax used in key:
21
- * nestKeys: [ 'arrayProperty', '*', 'nestedPropertySearch' ]
22
- */
23
- /* nestedPropertySearch = 'nestedPropertySearch', */
24
18
  })(DyFM_SpecialSearch_Type || (exports.DyFM_SpecialSearch_Type = DyFM_SpecialSearch_Type = {}));
25
19
  //# 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":";;;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
+ {"version":3,"file":"db-đfilter.type.js","sourceRoot":"","sources":["../../../src/_models/types/db-đfilter.type.ts"],"names":[],"mappings":";;;AA6CA,IAAY,uBAaX;AAbD,WAAY,uBAAuB;IACjC;;SAEK;IACL,sEAA2C,CAAA;IAC3C;;SAEK;IACL,gEAAqC,CAAA;IACrC;;SAEK;IACL,8EAAmD,CAAA;AACrD,CAAC,EAbW,uBAAuB,uCAAvB,uBAAuB,QAalC"}
@@ -1,9 +1,17 @@
1
- export type DyFM_DBĐSort = {
1
+ import { DyFM_BasicProperty_Type } from '../../_enums/basic-property-type.enum';
2
+ export type DyFM_DBĐSort = DyFM_DBĐPropertySort | DyFM_DBĐNestedPropertySort;
3
+ export interface DyFM_DBĐPropertySort {
4
+ key: string;
5
+ order: 1 | -1 | 'asc' | 'desc' | 'ascending' | 'descending';
6
+ }
7
+ export interface DyFM_DBĐNestedPropertySort {
8
+ isNestedPropertySort: true;
2
9
  /**
3
10
  * the key to sort by
4
11
  * (can be an array that is used for sorting by nested properties)
5
12
  */
6
- key: string | string[];
13
+ nestKeys: string[];
14
+ valueType: DyFM_BasicProperty_Type;
7
15
  order: 1 | -1 | 'asc' | 'desc' | 'ascending' | 'descending';
8
- };
16
+ }
9
17
  //# 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;;;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"}
1
+ {"version":3,"file":"db-đsort.type.d.ts","sourceRoot":"","sources":["../../../src/_models/types/db-đsort.type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAIhF,MAAM,MAAM,YAAY,GAAG,oBAAoB,GAAG,0BAA0B,CAAC;AAC7E,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,YAAY,CAAC;CAC7D;AAED,MAAM,WAAW,0BAA0B;IACzC,oBAAoB,EAAE,IAAI,CAAC;IAC3B;;;OAGG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,uBAAuB,CAAC;IACnC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,YAAY,CAAC;CAC7D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@futdevpro/fsm-dynamo",
3
- "version": "01.10.12",
3
+ "version": "01.10.15",
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,13 +8,12 @@ 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_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>;
11
+ export type DyFM_DBĐFilter<T> = {
12
+ [K in keyof T]?: T[K] |
13
+ T[K][] |
14
+ DyFM_RangeValue<T[K]> |
15
+ DyFM_SpecialSearch<T[K]> |
16
+ DyFM_SpecialNestSearch;
18
17
  };
19
18
 
20
19
  export interface DyFM_SpecialSearch<T> {
@@ -24,20 +23,24 @@ export interface DyFM_SpecialSearch<T> {
24
23
  }
25
24
 
26
25
  /**
27
- * searches for a nested property in the object
26
+ * searches for a nested properties in the object
27
+ */
28
+ export interface DyFM_SpecialNestSearch {
29
+ isSpecialNestSearch: true;
30
+ nestedPropertySearches: DyFM_NestPropertySearch<any>[];
31
+ }
32
+
33
+ /**
28
34
  * can search for nested properties in arrays as well with the following syntax used in key:
29
35
  * nestKeys: [ 'arrayProperty', '*', 'nestedPropertySearch' ]
30
36
  */
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
- }[];
37
+ export interface DyFM_NestPropertySearch<T> {
38
+ nestKeys: string[];
39
+ valueType: DyFM_BasicProperty_Type;
40
+ search: T |
41
+ T[] |
42
+ DyFM_RangeValue<T> |
43
+ DyFM_SpecialSearch<T>;
41
44
  }
42
45
 
43
46
  export enum DyFM_SpecialSearch_Type {
@@ -53,12 +56,6 @@ export enum DyFM_SpecialSearch_Type {
53
56
  * searches each word in the string, returns true if ALL words are found in the SAME order
54
57
  * */
55
58
  stringListSearchOrdered = 'stringListSearchOrdered',
56
- /**
57
- * searches for a nested property in the object
58
- * can search for nested properties in arrays as well with the following syntax used in key:
59
- * nestKeys: [ 'arrayProperty', '*', 'nestedPropertySearch' ]
60
- */
61
- /* nestedPropertySearch = 'nestedPropertySearch', */
62
59
  }
63
60
 
64
61
 
@@ -1,11 +1,21 @@
1
+ import { DyFM_BasicProperty_Type } from '../../_enums/basic-property-type.enum';
1
2
 
2
3
 
3
- export type DyFM_DBĐSort = {
4
+
5
+ export type DyFM_DBĐSort = DyFM_DBĐPropertySort | DyFM_DBĐNestedPropertySort;
6
+ export interface DyFM_DBĐPropertySort {
7
+ key: string;
8
+ order: 1 | -1 | 'asc' | 'desc' | 'ascending' | 'descending';
9
+ }
10
+
11
+ export interface DyFM_DBĐNestedPropertySort {
12
+ isNestedPropertySort: true;
4
13
  /**
5
14
  * the key to sort by
6
15
  * (can be an array that is used for sorting by nested properties)
7
16
  */
8
- key: string | string[];
17
+ nestKeys: string[];
18
+ valueType: DyFM_BasicProperty_Type;
9
19
  order: 1 | -1 | 'asc' | 'desc' | 'ascending' | 'descending';
10
20
  }
11
21
 
Binary file