@futdevpro/fsm-dynamo 1.5.23 → 1.5.27

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 (112) hide show
  1. package/lib/_collections/dynamo-shared.service.d.ts +2 -1
  2. package/lib/_collections/dynamo-shared.service.d.ts.map +1 -1
  3. package/lib/_collections/dynamo-shared.service.js +8 -5
  4. package/lib/_collections/dynamo-shared.service.js.map +1 -1
  5. package/lib/_constants/module-settings/test-module-settings.d.ts +2 -2
  6. package/lib/_constants/module-settings/test-module-settings.d.ts.map +1 -1
  7. package/lib/_constants/module-settings/test-module-settings.js.map +1 -1
  8. package/lib/_constants/module-settings/usage-module-settings.d.ts +2 -2
  9. package/lib/_constants/module-settings/usage-module-settings.d.ts.map +1 -1
  10. package/lib/_constants/module-settings/usage-module-settings.js.map +1 -1
  11. package/lib/_models/control-models/dynamo-daily-usage-data.d.ts +18 -0
  12. package/lib/_models/control-models/dynamo-daily-usage-data.d.ts.map +1 -0
  13. package/lib/_models/control-models/dynamo-daily-usage-data.js +22 -0
  14. package/lib/_models/control-models/dynamo-daily-usage-data.js.map +1 -0
  15. package/lib/_models/control-models/dynamo-error.d.ts +26 -0
  16. package/lib/_models/control-models/dynamo-error.d.ts.map +1 -0
  17. package/lib/_models/control-models/dynamo-error.js +179 -0
  18. package/lib/_models/control-models/dynamo-error.js.map +1 -0
  19. package/lib/_models/control-models/dynamo-nts-data-params.d.ts +14 -0
  20. package/lib/_models/control-models/dynamo-nts-data-params.d.ts.map +1 -0
  21. package/lib/_models/control-models/dynamo-nts-data-params.js +19 -0
  22. package/lib/_models/control-models/dynamo-nts-data-params.js.map +1 -0
  23. package/lib/_models/control-models/dynamo-nts-data-property-params.d.ts +28 -0
  24. package/lib/_models/control-models/dynamo-nts-data-property-params.d.ts.map +1 -0
  25. package/lib/_models/control-models/dynamo-nts-data-property-params.js +57 -0
  26. package/lib/_models/control-models/dynamo-nts-data-property-params.js.map +1 -0
  27. package/lib/_models/control-models/dynamo-nts-error.d.ts +19 -0
  28. package/lib/_models/control-models/dynamo-nts-error.d.ts.map +1 -0
  29. package/lib/_models/control-models/dynamo-nts-error.js +190 -0
  30. package/lib/_models/control-models/dynamo-nts-error.js.map +1 -0
  31. package/lib/_models/control-models/dynamo-nts-module-settings.d.ts +7 -0
  32. package/lib/_models/control-models/dynamo-nts-module-settings.d.ts.map +1 -0
  33. package/lib/_models/control-models/dynamo-nts-module-settings.js +3 -0
  34. package/lib/_models/control-models/dynamo-nts-module-settings.js.map +1 -0
  35. package/lib/_models/control-models/dynamo-poll.d.ts +31 -0
  36. package/lib/_models/control-models/dynamo-poll.d.ts.map +1 -0
  37. package/lib/_models/control-models/dynamo-poll.js +61 -0
  38. package/lib/_models/control-models/dynamo-poll.js.map +1 -0
  39. package/lib/_models/control-models/dynamo-usage-action.d.ts +9 -0
  40. package/lib/_models/control-models/dynamo-usage-action.d.ts.map +1 -0
  41. package/lib/_models/control-models/dynamo-usage-action.js +13 -0
  42. package/lib/_models/control-models/dynamo-usage-action.js.map +1 -0
  43. package/lib/_models/control-models/dynamo-usage-data.d.ts +14 -0
  44. package/lib/_models/control-models/dynamo-usage-data.d.ts.map +1 -0
  45. package/lib/_models/control-models/dynamo-usage-data.js +16 -0
  46. package/lib/_models/control-models/dynamo-usage-data.js.map +1 -0
  47. package/lib/_models/data-models/custom-data.d.ts +2 -2
  48. package/lib/_models/data-models/custom-data.d.ts.map +1 -1
  49. package/lib/_models/data-models/custom-data.js +2 -2
  50. package/lib/_models/data-models/custom-data.js.map +1 -1
  51. package/lib/_models/data-models/dynamo-custom-data.d.ts +16 -0
  52. package/lib/_models/data-models/dynamo-custom-data.d.ts.map +1 -0
  53. package/lib/_models/data-models/dynamo-custom-data.js +28 -0
  54. package/lib/_models/data-models/dynamo-custom-data.js.map +1 -0
  55. package/lib/_models/data-models/dynamo-metadata.d.ts +17 -0
  56. package/lib/_models/data-models/dynamo-metadata.d.ts.map +1 -0
  57. package/lib/_models/data-models/dynamo-metadata.js +17 -0
  58. package/lib/_models/data-models/dynamo-metadata.js.map +1 -0
  59. package/lib/_models/data-models/dynamo-usage-session.d.ts +34 -0
  60. package/lib/_models/data-models/dynamo-usage-session.d.ts.map +1 -0
  61. package/lib/_models/data-models/dynamo-usage-session.js +53 -0
  62. package/lib/_models/data-models/dynamo-usage-session.js.map +1 -0
  63. package/lib/_models/data-models/usage-session.d.ts +2 -2
  64. package/lib/_models/data-models/usage-session.d.ts.map +1 -1
  65. package/lib/_models/data-models/usage-session.js +2 -2
  66. package/lib/_models/data-models/usage-session.js.map +1 -1
  67. package/lib/_models/index.d.ts +10 -9
  68. package/lib/_models/index.d.ts.map +1 -1
  69. package/lib/_models/index.js +10 -9
  70. package/lib/_models/index.js.map +1 -1
  71. package/lib/_modules/data-modules.index.d.ts +4 -4
  72. package/lib/_modules/data-modules.index.d.ts.map +1 -1
  73. package/lib/_modules/data-modules.index.js +4 -4
  74. package/lib/_modules/data-modules.index.js.map +1 -1
  75. package/lib/_modules/error-module.index.d.ts +1 -1
  76. package/lib/_modules/error-module.index.d.ts.map +1 -1
  77. package/lib/_modules/error-module.index.js +1 -1
  78. package/lib/_modules/error-module.index.js.map +1 -1
  79. package/lib/_modules/shared-service.index.d.ts +2 -1
  80. package/lib/_modules/shared-service.index.d.ts.map +1 -1
  81. package/lib/_modules/shared-service.index.js +2 -1
  82. package/lib/_modules/shared-service.index.js.map +1 -1
  83. package/lib/_modules/test-module.index.d.ts +1 -1
  84. package/lib/_modules/test-module.index.d.ts.map +1 -1
  85. package/lib/_modules/test-module.index.js +1 -1
  86. package/lib/_modules/test-module.index.js.map +1 -1
  87. package/lib/_modules/usage-module.index.d.ts +4 -4
  88. package/lib/_modules/usage-module.index.d.ts.map +1 -1
  89. package/lib/_modules/usage-module.index.js +4 -4
  90. package/lib/_modules/usage-module.index.js.map +1 -1
  91. package/lib/tsconfig.tsbuildinfo +155 -137
  92. package/package.json +8 -5
  93. package/src/_collections/dynamo-shared.service.ts +7 -3
  94. package/src/_constants/module-settings/test-module-settings.ts +2 -2
  95. package/src/_constants/module-settings/usage-module-settings.ts +2 -2
  96. package/src/_models/control-models/{daily-usage-data.ts → dynamo-daily-usage-data.ts} +4 -4
  97. package/src/_models/control-models/{dynamobe-error.ts → dynamo-error.ts} +48 -38
  98. package/src/_models/control-models/{dynamobe-data-params.ts → dynamo-nts-data-params.ts} +4 -4
  99. package/src/_models/control-models/{dynamobe-data-property-params.ts → dynamo-nts-data-property-params.ts} +3 -3
  100. package/src/_models/control-models/{dynamo-module-settings.ts → dynamo-nts-module-settings.ts} +1 -1
  101. package/src/_models/control-models/dynamo-poll.ts +80 -0
  102. package/src/_models/control-models/{usage-action.ts → dynamo-usage-action.ts} +1 -1
  103. package/src/_models/control-models/{usage-data.ts → dynamo-usage-data.ts} +4 -4
  104. package/src/_models/data-models/{custom-data.ts → dynamo-custom-data.ts} +4 -4
  105. package/src/_models/data-models/{metadata.ts → dynamo-metadata.ts} +5 -2
  106. package/src/_models/data-models/{usage-session.ts → dynamo-usage-session.ts} +7 -7
  107. package/src/_models/index.ts +10 -9
  108. package/src/_modules/data-modules.index.ts +4 -4
  109. package/src/_modules/error-module.index.ts +1 -1
  110. package/src/_modules/shared-service.index.ts +2 -1
  111. package/src/_modules/test-module.index.ts +1 -1
  112. package/src/_modules/usage-module.index.ts +4 -4
