@futdevpro/fsm-dynamo 0.0.1

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 (41) hide show
  1. package/README.md +24 -0
  2. package/esm2020/futdevpro-fsm-dynamo.mjs +5 -0
  3. package/esm2020/lib/_constants/module-settings/test-module-settings.mjs +13 -0
  4. package/esm2020/lib/_constants/module-settings/usage-module-settings.mjs +10 -0
  5. package/esm2020/lib/_constants/times.mjs +8 -0
  6. package/esm2020/lib/_models/control-models/daily-usage-data.mjs +18 -0
  7. package/esm2020/lib/_models/control-models/dynamo-module-settings.mjs +2 -0
  8. package/esm2020/lib/_models/control-models/dynamobe-data-params.mjs +8 -0
  9. package/esm2020/lib/_models/control-models/dynamobe-data-property-params.mjs +63 -0
  10. package/esm2020/lib/_models/control-models/dynamobe-error.mjs +183 -0
  11. package/esm2020/lib/_models/control-models/geo-ip-location.mjs +2 -0
  12. package/esm2020/lib/_models/control-models/location-coordinates.mjs +2 -0
  13. package/esm2020/lib/_models/control-models/usage-action.mjs +9 -0
  14. package/esm2020/lib/_models/control-models/usage-data.mjs +12 -0
  15. package/esm2020/lib/_models/data-models/custom-data.mjs +24 -0
  16. package/esm2020/lib/_models/data-models/metadata.mjs +13 -0
  17. package/esm2020/lib/_models/data-models/usage-session.mjs +49 -0
  18. package/esm2020/public-api.mjs +20 -0
  19. package/fesm2015/futdevpro-fsm-dynamo.mjs +415 -0
  20. package/fesm2015/futdevpro-fsm-dynamo.mjs.map +1 -0
  21. package/fesm2020/futdevpro-fsm-dynamo.mjs +413 -0
  22. package/fesm2020/futdevpro-fsm-dynamo.mjs.map +1 -0
  23. package/futdevpro-fsm-dynamo-0.0.1.tgz +0 -0
  24. package/index.d.ts +5 -0
  25. package/lib/_constants/module-settings/test-module-settings.d.ts +2 -0
  26. package/lib/_constants/module-settings/usage-module-settings.d.ts +2 -0
  27. package/lib/_constants/times.d.ts +7 -0
  28. package/lib/_models/control-models/daily-usage-data.d.ts +17 -0
  29. package/lib/_models/control-models/dynamo-module-settings.d.ts +6 -0
  30. package/lib/_models/control-models/dynamobe-data-params.d.ts +10 -0
  31. package/lib/_models/control-models/dynamobe-data-property-params.d.ts +27 -0
  32. package/lib/_models/control-models/dynamobe-error.d.ts +18 -0
  33. package/lib/_models/control-models/geo-ip-location.d.ts +25 -0
  34. package/lib/_models/control-models/location-coordinates.d.ts +4 -0
  35. package/lib/_models/control-models/usage-action.d.ts +8 -0
  36. package/lib/_models/control-models/usage-data.d.ts +13 -0
  37. package/lib/_models/data-models/custom-data.d.ts +15 -0
  38. package/lib/_models/data-models/metadata.d.ts +16 -0
  39. package/lib/_models/data-models/usage-session.d.ts +33 -0
  40. package/package.json +32 -0
  41. package/public-api.d.ts +14 -0
