@futdevpro/fsm-dynamo 1.0.2 → 1.0.5

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 (38) hide show
  1. package/data-models.d.ts +2 -0
  2. package/data-models.js +7 -0
  3. package/data-models.js.map +1 -0
  4. package/futdevpro-fsm-dynamo-1.0.5.tgz +0 -0
  5. package/lib/_constants/module-settings/test-module-settings.js +16 -0
  6. package/lib/_constants/module-settings/test-module-settings.js.map +1 -0
  7. package/lib/_constants/module-settings/usage-module-settings.js +13 -0
  8. package/lib/_constants/module-settings/usage-module-settings.js.map +1 -0
  9. package/lib/_constants/times.js +11 -0
  10. package/lib/_constants/times.js.map +1 -0
  11. package/lib/_models/control-models/daily-usage-data.js +22 -0
  12. package/lib/_models/control-models/daily-usage-data.js.map +1 -0
  13. package/lib/_models/control-models/dynamo-module-settings.js +3 -0
  14. package/lib/_models/control-models/dynamo-module-settings.js.map +1 -0
  15. package/lib/_models/control-models/dynamobe-data-params.js +12 -0
  16. package/lib/_models/control-models/dynamobe-data-params.js.map +1 -0
  17. package/lib/_models/control-models/dynamobe-data-property-params.js +68 -0
  18. package/lib/_models/control-models/dynamobe-data-property-params.js.map +1 -0
  19. package/lib/_models/control-models/dynamobe-error.js +188 -0
  20. package/lib/_models/control-models/dynamobe-error.js.map +1 -0
  21. package/lib/_models/control-models/geo-ip-location.js +3 -0
  22. package/lib/_models/control-models/geo-ip-location.js.map +1 -0
  23. package/lib/_models/control-models/location-coordinates.js +3 -0
  24. package/lib/_models/control-models/location-coordinates.js.map +1 -0
  25. package/lib/_models/control-models/usage-action.js +13 -0
  26. package/lib/_models/control-models/usage-action.js.map +1 -0
  27. package/lib/_models/control-models/usage-data.js +16 -0
  28. package/lib/_models/control-models/usage-data.js.map +1 -0
  29. package/lib/_models/data-models/custom-data.js +28 -0
  30. package/lib/_models/data-models/custom-data.js.map +1 -0
  31. package/lib/_models/data-models/metadata.js +17 -0
  32. package/lib/_models/data-models/metadata.js.map +1 -0
  33. package/lib/_models/data-models/usage-session.js +53 -0
  34. package/lib/_models/data-models/usage-session.js.map +1 -0
  35. package/package.json +28 -14
  36. package/public-api.js +23 -0
  37. package/public-api.js.map +1 -0
  38. package/futdevpro-fsm-dynamo-1.0.2.tgz +0 -0