@@ -1,10 +1,10 @@
1
1
 
2
2
  import { day, hour, month, week, year } from '../_constants/times';
3
3
  import { LogStyle } from '../_enums/log-style.enum';
4
- import { DynamoBEError } from '../_models/control-models/dynamobe-error';
4
+ import { Dynamo_Error } from '../_models/control-models/dynamo-error';
5
5
  import { LocationCoordinates } from '../_models/control-models/location-coordinates';
6
6
 
7
- export class D_Shared {
7
+ export class Dynamo_Shared {
8
8
 
9
9
  /**
10
10
  * returns remapped object list by path list
@@ -185,7 +185,7 @@ export class D_Shared {
185
185
  if (latitude) {
186
186
  return distanceInKm / (Math.cos(this.toRadians(latitude)) * 111.320);
187
187
  } else {
188
- throw new DynamoBEError({ status: 417, message: 'When using getLocationDegByKilometers for longitude, you need to give latitude!' });
188
+ throw new Dynamo_Error({ status: 417, message: 'When using getLocationDegByKilometers for longitude, you need to give latitude!' });
189
189
  }
190
190
  }
191
191
  }
@@ -264,4 +264,8 @@ export class D_Shared {
264
264
  console.warn(`${LogStyle.yellow}${LogStyle.bright}${message}${LogStyle.reset}`);
265
265
  }
266
266
  }
267
+
268
+ static delay(ms: number): Promise<void> {
269
+ return new Promise(resolve => setTimeout(resolve, ms) );
270
+ }
267
271
  }
@@ -1,7 +1,7 @@
1
1
 
2
- import { DynamoModuleSettings } from '../../_models/control-models/dynamo-module-settings';
2
+ import { DynamoNTS_ModuleSettings } from '../../_models/control-models/dynamo-nts-module-settings';
3
3
 
4
- export const testModuleSettings: DynamoModuleSettings = {
4
+ export const testModuleSettings: DynamoNTS_ModuleSettings = {
5
5
  mainRoute: '/test',
6
6
  endPoints: {
7
7
  testGet: '/test-get',
@@ -1,7 +1,7 @@
1
1
 
2
- import { DynamoModuleSettings } from '../../_models/control-models/dynamo-module-settings';
2
+ import { DynamoNTS_ModuleSettings } from '../../_models/control-models/dynamo-nts-module-settings';
3
3
 
4
- export const usageModuleSettings: DynamoModuleSettings = {
4
+ export const usageModuleSettings: DynamoNTS_ModuleSettings = {
5
5
  mainRoute: '/usage',
6
6
  endPoints: {
7
7
  newSession: '/new-session',
@@ -1,14 +1,14 @@
1
1
 
2
- import { DynamoUsageSession } from "../data-models/usage-session";
2
+ import { Dynamo_UsageSession } from "../data-models/dynamo-usage-session";
3
3
 
4
- export class DailyUsageData {
4
+ export class Dynamo_DailyUsageData {
5
5
  date?: string;
6
6
  totalVisitTime?: number = 0;
7
7
  averageVisitTime?: number = 0;
8
8
  visitorsHun?: number = 0;
9
9
  visitorsElse?: number = 0;
10
10
 
11
- visitations?: DynamoUsageSession[] = [];
11
+ visitations?: Dynamo_UsageSession[] = [];
12
12
 
13
13
  constructor(
14
14
  set?: {
@@ -18,7 +18,7 @@ export class DailyUsageData {
18
18
  visitorsHun?: number,
19
19
  visitorsElse?: number,
20
20
 
21
- visitations?: DynamoUsageSession[],
21
+ visitations?: Dynamo_UsageSession[],
22
22
  }
23
23
  ) {
24
24
  if (set) {
@@ -1,68 +1,78 @@
1
1
 
2
2
 
3
- export class DynamoBEError {
4
- flag = 'DYNAMO-BE ERROR OBJECT';
3
+ export class Dynamo_Error {
4
+ flag = 'DYNAMO ERROR OBJECT';
5
5
  handled: boolean;
6
6
  status: number;
7
- errors: any[] = [];
7
+ errorCode: string;
8
+
8
9
  error: any;
10
+ errors: any[] = [];
11
+
12
+ message: string;
9
13
  messages: string[] = [];
14
+
15
+ userMessage: string;
10
16
  userMessages: string[] = [];
11
17
 
12
18
  constructor(
13
- set: {
19
+ set?: {
14
20
  handled?: boolean;
15
21
  status?: number,
22
+ errorCode?: string;
23
+
24
+ error?: any,
25
+ errors?: any[],
26
+
16
27
  message?: string,
17
28
  messages?: string[],
29
+
18
30
  userMessage?: string,
19
- error?: any,
31
+ userMessages?: string[],
32
+ addECToUserMsg?: boolean,
33
+
20
34
  consoleLog?: boolean,
21
35
  }
22
36
  ) {
23
37
  this.handled = !!set.handled;
24
- if (set.status) {
25
- this.status = set.status;
26
- }
27
- this.status = set?.error?.status ? set.error.status : set.status;
28
38
 
29
- if (set?.error?.errors) {
30
- this.errors = this.errors.concat(set?.error?.errors);
31
- }
32
- if (set?.error?.messages) {
33
- this.messages = this.messages.concat(set?.error?.messages);
34
- }
35
- if (set?.error?.userMessages) {
36
- this.userMessages = this.userMessages.concat(set?.error?.userMessages);
37
- }
39
+ if (set) {
40
+ this.status = set.status ?? set?.error?.status;
41
+ this.errorCode = set.errorCode ?? set?.error?.errorCode;
38
42
 
39
- if (set.error) {
40
- if (set.error instanceof DynamoBEError) {
41
- this.errors.push(set.error.error);
42
- } else {
43
+ if (set.error) {
43
44
  if (set.error.error) {
44
45
  this.errors.push(set.error.error);
45
46
  }
46
- this.errors.push(set.error);
47
- }
48
- if (set.error.message) {
49
- this.messages.push(set.error.message);
50
- }
51
- if (set.error.status) {
52
- this.status = set.error.status;
47
+ if (set.error.errors) {
48
+ this.errors.push(...set.error.errors);
49
+ }
50
+
51
+ if (set.error.message) {
52
+ this.messages.push(set.error.message);
53
+ }
54
+ if (set.error.messages) {
55
+ this.messages.push(...set.error.messages);
56
+ }
57
+
58
+ if (set.error.userMessage) {
59
+ this.userMessages.push(set.error.userMessage);
60
+ }
61
+ if (set.error.userMessages) {
62
+ this.userMessages.push(...set.error.userMessages);
63
+ }
53
64
  }
54
65
  }
55
- if (set.message) {
56
- this.messages.push(set.message)
57
- }
58
- if (set.messages) {
59
- this.messages.push(...set.messages)
60
- }
61
- if (set.userMessage) {
62
- this.userMessages.push(set.userMessage)
66
+
67
+ this.error = set?.error ?? this.errors[0];
68
+ this.message = set?.message ?? this.messages[0];
69
+ this.userMessage = set?.userMessage ?? this.userMessages[0];
70
+ if (set.addECToUserMsg) {
71
+ this.userMessage += `\nErrorCode: ${this.errorCode}`
63
72
  }
73
+
64
74
  if (set.consoleLog) {
65
- console.log(this);
75
+ console.error(this);
66
76
  }
67
77
  }
68
78
  }
@@ -1,18 +1,18 @@
1
1
 
2
2
  import { DataModelType } from '../../_enums';
3
- import { DynamoBEDataPropertyParams } from './dynamobe-data-property-params';
3
+ import { DynamoNTS_DataPropertyParams } from './dynamo-nts-data-property-params';
4
4
 
5
- export class DynamoBEDataParams {
5
+ export class DynamoNTS_DataParams {
6
6
  dataName: string;
7
7
  modelType?: DataModelType;
8
8
  dbName: string;
9
- modelParams: DynamoBEDataPropertyParams[];
9
+ modelParams: DynamoNTS_DataPropertyParams[];
10
10
 
11
11
  constructor(
12
12
  set: {
13
13
  dataName: string,
14
14
  modelType?: DataModelType,
15
- modelParams: DynamoBEDataPropertyParams[],
15
+ modelParams: DynamoNTS_DataPropertyParams[],
16
16
  }
17
17
  ) {
18
18
  this.dataName = set.dataName;
@@ -1,5 +1,5 @@
1
1
 
2
- export class DynamoBEDataPropertyParams {
2
+ export class DynamoNTS_DataPropertyParams {
3
3
  key?: string;
4
4
  type?: 'string' | 'number' | 'boolean' | 'Date' | 'object' | string;
5
5
 
@@ -13,7 +13,7 @@ export class DynamoBEDataPropertyParams {
13
13
  minlength?: number;
14
14
  maxlength?: number;
15
15
 
16
- subObjectParams?: DynamoBEDataPropertyParams[] = [];
16
+ subObjectParams?: DynamoNTS_DataPropertyParams[] = [];
17
17
 
18
18
  additionalValidators?: ((data: any) => void)[];
19
19
 
@@ -32,7 +32,7 @@ export class DynamoBEDataPropertyParams {
32
32
  minlength?: number,
33
33
  maxlength?: number,
34
34
 
35
- subObjectParams?: DynamoBEDataPropertyParams[],
35
+ subObjectParams?: DynamoNTS_DataPropertyParams[],
36
36
 
37
37
  additionalValidators?: ((data: any) => void)[],
38
38
  }
@@ -1,5 +1,5 @@
1
1
 
2
- export interface DynamoModuleSettings {
2
+ export interface DynamoNTS_ModuleSettings {
3
3
  mainRoute: string;
4
4
 
5
5
  endPoints: {
@@ -0,0 +1,80 @@
1
+ import { Subscription, timer } from 'rxjs';
2
+
3
+ /**
4
+ * DynamoFSM_Poll is a predefined class is
5
+ * for polling a specific endpoint
6
+ * waiting a specific result
7
+ */
8
+ export class Dynamo_Poll<T> {
9
+ poll: Subscription;
10
+ running: boolean;
11
+ private pollDo: (...args) => Promise<T>;
12
+ private pollWhile: (res: T) => boolean;
13
+ private pollEnd: (res: T) => void;
14
+ private args?: unknown[];
15
+ private pollDelay?: number;
16
+ private pollPeriod?: number;
17
+ private stopOnFail?: boolean;
18
+
19
+ constructor(
20
+ set: {
21
+ pollDo: (...args) => Promise<T>,
22
+ pollWhile: (res: T) => boolean,
23
+ pollEnd: (res: T) => void,
24
+ args?: unknown[],
25
+ pollDelay?: number,
26
+ pollPeriod?: number,
27
+ stopOnFail?: boolean,
28
+ }
29
+ ) {
30
+ this.pollDo = set.pollDo;
31
+ this.pollWhile = set.pollWhile;
32
+ this.pollEnd = set.pollEnd;
33
+ this.args = set.args;
34
+ this.pollDelay = set.pollDelay ? set.pollDelay : 0;
35
+ if (set.pollPeriod === 0) {
36
+ console.error('DYNAMO ERROR: creating polls with 0ms period is not supported! (it will reset to 1000ms (1s))', new Error());
37
+ }
38
+ this.pollPeriod = set.pollPeriod ? set.pollPeriod : 1000;
39
+ if (this.pollPeriod < 300) {
40
+ console.warn('DYNAMO WARNING: creating polls with less than 300ms period is not recommended!');
41
+ }
42
+ this.stopOnFail = set.stopOnFail;
43
+ this.startPoll(this.args);
44
+ }
45
+
46
+ private startPoll(...args: unknown[]): void {
47
+ this.poll = timer(this.pollDelay, this.pollPeriod).subscribe(() => {
48
+ this.pollDo(...args).then((res: T) => {
49
+ if (!this.pollWhile(res)) {
50
+ this.end(res);
51
+ }
52
+ }).catch((error) => {
53
+ console.error('DYNAMO ERROR: \nDynamoPoll: pollDo was UNSUCCESSFUL', error, '\n\n', new Error());
54
+ if (this.stopOnFail) {
55
+ this.stop();
56
+ }
57
+ });
58
+ });
59
+ this.running = true;
60
+ }
61
+
62
+ restartPoll(args?: unknown[]): void {
63
+ if (args) {
64
+ this.startPoll(args);
65
+ } else {
66
+ this.startPoll(this.args);
67
+ }
68
+ }
69
+
70
+ stop(): void {
71
+ this.poll.unsubscribe();
72
+ this.running = false;
73
+ }
74
+
75
+ end(result: T): void {
76
+ this.poll.unsubscribe();
77
+ this.pollEnd(result);
78
+ this.running = false;
79
+ }
80
+ }
@@ -1,5 +1,5 @@
1
1
 
2
- export class DynamoUsageAction {
2
+ export class Dynamo_UsageAction {
3
3
  action?: string;
4
4
  time?: Date;
5
5
 
@@ -1,18 +1,18 @@
1
1
 
2
- import { DynamoUsageAction } from './usage-action';
2
+ import { Dynamo_UsageAction } from './dynamo-usage-action';
3
3
 
4
- export class DynamoUsageData {
4
+ export class Dynamo_UsageData {
5
5
  page?: string;
6
6
  opened?: Date;
7
7
  timeSpentOnPage?: number;
8
- actions?: DynamoUsageAction[] = [];
8
+ actions?: Dynamo_UsageAction[] = [];
9
9
 
10
10
  constructor(
11
11
  set?: {
12
12
  page?: string,
13
13
  opened?: Date;
14
14
  timeSpentOnPage?: number,
15
- actions?: DynamoUsageAction[],
15
+ actions?: Dynamo_UsageAction[],
16
16
  }
17
17
  ) {
18
18
  if (set) {
@@ -1,8 +1,8 @@
1
1
 
2
- import { DynamoBEDataParams } from '../control-models/dynamobe-data-params';
3
- import { Metadata } from './metadata';
2
+ import { DynamoNTS_DataParams } from '../control-models/dynamo-nts-data-params';
3
+ import { Dynamo_Metadata } from './dynamo-metadata';
4
4
 
5
- export class CustomData extends Metadata {
5
+ export class Dynamo_CustomData extends Dynamo_Metadata {
6
6
  data?: string;
7
7
 
8
8
  constructor(
@@ -32,7 +32,7 @@ export class CustomData extends Metadata {
32
32
  }
33
33
  }
34
34
 
35
- export const customDataModelParams = new DynamoBEDataParams({
35
+ export const customDataModelParams = new DynamoNTS_DataParams({
36
36
  dataName: 'customData',
37
37
  modelParams: [
38
38
  { key: 'data', type: 'string', required: true },
@@ -1,7 +1,8 @@
1
1
 
2
2
 
3
- export class Metadata {
3
+ export class Dynamo_Metadata {
4
4
  _id?: string;
5
+
5
6
  __created?: Date;
6
7
  __createdBy?: string;
7
8
  __lastModified?: Date;
@@ -11,15 +12,17 @@ export class Metadata {
11
12
  constructor(
12
13
  set?: {
13
14
  _id?: string,
15
+
14
16
  __created?: Date,
15
17
  __createdBy?: string,
16
18
  __lastModified?: Date,
17
19
  __lastModifiedBy?: string,
18
20
  __v?: number;
19
- } | Metadata
21
+ } | Dynamo_Metadata
20
22
  ){
21
23
  if (set) {
22
24
  this._id = set._id ? set._id : undefined;
25
+
23
26
  this.__created = set.__created ? set.__created : undefined;
24
27
  this.__createdBy = set.__createdBy ? set.__createdBy : undefined;
25
28
  this.__lastModified = set.__lastModified ? set.__lastModified : undefined;
@@ -1,10 +1,10 @@
1
1
 
2
2
  import { GeoIpLocation } from '../control-models/geo-ip-location';
3
- import { Metadata } from './metadata';
4
- import { DynamoUsageData } from '../control-models/usage-data';
5
- import { DynamoBEDataParams } from '../control-models/dynamobe-data-params';
3
+ import { Dynamo_Metadata } from './dynamo-metadata';
4
+ import { Dynamo_UsageData } from '../control-models/dynamo-usage-data';
5
+ import { DynamoNTS_DataParams } from '../control-models/dynamo-nts-data-params';
6
6
 
7
- export class DynamoUsageSession extends Metadata {
7
+ export class Dynamo_UsageSession extends Dynamo_Metadata {
8
8
  date?: string;
9
9
  sessionStart?: Date;
10
10
  sessionEnd?: Date;
@@ -12,7 +12,7 @@ export class DynamoUsageSession extends Metadata {
12
12
  issuer?: string;
13
13
  locationData?: GeoIpLocation;
14
14
 
15
- usageData?: DynamoUsageData[];
15
+ usageData?: Dynamo_UsageData[];
16
16
  totalSessionTime?: number;
17
17
  loggedInAs?: string;
18
18
 
@@ -27,7 +27,7 @@ export class DynamoUsageSession extends Metadata {
27
27
  issuer?: string,
28
28
  locationData?: GeoIpLocation,
29
29
 
30
- usageData?: DynamoUsageData[],
30
+ usageData?: Dynamo_UsageData[],
31
31
  totalSessionTime?: number,
32
32
  loggedInAs?: string,
33
33
 
@@ -65,7 +65,7 @@ export class DynamoUsageSession extends Metadata {
65
65
  }
66
66
  }
67
67
 
68
- export const usageSessionModelParams = new DynamoBEDataParams({
68
+ export const usageSessionModelParams = new DynamoNTS_DataParams({
69
69
  dataName: 'usageSession',
70
70
  modelParams: [
71
71
  { key: 'date', type: 'string',
@@ -1,16 +1,17 @@
1
1
 
2
2
  // MODELS
3
3
  // Control models
4
- export * from './control-models/daily-usage-data';
5
- export * from './control-models/dynamobe-data-params';
6
- export * from './control-models/dynamobe-data-property-params';
7
- export * from './control-models/dynamobe-error';
4
+ export * from './control-models/dynamo-daily-usage-data';
5
+ export * from './control-models/dynamo-nts-data-params';
6
+ export * from './control-models/dynamo-nts-data-property-params';
7
+ export * from './control-models/dynamo-error';
8
8
  export * from './control-models/geo-ip-location';
9
9
  export * from './control-models/location-coordinates';
10
- export * from './control-models/usage-action';
11
- export * from './control-models/usage-data';
10
+ export * from './control-models/dynamo-usage-action';
11
+ export * from './control-models/dynamo-usage-data';
12
+ export * from './control-models/dynamo-poll';
12
13
  // Data models
13
- export * from './data-models/custom-data';
14
- export * from './data-models/metadata';
15
- export * from './data-models/usage-session';
14
+ export * from './data-models/dynamo-custom-data';
15
+ export * from './data-models/dynamo-metadata';
16
+ export * from './data-models/dynamo-usage-session';
16
17
 
@@ -1,9 +1,9 @@
1
1
 
2
2
  // DATA MODULE
3
- export * from '../_models/data-models/metadata';
4
- export * from '../_models/control-models/dynamobe-data-params';
5
- export * from '../_models/control-models/dynamobe-data-property-params';
6
- export * from '../_models/control-models/dynamobe-error';
3
+ export * from '../_models/data-models/dynamo-metadata';
4
+ export * from '../_models/control-models/dynamo-nts-data-params';
5
+ export * from '../_models/control-models/dynamo-nts-data-property-params';
6
+ export * from '../_models/control-models/dynamo-error';
7
7
  export * from '../_enums/data-model-type.enum';
8
8
 
9
9
 
@@ -1,5 +1,5 @@
1
1
 
2
2
  // ERROR MODULE
3
- export * from '../_models/control-models/dynamobe-error';
3
+ export * from '../_models/control-models/dynamo-error';
4
4
 
5
5
 
@@ -3,6 +3,7 @@
3
3
  export * from '../_collections/dynamo-shared.service';
4
4
  export * from '../_constants/times';
5
5
  export * from '../_enums/log-style.enum';
6
- export * from '../_models/control-models/dynamobe-error';
6
+ export * from '../_models/control-models/dynamo-error';
7
7
  export * from '../_models/control-models/location-coordinates';
8
8
  export * from '../_models/control-models/geo-ip-location';
9
+ export * from '../_models/control-models/dynamo-poll';
@@ -1,6 +1,6 @@
1
1
 
2
2
  // TEST MODULE
3
- export * from '../_models/data-models/custom-data';
3
+ export * from '../_models/data-models/dynamo-custom-data';
4
4
  export * from '../_constants/module-settings/test-module-settings';
5
5
 
6
6
 
@@ -1,9 +1,9 @@
1
1
 
2
2
  // USAGE MODULE
3
- export * from '../_models/data-models/usage-session';
3
+ export * from '../_models/data-models/dynamo-usage-session';
4
4
  export * from '../_constants/module-settings/usage-module-settings';
5
- export * from '../_models/control-models/usage-data';
6
- export * from '../_models/control-models/daily-usage-data';
7
- export * from '../_models/control-models/usage-action';
5
+ export * from '../_models/control-models/dynamo-usage-data';
6
+ export * from '../_models/control-models/dynamo-daily-usage-data';
7
+ export * from '../_models/control-models/dynamo-usage-action';
8
8
 
9
9