@talkpilot/core-db 1.3.8 → 1.3.11
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.
- package/.cursor/rules/development.mdc +65 -65
- package/DEVELOPMENT.md +141 -141
- package/README.md +287 -243
- package/README_OLD.md +160 -160
- package/dist/municipal/tickets/tickets.statistics.aggregation.d.ts +34 -0
- package/dist/municipal/tickets/tickets.statistics.aggregation.d.ts.map +1 -1
- package/dist/municipal/tickets/tickets.statistics.aggregation.js +14 -1
- package/dist/municipal/tickets/tickets.statistics.aggregation.js.map +1 -1
- package/dist/municipal/tickets/tickets.statistics.getters.js +2 -2
- package/dist/municipal/tickets/tickets.statistics.getters.js.map +1 -1
- package/dist/municipal/tickets/tickets.types.d.ts +1 -0
- package/dist/municipal/tickets/tickets.types.d.ts.map +1 -1
- package/dist/talkpilot/calls/calls.statistics.getters.d.ts.map +1 -1
- package/dist/talkpilot/calls/calls.statistics.getters.js +6 -3
- package/dist/talkpilot/calls/calls.statistics.getters.js.map +1 -1
- package/dist/talkpilot/clientsConfig/clientsConfig.types.d.ts +1 -1
- package/dist/talkpilot/clientsConfig/clientsConfig.types.d.ts.map +1 -1
- package/jest.config.js +20 -20
- package/package.json +46 -46
- package/src/connection.ts +54 -54
- package/src/index.ts +26 -26
- package/src/municipal/index.ts +22 -22
- package/src/municipal/muniIssues/__tests__/muniIssues.setters.spec.ts +92 -92
- package/src/municipal/muniIssues/__tests__/muniIssues.setup.spec.ts +92 -92
- package/src/municipal/muniIssues/index.ts +17 -17
- package/src/municipal/muniIssues/muniIssues.constants.ts +18 -18
- package/src/municipal/muniIssues/muniIssues.getters.ts +24 -24
- package/src/municipal/muniIssues/muniIssues.schema.ts +66 -66
- package/src/municipal/muniIssues/muniIssues.setters.ts +24 -24
- package/src/municipal/muniIssues/muniIssues.setup.ts +65 -65
- package/src/municipal/muniIssues/muniIssues.types.ts +37 -37
- package/src/municipal/tickets/__tests__/tickets.getters.spec.ts +30 -30
- package/src/municipal/tickets/__tests__/tickets.statistics.spec.ts +94 -68
- package/src/municipal/tickets/index.ts +3 -3
- package/src/municipal/tickets/tickets.constants.ts +8 -8
- package/src/municipal/tickets/tickets.getters.ts +121 -121
- package/src/municipal/tickets/tickets.statistics.aggregation.ts +110 -96
- package/src/municipal/tickets/tickets.statistics.getters.ts +109 -109
- package/src/municipal/tickets/tickets.types.ts +54 -53
- package/src/talkpilot/calls/__tests__/calls.dashboard.spec.ts +149 -149
- package/src/talkpilot/calls/__tests__/calls.statistics.spec.ts +375 -351
- package/src/talkpilot/calls/calls.constants.ts +20 -20
- package/src/talkpilot/calls/calls.statistics.getters.ts +590 -587
- package/src/talkpilot/calls/calls.statistics.types.ts +47 -47
- package/src/talkpilot/calls/calls.types.ts +119 -119
- package/src/talkpilot/calls/dashboard/calls.dashboard.ts +292 -292
- package/src/talkpilot/calls/dashboard/calls.dashboard.types.ts +57 -57
- package/src/talkpilot/calls/index.ts +6 -6
- package/src/talkpilot/clientsConfig/__tests__/clientsConfig.spec.ts +190 -190
- package/src/talkpilot/clientsConfig/clientsConfig.types.ts +1 -1
- package/src/talkpilot/contextNotes/__tests__/contextNotes.getters.spec.ts +176 -176
- package/src/talkpilot/contextNotes/contextNotes.getters.ts +86 -86
- package/src/talkpilot/contextNotes/contextNotes.types.ts +20 -20
- package/src/talkpilot/contextNotes/index.ts +2 -2
- package/src/talkpilot/flows/__tests__/flows.schema.spec.ts +96 -96
- package/src/talkpilot/flows/flows.schema.ts +154 -154
- package/src/talkpilot/flows/flows.types.ts +187 -187
- package/src/talkpilot/index.ts +31 -31
- package/src/talkpilot/products/__tests__/products.getters.spec.ts +45 -45
- package/src/talkpilot/products/index.ts +2 -2
- package/src/talkpilot/products/products.getters.ts +12 -12
- package/src/talkpilot/products/products.types.ts +9 -9
- package/src/test-utils/db-utils.ts +26 -26
- package/src/test-utils/factories/index.ts +15 -15
- package/src/test-utils/factories/municipal/muniIssues.ts +32 -32
- package/src/test-utils/factories/talkpilot/contextNotes.ts +33 -33
- package/src/test-utils/factories/websitalk/scans.ts +23 -23
- package/src/utils/date.utils.ts +116 -116
- package/src/websitalk/index.ts +15 -15
- package/src/websitalk/mongodb-client.ts +61 -61
- package/src/websitalk/scans/__tests__/scans.spec.ts +218 -218
- package/src/websitalk/scans/index.ts +2 -2
- package/src/websitalk/scans/scans.getters.ts +113 -113
- package/src/websitalk/scans/scans.types.ts +53 -53
- package/tsconfig.json +23 -23
- package/dist/talkpilot/calls/calls.dashboard.d.ts +0 -3
- package/dist/talkpilot/calls/calls.dashboard.d.ts.map +0 -1
- package/dist/talkpilot/calls/calls.dashboard.js +0 -191
- package/dist/talkpilot/calls/calls.dashboard.js.map +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
/** Customer role within a conference call. */
|
|
2
|
-
export const CONFERENCE_ROLE_CUSTOMER = "customer" as const;
|
|
3
|
-
|
|
4
|
-
/** Supervisor role within a conference call. */
|
|
5
|
-
export const CONFERENCE_ROLE_SUPERVISOR = "supervisor" as const;
|
|
6
|
-
|
|
7
|
-
/** Hours in a single day. */
|
|
8
|
-
export const HOURS_PER_DAY = 24;
|
|
9
|
-
|
|
10
|
-
/** Max execution time (ms) for calls statistics aggregations. */
|
|
11
|
-
export const STATS_MAX_TIME_MS = 30_000;
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* When the client calls bar chart should group by week or month instead of day:
|
|
15
|
-
* > MONTH threshold -> one bar per month
|
|
16
|
-
* > WEEK threshold -> one bar per week
|
|
17
|
-
* otherwise -> one bar per day
|
|
18
|
-
*/
|
|
19
|
-
export const TREND_MONTH_BUCKET_MIN_MONTHS = 6;
|
|
20
|
-
export const TREND_WEEK_BUCKET_MIN_MONTHS = 3;
|
|
1
|
+
/** Customer role within a conference call. */
|
|
2
|
+
export const CONFERENCE_ROLE_CUSTOMER = "customer" as const;
|
|
3
|
+
|
|
4
|
+
/** Supervisor role within a conference call. */
|
|
5
|
+
export const CONFERENCE_ROLE_SUPERVISOR = "supervisor" as const;
|
|
6
|
+
|
|
7
|
+
/** Hours in a single day. */
|
|
8
|
+
export const HOURS_PER_DAY = 24;
|
|
9
|
+
|
|
10
|
+
/** Max execution time (ms) for calls statistics aggregations. */
|
|
11
|
+
export const STATS_MAX_TIME_MS = 30_000;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* When the client calls bar chart should group by week or month instead of day:
|
|
15
|
+
* > MONTH threshold -> one bar per month
|
|
16
|
+
* > WEEK threshold -> one bar per week
|
|
17
|
+
* otherwise -> one bar per day
|
|
18
|
+
*/
|
|
19
|
+
export const TREND_MONTH_BUCKET_MIN_MONTHS = 6;
|
|
20
|
+
export const TREND_WEEK_BUCKET_MIN_MONTHS = 3;
|