Add ProjectStorageDomain with projectStorage sync
CI / check (push) Successful in 48s

This commit is contained in:
edmand46
2026-08-12 23:58:30 +03:00
parent 3ab2d4a6cf
commit fd364fd156
6 changed files with 80 additions and 0 deletions
+13
View File
@@ -6,6 +6,7 @@ import type { ListCatalogItemsResponse } from './catalog.js';
import type { GetInventoryResponse } from './inventory.js';
import type { GetRankingResponse, SubmitScoreRequest } from './leaderboards.js';
import type { PlayerProfile } from './player.js';
import type { GetProjectStorageResponse, UpdateProjectStorageRequest } from './project-storage.js';
import type { ClaimQuestRequest, ClaimQuestResponse, ListQuestsRequest, ListQuestsResponse } from './quests.js';
import type { ListRemoteConfigsResponse, RemoteConfig } from './remote-config.js';
import type { GetScenarioRunRequest, GetScenarioRunResponse, HandleScenarioCallbackRequest, HandleScenarioCallbackResponse, TriggerScenarioRequest, TriggerScenarioResponse, UpdateScenarioCounterRequest, UpdateScenarioCounterResponse } from './scenarios.js';
@@ -88,6 +89,12 @@ export const api = {
): Promise<PlayerProfile> =>
t.request<PlayerProfile>('GET', '/sdk/v1/player/information'),
getProjectStorage: (
t: Transport,
query?: { types?: string; limit?: number; cursor?: string },
): Promise<GetProjectStorageResponse> =>
t.request<GetProjectStorageResponse>('GET', `/sdk/v1/project-storage${qs([['types', query?.types], ['limit', query?.limit], ['cursor', query?.cursor]])}`),
getRanking: (
t: Transport,
path: { slug: string },
@@ -213,6 +220,12 @@ export const api = {
): Promise<TriggerScenarioResponse> =>
t.request<TriggerScenarioResponse>('POST', '/sdk/v1/scenarios/trigger', body),
updateProjectStorage: (
t: Transport,
body: UpdateProjectStorageRequest,
): Promise<void> =>
t.request<void>('PUT', '/sdk/v1/project-storage', body),
updateScenarioCounter: (
t: Transport,
body: UpdateScenarioCounterRequest,