Slug-based scenarios, quests and offers per the environments contract; regenerated models; e2e seed passes environment to admin mirrors
Claude-Session: https://claude.ai/code/session_01SMCvdwDmuxoaqGgvGBLk1V
This commit is contained in:
@@ -163,10 +163,10 @@ export const api = {
|
||||
|
||||
purchaseOffer: (
|
||||
t: Transport,
|
||||
path: { storeSlug: string; offerId: string },
|
||||
path: { storeSlug: string; offerSlug: string },
|
||||
body: PurchaseOfferRequest,
|
||||
): Promise<PurchaseOfferResponse> =>
|
||||
t.request<PurchaseOfferResponse>('POST', `/sdk/v1/stores/${enc(path.storeSlug)}/offers/${enc(path.offerId)}/purchase`, body),
|
||||
t.request<PurchaseOfferResponse>('POST', `/sdk/v1/stores/${enc(path.storeSlug)}/offers/${enc(path.offerSlug)}/purchase`, body),
|
||||
|
||||
refreshAccessToken: (
|
||||
t: Transport,
|
||||
|
||||
@@ -6,7 +6,7 @@ export interface AddBattlePassXpRequest {
|
||||
"amount"?: number;
|
||||
"nodeId"?: string;
|
||||
"runId"?: string;
|
||||
"scenarioId"?: string;
|
||||
"scenarioSlug"?: string;
|
||||
"source"?: string;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ export interface ClaimBattlePassRewardRequest {
|
||||
"level"?: number;
|
||||
"nodeId"?: string;
|
||||
"runId"?: string;
|
||||
"scenarioId"?: string;
|
||||
"scenarioSlug"?: string;
|
||||
"track"?: "free" | "premium";
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ export interface ClaimedTier {
|
||||
|
||||
export interface GetBattlePassProgressRequest {
|
||||
"nodeId"?: string;
|
||||
"scenarioId"?: string;
|
||||
"scenarioSlug"?: string;
|
||||
}
|
||||
|
||||
export interface GetBattlePassProgressResponse {
|
||||
@@ -53,7 +53,7 @@ export interface PurchaseBattlePassPremiumRequest {
|
||||
"idempotencyKey"?: string;
|
||||
"nodeId"?: string;
|
||||
"runId"?: string;
|
||||
"scenarioId"?: string;
|
||||
"scenarioSlug"?: string;
|
||||
}
|
||||
|
||||
export interface PurchaseBattlePassPremiumResponse {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import type { Reward } from './common.js';
|
||||
|
||||
export interface ClaimQuestRequest {
|
||||
"questId"?: string;
|
||||
"questSlug"?: string;
|
||||
}
|
||||
|
||||
export interface ClaimQuestResponse {
|
||||
@@ -18,10 +18,10 @@ export interface ListQuestsResponse {
|
||||
}
|
||||
|
||||
export interface Quest {
|
||||
"id"?: string;
|
||||
"name"?: string;
|
||||
"objectives"?: QuestObjectiveProgress[];
|
||||
"rewards"?: Reward[];
|
||||
"slug"?: string;
|
||||
"status"?: "active" | "claimed" | "completed";
|
||||
}
|
||||
|
||||
@@ -39,6 +39,6 @@ export interface ReportQuestProgressRequest {
|
||||
}
|
||||
|
||||
export interface ReportQuestProgressResponse {
|
||||
"completedQuestIds"?: string[];
|
||||
"completedQuestSlugs"?: string[];
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ export interface HandleScenarioCallbackRequest {
|
||||
"handle"?: string;
|
||||
"nodeId"?: string;
|
||||
"runId"?: string;
|
||||
"scenarioId"?: string;
|
||||
"scenarioSlug"?: string;
|
||||
}
|
||||
|
||||
export interface HandleScenarioCallbackResponse {
|
||||
@@ -19,7 +19,7 @@ export interface PendingEffect {
|
||||
"data": { [key: string]: unknown };
|
||||
"nodeId": string;
|
||||
"runId": string;
|
||||
"scenarioId": string;
|
||||
"scenarioSlug": string;
|
||||
"type": string;
|
||||
"waitDeadline"?: string;
|
||||
}
|
||||
@@ -37,7 +37,7 @@ export interface UpdateScenarioCounterRequest {
|
||||
"counterKey"?: string;
|
||||
"nodeId"?: string;
|
||||
"runId"?: string;
|
||||
"scenarioId"?: string;
|
||||
"scenarioSlug"?: string;
|
||||
}
|
||||
|
||||
export interface UpdateScenarioCounterResponse {
|
||||
|
||||
@@ -12,6 +12,7 @@ export interface Offer {
|
||||
"maxPurchases"?: number;
|
||||
"name"?: string;
|
||||
"price"?: OfferPrice;
|
||||
"slug"?: string;
|
||||
"updatedAt"?: string;
|
||||
}
|
||||
|
||||
@@ -27,7 +28,7 @@ export interface OfferPrice {
|
||||
|
||||
export interface PurchaseOfferRequest {
|
||||
"idempotencyKey"?: string;
|
||||
"offerId"?: string;
|
||||
"offerSlug"?: string;
|
||||
"storeSlug"?: string;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user