@@ -0,0 +1,228 @@
|
||||
// Code generated by apigen. DO NOT EDIT.
|
||||
|
||||
import type { LoginViaDeviceRequest, LoginViaDeviceResponse, RefreshAccessTokenRequest, RefreshAccessTokenResponse } from './auth.js';
|
||||
import type { AddBattlePassXpRequest, AddBattlePassXpResponse, ClaimBattlePassRewardRequest, ClaimBattlePassRewardResponse, GetBattlePassProgressRequest, GetBattlePassProgressResponse, PurchaseBattlePassPremiumRequest, PurchaseBattlePassPremiumResponse } from './battlepass.js';
|
||||
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 { 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';
|
||||
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 {
|
||||
request<TResponse>(method: string, path: string, body?: unknown): Promise<TResponse>;
|
||||
}
|
||||
|
||||
function enc(value: string | number): string {
|
||||
return encodeURIComponent(String(value));
|
||||
}
|
||||
|
||||
function qs(
|
||||
params: Array<[string, string | number | boolean | null | undefined]>,
|
||||
): string {
|
||||
const parts: string[] = [];
|
||||
for (const [key, value] of params) {
|
||||
if (value !== null && value !== undefined && value !== '') {
|
||||
parts.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
|
||||
}
|
||||
}
|
||||
return parts.length === 0 ? '' : `?${parts.join('&')}`;
|
||||
}
|
||||
|
||||
/** Typed request functions, one per SDK operation. */
|
||||
export const api = {
|
||||
addBattlePassXp: (
|
||||
t: Transport,
|
||||
body: AddBattlePassXpRequest,
|
||||
): Promise<AddBattlePassXpResponse> =>
|
||||
t.request<AddBattlePassXpResponse>('POST', '/sdk/v1/battlepass/xp', body),
|
||||
|
||||
claimBattlePassReward: (
|
||||
t: Transport,
|
||||
body: ClaimBattlePassRewardRequest,
|
||||
): Promise<ClaimBattlePassRewardResponse> =>
|
||||
t.request<ClaimBattlePassRewardResponse>('POST', '/sdk/v1/battlepass/claim', body),
|
||||
|
||||
claimQuest: (
|
||||
t: Transport,
|
||||
body: ClaimQuestRequest,
|
||||
): Promise<ClaimQuestResponse> =>
|
||||
t.request<ClaimQuestResponse>('POST', '/sdk/v1/quests/claim', body),
|
||||
|
||||
deleteStorage: (
|
||||
t: Transport,
|
||||
query?: { type?: string },
|
||||
): 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> =>
|
||||
t.request<GetInventoryResponse>('GET', '/sdk/v1/inventory'),
|
||||
|
||||
getPlayerInformation: (
|
||||
t: Transport,
|
||||
): Promise<PlayerProfile> =>
|
||||
t.request<PlayerProfile>('GET', '/sdk/v1/player/information'),
|
||||
|
||||
getRanking: (
|
||||
t: Transport,
|
||||
path: { slug: string },
|
||||
query?: { limit?: number },
|
||||
): Promise<GetRankingResponse> =>
|
||||
t.request<GetRankingResponse>('GET', `/sdk/v1/leaderboards/${enc(path.slug)}/ranking${qs([['limit', query?.limit]])}`),
|
||||
|
||||
getRemoteConfig: (
|
||||
t: Transport,
|
||||
path: { key: string },
|
||||
): Promise<RemoteConfig> =>
|
||||
t.request<RemoteConfig>('GET', `/sdk/v1/remote-configs/${enc(path.key)}`),
|
||||
|
||||
getRevisions: (
|
||||
t: Transport,
|
||||
): Promise<{ [key: string]: number }> =>
|
||||
t.request<{ [key: string]: number }>('GET', '/sdk/v1/sync'),
|
||||
|
||||
getScenarioRun: (
|
||||
t: Transport,
|
||||
body: GetScenarioRunRequest,
|
||||
): Promise<GetScenarioRunResponse> =>
|
||||
t.request<GetScenarioRunResponse>('POST', '/sdk/v1/scenarios/run', body),
|
||||
|
||||
getStorage: (
|
||||
t: Transport,
|
||||
query?: { types?: string; limit?: number; cursor?: string },
|
||||
): Promise<GetStorageResponse> =>
|
||||
t.request<GetStorageResponse>('GET', `/sdk/v1/storage${qs([['types', query?.types], ['limit', query?.limit], ['cursor', query?.cursor]])}`),
|
||||
|
||||
getStore: (
|
||||
t: Transport,
|
||||
path: { slug: string },
|
||||
): 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,
|
||||
): Promise<HandleScenarioCallbackResponse> =>
|
||||
t.request<HandleScenarioCallbackResponse>('POST', '/sdk/v1/scenarios/callback', body),
|
||||
|
||||
listCatalogItems: (
|
||||
t: Transport,
|
||||
): Promise<ListCatalogItemsResponse> =>
|
||||
t.request<ListCatalogItemsResponse>('GET', '/sdk/v1/catalog'),
|
||||
|
||||
listQuests: (
|
||||
t: Transport,
|
||||
body: ListQuestsRequest,
|
||||
): Promise<ListQuestsResponse> =>
|
||||
t.request<ListQuestsResponse>('POST', '/sdk/v1/quests/list', body),
|
||||
|
||||
listSdkRemoteConfigs: (
|
||||
t: Transport,
|
||||
): Promise<ListRemoteConfigsResponse> =>
|
||||
t.request<ListRemoteConfigsResponse>('GET', '/sdk/v1/remote-configs'),
|
||||
|
||||
listSdkStores: (
|
||||
t: Transport,
|
||||
): 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,
|
||||
): Promise<LoginViaDeviceResponse> =>
|
||||
t.request<LoginViaDeviceResponse>('POST', '/sdk/v1/authorization/device', body),
|
||||
|
||||
purchaseBattlePassPremium: (
|
||||
t: Transport,
|
||||
body: PurchaseBattlePassPremiumRequest,
|
||||
): Promise<PurchaseBattlePassPremiumResponse> =>
|
||||
t.request<PurchaseBattlePassPremiumResponse>('POST', '/sdk/v1/battlepass/premium', body),
|
||||
|
||||
purchaseOffer: (
|
||||
t: Transport,
|
||||
path: { storeSlug: string; offerId: string },
|
||||
body: PurchaseOfferRequest,
|
||||
): Promise<PurchaseOfferResponse> =>
|
||||
t.request<PurchaseOfferResponse>('POST', `/sdk/v1/stores/${enc(path.storeSlug)}/offers/${enc(path.offerId)}/purchase`, body),
|
||||
|
||||
refreshAccessToken: (
|
||||
t: Transport,
|
||||
body: RefreshAccessTokenRequest,
|
||||
): Promise<RefreshAccessTokenResponse> =>
|
||||
t.request<RefreshAccessTokenResponse>('POST', '/sdk/v1/authorization/refresh', body),
|
||||
|
||||
submitScore: (
|
||||
t: Transport,
|
||||
path: { slug: string },
|
||||
body: SubmitScoreRequest,
|
||||
): 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,
|
||||
): Promise<TriggerScenarioResponse> =>
|
||||
t.request<TriggerScenarioResponse>('POST', '/sdk/v1/scenarios/trigger', body),
|
||||
|
||||
updateScenarioCounter: (
|
||||
t: Transport,
|
||||
body: UpdateScenarioCounterRequest,
|
||||
): Promise<UpdateScenarioCounterResponse> =>
|
||||
t.request<UpdateScenarioCounterResponse>('POST', '/sdk/v1/scenarios/counter', body),
|
||||
|
||||
updateStorage: (
|
||||
t: Transport,
|
||||
body: UpdateStorageRequest,
|
||||
): Promise<void> =>
|
||||
t.request<void>('PUT', '/sdk/v1/storage', body),
|
||||
|
||||
};
|
||||
@@ -0,0 +1,24 @@
|
||||
// Code generated by apigen. DO NOT EDIT.
|
||||
|
||||
export interface LoginViaDeviceRequest {
|
||||
"deviceId"?: string;
|
||||
"key"?: string;
|
||||
"language"?: string;
|
||||
"nickname"?: string;
|
||||
"region"?: string;
|
||||
}
|
||||
|
||||
export interface LoginViaDeviceResponse {
|
||||
"accessToken"?: string;
|
||||
"refreshToken"?: string;
|
||||
}
|
||||
|
||||
export interface RefreshAccessTokenRequest {
|
||||
"refreshToken"?: string;
|
||||
}
|
||||
|
||||
export interface RefreshAccessTokenResponse {
|
||||
"accessToken"?: string;
|
||||
"refreshToken"?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
// Code generated by apigen. DO NOT EDIT.
|
||||
|
||||
import type { ExecutionPlan } from './common.js';
|
||||
|
||||
export interface AddBattlePassXpRequest {
|
||||
"amount"?: number;
|
||||
"nodeId"?: string;
|
||||
"runId"?: string;
|
||||
"scenarioId"?: string;
|
||||
"source"?: string;
|
||||
}
|
||||
|
||||
export interface AddBattlePassXpResponse {
|
||||
"level"?: number;
|
||||
"leveledUp"?: boolean;
|
||||
"maxLevel"?: boolean;
|
||||
"plan"?: ExecutionPlan;
|
||||
"xp"?: number;
|
||||
}
|
||||
|
||||
export interface BattlePassReward {
|
||||
"amount"?: number;
|
||||
"currency"?: string;
|
||||
"itemId"?: string;
|
||||
}
|
||||
|
||||
export interface ClaimBattlePassRewardRequest {
|
||||
"level"?: number;
|
||||
"nodeId"?: string;
|
||||
"runId"?: string;
|
||||
"scenarioId"?: string;
|
||||
"track"?: string;
|
||||
}
|
||||
|
||||
export interface ClaimBattlePassRewardResponse {
|
||||
"alreadyClaimed"?: boolean;
|
||||
"error"?: string;
|
||||
"granted"?: BattlePassReward[];
|
||||
"success"?: boolean;
|
||||
}
|
||||
|
||||
export interface ClaimedTier {
|
||||
"level"?: number;
|
||||
"track"?: string;
|
||||
}
|
||||
|
||||
export interface GetBattlePassProgressRequest {
|
||||
"nodeId"?: string;
|
||||
"scenarioId"?: string;
|
||||
}
|
||||
|
||||
export interface GetBattlePassProgressResponse {
|
||||
"claimedTiers"?: ClaimedTier[];
|
||||
"level"?: number;
|
||||
"premiumOwned"?: boolean;
|
||||
"xp"?: number;
|
||||
}
|
||||
|
||||
export interface PurchaseBattlePassPremiumRequest {
|
||||
"idempotencyKey"?: string;
|
||||
"nodeId"?: string;
|
||||
"runId"?: string;
|
||||
"scenarioId"?: string;
|
||||
}
|
||||
|
||||
export interface PurchaseBattlePassPremiumResponse {
|
||||
"error"?: string;
|
||||
"plan"?: ExecutionPlan;
|
||||
"success"?: boolean;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
// Code generated by apigen. DO NOT EDIT.
|
||||
|
||||
export interface CatalogItem {
|
||||
"name"?: string;
|
||||
"properties"?: { [key: string]: unknown };
|
||||
"slug"?: string;
|
||||
"tags"?: string[];
|
||||
}
|
||||
|
||||
export interface ListCatalogItemsResponse {
|
||||
"items"?: CatalogItem[];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
// Code generated by apigen. DO NOT EDIT.
|
||||
|
||||
export interface BoundaryNode {
|
||||
"callbackUrl"?: string;
|
||||
"enforcement"?: "client" | "server";
|
||||
"enteredAt"?: string;
|
||||
"nodeId"?: string;
|
||||
"sourceHandle"?: string;
|
||||
"sourceNodeId"?: string;
|
||||
"waitDeadline"?: string;
|
||||
}
|
||||
|
||||
export interface ErrorResponse {
|
||||
"code"?: "early_completion" | "forbidden" | "level_not_reached" | "node_not_active" | "objectives_incomplete" | "run_expired" | "run_not_active" | "scenario_not_active" | "unknown_run";
|
||||
"error"?: string;
|
||||
"requestId"?: string;
|
||||
}
|
||||
|
||||
export interface ExecutionPlan {
|
||||
"boundaryNodes"?: BoundaryNode[];
|
||||
"context"?: { [key: string]: unknown };
|
||||
"edges"?: PlanEdge[];
|
||||
"nodes"?: ExecutionPlanNode[];
|
||||
"planId"?: string;
|
||||
"runId"?: string;
|
||||
"scenarioId"?: string;
|
||||
"startNodeId"?: string;
|
||||
"userId"?: string;
|
||||
}
|
||||
|
||||
export interface ExecutionPlanNode {
|
||||
"data"?: { [key: string]: unknown };
|
||||
"id"?: string;
|
||||
"type"?: string;
|
||||
}
|
||||
|
||||
export interface PlanEdge {
|
||||
"id"?: string;
|
||||
"source"?: string;
|
||||
"sourceHandle"?: string;
|
||||
"target"?: string;
|
||||
"targetHandle"?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
// Code generated by apigen. DO NOT EDIT.
|
||||
|
||||
export type RudderErrorCode = "early_completion" | "forbidden" | "level_not_reached" | "node_not_active" | "objectives_incomplete" | "run_expired" | "run_not_active" | "scenario_not_active" | "unknown_run";
|
||||
|
||||
export const RudderErrorCodes = {
|
||||
earlyCompletion: "early_completion",
|
||||
forbidden: "forbidden",
|
||||
levelNotReached: "level_not_reached",
|
||||
nodeNotActive: "node_not_active",
|
||||
objectivesIncomplete: "objectives_incomplete",
|
||||
runExpired: "run_expired",
|
||||
runNotActive: "run_not_active",
|
||||
scenarioNotActive: "scenario_not_active",
|
||||
unknownRun: "unknown_run",
|
||||
} as const;
|
||||
@@ -0,0 +1,17 @@
|
||||
// Code generated by apigen. DO NOT EDIT.
|
||||
|
||||
export * from './auth.js';
|
||||
export * from './battlepass.js';
|
||||
export * from './catalog.js';
|
||||
export * from './common.js';
|
||||
export * from './inventory.js';
|
||||
export * from './leaderboards.js';
|
||||
export * from './player.js';
|
||||
export * from './quests.js';
|
||||
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';
|
||||
@@ -0,0 +1,14 @@
|
||||
// Code generated by apigen. DO NOT EDIT.
|
||||
|
||||
export interface GetInventoryResponse {
|
||||
"items"?: PlayerInventoryItem[];
|
||||
}
|
||||
|
||||
export interface PlayerInventoryItem {
|
||||
"amount"?: number;
|
||||
"nameOverride"?: string;
|
||||
"propertiesOverride"?: { [key: string]: unknown };
|
||||
"slug"?: string;
|
||||
"updatedAt"?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// Code generated by apigen. DO NOT EDIT.
|
||||
|
||||
export interface GetRankingResponse {
|
||||
"entries"?: RankEntry[];
|
||||
"total"?: number;
|
||||
}
|
||||
|
||||
export interface RankEntry {
|
||||
"playerId"?: string;
|
||||
"playerName"?: string;
|
||||
"rank"?: number;
|
||||
"score"?: number;
|
||||
}
|
||||
|
||||
export interface SubmitScoreRequest {
|
||||
"score"?: number;
|
||||
"slug"?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
// Code generated by apigen. DO NOT EDIT.
|
||||
|
||||
export interface Player {
|
||||
"createdAt"?: string;
|
||||
"id"?: string;
|
||||
"language"?: string;
|
||||
"nickname"?: string;
|
||||
"projectId"?: string;
|
||||
"region"?: string;
|
||||
}
|
||||
|
||||
export interface PlayerProfile {
|
||||
"player"?: Player;
|
||||
"wallets"?: Wallet[];
|
||||
}
|
||||
|
||||
export interface Wallet {
|
||||
"balance"?: number;
|
||||
"currency"?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
// Code generated by apigen. DO NOT EDIT.
|
||||
|
||||
export interface ClaimQuestRequest {
|
||||
"questId"?: string;
|
||||
}
|
||||
|
||||
export interface ClaimQuestResponse {
|
||||
"alreadyClaimed"?: boolean;
|
||||
"error"?: string;
|
||||
"granted"?: QuestReward[];
|
||||
"success"?: boolean;
|
||||
}
|
||||
|
||||
export interface ListQuestsRequest {
|
||||
}
|
||||
|
||||
export interface ListQuestsResponse {
|
||||
"quests"?: Quest[];
|
||||
}
|
||||
|
||||
export interface Quest {
|
||||
"id"?: string;
|
||||
"name"?: string;
|
||||
"objectives"?: QuestObjectiveProgress[];
|
||||
"rewards"?: QuestReward[];
|
||||
"status"?: string;
|
||||
}
|
||||
|
||||
export interface QuestObjectiveProgress {
|
||||
"completed"?: boolean;
|
||||
"current"?: number;
|
||||
"metric"?: string;
|
||||
"objectiveId"?: string;
|
||||
"target"?: number;
|
||||
}
|
||||
|
||||
export interface QuestReward {
|
||||
"amount"?: number;
|
||||
"currency"?: string;
|
||||
"itemId"?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// Code generated by apigen. DO NOT EDIT.
|
||||
|
||||
export interface ListRemoteConfigsResponse {
|
||||
"configs"?: { [key: string]: RemoteConfig };
|
||||
}
|
||||
|
||||
export interface RemoteConfig {
|
||||
"active"?: boolean;
|
||||
"createdAt"?: string;
|
||||
"description"?: string;
|
||||
"environment"?: string;
|
||||
"id"?: string;
|
||||
"key"?: string;
|
||||
"projectId"?: string;
|
||||
"updatedAt"?: string;
|
||||
"value"?: string;
|
||||
"valueType"?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
// Code generated by apigen. DO NOT EDIT.
|
||||
|
||||
import type { ExecutionPlan } from './common.js';
|
||||
|
||||
export interface GetScenarioRunRequest {
|
||||
"runId"?: string;
|
||||
}
|
||||
|
||||
export interface GetScenarioRunResponse {
|
||||
"plan"?: ExecutionPlan;
|
||||
"runId"?: string;
|
||||
"status"?: string;
|
||||
}
|
||||
|
||||
export interface HandleScenarioCallbackRequest {
|
||||
"handle"?: string;
|
||||
"nodeId"?: string;
|
||||
"runId"?: string;
|
||||
"scenarioId"?: string;
|
||||
}
|
||||
|
||||
export interface HandleScenarioCallbackResponse {
|
||||
"plan"?: ExecutionPlan;
|
||||
}
|
||||
|
||||
export interface TriggerScenarioRequest {
|
||||
"event"?: string;
|
||||
}
|
||||
|
||||
export interface TriggerScenarioResponse {
|
||||
"plans"?: ExecutionPlan[];
|
||||
}
|
||||
|
||||
export interface UpdateScenarioCounterRequest {
|
||||
"amount"?: number;
|
||||
"counterKey"?: string;
|
||||
"nodeId"?: string;
|
||||
"runId"?: string;
|
||||
"scenarioId"?: string;
|
||||
}
|
||||
|
||||
export interface UpdateScenarioCounterResponse {
|
||||
"completed"?: boolean;
|
||||
"plan"?: ExecutionPlan;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
// Code generated by apigen. DO NOT EDIT.
|
||||
|
||||
export interface GetStorageResponse {
|
||||
"items"?: StorageItem[];
|
||||
"nextCursor"?: string;
|
||||
}
|
||||
|
||||
export interface StorageItem {
|
||||
"data"?: string;
|
||||
"id"?: string;
|
||||
"type"?: string;
|
||||
}
|
||||
|
||||
export interface UpdateStorageRequest {
|
||||
"idempotencyKey"?: string;
|
||||
"items"?: StorageItem[];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
// Code generated by apigen. DO NOT EDIT.
|
||||
|
||||
export interface ListStoresResponse {
|
||||
"stores"?: Store[];
|
||||
"total"?: number;
|
||||
}
|
||||
|
||||
export interface Offer {
|
||||
"contents"?: OfferContent[];
|
||||
"createdAt"?: string;
|
||||
"id"?: string;
|
||||
"maxPurchases"?: number;
|
||||
"name"?: string;
|
||||
"price"?: OfferPrice;
|
||||
"updatedAt"?: string;
|
||||
}
|
||||
|
||||
export interface OfferContent {
|
||||
"amount"?: number;
|
||||
"itemId"?: string;
|
||||
}
|
||||
|
||||
export interface OfferPrice {
|
||||
"amount"?: number;
|
||||
"currency"?: string;
|
||||
}
|
||||
|
||||
export interface PurchaseOfferRequest {
|
||||
"idempotencyKey"?: string;
|
||||
"offerId"?: string;
|
||||
"storeSlug"?: string;
|
||||
}
|
||||
|
||||
export interface PurchaseOfferResponse {
|
||||
"error"?: string;
|
||||
"purchaseId"?: string;
|
||||
"success"?: boolean;
|
||||
}
|
||||
|
||||
export interface Store {
|
||||
"createdAt"?: string;
|
||||
"data"?: { [key: string]: unknown };
|
||||
"description"?: string;
|
||||
"environment"?: string;
|
||||
"id"?: string;
|
||||
"name"?: string;
|
||||
"offers"?: Offer[];
|
||||
"projectId"?: string;
|
||||
"scenarioId"?: string;
|
||||
"slug"?: string;
|
||||
"status"?: string;
|
||||
"updatedAt"?: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
// 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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user