@markwharton/liquidplanner 2.5.0 → 2.6.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 CHANGED
@@ -96,6 +96,10 @@ export declare class LPClient {
96
96
  getWorkspaces(): Promise<Result<LPWorkspace[]>>;
97
97
  /**
98
98
  * Get all members in the workspace
99
+ *
100
+ * Returns only users with userType "member" — excludes resources and
101
+ * placeholders. The full user list is cached; member filtering is applied
102
+ * post-cache per the cache-then-filter convention.
99
103
  */
100
104
  getWorkspaceMembers(): Promise<Result<LPMember[]>>;
101
105
  /**
package/dist/client.js CHANGED
@@ -263,9 +263,13 @@ export class LPClient {
263
263
  // ============================================================================
264
264
  /**
265
265
  * Get all members in the workspace
266
+ *
267
+ * Returns only users with userType "member" — excludes resources and
268
+ * placeholders. The full user list is cached; member filtering is applied
269
+ * post-cache per the cache-then-filter convention.
266
270
  */
267
271
  async getWorkspaceMembers() {
268
- return this.cached('members', this.cacheTtl.membersTtl, async () => {
272
+ const result = await this.cached('members', this.cacheTtl.membersTtl, async () => {
269
273
  const baseUrl = this.workspaceUrl('users/v1');
270
274
  return paginatedFetch({
271
275
  fetchFn: (url) => this.fetch(url),
@@ -280,6 +284,9 @@ export class LPClient {
280
284
  })),
281
285
  });
282
286
  });
287
+ if (!result.ok)
288
+ return result;
289
+ return ok(result.data.filter(m => m.userType === 'member'));
283
290
  }
284
291
  // ============================================================================
285
292
  // Items
package/dist/types.d.ts CHANGED
@@ -133,6 +133,14 @@ export interface LPWorkspace {
133
133
  }
134
134
  /**
135
135
  * A workspace member from LiquidPlanner
136
+ *
137
+ * Represents LP users with userType "member" only. Resources and placeholders
138
+ * are excluded by getWorkspaceMembers(). The LP API endpoint is /api/users/v1
139
+ * but this library filters to members — the active users who log time and
140
+ * are assigned to work.
141
+ *
142
+ * Roadmap: LPUser type and getUsers() method for all user types (member,
143
+ * resource, placeholder) when the need arises.
136
144
  */
137
145
  export interface LPMember {
138
146
  /** Unique identifier */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markwharton/liquidplanner",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "LiquidPlanner API client for timesheet integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",