@letpeoplework/lighthouse-client 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/index.cjs +61 -1
- package/dist/index.d.cts +64 -1
- package/dist/index.d.ts +64 -1
- package/dist/index.js +61 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -734,6 +734,12 @@ var getMetricsAsOfDateQuery = (asOfDate) => `asOfDate=${encodeURIComponent(asOfD
|
|
|
734
734
|
var getItemIdsQuerySuffix = (itemIds) => itemIds && itemIds.length > 0 ? itemIds.map((id) => `&itemIds=${encodeURIComponent(id)}`).join("") : "";
|
|
735
735
|
var getViewQuerySuffix = (view) => view === "filtered" ? "&view=filtered" : "";
|
|
736
736
|
var getDefinitionIdQuerySuffix = (definitionId) => definitionId !== void 0 ? `&definitionId=${encodeURIComponent(definitionId)}` : "";
|
|
737
|
+
var getPercentilesOverTimeQuerySuffix = (metricType, horizon) => {
|
|
738
|
+
const metricTypePart = metricType === void 0 ? "" : `&metricType=${encodeURIComponent(metricType)}`;
|
|
739
|
+
const horizonPart = horizon === void 0 ? "" : `&horizon=${encodeURIComponent(horizon)}`;
|
|
740
|
+
return `${metricTypePart}${horizonPart}`;
|
|
741
|
+
};
|
|
742
|
+
var getProcessBehaviorTypeQuerySuffix = (metricType) => metricType === void 0 ? "" : `&type=${encodeURIComponent(metricType)}`;
|
|
737
743
|
var addUtcDays = (dateStr, days) => {
|
|
738
744
|
const d = /* @__PURE__ */ new Date(`${dateStr}T00:00:00Z`);
|
|
739
745
|
d.setUTCDate(d.getUTCDate() + days);
|
|
@@ -788,7 +794,9 @@ var FEATURE_REQUIRES_SERVER_NEWER_THAN = {
|
|
|
788
794
|
recurringBlackoutRules: "v26.5.29.5",
|
|
789
795
|
workItemAgePercentiles: "v26.6.7.1",
|
|
790
796
|
mcpOAuthPassThrough: "v26.6.16.14",
|
|
791
|
-
blockedCountHistory: "v26.7.3.1"
|
|
797
|
+
blockedCountHistory: "v26.7.3.1",
|
|
798
|
+
percentilesOverTime: "v26.7.11.4",
|
|
799
|
+
processBehaviorOverTime: "v26.7.11.4"
|
|
792
800
|
};
|
|
793
801
|
var parseServerVersion = (raw) => {
|
|
794
802
|
const trimmed = raw.trim().replace(/^v/iu, "");
|
|
@@ -1258,6 +1266,58 @@ var createLighthouseClient = (configuration, dependencies = {}) => {
|
|
|
1258
1266
|
{ method: "GET" }
|
|
1259
1267
|
);
|
|
1260
1268
|
},
|
|
1269
|
+
getTeamPercentilesOverTime: async (teamId, range, metricType, horizon) => {
|
|
1270
|
+
const unsupported = await ensureServerSupports("percentilesOverTime");
|
|
1271
|
+
if (unsupported) {
|
|
1272
|
+
return unsupported;
|
|
1273
|
+
}
|
|
1274
|
+
const r = getResolvedMetricsDateRange(range);
|
|
1275
|
+
return requestJson(
|
|
1276
|
+
configuration,
|
|
1277
|
+
dependencies,
|
|
1278
|
+
`/v1/teams/${teamId}/metrics/percentiles-over-time?${getMetricsDateRangeQuery(r)}${getPercentilesOverTimeQuerySuffix(metricType, horizon)}`,
|
|
1279
|
+
{ method: "GET" }
|
|
1280
|
+
);
|
|
1281
|
+
},
|
|
1282
|
+
getPortfolioPercentilesOverTime: async (portfolioId, range, metricType, horizon) => {
|
|
1283
|
+
const unsupported = await ensureServerSupports("percentilesOverTime");
|
|
1284
|
+
if (unsupported) {
|
|
1285
|
+
return unsupported;
|
|
1286
|
+
}
|
|
1287
|
+
const r = getResolvedMetricsDateRange(range);
|
|
1288
|
+
return requestJson(
|
|
1289
|
+
configuration,
|
|
1290
|
+
dependencies,
|
|
1291
|
+
`/v1/portfolios/${portfolioId}/metrics/percentiles-over-time?${getMetricsDateRangeQuery(r)}${getPercentilesOverTimeQuerySuffix(metricType, horizon)}`,
|
|
1292
|
+
{ method: "GET" }
|
|
1293
|
+
);
|
|
1294
|
+
},
|
|
1295
|
+
getTeamProcessBehaviorOverTime: async (teamId, range, metricType) => {
|
|
1296
|
+
const unsupported = await ensureServerSupports("processBehaviorOverTime");
|
|
1297
|
+
if (unsupported) {
|
|
1298
|
+
return unsupported;
|
|
1299
|
+
}
|
|
1300
|
+
const r = getResolvedMetricsDateRange(range);
|
|
1301
|
+
return requestJson(
|
|
1302
|
+
configuration,
|
|
1303
|
+
dependencies,
|
|
1304
|
+
`/v1/teams/${teamId}/metrics/process-behavior-over-time?${getMetricsDateRangeQuery(r)}${getProcessBehaviorTypeQuerySuffix(metricType)}`,
|
|
1305
|
+
{ method: "GET" }
|
|
1306
|
+
);
|
|
1307
|
+
},
|
|
1308
|
+
getPortfolioProcessBehaviorOverTime: async (portfolioId, range, metricType) => {
|
|
1309
|
+
const unsupported = await ensureServerSupports("processBehaviorOverTime");
|
|
1310
|
+
if (unsupported) {
|
|
1311
|
+
return unsupported;
|
|
1312
|
+
}
|
|
1313
|
+
const r = getResolvedMetricsDateRange(range);
|
|
1314
|
+
return requestJson(
|
|
1315
|
+
configuration,
|
|
1316
|
+
dependencies,
|
|
1317
|
+
`/v1/portfolios/${portfolioId}/metrics/process-behavior-over-time?${getMetricsDateRangeQuery(r)}${getProcessBehaviorTypeQuerySuffix(metricType)}`,
|
|
1318
|
+
{ method: "GET" }
|
|
1319
|
+
);
|
|
1320
|
+
},
|
|
1261
1321
|
getTeamCumulativeStateTime: async (teamId, range, itemIds) => {
|
|
1262
1322
|
const unsupported = await ensureServerSupports("cumulativeStateTime");
|
|
1263
1323
|
if (unsupported) {
|
package/dist/index.d.cts
CHANGED
|
@@ -233,6 +233,63 @@ type BlockedCountSnapshot = {
|
|
|
233
233
|
readonly recordedAt: string;
|
|
234
234
|
readonly blockedCount: number;
|
|
235
235
|
};
|
|
236
|
+
/**
|
|
237
|
+
* Percentile family recorded by the percentiles-over-time pipeline. Sent as the
|
|
238
|
+
* `metricType` query parameter, and echoed back on every returned row.
|
|
239
|
+
*/
|
|
240
|
+
type PercentilesOverTimeMetricType = "CycleTime" | "WorkItemAge";
|
|
241
|
+
/**
|
|
242
|
+
* One captured day on the percentiles-over-time trend: the percentile quartet
|
|
243
|
+
* recorded for {@link recordedAt} (an ISO date string, one row per calendar day,
|
|
244
|
+
* ascending).
|
|
245
|
+
*
|
|
246
|
+
* Recording is FORWARD-ONLY — Lighthouse starts capturing the day the feature is
|
|
247
|
+
* first deployed and never backfills history it did not observe, so a freshly
|
|
248
|
+
* upgraded server legitimately returns an empty array until the first refresh.
|
|
249
|
+
*
|
|
250
|
+
* `CycleTime` is recorded per horizon (30/60/90 days); `WorkItemAge` is always
|
|
251
|
+
* "as of today" and therefore has no horizon dimension, so a horizon sent
|
|
252
|
+
* alongside it is ignored in favour of the horizon-less series.
|
|
253
|
+
*
|
|
254
|
+
* SHARP EDGE: a `CycleTime` request that omits `horizon` is not filtered to one
|
|
255
|
+
* horizon — it returns every recorded horizon interleaved, and because this row
|
|
256
|
+
* shape carries no horizon field they cannot be told apart. Pass an explicit
|
|
257
|
+
* horizon whenever you ask for `CycleTime`.
|
|
258
|
+
*/
|
|
259
|
+
type PercentilesOverTimeSnapshot = {
|
|
260
|
+
readonly recordedAt: string;
|
|
261
|
+
readonly metricType: PercentilesOverTimeMetricType;
|
|
262
|
+
readonly p50: number;
|
|
263
|
+
readonly p70: number;
|
|
264
|
+
readonly p85: number;
|
|
265
|
+
readonly p95: number;
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* Process-behaviour family recorded by the natural-process-limits over-time
|
|
269
|
+
* pipeline. Sent as the `type` query parameter.
|
|
270
|
+
*
|
|
271
|
+
* `FeatureSize` is PORTFOLIO-ONLY: it has no team-level equivalent, so a team
|
|
272
|
+
* never records it. The server answers a team asking for it with an empty
|
|
273
|
+
* series rather than an error.
|
|
274
|
+
*/
|
|
275
|
+
type ProcessBehaviorMetricType = "Throughput" | "WorkItemAge" | "Wip" | "CycleTime" | "Arrivals" | "FeatureSize";
|
|
276
|
+
/**
|
|
277
|
+
* One captured day on the process-behaviour-over-time trend: the natural process
|
|
278
|
+
* limit triple recorded for {@link recordedAt} (an ISO date string, one row per
|
|
279
|
+
* calendar day, ascending). The family is carried by the request's `type`
|
|
280
|
+
* parameter, not repeated per row.
|
|
281
|
+
*
|
|
282
|
+
* Recording is FORWARD-ONLY, and a day is only recorded when the underlying
|
|
283
|
+
* chart had a usable baseline — days where it did not are absent from the
|
|
284
|
+
* series rather than present as a zeroed triple, so an empty array means
|
|
285
|
+
* "nothing recorded yet", never "a process pinned at zero".
|
|
286
|
+
*/
|
|
287
|
+
type ProcessBehaviorSnapshot = {
|
|
288
|
+
readonly recordedAt: string;
|
|
289
|
+
readonly unpl: number;
|
|
290
|
+
readonly average: number;
|
|
291
|
+
readonly lnpl: number;
|
|
292
|
+
};
|
|
236
293
|
type CumulativeStateTimeStateRow = {
|
|
237
294
|
readonly state: string;
|
|
238
295
|
readonly workflowOrder: number;
|
|
@@ -334,6 +391,10 @@ type LighthouseClient = {
|
|
|
334
391
|
readonly getPortfolioTotalWorkItemAgeOverTime: (portfolioId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<TotalWorkItemAgeOverTimeResult>>;
|
|
335
392
|
readonly getTeamBlockedCountHistory: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<readonly BlockedCountSnapshot[]>>;
|
|
336
393
|
readonly getPortfolioBlockedCountHistory: (portfolioId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<readonly BlockedCountSnapshot[]>>;
|
|
394
|
+
readonly getTeamPercentilesOverTime: (teamId: number, range?: MetricsDateRange, metricType?: PercentilesOverTimeMetricType, horizon?: number) => Promise<LighthouseApiResult<readonly PercentilesOverTimeSnapshot[]>>;
|
|
395
|
+
readonly getPortfolioPercentilesOverTime: (portfolioId: number, range?: MetricsDateRange, metricType?: PercentilesOverTimeMetricType, horizon?: number) => Promise<LighthouseApiResult<readonly PercentilesOverTimeSnapshot[]>>;
|
|
396
|
+
readonly getTeamProcessBehaviorOverTime: (teamId: number, range?: MetricsDateRange, metricType?: ProcessBehaviorMetricType) => Promise<LighthouseApiResult<readonly ProcessBehaviorSnapshot[]>>;
|
|
397
|
+
readonly getPortfolioProcessBehaviorOverTime: (portfolioId: number, range?: MetricsDateRange, metricType?: ProcessBehaviorMetricType) => Promise<LighthouseApiResult<readonly ProcessBehaviorSnapshot[]>>;
|
|
337
398
|
readonly getTeamCumulativeStateTime: (teamId: number, range?: MetricsDateRange, itemIds?: readonly number[]) => Promise<LighthouseApiResult<CumulativeStateTimeResult>>;
|
|
338
399
|
readonly getTeamCumulativeStateTimeItems: (teamId: number, state: string, range?: MetricsDateRange, itemIds?: readonly number[]) => Promise<LighthouseApiResult<CumulativeStateTimeItemsResult>>;
|
|
339
400
|
readonly getTeamCumulativeStateTimeCandidates: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<CumulativeStateTimeCandidatesResult>>;
|
|
@@ -371,6 +432,8 @@ declare const FEATURE_REQUIRES_SERVER_NEWER_THAN: {
|
|
|
371
432
|
readonly workItemAgePercentiles: "v26.6.7.1";
|
|
372
433
|
readonly mcpOAuthPassThrough: "v26.6.16.14";
|
|
373
434
|
readonly blockedCountHistory: "v26.7.3.1";
|
|
435
|
+
readonly percentilesOverTime: "v26.7.11.4";
|
|
436
|
+
readonly processBehaviorOverTime: "v26.7.11.4";
|
|
374
437
|
};
|
|
375
438
|
/**
|
|
376
439
|
* Returns true when `candidate` is strictly newer than `baseline`, false when
|
|
@@ -380,4 +443,4 @@ declare const FEATURE_REQUIRES_SERVER_NEWER_THAN: {
|
|
|
380
443
|
declare const isServerVersionNewerThan: (candidate: string, baseline: string) => boolean | null;
|
|
381
444
|
declare const createLighthouseClient: (configuration: LighthouseClientConfiguration, dependencies?: LighthouseClientDependencies) => LighthouseClient;
|
|
382
445
|
|
|
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 };
|
|
446
|
+
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 PercentilesOverTimeMetricType, type PercentilesOverTimeSnapshot, type ProcessBehaviorMetricType, type ProcessBehaviorSnapshot, 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
|
@@ -233,6 +233,63 @@ type BlockedCountSnapshot = {
|
|
|
233
233
|
readonly recordedAt: string;
|
|
234
234
|
readonly blockedCount: number;
|
|
235
235
|
};
|
|
236
|
+
/**
|
|
237
|
+
* Percentile family recorded by the percentiles-over-time pipeline. Sent as the
|
|
238
|
+
* `metricType` query parameter, and echoed back on every returned row.
|
|
239
|
+
*/
|
|
240
|
+
type PercentilesOverTimeMetricType = "CycleTime" | "WorkItemAge";
|
|
241
|
+
/**
|
|
242
|
+
* One captured day on the percentiles-over-time trend: the percentile quartet
|
|
243
|
+
* recorded for {@link recordedAt} (an ISO date string, one row per calendar day,
|
|
244
|
+
* ascending).
|
|
245
|
+
*
|
|
246
|
+
* Recording is FORWARD-ONLY — Lighthouse starts capturing the day the feature is
|
|
247
|
+
* first deployed and never backfills history it did not observe, so a freshly
|
|
248
|
+
* upgraded server legitimately returns an empty array until the first refresh.
|
|
249
|
+
*
|
|
250
|
+
* `CycleTime` is recorded per horizon (30/60/90 days); `WorkItemAge` is always
|
|
251
|
+
* "as of today" and therefore has no horizon dimension, so a horizon sent
|
|
252
|
+
* alongside it is ignored in favour of the horizon-less series.
|
|
253
|
+
*
|
|
254
|
+
* SHARP EDGE: a `CycleTime` request that omits `horizon` is not filtered to one
|
|
255
|
+
* horizon — it returns every recorded horizon interleaved, and because this row
|
|
256
|
+
* shape carries no horizon field they cannot be told apart. Pass an explicit
|
|
257
|
+
* horizon whenever you ask for `CycleTime`.
|
|
258
|
+
*/
|
|
259
|
+
type PercentilesOverTimeSnapshot = {
|
|
260
|
+
readonly recordedAt: string;
|
|
261
|
+
readonly metricType: PercentilesOverTimeMetricType;
|
|
262
|
+
readonly p50: number;
|
|
263
|
+
readonly p70: number;
|
|
264
|
+
readonly p85: number;
|
|
265
|
+
readonly p95: number;
|
|
266
|
+
};
|
|
267
|
+
/**
|
|
268
|
+
* Process-behaviour family recorded by the natural-process-limits over-time
|
|
269
|
+
* pipeline. Sent as the `type` query parameter.
|
|
270
|
+
*
|
|
271
|
+
* `FeatureSize` is PORTFOLIO-ONLY: it has no team-level equivalent, so a team
|
|
272
|
+
* never records it. The server answers a team asking for it with an empty
|
|
273
|
+
* series rather than an error.
|
|
274
|
+
*/
|
|
275
|
+
type ProcessBehaviorMetricType = "Throughput" | "WorkItemAge" | "Wip" | "CycleTime" | "Arrivals" | "FeatureSize";
|
|
276
|
+
/**
|
|
277
|
+
* One captured day on the process-behaviour-over-time trend: the natural process
|
|
278
|
+
* limit triple recorded for {@link recordedAt} (an ISO date string, one row per
|
|
279
|
+
* calendar day, ascending). The family is carried by the request's `type`
|
|
280
|
+
* parameter, not repeated per row.
|
|
281
|
+
*
|
|
282
|
+
* Recording is FORWARD-ONLY, and a day is only recorded when the underlying
|
|
283
|
+
* chart had a usable baseline — days where it did not are absent from the
|
|
284
|
+
* series rather than present as a zeroed triple, so an empty array means
|
|
285
|
+
* "nothing recorded yet", never "a process pinned at zero".
|
|
286
|
+
*/
|
|
287
|
+
type ProcessBehaviorSnapshot = {
|
|
288
|
+
readonly recordedAt: string;
|
|
289
|
+
readonly unpl: number;
|
|
290
|
+
readonly average: number;
|
|
291
|
+
readonly lnpl: number;
|
|
292
|
+
};
|
|
236
293
|
type CumulativeStateTimeStateRow = {
|
|
237
294
|
readonly state: string;
|
|
238
295
|
readonly workflowOrder: number;
|
|
@@ -334,6 +391,10 @@ type LighthouseClient = {
|
|
|
334
391
|
readonly getPortfolioTotalWorkItemAgeOverTime: (portfolioId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<TotalWorkItemAgeOverTimeResult>>;
|
|
335
392
|
readonly getTeamBlockedCountHistory: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<readonly BlockedCountSnapshot[]>>;
|
|
336
393
|
readonly getPortfolioBlockedCountHistory: (portfolioId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<readonly BlockedCountSnapshot[]>>;
|
|
394
|
+
readonly getTeamPercentilesOverTime: (teamId: number, range?: MetricsDateRange, metricType?: PercentilesOverTimeMetricType, horizon?: number) => Promise<LighthouseApiResult<readonly PercentilesOverTimeSnapshot[]>>;
|
|
395
|
+
readonly getPortfolioPercentilesOverTime: (portfolioId: number, range?: MetricsDateRange, metricType?: PercentilesOverTimeMetricType, horizon?: number) => Promise<LighthouseApiResult<readonly PercentilesOverTimeSnapshot[]>>;
|
|
396
|
+
readonly getTeamProcessBehaviorOverTime: (teamId: number, range?: MetricsDateRange, metricType?: ProcessBehaviorMetricType) => Promise<LighthouseApiResult<readonly ProcessBehaviorSnapshot[]>>;
|
|
397
|
+
readonly getPortfolioProcessBehaviorOverTime: (portfolioId: number, range?: MetricsDateRange, metricType?: ProcessBehaviorMetricType) => Promise<LighthouseApiResult<readonly ProcessBehaviorSnapshot[]>>;
|
|
337
398
|
readonly getTeamCumulativeStateTime: (teamId: number, range?: MetricsDateRange, itemIds?: readonly number[]) => Promise<LighthouseApiResult<CumulativeStateTimeResult>>;
|
|
338
399
|
readonly getTeamCumulativeStateTimeItems: (teamId: number, state: string, range?: MetricsDateRange, itemIds?: readonly number[]) => Promise<LighthouseApiResult<CumulativeStateTimeItemsResult>>;
|
|
339
400
|
readonly getTeamCumulativeStateTimeCandidates: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<CumulativeStateTimeCandidatesResult>>;
|
|
@@ -371,6 +432,8 @@ declare const FEATURE_REQUIRES_SERVER_NEWER_THAN: {
|
|
|
371
432
|
readonly workItemAgePercentiles: "v26.6.7.1";
|
|
372
433
|
readonly mcpOAuthPassThrough: "v26.6.16.14";
|
|
373
434
|
readonly blockedCountHistory: "v26.7.3.1";
|
|
435
|
+
readonly percentilesOverTime: "v26.7.11.4";
|
|
436
|
+
readonly processBehaviorOverTime: "v26.7.11.4";
|
|
374
437
|
};
|
|
375
438
|
/**
|
|
376
439
|
* Returns true when `candidate` is strictly newer than `baseline`, false when
|
|
@@ -380,4 +443,4 @@ declare const FEATURE_REQUIRES_SERVER_NEWER_THAN: {
|
|
|
380
443
|
declare const isServerVersionNewerThan: (candidate: string, baseline: string) => boolean | null;
|
|
381
444
|
declare const createLighthouseClient: (configuration: LighthouseClientConfiguration, dependencies?: LighthouseClientDependencies) => LighthouseClient;
|
|
382
445
|
|
|
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 };
|
|
446
|
+
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 PercentilesOverTimeMetricType, type PercentilesOverTimeSnapshot, type ProcessBehaviorMetricType, type ProcessBehaviorSnapshot, 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
|
@@ -698,6 +698,12 @@ var getMetricsAsOfDateQuery = (asOfDate) => `asOfDate=${encodeURIComponent(asOfD
|
|
|
698
698
|
var getItemIdsQuerySuffix = (itemIds) => itemIds && itemIds.length > 0 ? itemIds.map((id) => `&itemIds=${encodeURIComponent(id)}`).join("") : "";
|
|
699
699
|
var getViewQuerySuffix = (view) => view === "filtered" ? "&view=filtered" : "";
|
|
700
700
|
var getDefinitionIdQuerySuffix = (definitionId) => definitionId !== void 0 ? `&definitionId=${encodeURIComponent(definitionId)}` : "";
|
|
701
|
+
var getPercentilesOverTimeQuerySuffix = (metricType, horizon) => {
|
|
702
|
+
const metricTypePart = metricType === void 0 ? "" : `&metricType=${encodeURIComponent(metricType)}`;
|
|
703
|
+
const horizonPart = horizon === void 0 ? "" : `&horizon=${encodeURIComponent(horizon)}`;
|
|
704
|
+
return `${metricTypePart}${horizonPart}`;
|
|
705
|
+
};
|
|
706
|
+
var getProcessBehaviorTypeQuerySuffix = (metricType) => metricType === void 0 ? "" : `&type=${encodeURIComponent(metricType)}`;
|
|
701
707
|
var addUtcDays = (dateStr, days) => {
|
|
702
708
|
const d = /* @__PURE__ */ new Date(`${dateStr}T00:00:00Z`);
|
|
703
709
|
d.setUTCDate(d.getUTCDate() + days);
|
|
@@ -752,7 +758,9 @@ var FEATURE_REQUIRES_SERVER_NEWER_THAN = {
|
|
|
752
758
|
recurringBlackoutRules: "v26.5.29.5",
|
|
753
759
|
workItemAgePercentiles: "v26.6.7.1",
|
|
754
760
|
mcpOAuthPassThrough: "v26.6.16.14",
|
|
755
|
-
blockedCountHistory: "v26.7.3.1"
|
|
761
|
+
blockedCountHistory: "v26.7.3.1",
|
|
762
|
+
percentilesOverTime: "v26.7.11.4",
|
|
763
|
+
processBehaviorOverTime: "v26.7.11.4"
|
|
756
764
|
};
|
|
757
765
|
var parseServerVersion = (raw) => {
|
|
758
766
|
const trimmed = raw.trim().replace(/^v/iu, "");
|
|
@@ -1222,6 +1230,58 @@ var createLighthouseClient = (configuration, dependencies = {}) => {
|
|
|
1222
1230
|
{ method: "GET" }
|
|
1223
1231
|
);
|
|
1224
1232
|
},
|
|
1233
|
+
getTeamPercentilesOverTime: async (teamId, range, metricType, horizon) => {
|
|
1234
|
+
const unsupported = await ensureServerSupports("percentilesOverTime");
|
|
1235
|
+
if (unsupported) {
|
|
1236
|
+
return unsupported;
|
|
1237
|
+
}
|
|
1238
|
+
const r = getResolvedMetricsDateRange(range);
|
|
1239
|
+
return requestJson(
|
|
1240
|
+
configuration,
|
|
1241
|
+
dependencies,
|
|
1242
|
+
`/v1/teams/${teamId}/metrics/percentiles-over-time?${getMetricsDateRangeQuery(r)}${getPercentilesOverTimeQuerySuffix(metricType, horizon)}`,
|
|
1243
|
+
{ method: "GET" }
|
|
1244
|
+
);
|
|
1245
|
+
},
|
|
1246
|
+
getPortfolioPercentilesOverTime: async (portfolioId, range, metricType, horizon) => {
|
|
1247
|
+
const unsupported = await ensureServerSupports("percentilesOverTime");
|
|
1248
|
+
if (unsupported) {
|
|
1249
|
+
return unsupported;
|
|
1250
|
+
}
|
|
1251
|
+
const r = getResolvedMetricsDateRange(range);
|
|
1252
|
+
return requestJson(
|
|
1253
|
+
configuration,
|
|
1254
|
+
dependencies,
|
|
1255
|
+
`/v1/portfolios/${portfolioId}/metrics/percentiles-over-time?${getMetricsDateRangeQuery(r)}${getPercentilesOverTimeQuerySuffix(metricType, horizon)}`,
|
|
1256
|
+
{ method: "GET" }
|
|
1257
|
+
);
|
|
1258
|
+
},
|
|
1259
|
+
getTeamProcessBehaviorOverTime: async (teamId, range, metricType) => {
|
|
1260
|
+
const unsupported = await ensureServerSupports("processBehaviorOverTime");
|
|
1261
|
+
if (unsupported) {
|
|
1262
|
+
return unsupported;
|
|
1263
|
+
}
|
|
1264
|
+
const r = getResolvedMetricsDateRange(range);
|
|
1265
|
+
return requestJson(
|
|
1266
|
+
configuration,
|
|
1267
|
+
dependencies,
|
|
1268
|
+
`/v1/teams/${teamId}/metrics/process-behavior-over-time?${getMetricsDateRangeQuery(r)}${getProcessBehaviorTypeQuerySuffix(metricType)}`,
|
|
1269
|
+
{ method: "GET" }
|
|
1270
|
+
);
|
|
1271
|
+
},
|
|
1272
|
+
getPortfolioProcessBehaviorOverTime: async (portfolioId, range, metricType) => {
|
|
1273
|
+
const unsupported = await ensureServerSupports("processBehaviorOverTime");
|
|
1274
|
+
if (unsupported) {
|
|
1275
|
+
return unsupported;
|
|
1276
|
+
}
|
|
1277
|
+
const r = getResolvedMetricsDateRange(range);
|
|
1278
|
+
return requestJson(
|
|
1279
|
+
configuration,
|
|
1280
|
+
dependencies,
|
|
1281
|
+
`/v1/portfolios/${portfolioId}/metrics/process-behavior-over-time?${getMetricsDateRangeQuery(r)}${getProcessBehaviorTypeQuerySuffix(metricType)}`,
|
|
1282
|
+
{ method: "GET" }
|
|
1283
|
+
);
|
|
1284
|
+
},
|
|
1225
1285
|
getTeamCumulativeStateTime: async (teamId, range, itemIds) => {
|
|
1226
1286
|
const unsupported = await ensureServerSupports("cumulativeStateTime");
|
|
1227
1287
|
if (unsupported) {
|
package/package.json
CHANGED