@@ -0,0 +1,2 @@
1
+ export * from './lib/_models/data-models/metadata';
2
+ export * from './lib/_models/control-models/dynamobe-data-params';
package/data-models.js ADDED
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ // DATA MODELS
5
+ tslib_1.__exportStar(require("./lib/_models/data-models/metadata"), exports);
6
+ tslib_1.__exportStar(require("./lib/_models/control-models/dynamobe-data-params"), exports);
7
+ //# sourceMappingURL=data-models.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-models.js","sourceRoot":"","sources":["../../../projects/futdevpro/fsm-dynamo/src/data-models.ts"],"names":[],"mappings":";;;AACA,cAAc;AACd,6EAAmD;AACnD,4FAAkE","sourcesContent":["\r\n// DATA MODELS\r\nexport * from './lib/_models/data-models/metadata';\r\nexport * from './lib/_models/control-models/dynamobe-data-params';\r\n\r\n\r\n"]}
Binary file
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.testModuleSettings = void 0;
4
+ exports.testModuleSettings = {
5
+ mainRoute: '/test',
6
+ endPoints: {
7
+ testGet: '/test-get',
8
+ testPost: '/test-post',
9
+ testPut: '/test-put',
10
+ testPatch: '/test-patch',
11
+ testDelete: '/test-delete',
12
+ getCustomData: '/custom/get/:customId',
13
+ modifyCustomData: '/custom/post'
14
+ }
15
+ };
16
+ //# sourceMappingURL=test-module-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-module-settings.js","sourceRoot":"","sources":["../../../../../../projects/futdevpro/fsm-dynamo/src/lib/_constants/module-settings/test-module-settings.ts"],"names":[],"mappings":";;;AAGa,QAAA,kBAAkB,GAAyB;IACtD,SAAS,EAAE,OAAO;IAClB,SAAS,EAAE;QACT,OAAO,EAAE,WAAW;QACpB,QAAQ,EAAE,YAAY;QACtB,OAAO,EAAE,WAAW;QACpB,SAAS,EAAE,aAAa;QACxB,UAAU,EAAE,cAAc;QAC1B,aAAa,EAAE,uBAAuB;QACtC,gBAAgB,EAAE,cAAc;KACjC;CACF,CAAC","sourcesContent":["\r\nimport { DynamoModuleSettings } from '../../_models/control-models/dynamo-module-settings';\r\n\r\nexport const testModuleSettings: DynamoModuleSettings = {\r\n mainRoute: '/test',\r\n endPoints: {\r\n testGet: '/test-get',\r\n testPost: '/test-post',\r\n testPut: '/test-put',\r\n testPatch: '/test-patch',\r\n testDelete: '/test-delete',\r\n getCustomData: '/custom/get/:customId',\r\n modifyCustomData: '/custom/post'\r\n }\r\n};\r\n"]}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.usageModuleSettings = void 0;
4
+ exports.usageModuleSettings = {
5
+ mainRoute: '/usage',
6
+ endPoints: {
7
+ newSession: '/new-session',
8
+ closeSession: '/close-session/:sessionId',
9
+ updateUsage: '/update/:sessionId',
10
+ getAllUsageData: '/get/all',
11
+ }
12
+ };
13
+ //# sourceMappingURL=usage-module-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage-module-settings.js","sourceRoot":"","sources":["../../../../../../projects/futdevpro/fsm-dynamo/src/lib/_constants/module-settings/usage-module-settings.ts"],"names":[],"mappings":";;;AAGa,QAAA,mBAAmB,GAAyB;IACvD,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE;QACT,UAAU,EAAE,cAAc;QAC1B,YAAY,EAAE,2BAA2B;QACzC,WAAW,EAAG,oBAAoB;QAClC,eAAe,EAAE,UAAU;KAC5B;CACF,CAAC","sourcesContent":["\r\nimport { DynamoModuleSettings } from '../../_models/control-models/dynamo-module-settings';\r\n\r\nexport const usageModuleSettings: DynamoModuleSettings = {\r\n mainRoute: '/usage',\r\n endPoints: {\r\n newSession: '/new-session',\r\n closeSession: '/close-session/:sessionId',\r\n updateUsage: '/update/:sessionId',\r\n getAllUsageData: '/get/all',\r\n }\r\n};\r\n"]}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.year = exports.month = exports.week = exports.day = exports.hour = exports.minute = exports.second = void 0;
4
+ exports.second = 1000;
5
+ exports.minute = exports.second * 60;
6
+ exports.hour = exports.minute * 60;
7
+ exports.day = exports.hour * 24;
8
+ exports.week = exports.day * 7;
9
+ exports.month = exports.day * 30.4368499;
10
+ exports.year = exports.day * 365.242199;
11
+ //# sourceMappingURL=times.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"times.js","sourceRoot":"","sources":["../../../../../projects/futdevpro/fsm-dynamo/src/lib/_constants/times.ts"],"names":[],"mappings":";;;AACa,QAAA,MAAM,GAAG,IAAI,CAAC;AACd,QAAA,MAAM,GAAG,cAAM,GAAG,EAAE,CAAC;AACrB,QAAA,IAAI,GAAG,cAAM,GAAG,EAAE,CAAC;AACnB,QAAA,GAAG,GAAG,YAAI,GAAG,EAAE,CAAC;AAChB,QAAA,IAAI,GAAG,WAAG,GAAG,CAAC,CAAC;AACf,QAAA,KAAK,GAAG,WAAG,GAAG,UAAU,CAAC;AACzB,QAAA,IAAI,GAAG,WAAG,GAAG,UAAU,CAAC","sourcesContent":["\r\nexport const second = 1000;\r\nexport const minute = second * 60;\r\nexport const hour = minute * 60;\r\nexport const day = hour * 24;\r\nexport const week = day * 7;\r\nexport const month = day * 30.4368499;\r\nexport const year = day * 365.242199;\r\n"]}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DailyUsageData = void 0;
4
+ class DailyUsageData {
5
+ constructor(set) {
6
+ this.totalVisitTime = 0;
7
+ this.averageVisitTime = 0;
8
+ this.visitorsHun = 0;
9
+ this.visitorsElse = 0;
10
+ this.visitations = [];
11
+ if (set) {
12
+ this.date = set.date;
13
+ this.totalVisitTime = set.totalVisitTime ? set.totalVisitTime : 0;
14
+ this.averageVisitTime = set.averageVisitTime ? set.averageVisitTime : 0;
15
+ this.visitorsHun = set.visitorsHun ? set.visitorsHun : 0;
16
+ this.visitorsElse = set.visitorsElse ? set.visitorsElse : 0;
17
+ this.visitations = set.visitations ? set.visitations : [];
18
+ }
19
+ }
20
+ }
21
+ exports.DailyUsageData = DailyUsageData;
22
+ //# sourceMappingURL=daily-usage-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"daily-usage-data.js","sourceRoot":"","sources":["../../../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/control-models/daily-usage-data.ts"],"names":[],"mappings":";;;AAGA,MAAa,cAAc;IASzB,YACE,GAQC;QAhBH,mBAAc,GAAY,CAAC,CAAC;QAC5B,qBAAgB,GAAY,CAAC,CAAC;QAC9B,gBAAW,GAAY,CAAC,CAAC;QACzB,iBAAY,GAAY,CAAC,CAAC;QAE1B,gBAAW,GAA0B,EAAE,CAAC;QAatC,IAAI,GAAG,EAAE;YACP,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;YACrB,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;YAClE,IAAI,CAAC,gBAAgB,GAAG,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;YACxE,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;YACzD,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;YAE5D,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;SAC3D;IACH,CAAC;CACF;AA9BD,wCA8BC","sourcesContent":["\r\nimport { DynamoUsageSession } from \"../data-models/usage-session\";\r\n\r\nexport class DailyUsageData {\r\n date?: string;\r\n totalVisitTime?: number = 0;\r\n averageVisitTime?: number = 0;\r\n visitorsHun?: number = 0;\r\n visitorsElse?: number = 0;\r\n\r\n visitations?: DynamoUsageSession[] = [];\r\n\r\n constructor(\r\n set?: {\r\n date?: string,\r\n totalVisitTime?: number,\r\n averageVisitTime?: number,\r\n visitorsHun?: number,\r\n visitorsElse?: number,\r\n\r\n visitations?: DynamoUsageSession[],\r\n }\r\n ) {\r\n if (set) {\r\n this.date = set.date;\r\n this.totalVisitTime = set.totalVisitTime ? set.totalVisitTime : 0;\r\n this.averageVisitTime = set.averageVisitTime ? set.averageVisitTime : 0;\r\n this.visitorsHun = set.visitorsHun ? set.visitorsHun : 0;\r\n this.visitorsElse = set.visitorsElse ? set.visitorsElse : 0;\r\n\r\n this.visitations = set.visitations ? set.visitations : [];\r\n }\r\n }\r\n}\r\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=dynamo-module-settings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamo-module-settings.js","sourceRoot":"","sources":["../../../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/control-models/dynamo-module-settings.ts"],"names":[],"mappings":"","sourcesContent":["\r\nexport interface DynamoModuleSettings {\r\n mainRoute: string;\r\n\r\n endPoints: {\r\n [endpoint: string]: string\r\n };\r\n}\r\n"]}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DynamoBEDataParams = void 0;
4
+ class DynamoBEDataParams {
5
+ constructor(set) {
6
+ this.dataName = set.dataName;
7
+ this.dbName = set.dataName.charAt(0).toUpperCase() + set.dataName.slice(1);
8
+ this.modelParams = set.modelParams ? set.modelParams : [];
9
+ }
10
+ }
11
+ exports.DynamoBEDataParams = DynamoBEDataParams;
12
+ //# sourceMappingURL=dynamobe-data-params.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamobe-data-params.js","sourceRoot":"","sources":["../../../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/control-models/dynamobe-data-params.ts"],"names":[],"mappings":";;;AAGA,MAAa,kBAAkB;IAK7B,YACE,GAGC;QAED,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;QAC7B,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC3E,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5D,CAAC;CACF;AAfD,gDAeC","sourcesContent":["\r\nimport { DynamoBEDataPropertyParams } from './dynamobe-data-property-params';\r\n\r\nexport class DynamoBEDataParams {\r\n dataName: string;\r\n dbName: string;\r\n modelParams: DynamoBEDataPropertyParams[];\r\n\r\n constructor(\r\n set: {\r\n dataName: string,\r\n modelParams: DynamoBEDataPropertyParams[],\r\n }\r\n ) {\r\n this.dataName = set.dataName;\r\n this.dbName = set.dataName.charAt(0).toUpperCase() + set.dataName.slice(1);\r\n this.modelParams = set.modelParams ? set.modelParams : [];\r\n }\r\n}\r\n"]}
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DynamoBEDataPropertyParams = void 0;
4
+ const dynamobe_error_1 = require("./dynamobe-error");
5
+ class DynamoBEDataPropertyParams {
6
+ constructor(set) {
7
+ this.subObjectParams = [];
8
+ if (set) {
9
+ this.key = set.key;
10
+ this.type = set.type;
11
+ if (this.getBEType) {
12
+ if (set === null || set === void 0 ? void 0 : set.subObjectParams) {
13
+ this.subObjectParams = set.subObjectParams;
14
+ }
15
+ else {
16
+ console.log('DYNAMO ERROR: \n subObjectParams missing', '\n\n', new Error());
17
+ throw new dynamobe_error_1.DynamoBEError({ message: 'subObjectParams missing' });
18
+ }
19
+ }
20
+ if (set.isDependencyHook) {
21
+ if (set.dependencyDBServiceName) {
22
+ this.isDependencyHook = set.isDependencyHook;
23
+ this.dependencyName = set.dependencyDBServiceName;
24
+ }
25
+ else {
26
+ this.isDependencyHook = set.isDependencyHook;
27
+ console.log('DYNAMO ERROR: \n dependencyDBServiceName missing for dependencyHook', '\n\n', new Error());
28
+ }
29
+ }
30
+ this.unique = set.unique;
31
+ this.required = set.required;
32
+ this.index = set.index;
33
+ this.minlength = set.minlength;
34
+ this.maxlength = set.maxlength;
35
+ this.additionalValidators = set.additionalValidators;
36
+ }
37
+ else {
38
+ console.log('DYNAMO ERROR: \nMISSING DynamoBEDataPropertyParams constructor input', '\n\n', new Error());
39
+ }
40
+ }
41
+ // tslint:disable-next-line: ban-types
42
+ getBEType() {
43
+ var _a, _b, _c;
44
+ switch (this.type) {
45
+ case 'string':
46
+ return String;
47
+ case 'number':
48
+ return Number;
49
+ case 'boolean':
50
+ return Boolean;
51
+ case 'Date':
52
+ return Date;
53
+ case 'object':
54
+ default:
55
+ if ((_a = this.type) === null || _a === void 0 ? void 0 : _a.includes('[]')) {
56
+ return Array;
57
+ }
58
+ else if (((_b = this.type) === null || _b === void 0 ? void 0 : _b.includes('=>')) || ((_c = this.type) === null || _c === void 0 ? void 0 : _c.includes('function'))) {
59
+ return Function;
60
+ }
61
+ else {
62
+ return Object;
63
+ }
64
+ }
65
+ }
66
+ }
67
+ exports.DynamoBEDataPropertyParams = DynamoBEDataPropertyParams;
68
+ //# sourceMappingURL=dynamobe-data-property-params.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamobe-data-property-params.js","sourceRoot":"","sources":["../../../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/control-models/dynamobe-data-property-params.ts"],"names":[],"mappings":";;;AACA,qDAAiD;AAEjD,MAAa,0BAA0B;IAkBrC,YACE,GAiBC;QAtBH,oBAAe,GAAkC,EAAE,CAAC;QAwBlD,IAAI,GAAG,EAAE;YACP,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;YACnB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;YAErB,IAAI,IAAI,CAAC,SAAS,EAAE;gBAClB,IAAI,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,eAAe,EAAE;oBACxB,IAAI,CAAC,eAAe,GAAG,GAAG,CAAC,eAAe,CAAC;iBAC5C;qBAAM;oBACL,OAAO,CAAC,GAAG,CAAC,0CAA0C,EAAE,MAAM,EAAE,IAAI,KAAK,EAAE,CAAC,CAAC;oBAC7E,MAAM,IAAI,8BAAa,CAAC,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC,CAAC;iBACjE;aACF;YAED,IAAI,GAAG,CAAC,gBAAgB,EAAE;gBACxB,IAAI,GAAG,CAAC,uBAAuB,EAAE;oBAC/B,IAAI,CAAC,gBAAgB,GAAG,GAAG,CAAC,gBAAgB,CAAC;oBAC7C,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,uBAAuB,CAAC;iBACnD;qBAAM;oBACL,IAAI,CAAC,gBAAgB,GAAG,GAAG,CAAC,gBAAgB,CAAC;oBAC7C,OAAO,CAAC,GAAG,CAAC,qEAAqE,EAAE,MAAM,EAAE,IAAI,KAAK,EAAE,CAAC,CAAC;iBACzG;aACF;YACD,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;YACzB,IAAI,CAAC,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;YAC7B,IAAI,CAAC,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;YACvB,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;YAC/B,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;YAC/B,IAAI,CAAC,oBAAoB,GAAG,GAAG,CAAC,oBAAoB,CAAC;SACtD;aAAM;YACL,OAAO,CAAC,GAAG,CAAC,sEAAsE,EAAE,MAAM,EAAE,IAAI,KAAK,EAAE,CAAC,CAAC;SAC1G;IACH,CAAC;IAED,sCAAsC;IACtC,SAAS;;QACP,QAAQ,IAAI,CAAC,IAAI,EAAE;YACjB,KAAK,QAAQ;gBACX,OAAO,MAAM,CAAC;YAChB,KAAK,QAAQ;gBACX,OAAO,MAAM,CAAC;YAChB,KAAK,SAAS;gBACZ,OAAO,OAAO,CAAC;YACjB,KAAK,MAAM;gBACT,OAAO,IAAI,CAAC;YACd,KAAK,QAAQ,CAAC;YACd;gBACE,IAAI,MAAA,IAAI,CAAC,IAAI,0CAAE,QAAQ,CAAC,IAAI,CAAC,EAAE;oBAC7B,OAAO,KAAK,CAAC;iBACd;qBAAM,IAAI,CAAA,MAAA,IAAI,CAAC,IAAI,0CAAE,QAAQ,CAAC,IAAI,CAAC,MAAI,MAAA,IAAI,CAAC,IAAI,0CAAE,QAAQ,CAAC,UAAU,CAAC,CAAA,EAAE;oBACvE,OAAO,QAAQ,CAAC;iBACjB;qBAAM;oBACL,OAAO,MAAM,CAAC;iBACf;SACJ;IACH,CAAC;CACF;AA7FD,gEA6FC","sourcesContent":["\r\nimport { DynamoBEError } from './dynamobe-error';\r\n\r\nexport class DynamoBEDataPropertyParams {\r\n key?: string;\r\n type?: 'string' | 'number' | 'boolean' | 'Date' | 'object' | string;\r\n\r\n unique?: boolean;\r\n required?: boolean;\r\n index?: boolean;\r\n\r\n isDependencyHook?: boolean;\r\n dependencyName?: string;\r\n\r\n minlength?: number;\r\n maxlength?: number;\r\n\r\n subObjectParams?: DynamoBEDataPropertyParams[] = [];\r\n\r\n additionalValidators?: ((data: any) => void)[];\r\n\r\n constructor(\r\n set: {\r\n key: string,\r\n type: 'string' | 'number' | 'boolean' | 'Date' | 'object' | string,\r\n\r\n unique?: boolean,\r\n required?: boolean,\r\n index?: boolean,\r\n\r\n isDependencyHook?: boolean,\r\n dependencyDBServiceName?: string,\r\n\r\n minlength?: number,\r\n maxlength?: number,\r\n\r\n subObjectParams?: DynamoBEDataPropertyParams[],\r\n\r\n additionalValidators?: ((data: any) => void)[],\r\n }\r\n ) {\r\n if (set) {\r\n this.key = set.key;\r\n this.type = set.type;\r\n\r\n if (this.getBEType) {\r\n if (set?.subObjectParams) {\r\n this.subObjectParams = set.subObjectParams;\r\n } else {\r\n console.log('DYNAMO ERROR: \\n subObjectParams missing', '\\n\\n', new Error());\r\n throw new DynamoBEError({ message: 'subObjectParams missing' });\r\n }\r\n }\r\n\r\n if (set.isDependencyHook) {\r\n if (set.dependencyDBServiceName) {\r\n this.isDependencyHook = set.isDependencyHook;\r\n this.dependencyName = set.dependencyDBServiceName;\r\n } else {\r\n this.isDependencyHook = set.isDependencyHook;\r\n console.log('DYNAMO ERROR: \\n dependencyDBServiceName missing for dependencyHook', '\\n\\n', new Error());\r\n }\r\n }\r\n this.unique = set.unique;\r\n this.required = set.required;\r\n this.index = set.index;\r\n this.minlength = set.minlength;\r\n this.maxlength = set.maxlength;\r\n this.additionalValidators = set.additionalValidators;\r\n } else {\r\n console.log('DYNAMO ERROR: \\nMISSING DynamoBEDataPropertyParams constructor input', '\\n\\n', new Error());\r\n }\r\n }\r\n\r\n // tslint:disable-next-line: ban-types\r\n getBEType?(): String | Number | Boolean | Object | Function | Array<any> | Date {\r\n switch (this.type) {\r\n case 'string':\r\n return String;\r\n case 'number':\r\n return Number;\r\n case 'boolean':\r\n return Boolean;\r\n case 'Date':\r\n return Date;\r\n case 'object':\r\n default:\r\n if (this.type?.includes('[]')) {\r\n return Array;\r\n } else if (this.type?.includes('=>') || this.type?.includes('function')) {\r\n return Function;\r\n } else {\r\n return Object;\r\n }\r\n }\r\n }\r\n}\r\n"]}
@@ -0,0 +1,188 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DynamoBEError = void 0;
4
+ class DynamoBEError {
5
+ constructor(set) {
6
+ var _a, _b, _c, _d, _e, _f, _g;
7
+ this.flag = 'DYNAMO-BE ERROR OBJECT';
8
+ this.errors = [];
9
+ this.messages = [];
10
+ this.userMessages = [];
11
+ this.handled = !!set.handled;
12
+ if (set.status) {
13
+ this.status = set.status;
14
+ }
15
+ this.status = ((_a = set === null || set === void 0 ? void 0 : set.error) === null || _a === void 0 ? void 0 : _a.status) ? set.error.status : set.status;
16
+ if ((_b = set === null || set === void 0 ? void 0 : set.error) === null || _b === void 0 ? void 0 : _b.errors) {
17
+ this.errors = this.errors.concat((_c = set === null || set === void 0 ? void 0 : set.error) === null || _c === void 0 ? void 0 : _c.errors);
18
+ }
19
+ if ((_d = set === null || set === void 0 ? void 0 : set.error) === null || _d === void 0 ? void 0 : _d.messages) {
20
+ this.messages = this.messages.concat((_e = set === null || set === void 0 ? void 0 : set.error) === null || _e === void 0 ? void 0 : _e.messages);
21
+ }
22
+ if ((_f = set === null || set === void 0 ? void 0 : set.error) === null || _f === void 0 ? void 0 : _f.userMessages) {
23
+ this.userMessages = this.userMessages.concat((_g = set === null || set === void 0 ? void 0 : set.error) === null || _g === void 0 ? void 0 : _g.userMessages);
24
+ }
25
+ if (set.error) {
26
+ if (set.error instanceof DynamoBEError) {
27
+ this.errors.push(set.error.error);
28
+ }
29
+ else {
30
+ if (set.error.error) {
31
+ this.errors.push(set.error.error);
32
+ }
33
+ this.errors.push(set.error);
34
+ }
35
+ if (set.error.message) {
36
+ this.messages.push(set.error.message);
37
+ }
38
+ if (set.error.status) {
39
+ this.status = set.error.status;
40
+ }
41
+ }
42
+ if (set.message) {
43
+ this.messages.push(set.message);
44
+ }
45
+ if (set.messages) {
46
+ this.messages.push(...set.messages);
47
+ }
48
+ if (set.userMessage) {
49
+ this.userMessages.push(set.userMessage);
50
+ }
51
+ if (set.consoleLog) {
52
+ console.log(this);
53
+ }
54
+ }
55
+ }
56
+ exports.DynamoBEError = DynamoBEError;
57
+ /*
58
+
59
+ // //
60
+ // RESPONSE STATUS //
61
+ // //
62
+
63
+ 1XX informational response
64
+
65
+ 100 Continue
66
+ 101 Switching Protocols
67
+ 102 Processing
68
+ 103 Early Hints
69
+
70
+
71
+ 2XX success
72
+
73
+ 200 OK
74
+ 201 Created
75
+ 202 Accepted
76
+ 203 Non-Authoritative Information
77
+ 204 No Content
78
+ 205 Reset Content
79
+ 206 Partial Content
80
+ 207 Multi-Status
81
+ 208 Already Reported
82
+ 226 IM Used
83
+
84
+
85
+ 3XX redirection
86
+
87
+ 300 Multiple Choices
88
+ 301 Moved Permanently
89
+ 302 Found
90
+ 303 See Other
91
+ 304 Not Modified
92
+ 305 Use Proxy
93
+ 306 Switch Proxy
94
+ 307 Temporary Redirect
95
+ 308 Permanent Redirect
96
+
97
+
98
+ 4XX client errors
99
+
100
+ 400 Bad Request
101
+ 401 Unauthorized
102
+ 402 Payment Required
103
+ 403 Forbidden
104
+ 404 Not Found
105
+ 405 Method Not Allowed
106
+ 406 Not Acceptable
107
+ 407 Proxy Authentication Required
108
+ 408 Request Timeout
109
+ 409 Conflict
110
+ 410 Gone
111
+ 411 Length Required
112
+ 412 Precondition Failed
113
+ 413 Payload Too Large
114
+ 414 URI Too Long
115
+ 415 Unsupported Media Type
116
+ 416 Range Not Satisfiable
117
+ 417 Expectation Failed
118
+ 418 I'm a teapot
119
+ 421 Misdirected Request
120
+ 422 Unprocessable Entity
121
+ 423 Locked
122
+ 424 Failed Dependency
123
+ 425 Too Early
124
+ 426 Upgrade Required
125
+ 428 Precondition Required
126
+ 429 Too Many Requests
127
+ 431 Request Header Fields Too Large
128
+ 451 Unavailable For Legal Reasons
129
+
130
+
131
+ 5XX server errors
132
+
133
+ 500 Internal Server Error
134
+ 501 Not Implemented
135
+ 502 Bad Gateway
136
+ 503 Service Unavailable
137
+ 504 Gateway Timeout
138
+ 505 HTTP Version Not Supported
139
+ 506 Variant Also Negotiates
140
+ 507 Insufficient Storage
141
+ 508 Loop Detected
142
+ 510 Not Extended
143
+ 511 Network Authentication Required
144
+
145
+
146
+ Unofficial codes
147
+
148
+ 103 Checkpoint
149
+ 218 This is fine (Apache Web Server)
150
+ 419 Page Expired (Laravel Framework)
151
+ 420 Enhance Your Calm (Twitter)
152
+ 430 Request Header Fields Too Large (Shopify)
153
+ 450 Blocked by Windows Parental Controls (Microsoft)
154
+ 498 Invalid Token (Esri)
155
+ 499 Token Required (Esri)
156
+ 509 Bandwidth Limit Exceeded (Apache Web Server/cPanel)
157
+ 526 Invalid SSL Certificate
158
+ 529 Site is overloaded
159
+ 530 Site is frozen
160
+ 598 (Informal convention) Network read timeout error
161
+
162
+ 440 Login Time-out
163
+ 449 Retry With
164
+ 451 Redirect
165
+
166
+ 444 No Response
167
+ 494 Request header too large
168
+ 495 SSL Certificate Error
169
+ 496 SSL Certificate Required
170
+ 497 HTTP Request Sent to HTTPS Port
171
+ 499 Client Closed Request
172
+
173
+ 520 Web Server Returned an Unknown Error
174
+ 521 Web Server Is Down
175
+ 522 Connection Timed Out
176
+ 523 Origin Is Unreachable
177
+ 524 A Timeout Occurred
178
+ 525 SSL Handshake Failed
179
+ 526 Invalid SSL Certificate
180
+ 527 Railgun Error
181
+
182
+ 530
183
+
184
+ 460
185
+ 463
186
+
187
+ */
188
+ //# sourceMappingURL=dynamobe-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dynamobe-error.js","sourceRoot":"","sources":["../../../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/control-models/dynamobe-error.ts"],"names":[],"mappings":";;;AAEA,MAAa,aAAa;IASxB,YACE,GAQC;;QAjBH,SAAI,GAAG,wBAAwB,CAAC;QAGhC,WAAM,GAAU,EAAE,CAAC;QAEnB,aAAQ,GAAa,EAAE,CAAC;QACxB,i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[] = [];\r\n error: any;\r\n messages: string[] = [];\r\n userMessages: string[] = [];\r\n\r\n constructor(\r\n set: {\r\n handled?: boolean;\r\n status?: number,\r\n message?: string,\r\n messages?: string[],\r\n userMessage?: string,\r\n error?: any,\r\n consoleLog?: boolean,\r\n }\r\n ) {\r\n this.handled = !!set.handled;\r\n if (set.status) {\r\n this.status = set.status;\r\n }\r\n this.status = set?.error?.status ? set.error.status : set.status;\r\n\r\n if (set?.error?.errors) {\r\n this.errors = this.errors.concat(set?.error?.errors);\r\n }\r\n if (set?.error?.messages) {\r\n this.messages = this.messages.concat(set?.error?.messages);\r\n }\r\n if (set?.error?.userMessages) {\r\n this.userMessages = this.userMessages.concat(set?.error?.userMessages);\r\n }\r\n\r\n if (set.error) {\r\n if (set.error instanceof DynamoBEError) {\r\n this.errors.push(set.error.error);\r\n } else {\r\n if (set.error.error) {\r\n this.errors.push(set.error.error);\r\n }\r\n this.errors.push(set.error);\r\n }\r\n if (set.error.message) {\r\n this.messages.push(set.error.message);\r\n }\r\n if (set.error.status) {\r\n this.status = set.error.status;\r\n }\r\n }\r\n if (set.message) {\r\n this.messages.push(set.message)\r\n }\r\n if (set.messages) {\r\n this.messages.push(...set.messages)\r\n }\r\n if (set.userMessage) {\r\n this.userMessages.push(set.userMessage)\r\n }\r\n if (set.consoleLog) {\r\n console.log(this);\r\n }\r\n }\r\n}\r\n\r\n/*\r\n\r\n// //\r\n// RESPONSE STATUS //\r\n// //\r\n\r\n1XX informational response\r\n\r\n 100 Continue\r\n 101 Switching Protocols\r\n 102 Processing\r\n 103 Early Hints\r\n\r\n\r\n2XX success\r\n\r\n 200 OK\r\n 201 Created\r\n 202 Accepted\r\n 203 Non-Authoritative Information\r\n 204 No Content\r\n 205 Reset Content\r\n 206 Partial Content \r\n 207 Multi-Status\r\n 208 Already Reported\r\n 226 IM Used\r\n\r\n \r\n3XX redirection\r\n\r\n 300 Multiple Choices\r\n 301 Moved Permanently\r\n 302 Found\r\n 303 See Other\r\n 304 Not Modified\r\n 305 Use Proxy\r\n 306 Switch Proxy\r\n 307 Temporary Redirect\r\n 308 Permanent Redirect\r\n\r\n\r\n4XX client errors\r\n\r\n 400 Bad Request\r\n 401 Unauthorized\r\n 402 Payment Required\r\n 403 Forbidden\r\n 404 Not Found\r\n 405 Method Not Allowed\r\n 406 Not Acceptable\r\n 407 Proxy Authentication Required\r\n 408 Request Timeout\r\n 409 Conflict\r\n 410 Gone\r\n 411 Length Required\r\n 412 Precondition Failed\r\n 413 Payload Too Large \r\n 414 URI Too Long\r\n 415 Unsupported Media Type\r\n 416 Range Not Satisfiable\r\n 417 Expectation Failed\r\n 418 I'm a teapot\r\n 421 Misdirected Request\r\n 422 Unprocessable Entity\r\n 423 Locked\r\n 424 Failed Dependency\r\n 425 Too Early\r\n 426 Upgrade Required\r\n 428 Precondition Required\r\n 429 Too Many Requests\r\n 431 Request Header Fields Too Large\r\n 451 Unavailable For Legal Reasons\r\n\r\n\r\n5XX server errors\r\n\r\n 500 Internal Server Error\r\n 501 Not Implemented\r\n 502 Bad Gateway\r\n 503 Service Unavailable\r\n 504 Gateway Timeout\r\n 505 HTTP Version Not Supported\r\n 506 Variant Also Negotiates\r\n 507 Insufficient Storage\r\n 508 Loop Detected \r\n 510 Not Extended\r\n 511 Network Authentication Required\r\n\r\n\r\nUnofficial codes\r\n\r\n 103 Checkpoint\r\n 218 This is fine (Apache Web Server)\r\n 419 Page Expired (Laravel Framework)\r\n 420 Enhance Your Calm (Twitter)\r\n 430 Request Header Fields Too Large (Shopify)\r\n 450 Blocked by Windows Parental Controls (Microsoft)\r\n 498 Invalid Token (Esri)\r\n 499 Token Required (Esri)\r\n 509 Bandwidth Limit Exceeded (Apache Web Server/cPanel)\r\n 526 Invalid SSL Certificate\r\n 529 Site is overloaded\r\n 530 Site is frozen\r\n 598 (Informal convention) Network read timeout error\r\n\r\n 440 Login Time-out\r\n 449 Retry With\r\n 451 Redirect\r\n\r\n 444 No Response\r\n 494 Request header too large\r\n 495 SSL Certificate Error\r\n 496 SSL Certificate Required\r\n 497 HTTP Request Sent to HTTPS Port\r\n 499 Client Closed Request\r\n\r\n 520 Web Server Returned an Unknown Error\r\n 521 Web Server Is Down\r\n 522 Connection Timed Out\r\n 523 Origin Is Unreachable\r\n 524 A Timeout Occurred\r\n 525 SSL Handshake Failed\r\n 526 Invalid SSL Certificate\r\n 527 Railgun Error\r\n\r\n 530\r\n\r\n 460\r\n 463\r\n\r\n*/"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=geo-ip-location.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geo-ip-location.js","sourceRoot":"","sources":["../../../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/control-models/geo-ip-location.ts"],"names":[],"mappings":"","sourcesContent":["\r\nexport interface GeoIpLocation {\r\n /** [ <low bound of IP block>, <high bound of IP block> ] */\r\n range: [number, number];\r\n /** 2 letter ISO-3166-1 country code https://www.iban.com/country-codes */\r\n country: string;\r\n /**\r\n * Up to 3 alphanumeric variable length characters as ISO 3166-2 code\r\n * For US states this is the 2 letter state\r\n * For the United Kingdom this could be ENG as a country like “England\r\n * FIPS 10-4 subcountry code\r\n */\r\n region: string;\r\n /** 1 if the country is a member state of the European Union, 0 otherwise. */\r\n eu: '1' | '0';\r\n /** \"Country/Zone\" Timezone from IANA Time Zone Database */\r\n timezone: string;\r\n /** This is the full city name */\r\n city: string;\r\n /** The latitude and longitude of the city */\r\n ll: [number, number];\r\n /** Metro code */\r\n metro: number;\r\n /** The approximate accuracy radius (km), around the latitude and longitude */\r\n area: number;\r\n}\r\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=location-coordinates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"location-coordinates.js","sourceRoot":"","sources":["../../../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/control-models/location-coordinates.ts"],"names":[],"mappings":"","sourcesContent":["\r\nexport interface LocationCoordinates {\r\n longitude: number;\r\n latitude: number;\r\n}\r\n"]}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DynamoUsageAction = void 0;
4
+ class DynamoUsageAction {
5
+ constructor(set) {
6
+ if (set) {
7
+ this.action = set.action;
8
+ this.time = set.time;
9
+ }
10
+ }
11
+ }
12
+ exports.DynamoUsageAction = DynamoUsageAction;
13
+ //# sourceMappingURL=usage-action.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage-action.js","sourceRoot":"","sources":["../../../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/control-models/usage-action.ts"],"names":[],"mappings":";;;AACA,MAAa,iBAAiB;IAI5B,YACE,GAGC;QAED,IAAI,GAAG,EAAE;YACP,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;YACzB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;SACtB;IACH,CAAC;CACF;AAfD,8CAeC","sourcesContent":["\r\nexport class DynamoUsageAction {\r\n action?: string;\r\n time?: Date;\r\n\r\n constructor(\r\n set?: {\r\n action?: string,\r\n time?: Date,\r\n }\r\n ) {\r\n if (set) {\r\n this.action = set.action;\r\n this.time = set.time;\r\n }\r\n }\r\n}\r\n\r\n"]}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DynamoUsageData = void 0;
4
+ class DynamoUsageData {
5
+ constructor(set) {
6
+ this.actions = [];
7
+ if (set) {
8
+ this.page = set.page;
9
+ this.opened = set.opened;
10
+ this.timeSpentOnPage = set.timeSpentOnPage;
11
+ this.actions = set.actions ? set.actions : [];
12
+ }
13
+ }
14
+ }
15
+ exports.DynamoUsageData = DynamoUsageData;
16
+ //# sourceMappingURL=usage-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage-data.js","sourceRoot":"","sources":["../../../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/control-models/usage-data.ts"],"names":[],"mappings":";;;AAGA,MAAa,eAAe;IAM1B,YACE,GAKC;QARH,YAAO,GAAyB,EAAE,CAAC;QAUjC,IAAI,GAAG,EAAE;YACP,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;YACrB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC;YACzB,IAAI,CAAC,eAAe,GAAG,GAAG,CAAC,eAAe,CAAC;YAC3C,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;SAC/C;IACH,CAAC;CACF;AArBD,0CAqBC","sourcesContent":["\r\nimport { DynamoUsageAction } from './usage-action';\r\n\r\nexport class DynamoUsageData {\r\n page?: string;\r\n opened?: Date;\r\n timeSpentOnPage?: number;\r\n actions?: DynamoUsageAction[] = [];\r\n\r\n constructor(\r\n set?: {\r\n page?: string,\r\n opened?: Date;\r\n timeSpentOnPage?: number,\r\n actions?: DynamoUsageAction[],\r\n }\r\n ) {\r\n if (set) {\r\n this.page = set.page;\r\n this.opened = set.opened;\r\n this.timeSpentOnPage = set.timeSpentOnPage;\r\n this.actions = set.actions ? set.actions : [];\r\n }\r\n }\r\n}\r\n\r\n"]}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.customDataModelParams = exports.CustomData = void 0;
4
+ const dynamobe_data_params_1 = require("../control-models/dynamobe-data-params");
5
+ const metadata_1 = require("./metadata");
6
+ class CustomData extends metadata_1.Metadata {
7
+ constructor(set) {
8
+ super({
9
+ _id: set === null || set === void 0 ? void 0 : set._id,
10
+ __v: set === null || set === void 0 ? void 0 : set.__v,
11
+ __created: set === null || set === void 0 ? void 0 : set.__created,
12
+ __createdBy: set === null || set === void 0 ? void 0 : set.__createdBy,
13
+ __lastModified: set === null || set === void 0 ? void 0 : set.__lastModified,
14
+ __lastModifiedBy: set === null || set === void 0 ? void 0 : set.__lastModifiedBy,
15
+ });
16
+ if (set) {
17
+ this.data = set.data;
18
+ }
19
+ }
20
+ }
21
+ exports.CustomData = CustomData;
22
+ exports.customDataModelParams = new dynamobe_data_params_1.DynamoBEDataParams({
23
+ dataName: 'customData',
24
+ modelParams: [
25
+ { key: 'data', type: 'string', required: true },
26
+ ]
27
+ });
28
+ //# sourceMappingURL=custom-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-data.js","sourceRoot":"","sources":["../../../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/data-models/custom-data.ts"],"names":[],"mappings":";;;AACA,iFAA4E;AAC5E,yCAAsC;AAEtC,MAAa,UAAW,SAAQ,mBAAQ;IAGtC,YACE,GAUC;QAED,KAAK,CAAC;YACJ,GAAG,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,GAAG;YACb,GAAG,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,GAAG;YACb,SAAS,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,SAAS;YACzB,WAAW,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,WAAW;YAC7B,cAAc,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,cAAc;YACnC,gBAAgB,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,gBAAgB;SACxC,CAAC,CAAA;QACF,IAAI,GAAG,EAAE;YACP,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC;SACtB;IACH,CAAC;CACF;AA5BD,gCA4BC;AAEY,QAAA,qBAAqB,GAAG,IAAI,yCAAkB,CAAC;IAC1D,QAAQ,EAAE,YAAY;IACtB,WAAW,EAAE;QACX,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;KAChD;CACF,CAAC,CAAA","sourcesContent":["\r\nimport { DynamoBEDataParams } from '../control-models/dynamobe-data-params';\r\nimport { Metadata } from './metadata';\r\n\r\nexport class CustomData extends Metadata {\r\n data?: string;\r\n\r\n constructor(\r\n set?: {\r\n _id?: string,\r\n\r\n data?: string,\r\n \r\n __v?: number,\r\n __created?: Date,\r\n __createdBy?: string,\r\n __lastModified?: Date,\r\n __lastModifiedBy?: string,\r\n }\r\n ) {\r\n super({\r\n _id: set?._id,\r\n __v: set?.__v,\r\n __created: set?.__created,\r\n __createdBy: set?.__createdBy,\r\n __lastModified: set?.__lastModified,\r\n __lastModifiedBy: set?.__lastModifiedBy,\r\n })\r\n if (set) {\r\n this.data = set.data;\r\n }\r\n }\r\n}\r\n\r\nexport const customDataModelParams = new DynamoBEDataParams({\r\n dataName: 'customData',\r\n modelParams: [\r\n { key: 'data', type: 'string', required: true },\r\n ]\r\n})\r\n\r\n"]}
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Metadata = void 0;
4
+ class Metadata {
5
+ constructor(set) {
6
+ if (set) {
7
+ this._id = set._id;
8
+ this.__created = set.__created;
9
+ this.__createdBy = set.__createdBy;
10
+ this.__lastModified = set.__lastModified;
11
+ this.__lastModifiedBy = set.__lastModifiedBy;
12
+ this.__v = set.__v;
13
+ }
14
+ }
15
+ }
16
+ exports.Metadata = Metadata;
17
+ //# sourceMappingURL=metadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.js","sourceRoot":"","sources":["../../../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/data-models/metadata.ts"],"names":[],"mappings":";;;AAEA,MAAa,QAAQ;IAQnB,YACE,GAOY;QAEZ,IAAI,GAAG,EAAE;YACP,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;YACnB,IAAI,CAAC,SAAS,GAAG,GAAG,CAAC,SAAS,CAAC;YAC/B,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;YACnC,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC,cAAc,CAAC;YACzC,IAAI,CAAC,gBAAgB,GAAG,GAAG,CAAC,gBAAgB,CAAC;YAC7C,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;SACpB;IACH,CAAC;CACF;AA3BD,4BA2BC","sourcesContent":["\r\n\r\nexport class Metadata {\r\n _id?: string;\r\n __created?: Date;\r\n __createdBy?: string;\r\n __lastModified?: Date;\r\n __lastModifiedBy?: string;\r\n __v?: number;\r\n\r\n constructor(\r\n set?: {\r\n _id?: string,\r\n __created?: Date,\r\n __createdBy?: string,\r\n __lastModified?: Date,\r\n __lastModifiedBy?: string,\r\n __v?: number;\r\n } | Metadata\r\n ){\r\n if (set) {\r\n this._id = set._id;\r\n this.__created = set.__created;\r\n this.__createdBy = set.__createdBy;\r\n this.__lastModified = set.__lastModified;\r\n this.__lastModifiedBy = set.__lastModifiedBy;\r\n this.__v = set.__v;\r\n }\r\n }\r\n}\r\n"]}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.usageSessionModelParams = exports.DynamoUsageSession = void 0;
4
+ const metadata_1 = require("./metadata");
5
+ const dynamobe_data_params_1 = require("../control-models/dynamobe-data-params");
6
+ class DynamoUsageSession extends metadata_1.Metadata {
7
+ constructor(set) {
8
+ super({
9
+ _id: set === null || set === void 0 ? void 0 : set._id,
10
+ __created: set === null || set === void 0 ? void 0 : set.__created,
11
+ __createdBy: set === null || set === void 0 ? void 0 : set.__createdBy,
12
+ __lastModified: set === null || set === void 0 ? void 0 : set.__lastModified,
13
+ __lastModifiedBy: set === null || set === void 0 ? void 0 : set.__lastModifiedBy,
14
+ __v: set === null || set === void 0 ? void 0 : set.__v,
15
+ });
16
+ if (set) {
17
+ if (set.date) {
18
+ this.date = set.date;
19
+ }
20
+ else if (set.sessionStart) {
21
+ this.date = set.sessionStart.toISOString().substring(0, 10);
22
+ }
23
+ this.sessionStart = set.sessionStart;
24
+ this.sessionEnd = set.sessionEnd;
25
+ this.address = set.address;
26
+ this.issuer = set.issuer;
27
+ this.locationData = set.locationData;
28
+ this.usageData = set.usageData ? set.usageData : [];
29
+ this.totalSessionTime = set.totalSessionTime;
30
+ this.loggedInAs = set.loggedInAs;
31
+ }
32
+ }
33
+ }
34
+ exports.DynamoUsageSession = DynamoUsageSession;
35
+ exports.usageSessionModelParams = new dynamobe_data_params_1.DynamoBEDataParams({
36
+ dataName: 'usageSession',
37
+ modelParams: [
38
+ { key: 'date', type: 'string',
39
+ required: true, index: true
40
+ },
41
+ { key: 'sessionStart', type: 'Date',
42
+ required: true, index: true
43
+ },
44
+ { key: 'sessionEnd', type: 'Date' },
45
+ { key: 'address', type: 'string' },
46
+ { key: 'issuer', type: 'string' },
47
+ { key: 'locationData', type: 'IpApiLocation' },
48
+ { key: 'usageData', type: 'UsageData[]' },
49
+ { key: 'totalSessionTime', type: 'number' },
50
+ { key: 'loggedInAs', type: 'string' },
51
+ ]
52
+ });
53
+ //# sourceMappingURL=usage-session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage-session.js","sourceRoot":"","sources":["../../../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/data-models/usage-session.ts"],"names":[],"mappings":";;;AAEA,yCAAsC;AAEtC,iFAA4E;AAE5E,MAAa,kBAAmB,SAAQ,mBAAQ;IAY9C,YACE,GAmBC;QAED,KAAK,CAAC;YACJ,GAAG,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,GAAG;YACb,SAAS,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,SAAS;YACzB,WAAW,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,WAAW;YAC7B,cAAc,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,cAAc;YACnC,gBAAgB,EAAE,GAAG,aAAH,GAAG,uBAAH,GAAG,CA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AAG,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE;QACnC,EAAE,GAAG,EAAE,SAAS,EAAE,IAAI,EAAE,QAAQ,EAAE;QAClC,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE;QACjC,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,eAAe,EAAE;QAC9C,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,aAAa,EAAE;QACzC,EAAE,GAAG,EAAE,kBAAkB,EAAE,IAAI,EAAE,QAAQ,EAAE;QAC3C,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE;KACtC;CACF,CAAC,CAAA","sourcesContent":["\r\nimport { GeoIpLocation } from '../control-models/geo-ip-location';\r\nimport { Metadata } from './metadata';\r\nimport { DynamoUsageData } from '../control-models/usage-data';\r\nimport { DynamoBEDataParams } from '../control-models/dynamobe-data-params';\r\n\r\nexport class DynamoUsageSession extends Metadata {\r\n date?: string;\r\n sessionStart?: Date;\r\n sessionEnd?: Date;\r\n address?: string;\r\n issuer?: string;\r\n locationData?: GeoIpLocation;\r\n\r\n usageData?: DynamoUsageData[];\r\n totalSessionTime?: number;\r\n loggedInAs?: string;\r\n\r\n constructor(\r\n set?: {\r\n _id?: string,\r\n\r\n date?: string;\r\n sessionStart?: Date,\r\n sessionEnd?: Date,\r\n address?: string,\r\n issuer?: string,\r\n locationData?: GeoIpLocation,\r\n\r\n usageData?: DynamoUsageData[],\r\n totalSessionTime?: number,\r\n loggedInAs?: string,\r\n\r\n __created?: Date,\r\n __createdBy?: string,\r\n __lastModified?: Date,\r\n __lastModifiedBy?: string,\r\n __v?: number\r\n }\r\n ) {\r\n super({\r\n _id: set?._id,\r\n __created: set?.__created,\r\n __createdBy: set?.__createdBy,\r\n __lastModified: set?.__lastModified,\r\n __lastModifiedBy: set?.__lastModifiedBy,\r\n __v: set?.__v,\r\n });\r\n if (set) {\r\n if (set.date) {\r\n this.date = set.date;\r\n } else if (set.sessionStart) {\r\n this.date = set.sessionStart.toISOString().substring(0, 10);\r\n }\r\n this.sessionStart = set.sessionStart;\r\n this.sessionEnd = set.sessionEnd;\r\n this.address = set.address;\r\n this.issuer = set.issuer;\r\n this.locationData = set.locationData;\r\n\r\n this.usageData = set.usageData ? set.usageData : [];\r\n this.totalSessionTime = set.totalSessionTime;\r\n this.loggedInAs = set.loggedInAs;\r\n }\r\n }\r\n}\r\n\r\nexport const usageSessionModelParams = new DynamoBEDataParams({\r\n dataName: 'usageSession',\r\n modelParams: [\r\n { key: 'date', type: 'string',\r\n required: true, index: true\r\n },\r\n { key: 'sessionStart', type: 'Date',\r\n required: true, index: true\r\n },\r\n { key: 'sessionEnd', type: 'Date' },\r\n { key: 'address', type: 'string' },\r\n { key: 'issuer', type: 'string' },\r\n { key: 'locationData', type: 'IpApiLocation' },\r\n { key: 'usageData', type: 'UsageData[]' },\r\n { key: 'totalSessionTime', type: 'number' },\r\n { key: 'loggedInAs', type: 'string' },\r\n ]\r\n})\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,33 @@
1
1
  {
2
2
  "name": "@futdevpro/fsm-dynamo",
3
- "version": "1.0.2",
3
+ "version": "1.0.5",
4
+ "type": "module",
5
+ "exports": {
6
+ "./data-models": {
7
+ "default": "./public-api.js",
8
+ "module": "./public-api.js",
9
+ "types": "./public-api.d.ts",
10
+ "typings": "./public-api.d.ts"
11
+ },
12
+ "./package.json": {
13
+ "default": "./package.json"
14
+ },
15
+ ".": {
16
+ "types": "./futdevpro-fsm-dynamo.d.ts",
17
+ "esm2020": "./esm2020/futdevpro-fsm-dynamo.mjs",
18
+ "es2020": "./fesm2020/futdevpro-fsm-dynamo.mjs",
19
+ "es2015": "./fesm2015/futdevpro-fsm-dynamo.mjs",
20
+ "node": "./fesm2015/futdevpro-fsm-dynamo.mjs",
21
+ "default": "./fesm2020/futdevpro-fsm-dynamo.mjs"
22
+ }
23
+ },
24
+ "typesVersions": {
25
+ "*": {
26
+ "data-models": [
27
+ "lib/_modules/data-models.index.d.ts"
28
+ ]
29
+ }
30
+ },
4
31
  "peerDependencies": {
5
32
  "@angular/common": "~13.3.11",
6
33
  "@angular/core": "~13.3.11"
@@ -15,18 +42,5 @@
15
42
  "fesm2020": "fesm2020/futdevpro-fsm-dynamo.mjs",
16
43
  "fesm2015": "fesm2015/futdevpro-fsm-dynamo.mjs",
17
44
  "typings": "futdevpro-fsm-dynamo.d.ts",
18
- "exports": {
19
- "./package.json": {
20
- "default": "./package.json"
21
- },
22
- ".": {
23
- "types": "./futdevpro-fsm-dynamo.d.ts",
24
- "esm2020": "./esm2020/futdevpro-fsm-dynamo.mjs",
25
- "es2020": "./fesm2020/futdevpro-fsm-dynamo.mjs",
26
- "es2015": "./fesm2015/futdevpro-fsm-dynamo.mjs",
27
- "node": "./fesm2015/futdevpro-fsm-dynamo.mjs",
28
- "default": "./fesm2020/futdevpro-fsm-dynamo.mjs"
29
- }
30
- },
31
45
  "sideEffects": false
32
46
  }
package/public-api.js ADDED
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ // CONSTANTS
5
+ tslib_1.__exportStar(require("./lib/_constants/times"), exports);
6
+ // Module Settings
7
+ tslib_1.__exportStar(require("./lib/_constants/module-settings/test-module-settings"), exports);
8
+ tslib_1.__exportStar(require("./lib/_constants/module-settings/usage-module-settings"), exports);
9
+ // MODELS
10
+ // Control models
11
+ tslib_1.__exportStar(require("./lib/_models/control-models/daily-usage-data"), exports);
12
+ tslib_1.__exportStar(require("./lib/_models/control-models/dynamobe-data-params"), exports);
13
+ tslib_1.__exportStar(require("./lib/_models/control-models/dynamobe-data-property-params"), exports);
14
+ tslib_1.__exportStar(require("./lib/_models/control-models/dynamobe-error"), exports);
15
+ tslib_1.__exportStar(require("./lib/_models/control-models/geo-ip-location"), exports);
16
+ tslib_1.__exportStar(require("./lib/_models/control-models/location-coordinates"), exports);
17
+ tslib_1.__exportStar(require("./lib/_models/control-models/usage-action"), exports);
18
+ tslib_1.__exportStar(require("./lib/_models/control-models/usage-data"), exports);
19
+ // Data models
20
+ tslib_1.__exportStar(require("./lib/_models/data-models/custom-data"), exports);
21
+ tslib_1.__exportStar(require("./lib/_models/data-models/metadata"), exports);
22
+ tslib_1.__exportStar(require("./lib/_models/data-models/usage-session"), exports);
23
+ //# sourceMappingURL=public-api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-api.js","sourceRoot":"","sources":["../../../projects/futdevpro/fsm-dynamo/src/public-api.ts"],"names":[],"mappings":";;;AAEA,YAAY;AACZ,iEAAsC;AACpC,kBAAkB;AACpB,gGAAsE;AACtE,iGAAuE;AAEvE,SAAS;AACP,iBAAiB;AACnB,wFAA8D;AAC9D,4FAAkE;AAClE,qGAA2E;AAC3E,sFAA4D;AAC5D,uFAA6D;AAC7D,4FAAkE;AAClE,oFAA0D;AAC1D,kFAAwD;AACtD,cAAc;AAChB,gFAAsD;AACtD,6EAAmD;AACnD,kFAAwD","sourcesContent":["\n\n// CONSTANTS\nexport * from './lib/_constants/times'\n // Module Settings\nexport * from './lib/_constants/module-settings/test-module-settings';\nexport * from './lib/_constants/module-settings/usage-module-settings';\n\n// MODELS\n // Control models\nexport * from './lib/_models/control-models/daily-usage-data';\nexport * from './lib/_models/control-models/dynamobe-data-params';\nexport * from './lib/_models/control-models/dynamobe-data-property-params';\nexport * from './lib/_models/control-models/dynamobe-error';\nexport * from './lib/_models/control-models/geo-ip-location';\nexport * from './lib/_models/control-models/location-coordinates';\nexport * from './lib/_models/control-models/usage-action';\nexport * from './lib/_models/control-models/usage-data';\n // Data models\nexport * from './lib/_models/data-models/custom-data';\nexport * from './lib/_models/data-models/metadata';\nexport * from './lib/_models/data-models/usage-session';\n"]}
Binary file