init
Some checks failed
Gitea Auto Deploy / Deploy-Container (push) Failing after 52s

This commit is contained in:
2026-04-13 18:05:27 +07:00
commit c77f4a2cb9
207 changed files with 18035 additions and 0 deletions

30
src/zod/card.zod.ts Normal file
View File

@@ -0,0 +1,30 @@
// Generated by ts-to-zod
import { z } from "zod";
export const characterInfoCardTypeSchema = z.object({
key: z.number(),
avatar_id: z.number(),
rank: z.number(),
level: z.number(),
lightcone: z.object({
level: z.number(),
rank: z.number(),
item_id: z.number()
}),
relics: z.array(z.object({
level: z.number(),
relic_id: z.number(),
relic_set_id: z.number()
}))
});
const lightconeStoreSchema = z.any();
const relicStoreSchema = z.any();
export const avatarProfileCardTypeSchema = z.object({
key: z.number(),
profile_name: z.string(),
lightcone: lightconeStoreSchema.optional().nullable(),
relics: z.record(z.string(), relicStoreSchema)
});

98
src/zod/enka.zod.ts Normal file
View File

@@ -0,0 +1,98 @@
// Generated by ts-to-zod
import { z } from "zod";
const privacySettingInfoSchema = z.object({
displayCollection: z.boolean(),
displayRecord: z.boolean(),
displayRecordTeam: z.boolean(),
displayOnlineStatus: z.boolean(),
displayDiary: z.boolean()
});
const recordInfoSchema = z.object({
achievementCount: z.number(),
bookCount: z.number(),
avatarCount: z.number(),
equipmentCount: z.number(),
musicCount: z.number(),
relicCount: z.number(),
challengeInfo: z.unknown(),
maxRogueChallengeScore: z.number()
});
const subAffixSchema = z.object({
affixId: z.number(),
cnt: z.number(),
step: z.number().optional()
});
const flatPropSchema = z.object({
type: z.string(),
value: z.number()
});
const relicFlatSchema = z.object({
props: z.array(flatPropSchema),
setName: z.string(),
setID: z.number()
});
const relicSchema = z.object({
mainAffixId: z.number(),
subAffixList: z.array(subAffixSchema),
tid: z.number(),
type: z.number(),
level: z.number(),
_flat: relicFlatSchema
});
const skillTreeSchema = z.object({
pointId: z.number(),
level: z.number()
});
const equipmentFlatSchema = z.object({
props: z.array(flatPropSchema),
name: z.string()
});
const equipmentSchema = z.object({
rank: z.number(),
tid: z.number(),
promotion: z.number(),
level: z.number(),
_flat: equipmentFlatSchema
});
export const avatarEnkaDetailSchema = z.object({
relicList: z.array(relicSchema),
level: z.number(),
promotion: z.number(),
rank: z.number().optional(),
skillTreeList: z.array(skillTreeSchema),
equipment: equipmentSchema,
avatarId: z.number(),
_assist: z.boolean().optional()
});
const detailInfoSchema = z.object({
worldLevel: z.number(),
privacySettingInfo: privacySettingInfoSchema,
headIcon: z.number(),
signature: z.string(),
avatarDetailList: z.array(avatarEnkaDetailSchema),
platform: z.string(),
recordInfo: recordInfoSchema,
uid: z.number(),
level: z.number(),
nickname: z.string(),
isDisplayAvatar: z.boolean(),
friendCount: z.number(),
personalCardId: z.number()
});
export const enkaResponseSchema = z.object({
detailInfo: detailInfoSchema,
ttl: z.number(),
uid: z.string()
});

29
src/zod/extraData.zod.ts Normal file
View File

@@ -0,0 +1,29 @@
// Generated by ts-to-zod
import { z } from "zod";
export const extraDataSchema = z.object({
theory_craft: z.object({
hp: z.record(z.string(), z.array(z.number())),
cycle_count: z.number(),
mode: z.boolean(),
stage_id: z.number()
}),
setting: z.object({
censorship: z.boolean(),
cm: z.boolean(),
first_person: z.boolean(),
hide_ui: z.boolean()
}),
challenge: z.object({
skip_node: z.number(),
challenge_peak_group_id: z.number(),
challenge_peak_group_id_list: z.array(z.number())
}),
multi_path: z.object({
main: z.number(),
march_7: z.number(),
multi_path_main: z.array(z.number()),
multi_path_march_7: z.array(z.number())
}),
lua: z.string().optional()
});

