@futdevpro/fsm-dynamo 1.9.40 → 1.9.42

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.
Files changed (29) hide show
  1. package/build/_models/control-models/data-model-params.control-model.d.ts +1 -1
  2. package/build/_models/control-models/data-model-params.control-model.d.ts.map +1 -1
  3. package/build/_models/control-models/data-model-params.control-model.js +1 -1
  4. package/build/_models/control-models/data-model-params.control-model.js.map +1 -1
  5. package/build/_models/interfaces/search-query.interface.d.ts +9 -0
  6. package/build/_models/interfaces/search-query.interface.d.ts.map +1 -0
  7. package/build/_models/interfaces/search-query.interface.js +3 -0
  8. package/build/_models/interfaces/search-query.interface.js.map +1 -0
  9. package/build/_models/types/db-filter.type.d.ts +97 -0
  10. package/build/_models/types/db-filter.type.d.ts.map +1 -0
  11. package/build/_models/types/db-filter.type.js +3 -0
  12. package/build/_models/types/db-filter.type.js.map +1 -0
  13. package/build/_models/types/db-sort.type.d.ts +4 -0
  14. package/build/_models/types/db-sort.type.d.ts.map +1 -0
  15. package/build/_models/types/db-sort.type.js +3 -0
  16. package/build/_models/types/db-sort.type.js.map +1 -0
  17. package/build/index.d.ts +3 -0
  18. package/build/index.d.ts.map +1 -1
  19. package/build/index.js +4 -0
  20. package/build/index.js.map +1 -1
  21. package/futdevpro-fsm-dynamo-01.09.42.tgz +0 -0
  22. package/package.json +1 -1
  23. package/src/_models/control-models/data-model-params.control-model.ts +1 -1
  24. package/src/_models/interfaces/search-query.interface.ts +10 -0
  25. package/src/_models/types/db-filter.type.ts +107 -0
  26. package/src/_models/types/db-sort.type.ts +5 -0
  27. package/src/index.ts +5 -0
  28. package/tsconfig.json +1 -1
  29. package/futdevpro-fsm-dynamo-01.09.40.tgz +0 -0
@@ -1,5 +1,5 @@
1
- import { DyFM_Metadata } from '../data-models/metadata.data-model';
2
1
  import { DyFM_DataModel_Type } from '../../_enums/data-model-type.enum';
2
+ import { DyFM_Metadata } from '../data-models/metadata.data-model';
3
3
  import { DyFM_DataProperty_Params } from './data-property-params.control-model';
4
4
  export type DyFM_Data_S = DyFM_DataModel_Settings;
5
5
  export type DyFM_Data_Settings = DyFM_DataModel_Settings;
