@letpeoplework/lighthouse-client 1.5.0 → 1.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/index.cjs +28 -1
- package/dist/index.d.cts +18 -1
- package/dist/index.d.ts +18 -1
- package/dist/index.js +28 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -787,7 +787,8 @@ var FEATURE_REQUIRES_SERVER_NEWER_THAN = {
|
|
|
787
787
|
cumulativeStateTime: "v26.5.24.10",
|
|
788
788
|
recurringBlackoutRules: "v26.5.29.5",
|
|
789
789
|
workItemAgePercentiles: "v26.6.7.1",
|
|
790
|
-
mcpOAuthPassThrough: "v26.6.16.14"
|
|
790
|
+
mcpOAuthPassThrough: "v26.6.16.14",
|
|
791
|
+
blockedCountHistory: "v26.7.3.1"
|
|
791
792
|
};
|
|
792
793
|
var parseServerVersion = (raw) => {
|
|
793
794
|
const trimmed = raw.trim().replace(/^v/iu, "");
|
|
@@ -1231,6 +1232,32 @@ var createLighthouseClient = (configuration, dependencies = {}) => {
|
|
|
1231
1232
|
)
|
|
1232
1233
|
};
|
|
1233
1234
|
},
|
|
1235
|
+
getTeamBlockedCountHistory: async (teamId, range) => {
|
|
1236
|
+
const unsupported = await ensureServerSupports("blockedCountHistory");
|
|
1237
|
+
if (unsupported) {
|
|
1238
|
+
return unsupported;
|
|
1239
|
+
}
|
|
1240
|
+
const r = getResolvedMetricsDateRange(range);
|
|
1241
|
+
return requestJson(
|
|
1242
|
+
configuration,
|
|
1243
|
+
dependencies,
|
|
1244
|
+
`/v1/teams/${teamId}/metrics/blockedCountHistory?${getMetricsDateRangeQuery(r)}`,
|
|
1245
|
+
{ method: "GET" }
|
|
1246
|
+
);
|
|
1247
|
+
},
|
|
1248
|
+
getPortfolioBlockedCountHistory: async (portfolioId, range) => {
|
|
1249
|
+
const unsupported = await ensureServerSupports("blockedCountHistory");
|
|
1250
|
+
if (unsupported) {
|
|
1251
|
+
return unsupported;
|
|
1252
|
+
}
|
|
1253
|
+
const r = getResolvedMetricsDateRange(range);
|
|
1254
|
+
return requestJson(
|
|
1255
|
+
configuration,
|
|
1256
|
+
dependencies,
|
|
1257
|
+
`/v1/portfolios/${portfolioId}/metrics/blockedCountHistory?${getMetricsDateRangeQuery(r)}`,
|
|
1258
|
+
{ method: "GET" }
|
|
1259
|
+
);
|
|
1260
|
+
},
|
|
1234
1261
|
getTeamCumulativeStateTime: async (teamId, range, itemIds) => {
|
|
1235
1262
|
const unsupported = await ensureServerSupports("cumulativeStateTime");
|
|
1236
1263
|
if (unsupported) {
|
package/dist/index.d.cts
CHANGED
|
@@ -219,6 +219,20 @@ type TotalWorkItemAgeOverTimeResult = {
|
|
|
219
219
|
readonly endDate: string;
|
|
220
220
|
readonly daily: readonly DailyTotalWorkItemAge[];
|
|
221
221
|
};
|
|
222
|
+
/**
|
|
223
|
+
* One captured point on the blocked-items-over-time trend: how many items were
|
|
224
|
+
* blocked on {@link recordedAt}. Returned by the team/portfolio
|
|
225
|
+
* `blockedCountHistory` metric. `recordedAt` is an ISO date string.
|
|
226
|
+
*
|
|
227
|
+
* The complementary "what is blocked right now, and for how long" view rides on
|
|
228
|
+
* the existing WIP snapshot (`getTeamWip` / `getPortfolioWip`): from Lighthouse
|
|
229
|
+
* newer than v26.7.3.1 each WIP work item carries `isBlocked` and, when blocked,
|
|
230
|
+
* a `blockedSince` timestamp.
|
|
231
|
+
*/
|
|
232
|
+
type BlockedCountSnapshot = {
|
|
233
|
+
readonly recordedAt: string;
|
|
234
|
+
readonly blockedCount: number;
|
|
235
|
+
};
|
|
222
236
|
type CumulativeStateTimeStateRow = {
|
|
223
237
|
readonly state: string;
|
|
224
238
|
readonly workflowOrder: number;
|
|
@@ -318,6 +332,8 @@ type LighthouseClient = {
|
|
|
318
332
|
readonly getPortfolioTotalWorkItemAgeInfo: (portfolioId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<unknown>>;
|
|
319
333
|
readonly getPortfolioWorkItemAgeOverTime: (portfolioId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<WorkItemAgeOverTimeResult>>;
|
|
320
334
|
readonly getPortfolioTotalWorkItemAgeOverTime: (portfolioId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<TotalWorkItemAgeOverTimeResult>>;
|
|
335
|
+
readonly getTeamBlockedCountHistory: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<readonly BlockedCountSnapshot[]>>;
|
|
336
|
+
readonly getPortfolioBlockedCountHistory: (portfolioId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<readonly BlockedCountSnapshot[]>>;
|
|
321
337
|
readonly getTeamCumulativeStateTime: (teamId: number, range?: MetricsDateRange, itemIds?: readonly number[]) => Promise<LighthouseApiResult<CumulativeStateTimeResult>>;
|
|
322
338
|
readonly getTeamCumulativeStateTimeItems: (teamId: number, state: string, range?: MetricsDateRange, itemIds?: readonly number[]) => Promise<LighthouseApiResult<CumulativeStateTimeItemsResult>>;
|
|
323
339
|
readonly getTeamCumulativeStateTimeCandidates: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<CumulativeStateTimeCandidatesResult>>;
|
|
@@ -354,6 +370,7 @@ declare const FEATURE_REQUIRES_SERVER_NEWER_THAN: {
|
|
|
354
370
|
readonly recurringBlackoutRules: "v26.5.29.5";
|
|
355
371
|
readonly workItemAgePercentiles: "v26.6.7.1";
|
|
356
372
|
readonly mcpOAuthPassThrough: "v26.6.16.14";
|
|
373
|
+
readonly blockedCountHistory: "v26.7.3.1";
|
|
357
374
|
};
|
|
358
375
|
/**
|
|
359
376
|
* Returns true when `candidate` is strictly newer than `baseline`, false when
|
|
@@ -363,4 +380,4 @@ declare const FEATURE_REQUIRES_SERVER_NEWER_THAN: {
|
|
|
363
380
|
declare const isServerVersionNewerThan: (candidate: string, baseline: string) => boolean | null;
|
|
364
381
|
declare const createLighthouseClient: (configuration: LighthouseClientConfiguration, dependencies?: LighthouseClientDependencies) => LighthouseClient;
|
|
365
382
|
|
|
366
|
-
export { type BacktestInput, type CliAuthSessionPollResult, type CliAuthSessionStartError, type CliAuthSessionStartOutcome, type CliAuthSessionStartResult, type CliConnection, type CliServerAuthMode, type CliServerConnection, type CliStandaloneConnection, type ClientCapability, type ClientPackageContract, type ConnectivityCategory, type ConnectivityDependencies, type ConnectivityFetchResponse, type ConnectivityValidationResult, type CumulativeStateTimeCandidateRow, type CumulativeStateTimeCandidatesResult, type CumulativeStateTimeItemRow, type CumulativeStateTimeItemsResult, type CumulativeStateTimeResult, type CumulativeStateTimeStateRow, type DailyTotalWorkItemAge, type DailyWorkItemAge, type DayOfWeek, FEATURE_REQUIRES_SERVER_NEWER_THAN, type LighthouseApiError, type LighthouseApiResult, type LighthouseAuthContext, type LighthouseAuthOverrides, type LighthouseAuthStatus, type LighthouseAuthStore, type LighthouseClient, type LighthouseClientAuth, type LighthouseClientConfiguration, type LighthouseClientDependencies, type LighthouseConnectionConfiguration, type LighthouseWritePayload, type ManualForecastInput, type MetricsDateRange, type RecurringBlackoutRule, type RecurringBlackoutRuleInput, type ResolvedLighthouseEndpoint, type ServerAuthModeResult, type StandaloneDiscoveryContract, type StandaloneDiscoveryContractParseResult, type StoredLighthouseAuth, type ThroughputFilterView, type TotalWorkItemAgeOverTimeResult, type WorkItemAgeEntry, type WorkItemAgeOverTimeResult, createLighthouseAuthContext, createLighthouseClient, getClientPackageContract, getDefaultMetricsDateRange, getStandaloneDiscoveryLockfilePath, isServerVersionNewerThan, loadStandaloneDiscoveryContract, parseStandaloneDiscoveryContract, pollCliAuthSession, queryServerAuthMode, startCliAuthSession, validateLighthouseConnectivity };
|
|
383
|
+
export { type BacktestInput, type BlockedCountSnapshot, type CliAuthSessionPollResult, type CliAuthSessionStartError, type CliAuthSessionStartOutcome, type CliAuthSessionStartResult, type CliConnection, type CliServerAuthMode, type CliServerConnection, type CliStandaloneConnection, type ClientCapability, type ClientPackageContract, type ConnectivityCategory, type ConnectivityDependencies, type ConnectivityFetchResponse, type ConnectivityValidationResult, type CumulativeStateTimeCandidateRow, type CumulativeStateTimeCandidatesResult, type CumulativeStateTimeItemRow, type CumulativeStateTimeItemsResult, type CumulativeStateTimeResult, type CumulativeStateTimeStateRow, type DailyTotalWorkItemAge, type DailyWorkItemAge, type DayOfWeek, FEATURE_REQUIRES_SERVER_NEWER_THAN, type LighthouseApiError, type LighthouseApiResult, type LighthouseAuthContext, type LighthouseAuthOverrides, type LighthouseAuthStatus, type LighthouseAuthStore, type LighthouseClient, type LighthouseClientAuth, type LighthouseClientConfiguration, type LighthouseClientDependencies, type LighthouseConnectionConfiguration, type LighthouseWritePayload, type ManualForecastInput, type MetricsDateRange, type RecurringBlackoutRule, type RecurringBlackoutRuleInput, type ResolvedLighthouseEndpoint, type ServerAuthModeResult, type StandaloneDiscoveryContract, type StandaloneDiscoveryContractParseResult, type StoredLighthouseAuth, type ThroughputFilterView, type TotalWorkItemAgeOverTimeResult, type WorkItemAgeEntry, type WorkItemAgeOverTimeResult, createLighthouseAuthContext, createLighthouseClient, getClientPackageContract, getDefaultMetricsDateRange, getStandaloneDiscoveryLockfilePath, isServerVersionNewerThan, loadStandaloneDiscoveryContract, parseStandaloneDiscoveryContract, pollCliAuthSession, queryServerAuthMode, startCliAuthSession, validateLighthouseConnectivity };
|
package/dist/index.d.ts
CHANGED
|
@@ -219,6 +219,20 @@ type TotalWorkItemAgeOverTimeResult = {
|
|
|
219
219
|
readonly endDate: string;
|
|
220
220
|
readonly daily: readonly DailyTotalWorkItemAge[];
|
|
221
221
|
};
|
|
222
|
+
/**
|
|
223
|
+
* One captured point on the blocked-items-over-time trend: how many items were
|
|
224
|
+
* blocked on {@link recordedAt}. Returned by the team/portfolio
|
|
225
|
+
* `blockedCountHistory` metric. `recordedAt` is an ISO date string.
|
|
226
|
+
*
|
|
227
|
+
* The complementary "what is blocked right now, and for how long" view rides on
|
|
228
|
+
* the existing WIP snapshot (`getTeamWip` / `getPortfolioWip`): from Lighthouse
|
|
229
|
+
* newer than v26.7.3.1 each WIP work item carries `isBlocked` and, when blocked,
|
|
230
|
+
* a `blockedSince` timestamp.
|
|
231
|
+
*/
|
|
232
|
+
type BlockedCountSnapshot = {
|
|
233
|
+
readonly recordedAt: string;
|
|
234
|
+
readonly blockedCount: number;
|
|
235
|
+
};
|
|
222
236
|
type CumulativeStateTimeStateRow = {
|
|
223
237
|
readonly state: string;
|
|
224
238
|
readonly workflowOrder: number;
|
|
@@ -318,6 +332,8 @@ type LighthouseClient = {
|
|
|
318
332
|
readonly getPortfolioTotalWorkItemAgeInfo: (portfolioId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<unknown>>;
|
|
319
333
|
readonly getPortfolioWorkItemAgeOverTime: (portfolioId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<WorkItemAgeOverTimeResult>>;
|
|
320
334
|
readonly getPortfolioTotalWorkItemAgeOverTime: (portfolioId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<TotalWorkItemAgeOverTimeResult>>;
|
|
335
|
+
readonly getTeamBlockedCountHistory: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<readonly BlockedCountSnapshot[]>>;
|
|
336
|
+
readonly getPortfolioBlockedCountHistory: (portfolioId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<readonly BlockedCountSnapshot[]>>;
|
|
321
337
|
readonly getTeamCumulativeStateTime: (teamId: number, range?: MetricsDateRange, itemIds?: readonly number[]) => Promise<LighthouseApiResult<CumulativeStateTimeResult>>;
|
|
322
338
|
readonly getTeamCumulativeStateTimeItems: (teamId: number, state: string, range?: MetricsDateRange, itemIds?: readonly number[]) => Promise<LighthouseApiResult<CumulativeStateTimeItemsResult>>;
|
|
323
339
|
readonly getTeamCumulativeStateTimeCandidates: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<CumulativeStateTimeCandidatesResult>>;
|
|
@@ -354,6 +370,7 @@ declare const FEATURE_REQUIRES_SERVER_NEWER_THAN: {
|
|
|
354
370
|
readonly recurringBlackoutRules: "v26.5.29.5";
|
|
355
371
|
readonly workItemAgePercentiles: "v26.6.7.1";
|
|
356
372
|
readonly mcpOAuthPassThrough: "v26.6.16.14";
|
|
373
|
+
readonly blockedCountHistory: "v26.7.3.1";
|
|
357
374
|
};
|
|
358
375
|
/**
|
|
359
376
|
* Returns true when `candidate` is strictly newer than `baseline`, false when
|
|
@@ -363,4 +380,4 @@ declare const FEATURE_REQUIRES_SERVER_NEWER_THAN: {
|
|
|
363
380
|
declare const isServerVersionNewerThan: (candidate: string, baseline: string) => boolean | null;
|
|
364
381
|
declare const createLighthouseClient: (configuration: LighthouseClientConfiguration, dependencies?: LighthouseClientDependencies) => LighthouseClient;
|
|
365
382
|
|
|
366
|
-
export { type BacktestInput, type CliAuthSessionPollResult, type CliAuthSessionStartError, type CliAuthSessionStartOutcome, type CliAuthSessionStartResult, type CliConnection, type CliServerAuthMode, type CliServerConnection, type CliStandaloneConnection, type ClientCapability, type ClientPackageContract, type ConnectivityCategory, type ConnectivityDependencies, type ConnectivityFetchResponse, type ConnectivityValidationResult, type CumulativeStateTimeCandidateRow, type CumulativeStateTimeCandidatesResult, type CumulativeStateTimeItemRow, type CumulativeStateTimeItemsResult, type CumulativeStateTimeResult, type CumulativeStateTimeStateRow, type DailyTotalWorkItemAge, type DailyWorkItemAge, type DayOfWeek, FEATURE_REQUIRES_SERVER_NEWER_THAN, type LighthouseApiError, type LighthouseApiResult, type LighthouseAuthContext, type LighthouseAuthOverrides, type LighthouseAuthStatus, type LighthouseAuthStore, type LighthouseClient, type LighthouseClientAuth, type LighthouseClientConfiguration, type LighthouseClientDependencies, type LighthouseConnectionConfiguration, type LighthouseWritePayload, type ManualForecastInput, type MetricsDateRange, type RecurringBlackoutRule, type RecurringBlackoutRuleInput, type ResolvedLighthouseEndpoint, type ServerAuthModeResult, type StandaloneDiscoveryContract, type StandaloneDiscoveryContractParseResult, type StoredLighthouseAuth, type ThroughputFilterView, type TotalWorkItemAgeOverTimeResult, type WorkItemAgeEntry, type WorkItemAgeOverTimeResult, createLighthouseAuthContext, createLighthouseClient, getClientPackageContract, getDefaultMetricsDateRange, getStandaloneDiscoveryLockfilePath, isServerVersionNewerThan, loadStandaloneDiscoveryContract, parseStandaloneDiscoveryContract, pollCliAuthSession, queryServerAuthMode, startCliAuthSession, validateLighthouseConnectivity };
|
|
383
|
+
export { type BacktestInput, type BlockedCountSnapshot, type CliAuthSessionPollResult, type CliAuthSessionStartError, type CliAuthSessionStartOutcome, type CliAuthSessionStartResult, type CliConnection, type CliServerAuthMode, type CliServerConnection, type CliStandaloneConnection, type ClientCapability, type ClientPackageContract, type ConnectivityCategory, type ConnectivityDependencies, type ConnectivityFetchResponse, type ConnectivityValidationResult, type CumulativeStateTimeCandidateRow, type CumulativeStateTimeCandidatesResult, type CumulativeStateTimeItemRow, type CumulativeStateTimeItemsResult, type CumulativeStateTimeResult, type CumulativeStateTimeStateRow, type DailyTotalWorkItemAge, type DailyWorkItemAge, type DayOfWeek, FEATURE_REQUIRES_SERVER_NEWER_THAN, type LighthouseApiError, type LighthouseApiResult, type LighthouseAuthContext, type LighthouseAuthOverrides, type LighthouseAuthStatus, type LighthouseAuthStore, type LighthouseClient, type LighthouseClientAuth, type LighthouseClientConfiguration, type LighthouseClientDependencies, type LighthouseConnectionConfiguration, type LighthouseWritePayload, type ManualForecastInput, type MetricsDateRange, type RecurringBlackoutRule, type RecurringBlackoutRuleInput, type ResolvedLighthouseEndpoint, type ServerAuthModeResult, type StandaloneDiscoveryContract, type StandaloneDiscoveryContractParseResult, type StoredLighthouseAuth, type ThroughputFilterView, type TotalWorkItemAgeOverTimeResult, type WorkItemAgeEntry, type WorkItemAgeOverTimeResult, createLighthouseAuthContext, createLighthouseClient, getClientPackageContract, getDefaultMetricsDateRange, getStandaloneDiscoveryLockfilePath, isServerVersionNewerThan, loadStandaloneDiscoveryContract, parseStandaloneDiscoveryContract, pollCliAuthSession, queryServerAuthMode, startCliAuthSession, validateLighthouseConnectivity };
|
package/dist/index.js
CHANGED
|
@@ -751,7 +751,8 @@ var FEATURE_REQUIRES_SERVER_NEWER_THAN = {
|
|
|
751
751
|
cumulativeStateTime: "v26.5.24.10",
|
|
752
752
|
recurringBlackoutRules: "v26.5.29.5",
|
|
753
753
|
workItemAgePercentiles: "v26.6.7.1",
|
|
754
|
-
mcpOAuthPassThrough: "v26.6.16.14"
|
|
754
|
+
mcpOAuthPassThrough: "v26.6.16.14",
|
|
755
|
+
blockedCountHistory: "v26.7.3.1"
|
|
755
756
|
};
|
|
756
757
|
var parseServerVersion = (raw) => {
|
|
757
758
|
const trimmed = raw.trim().replace(/^v/iu, "");
|
|
@@ -1195,6 +1196,32 @@ var createLighthouseClient = (configuration, dependencies = {}) => {
|
|
|
1195
1196
|
)
|
|
1196
1197
|
};
|
|
1197
1198
|
},
|
|
1199
|
+
getTeamBlockedCountHistory: async (teamId, range) => {
|
|
1200
|
+
const unsupported = await ensureServerSupports("blockedCountHistory");
|
|
1201
|
+
if (unsupported) {
|
|
1202
|
+
return unsupported;
|
|
1203
|
+
}
|
|
1204
|
+
const r = getResolvedMetricsDateRange(range);
|
|
1205
|
+
return requestJson(
|
|
1206
|
+
configuration,
|
|
1207
|
+
dependencies,
|
|
1208
|
+
`/v1/teams/${teamId}/metrics/blockedCountHistory?${getMetricsDateRangeQuery(r)}`,
|
|
1209
|
+
{ method: "GET" }
|
|
1210
|
+
);
|
|
1211
|
+
},
|
|
1212
|
+
getPortfolioBlockedCountHistory: async (portfolioId, range) => {
|
|
1213
|
+
const unsupported = await ensureServerSupports("blockedCountHistory");
|
|
1214
|
+
if (unsupported) {
|
|
1215
|
+
return unsupported;
|
|
1216
|
+
}
|
|
1217
|
+
const r = getResolvedMetricsDateRange(range);
|
|
1218
|
+
return requestJson(
|
|
1219
|
+
configuration,
|
|
1220
|
+
dependencies,
|
|
1221
|
+
`/v1/portfolios/${portfolioId}/metrics/blockedCountHistory?${getMetricsDateRangeQuery(r)}`,
|
|
1222
|
+
{ method: "GET" }
|
|
1223
|
+
);
|
|
1224
|
+
},
|
|
1198
1225
|
getTeamCumulativeStateTime: async (teamId, range, itemIds) => {
|
|
1199
1226
|
const unsupported = await ensureServerSupports("cumulativeStateTime");
|
|
1200
1227
|
if (unsupported) {
|
package/package.json
CHANGED