22
src/zod/filter.zod.ts Normal file
View File

@@ -0,0 +1,22 @@
// Generated by ts-to-zod
import { z } from "zod";
export const filterAvatarTypeSchema = z.object({
name: z.string(),
path: z.array(z.string()),
element: z.array(z.string()),
rarity: z.array(z.string()),
locale: z.string()
});
export const filterLightconeTypeSchema = z.object({
path: z.array(z.string()),
rarity: z.array(z.string()),
locale: z.string(),
name: z.string()
});
export const filterRelicTypeSchema = z.object({
locale: z.string(),
name: z.string()
});

9
src/zod/index.ts Normal file
View File

@@ -0,0 +1,9 @@
export * from "./srtools.zod"
export * from "./filter.zod"
export * from "./mics.zod"
export * from "./enka.zod"
export * from "./card.zod"
export * from "./extraData.zod"
export * from "./showcase.zod"
export * from "./srtools.zod"

128
src/zod/mics.zod.ts Normal file
View File

@@ -0,0 +1,128 @@
// Generated by ts-to-zod
import { z } from "zod";
export const avatarDataStoreSchema = z.object({
rank: z.number(),
skills: z.record(z.string(), z.number())
});
export const lightconeStoreSchema = z.object({
level: z.number(),
item_id: z.number(),
rank: z.number(),
promotion: z.number()
});
export const subAffixStoreSchema = z.object({
sub_affix_id: z.number(),
count: z.number(),
step: z.number()
});
export const relicStoreSchema = z.object({
level: z.number(),
relic_id: z.number(),
relic_set_id: z.number(),
main_affix_id: z.number(),
sub_affixes: z.array(subAffixStoreSchema)
});
export const avatarProfileStoreSchema = z.object({
profile_name: z.string(),
lightcone: lightconeStoreSchema.nullable(),
relics: z.record(z.string(), relicStoreSchema)
});
export const avatarStoreSchema = z.object({
owner_uid: z.number().optional(),
avatar_id: z.number(),
data: avatarDataStoreSchema,
level: z.number(),
promotion: z.number(),
techniques: z.array(z.number()),
sp_value: z.number(),
sp_max: z.number(),
can_change_sp: z.boolean(),
enhanced: z.string(),
profileSelect: z.number(),
profileList: z.array(avatarProfileStoreSchema)
});
export const monsterStoreSchema = z.object({
monster_id: z.number(),
level: z.number(),
amount: z.number()
});
export const dynamicKeyStoreSchema = z.object({
key: z.string(),
value: z.number()
});
export const battleBuffStoreSchema = z.object({
level: z.number(),
id: z.number(),
dynamic_key: dynamicKeyStoreSchema.optional()
});
export const mocConfigStoreSchema = z.object({
event_id: z.number(),
challenge_id: z.number(),
floor_side: z.string(),
use_turbulence_buff: z.boolean(),
use_cycle_count: z.boolean(),
blessings: z.array(battleBuffStoreSchema),
cycle_count: z.number(),
stage_id: z.number(),
monsters: z.array(z.array(monsterStoreSchema))
});
export const pfConfigStoreSchema = z.object({
event_id: z.number(),
challenge_id: z.number(),
buff_id: z.number(),
floor_side: z.string(),
blessings: z.array(battleBuffStoreSchema),
cycle_count: z.number(),
stage_id: z.number(),
monsters: z.array(z.array(monsterStoreSchema))
});
export const asConfigStoreSchema = z.object({
event_id: z.number(),
challenge_id: z.number(),
buff_id: z.number(),
floor_side: z.string(),
blessings: z.array(battleBuffStoreSchema),
cycle_count: z.number(),
stage_id: z.number(),
monsters: z.array(z.array(monsterStoreSchema))
});
export const peakConfigStoreSchema = z.object({
event_id: z.number(),
challenge_id: z.number(),
buff_id: z.number(),
boss_mode: z.string(),
blessings: z.array(battleBuffStoreSchema),
cycle_count: z.number(),
stage_id: z.number(),
monsters: z.array(z.array(monsterStoreSchema))
});
export const ceConfigStoreSchema = z.object({
blessings: z.array(battleBuffStoreSchema),
cycle_count: z.number(),
stage_id: z.number(),
monsters: z.array(z.array(monsterStoreSchema))
});
export const micsSchema = z.object({
avatars: z.record(z.string(), avatarStoreSchema),
battle_type: z.string(),
moc_config: mocConfigStoreSchema,
pf_config: pfConfigStoreSchema,
as_config: asConfigStoreSchema,
ce_config: ceConfigStoreSchema,
peak_config: peakConfigStoreSchema
});

