0.4.0: battlepass levelNumber fix, UGC removed, regenerated API types, CI publish on tags
This commit is contained in:
@@ -12,7 +12,6 @@ import type { ListRemoteConfigsResponse, RemoteConfig } from './remote-config.js
|
||||
import type { GetScenarioRunRequest, GetScenarioRunResponse, HandleScenarioCallbackRequest, HandleScenarioCallbackResponse, TriggerScenarioRequest, TriggerScenarioResponse, UpdateScenarioCounterRequest, UpdateScenarioCounterResponse } from './scenarios.js';
|
||||
import type { GetStorageResponse, UpdateStorageRequest } from './storage.js';
|
||||
import type { ListStoresResponse, PurchaseOfferRequest, PurchaseOfferResponse, Store } from './stores.js';
|
||||
import type { DeleteUgcResponse, GetDownloadUrlResponse, GetUploadUrlResponse, ListUgcResponse, SubmitUgcRequest, UgcSubmission } from './ugc.js';
|
||||
|
||||
/** The minimal transport contract the generated API functions call through. */
|
||||
export interface Transport {
|
||||
@@ -61,24 +60,12 @@ export const api = {
|
||||
): Promise<void> =>
|
||||
t.request<void>('DELETE', `/sdk/v1/storage${qs([['type', query?.type]])}`),
|
||||
|
||||
deleteUgc: (
|
||||
t: Transport,
|
||||
path: { id: string },
|
||||
): Promise<DeleteUgcResponse> =>
|
||||
t.request<DeleteUgcResponse>('DELETE', `/sdk/v1/ugc/${enc(path.id)}`),
|
||||
|
||||
getBattlePassProgress: (
|
||||
t: Transport,
|
||||
body: GetBattlePassProgressRequest,
|
||||
): Promise<GetBattlePassProgressResponse> =>
|
||||
t.request<GetBattlePassProgressResponse>('POST', '/sdk/v1/battlepass/progress', body),
|
||||
|
||||
getDownloadUrl: (
|
||||
t: Transport,
|
||||
path: { id: string },
|
||||
): Promise<GetDownloadUrlResponse> =>
|
||||
t.request<GetDownloadUrlResponse>('GET', `/sdk/v1/ugc/${enc(path.id)}/download`),
|
||||
|
||||
getInventory: (
|
||||
t: Transport,
|
||||
): Promise<GetInventoryResponse> =>
|
||||
@@ -131,18 +118,6 @@ export const api = {
|
||||
): Promise<Store> =>
|
||||
t.request<Store>('GET', `/sdk/v1/stores/${enc(path.slug)}`),
|
||||
|
||||
getUgc: (
|
||||
t: Transport,
|
||||
path: { id: string },
|
||||
): Promise<UgcSubmission> =>
|
||||
t.request<UgcSubmission>('GET', `/sdk/v1/ugc/${enc(path.id)}`),
|
||||
|
||||
getUploadUrl: (
|
||||
t: Transport,
|
||||
query?: { filename?: string },
|
||||
): Promise<GetUploadUrlResponse> =>
|
||||
t.request<GetUploadUrlResponse>('GET', `/sdk/v1/ugc/upload-url${qs([['filename', query?.filename]])}`),
|
||||
|
||||
handleScenarioCallback: (
|
||||
t: Transport,
|
||||
body: HandleScenarioCallbackRequest,
|
||||
@@ -170,12 +145,6 @@ export const api = {
|
||||
): Promise<ListStoresResponse> =>
|
||||
t.request<ListStoresResponse>('GET', '/sdk/v1/stores'),
|
||||
|
||||
listUgc: (
|
||||
t: Transport,
|
||||
query?: { status?: string; limit?: number; cursor?: string },
|
||||
): Promise<ListUgcResponse> =>
|
||||
t.request<ListUgcResponse>('GET', `/sdk/v1/ugc${qs([['status', query?.status], ['limit', query?.limit], ['cursor', query?.cursor]])}`),
|
||||
|
||||
loginViaDevice: (
|
||||
t: Transport,
|
||||
body: LoginViaDeviceRequest,
|
||||
@@ -214,12 +183,6 @@ export const api = {
|
||||
): Promise<void> =>
|
||||
t.request<void>('POST', `/sdk/v1/leaderboards/${enc(path.slug)}/submit-score`, body),
|
||||
|
||||
submitUgc: (
|
||||
t: Transport,
|
||||
body: SubmitUgcRequest,
|
||||
): Promise<UgcSubmission> =>
|
||||
t.request<UgcSubmission>('POST', '/sdk/v1/ugc', body),
|
||||
|
||||
triggerScenario: (
|
||||
t: Transport,
|
||||
body: TriggerScenarioRequest,
|
||||
|
||||
Reference in New Issue
Block a user