@@ -1 +1 @@
1
- {"version":3,"file":"data-model-params.control-model.d.ts","sourceRoot":"","sources":["../../../src/_models/control-models/data-model-params.control-model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAEhF,MAAM,MAAM,WAAW,GAAG,uBAAuB,CAAC;AAClD,MAAM,MAAM,kBAAkB,GAAG,uBAAuB,CAAC;AACzD,qBAAa,uBAAwB,SAAQ,aAAa;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,wBAAwB,EAAE,CAAC;CACzC;AAED,MAAM,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAChD,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;AACrD,qBAAa,qBAAsB,SAAQ,uBAAuB;IAEvD,UAAU,CAAC,EAAE,wBAAwB,EAAE,CAAM;gBAGpD,GAAG,EAAE,uBAAuB;IA8B9B,WAAW,CAAC,IAAI,OAAO;CAGxB"}
1
+ {"version":3,"file":"data-model-params.control-model.d.ts","sourceRoot":"","sources":["../../../src/_models/control-models/data-model-params.control-model.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAEhF,MAAM,MAAM,WAAW,GAAG,uBAAuB,CAAC;AAClD,MAAM,MAAM,kBAAkB,GAAG,uBAAuB,CAAC;AACzD,qBAAa,uBAAwB,SAAQ,aAAa;IACxD,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,wBAAwB,EAAE,CAAC;CACzC;AAED,MAAM,MAAM,WAAW,GAAG,qBAAqB,CAAC;AAChD,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,CAAC;AACrD,qBAAa,qBAAsB,SAAQ,uBAAuB;IAEvD,UAAU,CAAC,EAAE,wBAAwB,EAAE,CAAM;gBAGpD,GAAG,EAAE,uBAAuB;IA8B9B,WAAW,CAAC,IAAI,OAAO;CAGxB"}
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.DyFM_DataModel_Params = exports.DyFM_DataModel_Settings = void 0;
4
- const metadata_data_model_1 = require("../data-models/metadata.data-model");
5
4
  const data_model_type_enum_1 = require("../../_enums/data-model-type.enum");
5
+ const metadata_data_model_1 = require("../data-models/metadata.data-model");
6
6
  class DyFM_DataModel_Settings extends metadata_data_model_1.DyFM_Metadata {
7
7
  dataName;
8
8
  modelType;
@@ -1 +1 @@
1
- {"version":3,"file":"data-model-params.control-model.js","sourceRoot":"","sources":["../../../src/_models/control-models/data-model-params.control-model.ts"],"names":[],"mappings":";;;AACA,4EAAmE;AACnE,4EAAwE;AAKxE,MAAa,uBAAwB,SAAQ,mCAAa;IACxD,QAAQ,CAAS;IACjB,SAAS,CAAuB;IAChC,MAAM,CAAU;IAChB,UAAU,CAAW;IACrB,UAAU,CAA8B;CACzC;AAND,0DAMC;AAID,MAAa,qBAAsB,SAAQ,uBAAuB;IAEvD,UAAU,GAAgC,EAAE,CAAC;IAEtD,YACE,GAA4B;QAE5B,KAAK,CAAC,GAAG,CAAC,CAAC;QAEX,IAAI,GAAG,EAAE,CAAC;YACR,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAC3B,CAAC;QAED,IAAI,CAAC,IAAI,EAAE,SAAS,IAAI,IAAI,EAAE,SAAS,IAAI,0CAAmB,CAAC,IAAI,EAAE,CAAC;YACpE,IAAI,CAAC,SAAS,GAAG,0CAAmB,CAAC,IAAI,CAAC;QAC5C,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,EAAE,SAAS,IAAI,0CAAmB,CAAC,IAAI,EAAE,CAAC;YAChE,0BAA0B;YAC1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YAE7E,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,IAAY,EAAE,KAAa,EAAQ,EAAE;gBAClE,IACE,KAAK,GAAG,CAAC;oBACT,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,GAAG;oBAC9B,IAAI,KAAK,IAAI,CAAC,WAAW,EAAE,EAC3B,CAAC;oBACD,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC;wBAC3B,IAAI,CAAC,WAAW,EAAE;wBAClB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;gBAC7C,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAtCD,sDAsCC"}
1
+ {"version":3,"file":"data-model-params.control-model.js","sourceRoot":"","sources":["../../../src/_models/control-models/data-model-params.control-model.ts"],"names":[],"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AAE;wBAClB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;gBAC7C,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAtCD,sDAsCC"}
@@ -0,0 +1,9 @@
1
+ import { DyFM_DBFilter } from '../types/db-filter.type';
2
+ import { DyFM_DBSort } from '../types/db-sort.type';
3
+ export interface DyNTS_SearchQuery<T> {
4
+ filterBy?: DyFM_DBFilter<T>;
5
+ sortBy?: DyFM_DBSort<T>;
6
+ page?: number;
7
+ pageSize?: number;
8
+ }
9
+ //# sourceMappingURL=search-query.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-query.interface.d.ts","sourceRoot":"","sources":["../../../src/_models/interfaces/search-query.interface.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC,QAAQ,CAAC,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAC5B,MAAM,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=search-query.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"search-query.interface.js","sourceRoot":"","sources":["../../../src/_models/interfaces/search-query.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,97 @@
1
+ /**
2
+ * @example
3
+ * // by email:
4
+ * { email: email }
5
+ * //
6
+ * @example
7
+ * // or by id that is in list:
8
+ * { userIds: { $in: this.userId } }
9
+ * //
10
+ * @example
11
+ * // or by number or Date that is Greater Than AND Less Than:
12
+ * { points: { $gt: 2, $lt: 14 } }
13
+ * // further tools (syntax matches with $gt):
14
+ * $eq: // Matches values that are EQual to a specified value.
15
+ * $gte: // Matches values that are Greater Than OR Equal to a specified value.
16
+ * $lte: // Matches values that are Less Than or Equal to a specified value.
17
+ * $ne: // Matches all values that are Not Equal to a specified value.
18
+ * $nin: // Matches None of the values specified IN an array.
19
+ * //
20
+ * @returns {T} data: T
21
+ */
22
+ export type DyFM_DBFilter<T> = DyFM_DBFilterSimple<T> | DyFM_DBFilterOR<T> | DyFM_DBFilterNOR<T>;
23
+ /**
24
+ * A simple filter for a DynamoDB query.
25
+ */
26
+ export type DyFM_DBFilterSimple<T> = {
27
+ [K in keyof T]?: T[K] | DyFM_DBFilterExpressions<T[K] | boolean>;
28
+ } & {
29
+ [path: string]: any;
30
+ };
31
+ export type DyFM_DBFilterExpressions<T> = {
32
+ /**
33
+ * Matches values that are includes the value; This works only when T[K] is an array!
34
+ */
35
+ $in?: any;
36
+ /**
37
+ * Matches values that are EQual to a specified value.
38
+ */
39
+ $eq?: T;
40
+ /**
41
+ * Matches values that are Greater Than a specified value.
42
+ */
43
+ $gt?: number | Date;
44
+ /**
45
+ * Matches values that are Greater Than OR Equal to a specified value.
46
+ */
47
+ $gte?: number | Date;
48
+ /**
49
+ * Matches values that are Less Than a specified value.
50
+ */
51
+ $lt?: number | Date;
52
+ /**
53
+ * Matches values that are Less Than or Equal to a specified value.
54
+ */
55
+ $lte?: number | Date;
56
+ /**
57
+ * Matches all values that are Not Equal to a specified value.
58
+ */
59
+ $ne?: T;
60
+ /**
61
+ * Matches None of the values specified IN an array.
62
+ */
63
+ $nin?: T;
64
+ /**
65
+ * Inverts the effect of a query expression and returns documents that do not match the query expression.
66
+ */
67
+ $not?: T | {
68
+ $regex?: RegExp | string;
69
+ };
70
+ /**
71
+ * Performs a regular expression on the field's value, and selects documents that match the regular expression.
72
+ */
73
+ $exists?: boolean;
74
+ /**
75
+ * Selects documents if a field is of the specified type.
76
+ */
77
+ $type?: string;
78
+ };
79
+ /**
80
+ * Joins query clauses with a logical AND returns all documents that match the conditions of both clauses.
81
+ */
82
+ export type DyFM_DBFilterNOR<T> = {
83
+ /**
84
+ * Joins query clauses with a logical NOR returns all documents that fail to match both clauses.
85
+ */
86
+ $nor: DyFM_DBFilterSimple<T>[];
87
+ };
88
+ /**
89
+ * Joins query clauses with a logical AND returns all documents that match the conditions of both clauses.
90
+ */
91
+ export type DyFM_DBFilterOR<T> = {
92
+ /**
93
+ * Joins query clauses with a logical OR returns all documents that match the conditions of either clause.
94
+ */
95
+ $or: DyFM_DBFilterSimple<T>[];
96
+ };
97
+ //# sourceMappingURL=db-filter.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db-filter.type.d.ts","sourceRoot":"","sources":["../../../src/_models/types/db-filter.type.ts"],"names":[],"mappings":"AACA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,IACzB,mBAAmB,CAAC,CAAC,CAAC,GACtB,eAAe,CAAC,CAAC,CAAC,GAClB,gBAAgB,CAAC,CAAC,CAAC,CAAC;AAEtB;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;KAClC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,wBAAwB,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;CACjE,GAAG;IACF,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,wBAAwB,CAAC,CAAC,IAAI;IACxC;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;IACV;;OAEG;IACH,GAAG,CAAC,EAAE,CAAC,CAAC;IACR;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;OAEG;IACH,GAAG,CAAC,EAAE,CAAC,CAAC;IACR;;OAEG;IACH,IAAI,CAAC,EAAE,CAAC,CAAC;IACT;;OAEG;IACH,IAAI,CAAC,EAAE,CAAC,GAAG;QACT,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KAC1B,CAAC;IACF;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAGF;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI;IAChC;;OAEG;IACH,IAAI,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC;CAChC,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI;IAC/B;;OAEG;IACH,GAAG,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC;CAC/B,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=db-filter.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db-filter.type.js","sourceRoot":"","sources":["../../../src/_models/types/db-filter.type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export type DyFM_DBSort<T> = {
2
+ [K in keyof T]?: 1 | -1 | 'asc' | 'desc' | 'ascending' | 'descending';
3
+ };
4
+ //# sourceMappingURL=db-sort.type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db-sort.type.d.ts","sourceRoot":"","sources":["../../../src/_models/types/db-sort.type.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,CAAC,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,MAAM,GAAG,WAAW,GAAG,YAAY;CACtE,CAAA"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=db-sort.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"db-sort.type.js","sourceRoot":"","sources":["../../../src/_models/types/db-sort.type.ts"],"names":[],"mappings":""}
package/build/index.d.ts CHANGED
@@ -35,7 +35,10 @@ export * from './_models/interfaces/error-defaults.interface';
35
35
  export * from './_models/interfaces/paged.interface';
36
36
  export * from './_models/interfaces/random-weight.interface';
37
37
  export * from './_models/interfaces/route-settings.interface';
38
+ export * from './_models/interfaces/search-query.interface';
38
39
  export * from './_models/interfaces/vector2.interface';
39
40
  export * from './_models/interfaces/environment/global-log-settings.interface';
40
41
  export * from './_models/interfaces/environment/global-settings.interface';
42
+ export * from './_models/types/db-filter.type';
43
+ export * from './_models/types/db-sort.type';
41
44
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,+CAA+C,CAAC;AAC9D,cAAc,gDAAgD,CAAC;AAC/D,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AAGrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC;AACrD,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iDAAiD,CAAC;AAChE,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAG/C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,qCAAqC,CAAC;AACpD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,wCAAwC,CAAC;AAGvD,cAAc,g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cAAc,mCAAmC,CAAC;AAClD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AAGxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,0BAA0B,CAAC;AACzC,cAAc,kCAAkC,CAAC;AAKjD,cAAc,0DAA0D,CAAC;AACzE,cAAc,6DAA6D,CAAC;AAC5E,cAAc,8CAA8C,CAAC;AAC7D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,oDAAoD,CAAC;AAGnE,cAAc,2CAA2C,CAAC;AAG1D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,sCAAsC,CAAC;AACrD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,wCAAwC,CAAC;AAGvD,cAAc,gEAAgE,CAAC;AAC/E,cAAc,4DAA4D,CAAC;AAG3E,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC"}
package/build/index.js CHANGED
@@ -49,8 +49,12 @@ tslib_1.__exportStar(require("./_models/interfaces/error-defaults.interface"), e
49
49
  tslib_1.__exportStar(require("./_models/interfaces/paged.interface"), exports);
50
50
  tslib_1.__exportStar(require("./_models/interfaces/random-weight.interface"), exports);
51
51
  tslib_1.__exportStar(require("./_models/interfaces/route-settings.interface"), exports);
52
+ tslib_1.__exportStar(require("./_models/interfaces/search-query.interface"), exports);
52
53
  tslib_1.__exportStar(require("./_models/interfaces/vector2.interface"), exports);
53
54
  // models/interfaces/ENVIRONMENT
54
55
  tslib_1.__exportStar(require("./_models/interfaces/environment/global-log-settings.interface"), exports);
55
56
  tslib_1.__exportStar(require("./_models/interfaces/environment/global-settings.interface"), exports);
57
+ // models/TYPES
58
+ tslib_1.__exportStar(require("./_models/types/db-filter.type"), exports);
59
+ tslib_1.__exportStar(require("./_models/types/db-sort.type"), exports);
56
60
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,cAAc;AACd,wBAAwB;AACxB,wFAA8D;AAC9D,yFAA+D;AAC/D,iFAAuD;AACvD,+EAAqD;AAErD,oBAAoB;AACpB,0EAAgD;AAChD,wEAA8C;AAC9C,+EAAqD;AACrD,2EAAiD;AACjD,yEAA+C;AAC/C,0FAAgE;AAChE,8EAAoD;AACpD,yEAA+C;AAE/C,yBAAyB;AACzB,oFAA0D;AAC1D,8EAAoD;AACpD,gFAAsD;AACtD,sFAA4D;AAC5D,iFAAuD;AAEvD,2BAA2B;AAC3B,yFAA+D;AAC/D,gFAAsD;AACtD,yFAA+D;AAG/D,QAAQ;AACR,4EAAkD;AAClD,wEAA8C;AAC9C,oEAA0C;AAC1C,kEAAwC;AAExC,aAAa;AACb,yEAA+C;AAC/C,mEAAyC;AACzC,2EAAiD;AAGjD,SAAS;AACT,wBAAwB;AACxB,mGAAyE;AACzE,sGAA4E;AAC5E,uFAA6D;AAC7D,sFAA4D;AAC5D,6FAAmE;AAEnE,qBAAqB;AACrB,oFAA0D;AAE1D,oBAAoB;AACpB,wFAA8D;AAC9D,+EAAqD;AACrD,uFAA6D;AAC7D,wFAA8D;AAC9D,iFAAuD;AAEvD,gCAAgC;AAChC,yGAA+E;AAC/E,qGAA2E"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,cAAc;AACd,wBAAwB;AACxB,wFAA8D;AAC9D,yFAA+D;AAC/D,iFAAuD;AACvD,+EAAqD;AAErD,oBAAoB;AACpB,0EAAgD;AAChD,wEAA8C;AAC9C,+EAAqD;AACrD,2EAAiD;AACjD,yEAA+C;AAC/C,0FAAgE;AAChE,8EAAoD;AACpD,yEAA+C;AAE/C,yBAAyB;AACzB,oFAA0D;AAC1D,8EAAoD;AACpD,gFAAsD;AACtD,sFAA4D;AAC5D,iFAAuD;AAEvD,2BAA2B;AAC3B,yFAA+D;AAC/D,gFAAsD;AACtD,yFAA+D;AAG/D,QAAQ;AACR,4EAAkD;AAClD,wEAA8C;AAC9C,oEAA0C;AAC1C,kEAAwC;AAExC,aAAa;AACb,yEAA+C;AAC/C,mEAAyC;AACzC,2EAAiD;AAGjD,SAAS;AACT,wBAAwB;AACxB,mGAAyE;AACzE,sGAA4E;AAC5E,uFAA6D;AAC7D,sFAA4D;AAC5D,6FAAmE;AAEnE,qBAAqB;AACrB,oFAA0D;AAE1D,oBAAoB;AACpB,wFAA8D;AAC9D,+EAAqD;AACrD,uFAA6D;AAC7D,wFAA8D;AAC9D,sFAA4D;AAC5D,iFAAuD;AAEvD,gCAAgC;AAChC,yGAA+E;AAC/E,qGAA2E;AAE3E,eAAe;AACf,yEAA+C;AAC/C,uEAA6C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@futdevpro/fsm-dynamo",
3
- "version": "01.09.40",
3
+ "version": "01.09.42",
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,6 +1,6 @@
1
1
 
2
- import { DyFM_Metadata } from '../data-models/metadata.data-model';
3
2
  import { DyFM_DataModel_Type } from '../../_enums/data-model-type.enum';
3
+ import { DyFM_Metadata } from '../data-models/metadata.data-model';
4
4
  import { DyFM_DataProperty_Params } from './data-property-params.control-model';
5
5
 
6
6
  export type DyFM_Data_S = DyFM_DataModel_Settings;
@@ -0,0 +1,10 @@
1
+
2
+ import { DyFM_DBFilter } from '../types/db-filter.type';
3
+ import { DyFM_DBSort } from '../types/db-sort.type';
4
+
5
+ export interface DyNTS_SearchQuery<T> {
6
+ filterBy?: DyFM_DBFilter<T>;
7
+ sortBy?: DyFM_DBSort<T>;
8
+ page?: number;
9
+ pageSize?: number;
10
+ }
@@ -0,0 +1,107 @@
1
+
2
+ /**
3
+ * @example
4
+ * // by email:
5
+ * { email: email }
6
+ * //
7
+ * @example
8
+ * // or by id that is in list:
9
+ * { userIds: { $in: this.userId } }
10
+ * //
11
+ * @example
12
+ * // or by number or Date that is Greater Than AND Less Than:
13
+ * { points: { $gt: 2, $lt: 14 } }
14
+ * // further tools (syntax matches with $gt):
15
+ * $eq: // Matches values that are EQual to a specified value.
16
+ * $gte: // Matches values that are Greater Than OR Equal to a specified value.
17
+ * $lte: // Matches values that are Less Than or Equal to a specified value.
18
+ * $ne: // Matches all values that are Not Equal to a specified value.
19
+ * $nin: // Matches None of the values specified IN an array.
20
+ * //
21
+ * @returns {T} data: T
22
+ */
23
+ export type DyFM_DBFilter<T> =
24
+ DyFM_DBFilterSimple<T> |
25
+ DyFM_DBFilterOR<T> |
26
+ DyFM_DBFilterNOR<T>;
27
+
28
+ /**
29
+ * A simple filter for a DynamoDB query.
30
+ */
31
+ export type DyFM_DBFilterSimple<T> = {
32
+ [K in keyof T]?: T[K] | DyFM_DBFilterExpressions<T[K] | boolean>;
33
+ } & {
34
+ [path: string]: any;
35
+ };
36
+
37
+ export type DyFM_DBFilterExpressions<T> = {
38
+ /**
39
+ * Matches values that are includes the value; This works only when T[K] is an array!
40
+ */
41
+ $in?: any,
42
+ /**
43
+ * Matches values that are EQual to a specified value.
44
+ */
45
+ $eq?: T,
46
+ /**
47
+ * Matches values that are Greater Than a specified value.
48
+ */
49
+ $gt?: number | Date,
50
+ /**
51
+ * Matches values that are Greater Than OR Equal to a specified value.
52
+ */
53
+ $gte?: number | Date,
54
+ /**
55
+ * Matches values that are Less Than a specified value.
56
+ */
57
+ $lt?: number | Date,
58
+ /**
59
+ * Matches values that are Less Than or Equal to a specified value.
60
+ */
61
+ $lte?: number | Date,
62
+ /**
63
+ * Matches all values that are Not Equal to a specified value.
64
+ */
65
+ $ne?: T,
66
+ /**
67
+ * Matches None of the values specified IN an array.
68
+ */
69
+ $nin?: T,
70
+ /**
71
+ * Inverts the effect of a query expression and returns documents that do not match the query expression.
72
+ */
73
+ $not?: T | {
74
+ $regex?: RegExp | string,
75
+ },
76
+ /**
77
+ * Performs a regular expression on the field's value, and selects documents that match the regular expression.
78
+ */
79
+ $exists?: boolean,
80
+ /**
81
+ * Selects documents if a field is of the specified type.
82
+ */
83
+ $type?: string,
84
+ };
85
+
86
+
87
+ /**
88
+ * Joins query clauses with a logical AND returns all documents that match the conditions of both clauses.
89
+ */
90
+ export type DyFM_DBFilterNOR<T> = {
91
+ /**
92
+ * Joins query clauses with a logical NOR returns all documents that fail to match both clauses.
93
+ */
94
+ $nor: DyFM_DBFilterSimple<T>[];
95
+ }
96
+
97
+ /**
98
+ * Joins query clauses with a logical AND returns all documents that match the conditions of both clauses.
99
+ */
100
+ export type DyFM_DBFilterOR<T> = {
101
+ /**
102
+ * Joins query clauses with a logical OR returns all documents that match the conditions of either clause.
103
+ */
104
+ $or: DyFM_DBFilterSimple<T>[];
105
+ }
106
+
107
+
@@ -0,0 +1,5 @@
1
+
2
+
3
+ export type DyFM_DBSort<T> = {
4
+ [K in keyof T]?: 1 | -1 | 'asc' | 'desc' | 'ascending' | 'descending';
5
+ }
package/src/index.ts CHANGED
@@ -57,9 +57,14 @@ export * from './_models/interfaces/error-defaults.interface';
57
57
  export * from './_models/interfaces/paged.interface';
58
58
  export * from './_models/interfaces/random-weight.interface';
59
59
  export * from './_models/interfaces/route-settings.interface';
60
+ export * from './_models/interfaces/search-query.interface';
60
61
  export * from './_models/interfaces/vector2.interface';
61
62
 
62
63
  // models/interfaces/ENVIRONMENT
63
64
  export * from './_models/interfaces/environment/global-log-settings.interface';
64
65
  export * from './_models/interfaces/environment/global-settings.interface';
65
66
 
67
+ // models/TYPES
68
+ export * from './_models/types/db-filter.type';
69
+ export * from './_models/types/db-sort.type';
70
+
package/tsconfig.json CHANGED
@@ -26,6 +26,6 @@
26
26
  },
27
27
  "include": [
28
28
  "src",
29
- "src/**/assets/*"
29
+ "src/**/assets/*"
30
30
  ]
31
31
  }
Binary file