29
src/zod/showcase.zod.ts Normal file
View File

@@ -0,0 +1,29 @@
// Generated by ts-to-zod
import { z } from "zod";
export const relicShowcaseTypeSchema = z.object({
img: z.string(),
mainAffix: z.object({
property: z.string(),
level: z.number(),
valueAffix: z.string(),
detail: z.object({
name: z.string(),
icon: z.string(),
unit: z.string(),
baseStat: z.string()
})
}),
subAffix: z.array(z.object({
property: z.string(),
valueAffix: z.string(),
detail: z.object({
name: z.string(),
icon: z.string(),
unit: z.string(),
baseStat: z.string()
}),
step: z.number(),
count: z.number()
}))
});

94
src/zod/srtools.zod.ts Normal file
View File

@@ -0,0 +1,94 @@
// Generated by ts-to-zod
import { z } from "zod";
export const subAffixSchema = z.object({
sub_affix_id: z.number(),
count: z.number(),
step: z.number()
});
export const relicJsonSchema = z.object({
level: z.number(),
relic_id: z.number(),
relic_set_id: z.number(),
main_affix_id: z.number(),
sub_affixes: z.array(subAffixSchema),
internal_uid: z.number(),
equip_avatar: z.number()
});
export const lightconeJsonSchema = z.object({
level: z.number(),
item_id: z.number(),
equip_avatar: z.number(),
rank: z.number(),
promotion: z.number(),
internal_uid: z.number()
});
export const avatarDataSchema = z.object({
rank: z.number(),
skills: z.record(z.string(), z.number()),
skills_by_anchor_type: z.record(z.string(), z.number()).optional()
});
export const avatarJsonSchema = z.object({
owner_uid: z.number().optional(),
avatar_id: z.number(),
data: avatarDataSchema,
level: z.number(),
promotion: z.number(),
techniques: z.array(z.number()),
sp_value: z.number(),
sp_max: z.number()
});
export const monsterJsonSchema = z.object({
monster_id: z.number(),
level: z.number(),
amount: z.number()
});
export const dynamicKeyJsonSchema = z.object({
key: z.string(),
value: z.number()
});
export const battleBuffJsonSchema = z.object({
level: z.number(),
id: z.number(),
dynamic_key: dynamicKeyJsonSchema.optional()
});
export const battleConfigJsonSchema = z.object({
battle_type: z.string(),
blessings: z.array(battleBuffJsonSchema),
custom_stats: z.array(subAffixSchema),
cycle_count: z.number(),
stage_id: z.number(),
path_resonance_id: z.number(),
monsters: z.array(z.array(monsterJsonSchema))
});
const loadoutJsonSchema = z.object({
name: z.string(),
avatar_id: z.number(),
relic_list: z.array(z.string())
});
export const freeSrJsonSchema = z.object({
key: z.string().optional(),
lightcones: z.array(lightconeJsonSchema),
relics: z.array(relicJsonSchema),
avatars: z.record(z.string(), avatarJsonSchema),
battle_config: battleConfigJsonSchema,
loadout: z.array(loadoutJsonSchema).optional()
});
const extraDataSchema = z.any();
export const psResponseSchema = z.object({
status: z.number(),
message: z.string(),
extra_data: extraDataSchema.optional()
});