0.5.0: typecheck against regenerated models
CI / publish (push) Failing after 26s
CI / check (push) Successful in 1m4s

listQuests no longer takes a body, battle-pass track is a union, scenario
run status has no unknown_run. This ships loginWithCustom and quest
metric helpers that never reached the registry after the v0.4.0 publish
job failed.
This commit is contained in:
edmand46
2026-08-28 15:18:31 +03:00
parent e6128e54bd
commit fff971ad15
10 changed files with 25 additions and 13 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ export interface QuestEffect {
export interface BattlePassEffect {
getProgress(): Promise<GetBattlePassProgressResponse>;
addXp(source: string, amount: number): Promise<AddBattlePassXpResponse>;
claimReward(level: number, track?: string): Promise<ClaimBattlePassRewardResponse>;
claimReward(level: number, track?: 'free' | 'premium'): Promise<ClaimBattlePassRewardResponse>;
purchasePremium(): Promise<PurchaseBattlePassPremiumResponse>;
levelUp(): Promise<void>;
end(): Promise<void>;
+3 -3
View File
@@ -1,9 +1,9 @@
/**
* QuestMetrics — builders for the quest metric strings known to the platform.
*
* Purchase metrics are reported automatically by the shop purchase fan-out,
* so these helpers exist mainly to name the format instead of hardcoding it.
* Any other metric is a custom string reported via
* Purchase metrics are reported automatically server-side by the shop
* purchase fan-out, so these helpers exist mainly to name the format
* instead of hardcoding it. Any other metric is a custom string reported via
* {@link QuestsService.reportProgress}.
*/
+1 -1
View File
@@ -15,7 +15,7 @@ export class QuestsService {
/** Lists the player's quests with per-objective progress and rewards. */
async list(): Promise<Quest[]> {
const response = await api.listQuests(this.ctx, {});
const response = await api.listQuests(this.ctx);
return response.quests ?? [];
}
+4 -2
View File
@@ -136,8 +136,9 @@ export class ScenarioService<TConfig extends RemoteConfigShape = RemoteConfigSha
try {
const response = await api.getScenarioRun(this.ctx, { runId: saved.runId });
const status: string | undefined = response?.status;
if (response?.status === 'unknown_run' || response?.status === 'expired') {
if (status === 'unknown_run' || status === 'expired') {
continue;
}
@@ -466,8 +467,9 @@ export class ScenarioService<TConfig extends RemoteConfigShape = RemoteConfigSha
let reconciled = false;
try {
const reconcile = await api.getScenarioRun(this.ctx, { runId: run.runId });
const reconcileStatus: string | undefined = reconcile?.status;
if (reconcile?.status === 'unknown_run' || reconcile?.status === 'expired') {
if (reconcileStatus === 'unknown_run' || reconcileStatus === 'expired') {
this.runs.delete(run.runId);
await this.persist();
reconciled = true;
+1 -1
View File
@@ -278,7 +278,7 @@ export class BattlePassSession {
}
/** Claims a tier reward at a reached level. */
claimReward(level: number, track?: string): Promise<ClaimBattlePassRewardResponse> {
claimReward(level: number, track?: 'free' | 'premium'): Promise<ClaimBattlePassRewardResponse> {
const { scenarioId, nodeId, runId } = this.ids();
return this.battlePass.claimReward({ scenarioId, nodeId, level, track, runId });
}