@letpeoplework/lighthouse-client 1.0.1 → 1.1.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 +5 -4
- package/dist/index.d.cts +29 -4
- package/dist/index.d.ts +29 -4
- package/dist/index.js +5 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -703,6 +703,7 @@ var requestNoContent = async (configuration, dependencies, route, requestOptions
|
|
|
703
703
|
var getResolvedMetricsDateRange = (range) => range ?? getDefaultMetricsDateRange();
|
|
704
704
|
var getMetricsDateRangeQuery = (range) => `startDate=${encodeURIComponent(range.startDate)}&endDate=${encodeURIComponent(range.endDate)}`;
|
|
705
705
|
var getMetricsAsOfDateQuery = (asOfDate) => `asOfDate=${encodeURIComponent(asOfDate)}`;
|
|
706
|
+
var getViewQuerySuffix = (view) => view === "filtered" ? "&view=filtered" : "";
|
|
706
707
|
var addUtcDays = (dateStr, days) => {
|
|
707
708
|
const d = /* @__PURE__ */ new Date(`${dateStr}T00:00:00Z`);
|
|
708
709
|
d.setUTCDate(d.getUTCDate() + days);
|
|
@@ -871,12 +872,12 @@ var createLighthouseClient = (configuration, dependencies = {}) => ({
|
|
|
871
872
|
method: "POST"
|
|
872
873
|
}
|
|
873
874
|
),
|
|
874
|
-
getTeamThroughput: async (teamId, range) => {
|
|
875
|
+
getTeamThroughput: async (teamId, range, view) => {
|
|
875
876
|
const r = getResolvedMetricsDateRange(range);
|
|
876
877
|
return requestJson(
|
|
877
878
|
configuration,
|
|
878
879
|
dependencies,
|
|
879
|
-
`/v1/teams/${teamId}/metrics/throughput?${getMetricsDateRangeQuery(r)}`,
|
|
880
|
+
`/v1/teams/${teamId}/metrics/throughput?${getMetricsDateRangeQuery(r)}${getViewQuerySuffix(view)}`,
|
|
880
881
|
{ method: "GET" }
|
|
881
882
|
);
|
|
882
883
|
},
|
|
@@ -922,12 +923,12 @@ var createLighthouseClient = (configuration, dependencies = {}) => ({
|
|
|
922
923
|
{ method: "GET" }
|
|
923
924
|
);
|
|
924
925
|
},
|
|
925
|
-
getTeamPredictabilityScore: async (teamId, range) => {
|
|
926
|
+
getTeamPredictabilityScore: async (teamId, range, view) => {
|
|
926
927
|
const r = getResolvedMetricsDateRange(range);
|
|
927
928
|
return requestJson(
|
|
928
929
|
configuration,
|
|
929
930
|
dependencies,
|
|
930
|
-
`/v1/teams/${teamId}/metrics/multiitemforecastpredictabilityscore?${getMetricsDateRangeQuery(r)}`,
|
|
931
|
+
`/v1/teams/${teamId}/metrics/multiitemforecastpredictabilityscore?${getMetricsDateRangeQuery(r)}${getViewQuerySuffix(view)}`,
|
|
931
932
|
{ method: "GET" }
|
|
932
933
|
);
|
|
933
934
|
},
|
package/dist/index.d.cts
CHANGED
|
@@ -162,13 +162,38 @@ declare const getDefaultMetricsDateRange: () => MetricsDateRange;
|
|
|
162
162
|
type ManualForecastInput = {
|
|
163
163
|
readonly remainingItems?: number;
|
|
164
164
|
readonly targetDate?: string;
|
|
165
|
+
/**
|
|
166
|
+
* Override the team's forecast-filter setting for this forecast call:
|
|
167
|
+
* - `true` — apply the team's exclusion rule (filtered throughput).
|
|
168
|
+
* - `false` — skip the team's exclusion rule (raw throughput).
|
|
169
|
+
* - omit — respect the team's current setting (default).
|
|
170
|
+
*
|
|
171
|
+
* Lighthouse v26.5.24.10+. Older servers ignore this field.
|
|
172
|
+
*/
|
|
173
|
+
readonly applyFilterOverride?: boolean;
|
|
165
174
|
};
|
|
166
175
|
type BacktestInput = {
|
|
167
176
|
readonly startDate: string;
|
|
168
177
|
readonly endDate: string;
|
|
169
178
|
readonly historicalStartDate: string;
|
|
170
179
|
readonly historicalEndDate: string;
|
|
171
|
-
|
|
180
|
+
/**
|
|
181
|
+
* Override the team's forecast-filter setting for this backtest call:
|
|
182
|
+
* - `true` — apply the team's exclusion rule (filtered throughput).
|
|
183
|
+
* - `false` — skip the team's exclusion rule (raw throughput).
|
|
184
|
+
* - omit — respect the team's current setting (default).
|
|
185
|
+
*
|
|
186
|
+
* Lighthouse v26.5.24.10+. Older servers ignore this field.
|
|
187
|
+
*/
|
|
188
|
+
readonly applyFilterOverride?: boolean;
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Forecast-filter view for team-level throughput / PBC / predictability metrics.
|
|
192
|
+
* Lighthouse v26.5.24.10+ ignores unknown values and falls back to raw.
|
|
193
|
+
* - `"filtered"` — apply the team's exclusion rule.
|
|
194
|
+
* - `"raw"` / omit — return unfiltered data (default).
|
|
195
|
+
*/
|
|
196
|
+
type ThroughputFilterView = "raw" | "filtered";
|
|
172
197
|
type WorkItemAgeEntry = {
|
|
173
198
|
readonly id: number;
|
|
174
199
|
readonly name: string;
|
|
@@ -214,13 +239,13 @@ type LighthouseClient = {
|
|
|
214
239
|
readonly updatePortfolio: (portfolioId: number, payload: LighthouseWritePayload) => Promise<LighthouseApiResult<unknown>>;
|
|
215
240
|
readonly deletePortfolio: (portfolioId: number) => Promise<LighthouseApiResult<void>>;
|
|
216
241
|
readonly refreshPortfolio: (portfolioId: number) => Promise<LighthouseApiResult<void>>;
|
|
217
|
-
readonly getTeamThroughput: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<unknown>>;
|
|
242
|
+
readonly getTeamThroughput: (teamId: number, range?: MetricsDateRange, view?: ThroughputFilterView) => Promise<LighthouseApiResult<unknown>>;
|
|
218
243
|
readonly getTeamArrivals: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<unknown>>;
|
|
219
244
|
readonly getTeamWipOverTime: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<unknown>>;
|
|
220
245
|
readonly getTeamWip: (teamId: number, asOfDate: string) => Promise<LighthouseApiResult<readonly unknown[]>>;
|
|
221
246
|
readonly getTeamCycleTimePercentiles: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<readonly unknown[]>>;
|
|
222
247
|
readonly getTeamCycleTimeData: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<readonly unknown[]>>;
|
|
223
|
-
readonly getTeamPredictabilityScore: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<unknown>>;
|
|
248
|
+
readonly getTeamPredictabilityScore: (teamId: number, range?: MetricsDateRange, view?: ThroughputFilterView) => Promise<LighthouseApiResult<unknown>>;
|
|
224
249
|
readonly getTeamTotalWorkItemAge: (teamId: number, asOfDate: string) => Promise<LighthouseApiResult<number>>;
|
|
225
250
|
readonly getTeamTotalWorkItemAgeInfo: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<unknown>>;
|
|
226
251
|
readonly getPortfolioThroughput: (portfolioId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<unknown>>;
|
|
@@ -251,4 +276,4 @@ type LighthouseClientDependencies = {
|
|
|
251
276
|
};
|
|
252
277
|
declare const createLighthouseClient: (configuration: LighthouseClientConfiguration, dependencies?: LighthouseClientDependencies) => LighthouseClient;
|
|
253
278
|
|
|
254
|
-
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 DailyTotalWorkItemAge, type DailyWorkItemAge, 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 ResolvedLighthouseEndpoint, type ServerAuthModeResult, type StandaloneDiscoveryContract, type StandaloneDiscoveryContractParseResult, type StoredLighthouseAuth, type TotalWorkItemAgeOverTimeResult, type WorkItemAgeEntry, type WorkItemAgeOverTimeResult, createLighthouseAuthContext, createLighthouseClient, getClientPackageContract, getDefaultMetricsDateRange, getStandaloneDiscoveryLockfilePath, loadStandaloneDiscoveryContract, parseStandaloneDiscoveryContract, pollCliAuthSession, queryServerAuthMode, startCliAuthSession, validateLighthouseConnectivity };
|
|
279
|
+
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 DailyTotalWorkItemAge, type DailyWorkItemAge, 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 ResolvedLighthouseEndpoint, type ServerAuthModeResult, type StandaloneDiscoveryContract, type StandaloneDiscoveryContractParseResult, type StoredLighthouseAuth, type ThroughputFilterView, type TotalWorkItemAgeOverTimeResult, type WorkItemAgeEntry, type WorkItemAgeOverTimeResult, createLighthouseAuthContext, createLighthouseClient, getClientPackageContract, getDefaultMetricsDateRange, getStandaloneDiscoveryLockfilePath, loadStandaloneDiscoveryContract, parseStandaloneDiscoveryContract, pollCliAuthSession, queryServerAuthMode, startCliAuthSession, validateLighthouseConnectivity };
|
package/dist/index.d.ts
CHANGED
|
@@ -162,13 +162,38 @@ declare const getDefaultMetricsDateRange: () => MetricsDateRange;
|
|
|
162
162
|
type ManualForecastInput = {
|
|
163
163
|
readonly remainingItems?: number;
|
|
164
164
|
readonly targetDate?: string;
|
|
165
|
+
/**
|
|
166
|
+
* Override the team's forecast-filter setting for this forecast call:
|
|
167
|
+
* - `true` — apply the team's exclusion rule (filtered throughput).
|
|
168
|
+
* - `false` — skip the team's exclusion rule (raw throughput).
|
|
169
|
+
* - omit — respect the team's current setting (default).
|
|
170
|
+
*
|
|
171
|
+
* Lighthouse v26.5.24.10+. Older servers ignore this field.
|
|
172
|
+
*/
|
|
173
|
+
readonly applyFilterOverride?: boolean;
|
|
165
174
|
};
|
|
166
175
|
type BacktestInput = {
|
|
167
176
|
readonly startDate: string;
|
|
168
177
|
readonly endDate: string;
|
|
169
178
|
readonly historicalStartDate: string;
|
|
170
179
|
readonly historicalEndDate: string;
|
|
171
|
-
|
|
180
|
+
/**
|
|
181
|
+
* Override the team's forecast-filter setting for this backtest call:
|
|
182
|
+
* - `true` — apply the team's exclusion rule (filtered throughput).
|
|
183
|
+
* - `false` — skip the team's exclusion rule (raw throughput).
|
|
184
|
+
* - omit — respect the team's current setting (default).
|
|
185
|
+
*
|
|
186
|
+
* Lighthouse v26.5.24.10+. Older servers ignore this field.
|
|
187
|
+
*/
|
|
188
|
+
readonly applyFilterOverride?: boolean;
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Forecast-filter view for team-level throughput / PBC / predictability metrics.
|
|
192
|
+
* Lighthouse v26.5.24.10+ ignores unknown values and falls back to raw.
|
|
193
|
+
* - `"filtered"` — apply the team's exclusion rule.
|
|
194
|
+
* - `"raw"` / omit — return unfiltered data (default).
|
|
195
|
+
*/
|
|
196
|
+
type ThroughputFilterView = "raw" | "filtered";
|
|
172
197
|
type WorkItemAgeEntry = {
|
|
173
198
|
readonly id: number;
|
|
174
199
|
readonly name: string;
|
|
@@ -214,13 +239,13 @@ type LighthouseClient = {
|
|
|
214
239
|
readonly updatePortfolio: (portfolioId: number, payload: LighthouseWritePayload) => Promise<LighthouseApiResult<unknown>>;
|
|
215
240
|
readonly deletePortfolio: (portfolioId: number) => Promise<LighthouseApiResult<void>>;
|
|
216
241
|
readonly refreshPortfolio: (portfolioId: number) => Promise<LighthouseApiResult<void>>;
|
|
217
|
-
readonly getTeamThroughput: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<unknown>>;
|
|
242
|
+
readonly getTeamThroughput: (teamId: number, range?: MetricsDateRange, view?: ThroughputFilterView) => Promise<LighthouseApiResult<unknown>>;
|
|
218
243
|
readonly getTeamArrivals: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<unknown>>;
|
|
219
244
|
readonly getTeamWipOverTime: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<unknown>>;
|
|
220
245
|
readonly getTeamWip: (teamId: number, asOfDate: string) => Promise<LighthouseApiResult<readonly unknown[]>>;
|
|
221
246
|
readonly getTeamCycleTimePercentiles: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<readonly unknown[]>>;
|
|
222
247
|
readonly getTeamCycleTimeData: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<readonly unknown[]>>;
|
|
223
|
-
readonly getTeamPredictabilityScore: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<unknown>>;
|
|
248
|
+
readonly getTeamPredictabilityScore: (teamId: number, range?: MetricsDateRange, view?: ThroughputFilterView) => Promise<LighthouseApiResult<unknown>>;
|
|
224
249
|
readonly getTeamTotalWorkItemAge: (teamId: number, asOfDate: string) => Promise<LighthouseApiResult<number>>;
|
|
225
250
|
readonly getTeamTotalWorkItemAgeInfo: (teamId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<unknown>>;
|
|
226
251
|
readonly getPortfolioThroughput: (portfolioId: number, range?: MetricsDateRange) => Promise<LighthouseApiResult<unknown>>;
|
|
@@ -251,4 +276,4 @@ type LighthouseClientDependencies = {
|
|
|
251
276
|
};
|
|
252
277
|
declare const createLighthouseClient: (configuration: LighthouseClientConfiguration, dependencies?: LighthouseClientDependencies) => LighthouseClient;
|
|
253
278
|
|
|
254
|
-
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 DailyTotalWorkItemAge, type DailyWorkItemAge, 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 ResolvedLighthouseEndpoint, type ServerAuthModeResult, type StandaloneDiscoveryContract, type StandaloneDiscoveryContractParseResult, type StoredLighthouseAuth, type TotalWorkItemAgeOverTimeResult, type WorkItemAgeEntry, type WorkItemAgeOverTimeResult, createLighthouseAuthContext, createLighthouseClient, getClientPackageContract, getDefaultMetricsDateRange, getStandaloneDiscoveryLockfilePath, loadStandaloneDiscoveryContract, parseStandaloneDiscoveryContract, pollCliAuthSession, queryServerAuthMode, startCliAuthSession, validateLighthouseConnectivity };
|
|
279
|
+
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 DailyTotalWorkItemAge, type DailyWorkItemAge, 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 ResolvedLighthouseEndpoint, type ServerAuthModeResult, type StandaloneDiscoveryContract, type StandaloneDiscoveryContractParseResult, type StoredLighthouseAuth, type ThroughputFilterView, type TotalWorkItemAgeOverTimeResult, type WorkItemAgeEntry, type WorkItemAgeOverTimeResult, createLighthouseAuthContext, createLighthouseClient, getClientPackageContract, getDefaultMetricsDateRange, getStandaloneDiscoveryLockfilePath, loadStandaloneDiscoveryContract, parseStandaloneDiscoveryContract, pollCliAuthSession, queryServerAuthMode, startCliAuthSession, validateLighthouseConnectivity };
|
package/dist/index.js
CHANGED
|
@@ -669,6 +669,7 @@ var requestNoContent = async (configuration, dependencies, route, requestOptions
|
|
|
669
669
|
var getResolvedMetricsDateRange = (range) => range ?? getDefaultMetricsDateRange();
|
|
670
670
|
var getMetricsDateRangeQuery = (range) => `startDate=${encodeURIComponent(range.startDate)}&endDate=${encodeURIComponent(range.endDate)}`;
|
|
671
671
|
var getMetricsAsOfDateQuery = (asOfDate) => `asOfDate=${encodeURIComponent(asOfDate)}`;
|
|
672
|
+
var getViewQuerySuffix = (view) => view === "filtered" ? "&view=filtered" : "";
|
|
672
673
|
var addUtcDays = (dateStr, days) => {
|
|
673
674
|
const d = /* @__PURE__ */ new Date(`${dateStr}T00:00:00Z`);
|
|
674
675
|
d.setUTCDate(d.getUTCDate() + days);
|
|
@@ -837,12 +838,12 @@ var createLighthouseClient = (configuration, dependencies = {}) => ({
|
|
|
837
838
|
method: "POST"
|
|
838
839
|
}
|
|
839
840
|
),
|
|
840
|
-
getTeamThroughput: async (teamId, range) => {
|
|
841
|
+
getTeamThroughput: async (teamId, range, view) => {
|
|
841
842
|
const r = getResolvedMetricsDateRange(range);
|
|
842
843
|
return requestJson(
|
|
843
844
|
configuration,
|
|
844
845
|
dependencies,
|
|
845
|
-
`/v1/teams/${teamId}/metrics/throughput?${getMetricsDateRangeQuery(r)}`,
|
|
846
|
+
`/v1/teams/${teamId}/metrics/throughput?${getMetricsDateRangeQuery(r)}${getViewQuerySuffix(view)}`,
|
|
846
847
|
{ method: "GET" }
|
|
847
848
|
);
|
|
848
849
|
},
|
|
@@ -888,12 +889,12 @@ var createLighthouseClient = (configuration, dependencies = {}) => ({
|
|
|
888
889
|
{ method: "GET" }
|
|
889
890
|
);
|
|
890
891
|
},
|
|
891
|
-
getTeamPredictabilityScore: async (teamId, range) => {
|
|
892
|
+
getTeamPredictabilityScore: async (teamId, range, view) => {
|
|
892
893
|
const r = getResolvedMetricsDateRange(range);
|
|
893
894
|
return requestJson(
|
|
894
895
|
configuration,
|
|
895
896
|
dependencies,
|
|
896
|
-
`/v1/teams/${teamId}/metrics/multiitemforecastpredictabilityscore?${getMetricsDateRangeQuery(r)}`,
|
|
897
|
+
`/v1/teams/${teamId}/metrics/multiitemforecastpredictabilityscore?${getMetricsDateRangeQuery(r)}${getViewQuerySuffix(view)}`,
|
|
897
898
|
{ method: "GET" }
|
|
898
899
|
);
|
|
899
900
|
},
|
package/package.json
CHANGED