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,
|
||||
|
||||
@@ -13,6 +13,5 @@ export * from './remote-config.js';
|
||||
export * from './scenarios.js';
|
||||
export * from './storage.js';
|
||||
export * from './stores.js';
|
||||
export * from './ugc.js';
|
||||
export * from './api.js';
|
||||
export * from './errors.js';
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
// Code generated by apigen. DO NOT EDIT.
|
||||
|
||||
export interface DeleteUgcResponse {
|
||||
"success"?: boolean;
|
||||
}
|
||||
|
||||
export interface GetDownloadUrlResponse {
|
||||
"downloadUrl"?: string;
|
||||
}
|
||||
|
||||
export interface GetUploadUrlResponse {
|
||||
"fileKey"?: string;
|
||||
"uploadUrl"?: string;
|
||||
}
|
||||
|
||||
export interface ListUgcResponse {
|
||||
"items"?: UgcSubmission[];
|
||||
"nextCursor"?: string;
|
||||
}
|
||||
|
||||
export interface SubmitUgcRequest {
|
||||
"description"?: string;
|
||||
"fileKey"?: string;
|
||||
"fileSize"?: number;
|
||||
"metadata"?: { [key: string]: unknown };
|
||||
"name"?: string;
|
||||
}
|
||||
|
||||
export interface SubmittedBy {
|
||||
"userId"?: string;
|
||||
"username"?: string;
|
||||
}
|
||||
|
||||
export interface UgcSubmission {
|
||||
"description"?: string;
|
||||
"fileSize"?: number;
|
||||
"fileUrl"?: string;
|
||||
"id"?: string;
|
||||
"metadata"?: { [key: string]: unknown };
|
||||
"name"?: string;
|
||||
"reviewedAt"?: string;
|
||||
"reviewedBy"?: string;
|
||||
"status"?: string;
|
||||
"submittedAt"?: string;
|
||||
"submittedBy"?: SubmittedBy;
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ export class BattlePassLevelSession {
|
||||
constructor(private readonly context: ScenarioNodeContext) {}
|
||||
|
||||
get level(): number {
|
||||
return this.context.get('level', 0);
|
||||
return this.context.get('levelNumber', 0);
|
||||
}
|
||||
|
||||
get data(): Record<string, unknown> {
|
||||
|
||||
Reference in New Issue
Block a user