@markwharton/liquidplanner 1.6.0 → 1.7.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/dist/client.d.ts +6 -0
- package/dist/client.js +8 -0
- package/dist/index.d.ts +1 -1
- package/dist/types.d.ts +14 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -46,6 +46,12 @@ export declare class LPClient {
|
|
|
46
46
|
* Useful after external changes that the cache wouldn't know about.
|
|
47
47
|
*/
|
|
48
48
|
clearCache(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Invalidate cached timesheet entries only.
|
|
51
|
+
* Use when an external event (e.g., SignalR broadcast) indicates timesheet
|
|
52
|
+
* data changed but the write didn't go through this client instance.
|
|
53
|
+
*/
|
|
54
|
+
invalidateTimesheetCache(): void;
|
|
49
55
|
/**
|
|
50
56
|
* Make an authenticated request to the LP API
|
|
51
57
|
*/
|
package/dist/client.js
CHANGED
|
@@ -77,6 +77,14 @@ export class LPClient {
|
|
|
77
77
|
clearCache() {
|
|
78
78
|
this.cache?.clear();
|
|
79
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Invalidate cached timesheet entries only.
|
|
82
|
+
* Use when an external event (e.g., SignalR broadcast) indicates timesheet
|
|
83
|
+
* data changed but the write didn't go through this client instance.
|
|
84
|
+
*/
|
|
85
|
+
invalidateTimesheetCache() {
|
|
86
|
+
this.cache?.invalidate('timesheet:');
|
|
87
|
+
}
|
|
80
88
|
/**
|
|
81
89
|
* Make an authenticated request to the LP API
|
|
82
90
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
*/
|
|
29
29
|
export { LPClient } from './client.js';
|
|
30
30
|
export { resolveTaskToAssignment } from './workflows.js';
|
|
31
|
-
export type { LPConfig, LPCacheConfig, LPItemType, LPItem, LPAncestor, LPWorkspace, LPMember, LPCostCode, LPSyncResult, LPTimesheetEntry, LPTimesheetEntryWithId, LPTaskResolution, LPResult, LPUpsertOptions, LPAssignmentWithContext, LPErrorInfo, } from './types.js';
|
|
31
|
+
export type { LPConfig, LPCacheConfig, LPItemType, HierarchyItem, LPItem, LPAncestor, LPWorkspace, LPMember, LPCostCode, LPSyncResult, LPTimesheetEntry, LPTimesheetEntryWithId, LPTaskResolution, LPResult, LPUpsertOptions, LPAssignmentWithContext, LPErrorInfo, } from './types.js';
|
|
32
32
|
export { hoursToMinutes, normalizeItemType, buildAuthHeader, filterIs, filterIn, paginatedFetch, } from './utils.js';
|
|
33
33
|
export type { PaginateOptions } from './utils.js';
|
|
34
34
|
export { LP_API_BASE } from './constants.js';
|
package/dist/types.d.ts
CHANGED
|
@@ -8,6 +8,20 @@
|
|
|
8
8
|
* LiquidPlanner item types in the hierarchy
|
|
9
9
|
*/
|
|
10
10
|
export type LPItemType = 'Task' | 'Assignment' | 'Folder' | 'Project' | 'Package' | 'WorkspaceRoot' | 'Milestone' | 'Event';
|
|
11
|
+
/**
|
|
12
|
+
* A generic hierarchy item for representing project/task paths.
|
|
13
|
+
*
|
|
14
|
+
* Used by consumers to store structured hierarchy data from any backend.
|
|
15
|
+
* LP-specific ancestors use the stricter LPAncestor type.
|
|
16
|
+
*/
|
|
17
|
+
export interface HierarchyItem {
|
|
18
|
+
/** Unique identifier (number for LP, string UUID for other backends) */
|
|
19
|
+
id: number | string;
|
|
20
|
+
/** Display name */
|
|
21
|
+
name: string;
|
|
22
|
+
/** Type of item in the hierarchy (e.g., 'Project', 'Task', 'Folder') */
|
|
23
|
+
itemType: string;
|
|
24
|
+
}
|
|
11
25
|
/**
|
|
12
26
|
* An ancestor item in the hierarchy chain
|
|
13
27
|
*
|