This commit is contained in:
xion 2025-04-05 14:45:50 +08:00
parent 862b29cfa4
commit 53cd97454d
2 changed files with 1384 additions and 2 deletions

1379
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -19,6 +19,9 @@ export type UploadConfig = {
type PostOpts = {
token?: string;
};
export const defaultConfigKeys = ['upload.json', 'workspace.json', 'ai.json', 'user.json', 'vip.json'] as const;
type DefaultConfigKey = (typeof defaultConfigKeys)[number];
export class QueryConfig {
query: Query;
constructor(opts?: QueryConfigOpts) {
@ -95,7 +98,7 @@ export class QueryConfig {
* @param key
* @returns
*/
async getConfigByKey(key: string, opts?: PostOpts) {
async getConfigByKey(key: DefaultConfigKey, opts?: PostOpts) {
return this.post<Result<Config>>({
key: 'defaultConfig',
configKey: key,
@ -124,7 +127,7 @@ export class VipQueryConfig extends QueryConfig {
key: 'shareConfig',
data: {
type: 'vip',
username: 'admin',
username: 'root',
},
});
}