Skip to content

Commit 2e34717

Browse files
committed
chore(api): regenerate API client with MuMod endpoints
Also fix GenClient to use tsx instead of ts-node (ts-node not installed, tsx is available in devDependencies).
1 parent cf2e622 commit 2e34717

2 files changed

Lines changed: 115 additions & 3 deletions

File tree

MaiChartManager.GenClient/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
var psi = new ProcessStartInfo
5454
{
5555
FileName = "cmd.exe",
56-
Arguments = "/c pnpm exec ts-node genClient.ts",
56+
Arguments = "/c pnpm exec tsx genClient.ts",
5757
WorkingDirectory = frontDir,
5858
UseShellExecute = false,
5959
};

MaiChartManager/Front/src/client/apiGen.ts

Lines changed: 114 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ export interface DeleteAssetRequest {
151151
fileName?: string | null;
152152
}
153153

154+
export interface EnsureCacheResultDto {
155+
success?: boolean;
156+
version?: string | null;
157+
error?: string | null;
158+
}
159+
154160
export interface Entry {
155161
path?: string | null;
156162
name?: string | null;
@@ -174,6 +180,11 @@ export interface GameModInfo {
174180
signature?: VerifyResult;
175181
isAdxHidIoModAbsent?: boolean;
176182
isMmlLegacyLibsInstalled?: boolean;
183+
muModInstalled?: boolean;
184+
muModVersion?: string | null;
185+
muModChannel?: string | null;
186+
muModCacheVersion?: string | null;
187+
isBothModsPresent?: boolean;
177188
}
178189

179190
export interface GenreAddRequest {
@@ -283,6 +294,11 @@ export interface InstallMmlLibsDto {
283294
useLegacy?: boolean;
284295
}
285296

297+
export interface MuModConfigDto {
298+
channel?: string | null;
299+
cachePath?: string | null;
300+
}
301+
286302
export interface MusicIdAndAssetDirPair {
287303
/** @format int32 */
288304
id?: number;
@@ -332,7 +348,7 @@ export interface PdxDriverStatusDto {
332348
/** @format int32 */
333349
deviceCount?: number;
334350
available?: boolean;
335-
devicePaths?: string[];
351+
devicePaths?: string[] | null;
336352
}
337353

338354
export interface PutAssetDirTxtValueRequest {
@@ -371,6 +387,10 @@ export interface SetAudioPreviewRequest {
371387
endTime?: number;
372388
}
373389

390+
export interface SetChannelDto {
391+
channel?: string | null;
392+
}
393+
374394
export interface SettingsDto {
375395
movieCodec?: MovieCodec;
376396
yuv420p?: boolean;
@@ -666,7 +686,7 @@ export class HttpClient<SecurityDataType = unknown> {
666686
}
667687

668688
/**
669-
* @title MaiChartManager
689+
* @title MaiChartManager.GenClient
670690
* @version 1.0
671691
*/
672692
export class Api<
@@ -1610,6 +1630,48 @@ export class Api<
16101630
...params,
16111631
}),
16121632

1633+
/**
1634+
* No description
1635+
*
1636+
* @tags Installation
1637+
* @name InstallMuMod
1638+
* @request POST:/MaiChartManagerServlet/InstallMuModApi
1639+
*/
1640+
InstallMuMod: (params: RequestParams = {}) =>
1641+
this.request<void, any>({
1642+
path: `/MaiChartManagerServlet/InstallMuModApi`,
1643+
method: "POST",
1644+
...params,
1645+
}),
1646+
1647+
/**
1648+
* No description
1649+
*
1650+
* @tags Installation
1651+
* @name DeleteAquaMai
1652+
* @request POST:/MaiChartManagerServlet/DeleteAquaMaiApi
1653+
*/
1654+
DeleteAquaMai: (params: RequestParams = {}) =>
1655+
this.request<void, any>({
1656+
path: `/MaiChartManagerServlet/DeleteAquaMaiApi`,
1657+
method: "POST",
1658+
...params,
1659+
}),
1660+
1661+
/**
1662+
* No description
1663+
*
1664+
* @tags Installation
1665+
* @name DeleteMuMod
1666+
* @request POST:/MaiChartManagerServlet/DeleteMuModApi
1667+
*/
1668+
DeleteMuMod: (params: RequestParams = {}) =>
1669+
this.request<void, any>({
1670+
path: `/MaiChartManagerServlet/DeleteMuModApi`,
1671+
method: "POST",
1672+
...params,
1673+
}),
1674+
16131675
/**
16141676
* No description
16151677
*
@@ -1740,6 +1802,56 @@ export class Api<
17401802
...params,
17411803
}),
17421804

1805+
/**
1806+
* No description
1807+
*
1808+
* @tags MuMod
1809+
* @name GetMuModConfig
1810+
* @request GET:/MaiChartManagerServlet/GetMuModConfigApi
1811+
*/
1812+
GetMuModConfig: (params: RequestParams = {}) =>
1813+
this.request<MuModConfigDto, any>({
1814+
path: `/MaiChartManagerServlet/GetMuModConfigApi`,
1815+
method: "GET",
1816+
format: "json",
1817+
...params,
1818+
}),
1819+
1820+
/**
1821+
* No description
1822+
*
1823+
* @tags MuMod
1824+
* @name SetMuModChannelAndEnsureCache
1825+
* @request PUT:/MaiChartManagerServlet/SetMuModChannelAndEnsureCacheApi
1826+
*/
1827+
SetMuModChannelAndEnsureCache: (
1828+
data: SetChannelDto,
1829+
params: RequestParams = {},
1830+
) =>
1831+
this.request<EnsureCacheResultDto, any>({
1832+
path: `/MaiChartManagerServlet/SetMuModChannelAndEnsureCacheApi`,
1833+
method: "PUT",
1834+
body: data,
1835+
type: ContentType.Json,
1836+
format: "json",
1837+
...params,
1838+
}),
1839+
1840+
/**
1841+
* No description
1842+
*
1843+
* @tags MuMod
1844+
* @name EnsureMuModCache
1845+
* @request POST:/MaiChartManagerServlet/EnsureMuModCacheApi
1846+
*/
1847+
EnsureMuModCache: (params: RequestParams = {}) =>
1848+
this.request<EnsureCacheResultDto, any>({
1849+
path: `/MaiChartManagerServlet/EnsureMuModCacheApi`,
1850+
method: "POST",
1851+
format: "json",
1852+
...params,
1853+
}),
1854+
17431855
/**
17441856
* No description
17451857
*

0 commit comments

Comments
 (0)