@talkpilot/core-db 1.3.6 → 1.3.8
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 +243 -190
- package/README_OLD.md +160 -160
- package/dist/municipal/tickets/tickets.statistics.getters.d.ts +4 -0
- package/dist/municipal/tickets/tickets.statistics.getters.d.ts.map +1 -1
- package/dist/municipal/tickets/tickets.statistics.getters.js +30 -3
- package/dist/municipal/tickets/tickets.statistics.getters.js.map +1 -1
- package/dist/talkpilot/calls/calls.dashboard.d.ts +3 -0
- package/dist/talkpilot/calls/calls.dashboard.d.ts.map +1 -0
- package/dist/talkpilot/calls/calls.dashboard.js +191 -0
- package/dist/talkpilot/calls/calls.dashboard.js.map +1 -0
- package/dist/talkpilot/calls/calls.statistics.getters.js +12 -15
- package/dist/talkpilot/calls/calls.statistics.getters.js.map +1 -1
- package/dist/talkpilot/calls/calls.statistics.types.d.ts +4 -1
- package/dist/talkpilot/calls/calls.statistics.types.d.ts.map +1 -1
- package/dist/talkpilot/flows/flows.schema.d.ts +3 -0
- package/dist/talkpilot/flows/flows.schema.d.ts.map +1 -1
- package/dist/talkpilot/flows/flows.schema.js +1 -0
- package/dist/talkpilot/flows/flows.schema.js.map +1 -1
- package/dist/talkpilot/flows/flows.types.d.ts +1 -0
- package/dist/talkpilot/flows/flows.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 +68 -51
- 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 +96 -96
- package/src/municipal/tickets/tickets.statistics.getters.ts +109 -71
- package/src/municipal/tickets/tickets.types.ts +53 -53
- package/src/talkpilot/calls/__tests__/calls.dashboard.spec.ts +149 -149
- package/src/talkpilot/calls/__tests__/calls.statistics.spec.ts +351 -344
- package/src/talkpilot/calls/calls.constants.ts +20 -20
- package/src/talkpilot/calls/calls.statistics.getters.ts +587 -587
- package/src/talkpilot/calls/calls.statistics.types.ts +47 -44
- 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/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 -71
- package/src/talkpilot/flows/flows.schema.ts +154 -153
- package/src/talkpilot/flows/flows.types.ts +187 -186
- 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
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { WithId } from "mongodb";
|
|
2
|
-
|
|
3
|
-
export type ScanStatus =
|
|
4
|
-
| "CHECKING"
|
|
5
|
-
| "PREPARING"
|
|
6
|
-
| "SCANNING"
|
|
7
|
-
| "PROCESSING"
|
|
8
|
-
| "COMPLETED"
|
|
9
|
-
| "FAILED";
|
|
10
|
-
|
|
11
|
-
export type ActiveScanStatus =
|
|
12
|
-
| { isActive: true; status: ScanStatus }
|
|
13
|
-
| { isActive: false };
|
|
14
|
-
|
|
15
|
-
export type SiteChromeEntry = {
|
|
16
|
-
url: string;
|
|
17
|
-
urlCanonical?: string | null;
|
|
18
|
-
title?: string | null;
|
|
19
|
-
h1?: string | null;
|
|
20
|
-
language?: string | null;
|
|
21
|
-
sourceType?: string | null;
|
|
22
|
-
status?: string | null;
|
|
23
|
-
context?: string | null;
|
|
24
|
-
contentHash?: string | null;
|
|
25
|
-
errorMessage?: string | null;
|
|
26
|
-
breadcrumbs?: unknown;
|
|
27
|
-
description?: string | null;
|
|
28
|
-
sourceUrl?: string | null;
|
|
29
|
-
fetchedAt?: Date | null;
|
|
30
|
-
createdAt?: Date;
|
|
31
|
-
updatedAt?: Date;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export type SkippedEntry = {
|
|
35
|
-
path: string;
|
|
36
|
-
reason: string;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export type Scan = {
|
|
40
|
-
clientId: string;
|
|
41
|
-
baseUrl: string;
|
|
42
|
-
notifyPhoneNumber?: string | null;
|
|
43
|
-
status: ScanStatus;
|
|
44
|
-
activeTasksCount: number;
|
|
45
|
-
pagesScanned: number;
|
|
46
|
-
pagesSkipped: number;
|
|
47
|
-
skipped: SkippedEntry[];
|
|
48
|
-
siteChrome: SiteChromeEntry;
|
|
49
|
-
createdAt: Date;
|
|
50
|
-
updatedAt: Date;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
export type ScanDoc = WithId<Scan>;
|
|
1
|
+
import { WithId } from "mongodb";
|
|
2
|
+
|
|
3
|
+
export type ScanStatus =
|
|
4
|
+
| "CHECKING"
|
|
5
|
+
| "PREPARING"
|
|
6
|
+
| "SCANNING"
|
|
7
|
+
| "PROCESSING"
|
|
8
|
+
| "COMPLETED"
|
|
9
|
+
| "FAILED";
|
|
10
|
+
|
|
11
|
+
export type ActiveScanStatus =
|
|
12
|
+
| { isActive: true; status: ScanStatus }
|
|
13
|
+
| { isActive: false };
|
|
14
|
+
|
|
15
|
+
export type SiteChromeEntry = {
|
|
16
|
+
url: string;
|
|
17
|
+
urlCanonical?: string | null;
|
|
18
|
+
title?: string | null;
|
|
19
|
+
h1?: string | null;
|
|
20
|
+
language?: string | null;
|
|
21
|
+
sourceType?: string | null;
|
|
22
|
+
status?: string | null;
|
|
23
|
+
context?: string | null;
|
|
24
|
+
contentHash?: string | null;
|
|
25
|
+
errorMessage?: string | null;
|
|
26
|
+
breadcrumbs?: unknown;
|
|
27
|
+
description?: string | null;
|
|
28
|
+
sourceUrl?: string | null;
|
|
29
|
+
fetchedAt?: Date | null;
|
|
30
|
+
createdAt?: Date;
|
|
31
|
+
updatedAt?: Date;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type SkippedEntry = {
|
|
35
|
+
path: string;
|
|
36
|
+
reason: string;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export type Scan = {
|
|
40
|
+
clientId: string;
|
|
41
|
+
baseUrl: string;
|
|
42
|
+
notifyPhoneNumber?: string | null;
|
|
43
|
+
status: ScanStatus;
|
|
44
|
+
activeTasksCount: number;
|
|
45
|
+
pagesScanned: number;
|
|
46
|
+
pagesSkipped: number;
|
|
47
|
+
skipped: SkippedEntry[];
|
|
48
|
+
siteChrome: SiteChromeEntry;
|
|
49
|
+
createdAt: Date;
|
|
50
|
+
updatedAt: Date;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export type ScanDoc = WithId<Scan>;
|
package/tsconfig.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"module": "CommonJS",
|
|
5
|
-
"moduleResolution": "node",
|
|
6
|
-
"lib": ["ES2022"],
|
|
7
|
-
"declaration": true,
|
|
8
|
-
"declarationMap": true,
|
|
9
|
-
"sourceMap": true,
|
|
10
|
-
"outDir": "dist",
|
|
11
|
-
"rootDir": "src",
|
|
12
|
-
"strict": true,
|
|
13
|
-
"esModuleInterop": true,
|
|
14
|
-
"forceConsistentCasingInFileNames": true,
|
|
15
|
-
"skipLibCheck": true,
|
|
16
|
-
"resolveJsonModule": true,
|
|
17
|
-
"experimentalDecorators": true,
|
|
18
|
-
"emitDecoratorMetadata": true,
|
|
19
|
-
"baseUrl": "."
|
|
20
|
-
},
|
|
21
|
-
"include": ["src/**/*"],
|
|
22
|
-
"exclude": ["node_modules", "dist", "test", "**/*.test.ts", "**/__tests__/*", "**/*.spec.ts"]
|
|
23
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2022",
|
|
4
|
+
"module": "CommonJS",
|
|
5
|
+
"moduleResolution": "node",
|
|
6
|
+
"lib": ["ES2022"],
|
|
7
|
+
"declaration": true,
|
|
8
|
+
"declarationMap": true,
|
|
9
|
+
"sourceMap": true,
|
|
10
|
+
"outDir": "dist",
|
|
11
|
+
"rootDir": "src",
|
|
12
|
+
"strict": true,
|
|
13
|
+
"esModuleInterop": true,
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"skipLibCheck": true,
|
|
16
|
+
"resolveJsonModule": true,
|
|
17
|
+
"experimentalDecorators": true,
|
|
18
|
+
"emitDecoratorMetadata": true,
|
|
19
|
+
"baseUrl": "."
|
|
20
|
+
},
|
|
21
|
+
"include": ["src/**/*"],
|
|
22
|
+
"exclude": ["node_modules", "dist", "test", "**/*.test.ts", "**/__tests__/*", "**/*.spec.ts"]
|
|
23
|
+
}
|