@futdevpro/fsm-dynamo 1.10.7 → 1.10.9

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,18 +1,27 @@
1
+ import { DyFM_BasicProperty_Type } from '../../_enums/basic-property-type.enum';
1
2
  import { DyFM_RangeValue } from '../control-models/range-value.control-model';
2
3
  /**
3
4
  * A filter for a DynamoDB queries.
4
5
  *
5
6
  * it should be the value, a range or an array of the searching values
6
7
  */
7
- export type DyFM_DBĐFilter<T> = {
8
- [K in keyof T]?: T[K] | T[K][] | DyFM_RangeValue<T[K]> | DyFM_SpecialSearch<T[K]>;
8
+ export type DyFM_DBĐFilter<T_RootProperty, T_NestedProperty = any> = {
9
+ [K in keyof T_RootProperty]?: T_RootProperty[K] | T_RootProperty[K][] | DyFM_RangeValue<T_RootProperty[K]> | DyFM_SpecialSearch<T_NestedProperty> | DyFM_SpecialSearch<T_NestedProperty>[];
9
10
  };
10
11
  export interface DyFM_SpecialSearch<T> {
11
12
  specialSearchConfig: true;
12
- search: T;
13
+ searchValue: T;
13
14
  type: DyFM_SpecialSearch_Type;
15
+ /** only required when searching nested property */
16
+ nestKeys?: string[];
17
+ /** only required when searching nested property */
18
+ propertyType?: DyFM_BasicProperty_Type;
14
19
  }
15
20
  export declare enum DyFM_SpecialSearch_Type {
21
+ /**
22
+ * searches each word in the string, returns true if ANY word is found in ANY order
23
+ * */
24
+ stringListSearchAny = "stringListSearchAny",
16
25
  /**
17
26
  * searches each word in the string, returns true if ALL words are found in ANY order
18
27
  * */
@@ -20,6 +29,12 @@ export declare enum DyFM_SpecialSearch_Type {
20
29
  /**
21
30
  * searches each word in the string, returns true if ALL words are found in the SAME order
22
31
  * */
23
- stringListSearchOrdered = "stringListSearchOrdered"
32
+ stringListSearchOrdered = "stringListSearchOrdered",
33
+ /**
34
+ * searches for a nested property in the object
35
+ * can search for nested properties in arrays as well with the following syntax used in key:
36
+ * 'arrayProperty[*].nestedPropertySearch'
37
+ */
38
+ nestedPropertySearch = "nestedPropertySearch"
24
39
  }
25
40
  //# 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,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,MAAM,EAAE,CAAC,CAAC;IACV,IAAI,EAAE,uBAAuB,CAAC;CAC/B;AAED,oBAAY,uBAAuB;IACjC;;SAEK;IACL,gBAAgB,qBAAqB;IACrC;;SAEK;IACL,uBAAuB,4BAA4B;CACpD"}
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,EAAE,gBAAgB,GAAG,GAAG,IAAI;KAClE,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,gBAAgB,CAAC,GACpC,kBAAkB,CAAC,gBAAgB,CAAC,EAAE;CACzC,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,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,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"}
@@ -3,6 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DyFM_SpecialSearch_Type = void 0;
4
4
  var DyFM_SpecialSearch_Type;
5
5
  (function (DyFM_SpecialSearch_Type) {
6
+ /**
7
+ * searches each word in the string, returns true if ANY word is found in ANY order
8
+ * */
9
+ DyFM_SpecialSearch_Type["stringListSearchAny"] = "stringListSearchAny";
6
10
  /**
7
11
  * searches each word in the string, returns true if ALL words are found in ANY order
8
12
  * */
@@ -11,5 +15,11 @@ var DyFM_SpecialSearch_Type;
11
15
  * searches each word in the string, returns true if ALL words are found in the SAME order
12
16
  * */
13
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
+ * 'arrayProperty[*].nestedPropertySearch'
22
+ */
23
+ DyFM_SpecialSearch_Type["nestedPropertySearch"] = "nestedPropertySearch";
14
24
  })(DyFM_SpecialSearch_Type || (exports.DyFM_SpecialSearch_Type = DyFM_SpecialSearch_Type = {}));
15
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":";;;AAmBA,IAAY,uBASX;AATD,WAAY,uBAAuB;IACjC;;SAEK;IACL,gEAAqC,CAAA;IACrC;;SAEK;IACL,8EAAmD,CAAA;AACrD,CAAC,EATW,uBAAuB,uCAAvB,uBAAuB,QASlC"}
1
+ {"version":3,"file":"db-đfilter.type.js","sourceRoot":"","sources":["../../../src/_models/types/db-đfilter.type.ts"],"names":[],"mappings":";;;AA6BA,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@futdevpro/fsm-dynamo",
3
- "version": "01.10.07",
3
+ "version": "01.10.09",
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",
@@ -1,5 +1,6 @@
1
1
 
2
2
 
3
+ import { DyFM_BasicProperty_Type } from '../../_enums/basic-property-type.enum';
3
4
  import { DyFM_RangeValue } from '../control-models/range-value.control-model';
4
5
 
5
6
  /**
@@ -7,17 +8,30 @@ import { DyFM_RangeValue } from '../control-models/range-value.control-model';
7
8
  *
8
9
  * it should be the value, a range or an array of the searching values
9
10
  */
10
- export type DyFM_DBĐFilter<T> = {
11
- [K in keyof T]?: T[K] | T[K][] | DyFM_RangeValue<T[K]> | DyFM_SpecialSearch<T[K]>
11
+ export type DyFM_DBĐFilter<T_RootProperty, T_NestedProperty = any> = {
12
+ [K in keyof T_RootProperty]?:
13
+ T_RootProperty[K] |
14
+ T_RootProperty[K][] |
15
+ DyFM_RangeValue<T_RootProperty[K]> |
16
+ DyFM_SpecialSearch<T_NestedProperty> |
17
+ DyFM_SpecialSearch<T_NestedProperty>[];
12
18
  };
13
19
 
14
20
  export interface DyFM_SpecialSearch<T> {
15
21
  specialSearchConfig: true;
16
- search: T;
22
+ searchValue: T;
17
23
  type: DyFM_SpecialSearch_Type;
24
+ /** only required when searching nested property */
25
+ nestKeys?: string[];
26
+ /** only required when searching nested property */
27
+ propertyType?: DyFM_BasicProperty_Type;
18
28
  }
19
29
 
20
30
  export enum DyFM_SpecialSearch_Type {
31
+ /**
32
+ * searches each word in the string, returns true if ANY word is found in ANY order
33
+ * */
34
+ stringListSearchAny = 'stringListSearchAny',
21
35
  /**
22
36
  * searches each word in the string, returns true if ALL words are found in ANY order
23
37
  * */
@@ -26,6 +40,12 @@ export enum DyFM_SpecialSearch_Type {
26
40
  * searches each word in the string, returns true if ALL words are found in the SAME order
27
41
  * */
28
42
  stringListSearchOrdered = 'stringListSearchOrdered',
43
+ /**
44
+ * searches for a nested property in the object
45
+ * can search for nested properties in arrays as well with the following syntax used in key:
46
+ * 'arrayProperty[*].nestedPropertySearch'
47
+ */
48
+ nestedPropertySearch = 'nestedPropertySearch',
29
49
  }
30
50
 
31
51
 
Binary file
@@ -1,12 +0,0 @@
1
- /**
2
- * basic Http Call Types such as;
3
- * get, post, put, patch, delete
4
- */
5
- export declare enum DyFM_HttpCallType {
6
- get = "get",
7
- post = "post",
8
- put = "put",
9
- patch = "patch",
10
- delete = "delete"
11
- }
12
- //# sourceMappingURL=http-call-type.enum.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http-call-type.enum.d.ts","sourceRoot":"","sources":["http-call-type.enum.ts"],"names":[],"mappings":"AACA;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,MAAM,WAAW;CAClB"}
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DyFM_HttpCallType = void 0;
4
- /**
5
- * basic Http Call Types such as;
6
- * get, post, put, patch, delete
7
- */
8
- var DyFM_HttpCallType;
9
- (function (DyFM_HttpCallType) {
10
- DyFM_HttpCallType["get"] = "get";
11
- DyFM_HttpCallType["post"] = "post";
12
- DyFM_HttpCallType["put"] = "put";
13
- DyFM_HttpCallType["patch"] = "patch";
14
- DyFM_HttpCallType["delete"] = "delete";
15
- })(DyFM_HttpCallType || (exports.DyFM_HttpCallType = DyFM_HttpCallType = {}));
16
- //# sourceMappingURL=http-call-type.enum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http-call-type.enum.js","sourceRoot":"","sources":["http-call-type.enum.ts"],"names":[],"mappings":";;;AACA;;;GAGG;AACH,IAAY,iBAMX;AAND,WAAY,iBAAiB;IAC3B,gCAAW,CAAA;IACX,kCAAa,CAAA;IACb,gCAAW,CAAA;IACX,oCAAe,CAAA;IACf,sCAAiB,CAAA;AACnB,CAAC,EANW,iBAAiB,iCAAjB,iBAAiB,QAM5B"}
@@ -1,7 +0,0 @@
1
- export declare enum DyFM_HttpResponseType {
2
- arraybuffer = "arraybuffer",
3
- blob = "blob",
4
- json = "json",
5
- text = "text"
6
- }
7
- //# sourceMappingURL=http-response-type.enum.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http-response-type.enum.d.ts","sourceRoot":"","sources":["http-response-type.enum.ts"],"names":[],"mappings":"AACA,oBAAY,qBAAqB;IAC/B,WAAW,gBAAgB;IAC3B,IAAI,SAAS;IACb,IAAI,SAAS;IACb,IAAI,SAAS;CACd"}
@@ -1,11 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DyFM_HttpResponseType = void 0;
4
- var DyFM_HttpResponseType;
5
- (function (DyFM_HttpResponseType) {
6
- DyFM_HttpResponseType["arraybuffer"] = "arraybuffer";
7
- DyFM_HttpResponseType["blob"] = "blob";
8
- DyFM_HttpResponseType["json"] = "json";
9
- DyFM_HttpResponseType["text"] = "text";
10
- })(DyFM_HttpResponseType || (exports.DyFM_HttpResponseType = DyFM_HttpResponseType = {}));
11
- //# sourceMappingURL=http-response-type.enum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http-response-type.enum.js","sourceRoot":"","sources":["http-response-type.enum.ts"],"names":[],"mappings":";;;AACA,IAAY,qBAKX;AALD,WAAY,qBAAqB;IAC/B,oDAA2B,CAAA;IAC3B,sCAAa,CAAA;IACb,sCAAa,CAAA;IACb,sCAAa,CAAA;AACf,CAAC,EALW,qBAAqB,qCAArB,qBAAqB,QAKhC"}