Update zod
All checks were successful
Gitea Auto Deploy / Deploy-Container (push) Successful in 1m18s
All checks were successful
Gitea Auto Deploy / Deploy-Container (push) Successful in 1m18s
This commit is contained in:
@@ -441,7 +441,7 @@ export default function ActionBar() {
|
||||
</motion.button>
|
||||
</div>
|
||||
<div className="border-b border-purple-500/30 px-6 py-4 mb-4">
|
||||
<h3 className="font-bold text-2xl text-transparent bg-clip-text bg-gradient-to-r from-pink-400 to-cyan-400">
|
||||
<h3 className="font-bold text-2xl text-transparent bg-clip-text bg-linear-to-r from-pink-400 to-cyan-400">
|
||||
{title}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
@@ -83,7 +83,7 @@ export default function AvatarInfo() {
|
||||
{/* Header */}
|
||||
<div className="flex items-center justify-between mb-6">
|
||||
<h2 className="card-title text-2xl font-bold flex items-center gap-2">
|
||||
<div className="w-2 h-8 bg-gradient-to-b from-success to-success/50 rounded-full"></div>
|
||||
<div className="w-2 h-8 bg-linear-to-b from-success to-success/50 rounded-full"></div>
|
||||
{transI18n("characterSettings")}
|
||||
</h2>
|
||||
</div>
|
||||
@@ -92,7 +92,7 @@ export default function AvatarInfo() {
|
||||
{/* Level Control */}
|
||||
<div className="bg-base-100 rounded-xl p-6 border border-base-content/10">
|
||||
<h4 className="text-lg font-semibold mb-4 flex items-center gap-2">
|
||||
<div className="w-2 h-6 bg-gradient-to-b from-info to-info/50 rounded-full"></div>
|
||||
<div className="w-2 h-6 bg-linear-to-b from-info to-info/50 rounded-full"></div>
|
||||
{transI18n("levelConfiguration")}
|
||||
</h4>
|
||||
|
||||
@@ -142,7 +142,7 @@ export default function AvatarInfo() {
|
||||
{/* Energy Control */}
|
||||
<div className="bg-base-100 rounded-xl p-6 border border-base-content/10">
|
||||
<h4 className="text-lg font-semibold mb-4 flex items-center gap-2">
|
||||
<div className="w-2 h-6 bg-gradient-to-b from-warning to-warning/50 rounded-full"></div>
|
||||
<div className="w-2 h-6 bg-linear-to-b from-warning to-warning/50 rounded-full"></div>
|
||||
{transI18n("ultimateEnergy")}
|
||||
</h4>
|
||||
|
||||
@@ -189,7 +189,7 @@ export default function AvatarInfo() {
|
||||
{/* Technique Toggle */}
|
||||
<div className="bg-base-100 rounded-xl p-6 border border-base-content/10">
|
||||
<h4 className="text-lg font-semibold mb-4 flex items-center gap-2">
|
||||
<div className="w-2 h-6 bg-gradient-to-b from-accent to-accent/50 rounded-full"></div>
|
||||
<div className="w-2 h-6 bg-linear-to-b from-accent to-accent/50 rounded-full"></div>
|
||||
{transI18n("battleConfiguration")}
|
||||
</h4>
|
||||
|
||||
@@ -277,7 +277,7 @@ export default function AvatarInfo() {
|
||||
{/* Header */}
|
||||
<div className="flex items-center justify-between mb-6">
|
||||
<h2 className="card-title text-2xl font-bold flex items-center gap-2">
|
||||
<div className="w-2 h-8 bg-gradient-to-b from-primary to-secondary rounded-full"></div>
|
||||
<div className="w-2 h-8 bg-linear-to-b from-primary to-secondary rounded-full"></div>
|
||||
{transI18n("lightconeEquipment")}
|
||||
</h2>
|
||||
</div>
|
||||
@@ -288,7 +288,7 @@ export default function AvatarInfo() {
|
||||
{/* Level & Rank Controls */}
|
||||
<div className="bg-base-100 rounded-xl p-6 border border-base-content/10">
|
||||
<h4 className="text-lg font-semibold mb-4 flex items-center gap-2">
|
||||
<div className="w-2 h-6 bg-gradient-to-b from-accent to-accent/50 rounded-full"></div>
|
||||
<div className="w-2 h-6 bg-linear-to-b from-accent to-accent/50 rounded-full"></div>
|
||||
{transI18n("lightconeSettings")}
|
||||
</h4>
|
||||
|
||||
|
||||
@@ -16,12 +16,12 @@ export default function CharacterCard({ data }: CharacterCardProps) {
|
||||
return (
|
||||
<li
|
||||
className="z-10 flex flex-col items-center rounded-xl shadow-xl
|
||||
bg-gradient-to-br from-base-300 via-base-100 to-warning/70
|
||||
bg-linear-to-br from-base-300 via-base-100 to-warning/70
|
||||
transform transition-transform duration-300 ease-in-out
|
||||
hover:scale-105 cursor-pointer min-h-[170px] sm:min-h-[180px] md:min-h-[210px] lg:min-h-[220px] xl:min-h-[240px] 2xl:min-h-[340px]"
|
||||
>
|
||||
<div
|
||||
className={`w-full rounded-md bg-gradient-to-br ${data.rank === "CombatPowerAvatarRarityType5"
|
||||
className={`w-full rounded-md bg-linear-to-br ${data.rank === "CombatPowerAvatarRarityType5"
|
||||
? "from-yellow-400 via-yellow-600/70 to-yellow-800/50"
|
||||
: "from-purple-400 via-purple-600/70 to-purple-800/50"
|
||||
}`}
|
||||
|
||||
@@ -16,11 +16,11 @@ export default function LightconeCard({ data }: LightconeCardProps) {
|
||||
const text = getLocaleName(locale, data)
|
||||
return (
|
||||
<li className="z-10 flex flex-col items-center rounded-md shadow-lg
|
||||
bg-gradient-to-b from-customStart to-customEnd transform transition-transform duration-300
|
||||
bg-linear-to-b from-customStart to-customEnd transform transition-transform duration-300
|
||||
hover:scale-105 cursor-pointer min-h-[220px]"
|
||||
>
|
||||
<div
|
||||
className={`w-full rounded-md bg-gradient-to-br ${data.rank === "CombatPowerLightconeRarity5"
|
||||
className={`w-full rounded-md bg-linear-to-br ${data.rank === "CombatPowerLightconeRarity5"
|
||||
? "from-yellow-400 via-yellow-600/70 to-yellow-800/50"
|
||||
: data.rank === "CombatPowerLightconeRarity4" ? "from-purple-400 via-purple-600/70 to-purple-800/50" :
|
||||
"from-blue-400 via-blue-600/70 to-blue-800/50"
|
||||
|
||||
@@ -11,10 +11,10 @@ interface RelicCardProps {
|
||||
}
|
||||
const getRarityColor = (rarity: string) => {
|
||||
switch (rarity) {
|
||||
case '3': return 'border-green-500 shadow-green-500/50 bg-gradient-to-br from-green-700 via-green-400 to-green-500';
|
||||
case '4': return 'border-blue-500 shadow-blue-500/50 bg-gradient-to-br from-blue-700 via-blue-400 to-blue-500';
|
||||
case '5': return 'border-purple-500 shadow-purple-500/50 bg-gradient-to-br from-purple-700 via-purple-400 to-purple-500';
|
||||
case '6': return 'border-yellow-500 shadow-yellow-500/50 bg-gradient-to-br from-yellow-700 via-yellow-400 to-yellow-500';
|
||||
case '3': return 'border-green-500 shadow-green-500/50 bg-linear-to-br from-green-700 via-green-400 to-green-500';
|
||||
case '4': return 'border-blue-500 shadow-blue-500/50 bg-linear-to-br from-blue-700 via-blue-400 to-blue-500';
|
||||
case '5': return 'border-purple-500 shadow-purple-500/50 bg-linear-to-br from-purple-700 via-purple-400 to-purple-500';
|
||||
case '6': return 'border-yellow-500 shadow-yellow-500/50 bg-linear-to-br from-yellow-700 via-yellow-400 to-yellow-500';
|
||||
default: return 'border-gray-500 shadow-gray-500/50';
|
||||
}
|
||||
};
|
||||
|
||||
@@ -28,7 +28,7 @@ export default function EidolonsInfo() {
|
||||
return (
|
||||
<div className="bg-base-100 rounded-xl p-6 shadow-lg">
|
||||
<h2 className="flex items-center gap-2 text-2xl font-bold mb-6 text-base-content">
|
||||
<div className="w-2 h-6 bg-gradient-to-b from-primary to-primary/50 rounded-full"></div>
|
||||
<div className="w-2 h-6 bg-linear-to-b from-primary to-primary/50 rounded-full"></div>
|
||||
{transI18n("eidolons")}
|
||||
</h2>
|
||||
<div className="grid grid-cols-1 m-4 p-4 font-bold gap-4 w-fit max-h-[77vh] min-h-[50vh] overflow-y-scroll overflow-x-hidden">
|
||||
|
||||
@@ -350,7 +350,7 @@ export default function Header() {
|
||||
<div className="flex flex-col justify-center items-start">
|
||||
<h1 className="text-xl font-bold">
|
||||
<span className="text-emerald-500">Firefly Sr</span>
|
||||
<span className="bg-clip-text text-transparent bg-gradient-to-r from-emerald-400 via-orange-500 to-red-500">
|
||||
<span className="bg-clip-text text-transparent bg-linear-to-r from-emerald-400 via-orange-500 to-red-500">
|
||||
Tools
|
||||
</span>
|
||||
</h1>
|
||||
@@ -557,7 +557,7 @@ export default function Header() {
|
||||
|
||||
{/* GitHub Link */}
|
||||
<Link
|
||||
className='hidden sm:flex btn btn-ghost btn-sm btn-circle bg-white/20 hover:bg-white/100 transition-all duration-200 items-center justify-center'
|
||||
className='hidden sm:flex btn btn-ghost btn-sm btn-circle bg-white/20 hover:bg-white transition-all duration-200 items-center justify-center'
|
||||
href={"https://github.com/AzenKain/Firefly-Srtools"}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
@@ -583,7 +583,7 @@ export default function Header() {
|
||||
</div>
|
||||
|
||||
<div className="border-b border-purple-500/30 px-6 py-4 mb-4">
|
||||
<h3 className="font-bold text-2xl text-transparent bg-clip-text bg-gradient-to-r from-pink-400 to-cyan-400">
|
||||
<h3 className="font-bold text-2xl text-transparent bg-clip-text bg-linear-to-r from-pink-400 to-cyan-400">
|
||||
{title}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@ import useUserDataStore from "@/stores/userDataStore";
|
||||
import { CharacterInfoCardType } from "@/types";
|
||||
import { useState } from "react";
|
||||
import CharacterInfoCard from "../card/characterInfoCard";
|
||||
import { freeSRJsonSchema } from "@/zod";
|
||||
import { freeSrJsonSchema } from "@/zod";
|
||||
import { toast } from "react-toastify";
|
||||
import { converterOneFreeSRDataToAvatarStore } from "@/helper";
|
||||
import { useTranslations } from "next-intl";
|
||||
@@ -80,7 +80,7 @@ export default function FreeSRImport() {
|
||||
reader.onload = (e) => {
|
||||
try {
|
||||
const data = JSON.parse(e.target?.result as string);
|
||||
const parsed = freeSRJsonSchema.parse(data)
|
||||
const parsed = freeSrJsonSchema.parse(data)
|
||||
setFreeSRData(parsed)
|
||||
setError("")
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ export default function LightconeBar() {
|
||||
return (
|
||||
<div>
|
||||
<div className="border-b border-purple-500/30 px-6 py-4 mb-4">
|
||||
<h3 className="font-bold text-2xl text-transparent bg-clip-text bg-gradient-to-r from-pink-400 to-cyan-400">
|
||||
<h3 className="font-bold text-2xl text-transparent bg-clip-text bg-linear-to-r from-pink-400 to-cyan-400">
|
||||
{transI18n("lightConeSetting")}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
@@ -240,7 +240,7 @@ export default function RelicMaker() {
|
||||
return (
|
||||
<div className="">
|
||||
<div className="border-b border-purple-500/30 px-6 py-4 mb-4">
|
||||
<h3 className="font-bold text-2xl text-transparent bg-clip-text bg-gradient-to-r from-pink-400 to-cyan-400">
|
||||
<h3 className="font-bold text-2xl text-transparent bg-clip-text bg-linear-to-r from-pink-400 to-cyan-400">
|
||||
{transI18n("relicMaker")}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
@@ -181,7 +181,7 @@ export default function RelicsInfo() {
|
||||
<div className="lg:col-span-2">
|
||||
<div className="bg-base-100 rounded-xl p-6 shadow-lg">
|
||||
<h2 className="flex items-center gap-2 text-2xl font-bold mb-6 text-base-content">
|
||||
<div className="w-2 h-6 bg-gradient-to-b from-primary to-primary/50 rounded-full"></div>
|
||||
<div className="w-2 h-6 bg-linear-to-b from-primary to-primary/50 rounded-full"></div>
|
||||
{transI18n("relics")}
|
||||
</h2>
|
||||
|
||||
@@ -280,7 +280,7 @@ export default function RelicsInfo() {
|
||||
{/* Set Effects Panel */}
|
||||
<div className="bg-base-100 rounded-xl p-6 shadow-lg">
|
||||
<h3 className="flex items-center gap-2 text-xl font-bold mb-4 text-base-content">
|
||||
<div className="w-2 h-6 bg-gradient-to-b from-primary to-primary/50 rounded-full"></div>
|
||||
<div className="w-2 h-6 bg-linear-to-b from-primary to-primary/50 rounded-full"></div>
|
||||
{transI18n("setEffects")}
|
||||
</h3>
|
||||
|
||||
@@ -353,7 +353,7 @@ export default function RelicsInfo() {
|
||||
|
||||
{title && (
|
||||
<div className="border-b border-purple-500/30 px-6 py-4 mb-4">
|
||||
<h3 className="font-bold text-2xl text-transparent bg-clip-text bg-gradient-to-r from-pink-400 to-cyan-400">
|
||||
<h3 className="font-bold text-2xl text-transparent bg-clip-text bg-linear-to-r from-pink-400 to-cyan-400">
|
||||
{title}
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
@@ -14,7 +14,7 @@ export default function RelicShowcase({
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className="relative w-full flex flex-row items-center rounded-s-lg border-l-2 p-1 border-yellow-600/60 bg-gradient-to-r from-yellow-600/20 to-transparent"
|
||||
className="relative w-full flex flex-row items-center rounded-s-lg border-l-2 p-1 border-yellow-600/60 bg-linear-to-r from-yellow-600/20 to-transparent"
|
||||
>
|
||||
{/* Subtle glow overlay */}
|
||||
<div className="absolute inset-0 rounded-s-lg pointer-events-none"></div>
|
||||
|
||||
@@ -146,7 +146,7 @@ export default function SkillsInfo() {
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-2">
|
||||
<div className="rounded-xl p-6 shadow-lg">
|
||||
<h2 className="flex items-center gap-2 text-2xl font-bold mb-6 text-base-content">
|
||||
<div className="w-2 h-6 bg-gradient-to-b from-primary to-primary/50 rounded-full"></div>
|
||||
<div className="w-2 h-6 bg-linear-to-b from-primary to-primary/50 rounded-full"></div>
|
||||
{transI18n("skills")}
|
||||
</h2>
|
||||
<div className="flex flex-col items-center">
|
||||
@@ -271,7 +271,7 @@ export default function SkillsInfo() {
|
||||
</div>
|
||||
<div className="bg-base-100 rounded-xl p-6 shadow-lg">
|
||||
<h2 className="flex items-center gap-2 text-2xl font-bold mb-6 text-base-content">
|
||||
<div className="w-2 h-6 bg-gradient-to-b from-primary to-primary/50 rounded-full"></div>
|
||||
<div className="w-2 h-6 bg-linear-to-b from-primary to-primary/50 rounded-full"></div>
|
||||
{transI18n("details")}
|
||||
</h2>
|
||||
{skillSelected && avatarInfo?.SkillTrees && avatarData && (
|
||||
|
||||
@@ -3,7 +3,7 @@ import { SendDataThroughProxy, SendDataToServer } from "@/lib/api/api"
|
||||
import useConnectStore from "@/stores/connectStore"
|
||||
import useUserDataStore from "@/stores/userDataStore"
|
||||
import { converterToFreeSRJson } from "./converterToFreeSRJson"
|
||||
import { pSResponseSchema } from "@/zod"
|
||||
import { psResponseSchema } from "@/zod"
|
||||
import useGlobalStore from "@/stores/globalStore"
|
||||
|
||||
export const connectToPS = async (): Promise<{ success: boolean, message: string }> => {
|
||||
@@ -29,7 +29,7 @@ export const connectToPS = async (): Promise<{ success: boolean, message: string
|
||||
} else if (response.error) {
|
||||
return { success: false, message: response.error }
|
||||
} else {
|
||||
const parsed = pSResponseSchema.safeParse(response.data)
|
||||
const parsed = psResponseSchema.safeParse(response.data)
|
||||
if (!parsed.success) {
|
||||
return { success: false, message: "Invalid response schema" }
|
||||
}
|
||||
@@ -78,7 +78,7 @@ export const syncDataToPS = async (): Promise<{ success: boolean, message: strin
|
||||
} else if (response.error) {
|
||||
return { success: false, message: response.error }
|
||||
} else {
|
||||
const parsed = pSResponseSchema.safeParse(response.data)
|
||||
const parsed = psResponseSchema.safeParse(response.data)
|
||||
if (!parsed.success) {
|
||||
return { success: false, message: "Invalid response schema" }
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { AffixDetail, ASDetail, CharacterDetail, ConfigMaze, FreeSRJson, LightConeDetail, MocDetail, MonsterDetail, PeakDetail, PFDetail, PSResponse, RelicDetail } from "@/types";
|
||||
import axios from 'axios';
|
||||
import { pSResponseSchema } from "@/zod";
|
||||
import { psResponseSchema } from "@/zod";
|
||||
import { ExtraData } from "@/types";
|
||||
|
||||
export async function getConfigMazeApi(): Promise<ConfigMaze> {
|
||||
@@ -246,7 +246,7 @@ export async function SendDataToServer(
|
||||
): Promise<PSResponse | string> {
|
||||
try {
|
||||
const response = await axios.post(`${serverUrl}`, { username, password, data, extra_data: extraData })
|
||||
const parsed = pSResponseSchema.safeParse(response.data)
|
||||
const parsed = psResponseSchema.safeParse(response.data)
|
||||
if (!parsed.success) {
|
||||
return "Invalid response schema";
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { BuffDetail, OptionDetail } from "./pfDetail"
|
||||
export interface ASDetail {
|
||||
Id: number
|
||||
Name: string
|
||||
Buff: BuffDetail
|
||||
Buff?: BuffDetail
|
||||
BuffList1: OptionDetail[]
|
||||
BuffList2: OptionDetail[]
|
||||
BeginTime: string
|
||||
@@ -43,7 +43,7 @@ export interface BossTag {
|
||||
Name: string
|
||||
Desc: string
|
||||
Param: number[]
|
||||
SkillID: number | null
|
||||
SkillID?: number | null
|
||||
ParamFix: number[]
|
||||
Child: BossChildTag[]
|
||||
}
|
||||
@@ -57,7 +57,7 @@ export interface BossChildTag {
|
||||
export interface BossDifficultyGuide {
|
||||
Desc: string
|
||||
Param: number[]
|
||||
SkillID: number | null
|
||||
SkillID?: number | null
|
||||
ParamFix: number[]
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,6 @@ export interface CharacterInfoCardType {
|
||||
export interface AvatarProfileCardType {
|
||||
key: number;
|
||||
profile_name: string,
|
||||
lightcone: LightconeStore | null,
|
||||
lightcone?: LightconeStore | null,
|
||||
relics: Record<string, RelicStore>
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
|
||||
export interface CharacterDetail {
|
||||
Name: string;
|
||||
Desc: string;
|
||||
@@ -21,8 +21,8 @@ export interface CharacterDetail {
|
||||
|
||||
export interface EnhancedType {
|
||||
Descs: string[];
|
||||
ChangeRankList: any;
|
||||
ChangeSkillTreeList: any;
|
||||
ChangeRankList: unknown;
|
||||
ChangeSkillTreeList: unknown;
|
||||
Ranks: Record<string, RankType>;
|
||||
Skills: Record<string, SkillType>;
|
||||
SkillTrees: Record<string, Record<string, SkillTreePoint>>;
|
||||
@@ -113,7 +113,7 @@ export interface Memosprite {
|
||||
SpeedSkill: number;
|
||||
Aggro: number;
|
||||
Skills: Record<string, SpriteSkill>;
|
||||
Talent: Record<string, any>;
|
||||
Talent: Record<string, unknown>;
|
||||
}
|
||||
|
||||
export interface SpriteSkill {
|
||||
|
||||
@@ -6,10 +6,6 @@ interface PrivacySettingInfo {
|
||||
displayDiary: boolean
|
||||
}
|
||||
|
||||
interface ChallengeInfo {
|
||||
// Thêm các field cụ thể nếu có
|
||||
}
|
||||
|
||||
interface RecordInfo {
|
||||
achievementCount: number
|
||||
bookCount: number
|
||||
@@ -17,7 +13,7 @@ interface RecordInfo {
|
||||
equipmentCount: number
|
||||
musicCount: number
|
||||
relicCount: number
|
||||
challengeInfo: ChallengeInfo
|
||||
challengeInfo: unknown;
|
||||
maxRogueChallengeScore: number
|
||||
}
|
||||
|
||||
|
||||
@@ -21,3 +21,4 @@ export * from "./peakDetail"
|
||||
export * from "./monsterDetail"
|
||||
export * from "./extraData"
|
||||
export * from "./showcase"
|
||||
export * from "./srtools"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export type AvatarDataStore = {
|
||||
rank: number,
|
||||
skills: { [key: string]: number }
|
||||
skills: Record<string, number>
|
||||
}
|
||||
export type LightconeStore = {
|
||||
level: number;
|
||||
@@ -118,4 +118,5 @@ export interface Mics {
|
||||
pf_config: PFConfigStore;
|
||||
as_config: ASConfigStore;
|
||||
ce_config: CEConfigStore;
|
||||
peak_config: PEAKConfigStore
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
export interface MocDetail {
|
||||
Id: number
|
||||
Name: string
|
||||
@@ -21,7 +20,7 @@ export interface MocDetail {
|
||||
|
||||
export interface ChallengeDetail {
|
||||
Name: string
|
||||
Param?: number
|
||||
Param?: number | null
|
||||
}
|
||||
|
||||
export interface EventStageDetail {
|
||||
@@ -32,17 +31,17 @@ export interface EventStageDetail {
|
||||
Level: number
|
||||
EliteGroup?: number
|
||||
LevelGraphPath: string
|
||||
StageAbilityConfig: any[]
|
||||
BattleScoringGroup?: number
|
||||
SubLevelGraphs: any[]
|
||||
StageAbilityConfig: unknown[]
|
||||
BattleScoringGroup?: number | null
|
||||
SubLevelGraphs: unknown[]
|
||||
StageConfigData: StageConfig[]
|
||||
MonsterList: Record<string, number>[]
|
||||
LevelLoseCondition: string[]
|
||||
LevelWinCondition: string[]
|
||||
Release: boolean
|
||||
ForbidExitBattle: boolean
|
||||
MonsterWarningRatio?: number
|
||||
TrialAvatarList: any[]
|
||||
MonsterWarningRatio?: number | null
|
||||
TrialAvatarList: unknown[]
|
||||
}
|
||||
export interface StageConfig {
|
||||
$type: string
|
||||
|
||||
@@ -12,8 +12,8 @@ export interface PFDetail {
|
||||
}
|
||||
|
||||
export interface BuffDetail {
|
||||
Name: string | null
|
||||
Desc: string | null
|
||||
Name?: string | null
|
||||
Desc?: string | null
|
||||
Param: number[]
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ export interface LightconeJson {
|
||||
}
|
||||
export interface AvatarData {
|
||||
rank: number,
|
||||
skills: { [key: string]: number }
|
||||
skills: Record<string, number>
|
||||
}
|
||||
|
||||
export interface AvatarJson {
|
||||
@@ -75,7 +75,7 @@ export interface FreeSRJson {
|
||||
key?: string;
|
||||
lightcones: LightconeJson[];
|
||||
relics: RelicJson[];
|
||||
avatars: { [key: string]: AvatarJson };
|
||||
avatars: Record<string, AvatarJson>;
|
||||
battle_config: BattleConfigJson;
|
||||
loadout?: LoadoutJson[];
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const affixDetailSchema = z.object({
|
||||
property: z.string(),
|
||||
base: z.number(),
|
||||
step: z.number(),
|
||||
step_num: z.number(),
|
||||
property: z.string(),
|
||||
base: z.number(),
|
||||
step: z.number(),
|
||||
step_num: z.number()
|
||||
});
|
||||
|
||||
@@ -2,24 +2,24 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const bossDifficultyGuideSchema = z.object({
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number()),
|
||||
SkillID: z.number().nullable(),
|
||||
ParamFix: z.array(z.number()),
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number()),
|
||||
SkillID: z.number().optional().nullable(),
|
||||
ParamFix: z.array(z.number())
|
||||
});
|
||||
|
||||
export const bossPhaseSchema = z.object({
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Answer: z.string(),
|
||||
Difficulty: z.number(),
|
||||
SkillList: z.array(z.number()),
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Answer: z.string(),
|
||||
Difficulty: z.number(),
|
||||
SkillList: z.array(z.number())
|
||||
});
|
||||
|
||||
export const bossChildTagSchema = z.object({
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number()),
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number())
|
||||
});
|
||||
|
||||
const buffDetailSchema = z.any();
|
||||
@@ -31,48 +31,48 @@ const challengeDetailSchema = z.any();
|
||||
const eventStageDetailSchema = z.any();
|
||||
|
||||
export const bossTagSchema = z.object({
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number()),
|
||||
SkillID: z.number().nullable(),
|
||||
ParamFix: z.array(z.number()),
|
||||
Child: z.array(bossChildTagSchema),
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number()),
|
||||
SkillID: z.number().optional().nullable(),
|
||||
ParamFix: z.array(z.number()),
|
||||
Child: z.array(bossChildTagSchema)
|
||||
});
|
||||
|
||||
export const bossMonsterConfigSchema = z.object({
|
||||
Difficulty: z.number(),
|
||||
DifficultyList: z.array(z.number()),
|
||||
TagList: z.array(bossTagSchema),
|
||||
DifficultyGuideList: z.array(bossDifficultyGuideSchema),
|
||||
TextGuideList: z.array(z.string()),
|
||||
PhaseList: z.array(bossPhaseSchema),
|
||||
Difficulty: z.number(),
|
||||
DifficultyList: z.array(z.number()),
|
||||
TagList: z.array(bossTagSchema),
|
||||
DifficultyGuideList: z.array(bossDifficultyGuideSchema),
|
||||
TextGuideList: z.array(z.string()),
|
||||
PhaseList: z.array(bossPhaseSchema)
|
||||
});
|
||||
|
||||
export const aSLevelSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Challenge: z.array(challengeDetailSchema),
|
||||
DamageType1: z.array(z.string()),
|
||||
DamageType2: z.array(z.string()),
|
||||
MazeGroupID1: z.number(),
|
||||
MazeGroupID2: z.number(),
|
||||
BossMonsterID1: z.number(),
|
||||
BossMonsterID2: z.number(),
|
||||
BossMonsterID1SkillList: z.array(z.number()),
|
||||
BossMonsterID2SkillList: z.array(z.number()),
|
||||
BossMonsterConfig1: bossMonsterConfigSchema,
|
||||
BossMonsterConfig2: bossMonsterConfigSchema,
|
||||
EventIDList1: z.array(eventStageDetailSchema),
|
||||
EventIDList2: z.array(eventStageDetailSchema),
|
||||
export const asLevelSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Challenge: z.array(challengeDetailSchema),
|
||||
DamageType1: z.array(z.string()),
|
||||
DamageType2: z.array(z.string()),
|
||||
MazeGroupID1: z.number(),
|
||||
MazeGroupID2: z.number(),
|
||||
BossMonsterID1: z.number(),
|
||||
BossMonsterID2: z.number(),
|
||||
BossMonsterID1SkillList: z.array(z.number()),
|
||||
BossMonsterID2SkillList: z.array(z.number()),
|
||||
BossMonsterConfig1: bossMonsterConfigSchema,
|
||||
BossMonsterConfig2: bossMonsterConfigSchema,
|
||||
EventIDList1: z.array(eventStageDetailSchema),
|
||||
EventIDList2: z.array(eventStageDetailSchema)
|
||||
});
|
||||
|
||||
export const aSDetailSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Buff: buffDetailSchema,
|
||||
BuffList1: z.array(optionDetailSchema),
|
||||
BuffList2: z.array(optionDetailSchema),
|
||||
BeginTime: z.string(),
|
||||
EndTime: z.string(),
|
||||
Level: z.array(aSLevelSchema),
|
||||
export const asDetailSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Buff: buffDetailSchema.optional(),
|
||||
BuffList1: z.array(optionDetailSchema),
|
||||
BuffList2: z.array(optionDetailSchema),
|
||||
BeginTime: z.string(),
|
||||
EndTime: z.string(),
|
||||
Level: z.array(asLevelSchema)
|
||||
});
|
||||
|
||||
@@ -2,22 +2,20 @@
|
||||
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(),
|
||||
key: z.number(),
|
||||
avatar_id: 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(),
|
||||
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();
|
||||
@@ -25,8 +23,8 @@ const lightconeStoreSchema = z.any();
|
||||
const relicStoreSchema = z.any();
|
||||
|
||||
export const avatarProfileCardTypeSchema = z.object({
|
||||
key: z.number(),
|
||||
profile_name: z.string(),
|
||||
lightcone: lightconeStoreSchema.nullable(),
|
||||
relics: z.record(relicStoreSchema),
|
||||
key: z.number(),
|
||||
profile_name: z.string(),
|
||||
lightcone: lightconeStoreSchema.optional().nullable(),
|
||||
relics: z.record(z.string(), relicStoreSchema)
|
||||
});
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const characterBasicRawSchema = z.object({
|
||||
release: z.number(),
|
||||
icon: z.string(),
|
||||
rank: z.string(),
|
||||
baseType: z.string(),
|
||||
damageType: z.string(),
|
||||
en: z.string(),
|
||||
desc: z.string(),
|
||||
kr: z.string(),
|
||||
cn: z.string(),
|
||||
jp: z.string(),
|
||||
release: z.number(),
|
||||
icon: z.string(),
|
||||
rank: z.string(),
|
||||
baseType: z.string(),
|
||||
damageType: z.string(),
|
||||
en: z.string(),
|
||||
desc: z.string(),
|
||||
kr: z.string(),
|
||||
cn: z.string(),
|
||||
jp: z.string()
|
||||
});
|
||||
|
||||
@@ -2,162 +2,180 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const rankTypeSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
ParamList: z.array(z.number()),
|
||||
});
|
||||
|
||||
export const uniqueAbilitySchema = z.object({
|
||||
Tag: z.string(),
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number()),
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
ParamList: z.array(z.number())
|
||||
});
|
||||
|
||||
export const voiceActorsSchema = z.object({
|
||||
Chinese: z.string().nullable(),
|
||||
Japanese: z.string().nullable(),
|
||||
Korean: z.string().nullable(),
|
||||
English: z.string().nullable(),
|
||||
Chinese: z.string().nullable(),
|
||||
Japanese: z.string().nullable(),
|
||||
Korean: z.string().nullable(),
|
||||
English: z.string().nullable()
|
||||
});
|
||||
|
||||
export const levelParamsSchema = z.object({
|
||||
Level: z.number(),
|
||||
ParamList: z.array(z.number()),
|
||||
Level: z.number(),
|
||||
ParamList: z.array(z.number())
|
||||
});
|
||||
|
||||
export const statusAddTypeSchema = z.object({
|
||||
$type: z.string(),
|
||||
PropertyType: z.string(),
|
||||
Value: z.number(),
|
||||
Name: z.string()
|
||||
});
|
||||
|
||||
export const itemConfigRowSchema = z.object({
|
||||
$type: z.string(),
|
||||
ItemID: z.number(),
|
||||
ItemNum: z.number(),
|
||||
Rarity: z.string(),
|
||||
$type: z.string(),
|
||||
ItemID: z.number(),
|
||||
ItemNum: z.number(),
|
||||
Rarity: z.string()
|
||||
});
|
||||
|
||||
export const spriteSkillSchema = z.object({
|
||||
Name: z.string(),
|
||||
Desc: z.string().nullable(),
|
||||
Type: z.string().nullable(),
|
||||
Tag: z.string(),
|
||||
SPBase: z.number().nullable(),
|
||||
BPNeed: z.number(),
|
||||
BPAdd: z.number().nullable(),
|
||||
ShowStanceList: z.array(z.number()),
|
||||
SkillComboValueDelta: z.number().nullable(),
|
||||
Level: z.record(levelParamsSchema),
|
||||
export const extraSchema = z.object({
|
||||
name: z.string(),
|
||||
desc: z.string(),
|
||||
param: z.array(z.number())
|
||||
});
|
||||
|
||||
export const uniqueAbilitySchema = z.object({
|
||||
Tag: z.string(),
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number()),
|
||||
Extra: z.record(z.string(), extraSchema)
|
||||
});
|
||||
|
||||
export const statSchema = z.object({
|
||||
AttackBase: z.number(),
|
||||
AttackAdd: z.number(),
|
||||
DefenceBase: z.number(),
|
||||
DefenceAdd: z.number(),
|
||||
HPBase: z.number(),
|
||||
HPAdd: z.number(),
|
||||
SpeedBase: z.number(),
|
||||
CriticalChance: z.number(),
|
||||
CriticalDamage: z.number(),
|
||||
BaseAggro: z.number(),
|
||||
Cost: z.array(itemConfigRowSchema),
|
||||
AttackBase: z.number(),
|
||||
AttackAdd: z.number(),
|
||||
DefenceBase: z.number(),
|
||||
DefenceAdd: z.number(),
|
||||
HPBase: z.number(),
|
||||
HPAdd: z.number(),
|
||||
SpeedBase: z.number(),
|
||||
CriticalChance: z.number(),
|
||||
CriticalDamage: z.number(),
|
||||
BaseAggro: z.number(),
|
||||
Cost: z.array(itemConfigRowSchema)
|
||||
});
|
||||
|
||||
export const relicRecommendPropertySchema = z.object({
|
||||
$type: z.string(),
|
||||
RelicType: z.string(),
|
||||
PropertyType: z.string(),
|
||||
$type: z.string(),
|
||||
RelicType: z.string(),
|
||||
PropertyType: z.string()
|
||||
});
|
||||
|
||||
export const characterInfoSchema = z.object({
|
||||
Camp: z.string().nullable(),
|
||||
VA: voiceActorsSchema,
|
||||
Stories: z.record(z.string().nullable()),
|
||||
Voicelines: z.array(z.string()),
|
||||
Camp: z.string().nullable(),
|
||||
VA: voiceActorsSchema,
|
||||
Stories: z.record(z.string(), z.string().nullable()),
|
||||
Voicelines: z.array(z.string())
|
||||
});
|
||||
|
||||
export const skillTypeSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Type: z.string(),
|
||||
Tag: z.string(),
|
||||
SPBase: z.number().nullable(),
|
||||
BPNeed: z.number(),
|
||||
BPAdd: z.number(),
|
||||
ShowStanceList: z.array(z.number()),
|
||||
SkillComboValueDelta: z.number().nullable(),
|
||||
Level: z.record(levelParamsSchema),
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Desc: z.string().nullable(),
|
||||
SimpleDesc: z.string(),
|
||||
Type: z.string(),
|
||||
Tag: z.string(),
|
||||
SPBase: z.number().nullable(),
|
||||
BPNeed: z.number(),
|
||||
BPAdd: z.number(),
|
||||
ShowStanceList: z.array(z.number()),
|
||||
SkillComboValueDelta: z.number().nullable(),
|
||||
Level: z.record(z.string(), levelParamsSchema)
|
||||
});
|
||||
|
||||
export const skillTreePointSchema = z.object({
|
||||
Anchor: z.string(),
|
||||
AvatarPromotionLimit: z.number().nullable(),
|
||||
AvatarLevelLimit: z.number().nullable(),
|
||||
DefaultUnlock: z.boolean(),
|
||||
Icon: z.string(),
|
||||
LevelUpSkillID: z.array(z.number()),
|
||||
MaterialList: z.array(itemConfigRowSchema),
|
||||
MaxLevel: z.number(),
|
||||
ParamList: z.array(z.any()),
|
||||
PointID: z.number(),
|
||||
PointName: z.string().nullable(),
|
||||
PointDesc: z.string().nullable(),
|
||||
PointTriggerKey: z.number(),
|
||||
PointType: z.number(),
|
||||
PrePoint: z.array(z.string()),
|
||||
StatusAddList: z.array(z.any()),
|
||||
});
|
||||
|
||||
export const memospriteSchema = z.object({
|
||||
Name: z.string(),
|
||||
Icon: z.string(),
|
||||
HPBase: z.string(),
|
||||
HPInherit: z.string(),
|
||||
HPSkill: z.number().nullable(),
|
||||
SpeedBase: z.string(),
|
||||
SpeedInherit: z.string(),
|
||||
SpeedSkill: z.number(),
|
||||
Aggro: z.number(),
|
||||
Skills: z.record(spriteSkillSchema),
|
||||
Talent: z.record(z.any()),
|
||||
Anchor: z.string(),
|
||||
AvatarPromotionLimit: z.number().nullable(),
|
||||
AvatarLevelLimit: z.number().nullable(),
|
||||
DefaultUnlock: z.boolean(),
|
||||
Icon: z.string(),
|
||||
LevelUpSkillID: z.array(z.number()),
|
||||
MaterialList: z.array(itemConfigRowSchema),
|
||||
MaxLevel: z.number(),
|
||||
ParamList: z.array(z.number()),
|
||||
PointID: z.number(),
|
||||
PointName: z.string().nullable(),
|
||||
PointDesc: z.string().nullable(),
|
||||
PointTriggerKey: z.number(),
|
||||
PointType: z.number(),
|
||||
PrePoint: z.array(z.string()),
|
||||
StatusAddList: z.array(statusAddTypeSchema)
|
||||
});
|
||||
|
||||
export const relicsSchema = z.object({
|
||||
AvatarID: z.number(),
|
||||
Set4IDList: z.array(z.number()),
|
||||
Set2IDList: z.array(z.number()),
|
||||
PropertyList3: z.array(z.string()),
|
||||
PropertyList4: z.array(z.string()),
|
||||
PropertyList5: z.array(z.string()),
|
||||
PropertyList6: z.array(z.string()),
|
||||
PropertyList: z.array(relicRecommendPropertySchema),
|
||||
SubAffixPropertyList: z.array(z.string()),
|
||||
ScoreRankList: z.array(z.number()),
|
||||
AvatarID: z.number(),
|
||||
Set4IDList: z.array(z.number()),
|
||||
Set2IDList: z.array(z.number()),
|
||||
PropertyList3: z.array(z.string()),
|
||||
PropertyList4: z.array(z.string()),
|
||||
PropertyList5: z.array(z.string()),
|
||||
PropertyList6: z.array(z.string()),
|
||||
PropertyList: z.array(relicRecommendPropertySchema),
|
||||
SubAffixPropertyList: z.array(z.string()),
|
||||
ScoreRankList: z.array(z.number())
|
||||
});
|
||||
|
||||
export const enhancedTypeSchema = z.object({
|
||||
Descs: z.array(z.string()),
|
||||
ChangeRankList: z.any(),
|
||||
ChangeSkillTreeList: z.any(),
|
||||
Ranks: z.record(rankTypeSchema),
|
||||
Skills: z.record(skillTypeSchema),
|
||||
SkillTrees: z.record(z.record(skillTreePointSchema)),
|
||||
Descs: z.array(z.string()),
|
||||
ChangeRankList: z.unknown(),
|
||||
ChangeSkillTreeList: z.unknown(),
|
||||
Ranks: z.record(z.string(), rankTypeSchema),
|
||||
Skills: z.record(z.string(), skillTypeSchema),
|
||||
SkillTrees: z.record(z.string(), z.record(z.string(), skillTreePointSchema))
|
||||
});
|
||||
|
||||
export const spriteSkillSchema = z.object({
|
||||
Name: z.string(),
|
||||
Desc: z.string().nullable(),
|
||||
SimpleDesc: z.string(),
|
||||
Type: z.string().nullable(),
|
||||
Tag: z.string(),
|
||||
SPBase: z.number().nullable(),
|
||||
BPNeed: z.number(),
|
||||
BPAdd: z.number().nullable(),
|
||||
ShowStanceList: z.array(z.number()),
|
||||
SkillComboValueDelta: z.number().nullable(),
|
||||
Extra: z.record(z.string(), extraSchema),
|
||||
Level: z.record(z.string(), levelParamsSchema)
|
||||
});
|
||||
|
||||
export const memospriteSchema = z.object({
|
||||
Name: z.string(),
|
||||
Icon: z.string(),
|
||||
HPBase: z.string(),
|
||||
HPInherit: z.string(),
|
||||
HPSkill: z.number().nullable(),
|
||||
SpeedBase: z.string(),
|
||||
SpeedInherit: z.string(),
|
||||
SpeedSkill: z.number(),
|
||||
Aggro: z.number(),
|
||||
Skills: z.record(z.string(), spriteSkillSchema),
|
||||
Talent: z.record(z.string(), z.unknown())
|
||||
});
|
||||
|
||||
export const characterDetailSchema = z.object({
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
CharaInfo: characterInfoSchema,
|
||||
Rarity: z.string(),
|
||||
AvatarVOTag: z.string(),
|
||||
SPNeed: z.number().nullable(),
|
||||
BaseType: z.string(),
|
||||
DamageType: z.string(),
|
||||
Ranks: z.record(rankTypeSchema),
|
||||
Skills: z.record(skillTypeSchema),
|
||||
SkillTrees: z.record(z.record(skillTreePointSchema)),
|
||||
Memosprite: memospriteSchema,
|
||||
Unique: z.record(uniqueAbilitySchema),
|
||||
Stats: z.record(statSchema),
|
||||
Relics: relicsSchema,
|
||||
Enhanced: z.record(enhancedTypeSchema),
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
CharaInfo: characterInfoSchema,
|
||||
Rarity: z.string(),
|
||||
AvatarVOTag: z.string(),
|
||||
SPNeed: z.number().nullable(),
|
||||
BaseType: z.string(),
|
||||
DamageType: z.string(),
|
||||
Ranks: z.record(z.string(), rankTypeSchema),
|
||||
Skills: z.record(z.string(), skillTypeSchema),
|
||||
SkillTrees: z.record(z.string(), z.record(z.string(), skillTreePointSchema)),
|
||||
Memosprite: memospriteSchema,
|
||||
Unique: z.record(z.string(), uniqueAbilitySchema),
|
||||
Stats: z.record(z.string(), statSchema),
|
||||
Relics: relicsSchema,
|
||||
Enhanced: z.record(z.string(), enhancedTypeSchema),
|
||||
RankIcon: z.array(z.string())
|
||||
});
|
||||
|
||||
@@ -1,28 +1,36 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
export const aSConfigMazeSchema = z.object({
|
||||
buff_1: z.array(z.number()),
|
||||
buff_2: z.array(z.number()),
|
||||
maze_buff: z.number(),
|
||||
export const asConfigMazeSchema = z.object({
|
||||
buff_1: z.array(z.number()),
|
||||
buff_2: z.array(z.number()),
|
||||
maze_buff: z.number()
|
||||
});
|
||||
|
||||
export const pFConfigMazeSchema = z.object({
|
||||
buff: z.array(z.number()),
|
||||
maze_buff: z.number(),
|
||||
export const pfConfigMazeSchema = z.object({
|
||||
buff: z.array(z.number()),
|
||||
maze_buff: z.number()
|
||||
});
|
||||
|
||||
export const mOCConfigMazeSchema = z.object({
|
||||
maze_buff: z.number(),
|
||||
export const mocConfigMazeSchema = z.object({
|
||||
maze_buff: z.number()
|
||||
});
|
||||
|
||||
export const avatarConfigMazeSchema = z.object({
|
||||
maze_buff: z.array(z.number()),
|
||||
maze_buff: z.array(z.number())
|
||||
});
|
||||
|
||||
export const stageConfigMazeSchema = z.object({
|
||||
stage_id: z.number(),
|
||||
stage_type: z.string(),
|
||||
level: z.number(),
|
||||
monster_list: z.array(z.record(z.string(), z.number()))
|
||||
});
|
||||
|
||||
export const configMazeSchema = z.object({
|
||||
Avatar: z.record(avatarConfigMazeSchema),
|
||||
MOC: z.record(mOCConfigMazeSchema),
|
||||
AS: z.record(aSConfigMazeSchema),
|
||||
PF: z.record(pFConfigMazeSchema),
|
||||
Avatar: z.record(z.string(), avatarConfigMazeSchema),
|
||||
MOC: z.record(z.string(), mocConfigMazeSchema),
|
||||
AS: z.record(z.string(), asConfigMazeSchema),
|
||||
PF: z.record(z.string(), pfConfigMazeSchema),
|
||||
Stage: z.record(z.string(), stageConfigMazeSchema)
|
||||
});
|
||||
|
||||
@@ -2,99 +2,97 @@
|
||||
import { z } from "zod";
|
||||
|
||||
const privacySettingInfoSchema = z.object({
|
||||
displayCollection: z.boolean(),
|
||||
displayRecord: z.boolean(),
|
||||
displayRecordTeam: z.boolean(),
|
||||
displayOnlineStatus: z.boolean(),
|
||||
displayDiary: z.boolean(),
|
||||
displayCollection: z.boolean(),
|
||||
displayRecord: z.boolean(),
|
||||
displayRecordTeam: z.boolean(),
|
||||
displayOnlineStatus: z.boolean(),
|
||||
displayDiary: z.boolean()
|
||||
});
|
||||
|
||||
const challengeInfoSchema = z.object({});
|
||||
|
||||
const recordInfoSchema = z.object({
|
||||
achievementCount: z.number(),
|
||||
bookCount: z.number(),
|
||||
avatarCount: z.number(),
|
||||
equipmentCount: z.number(),
|
||||
musicCount: z.number(),
|
||||
relicCount: z.number(),
|
||||
challengeInfo: challengeInfoSchema,
|
||||
maxRogueChallengeScore: z.number(),
|
||||
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(),
|
||||
affixId: z.number(),
|
||||
cnt: z.number(),
|
||||
step: z.number().optional()
|
||||
});
|
||||
|
||||
const flatPropSchema = z.object({
|
||||
type: z.string(),
|
||||
value: z.number(),
|
||||
type: z.string(),
|
||||
value: z.number()
|
||||
});
|
||||
|
||||
const relicFlatSchema = z.object({
|
||||
props: z.array(flatPropSchema),
|
||||
setName: z.string(),
|
||||
setID: z.number(),
|
||||
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,
|
||||
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(),
|
||||
pointId: z.number(),
|
||||
level: z.number()
|
||||
});
|
||||
|
||||
const equipmentFlatSchema = z.object({
|
||||
props: z.array(flatPropSchema),
|
||||
name: z.string(),
|
||||
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,
|
||||
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(),
|
||||
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(),
|
||||
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(),
|
||||
detailInfo: detailInfoSchema,
|
||||
ttl: z.number(),
|
||||
uid: z.string()
|
||||
});
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const eventBasicRawSchema = z.object({
|
||||
param: z.array(z.number()).optional(),
|
||||
en: z.string(),
|
||||
id: z.string(),
|
||||
begin: z.string(),
|
||||
end: z.string(),
|
||||
live_begin: z.string(),
|
||||
live_end: z.string(),
|
||||
kr: z.string(),
|
||||
cn: z.string(),
|
||||
jp: z.string(),
|
||||
param: z.array(z.number()).optional(),
|
||||
en: z.string(),
|
||||
id: z.string(),
|
||||
begin: z.string(),
|
||||
end: z.string(),
|
||||
live_begin: z.string(),
|
||||
live_end: z.string(),
|
||||
kr: z.string(),
|
||||
cn: z.string(),
|
||||
jp: z.string()
|
||||
});
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
// 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(),
|
||||
mode: z.boolean()
|
||||
}),
|
||||
setting: z.object({
|
||||
censorship: z.boolean(),
|
||||
cm: z.boolean(),
|
||||
first_person: z.boolean(),
|
||||
hide_ui: z.boolean(),
|
||||
}),
|
||||
});
|
||||
hide_ui: z.boolean()
|
||||
})
|
||||
});
|
||||
|
||||
@@ -2,29 +2,21 @@
|
||||
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(),
|
||||
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(),
|
||||
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(),
|
||||
});
|
||||
|
||||
export const filterMonsterTypeSchema = z.object({
|
||||
name: z.string(),
|
||||
id: z.string(),
|
||||
rarity: z.array(z.string()),
|
||||
locale: z.string(),
|
||||
weak: z.array(z.string()),
|
||||
locale: z.string(),
|
||||
name: z.string()
|
||||
});
|
||||
|
||||
@@ -1,14 +1,25 @@
|
||||
export * from "./affix.zod";
|
||||
export * from "./card.zod";
|
||||
export * from "./characterBasic.zod";
|
||||
export * from "./characterDetail.zod";
|
||||
export * from "./config_maze.zod";
|
||||
export * from "./enka.zod";
|
||||
export * from "./filter.zod";
|
||||
export * from "./lightconeBasic.zod";
|
||||
export * from "./lightconeDetail.zod";
|
||||
export * from "./mics.zod";
|
||||
export * from "./relicBasic.zod";
|
||||
export * from "./relicDetail.zod";
|
||||
export * from "./srtools.zod";
|
||||
export * from "./extraData.zod";
|
||||
export * from "./characterBasic.zod"
|
||||
export * from "./characterDetail.zod"
|
||||
export * from "./srtools.zod"
|
||||
export * from "./filter.zod"
|
||||
export * from "./mics.zod"
|
||||
export * from "./config_maze.zod"
|
||||
export * from "./lightconeBasic.zod"
|
||||
export * from "./lightconeDetail.zod"
|
||||
export * from "./relicBasic.zod"
|
||||
export * from "./relicDetail.zod"
|
||||
export * from "./affix.zod"
|
||||
export * from "./enka.zod"
|
||||
export * from "./card.zod"
|
||||
export * from "./eventBasic.zod"
|
||||
export * from "./monsterBasic.zod"
|
||||
export * from "./pfDetail.zod"
|
||||
export * from "./asDetail.zod"
|
||||
export * from "./mocDetail.zod"
|
||||
export * from "./monsterValue.zod"
|
||||
export * from "./peakDetail.zod"
|
||||
export * from "./monsterDetail.zod"
|
||||
export * from "./extraData.zod"
|
||||
export * from "./showcase.zod"
|
||||
export * from "./srtools.zod"
|
||||
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const lightConeBasicRawSchema = z.object({
|
||||
rank: z.string(),
|
||||
baseType: z.string(),
|
||||
en: z.string(),
|
||||
desc: z.string(),
|
||||
kr: z.string(),
|
||||
cn: z.string(),
|
||||
jp: z.string(),
|
||||
rank: z.string(),
|
||||
baseType: z.string(),
|
||||
en: z.string(),
|
||||
desc: z.string(),
|
||||
kr: z.string(),
|
||||
cn: z.string(),
|
||||
jp: z.string()
|
||||
});
|
||||
|
||||
@@ -2,42 +2,44 @@
|
||||
import { z } from "zod";
|
||||
|
||||
const refinementDetailSchema = z.object({
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Level: z.record(
|
||||
z.object({
|
||||
ParamList: z.array(z.number()),
|
||||
}),
|
||||
),
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Level: z.record(z.string(), z.object({
|
||||
ParamList: z.array(z.number())
|
||||
}))
|
||||
});
|
||||
|
||||
const promotionCostSchema = z.object({
|
||||
$type: z.string(),
|
||||
ItemID: z.number(),
|
||||
ItemNum: z.number(),
|
||||
Rarity: z.string(),
|
||||
$type: z.string(),
|
||||
ItemID: z.number(),
|
||||
ItemNum: z.number(),
|
||||
Rarity: z.string()
|
||||
});
|
||||
|
||||
const statEntryDetailSchema = z.object({
|
||||
EquipmentID: z.number(),
|
||||
Promotion: z.number().optional(),
|
||||
PromotionCostList: z.array(promotionCostSchema),
|
||||
PlayerLevelRequire: z.number().optional(),
|
||||
WorldLevelRequire: z.number().optional(),
|
||||
MaxLevel: z.number(),
|
||||
BaseHP: z.number(),
|
||||
BaseHPAdd: z.number(),
|
||||
BaseAttack: z.number(),
|
||||
BaseAttackAdd: z.number(),
|
||||
BaseDefence: z.number(),
|
||||
BaseDefenceAdd: z.number(),
|
||||
EquipmentID: z.number(),
|
||||
Promotion: z.number().optional(),
|
||||
PromotionCostList: z.array(promotionCostSchema),
|
||||
PlayerLevelRequire: z.number().optional(),
|
||||
WorldLevelRequire: z.number().optional(),
|
||||
MaxLevel: z.number(),
|
||||
BaseHP: z.number(),
|
||||
BaseHPAdd: z.number(),
|
||||
BaseAttack: z.number(),
|
||||
BaseAttackAdd: z.number(),
|
||||
BaseDefence: z.number(),
|
||||
BaseDefenceAdd: z.number()
|
||||
});
|
||||
|
||||
export const lightConeDetailSchema = z.object({
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Rarity: z.string(),
|
||||
BaseType: z.string(),
|
||||
Refinements: refinementDetailSchema,
|
||||
Stats: z.array(statEntryDetailSchema),
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Rarity: z.string(),
|
||||
BaseType: z.string(),
|
||||
Refinements: refinementDetailSchema,
|
||||
Stats: z.array(statEntryDetailSchema),
|
||||
Bonus: z.record(z.string(), z.array(z.object({
|
||||
type: z.string(),
|
||||
value: z.number()
|
||||
})))
|
||||
});
|
||||
|
||||
@@ -2,111 +2,104 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const avatarDataStoreSchema = z.object({
|
||||
rank: z.number(),
|
||||
skills: z.record(z.number()),
|
||||
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(),
|
||||
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(),
|
||||
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),
|
||||
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(relicStoreSchema),
|
||||
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),
|
||||
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(),
|
||||
monster_id: z.number(),
|
||||
level: z.number(),
|
||||
amount: z.number()
|
||||
});
|
||||
|
||||
export const dynamicKeyStoreSchema = z.object({
|
||||
key: z.string(),
|
||||
value: z.number(),
|
||||
key: z.string(),
|
||||
value: z.number()
|
||||
});
|
||||
|
||||
export const battleBuffStoreSchema = z.object({
|
||||
level: z.number(),
|
||||
id: z.number(),
|
||||
dynamic_key: dynamicKeyStoreSchema.optional(),
|
||||
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 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(),
|
||||
floor_side: z.string(),
|
||||
buff_id: z.number(),
|
||||
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 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 cEConfigStoreSchema = z.object({
|
||||
blessings: z.array(battleBuffStoreSchema),
|
||||
cycle_count: z.number(),
|
||||
stage_id: z.number(),
|
||||
monsters: z.array(z.array(monsterStoreSchema)),
|
||||
});
|
||||
|
||||
export const pEAKConfigStoreSchema = z.object({
|
||||
export const peakConfigStoreSchema = z.object({
|
||||
event_id: z.number(),
|
||||
challenge_id: z.number(),
|
||||
buff_id: z.number(),
|
||||
@@ -114,15 +107,22 @@ export const pEAKConfigStoreSchema = z.object({
|
||||
blessings: z.array(battleBuffStoreSchema),
|
||||
cycle_count: z.number(),
|
||||
stage_id: z.number(),
|
||||
monsters: z.array(z.array(monsterStoreSchema)),
|
||||
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(avatarStoreSchema),
|
||||
battle_type: z.string(),
|
||||
moc_config: mOCConfigStoreSchema,
|
||||
pf_config: pFConfigStoreSchema,
|
||||
as_config: aSConfigStoreSchema,
|
||||
ce_config: cEConfigStoreSchema,
|
||||
peak_config: pEAKConfigStoreSchema,
|
||||
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
|
||||
});
|
||||
|
||||
@@ -2,53 +2,51 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const challengeDetailSchema = z.object({
|
||||
Name: z.string(),
|
||||
Param: z.number().optional(),
|
||||
Name: z.string(),
|
||||
Param: z.number().optional()
|
||||
});
|
||||
|
||||
export const stageConfigSchema = z.record(z.string()).and(
|
||||
z.object({
|
||||
$type: z.string(),
|
||||
}),
|
||||
);
|
||||
export const stageConfigSchema = z.record(z.string(), z.string()).and(z.object({
|
||||
$type: z.string()
|
||||
}));
|
||||
|
||||
export const eventStageDetailSchema = z.object({
|
||||
StageID: z.number(),
|
||||
StageType: z.string(),
|
||||
StageName: z.number(),
|
||||
HardLevelGroup: z.number(),
|
||||
Level: z.number(),
|
||||
EliteGroup: z.number().optional(),
|
||||
LevelGraphPath: z.string(),
|
||||
StageAbilityConfig: z.array(z.any()),
|
||||
BattleScoringGroup: z.number().optional(),
|
||||
SubLevelGraphs: z.array(z.any()),
|
||||
StageConfigData: z.array(stageConfigSchema),
|
||||
MonsterList: z.array(z.record(z.number())),
|
||||
LevelLoseCondition: z.array(z.string()),
|
||||
LevelWinCondition: z.array(z.string()),
|
||||
Release: z.boolean(),
|
||||
ForbidExitBattle: z.boolean(),
|
||||
MonsterWarningRatio: z.number().optional(),
|
||||
TrialAvatarList: z.array(z.any()),
|
||||
StageID: z.number(),
|
||||
StageType: z.string(),
|
||||
StageName: z.number(),
|
||||
HardLevelGroup: z.number(),
|
||||
Level: z.number(),
|
||||
EliteGroup: z.number().optional(),
|
||||
LevelGraphPath: z.string(),
|
||||
StageAbilityConfig: z.array(z.any()),
|
||||
BattleScoringGroup: z.number().optional(),
|
||||
SubLevelGraphs: z.array(z.any()),
|
||||
StageConfigData: z.array(stageConfigSchema),
|
||||
MonsterList: z.array(z.record(z.string(), z.number())),
|
||||
LevelLoseCondition: z.array(z.string()),
|
||||
LevelWinCondition: z.array(z.string()),
|
||||
Release: z.boolean(),
|
||||
ForbidExitBattle: z.boolean(),
|
||||
MonsterWarningRatio: z.number().optional(),
|
||||
TrialAvatarList: z.array(z.any())
|
||||
});
|
||||
|
||||
export const mocDetailSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
GroupName: z.string(),
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number()),
|
||||
Challenge: z.array(challengeDetailSchema),
|
||||
Countdown: z.number(),
|
||||
DamageType1: z.array(z.string()),
|
||||
DamageType2: z.array(z.string()),
|
||||
MazeGroupID1: z.number(),
|
||||
MazeGroupID2: z.number(),
|
||||
NpcMonsterIDList1: z.array(z.number()),
|
||||
NpcMonsterIDList2: z.array(z.number()),
|
||||
EventIDList1: z.array(eventStageDetailSchema),
|
||||
EventIDList2: z.array(eventStageDetailSchema),
|
||||
BeginTime: z.string(),
|
||||
EndTime: z.string(),
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
GroupName: z.string(),
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number()),
|
||||
Challenge: z.array(challengeDetailSchema),
|
||||
Countdown: z.number(),
|
||||
DamageType1: z.array(z.string()),
|
||||
DamageType2: z.array(z.string()),
|
||||
MazeGroupID1: z.number(),
|
||||
MazeGroupID2: z.number(),
|
||||
NpcMonsterIDList1: z.array(z.number()),
|
||||
NpcMonsterIDList2: z.array(z.number()),
|
||||
EventIDList1: z.array(eventStageDetailSchema),
|
||||
EventIDList2: z.array(eventStageDetailSchema),
|
||||
BeginTime: z.string(),
|
||||
EndTime: z.string()
|
||||
});
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const monsterBasicRawSchema = z.object({
|
||||
rank: z.string(),
|
||||
camp: z.string().nullable(),
|
||||
icon: z.string(),
|
||||
child: z.array(z.number()),
|
||||
weak: z.array(z.string()),
|
||||
en: z.string(),
|
||||
desc: z.string(),
|
||||
kr: z.string(),
|
||||
cn: z.string(),
|
||||
jp: z.string(),
|
||||
rank: z.string(),
|
||||
camp: z.string().nullable(),
|
||||
icon: z.string(),
|
||||
child: z.array(z.number()),
|
||||
weak: z.array(z.string()),
|
||||
en: z.string(),
|
||||
desc: z.string(),
|
||||
kr: z.string(),
|
||||
cn: z.string(),
|
||||
jp: z.string()
|
||||
});
|
||||
|
||||
64
src/zod/monsterDetail.zod.ts
Normal file
64
src/zod/monsterDetail.zod.ts
Normal file
@@ -0,0 +1,64 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
export const monsterDetailElementResistanceSchema = z.object({
|
||||
$type: z.string(),
|
||||
DamageType: z.string(),
|
||||
Value: z.number()
|
||||
});
|
||||
|
||||
export const monsterDetailSkillSchema = z.object({
|
||||
Id: z.number(),
|
||||
SkillName: z.string().nullable(),
|
||||
SkillDesc: z.string().nullable(),
|
||||
DamageType: z.string(),
|
||||
SPHitBase: z.union([z.number(), z.string()])
|
||||
});
|
||||
|
||||
export const monsterDetailDropItemSchema = z.object({
|
||||
$type: z.string(),
|
||||
ID: z.number()
|
||||
});
|
||||
|
||||
export const monsterDetailChildSchema = z.object({
|
||||
Id: z.number(),
|
||||
AttackModifyRatio: z.number(),
|
||||
DefenceModifyRatio: z.number(),
|
||||
EliteGroup: z.number(),
|
||||
HPModifyRatio: z.number(),
|
||||
SpeedModifyRatio: z.number(),
|
||||
SpeedModifyValue: z.number().nullable(),
|
||||
StanceModifyRatio: z.number(),
|
||||
StanceWeakList: z.array(z.string()),
|
||||
HardLevelGroup: z.number(),
|
||||
DamageTypeResistance: z.array(monsterDetailElementResistanceSchema),
|
||||
SkillList: z.array(monsterDetailSkillSchema)
|
||||
});
|
||||
|
||||
export const monsterDetailDropSchema = z.object({
|
||||
MonsterTemplateID: z.number(),
|
||||
WorldLevel: z.number().optional(),
|
||||
AvatarExpReward: z.number(),
|
||||
DisplayItemList: z.array(monsterDetailDropItemSchema)
|
||||
});
|
||||
|
||||
export const monsterDetailSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
MonsterCampID: z.number().nullable(),
|
||||
AttackBase: z.number(),
|
||||
CriticalDamageBase: z.number(),
|
||||
DefenceBase: z.number(),
|
||||
HPBase: z.number(),
|
||||
InitialDelayRatio: z.number(),
|
||||
ImagePath: z.string(),
|
||||
MinimumFatigueRatio: z.number(),
|
||||
Rank: z.string(),
|
||||
SpeedBase: z.number(),
|
||||
StanceBase: z.number(),
|
||||
StanceCount: z.number(),
|
||||
StatusResistanceBase: z.number(),
|
||||
Child: z.array(monsterDetailChildSchema),
|
||||
Drop: z.array(monsterDetailDropSchema)
|
||||
});
|
||||
26
src/zod/monsterValue.zod.ts
Normal file
26
src/zod/monsterValue.zod.ts
Normal file
@@ -0,0 +1,26 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
export const monsterChildSchema = z.object({
|
||||
Id: z.number(),
|
||||
AttackModifyRatio: z.number(),
|
||||
DefenceModifyRatio: z.number(),
|
||||
EliteGroup: z.number(),
|
||||
HPModifyRatio: z.number(),
|
||||
SpeedModifyRatio: z.number(),
|
||||
SpeedModifyValue: z.number().nullable(),
|
||||
StanceModifyRatio: z.number(),
|
||||
HardLevelGroup: z.number(),
|
||||
StanceWeakList: z.array(z.string())
|
||||
});
|
||||
|
||||
export const monsterValueSchema = z.object({
|
||||
Rank: z.string(),
|
||||
AttackBase: z.number(),
|
||||
DefenceBase: z.number(),
|
||||
HPBase: z.number(),
|
||||
SpeedBase: z.number(),
|
||||
StanceBase: z.number(),
|
||||
StatusResistanceBase: z.number(),
|
||||
child: z.array(monsterChildSchema)
|
||||
});
|
||||
40
src/zod/peakDetail.zod.ts
Normal file
40
src/zod/peakDetail.zod.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
|
||||
export const challengeTagSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number())
|
||||
});
|
||||
|
||||
const eventStageDetailSchema = z.any();
|
||||
|
||||
const infiniteWaveSchema = z.any();
|
||||
|
||||
export const peakLevelSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
DamageType: z.array(z.string()),
|
||||
MazeGroupID: z.number(),
|
||||
NpcMonsterIDList: z.array(z.number()),
|
||||
EventIDList: z.array(eventStageDetailSchema),
|
||||
TagList: z.array(challengeTagSchema),
|
||||
InfiniteList: z.record(z.string(), infiniteWaveSchema)
|
||||
});
|
||||
|
||||
export const bossConfigSchema = z.object({
|
||||
HardName: z.string(),
|
||||
BuffList: z.array(challengeTagSchema),
|
||||
EventIDList: z.array(eventStageDetailSchema),
|
||||
TagList: z.array(challengeTagSchema),
|
||||
InfiniteList: z.record(z.string(), infiniteWaveSchema)
|
||||
});
|
||||
|
||||
export const peakDetailSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
PreLevel: z.array(peakLevelSchema),
|
||||
BossLevel: peakLevelSchema,
|
||||
BossConfig: bossConfigSchema
|
||||
});
|
||||
@@ -2,55 +2,55 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const buffDetailSchema = z.object({
|
||||
Name: z.string().nullable(),
|
||||
Desc: z.string().nullable(),
|
||||
Param: z.array(z.number()),
|
||||
Name: z.string().nullable(),
|
||||
Desc: z.string().nullable(),
|
||||
Param: z.array(z.number())
|
||||
});
|
||||
|
||||
export const optionDetailSchema = z.object({
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number()),
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Param: z.array(z.number())
|
||||
});
|
||||
|
||||
export const infiniteWaveSchema = z.object({
|
||||
InfiniteWaveID: z.number(),
|
||||
MonsterGroupIDList: z.array(z.number()),
|
||||
MaxMonsterCount: z.number(),
|
||||
MaxTeammateCount: z.number(),
|
||||
Ability: z.string(),
|
||||
ParamList: z.array(z.number()),
|
||||
ClearPreviousAbility: z.boolean(),
|
||||
EliteGroup: z.number(),
|
||||
InfiniteWaveID: z.number(),
|
||||
MonsterGroupIDList: z.array(z.number()),
|
||||
MaxMonsterCount: z.number(),
|
||||
MaxTeammateCount: z.number(),
|
||||
Ability: z.string(),
|
||||
ParamList: z.array(z.number()),
|
||||
ClearPreviousAbility: z.boolean(),
|
||||
EliteGroup: z.number()
|
||||
});
|
||||
|
||||
const challengeDetailSchema = z.any();
|
||||
|
||||
const eventStageDetailSchema = z.any();
|
||||
|
||||
export const pFLevelSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Challenge: z.array(challengeDetailSchema),
|
||||
DamageType1: z.array(z.string()),
|
||||
DamageType2: z.array(z.string()),
|
||||
MazeGroupID1: z.number(),
|
||||
MazeGroupID2: z.number(),
|
||||
NpcMonsterIDList1: z.array(z.number()),
|
||||
NpcMonsterIDList2: z.array(z.number()),
|
||||
EventIDList1: z.array(eventStageDetailSchema),
|
||||
EventIDList2: z.array(eventStageDetailSchema),
|
||||
InfiniteList1: z.record(infiniteWaveSchema),
|
||||
InfiniteList2: z.record(infiniteWaveSchema),
|
||||
export const pfLevelSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Challenge: z.array(challengeDetailSchema),
|
||||
DamageType1: z.array(z.string()),
|
||||
DamageType2: z.array(z.string()),
|
||||
MazeGroupID1: z.number(),
|
||||
MazeGroupID2: z.number(),
|
||||
NpcMonsterIDList1: z.array(z.number()),
|
||||
NpcMonsterIDList2: z.array(z.number()),
|
||||
EventIDList1: z.array(eventStageDetailSchema),
|
||||
EventIDList2: z.array(eventStageDetailSchema),
|
||||
InfiniteList1: z.record(z.string(), infiniteWaveSchema),
|
||||
InfiniteList2: z.record(z.string(), infiniteWaveSchema)
|
||||
});
|
||||
|
||||
export const pFDetailSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Buff: buffDetailSchema,
|
||||
Option: z.array(optionDetailSchema),
|
||||
SubOption: z.array(optionDetailSchema),
|
||||
BeginTime: z.string(),
|
||||
EndTime: z.string(),
|
||||
Level: z.array(pFLevelSchema),
|
||||
export const pfDetailSchema = z.object({
|
||||
Id: z.number(),
|
||||
Name: z.string(),
|
||||
Buff: buffDetailSchema,
|
||||
Option: z.array(optionDetailSchema),
|
||||
SubOption: z.array(optionDetailSchema),
|
||||
BeginTime: z.string(),
|
||||
EndTime: z.string(),
|
||||
Level: z.array(pfLevelSchema)
|
||||
});
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const relicBasicRawEffectSchema = z.object({
|
||||
en: z.string(),
|
||||
ParamList: z.array(z.number()),
|
||||
kr: z.string(),
|
||||
cn: z.string(),
|
||||
jp: z.string(),
|
||||
en: z.string(),
|
||||
ParamList: z.array(z.number()),
|
||||
kr: z.string(),
|
||||
cn: z.string(),
|
||||
jp: z.string()
|
||||
});
|
||||
|
||||
@@ -2,19 +2,23 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const partDataSchema = z.object({
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Story: z.string(),
|
||||
Name: z.string(),
|
||||
Desc: z.string(),
|
||||
Story: z.string()
|
||||
});
|
||||
|
||||
export const requireBonusSchema = z.object({
|
||||
Desc: z.string(),
|
||||
ParamList: z.array(z.number()),
|
||||
Desc: z.string(),
|
||||
ParamList: z.array(z.number())
|
||||
});
|
||||
|
||||
export const relicDetailSchema = z.object({
|
||||
Name: z.string(),
|
||||
Icon: z.string(),
|
||||
Parts: z.record(partDataSchema),
|
||||
RequireNum: z.record(requireBonusSchema),
|
||||
Name: z.string(),
|
||||
Icon: z.string(),
|
||||
Parts: z.record(z.string(), partDataSchema),
|
||||
RequireNum: z.record(z.string(), requireBonusSchema),
|
||||
Bonus: z.record(z.string(), z.array(z.object({
|
||||
type: z.string(),
|
||||
value: z.number()
|
||||
})))
|
||||
});
|
||||
|
||||
29
src/zod/showcase.zod.ts
Normal file
29
src/zod/showcase.zod.ts
Normal 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()
|
||||
}))
|
||||
});
|
||||
@@ -1,92 +1,93 @@
|
||||
// Generated by ts-to-zod
|
||||
import { z } from "zod";
|
||||
import { extraDataSchema } from "./extraData.zod";
|
||||
|
||||
export const subAffixSchema = z.object({
|
||||
sub_affix_id: z.number(),
|
||||
count: z.number(),
|
||||
step: z.number(),
|
||||
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(),
|
||||
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(),
|
||||
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.number()),
|
||||
rank: z.number(),
|
||||
skills: z.record(z.string(), z.number())
|
||||
});
|
||||
|
||||
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(),
|
||||
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(),
|
||||
monster_id: z.number(),
|
||||
level: z.number(),
|
||||
amount: z.number()
|
||||
});
|
||||
|
||||
export const dynamicKeyJsonSchema = z.object({
|
||||
key: z.string(),
|
||||
value: z.number(),
|
||||
key: z.string(),
|
||||
value: z.number()
|
||||
});
|
||||
|
||||
export const battleBuffJsonSchema = z.object({
|
||||
level: z.number(),
|
||||
id: z.number(),
|
||||
dynamic_key: dynamicKeyJsonSchema.optional(),
|
||||
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)),
|
||||
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))
|
||||
});
|
||||
|
||||
export const loadoutJsonSchema = z.object({
|
||||
name: z.string(),
|
||||
avatar_id: z.number(),
|
||||
relic_list: z.array(z.string()),
|
||||
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(avatarJsonSchema),
|
||||
battle_config: battleConfigJsonSchema,
|
||||
loadout: z.array(loadoutJsonSchema).optional(),
|
||||
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()
|
||||
});
|
||||
|
||||
export const pSResponseSchema = z.object({
|
||||
status: z.number(),
|
||||
message: z.string(),
|
||||
extra_data: extraDataSchema.optional(),
|
||||
const extraDataSchema = z.any();
|
||||
|
||||
export const psResponseSchema = z.object({
|
||||
status: z.number(),
|
||||
message: z.string(),
|
||||
extra_data: extraDataSchema.optional()
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user