@@ -0,0 +1,415 @@
1
+ const second = 1000;
2
+ const minute = second * 60;
3
+ const hour = minute * 60;
4
+ const day = hour * 24;
5
+ const week = day * 7;
6
+ const month = day * 30.4368499;
7
+ const year = day * 365.242199;
8
+
9
+ const testModuleSettings = {
10
+ mainRoute: '/test',
11
+ endPoints: {
12
+ testGet: '/test-get',
13
+ testPost: '/test-post',
14
+ testPut: '/test-put',
15
+ testPatch: '/test-patch',
16
+ testDelete: '/test-delete',
17
+ getCustomData: '/custom/get/:customId',
18
+ modifyCustomData: '/custom/post'
19
+ }
20
+ };
21
+
22
+ const usageModuleSettings = {
23
+ mainRoute: '/usage',
24
+ endPoints: {
25
+ newSession: '/new-session',
26
+ closeSession: '/close-session/:sessionId',
27
+ updateUsage: '/update/:sessionId',
28
+ getAllUsageData: '/get/all',
29
+ }
30
+ };
31
+
32
+ class DailyUsageData {
33
+ constructor(set) {
34
+ this.totalVisitTime = 0;
35
+ this.averageVisitTime = 0;
36
+ this.visitorsHun = 0;
37
+ this.visitorsElse = 0;
38
+ this.visitations = [];
39
+ if (set) {
40
+ this.date = set.date;
41
+ this.totalVisitTime = set.totalVisitTime ? set.totalVisitTime : 0;
42
+ this.averageVisitTime = set.averageVisitTime ? set.averageVisitTime : 0;
43
+ this.visitorsHun = set.visitorsHun ? set.visitorsHun : 0;
44
+ this.visitorsElse = set.visitorsElse ? set.visitorsElse : 0;
45
+ this.visitations = set.visitations ? set.visitations : [];
46
+ }
47
+ }
48
+ }
49
+
50
+ class DynamoBEDataParams {
51
+ constructor(set) {
52
+ this.dataName = set.dataName;
53
+ this.dbName = set.dataName.charAt(0).toUpperCase() + set.dataName.slice(1);
54
+ this.modelParams = set.modelParams ? set.modelParams : [];
55
+ }
56
+ }
57
+
58
+ class DynamoBEError {
59
+ constructor(set) {
60
+ var _a, _b, _c, _d, _e, _f, _g;
61
+ this.flag = 'DYNAMO-BE ERROR OBJECT';
62
+ this.errors = [];
63
+ this.messages = [];
64
+ this.userMessages = [];
65
+ this.handled = !!set.handled;
66
+ if (set.status) {
67
+ this.status = set.status;
68
+ }
69
+ 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;
70
+ if ((_b = set === null || set === void 0 ? void 0 : set.error) === null || _b === void 0 ? void 0 : _b.errors) {
71
+ this.errors = this.errors.concat((_c = set === null || set === void 0 ? void 0 : set.error) === null || _c === void 0 ? void 0 : _c.errors);
72
+ }
73
+ if ((_d = set === null || set === void 0 ? void 0 : set.error) === null || _d === void 0 ? void 0 : _d.messages) {
74
+ this.messages = this.messages.concat((_e = set === null || set === void 0 ? void 0 : set.error) === null || _e === void 0 ? void 0 : _e.messages);
75
+ }
76
+ if ((_f = set === null || set === void 0 ? void 0 : set.error) === null || _f === void 0 ? void 0 : _f.userMessages) {
77
+ this.userMessages = this.userMessages.concat((_g = set === null || set === void 0 ? void 0 : set.error) === null || _g === void 0 ? void 0 : _g.userMessages);
78
+ }
79
+ if (set.error) {
80
+ if (set.error instanceof DynamoBEError) {
81
+ this.errors.push(set.error.error);
82
+ }
83
+ else {
84
+ if (set.error.error) {
85
+ this.errors.push(set.error.error);
86
+ }
87
+ this.errors.push(set.error);
88
+ }
89
+ if (set.error.message) {
90
+ this.messages.push(set.error.message);
91
+ }
92
+ if (set.error.status) {
93
+ this.status = set.error.status;
94
+ }
95
+ }
96
+ if (set.message) {
97
+ this.messages.push(set.message);
98
+ }
99
+ if (set.messages) {
100
+ this.messages.push(...set.messages);
101
+ }
102
+ if (set.userMessage) {
103
+ this.userMessages.push(set.userMessage);
104
+ }
105
+ if (set.consoleLog) {
106
+ console.log(this);
107
+ }
108
+ }
109
+ }
110
+ /*
111
+
112
+ // //
113
+ // RESPONSE STATUS //
114
+ // //
115
+
116
+ 1XX informational response
117
+
118
+ 100 Continue
119
+ 101 Switching Protocols
120
+ 102 Processing
121
+ 103 Early Hints
122
+
123
+
124
+ 2XX success
125
+
126
+ 200 OK
127
+ 201 Created
128
+ 202 Accepted
129
+ 203 Non-Authoritative Information
130
+ 204 No Content
131
+ 205 Reset Content
132
+ 206 Partial Content
133
+ 207 Multi-Status
134
+ 208 Already Reported
135
+ 226 IM Used
136
+
137
+
138
+ 3XX redirection
139
+
140
+ 300 Multiple Choices
141
+ 301 Moved Permanently
142
+ 302 Found
143
+ 303 See Other
144
+ 304 Not Modified
145
+ 305 Use Proxy
146
+ 306 Switch Proxy
147
+ 307 Temporary Redirect
148
+ 308 Permanent Redirect
149
+
150
+
151
+ 4XX client errors
152
+
153
+ 400 Bad Request
154
+ 401 Unauthorized
155
+ 402 Payment Required
156
+ 403 Forbidden
157
+ 404 Not Found
158
+ 405 Method Not Allowed
159
+ 406 Not Acceptable
160
+ 407 Proxy Authentication Required
161
+ 408 Request Timeout
162
+ 409 Conflict
163
+ 410 Gone
164
+ 411 Length Required
165
+ 412 Precondition Failed
166
+ 413 Payload Too Large
167
+ 414 URI Too Long
168
+ 415 Unsupported Media Type
169
+ 416 Range Not Satisfiable
170
+ 417 Expectation Failed
171
+ 418 I'm a teapot
172
+ 421 Misdirected Request
173
+ 422 Unprocessable Entity
174
+ 423 Locked
175
+ 424 Failed Dependency
176
+ 425 Too Early
177
+ 426 Upgrade Required
178
+ 428 Precondition Required
179
+ 429 Too Many Requests
180
+ 431 Request Header Fields Too Large
181
+ 451 Unavailable For Legal Reasons
182
+
183
+
184
+ 5XX server errors
185
+
186
+ 500 Internal Server Error
187
+ 501 Not Implemented
188
+ 502 Bad Gateway
189
+ 503 Service Unavailable
190
+ 504 Gateway Timeout
191
+ 505 HTTP Version Not Supported
192
+ 506 Variant Also Negotiates
193
+ 507 Insufficient Storage
194
+ 508 Loop Detected
195
+ 510 Not Extended
196
+ 511 Network Authentication Required
197
+
198
+
199
+ Unofficial codes
200
+
201
+ 103 Checkpoint
202
+ 218 This is fine (Apache Web Server)
203
+ 419 Page Expired (Laravel Framework)
204
+ 420 Enhance Your Calm (Twitter)
205
+ 430 Request Header Fields Too Large (Shopify)
206
+ 450 Blocked by Windows Parental Controls (Microsoft)
207
+ 498 Invalid Token (Esri)
208
+ 499 Token Required (Esri)
209
+ 509 Bandwidth Limit Exceeded (Apache Web Server/cPanel)
210
+ 526 Invalid SSL Certificate
211
+ 529 Site is overloaded
212
+ 530 Site is frozen
213
+ 598 (Informal convention) Network read timeout error
214
+
215
+ 440 Login Time-out
216
+ 449 Retry With
217
+ 451 Redirect
218
+
219
+ 444 No Response
220
+ 494 Request header too large
221
+ 495 SSL Certificate Error
222
+ 496 SSL Certificate Required
223
+ 497 HTTP Request Sent to HTTPS Port
224
+ 499 Client Closed Request
225
+
226
+ 520 Web Server Returned an Unknown Error
227
+ 521 Web Server Is Down
228
+ 522 Connection Timed Out
229
+ 523 Origin Is Unreachable
230
+ 524 A Timeout Occurred
231
+ 525 SSL Handshake Failed
232
+ 526 Invalid SSL Certificate
233
+ 527 Railgun Error
234
+
235
+ 530
236
+
237
+ 460
238
+ 463
239
+
240
+ */
241
+
242
+ class DynamoBEDataPropertyParams {
243
+ constructor(set) {
244
+ this.subObjectParams = [];
245
+ if (set) {
246
+ this.key = set.key;
247
+ this.type = set.type;
248
+ if (this.getBEType) {
249
+ if (set === null || set === void 0 ? void 0 : set.subObjectParams) {
250
+ this.subObjectParams = set.subObjectParams;
251
+ }
252
+ else {
253
+ console.log('DYNAMO ERROR: \n subObjectParams missing', '\n\n', new Error());
254
+ throw new DynamoBEError({ message: 'subObjectParams missing' });
255
+ }
256
+ }
257
+ if (set.isDependencyHook) {
258
+ if (set.dependencyDBServiceName) {
259
+ this.isDependencyHook = set.isDependencyHook;
260
+ this.dependencyName = set.dependencyDBServiceName;
261
+ }
262
+ else {
263
+ this.isDependencyHook = set.isDependencyHook;
264
+ console.log('DYNAMO ERROR: \n dependencyDBServiceName missing for dependencyHook', '\n\n', new Error());
265
+ }
266
+ }
267
+ this.unique = set.unique;
268
+ this.required = set.required;
269
+ this.index = set.index;
270
+ this.minlength = set.minlength;
271
+ this.maxlength = set.maxlength;
272
+ this.additionalValidators = set.additionalValidators;
273
+ }
274
+ else {
275
+ console.log('DYNAMO ERROR: \nMISSING DynamoBEDataPropertyParams constructor input', '\n\n', new Error());
276
+ }
277
+ }
278
+ // tslint:disable-next-line: ban-types
279
+ getBEType() {
280
+ var _a, _b, _c;
281
+ switch (this.type) {
282
+ case 'string':
283
+ return String;
284
+ case 'number':
285
+ return Number;
286
+ case 'boolean':
287
+ return Boolean;
288
+ case 'Date':
289
+ return Date;
290
+ case 'object':
291
+ default:
292
+ if ((_a = this.type) === null || _a === void 0 ? void 0 : _a.includes('[]')) {
293
+ return Array;
294
+ }
295
+ 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'))) {
296
+ return Function;
297
+ }
298
+ else {
299
+ return Object;
300
+ }
301
+ }
302
+ }
303
+ }
304
+
305
+ class DynamoUsageAction {
306
+ constructor(set) {
307
+ if (set) {
308
+ this.action = set.action;
309
+ this.time = set.time;
310
+ }
311
+ }
312
+ }
313
+
314
+ class DynamoUsageData {
315
+ constructor(set) {
316
+ this.actions = [];
317
+ if (set) {
318
+ this.page = set.page;
319
+ this.opened = set.opened;
320
+ this.timeSpentOnPage = set.timeSpentOnPage;
321
+ this.actions = set.actions ? set.actions : [];
322
+ }
323
+ }
324
+ }
325
+
326
+ class Metadata {
327
+ constructor(set) {
328
+ if (set) {
329
+ this._id = set._id;
330
+ this.__created = set.__created;
331
+ this.__createdBy = set.__createdBy;
332
+ this.__lastModified = set.__lastModified;
333
+ this.__lastModifiedBy = set.__lastModifiedBy;
334
+ this.__v = set.__v;
335
+ }
336
+ }
337
+ }
338
+
339
+ class CustomData extends Metadata {
340
+ constructor(set) {
341
+ super({
342
+ _id: set === null || set === void 0 ? void 0 : set._id,
343
+ __v: set === null || set === void 0 ? void 0 : set.__v,
344
+ __created: set === null || set === void 0 ? void 0 : set.__created,
345
+ __createdBy: set === null || set === void 0 ? void 0 : set.__createdBy,
346
+ __lastModified: set === null || set === void 0 ? void 0 : set.__lastModified,
347
+ __lastModifiedBy: set === null || set === void 0 ? void 0 : set.__lastModifiedBy,
348
+ });
349
+ if (set) {
350
+ this.data = set.data;
351
+ }
352
+ }
353
+ }
354
+ const customDataModelParams = new DynamoBEDataParams({
355
+ dataName: 'customData',
356
+ modelParams: [
357
+ { key: 'data', type: 'string', required: true },
358
+ ]
359
+ });
360
+
361
+ class DynamoUsageSession extends Metadata {
362
+ constructor(set) {
363
+ super({
364
+ _id: set === null || set === void 0 ? void 0 : set._id,
365
+ __created: set === null || set === void 0 ? void 0 : set.__created,
366
+ __createdBy: set === null || set === void 0 ? void 0 : set.__createdBy,
367
+ __lastModified: set === null || set === void 0 ? void 0 : set.__lastModified,
368
+ __lastModifiedBy: set === null || set === void 0 ? void 0 : set.__lastModifiedBy,
369
+ __v: set === null || set === void 0 ? void 0 : set.__v,
370
+ });
371
+ if (set) {
372
+ if (set.date) {
373
+ this.date = set.date;
374
+ }
375
+ else if (set.sessionStart) {
376
+ this.date = set.sessionStart.toISOString().substring(0, 10);
377
+ }
378
+ this.sessionStart = set.sessionStart;
379
+ this.sessionEnd = set.sessionEnd;
380
+ this.address = set.address;
381
+ this.issuer = set.issuer;
382
+ this.locationData = set.locationData;
383
+ this.usageData = set.usageData ? set.usageData : [];
384
+ this.totalSessionTime = set.totalSessionTime;
385
+ this.loggedInAs = set.loggedInAs;
386
+ }
387
+ }
388
+ }
389
+ const usageSessionModelParams = new DynamoBEDataParams({
390
+ dataName: 'usageSession',
391
+ modelParams: [
392
+ { key: 'date', type: 'string',
393
+ required: true, index: true
394
+ },
395
+ { key: 'sessionStart', type: 'Date',
396
+ required: true, index: true
397
+ },
398
+ { key: 'sessionEnd', type: 'Date' },
399
+ { key: 'address', type: 'string' },
400
+ { key: 'issuer', type: 'string' },
401
+ { key: 'locationData', type: 'IpApiLocation' },
402
+ { key: 'usageData', type: 'UsageData[]' },
403
+ { key: 'totalSessionTime', type: 'number' },
404
+ { key: 'loggedInAs', type: 'string' },
405
+ ]
406
+ });
407
+
408
+ // CONSTANTS
409
+
410
+ /**
411
+ * Generated bundle index. Do not edit.
412
+ */
413
+
414
+ export { CustomData, DailyUsageData, DynamoBEDataParams, DynamoBEDataPropertyParams, DynamoBEError, DynamoUsageAction, DynamoUsageData, DynamoUsageSession, Metadata, customDataModelParams, day, hour, minute, month, second, testModuleSettings, usageModuleSettings, usageSessionModelParams, week, year };
415
+ //# sourceMappingURL=futdevpro-fsm-dynamo.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"futdevpro-fsm-dynamo.mjs","sources":["../../../../projects/futdevpro/fsm-dynamo/src/lib/_constants/times.ts","../../../../projects/futdevpro/fsm-dynamo/src/lib/_constants/module-settings/test-module-settings.ts","../../../../projects/futdevpro/fsm-dynamo/src/lib/_constants/module-settings/usage-module-settings.ts","../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/control-models/daily-usage-data.ts","../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/control-models/dynamobe-data-params.ts","../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/control-models/dynamobe-error.ts","../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/control-models/dynamobe-data-property-params.ts","../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/control-models/usage-action.ts","../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/control-models/usage-data.ts","../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/data-models/metadata.ts","../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/data-models/custom-data.ts","../../../../projects/futdevpro/fsm-dynamo/src/lib/_models/data-models/usage-session.ts","../../../../projects/futdevpro/fsm-dynamo/src/public-api.ts","../../../../projects/futdevpro/fsm-dynamo/src/futdevpro-fsm-dynamo.ts"],"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","\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","\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","\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","\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","\r\n\r\nexport class DynamoBEError {\r\n flag = 'DYNAMO-BE ERROR OBJECT';\r\n handled: boolean;\r\n status: number;\r\n errors: any[] = [];\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*/","\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\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","\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","\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","\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","\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","\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","\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","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AACO,MAAM,MAAM,GAAG,KAAK;AACd,MAAA,MAAM,GAAG,MAAM,GAAG,GAAG;AACrB,MAAA,IAAI,GAAG,MAAM,GAAG,GAAG;AACnB,MAAA,G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