@aiquants/daily-report 0.34.0 → 0.36.0
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/CHANGELOG.md +146 -0
- package/README.md +326 -72
- package/dist/client.d.mts +62 -24
- package/dist/client.d.ts +62 -24
- package/dist/client.js +5 -5
- package/dist/client.mjs +5 -5
- package/dist/{comment-adapter-7TduiLiu.d.mts → comment-adapter-BvGGQkBE.d.ts} +72 -26
- package/dist/{comment-adapter-BLfjD6P0.d.ts → comment-adapter-pzx3O8_h.d.mts} +72 -26
- package/dist/index.d.mts +10 -3
- package/dist/index.d.ts +10 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/search-marks-wire-DCFuK5yr.d.mts +35 -0
- package/dist/search-marks-wire-DCFuK5yr.d.ts +35 -0
- package/dist/server.d.mts +272 -18
- package/dist/server.d.ts +272 -18
- package/dist/server.js +11 -4
- package/dist/server.mjs +11 -4
- package/dist/{sse-schema-DVIUaiAG.d.mts → sse-schema-getLS62T.d.mts} +1 -1
- package/dist/{sse-schema-DVIUaiAG.d.ts → sse-schema-getLS62T.d.ts} +1 -1
- package/dist/styles/daily-report.standalone.css +1 -1
- package/package.json +2 -1
package/dist/server.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { c as DailyReportSseMessage,
|
|
1
|
+
import { c as DailyReportSseMessage, k as DailyReportInterviewer, j as DailyReportExternalComment, D as DailyReportItem, d as DailyReportDetail, i as DailyReportAttachmentSummary, m as DailyReportPostedComment } from "./sse-schema-getLS62T.js";
|
|
2
2
|
import * as drizzle_orm_mssql_core from "drizzle-orm/mssql-core";
|
|
3
3
|
import { AnyMsSqlColumn } from "drizzle-orm/mssql-core";
|
|
4
|
+
import { a as DailyReportLogger, b as DailyReportSearchCombine, g as DailyReportSearchAlternative, d as DailyReportSearchHit, e as DailyReportSearchMarksAnswer } from "./search-marks-wire-DCFuK5yr.js";
|
|
5
|
+
export { h as DailyReportSearchAlternativeTier } from "./search-marks-wire-DCFuK5yr.js";
|
|
4
6
|
import { TransactionRetryOptions } from "@aiquants/mssql";
|
|
7
|
+
import { SQL } from "drizzle-orm";
|
|
5
8
|
import "zod";
|
|
6
9
|
type RedisStreamMessage = {
|
|
7
10
|
id: string;
|
|
@@ -130,11 +133,16 @@ type DailyReportAttachmentThumbnailRenderer = {
|
|
|
130
133
|
signal: AbortSignal;
|
|
131
134
|
}) => Promise<DailyReportAttachmentThumbnail | DailyReportAttachmentThumbnailError>;
|
|
132
135
|
};
|
|
136
|
+
type SqlResultCacheMissAdmission = {
|
|
137
|
+
readonly signal: AbortSignal;
|
|
138
|
+
readonly acquire: (signal: AbortSignal) => Promise<(() => void) | null>;
|
|
139
|
+
};
|
|
133
140
|
type SqlResultCacheQueryOptions = {
|
|
134
141
|
forceRefresh?: boolean;
|
|
135
142
|
snapshot?: boolean;
|
|
136
143
|
ttlMsOverride?: number;
|
|
137
144
|
epochKey?: string;
|
|
145
|
+
admission?: SqlResultCacheMissAdmission;
|
|
138
146
|
refreshAheadRatio?: number;
|
|
139
147
|
};
|
|
140
148
|
declare const createEpochStore: (redis?: DailyReportRedisProvider) => {
|
|
@@ -143,14 +151,18 @@ declare const createEpochStore: (redis?: DailyReportRedisProvider) => {
|
|
|
143
151
|
};
|
|
144
152
|
type EpochStore = ReturnType<typeof createEpochStore>;
|
|
145
153
|
declare class SqlResultCache {
|
|
146
|
-
private readonly config;
|
|
147
154
|
private readonly epochStore;
|
|
148
155
|
private readonly buckets;
|
|
149
156
|
private readonly inFlight;
|
|
150
157
|
private readonly forcedFetches;
|
|
158
|
+
private readonly defaultTtlMs;
|
|
159
|
+
private readonly maxBuckets;
|
|
160
|
+
private lastSweepAt;
|
|
151
161
|
constructor(config: {
|
|
152
|
-
defaultTtlMs: number;
|
|
162
|
+
readonly defaultTtlMs: number;
|
|
163
|
+
readonly maxBuckets: number;
|
|
153
164
|
}, epochStore: EpochStore);
|
|
165
|
+
private writeBucket;
|
|
154
166
|
private maybeRefreshAhead;
|
|
155
167
|
private startFetch;
|
|
156
168
|
private forcedFetch;
|
|
@@ -160,15 +172,10 @@ declare class SqlResultCache {
|
|
|
160
172
|
fetcher: () => Promise<readonly T[]>;
|
|
161
173
|
onFetchStart?: () => void;
|
|
162
174
|
} & SqlResultCacheQueryOptions) => Promise<readonly T[]>;
|
|
175
|
+
private readOwnOrRetry;
|
|
163
176
|
clearAll: () => void;
|
|
164
177
|
invalidatePrefix: (prefix: string) => void;
|
|
165
|
-
private
|
|
166
|
-
}
|
|
167
|
-
interface DailyReportLogger {
|
|
168
|
-
debug(message?: unknown, ...optionalParams: unknown[]): void;
|
|
169
|
-
info(message?: unknown, ...optionalParams: unknown[]): void;
|
|
170
|
-
warn(message?: unknown, ...optionalParams: unknown[]): void;
|
|
171
|
-
error(message?: unknown, ...optionalParams: unknown[]): void;
|
|
178
|
+
private sweepExpired;
|
|
172
179
|
}
|
|
173
180
|
type ExternalReportFields = {
|
|
174
181
|
content?: string | null;
|
|
@@ -1476,6 +1483,245 @@ declare function defineDailyReportSchema<S extends string>(schemaName: S, opts:
|
|
|
1476
1483
|
dialect: "mssql";
|
|
1477
1484
|
}>;
|
|
1478
1485
|
};
|
|
1486
|
+
type DailyReportSearchDocumentTable = {
|
|
1487
|
+
hubId: AnyMsSqlColumn;
|
|
1488
|
+
searchText: AnyMsSqlColumn;
|
|
1489
|
+
sourceDigest: AnyMsSqlColumn;
|
|
1490
|
+
normalizerVersion: AnyMsSqlColumn;
|
|
1491
|
+
indexedAt: AnyMsSqlColumn;
|
|
1492
|
+
rowVersion: AnyMsSqlColumn;
|
|
1493
|
+
};
|
|
1494
|
+
type DailyReportSearchCommentTable = {
|
|
1495
|
+
hubId: AnyMsSqlColumn;
|
|
1496
|
+
ordinal: AnyMsSqlColumn;
|
|
1497
|
+
authorUserId: AnyMsSqlColumn;
|
|
1498
|
+
commentText: AnyMsSqlColumn;
|
|
1499
|
+
};
|
|
1500
|
+
type DailyReportSearchTables = {
|
|
1501
|
+
document: DailyReportSearchDocumentTable;
|
|
1502
|
+
comment: DailyReportSearchCommentTable;
|
|
1503
|
+
};
|
|
1504
|
+
declare function defineDailyReportSearchSchema<S extends string>(schemaName: S): {
|
|
1505
|
+
document: drizzle_orm_mssql_core.MsSqlTableWithColumns<{
|
|
1506
|
+
name: "DailyReportSearchDocument";
|
|
1507
|
+
schema: S;
|
|
1508
|
+
columns: {
|
|
1509
|
+
hubId: drizzle_orm_mssql_core.MsSqlColumn<{
|
|
1510
|
+
name: string;
|
|
1511
|
+
tableName: "DailyReportSearchDocument";
|
|
1512
|
+
dataType: "number int53";
|
|
1513
|
+
data: number;
|
|
1514
|
+
driverParam: string;
|
|
1515
|
+
notNull: true;
|
|
1516
|
+
hasDefault: false;
|
|
1517
|
+
isPrimaryKey: false;
|
|
1518
|
+
isAutoincrement: false;
|
|
1519
|
+
hasRuntimeDefault: false;
|
|
1520
|
+
enumValues: undefined;
|
|
1521
|
+
baseColumn: never;
|
|
1522
|
+
identity: undefined;
|
|
1523
|
+
generated: undefined;
|
|
1524
|
+
}, {}>;
|
|
1525
|
+
searchText: drizzle_orm_mssql_core.MsSqlColumn<{
|
|
1526
|
+
name: string;
|
|
1527
|
+
tableName: "DailyReportSearchDocument";
|
|
1528
|
+
dataType: "string";
|
|
1529
|
+
data: string;
|
|
1530
|
+
driverParam: string | number;
|
|
1531
|
+
notNull: true;
|
|
1532
|
+
hasDefault: false;
|
|
1533
|
+
isPrimaryKey: false;
|
|
1534
|
+
isAutoincrement: false;
|
|
1535
|
+
hasRuntimeDefault: false;
|
|
1536
|
+
enumValues: [
|
|
1537
|
+
string,
|
|
1538
|
+
...string[]
|
|
1539
|
+
];
|
|
1540
|
+
baseColumn: never;
|
|
1541
|
+
identity: undefined;
|
|
1542
|
+
generated: undefined;
|
|
1543
|
+
}, {}>;
|
|
1544
|
+
sourceDigest: drizzle_orm_mssql_core.MsSqlColumn<{
|
|
1545
|
+
name: string;
|
|
1546
|
+
tableName: "DailyReportSearchDocument";
|
|
1547
|
+
dataType: "object buffer";
|
|
1548
|
+
data: Buffer<ArrayBufferLike>;
|
|
1549
|
+
driverParam: Buffer<ArrayBufferLike>;
|
|
1550
|
+
notNull: true;
|
|
1551
|
+
hasDefault: false;
|
|
1552
|
+
isPrimaryKey: false;
|
|
1553
|
+
isAutoincrement: false;
|
|
1554
|
+
hasRuntimeDefault: false;
|
|
1555
|
+
enumValues: undefined;
|
|
1556
|
+
baseColumn: never;
|
|
1557
|
+
identity: undefined;
|
|
1558
|
+
generated: undefined;
|
|
1559
|
+
}, {}>;
|
|
1560
|
+
normalizerVersion: drizzle_orm_mssql_core.MsSqlColumn<{
|
|
1561
|
+
name: string;
|
|
1562
|
+
tableName: "DailyReportSearchDocument";
|
|
1563
|
+
dataType: "string";
|
|
1564
|
+
data: string;
|
|
1565
|
+
driverParam: string | number;
|
|
1566
|
+
notNull: true;
|
|
1567
|
+
hasDefault: false;
|
|
1568
|
+
isPrimaryKey: false;
|
|
1569
|
+
isAutoincrement: false;
|
|
1570
|
+
hasRuntimeDefault: false;
|
|
1571
|
+
enumValues: [
|
|
1572
|
+
string,
|
|
1573
|
+
...string[]
|
|
1574
|
+
];
|
|
1575
|
+
baseColumn: never;
|
|
1576
|
+
identity: undefined;
|
|
1577
|
+
generated: undefined;
|
|
1578
|
+
}, {}>;
|
|
1579
|
+
indexedAt: drizzle_orm_mssql_core.MsSqlColumn<{
|
|
1580
|
+
name: string;
|
|
1581
|
+
tableName: "DailyReportSearchDocument";
|
|
1582
|
+
dataType: "object date";
|
|
1583
|
+
data: Date;
|
|
1584
|
+
driverParam: string | Date;
|
|
1585
|
+
notNull: true;
|
|
1586
|
+
hasDefault: false;
|
|
1587
|
+
isPrimaryKey: false;
|
|
1588
|
+
isAutoincrement: false;
|
|
1589
|
+
hasRuntimeDefault: false;
|
|
1590
|
+
enumValues: undefined;
|
|
1591
|
+
baseColumn: never;
|
|
1592
|
+
identity: undefined;
|
|
1593
|
+
generated: undefined;
|
|
1594
|
+
}, {}>;
|
|
1595
|
+
rowVersion: drizzle_orm_mssql_core.MsSqlColumn<{
|
|
1596
|
+
name: string;
|
|
1597
|
+
tableName: "DailyReportSearchDocument";
|
|
1598
|
+
dataType: "object buffer";
|
|
1599
|
+
data: Buffer<ArrayBufferLike>;
|
|
1600
|
+
driverParam: Buffer<ArrayBufferLike>;
|
|
1601
|
+
notNull: true;
|
|
1602
|
+
hasDefault: false;
|
|
1603
|
+
isPrimaryKey: false;
|
|
1604
|
+
isAutoincrement: false;
|
|
1605
|
+
hasRuntimeDefault: false;
|
|
1606
|
+
enumValues: undefined;
|
|
1607
|
+
baseColumn: never;
|
|
1608
|
+
identity: undefined;
|
|
1609
|
+
generated: undefined;
|
|
1610
|
+
}, {}>;
|
|
1611
|
+
};
|
|
1612
|
+
dialect: "mssql";
|
|
1613
|
+
}>;
|
|
1614
|
+
comment: drizzle_orm_mssql_core.MsSqlTableWithColumns<{
|
|
1615
|
+
name: "DailyReportSearchComment";
|
|
1616
|
+
schema: S;
|
|
1617
|
+
columns: {
|
|
1618
|
+
hubId: drizzle_orm_mssql_core.MsSqlColumn<{
|
|
1619
|
+
name: string;
|
|
1620
|
+
tableName: "DailyReportSearchComment";
|
|
1621
|
+
dataType: "number int53";
|
|
1622
|
+
data: number;
|
|
1623
|
+
driverParam: string;
|
|
1624
|
+
notNull: true;
|
|
1625
|
+
hasDefault: false;
|
|
1626
|
+
isPrimaryKey: false;
|
|
1627
|
+
isAutoincrement: false;
|
|
1628
|
+
hasRuntimeDefault: false;
|
|
1629
|
+
enumValues: undefined;
|
|
1630
|
+
baseColumn: never;
|
|
1631
|
+
identity: undefined;
|
|
1632
|
+
generated: undefined;
|
|
1633
|
+
}, {}>;
|
|
1634
|
+
ordinal: drizzle_orm_mssql_core.MsSqlColumn<{
|
|
1635
|
+
name: string;
|
|
1636
|
+
tableName: "DailyReportSearchComment";
|
|
1637
|
+
dataType: "number int32";
|
|
1638
|
+
data: number;
|
|
1639
|
+
driverParam: number;
|
|
1640
|
+
notNull: true;
|
|
1641
|
+
hasDefault: false;
|
|
1642
|
+
isPrimaryKey: false;
|
|
1643
|
+
isAutoincrement: false;
|
|
1644
|
+
hasRuntimeDefault: false;
|
|
1645
|
+
enumValues: undefined;
|
|
1646
|
+
baseColumn: never;
|
|
1647
|
+
identity: undefined;
|
|
1648
|
+
generated: undefined;
|
|
1649
|
+
}, {}>;
|
|
1650
|
+
authorUserId: drizzle_orm_mssql_core.MsSqlColumn<{
|
|
1651
|
+
name: string;
|
|
1652
|
+
tableName: "DailyReportSearchComment";
|
|
1653
|
+
dataType: "number int53";
|
|
1654
|
+
data: number;
|
|
1655
|
+
driverParam: string;
|
|
1656
|
+
notNull: false;
|
|
1657
|
+
hasDefault: false;
|
|
1658
|
+
isPrimaryKey: false;
|
|
1659
|
+
isAutoincrement: false;
|
|
1660
|
+
hasRuntimeDefault: false;
|
|
1661
|
+
enumValues: undefined;
|
|
1662
|
+
baseColumn: never;
|
|
1663
|
+
identity: undefined;
|
|
1664
|
+
generated: undefined;
|
|
1665
|
+
}, {}>;
|
|
1666
|
+
commentText: drizzle_orm_mssql_core.MsSqlColumn<{
|
|
1667
|
+
name: string;
|
|
1668
|
+
tableName: "DailyReportSearchComment";
|
|
1669
|
+
dataType: "string";
|
|
1670
|
+
data: string;
|
|
1671
|
+
driverParam: string | number;
|
|
1672
|
+
notNull: true;
|
|
1673
|
+
hasDefault: false;
|
|
1674
|
+
isPrimaryKey: false;
|
|
1675
|
+
isAutoincrement: false;
|
|
1676
|
+
hasRuntimeDefault: false;
|
|
1677
|
+
enumValues: [
|
|
1678
|
+
string,
|
|
1679
|
+
...string[]
|
|
1680
|
+
];
|
|
1681
|
+
baseColumn: never;
|
|
1682
|
+
identity: undefined;
|
|
1683
|
+
generated: undefined;
|
|
1684
|
+
}, {}>;
|
|
1685
|
+
};
|
|
1686
|
+
dialect: "mssql";
|
|
1687
|
+
}>;
|
|
1688
|
+
};
|
|
1689
|
+
type DailyReportSearchSourceTextReader = (db: DailyReportDb, sourceIdNums: readonly number[]) => Promise<ReadonlyMap<number, readonly string[]>>;
|
|
1690
|
+
type DailyReportSearchConfig = {
|
|
1691
|
+
tables: DailyReportSearchTables;
|
|
1692
|
+
externalSourceTexts?: Readonly<Record<string, DailyReportSearchSourceTextReader>>;
|
|
1693
|
+
concurrency: number;
|
|
1694
|
+
rateLimitPerMinute: number;
|
|
1695
|
+
};
|
|
1696
|
+
type DailyReportSearchSqlExecutor = {
|
|
1697
|
+
execute(query: SQL): Promise<unknown>;
|
|
1698
|
+
};
|
|
1699
|
+
type DailyReportSearchReconcileProgress = {
|
|
1700
|
+
readonly scanned: number;
|
|
1701
|
+
readonly written: number;
|
|
1702
|
+
readonly skipped: number;
|
|
1703
|
+
readonly forcedCuts: number;
|
|
1704
|
+
readonly lastHubId: number | null;
|
|
1705
|
+
};
|
|
1706
|
+
type DailyReportSearchReconcileSummary = DailyReportSearchReconcileProgress & {
|
|
1707
|
+
readonly elapsedMs: number;
|
|
1708
|
+
};
|
|
1709
|
+
type DailyReportSearchReconcileOptions = {
|
|
1710
|
+
readonly batchSize: number;
|
|
1711
|
+
readonly hubIds?: readonly number[];
|
|
1712
|
+
readonly signal?: AbortSignal;
|
|
1713
|
+
readonly onProgress?: (progress: DailyReportSearchReconcileProgress) => void;
|
|
1714
|
+
};
|
|
1715
|
+
type DailyReportSearchWord = {
|
|
1716
|
+
readonly alternatives: readonly DailyReportSearchAlternative[];
|
|
1717
|
+
};
|
|
1718
|
+
type DailyReportSearchSet = {
|
|
1719
|
+
readonly words: readonly DailyReportSearchWord[];
|
|
1720
|
+
};
|
|
1721
|
+
type DailyReportSearchPlan = {
|
|
1722
|
+
readonly combine: DailyReportSearchCombine;
|
|
1723
|
+
readonly sets: readonly DailyReportSearchSet[];
|
|
1724
|
+
};
|
|
1479
1725
|
type VisibleSourceTypeSet = ReadonlySet<string> | null;
|
|
1480
1726
|
declare class DailyReportViewerScope {
|
|
1481
1727
|
#private;
|
|
@@ -1546,7 +1792,7 @@ interface UpdateChain<T> {
|
|
|
1546
1792
|
interface DeleteChain {
|
|
1547
1793
|
where(cond: unknown): PromiseLike<unknown>;
|
|
1548
1794
|
}
|
|
1549
|
-
interface DailyReportDb {
|
|
1795
|
+
interface DailyReportDb extends DailyReportSearchSqlExecutor {
|
|
1550
1796
|
select<T = Record<string, unknown>>(fields?: unknown): SelectChain<T>;
|
|
1551
1797
|
insert<T = Record<string, unknown>>(t: unknown): InsertChain<T>;
|
|
1552
1798
|
update<T = Record<string, unknown>>(t: unknown): UpdateChain<T>;
|
|
@@ -1572,6 +1818,7 @@ type DailyReportServiceConfig = {
|
|
|
1572
1818
|
businessDateTtlMs?: number;
|
|
1573
1819
|
disableUserIdCache?: boolean;
|
|
1574
1820
|
attachments?: DailyReportAttachmentsConfig;
|
|
1821
|
+
search?: DailyReportSearchConfig;
|
|
1575
1822
|
logger?: DailyReportLogger;
|
|
1576
1823
|
};
|
|
1577
1824
|
type DailyReportService = ReturnType<typeof createDailyReportService>;
|
|
@@ -1592,19 +1839,27 @@ declare function createDailyReportService(config: DailyReportServiceConfig): {
|
|
|
1592
1839
|
thumbnails: AttachmentThumbnailDelivery | null;
|
|
1593
1840
|
}> | null;
|
|
1594
1841
|
titleMaxLength: number;
|
|
1842
|
+
searchLimits: {
|
|
1843
|
+
concurrency: number;
|
|
1844
|
+
rateLimitPerMinute: number;
|
|
1845
|
+
} | null;
|
|
1595
1846
|
clearCache: () => Promise<void>;
|
|
1596
1847
|
invalidateHubReadCaches: (hubIds: readonly number[], businessDates: readonly string[]) => Promise<void>;
|
|
1597
1848
|
getUserIdByExternalId: (externalId: string) => Promise<number | null>;
|
|
1598
|
-
getDailyReportIdsByExternalId: (scope: DailyReportViewerScope, externalId: string, { forceRefresh, snapshot, ttlMsOverride, onFetchStart }?: SqlResultCacheQueryOptions & {
|
|
1849
|
+
getDailyReportIdsByExternalId: (scope: DailyReportViewerScope, externalId: string, { forceRefresh, snapshot, ttlMsOverride, onFetchStart, admission }?: SqlResultCacheQueryOptions & {
|
|
1599
1850
|
onFetchStart?: () => void;
|
|
1600
1851
|
}) => Promise<DailyReportIdsSource>;
|
|
1601
1852
|
getDailyReportIdsFirstPageByExternalId: (scope: DailyReportViewerScope, externalId: string, limit: number) => Promise<DailyReportItem[]>;
|
|
1602
1853
|
readSseStreamAnchor: () => Promise<string | null>;
|
|
1603
|
-
getDailyReportsByBusinessDate: (scope: DailyReportViewerScope, businessDate: string, { forceRefresh, snapshot, ttlMsOverride }?: SqlResultCacheQueryOptions) => Promise<DailyReportDetail[]>;
|
|
1604
|
-
getDailyReportsByBusinessDateByExternalId: (scope: DailyReportViewerScope, businessDate: string, externalId: string, { forceRefresh, snapshot, ttlMsOverride }?: SqlResultCacheQueryOptions) => Promise<DailyReportDetail[]>;
|
|
1605
|
-
getDailyReportDetailById: (scope: DailyReportViewerScope, reportHubId: number, userId: number, { forceRefresh, snapshot, ttlMsOverride }?: SqlResultCacheQueryOptions) => Promise<DailyReportDetail | null>;
|
|
1854
|
+
getDailyReportsByBusinessDate: (scope: DailyReportViewerScope, businessDate: string, { forceRefresh, snapshot, ttlMsOverride }?: Omit<SqlResultCacheQueryOptions, "admission">) => Promise<DailyReportDetail[]>;
|
|
1855
|
+
getDailyReportsByBusinessDateByExternalId: (scope: DailyReportViewerScope, businessDate: string, externalId: string, { forceRefresh, snapshot, ttlMsOverride, admission }?: SqlResultCacheQueryOptions) => Promise<DailyReportDetail[]>;
|
|
1856
|
+
getDailyReportDetailById: (scope: DailyReportViewerScope, reportHubId: number, userId: number, { forceRefresh, snapshot, ttlMsOverride, admission }?: SqlResultCacheQueryOptions) => Promise<DailyReportDetail | null>;
|
|
1606
1857
|
getDailyReportDetailByIdByExternalId: (scope: DailyReportViewerScope, reportHubId: number, externalId: string, options?: SqlResultCacheQueryOptions) => Promise<DailyReportDetail | null>;
|
|
1858
|
+
getDailyReportDetailsByIdsByExternalId: (scope: DailyReportViewerScope, reportHubIds: readonly number[], externalId: string) => Promise<DailyReportDetail[]>;
|
|
1607
1859
|
getDraftLabelId: () => Promise<number | null>;
|
|
1860
|
+
searchDailyReports: (scope: DailyReportViewerScope, userId: number, plan: DailyReportSearchPlan) => Promise<DailyReportSearchHit[]>;
|
|
1861
|
+
markDailyReportSearchHits: (scope: DailyReportViewerScope, userId: number, plan: DailyReportSearchPlan, reportHubIds: readonly number[]) => Promise<DailyReportSearchMarksAnswer>;
|
|
1862
|
+
reconcileSearchIndex: (options: DailyReportSearchReconcileOptions) => Promise<DailyReportSearchReconcileSummary>;
|
|
1608
1863
|
getAttachmentsByHubIds: (hubIds: number[]) => Promise<Map<number, DailyReportAttachmentSummary[]>>;
|
|
1609
1864
|
getAttachmentForUser: (scope: DailyReportViewerScope, attachmentId: number, userId: number) => Promise<{
|
|
1610
1865
|
fileName: string;
|
|
@@ -1691,8 +1946,6 @@ declare class DailyReportSseReader implements DailyReportSseReaderPort {
|
|
|
1691
1946
|
private _readLoop;
|
|
1692
1947
|
private _invalidateCaches;
|
|
1693
1948
|
}
|
|
1694
|
-
declare const generateETag: (data: unknown) => string;
|
|
1695
|
-
declare const jsonResponseWithETag: (request: Request, cookie: string | null, payload: Record<string, unknown>, status?: number) => Response;
|
|
1696
1949
|
type SharpHeaderLike = {
|
|
1697
1950
|
width: number;
|
|
1698
1951
|
height: number;
|
|
@@ -1797,6 +2050,7 @@ type DailyReportServerConfig = Omit<DailyReportServiceConfig, "cache" | "epochs"
|
|
|
1797
2050
|
loginRedirectPath?: string;
|
|
1798
2051
|
enableDevCacheClear?: boolean;
|
|
1799
2052
|
cacheDefaultTtlMs?: number;
|
|
2053
|
+
cacheMaxBuckets?: number;
|
|
1800
2054
|
externalSources?: DailyReportExternalSource[];
|
|
1801
2055
|
};
|
|
1802
2056
|
type DailyReportServer = DailyReportHandlers & {
|
|
@@ -1808,4 +2062,4 @@ type DailyReportServer = DailyReportHandlers & {
|
|
|
1808
2062
|
knownSourceTypes: readonly string[];
|
|
1809
2063
|
};
|
|
1810
2064
|
declare function createDailyReportServer(config: DailyReportServerConfig): DailyReportServer;
|
|
1811
|
-
export { DAILY_REPORT_ATTACHMENT_THUMBNAIL_MAX_OUTPUT_BYTES, DAILY_REPORT_ATTACHMENT_THUMBNAIL_OUTPUT_MEDIA_TYPES, DAILY_REPORT_SHARP_THUMBNAIL_DECODE_BUDGET_BYTES, DAILY_REPORT_SHARP_THUMBNAIL_DECODE_WORK_MODEL, DAILY_REPORT_SHARP_THUMBNAIL_WORKING_SET_MODEL, DAILY_REPORT_SSE_CATCH_UP_BATCH, DAILY_REPORT_SSE_VISIBILITY_REFRESH_MS, type DailyReportAttachmentDelivery, type DailyReportAttachmentError, type DailyReportAttachmentFailure, type DailyReportAttachmentThumbnail, type DailyReportAttachmentThumbnailOutputMediaType, type DailyReportAttachmentThumbnailRenderer, type DailyReportAttachmentThumbnailSourceFormat, type DailyReportAttachmentThumbnailsConfig, type DailyReportAttachmentsConfig, type DailyReportAuthResult, type DailyReportAuthenticate, type DailyReportClientTempId, type DailyReportDb, type DailyReportHandlers, type DailyReportHandlersConfig, type DailyReportIdCodec, type DailyReportReadAttachment, type DailyReportRedisProvider, type DailyReportServer, type DailyReportServerConfig, type DailyReportServiceConfig, DailyReportSseReader, type DailyReportSseReaderPort, type DailyReportTables, DailyReportViewerScope, type ExternalReportFields, type SharpLike, SqlResultCache, type StreamEntry, createDailyReportHandlers, createDailyReportServer, createDailyReportService, createEpochStore, createSharpThumbnailRenderer, defineDailyReportSchema,
|
|
2065
|
+
export { DAILY_REPORT_ATTACHMENT_THUMBNAIL_MAX_OUTPUT_BYTES, DAILY_REPORT_ATTACHMENT_THUMBNAIL_OUTPUT_MEDIA_TYPES, DAILY_REPORT_SHARP_THUMBNAIL_DECODE_BUDGET_BYTES, DAILY_REPORT_SHARP_THUMBNAIL_DECODE_WORK_MODEL, DAILY_REPORT_SHARP_THUMBNAIL_WORKING_SET_MODEL, DAILY_REPORT_SSE_CATCH_UP_BATCH, DAILY_REPORT_SSE_VISIBILITY_REFRESH_MS, type DailyReportAttachmentBytes, type DailyReportAttachmentDelivery, type DailyReportAttachmentError, type DailyReportAttachmentFailure, type DailyReportAttachmentTable, type DailyReportAttachmentThumbnail, type AttachmentThumbnailDelivery as DailyReportAttachmentThumbnailDelivery, type DailyReportAttachmentThumbnailError, type DailyReportAttachmentThumbnailFailure, type DailyReportAttachmentThumbnailOutputMediaType, type DailyReportAttachmentThumbnailRenderer, type DailyReportAttachmentThumbnailSourceFormat, type DailyReportAttachmentThumbnailsConfig, type DailyReportAttachmentsConfig, type DailyReportAuthResult, type DailyReportAuthenticate, type DailyReportClientTempId, type DailyReportCommentTable, type DailyReportDb, type DeleteChain as DailyReportDbDeleteChain, type InsertChain as DailyReportDbInsertChain, type Rows as DailyReportDbRows, type SelectChain as DailyReportDbSelectChain, type UpdateChain as DailyReportDbUpdateChain, type DailyReportEncodeUserId, type EpochStore as DailyReportEpochStore, type DailyReportExternalSource, type DailyReportHandlers, type DailyReportHandlersConfig, type DailyReportHubLabelTable, type DailyReportHubRow, type DailyReportHubTable, type DailyReportIdCodec, type DailyReportIdsSource, type DailyReportInternalRow, type DailyReportInternalTable, type DailyReportLabelTable, type DailyReportReadAttachment, type DailyReportRedisBlockingClient, type DailyReportRedisClient, type DailyReportRedisProvider, type RedisStreamMessage as DailyReportRedisStreamMessage, type DailyReportResolveUserId, type DailyReportResolveVisibleSourceTypes, type ResourceRouteArgs as DailyReportResourceRouteArgs, DailyReportSearchAlternative, type DailyReportSearchCommentTable, type DailyReportSearchConfig, type DailyReportSearchDocumentTable, type DailyReportSearchPlan, type DailyReportSearchReconcileOptions, type DailyReportSearchReconcileProgress, type DailyReportSearchReconcileSummary, type DailyReportSearchSet, type DailyReportSearchSourceTextReader, type DailyReportSearchSqlExecutor, type DailyReportSearchTables, type DailyReportSearchWord, type DailyReportServer, type DailyReportServerConfig, type DailyReportService, type DailyReportServiceConfig, type SharpHeaderLike as DailyReportSharpHeaderLike, type SharpPipelineLike as DailyReportSharpPipelineLike, type SqlResultCacheMissAdmission as DailyReportSqlResultCacheMissAdmission, type SqlResultCacheQueryOptions as DailyReportSqlResultCacheQueryOptions, type DailyReportSseEntryMessage, DailyReportSseReader, type DailyReportSseReaderConfig, type DailyReportSseReaderPort, type DailyReportTables, type DailyReportUserStatusRow, type DailyReportUserStatusTable, type DailyReportUserTable, DailyReportViewerScope, type DailyReportVisibilityDimensions, type DailyReportVisibilityResolveContext, type DailyReportVisibilityResolveReason, type VisibleSourceTypeSet as DailyReportVisibleSourceTypeSet, type DailyReportVisibleSourceTypes, type ExternalReportFields, type SharpLike, SqlResultCache, type StreamEntry, createDailyReportHandlers, createDailyReportServer, createDailyReportService, createEpochStore, createSharpThumbnailRenderer, defineDailyReportSchema, defineDailyReportSearchSchema, isStreamIdLte, parseClientTempId, predictSharpThumbnailWorkingSetBytes, readSseStreamEntry as readDailyReportSseStreamEntry, transformJsonArray };
|