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>
|
</motion.button>
|
||||||
</div>
|
</div>
|
||||||
<div className="border-b border-purple-500/30 px-6 py-4 mb-4">
|
<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}
|
{title}
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ export default function AvatarInfo() {
|
|||||||
{/* Header */}
|
{/* Header */}
|
||||||
<div className="flex items-center justify-between mb-6">
|
<div className="flex items-center justify-between mb-6">
|
||||||
<h2 className="card-title text-2xl font-bold flex items-center gap-2">
|
<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")}
|
{transI18n("characterSettings")}
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
@@ -92,7 +92,7 @@ export default function AvatarInfo() {
|
|||||||
{/* Level Control */}
|
{/* Level Control */}
|
||||||
<div className="bg-base-100 rounded-xl p-6 border border-base-content/10">
|
<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">
|
<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")}
|
{transI18n("levelConfiguration")}
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ export default function AvatarInfo() {
|
|||||||
{/* Energy Control */}
|
{/* Energy Control */}
|
||||||
<div className="bg-base-100 rounded-xl p-6 border border-base-content/10">
|
<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">
|
<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")}
|
{transI18n("ultimateEnergy")}
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
@@ -189,7 +189,7 @@ export default function AvatarInfo() {
|
|||||||
{/* Technique Toggle */}
|
{/* Technique Toggle */}
|
||||||
<div className="bg-base-100 rounded-xl p-6 border border-base-content/10">
|
<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">
|
<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")}
|
{transI18n("battleConfiguration")}
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
@@ -277,7 +277,7 @@ export default function AvatarInfo() {
|
|||||||
{/* Header */}
|
{/* Header */}
|
||||||
<div className="flex items-center justify-between mb-6">
|
<div className="flex items-center justify-between mb-6">
|
||||||
<h2 className="card-title text-2xl font-bold flex items-center gap-2">
|
<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")}
|
{transI18n("lightconeEquipment")}
|
||||||
</h2>
|
</h2>
|
||||||
</div>
|
</div>
|
||||||
@@ -288,7 +288,7 @@ export default function AvatarInfo() {
|
|||||||
{/* Level & Rank Controls */}
|
{/* Level & Rank Controls */}
|
||||||
<div className="bg-base-100 rounded-xl p-6 border border-base-content/10">
|
<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">
|
<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")}
|
{transI18n("lightconeSettings")}
|
||||||
</h4>
|
</h4>
|
||||||
|
|
||||||
|
|||||||
@@ -16,12 +16,12 @@ export default function CharacterCard({ data }: CharacterCardProps) {
|
|||||||
return (
|
return (
|
||||||
<li
|
<li
|
||||||
className="z-10 flex flex-col items-center rounded-xl shadow-xl
|
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
|
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]"
|
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
|
<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-yellow-400 via-yellow-600/70 to-yellow-800/50"
|
||||||
: "from-purple-400 via-purple-600/70 to-purple-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)
|
const text = getLocaleName(locale, data)
|
||||||
return (
|
return (
|
||||||
<li className="z-10 flex flex-col items-center rounded-md shadow-lg
|
<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]"
|
hover:scale-105 cursor-pointer min-h-[220px]"
|
||||||
>
|
>
|
||||||
<div
|
<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"
|
? "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" :
|
: 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"
|
"from-blue-400 via-blue-600/70 to-blue-800/50"
|
||||||
|
|||||||
@@ -11,10 +11,10 @@ interface RelicCardProps {
|
|||||||
}
|
}
|
||||||
const getRarityColor = (rarity: string) => {
|
const getRarityColor = (rarity: string) => {
|
||||||
switch (rarity) {
|
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 '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-gradient-to-br from-blue-700 via-blue-400 to-blue-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-gradient-to-br from-purple-700 via-purple-400 to-purple-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-gradient-to-br from-yellow-700 via-yellow-400 to-yellow-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';
|
default: return 'border-gray-500 shadow-gray-500/50';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ export default function EidolonsInfo() {
|
|||||||
return (
|
return (
|
||||||
<div className="bg-base-100 rounded-xl p-6 shadow-lg">
|
<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">
|
<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")}
|
{transI18n("eidolons")}
|
||||||
</h2>
|
</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">
|
<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">
|
<div className="flex flex-col justify-center items-start">
|
||||||
<h1 className="text-xl font-bold">
|
<h1 className="text-xl font-bold">
|
||||||
<span className="text-emerald-500">Firefly Sr</span>
|
<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
|
Tools
|
||||||
</span>
|
</span>
|
||||||
</h1>
|
</h1>
|
||||||
@@ -557,7 +557,7 @@ export default function Header() {
|
|||||||
|
|
||||||
{/* GitHub Link */}
|
{/* GitHub Link */}
|
||||||
<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"}
|
href={"https://github.com/AzenKain/Firefly-Srtools"}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
@@ -583,7 +583,7 @@ export default function Header() {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="border-b border-purple-500/30 px-6 py-4 mb-4">
|
<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}
|
{title}
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import useUserDataStore from "@/stores/userDataStore";
|
|||||||
import { CharacterInfoCardType } from "@/types";
|
import { CharacterInfoCardType } from "@/types";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import CharacterInfoCard from "../card/characterInfoCard";
|
import CharacterInfoCard from "../card/characterInfoCard";
|
||||||
import { freeSRJsonSchema } from "@/zod";
|
import { freeSrJsonSchema } from "@/zod";
|
||||||
import { toast } from "react-toastify";
|
import { toast } from "react-toastify";
|
||||||
import { converterOneFreeSRDataToAvatarStore } from "@/helper";
|
import { converterOneFreeSRDataToAvatarStore } from "@/helper";
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
@@ -80,7 +80,7 @@ export default function FreeSRImport() {
|
|||||||
reader.onload = (e) => {
|
reader.onload = (e) => {
|
||||||
try {
|
try {
|
||||||
const data = JSON.parse(e.target?.result as string);
|
const data = JSON.parse(e.target?.result as string);
|
||||||
const parsed = freeSRJsonSchema.parse(data)
|
const parsed = freeSrJsonSchema.parse(data)
|
||||||
setFreeSRData(parsed)
|
setFreeSRData(parsed)
|
||||||
setError("")
|
setError("")
|
||||||
|
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export default function LightconeBar() {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className="border-b border-purple-500/30 px-6 py-4 mb-4">
|
<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")}
|
{transI18n("lightConeSetting")}
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -240,7 +240,7 @@ export default function RelicMaker() {
|
|||||||
return (
|
return (
|
||||||
<div className="">
|
<div className="">
|
||||||
<div className="border-b border-purple-500/30 px-6 py-4 mb-4">
|
<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")}
|
{transI18n("relicMaker")}
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ export default function RelicsInfo() {
|
|||||||
<div className="lg:col-span-2">
|
<div className="lg:col-span-2">
|
||||||
<div className="bg-base-100 rounded-xl p-6 shadow-lg">
|
<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">
|
<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")}
|
{transI18n("relics")}
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
@@ -280,7 +280,7 @@ export default function RelicsInfo() {
|
|||||||
{/* Set Effects Panel */}
|
{/* Set Effects Panel */}
|
||||||
<div className="bg-base-100 rounded-xl p-6 shadow-lg">
|
<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">
|
<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")}
|
{transI18n("setEffects")}
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
@@ -353,7 +353,7 @@ export default function RelicsInfo() {
|
|||||||
|
|
||||||
{title && (
|
{title && (
|
||||||
<div className="border-b border-purple-500/30 px-6 py-4 mb-4">
|
<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}
|
{title}
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ export default function RelicShowcase({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<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 */}
|
{/* Subtle glow overlay */}
|
||||||
<div className="absolute inset-0 rounded-s-lg pointer-events-none"></div>
|
<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="grid grid-cols-1 md:grid-cols-2 gap-2">
|
||||||
<div className="rounded-xl p-6 shadow-lg">
|
<div className="rounded-xl p-6 shadow-lg">
|
||||||
<h2 className="flex items-center gap-2 text-2xl font-bold mb-6 text-base-content">
|
<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")}
|
{transI18n("skills")}
|
||||||
</h2>
|
</h2>
|
||||||
<div className="flex flex-col items-center">
|
<div className="flex flex-col items-center">
|
||||||
@@ -271,7 +271,7 @@ export default function SkillsInfo() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="bg-base-100 rounded-xl p-6 shadow-lg">
|
<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">
|
<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")}
|
{transI18n("details")}
|
||||||
</h2>
|
</h2>
|
||||||
{skillSelected && avatarInfo?.SkillTrees && avatarData && (
|
{skillSelected && avatarInfo?.SkillTrees && avatarData && (
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { SendDataThroughProxy, SendDataToServer } from "@/lib/api/api"
|
|||||||
import useConnectStore from "@/stores/connectStore"
|
import useConnectStore from "@/stores/connectStore"
|
||||||
import useUserDataStore from "@/stores/userDataStore"
|
import useUserDataStore from "@/stores/userDataStore"
|
||||||
import { converterToFreeSRJson } from "./converterToFreeSRJson"
|
import { converterToFreeSRJson } from "./converterToFreeSRJson"
|
||||||
import { pSResponseSchema } from "@/zod"
|
import { psResponseSchema } from "@/zod"
|
||||||
import useGlobalStore from "@/stores/globalStore"
|
import useGlobalStore from "@/stores/globalStore"
|
||||||
|
|
||||||
export const connectToPS = async (): Promise<{ success: boolean, message: string }> => {
|
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) {
|
} else if (response.error) {
|
||||||
return { success: false, message: response.error }
|
return { success: false, message: response.error }
|
||||||
} else {
|
} else {
|
||||||
const parsed = pSResponseSchema.safeParse(response.data)
|
const parsed = psResponseSchema.safeParse(response.data)
|
||||||
if (!parsed.success) {
|
if (!parsed.success) {
|
||||||
return { success: false, message: "Invalid response schema" }
|
return { success: false, message: "Invalid response schema" }
|
||||||
}
|
}
|
||||||
@@ -78,7 +78,7 @@ export const syncDataToPS = async (): Promise<{ success: boolean, message: strin
|
|||||||
} else if (response.error) {
|
} else if (response.error) {
|
||||||
return { success: false, message: response.error }
|
return { success: false, message: response.error }
|
||||||
} else {
|
} else {
|
||||||
const parsed = pSResponseSchema.safeParse(response.data)
|
const parsed = psResponseSchema.safeParse(response.data)
|
||||||
if (!parsed.success) {
|
if (!parsed.success) {
|
||||||
return { success: false, message: "Invalid response schema" }
|
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 { AffixDetail, ASDetail, CharacterDetail, ConfigMaze, FreeSRJson, LightConeDetail, MocDetail, MonsterDetail, PeakDetail, PFDetail, PSResponse, RelicDetail } from "@/types";
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import { pSResponseSchema } from "@/zod";
|
import { psResponseSchema } from "@/zod";
|
||||||
import { ExtraData } from "@/types";
|
import { ExtraData } from "@/types";
|
||||||
|
|
||||||
export async function getConfigMazeApi(): Promise<ConfigMaze> {
|
export async function getConfigMazeApi(): Promise<ConfigMaze> {
|
||||||
@@ -246,7 +246,7 @@ export async function SendDataToServer(
|
|||||||
): Promise<PSResponse | string> {
|
): Promise<PSResponse | string> {
|
||||||
try {
|
try {
|
||||||
const response = await axios.post(`${serverUrl}`, { username, password, data, extra_data: extraData })
|
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) {
|
if (!parsed.success) {
|
||||||
return "Invalid response schema";
|
return "Invalid response schema";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { BuffDetail, OptionDetail } from "./pfDetail"
|
|||||||
export interface ASDetail {
|
export interface ASDetail {
|
||||||
Id: number
|
Id: number
|
||||||
Name: string
|
Name: string
|
||||||
Buff: BuffDetail
|
Buff?: BuffDetail
|
||||||
BuffList1: OptionDetail[]
|
BuffList1: OptionDetail[]
|
||||||
BuffList2: OptionDetail[]
|
BuffList2: OptionDetail[]
|
||||||
BeginTime: string
|
BeginTime: string
|
||||||
@@ -43,7 +43,7 @@ export interface BossTag {
|
|||||||
Name: string
|
Name: string
|
||||||
Desc: string
|
Desc: string
|
||||||
Param: number[]
|
Param: number[]
|
||||||
SkillID: number | null
|
SkillID?: number | null
|
||||||
ParamFix: number[]
|
ParamFix: number[]
|
||||||
Child: BossChildTag[]
|
Child: BossChildTag[]
|
||||||
}
|
}
|
||||||
@@ -57,7 +57,7 @@ export interface BossChildTag {
|
|||||||
export interface BossDifficultyGuide {
|
export interface BossDifficultyGuide {
|
||||||
Desc: string
|
Desc: string
|
||||||
Param: number[]
|
Param: number[]
|
||||||
SkillID: number | null
|
SkillID?: number | null
|
||||||
ParamFix: number[]
|
ParamFix: number[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,6 @@ export interface CharacterInfoCardType {
|
|||||||
export interface AvatarProfileCardType {
|
export interface AvatarProfileCardType {
|
||||||
key: number;
|
key: number;
|
||||||
profile_name: string,
|
profile_name: string,
|
||||||
lightcone: LightconeStore | null,
|
lightcone?: LightconeStore | null,
|
||||||
relics: Record<string, RelicStore>
|
relics: Record<string, RelicStore>
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
||||||
export interface CharacterDetail {
|
export interface CharacterDetail {
|
||||||
Name: string;
|
Name: string;
|
||||||
Desc: string;
|
Desc: string;
|
||||||
@@ -21,8 +21,8 @@ export interface CharacterDetail {
|
|||||||
|
|
||||||
export interface EnhancedType {
|
export interface EnhancedType {
|
||||||
Descs: string[];
|
Descs: string[];
|
||||||
ChangeRankList: any;
|
ChangeRankList: unknown;
|
||||||
ChangeSkillTreeList: any;
|
ChangeSkillTreeList: unknown;
|
||||||
Ranks: Record<string, RankType>;
|
Ranks: Record<string, RankType>;
|
||||||
Skills: Record<string, SkillType>;
|
Skills: Record<string, SkillType>;
|
||||||
SkillTrees: Record<string, Record<string, SkillTreePoint>>;
|
SkillTrees: Record<string, Record<string, SkillTreePoint>>;
|
||||||
@@ -113,7 +113,7 @@ export interface Memosprite {
|
|||||||
SpeedSkill: number;
|
SpeedSkill: number;
|
||||||
Aggro: number;
|
Aggro: number;
|
||||||
Skills: Record<string, SpriteSkill>;
|
Skills: Record<string, SpriteSkill>;
|
||||||
Talent: Record<string, any>;
|
Talent: Record<string, unknown>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SpriteSkill {
|
export interface SpriteSkill {
|
||||||
|
|||||||
@@ -6,10 +6,6 @@ interface PrivacySettingInfo {
|
|||||||
displayDiary: boolean
|
displayDiary: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ChallengeInfo {
|
|
||||||
// Thêm các field cụ thể nếu có
|
|
||||||
}
|
|
||||||
|
|
||||||
interface RecordInfo {
|
interface RecordInfo {
|
||||||
achievementCount: number
|
achievementCount: number
|
||||||
bookCount: number
|
bookCount: number
|
||||||
@@ -17,7 +13,7 @@ interface RecordInfo {
|
|||||||
equipmentCount: number
|
equipmentCount: number
|
||||||
musicCount: number
|
musicCount: number
|
||||||
relicCount: number
|
relicCount: number
|
||||||
challengeInfo: ChallengeInfo
|
challengeInfo: unknown;
|
||||||
maxRogueChallengeScore: number
|
maxRogueChallengeScore: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -21,3 +21,4 @@ export * from "./peakDetail"
|
|||||||
export * from "./monsterDetail"
|
export * from "./monsterDetail"
|
||||||
export * from "./extraData"
|
export * from "./extraData"
|
||||||
export * from "./showcase"
|
export * from "./showcase"
|
||||||
|
export * from "./srtools"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
export type AvatarDataStore = {
|
export type AvatarDataStore = {
|
||||||
rank: number,
|
rank: number,
|
||||||
skills: { [key: string]: number }
|
skills: Record<string, number>
|
||||||
}
|
}
|
||||||
export type LightconeStore = {
|
export type LightconeStore = {
|
||||||
level: number;
|
level: number;
|
||||||
@@ -118,4 +118,5 @@ export interface Mics {
|
|||||||
pf_config: PFConfigStore;
|
pf_config: PFConfigStore;
|
||||||
as_config: ASConfigStore;
|
as_config: ASConfigStore;
|
||||||
ce_config: CEConfigStore;
|
ce_config: CEConfigStore;
|
||||||
|
peak_config: PEAKConfigStore
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
||||||
export interface MocDetail {
|
export interface MocDetail {
|
||||||
Id: number
|
Id: number
|
||||||
Name: string
|
Name: string
|
||||||
@@ -21,7 +20,7 @@ export interface MocDetail {
|
|||||||
|
|
||||||
export interface ChallengeDetail {
|
export interface ChallengeDetail {
|
||||||
Name: string
|
Name: string
|
||||||
Param?: number
|
Param?: number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface EventStageDetail {
|
export interface EventStageDetail {
|
||||||
@@ -32,17 +31,17 @@ export interface EventStageDetail {
|
|||||||
Level: number
|
Level: number
|
||||||
EliteGroup?: number
|
EliteGroup?: number
|
||||||
LevelGraphPath: string
|
LevelGraphPath: string
|
||||||
StageAbilityConfig: any[]
|
StageAbilityConfig: unknown[]
|
||||||
BattleScoringGroup?: number
|
BattleScoringGroup?: number | null
|
||||||
SubLevelGraphs: any[]
|
SubLevelGraphs: unknown[]
|
||||||
StageConfigData: StageConfig[]
|
StageConfigData: StageConfig[]
|
||||||
MonsterList: Record<string, number>[]
|
MonsterList: Record<string, number>[]
|
||||||
LevelLoseCondition: string[]
|
LevelLoseCondition: string[]
|
||||||
LevelWinCondition: string[]
|
LevelWinCondition: string[]
|
||||||
Release: boolean
|
Release: boolean
|
||||||
ForbidExitBattle: boolean
|
ForbidExitBattle: boolean
|
||||||
MonsterWarningRatio?: number
|
MonsterWarningRatio?: number | null
|
||||||
TrialAvatarList: any[]
|
TrialAvatarList: unknown[]
|
||||||
}
|
}
|
||||||
export interface StageConfig {
|
export interface StageConfig {
|
||||||
$type: string
|
$type: string
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ export interface PFDetail {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export interface BuffDetail {
|
export interface BuffDetail {
|
||||||
Name: string | null
|
Name?: string | null
|
||||||
Desc: string | null
|
Desc?: string | null
|
||||||
Param: number[]
|
Param: number[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ export interface LightconeJson {
|
|||||||
}
|
}
|
||||||
export interface AvatarData {
|
export interface AvatarData {
|
||||||
rank: number,
|
rank: number,
|
||||||
skills: { [key: string]: number }
|
skills: Record<string, number>
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AvatarJson {
|
export interface AvatarJson {
|
||||||
@@ -75,7 +75,7 @@ export interface FreeSRJson {
|
|||||||
key?: string;
|
key?: string;
|
||||||
lightcones: LightconeJson[];
|
lightcones: LightconeJson[];
|
||||||
relics: RelicJson[];
|
relics: RelicJson[];
|
||||||
avatars: { [key: string]: AvatarJson };
|
avatars: Record<string, AvatarJson>;
|
||||||
battle_config: BattleConfigJson;
|
battle_config: BattleConfigJson;
|
||||||
loadout?: LoadoutJson[];
|
loadout?: LoadoutJson[];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,8 +2,8 @@
|
|||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
export const affixDetailSchema = z.object({
|
export const affixDetailSchema = z.object({
|
||||||
property: z.string(),
|
property: z.string(),
|
||||||
base: z.number(),
|
base: z.number(),
|
||||||
step: z.number(),
|
step: z.number(),
|
||||||
step_num: z.number(),
|
step_num: z.number()
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,24 +2,24 @@
|
|||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
export const bossDifficultyGuideSchema = z.object({
|
export const bossDifficultyGuideSchema = z.object({
|
||||||
Desc: z.string(),
|
Desc: z.string(),
|
||||||
Param: z.array(z.number()),
|
Param: z.array(z.number()),
|
||||||
SkillID: z.number().nullable(),
|
SkillID: z.number().optional().nullable(),
|
||||||
ParamFix: z.array(z.number()),
|
ParamFix: z.array(z.number())
|
||||||
});
|
});
|
||||||
|
|
||||||
export const bossPhaseSchema = z.object({
|
export const bossPhaseSchema = z.object({
|
||||||
Name: z.string(),
|
Name: z.string(),
|
||||||
Desc: z.string(),
|
Desc: z.string(),
|
||||||
Answer: z.string(),
|
Answer: z.string(),
|
||||||
Difficulty: z.number(),
|
Difficulty: z.number(),
|
||||||
SkillList: z.array(z.number()),
|
SkillList: z.array(z.number())
|
||||||
});
|
});
|
||||||
|
|
||||||
export const bossChildTagSchema = z.object({
|
export const bossChildTagSchema = z.object({
|
||||||
Name: z.string(),
|
Name: z.string(),
|
||||||
Desc: z.string(),
|
Desc: z.string(),
|
||||||
Param: z.array(z.number()),
|
Param: z.array(z.number())
|
||||||
});
|
});
|
||||||
|
|
||||||
const buffDetailSchema = z.any();
|
const buffDetailSchema = z.any();
|
||||||
@@ -31,48 +31,48 @@ const challengeDetailSchema = z.any();
|
|||||||
const eventStageDetailSchema = z.any();
|
const eventStageDetailSchema = z.any();
|
||||||
|
|
||||||
export const bossTagSchema = z.object({
|
export const bossTagSchema = z.object({
|
||||||
Name: z.string(),
|
Name: z.string(),
|
||||||
Desc: z.string(),
|
Desc: z.string(),
|
||||||
Param: z.array(z.number()),
|
Param: z.array(z.number()),
|
||||||
SkillID: z.number().nullable(),
|
SkillID: z.number().optional().nullable(),
|
||||||
ParamFix: z.array(z.number()),
|
ParamFix: z.array(z.number()),
|
||||||
Child: z.array(bossChildTagSchema),
|
Child: z.array(bossChildTagSchema)
|
||||||
});
|
});
|
||||||
|
|
||||||
export const bossMonsterConfigSchema = z.object({
|
export const bossMonsterConfigSchema = z.object({
|
||||||
Difficulty: z.number(),
|
Difficulty: z.number(),
|
||||||
DifficultyList: z.array(z.number()),
|
DifficultyList: z.array(z.number()),
|
||||||
TagList: z.array(bossTagSchema),
|
TagList: z.array(bossTagSchema),
|
||||||
DifficultyGuideList: z.array(bossDifficultyGuideSchema),
|
DifficultyGuideList: z.array(bossDifficultyGuideSchema),
|
||||||
TextGuideList: z.array(z.string()),
|
TextGuideList: z.array(z.string()),
|
||||||
PhaseList: z.array(bossPhaseSchema),
|
PhaseList: z.array(bossPhaseSchema)
|
||||||
});
|
});
|
||||||
|
|
||||||
export const aSLevelSchema = z.object({
|
export const asLevelSchema = z.object({
|
||||||
Id: z.number(),
|
Id: z.number(),
|
||||||
Name: z.string(),
|
Name: z.string(),
|
||||||
Challenge: z.array(challengeDetailSchema),
|
Challenge: z.array(challengeDetailSchema),
|
||||||
DamageType1: z.array(z.string()),
|
DamageType1: z.array(z.string()),
|
||||||
DamageType2: z.array(z.string()),
|
DamageType2: z.array(z.string()),
|
||||||
MazeGroupID1: z.number(),
|
MazeGroupID1: z.number(),
|
||||||
MazeGroupID2: z.number(),
|
MazeGroupID2: z.number(),
|
||||||
BossMonsterID1: z.number(),
|
BossMonsterID1: z.number(),
|
||||||
BossMonsterID2: z.number(),
|
BossMonsterID2: z.number(),
|
||||||
BossMonsterID1SkillList: z.array(z.number()),
|
BossMonsterID1SkillList: z.array(z.number()),
|
||||||
BossMonsterID2SkillList: z.array(z.number()),
|
BossMonsterID2SkillList: z.array(z.number()),
|
||||||
BossMonsterConfig1: bossMonsterConfigSchema,
|
BossMonsterConfig1: bossMonsterConfigSchema,
|
||||||
BossMonsterConfig2: bossMonsterConfigSchema,
|
BossMonsterConfig2: bossMonsterConfigSchema,
|
||||||
EventIDList1: z.array(eventStageDetailSchema),
|
EventIDList1: z.array(eventStageDetailSchema),
|
||||||
EventIDList2: z.array(eventStageDetailSchema),
|
EventIDList2: z.array(eventStageDetailSchema)
|
||||||
});
|
});
|
||||||
|
|
||||||
export const aSDetailSchema = z.object({
|
export const asDetailSchema = z.object({
|
||||||
Id: z.number(),
|
Id: z.number(),
|
||||||
Name: z.string(),
|
Name: z.string(),
|
||||||
Buff: buffDetailSchema,
|
Buff: buffDetailSchema.optional(),
|
||||||
BuffList1: z.array(optionDetailSchema),
|
BuffList1: z.array(optionDetailSchema),
|
||||||
BuffList2: z.array(optionDetailSchema),
|
BuffList2: z.array(optionDetailSchema),
|
||||||
BeginTime: z.string(),
|
BeginTime: z.string(),
|
||||||
EndTime: z.string(),
|
EndTime: z.string(),
|
||||||
Level: z.array(aSLevelSchema),
|
Level: z.array(asLevelSchema)
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,22 +2,20 @@
|
|||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
export const characterInfoCardTypeSchema = z.object({
|
export const characterInfoCardTypeSchema = z.object({
|
||||||
key: z.number(),
|
key: z.number(),
|
||||||
avatar_id: z.number(),
|
avatar_id: z.number(),
|
||||||
rank: z.number(),
|
|
||||||
level: z.number(),
|
|
||||||
lightcone: z.object({
|
|
||||||
level: z.number(),
|
|
||||||
rank: z.number(),
|
rank: z.number(),
|
||||||
item_id: z.number(),
|
level: z.number(),
|
||||||
}),
|
lightcone: z.object({
|
||||||
relics: z.array(
|
level: z.number(),
|
||||||
z.object({
|
rank: z.number(),
|
||||||
level: z.number(),
|
item_id: z.number()
|
||||||
relic_id: z.number(),
|
|
||||||
relic_set_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 lightconeStoreSchema = z.any();
|
||||||
@@ -25,8 +23,8 @@ const lightconeStoreSchema = z.any();
|
|||||||
const relicStoreSchema = z.any();
|
const relicStoreSchema = z.any();
|
||||||
|
|
||||||
export const avatarProfileCardTypeSchema = z.object({
|
export const avatarProfileCardTypeSchema = z.object({
|
||||||
key: z.number(),
|
key: z.number(),
|
||||||
profile_name: z.string(),
|
profile_name: z.string(),
|
||||||
lightcone: lightconeStoreSchema.nullable(),
|
lightcone: lightconeStoreSchema.optional().nullable(),
|
||||||
relics: z.record(relicStoreSchema),
|
relics: z.record(z.string(), relicStoreSchema)
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
export const characterBasicRawSchema = z.object({
|
export const characterBasicRawSchema = z.object({
|
||||||
release: z.number(),
|
release: z.number(),
|
||||||
icon: z.string(),
|
icon: z.string(),
|
||||||
rank: z.string(),
|
rank: z.string(),
|
||||||
baseType: z.string(),
|
baseType: z.string(),
|
||||||
damageType: z.string(),
|
damageType: z.string(),
|
||||||
en: z.string(),
|
en: z.string(),
|
||||||
desc: z.string(),
|
desc: z.string(),
|
||||||
kr: z.string(),
|
kr: z.string(),
|
||||||
cn: z.string(),
|
cn: z.string(),
|
||||||
jp: z.string(),
|
jp: z.string()
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,162 +2,180 @@
|
|||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
export const rankTypeSchema = z.object({
|
export const rankTypeSchema = z.object({
|
||||||
Id: z.number(),
|
Id: z.number(),
|
||||||
Name: z.string(),
|
Name: z.string(),
|
||||||
Desc: z.string(),
|
Desc: z.string(),
|
||||||
ParamList: z.array(z.number()),
|
ParamList: z.array(z.number())
|
||||||
});
|
|
||||||
|
|
||||||
export const uniqueAbilitySchema = z.object({
|
|
||||||
Tag: z.string(),
|
|
||||||
Name: z.string(),
|
|
||||||
Desc: z.string(),
|
|
||||||
Param: z.array(z.number()),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export const voiceActorsSchema = z.object({
|
export const voiceActorsSchema = z.object({
|
||||||
Chinese: z.string().nullable(),
|
Chinese: z.string().nullable(),
|
||||||
Japanese: z.string().nullable(),
|
Japanese: z.string().nullable(),
|
||||||
Korean: z.string().nullable(),
|
Korean: z.string().nullable(),
|
||||||
English: z.string().nullable(),
|
English: z.string().nullable()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const levelParamsSchema = z.object({
|
export const levelParamsSchema = z.object({
|
||||||
Level: z.number(),
|
Level: z.number(),
|
||||||
ParamList: z.array(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({
|
export const itemConfigRowSchema = z.object({
|
||||||
$type: z.string(),
|
$type: z.string(),
|
||||||
ItemID: z.number(),
|
ItemID: z.number(),
|
||||||
ItemNum: z.number(),
|
ItemNum: z.number(),
|
||||||
Rarity: z.string(),
|
Rarity: z.string()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const spriteSkillSchema = z.object({
|
export const extraSchema = z.object({
|
||||||
Name: z.string(),
|
name: z.string(),
|
||||||
Desc: z.string().nullable(),
|
desc: z.string(),
|
||||||
Type: z.string().nullable(),
|
param: z.array(z.number())
|
||||||
Tag: z.string(),
|
});
|
||||||
SPBase: z.number().nullable(),
|
|
||||||
BPNeed: z.number(),
|
export const uniqueAbilitySchema = z.object({
|
||||||
BPAdd: z.number().nullable(),
|
Tag: z.string(),
|
||||||
ShowStanceList: z.array(z.number()),
|
Name: z.string(),
|
||||||
SkillComboValueDelta: z.number().nullable(),
|
Desc: z.string(),
|
||||||
Level: z.record(levelParamsSchema),
|
Param: z.array(z.number()),
|
||||||
|
Extra: z.record(z.string(), extraSchema)
|
||||||
});
|
});
|
||||||
|
|
||||||
export const statSchema = z.object({
|
export const statSchema = z.object({
|
||||||
AttackBase: z.number(),
|
AttackBase: z.number(),
|
||||||
AttackAdd: z.number(),
|
AttackAdd: z.number(),
|
||||||
DefenceBase: z.number(),
|
DefenceBase: z.number(),
|
||||||
DefenceAdd: z.number(),
|
DefenceAdd: z.number(),
|
||||||
HPBase: z.number(),
|
HPBase: z.number(),
|
||||||
HPAdd: z.number(),
|
HPAdd: z.number(),
|
||||||
SpeedBase: z.number(),
|
SpeedBase: z.number(),
|
||||||
CriticalChance: z.number(),
|
CriticalChance: z.number(),
|
||||||
CriticalDamage: z.number(),
|
CriticalDamage: z.number(),
|
||||||
BaseAggro: z.number(),
|
BaseAggro: z.number(),
|
||||||
Cost: z.array(itemConfigRowSchema),
|
Cost: z.array(itemConfigRowSchema)
|
||||||
});
|
});
|
||||||
|
|
||||||
export const relicRecommendPropertySchema = z.object({
|
export const relicRecommendPropertySchema = z.object({
|
||||||
$type: z.string(),
|
$type: z.string(),
|
||||||
RelicType: z.string(),
|
RelicType: z.string(),
|
||||||
PropertyType: z.string(),
|
PropertyType: z.string()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const characterInfoSchema = z.object({
|
export const characterInfoSchema = z.object({
|
||||||
Camp: z.string().nullable(),
|
Camp: z.string().nullable(),
|
||||||
VA: voiceActorsSchema,
|
VA: voiceActorsSchema,
|
||||||
Stories: z.record(z.string().nullable()),
|
Stories: z.record(z.string(), z.string().nullable()),
|
||||||
Voicelines: z.array(z.string()),
|
Voicelines: z.array(z.string())
|
||||||
});
|
});
|
||||||
|
|
||||||
export const skillTypeSchema = z.object({
|
export const skillTypeSchema = z.object({
|
||||||
Id: z.number(),
|
Id: z.number(),
|
||||||
Name: z.string(),
|
Name: z.string(),
|
||||||
Desc: z.string(),
|
Desc: z.string().nullable(),
|
||||||
Type: z.string(),
|
SimpleDesc: z.string(),
|
||||||
Tag: z.string(),
|
Type: z.string(),
|
||||||
SPBase: z.number().nullable(),
|
Tag: z.string(),
|
||||||
BPNeed: z.number(),
|
SPBase: z.number().nullable(),
|
||||||
BPAdd: z.number(),
|
BPNeed: z.number(),
|
||||||
ShowStanceList: z.array(z.number()),
|
BPAdd: z.number(),
|
||||||
SkillComboValueDelta: z.number().nullable(),
|
ShowStanceList: z.array(z.number()),
|
||||||
Level: z.record(levelParamsSchema),
|
SkillComboValueDelta: z.number().nullable(),
|
||||||
|
Level: z.record(z.string(), levelParamsSchema)
|
||||||
});
|
});
|
||||||
|
|
||||||
export const skillTreePointSchema = z.object({
|
export const skillTreePointSchema = z.object({
|
||||||
Anchor: z.string(),
|
Anchor: z.string(),
|
||||||
AvatarPromotionLimit: z.number().nullable(),
|
AvatarPromotionLimit: z.number().nullable(),
|
||||||
AvatarLevelLimit: z.number().nullable(),
|
AvatarLevelLimit: z.number().nullable(),
|
||||||
DefaultUnlock: z.boolean(),
|
DefaultUnlock: z.boolean(),
|
||||||
Icon: z.string(),
|
Icon: z.string(),
|
||||||
LevelUpSkillID: z.array(z.number()),
|
LevelUpSkillID: z.array(z.number()),
|
||||||
MaterialList: z.array(itemConfigRowSchema),
|
MaterialList: z.array(itemConfigRowSchema),
|
||||||
MaxLevel: z.number(),
|
MaxLevel: z.number(),
|
||||||
ParamList: z.array(z.any()),
|
ParamList: z.array(z.number()),
|
||||||
PointID: z.number(),
|
PointID: z.number(),
|
||||||
PointName: z.string().nullable(),
|
PointName: z.string().nullable(),
|
||||||
PointDesc: z.string().nullable(),
|
PointDesc: z.string().nullable(),
|
||||||
PointTriggerKey: z.number(),
|
PointTriggerKey: z.number(),
|
||||||
PointType: z.number(),
|
PointType: z.number(),
|
||||||
PrePoint: z.array(z.string()),
|
PrePoint: z.array(z.string()),
|
||||||
StatusAddList: z.array(z.any()),
|
StatusAddList: z.array(statusAddTypeSchema)
|
||||||
});
|
|
||||||
|
|
||||||
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()),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export const relicsSchema = z.object({
|
export const relicsSchema = z.object({
|
||||||
AvatarID: z.number(),
|
AvatarID: z.number(),
|
||||||
Set4IDList: z.array(z.number()),
|
Set4IDList: z.array(z.number()),
|
||||||
Set2IDList: z.array(z.number()),
|
Set2IDList: z.array(z.number()),
|
||||||
PropertyList3: z.array(z.string()),
|
PropertyList3: z.array(z.string()),
|
||||||
PropertyList4: z.array(z.string()),
|
PropertyList4: z.array(z.string()),
|
||||||
PropertyList5: z.array(z.string()),
|
PropertyList5: z.array(z.string()),
|
||||||
PropertyList6: z.array(z.string()),
|
PropertyList6: z.array(z.string()),
|
||||||
PropertyList: z.array(relicRecommendPropertySchema),
|
PropertyList: z.array(relicRecommendPropertySchema),
|
||||||
SubAffixPropertyList: z.array(z.string()),
|
SubAffixPropertyList: z.array(z.string()),
|
||||||
ScoreRankList: z.array(z.number()),
|
ScoreRankList: z.array(z.number())
|
||||||
});
|
});
|
||||||
|
|
||||||
export const enhancedTypeSchema = z.object({
|
export const enhancedTypeSchema = z.object({
|
||||||
Descs: z.array(z.string()),
|
Descs: z.array(z.string()),
|
||||||
ChangeRankList: z.any(),
|
ChangeRankList: z.unknown(),
|
||||||
ChangeSkillTreeList: z.any(),
|
ChangeSkillTreeList: z.unknown(),
|
||||||
Ranks: z.record(rankTypeSchema),
|
Ranks: z.record(z.string(), rankTypeSchema),
|
||||||
Skills: z.record(skillTypeSchema),
|
Skills: z.record(z.string(), skillTypeSchema),
|
||||||
SkillTrees: z.record(z.record(skillTreePointSchema)),
|
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({
|
export const characterDetailSchema = z.object({
|
||||||
Name: z.string(),
|
Name: z.string(),
|
||||||
Desc: z.string(),
|
Desc: z.string(),
|
||||||
CharaInfo: characterInfoSchema,
|
CharaInfo: characterInfoSchema,
|
||||||
Rarity: z.string(),
|
Rarity: z.string(),
|
||||||
AvatarVOTag: z.string(),
|
AvatarVOTag: z.string(),
|
||||||
SPNeed: z.number().nullable(),
|
SPNeed: z.number().nullable(),
|
||||||
BaseType: z.string(),
|
BaseType: z.string(),
|
||||||
DamageType: z.string(),
|
DamageType: z.string(),
|
||||||
Ranks: z.record(rankTypeSchema),
|
Ranks: z.record(z.string(), rankTypeSchema),
|
||||||
Skills: z.record(skillTypeSchema),
|
Skills: z.record(z.string(), skillTypeSchema),
|
||||||
SkillTrees: z.record(z.record(skillTreePointSchema)),
|
SkillTrees: z.record(z.string(), z.record(z.string(), skillTreePointSchema)),
|
||||||
Memosprite: memospriteSchema,
|
Memosprite: memospriteSchema,
|
||||||
Unique: z.record(uniqueAbilitySchema),
|
Unique: z.record(z.string(), uniqueAbilitySchema),
|
||||||
Stats: z.record(statSchema),
|
Stats: z.record(z.string(), statSchema),
|
||||||
Relics: relicsSchema,
|
Relics: relicsSchema,
|
||||||
Enhanced: z.record(enhancedTypeSchema),
|
Enhanced: z.record(z.string(), enhancedTypeSchema),
|
||||||
|
RankIcon: z.array(z.string())
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,28 +1,36 @@
|
|||||||
// Generated by ts-to-zod
|
// Generated by ts-to-zod
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
export const aSConfigMazeSchema = z.object({
|
export const asConfigMazeSchema = z.object({
|
||||||
buff_1: z.array(z.number()),
|
buff_1: z.array(z.number()),
|
||||||
buff_2: z.array(z.number()),
|
buff_2: z.array(z.number()),
|
||||||
maze_buff: z.number(),
|
maze_buff: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const pFConfigMazeSchema = z.object({
|
export const pfConfigMazeSchema = z.object({
|
||||||
buff: z.array(z.number()),
|
buff: z.array(z.number()),
|
||||||
maze_buff: z.number(),
|
maze_buff: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const mOCConfigMazeSchema = z.object({
|
export const mocConfigMazeSchema = z.object({
|
||||||
maze_buff: z.number(),
|
maze_buff: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const avatarConfigMazeSchema = z.object({
|
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({
|
export const configMazeSchema = z.object({
|
||||||
Avatar: z.record(avatarConfigMazeSchema),
|
Avatar: z.record(z.string(), avatarConfigMazeSchema),
|
||||||
MOC: z.record(mOCConfigMazeSchema),
|
MOC: z.record(z.string(), mocConfigMazeSchema),
|
||||||
AS: z.record(aSConfigMazeSchema),
|
AS: z.record(z.string(), asConfigMazeSchema),
|
||||||
PF: z.record(pFConfigMazeSchema),
|
PF: z.record(z.string(), pfConfigMazeSchema),
|
||||||
|
Stage: z.record(z.string(), stageConfigMazeSchema)
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,99 +2,97 @@
|
|||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
const privacySettingInfoSchema = z.object({
|
const privacySettingInfoSchema = z.object({
|
||||||
displayCollection: z.boolean(),
|
displayCollection: z.boolean(),
|
||||||
displayRecord: z.boolean(),
|
displayRecord: z.boolean(),
|
||||||
displayRecordTeam: z.boolean(),
|
displayRecordTeam: z.boolean(),
|
||||||
displayOnlineStatus: z.boolean(),
|
displayOnlineStatus: z.boolean(),
|
||||||
displayDiary: z.boolean(),
|
displayDiary: z.boolean()
|
||||||
});
|
});
|
||||||
|
|
||||||
const challengeInfoSchema = z.object({});
|
|
||||||
|
|
||||||
const recordInfoSchema = z.object({
|
const recordInfoSchema = z.object({
|
||||||
achievementCount: z.number(),
|
achievementCount: z.number(),
|
||||||
bookCount: z.number(),
|
bookCount: z.number(),
|
||||||
avatarCount: z.number(),
|
avatarCount: z.number(),
|
||||||
equipmentCount: z.number(),
|
equipmentCount: z.number(),
|
||||||
musicCount: z.number(),
|
musicCount: z.number(),
|
||||||
relicCount: z.number(),
|
relicCount: z.number(),
|
||||||
challengeInfo: challengeInfoSchema,
|
challengeInfo: z.unknown(),
|
||||||
maxRogueChallengeScore: z.number(),
|
maxRogueChallengeScore: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
const subAffixSchema = z.object({
|
const subAffixSchema = z.object({
|
||||||
affixId: z.number(),
|
affixId: z.number(),
|
||||||
cnt: z.number(),
|
cnt: z.number(),
|
||||||
step: z.number().optional(),
|
step: z.number().optional()
|
||||||
});
|
});
|
||||||
|
|
||||||
const flatPropSchema = z.object({
|
const flatPropSchema = z.object({
|
||||||
type: z.string(),
|
type: z.string(),
|
||||||
value: z.number(),
|
value: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
const relicFlatSchema = z.object({
|
const relicFlatSchema = z.object({
|
||||||
props: z.array(flatPropSchema),
|
props: z.array(flatPropSchema),
|
||||||
setName: z.string(),
|
setName: z.string(),
|
||||||
setID: z.number(),
|
setID: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
const relicSchema = z.object({
|
const relicSchema = z.object({
|
||||||
mainAffixId: z.number(),
|
mainAffixId: z.number(),
|
||||||
subAffixList: z.array(subAffixSchema),
|
subAffixList: z.array(subAffixSchema),
|
||||||
tid: z.number(),
|
tid: z.number(),
|
||||||
type: z.number(),
|
type: z.number(),
|
||||||
level: z.number(),
|
level: z.number(),
|
||||||
_flat: relicFlatSchema,
|
_flat: relicFlatSchema
|
||||||
});
|
});
|
||||||
|
|
||||||
const skillTreeSchema = z.object({
|
const skillTreeSchema = z.object({
|
||||||
pointId: z.number(),
|
pointId: z.number(),
|
||||||
level: z.number(),
|
level: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
const equipmentFlatSchema = z.object({
|
const equipmentFlatSchema = z.object({
|
||||||
props: z.array(flatPropSchema),
|
props: z.array(flatPropSchema),
|
||||||
name: z.string(),
|
name: z.string()
|
||||||
});
|
});
|
||||||
|
|
||||||
const equipmentSchema = z.object({
|
const equipmentSchema = z.object({
|
||||||
rank: z.number(),
|
rank: z.number(),
|
||||||
tid: z.number(),
|
tid: z.number(),
|
||||||
promotion: z.number(),
|
promotion: z.number(),
|
||||||
level: z.number(),
|
level: z.number(),
|
||||||
_flat: equipmentFlatSchema,
|
_flat: equipmentFlatSchema
|
||||||
});
|
});
|
||||||
|
|
||||||
export const avatarEnkaDetailSchema = z.object({
|
export const avatarEnkaDetailSchema = z.object({
|
||||||
relicList: z.array(relicSchema),
|
relicList: z.array(relicSchema),
|
||||||
level: z.number(),
|
level: z.number(),
|
||||||
promotion: z.number(),
|
promotion: z.number(),
|
||||||
rank: z.number().optional(),
|
rank: z.number().optional(),
|
||||||
skillTreeList: z.array(skillTreeSchema),
|
skillTreeList: z.array(skillTreeSchema),
|
||||||
equipment: equipmentSchema,
|
equipment: equipmentSchema,
|
||||||
avatarId: z.number(),
|
avatarId: z.number(),
|
||||||
_assist: z.boolean().optional(),
|
_assist: z.boolean().optional()
|
||||||
});
|
});
|
||||||
|
|
||||||
const detailInfoSchema = z.object({
|
const detailInfoSchema = z.object({
|
||||||
worldLevel: z.number(),
|
worldLevel: z.number(),
|
||||||
privacySettingInfo: privacySettingInfoSchema,
|
privacySettingInfo: privacySettingInfoSchema,
|
||||||
headIcon: z.number(),
|
headIcon: z.number(),
|
||||||
signature: z.string(),
|
signature: z.string(),
|
||||||
avatarDetailList: z.array(avatarEnkaDetailSchema),
|
avatarDetailList: z.array(avatarEnkaDetailSchema),
|
||||||
platform: z.string(),
|
platform: z.string(),
|
||||||
recordInfo: recordInfoSchema,
|
recordInfo: recordInfoSchema,
|
||||||
uid: z.number(),
|
uid: z.number(),
|
||||||
level: z.number(),
|
level: z.number(),
|
||||||
nickname: z.string(),
|
nickname: z.string(),
|
||||||
isDisplayAvatar: z.boolean(),
|
isDisplayAvatar: z.boolean(),
|
||||||
friendCount: z.number(),
|
friendCount: z.number(),
|
||||||
personalCardId: z.number(),
|
personalCardId: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const enkaResponseSchema = z.object({
|
export const enkaResponseSchema = z.object({
|
||||||
detailInfo: detailInfoSchema,
|
detailInfo: detailInfoSchema,
|
||||||
ttl: z.number(),
|
ttl: z.number(),
|
||||||
uid: z.string(),
|
uid: z.string()
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
export const eventBasicRawSchema = z.object({
|
export const eventBasicRawSchema = z.object({
|
||||||
param: z.array(z.number()).optional(),
|
param: z.array(z.number()).optional(),
|
||||||
en: z.string(),
|
en: z.string(),
|
||||||
id: z.string(),
|
id: z.string(),
|
||||||
begin: z.string(),
|
begin: z.string(),
|
||||||
end: z.string(),
|
end: z.string(),
|
||||||
live_begin: z.string(),
|
live_begin: z.string(),
|
||||||
live_end: z.string(),
|
live_end: z.string(),
|
||||||
kr: z.string(),
|
kr: z.string(),
|
||||||
cn: z.string(),
|
cn: z.string(),
|
||||||
jp: z.string(),
|
jp: z.string()
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
|
// Generated by ts-to-zod
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
export const extraDataSchema = z.object({
|
export const extraDataSchema = z.object({
|
||||||
theory_craft: z.object({
|
theory_craft: z.object({
|
||||||
hp: z.record(z.string(), z.array(z.number())),
|
hp: z.record(z.string(), z.array(z.number())),
|
||||||
cycle_count: z.number(),
|
cycle_count: z.number(),
|
||||||
mode: z.boolean(),
|
mode: z.boolean()
|
||||||
}),
|
}),
|
||||||
setting: z.object({
|
setting: z.object({
|
||||||
censorship: z.boolean(),
|
censorship: z.boolean(),
|
||||||
cm: z.boolean(),
|
cm: z.boolean(),
|
||||||
first_person: z.boolean(),
|
first_person: z.boolean(),
|
||||||
hide_ui: z.boolean(),
|
hide_ui: z.boolean()
|
||||||
}),
|
})
|
||||||
});
|
});
|
||||||
@@ -2,29 +2,21 @@
|
|||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
export const filterAvatarTypeSchema = z.object({
|
export const filterAvatarTypeSchema = z.object({
|
||||||
name: z.string(),
|
name: z.string(),
|
||||||
path: z.array(z.string()),
|
path: z.array(z.string()),
|
||||||
element: z.array(z.string()),
|
element: z.array(z.string()),
|
||||||
rarity: z.array(z.string()),
|
rarity: z.array(z.string()),
|
||||||
locale: z.string(),
|
locale: z.string()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const filterLightconeTypeSchema = z.object({
|
export const filterLightconeTypeSchema = z.object({
|
||||||
path: z.array(z.string()),
|
path: z.array(z.string()),
|
||||||
rarity: z.array(z.string()),
|
rarity: z.array(z.string()),
|
||||||
locale: z.string(),
|
locale: z.string(),
|
||||||
name: z.string(),
|
name: z.string()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const filterRelicTypeSchema = z.object({
|
export const filterRelicTypeSchema = z.object({
|
||||||
locale: z.string(),
|
locale: z.string(),
|
||||||
name: 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()),
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,14 +1,25 @@
|
|||||||
export * from "./affix.zod";
|
export * from "./characterBasic.zod"
|
||||||
export * from "./card.zod";
|
export * from "./characterDetail.zod"
|
||||||
export * from "./characterBasic.zod";
|
export * from "./srtools.zod"
|
||||||
export * from "./characterDetail.zod";
|
export * from "./filter.zod"
|
||||||
export * from "./config_maze.zod";
|
export * from "./mics.zod"
|
||||||
export * from "./enka.zod";
|
export * from "./config_maze.zod"
|
||||||
export * from "./filter.zod";
|
export * from "./lightconeBasic.zod"
|
||||||
export * from "./lightconeBasic.zod";
|
export * from "./lightconeDetail.zod"
|
||||||
export * from "./lightconeDetail.zod";
|
export * from "./relicBasic.zod"
|
||||||
export * from "./mics.zod";
|
export * from "./relicDetail.zod"
|
||||||
export * from "./relicBasic.zod";
|
export * from "./affix.zod"
|
||||||
export * from "./relicDetail.zod";
|
export * from "./enka.zod"
|
||||||
export * from "./srtools.zod";
|
export * from "./card.zod"
|
||||||
export * from "./extraData.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
|
// Generated by ts-to-zod
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,11 @@
|
|||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
export const lightConeBasicRawSchema = z.object({
|
export const lightConeBasicRawSchema = z.object({
|
||||||
rank: z.string(),
|
rank: z.string(),
|
||||||
baseType: z.string(),
|
baseType: z.string(),
|
||||||
en: z.string(),
|
en: z.string(),
|
||||||
desc: z.string(),
|
desc: z.string(),
|
||||||
kr: z.string(),
|
kr: z.string(),
|
||||||
cn: z.string(),
|
cn: z.string(),
|
||||||
jp: z.string(),
|
jp: z.string()
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,42 +2,44 @@
|
|||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
const refinementDetailSchema = z.object({
|
const refinementDetailSchema = z.object({
|
||||||
Name: z.string(),
|
Name: z.string(),
|
||||||
Desc: z.string(),
|
Desc: z.string(),
|
||||||
Level: z.record(
|
Level: z.record(z.string(), z.object({
|
||||||
z.object({
|
ParamList: z.array(z.number())
|
||||||
ParamList: z.array(z.number()),
|
}))
|
||||||
}),
|
|
||||||
),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const promotionCostSchema = z.object({
|
const promotionCostSchema = z.object({
|
||||||
$type: z.string(),
|
$type: z.string(),
|
||||||
ItemID: z.number(),
|
ItemID: z.number(),
|
||||||
ItemNum: z.number(),
|
ItemNum: z.number(),
|
||||||
Rarity: z.string(),
|
Rarity: z.string()
|
||||||
});
|
});
|
||||||
|
|
||||||
const statEntryDetailSchema = z.object({
|
const statEntryDetailSchema = z.object({
|
||||||
EquipmentID: z.number(),
|
EquipmentID: z.number(),
|
||||||
Promotion: z.number().optional(),
|
Promotion: z.number().optional(),
|
||||||
PromotionCostList: z.array(promotionCostSchema),
|
PromotionCostList: z.array(promotionCostSchema),
|
||||||
PlayerLevelRequire: z.number().optional(),
|
PlayerLevelRequire: z.number().optional(),
|
||||||
WorldLevelRequire: z.number().optional(),
|
WorldLevelRequire: z.number().optional(),
|
||||||
MaxLevel: z.number(),
|
MaxLevel: z.number(),
|
||||||
BaseHP: z.number(),
|
BaseHP: z.number(),
|
||||||
BaseHPAdd: z.number(),
|
BaseHPAdd: z.number(),
|
||||||
BaseAttack: z.number(),
|
BaseAttack: z.number(),
|
||||||
BaseAttackAdd: z.number(),
|
BaseAttackAdd: z.number(),
|
||||||
BaseDefence: z.number(),
|
BaseDefence: z.number(),
|
||||||
BaseDefenceAdd: z.number(),
|
BaseDefenceAdd: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const lightConeDetailSchema = z.object({
|
export const lightConeDetailSchema = z.object({
|
||||||
Name: z.string(),
|
Name: z.string(),
|
||||||
Desc: z.string(),
|
Desc: z.string(),
|
||||||
Rarity: z.string(),
|
Rarity: z.string(),
|
||||||
BaseType: z.string(),
|
BaseType: z.string(),
|
||||||
Refinements: refinementDetailSchema,
|
Refinements: refinementDetailSchema,
|
||||||
Stats: z.array(statEntryDetailSchema),
|
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";
|
import { z } from "zod";
|
||||||
|
|
||||||
export const avatarDataStoreSchema = z.object({
|
export const avatarDataStoreSchema = z.object({
|
||||||
rank: z.number(),
|
rank: z.number(),
|
||||||
skills: z.record(z.number()),
|
skills: z.record(z.string(), z.number())
|
||||||
});
|
});
|
||||||
|
|
||||||
export const lightconeStoreSchema = z.object({
|
export const lightconeStoreSchema = z.object({
|
||||||
level: z.number(),
|
level: z.number(),
|
||||||
item_id: z.number(),
|
item_id: z.number(),
|
||||||
rank: z.number(),
|
rank: z.number(),
|
||||||
promotion: z.number(),
|
promotion: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const subAffixStoreSchema = z.object({
|
export const subAffixStoreSchema = z.object({
|
||||||
sub_affix_id: z.number(),
|
sub_affix_id: z.number(),
|
||||||
count: z.number(),
|
count: z.number(),
|
||||||
step: z.number(),
|
step: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const relicStoreSchema = z.object({
|
export const relicStoreSchema = z.object({
|
||||||
level: z.number(),
|
level: z.number(),
|
||||||
relic_id: z.number(),
|
relic_id: z.number(),
|
||||||
relic_set_id: z.number(),
|
relic_set_id: z.number(),
|
||||||
main_affix_id: z.number(),
|
main_affix_id: z.number(),
|
||||||
sub_affixes: z.array(subAffixStoreSchema),
|
sub_affixes: z.array(subAffixStoreSchema)
|
||||||
});
|
});
|
||||||
|
|
||||||
export const avatarProfileStoreSchema = z.object({
|
export const avatarProfileStoreSchema = z.object({
|
||||||
profile_name: z.string(),
|
profile_name: z.string(),
|
||||||
lightcone: lightconeStoreSchema.nullable(),
|
lightcone: lightconeStoreSchema.nullable(),
|
||||||
relics: z.record(relicStoreSchema),
|
relics: z.record(z.string(), relicStoreSchema)
|
||||||
});
|
});
|
||||||
|
|
||||||
export const avatarStoreSchema = z.object({
|
export const avatarStoreSchema = z.object({
|
||||||
owner_uid: z.number().optional(),
|
owner_uid: z.number().optional(),
|
||||||
avatar_id: z.number(),
|
avatar_id: z.number(),
|
||||||
data: avatarDataStoreSchema,
|
data: avatarDataStoreSchema,
|
||||||
level: z.number(),
|
level: z.number(),
|
||||||
promotion: z.number(),
|
promotion: z.number(),
|
||||||
techniques: z.array(z.number()),
|
techniques: z.array(z.number()),
|
||||||
sp_value: z.number(),
|
sp_value: z.number(),
|
||||||
sp_max: z.number(),
|
sp_max: z.number(),
|
||||||
can_change_sp: z.boolean(),
|
can_change_sp: z.boolean(),
|
||||||
enhanced: z.string(),
|
enhanced: z.string(),
|
||||||
profileSelect: z.number(),
|
profileSelect: z.number(),
|
||||||
profileList: z.array(avatarProfileStoreSchema),
|
profileList: z.array(avatarProfileStoreSchema)
|
||||||
});
|
});
|
||||||
|
|
||||||
export const monsterStoreSchema = z.object({
|
export const monsterStoreSchema = z.object({
|
||||||
monster_id: z.number(),
|
monster_id: z.number(),
|
||||||
level: z.number(),
|
level: z.number(),
|
||||||
amount: z.number(),
|
amount: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const dynamicKeyStoreSchema = z.object({
|
export const dynamicKeyStoreSchema = z.object({
|
||||||
key: z.string(),
|
key: z.string(),
|
||||||
value: z.number(),
|
value: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const battleBuffStoreSchema = z.object({
|
export const battleBuffStoreSchema = z.object({
|
||||||
level: z.number(),
|
level: z.number(),
|
||||||
id: z.number(),
|
id: z.number(),
|
||||||
dynamic_key: dynamicKeyStoreSchema.optional(),
|
dynamic_key: dynamicKeyStoreSchema.optional()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const mOCConfigStoreSchema = z.object({
|
export const mocConfigStoreSchema = z.object({
|
||||||
event_id: z.number(),
|
event_id: z.number(),
|
||||||
challenge_id: z.number(),
|
challenge_id: z.number(),
|
||||||
floor_side: z.string(),
|
floor_side: z.string(),
|
||||||
use_turbulence_buff: z.boolean(),
|
use_turbulence_buff: z.boolean(),
|
||||||
use_cycle_count: z.boolean(),
|
use_cycle_count: z.boolean(),
|
||||||
blessings: z.array(battleBuffStoreSchema),
|
blessings: z.array(battleBuffStoreSchema),
|
||||||
cycle_count: z.number(),
|
cycle_count: z.number(),
|
||||||
stage_id: z.number(),
|
stage_id: z.number(),
|
||||||
monsters: z.array(z.array(monsterStoreSchema)),
|
monsters: z.array(z.array(monsterStoreSchema))
|
||||||
});
|
});
|
||||||
|
|
||||||
export const pFConfigStoreSchema = z.object({
|
export const pfConfigStoreSchema = z.object({
|
||||||
event_id: z.number(),
|
event_id: z.number(),
|
||||||
challenge_id: z.number(),
|
challenge_id: z.number(),
|
||||||
floor_side: z.string(),
|
buff_id: z.number(),
|
||||||
buff_id: z.number(),
|
floor_side: z.string(),
|
||||||
blessings: z.array(battleBuffStoreSchema),
|
blessings: z.array(battleBuffStoreSchema),
|
||||||
cycle_count: z.number(),
|
cycle_count: z.number(),
|
||||||
stage_id: z.number(),
|
stage_id: z.number(),
|
||||||
monsters: z.array(z.array(monsterStoreSchema)),
|
monsters: z.array(z.array(monsterStoreSchema))
|
||||||
});
|
});
|
||||||
|
|
||||||
export const aSConfigStoreSchema = z.object({
|
export const asConfigStoreSchema = z.object({
|
||||||
event_id: z.number(),
|
event_id: z.number(),
|
||||||
challenge_id: z.number(),
|
challenge_id: z.number(),
|
||||||
buff_id: z.number(),
|
buff_id: z.number(),
|
||||||
floor_side: z.string(),
|
floor_side: z.string(),
|
||||||
blessings: z.array(battleBuffStoreSchema),
|
blessings: z.array(battleBuffStoreSchema),
|
||||||
cycle_count: z.number(),
|
cycle_count: z.number(),
|
||||||
stage_id: z.number(),
|
stage_id: z.number(),
|
||||||
monsters: z.array(z.array(monsterStoreSchema)),
|
monsters: z.array(z.array(monsterStoreSchema))
|
||||||
});
|
});
|
||||||
|
|
||||||
export const cEConfigStoreSchema = z.object({
|
export const peakConfigStoreSchema = 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({
|
|
||||||
event_id: z.number(),
|
event_id: z.number(),
|
||||||
challenge_id: z.number(),
|
challenge_id: z.number(),
|
||||||
buff_id: z.number(),
|
buff_id: z.number(),
|
||||||
@@ -114,15 +107,22 @@ export const pEAKConfigStoreSchema = z.object({
|
|||||||
blessings: z.array(battleBuffStoreSchema),
|
blessings: z.array(battleBuffStoreSchema),
|
||||||
cycle_count: z.number(),
|
cycle_count: z.number(),
|
||||||
stage_id: 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({
|
export const micsSchema = z.object({
|
||||||
avatars: z.record(avatarStoreSchema),
|
avatars: z.record(z.string(), avatarStoreSchema),
|
||||||
battle_type: z.string(),
|
battle_type: z.string(),
|
||||||
moc_config: mOCConfigStoreSchema,
|
moc_config: mocConfigStoreSchema,
|
||||||
pf_config: pFConfigStoreSchema,
|
pf_config: pfConfigStoreSchema,
|
||||||
as_config: aSConfigStoreSchema,
|
as_config: asConfigStoreSchema,
|
||||||
ce_config: cEConfigStoreSchema,
|
ce_config: ceConfigStoreSchema,
|
||||||
peak_config: pEAKConfigStoreSchema,
|
peak_config: peakConfigStoreSchema
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,53 +2,51 @@
|
|||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
export const challengeDetailSchema = z.object({
|
export const challengeDetailSchema = z.object({
|
||||||
Name: z.string(),
|
Name: z.string(),
|
||||||
Param: z.number().optional(),
|
Param: z.number().optional()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const stageConfigSchema = z.record(z.string()).and(
|
export const stageConfigSchema = z.record(z.string(), z.string()).and(z.object({
|
||||||
z.object({
|
$type: z.string()
|
||||||
$type: z.string(),
|
}));
|
||||||
}),
|
|
||||||
);
|
|
||||||
|
|
||||||
export const eventStageDetailSchema = z.object({
|
export const eventStageDetailSchema = z.object({
|
||||||
StageID: z.number(),
|
StageID: z.number(),
|
||||||
StageType: z.string(),
|
StageType: z.string(),
|
||||||
StageName: z.number(),
|
StageName: z.number(),
|
||||||
HardLevelGroup: z.number(),
|
HardLevelGroup: z.number(),
|
||||||
Level: z.number(),
|
Level: z.number(),
|
||||||
EliteGroup: z.number().optional(),
|
EliteGroup: z.number().optional(),
|
||||||
LevelGraphPath: z.string(),
|
LevelGraphPath: z.string(),
|
||||||
StageAbilityConfig: z.array(z.any()),
|
StageAbilityConfig: z.array(z.any()),
|
||||||
BattleScoringGroup: z.number().optional(),
|
BattleScoringGroup: z.number().optional(),
|
||||||
SubLevelGraphs: z.array(z.any()),
|
SubLevelGraphs: z.array(z.any()),
|
||||||
StageConfigData: z.array(stageConfigSchema),
|
StageConfigData: z.array(stageConfigSchema),
|
||||||
MonsterList: z.array(z.record(z.number())),
|
MonsterList: z.array(z.record(z.string(), z.number())),
|
||||||
LevelLoseCondition: z.array(z.string()),
|
LevelLoseCondition: z.array(z.string()),
|
||||||
LevelWinCondition: z.array(z.string()),
|
LevelWinCondition: z.array(z.string()),
|
||||||
Release: z.boolean(),
|
Release: z.boolean(),
|
||||||
ForbidExitBattle: z.boolean(),
|
ForbidExitBattle: z.boolean(),
|
||||||
MonsterWarningRatio: z.number().optional(),
|
MonsterWarningRatio: z.number().optional(),
|
||||||
TrialAvatarList: z.array(z.any()),
|
TrialAvatarList: z.array(z.any())
|
||||||
});
|
});
|
||||||
|
|
||||||
export const mocDetailSchema = z.object({
|
export const mocDetailSchema = z.object({
|
||||||
Id: z.number(),
|
Id: z.number(),
|
||||||
Name: z.string(),
|
Name: z.string(),
|
||||||
GroupName: z.string(),
|
GroupName: z.string(),
|
||||||
Desc: z.string(),
|
Desc: z.string(),
|
||||||
Param: z.array(z.number()),
|
Param: z.array(z.number()),
|
||||||
Challenge: z.array(challengeDetailSchema),
|
Challenge: z.array(challengeDetailSchema),
|
||||||
Countdown: z.number(),
|
Countdown: z.number(),
|
||||||
DamageType1: z.array(z.string()),
|
DamageType1: z.array(z.string()),
|
||||||
DamageType2: z.array(z.string()),
|
DamageType2: z.array(z.string()),
|
||||||
MazeGroupID1: z.number(),
|
MazeGroupID1: z.number(),
|
||||||
MazeGroupID2: z.number(),
|
MazeGroupID2: z.number(),
|
||||||
NpcMonsterIDList1: z.array(z.number()),
|
NpcMonsterIDList1: z.array(z.number()),
|
||||||
NpcMonsterIDList2: z.array(z.number()),
|
NpcMonsterIDList2: z.array(z.number()),
|
||||||
EventIDList1: z.array(eventStageDetailSchema),
|
EventIDList1: z.array(eventStageDetailSchema),
|
||||||
EventIDList2: z.array(eventStageDetailSchema),
|
EventIDList2: z.array(eventStageDetailSchema),
|
||||||
BeginTime: z.string(),
|
BeginTime: z.string(),
|
||||||
EndTime: z.string(),
|
EndTime: z.string()
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,14 +2,14 @@
|
|||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
export const monsterBasicRawSchema = z.object({
|
export const monsterBasicRawSchema = z.object({
|
||||||
rank: z.string(),
|
rank: z.string(),
|
||||||
camp: z.string().nullable(),
|
camp: z.string().nullable(),
|
||||||
icon: z.string(),
|
icon: z.string(),
|
||||||
child: z.array(z.number()),
|
child: z.array(z.number()),
|
||||||
weak: z.array(z.string()),
|
weak: z.array(z.string()),
|
||||||
en: z.string(),
|
en: z.string(),
|
||||||
desc: z.string(),
|
desc: z.string(),
|
||||||
kr: z.string(),
|
kr: z.string(),
|
||||||
cn: z.string(),
|
cn: z.string(),
|
||||||
jp: 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";
|
import { z } from "zod";
|
||||||
|
|
||||||
export const buffDetailSchema = z.object({
|
export const buffDetailSchema = z.object({
|
||||||
Name: z.string().nullable(),
|
Name: z.string().nullable(),
|
||||||
Desc: z.string().nullable(),
|
Desc: z.string().nullable(),
|
||||||
Param: z.array(z.number()),
|
Param: z.array(z.number())
|
||||||
});
|
});
|
||||||
|
|
||||||
export const optionDetailSchema = z.object({
|
export const optionDetailSchema = z.object({
|
||||||
Name: z.string(),
|
Name: z.string(),
|
||||||
Desc: z.string(),
|
Desc: z.string(),
|
||||||
Param: z.array(z.number()),
|
Param: z.array(z.number())
|
||||||
});
|
});
|
||||||
|
|
||||||
export const infiniteWaveSchema = z.object({
|
export const infiniteWaveSchema = z.object({
|
||||||
InfiniteWaveID: z.number(),
|
InfiniteWaveID: z.number(),
|
||||||
MonsterGroupIDList: z.array(z.number()),
|
MonsterGroupIDList: z.array(z.number()),
|
||||||
MaxMonsterCount: z.number(),
|
MaxMonsterCount: z.number(),
|
||||||
MaxTeammateCount: z.number(),
|
MaxTeammateCount: z.number(),
|
||||||
Ability: z.string(),
|
Ability: z.string(),
|
||||||
ParamList: z.array(z.number()),
|
ParamList: z.array(z.number()),
|
||||||
ClearPreviousAbility: z.boolean(),
|
ClearPreviousAbility: z.boolean(),
|
||||||
EliteGroup: z.number(),
|
EliteGroup: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
const challengeDetailSchema = z.any();
|
const challengeDetailSchema = z.any();
|
||||||
|
|
||||||
const eventStageDetailSchema = z.any();
|
const eventStageDetailSchema = z.any();
|
||||||
|
|
||||||
export const pFLevelSchema = z.object({
|
export const pfLevelSchema = z.object({
|
||||||
Id: z.number(),
|
Id: z.number(),
|
||||||
Name: z.string(),
|
Name: z.string(),
|
||||||
Challenge: z.array(challengeDetailSchema),
|
Challenge: z.array(challengeDetailSchema),
|
||||||
DamageType1: z.array(z.string()),
|
DamageType1: z.array(z.string()),
|
||||||
DamageType2: z.array(z.string()),
|
DamageType2: z.array(z.string()),
|
||||||
MazeGroupID1: z.number(),
|
MazeGroupID1: z.number(),
|
||||||
MazeGroupID2: z.number(),
|
MazeGroupID2: z.number(),
|
||||||
NpcMonsterIDList1: z.array(z.number()),
|
NpcMonsterIDList1: z.array(z.number()),
|
||||||
NpcMonsterIDList2: z.array(z.number()),
|
NpcMonsterIDList2: z.array(z.number()),
|
||||||
EventIDList1: z.array(eventStageDetailSchema),
|
EventIDList1: z.array(eventStageDetailSchema),
|
||||||
EventIDList2: z.array(eventStageDetailSchema),
|
EventIDList2: z.array(eventStageDetailSchema),
|
||||||
InfiniteList1: z.record(infiniteWaveSchema),
|
InfiniteList1: z.record(z.string(), infiniteWaveSchema),
|
||||||
InfiniteList2: z.record(infiniteWaveSchema),
|
InfiniteList2: z.record(z.string(), infiniteWaveSchema)
|
||||||
});
|
});
|
||||||
|
|
||||||
export const pFDetailSchema = z.object({
|
export const pfDetailSchema = z.object({
|
||||||
Id: z.number(),
|
Id: z.number(),
|
||||||
Name: z.string(),
|
Name: z.string(),
|
||||||
Buff: buffDetailSchema,
|
Buff: buffDetailSchema,
|
||||||
Option: z.array(optionDetailSchema),
|
Option: z.array(optionDetailSchema),
|
||||||
SubOption: z.array(optionDetailSchema),
|
SubOption: z.array(optionDetailSchema),
|
||||||
BeginTime: z.string(),
|
BeginTime: z.string(),
|
||||||
EndTime: z.string(),
|
EndTime: z.string(),
|
||||||
Level: z.array(pFLevelSchema),
|
Level: z.array(pfLevelSchema)
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
export const relicBasicRawEffectSchema = z.object({
|
export const relicBasicRawEffectSchema = z.object({
|
||||||
en: z.string(),
|
en: z.string(),
|
||||||
ParamList: z.array(z.number()),
|
ParamList: z.array(z.number()),
|
||||||
kr: z.string(),
|
kr: z.string(),
|
||||||
cn: z.string(),
|
cn: z.string(),
|
||||||
jp: z.string(),
|
jp: z.string()
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,19 +2,23 @@
|
|||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
export const partDataSchema = z.object({
|
export const partDataSchema = z.object({
|
||||||
Name: z.string(),
|
Name: z.string(),
|
||||||
Desc: z.string(),
|
Desc: z.string(),
|
||||||
Story: z.string(),
|
Story: z.string()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const requireBonusSchema = z.object({
|
export const requireBonusSchema = z.object({
|
||||||
Desc: z.string(),
|
Desc: z.string(),
|
||||||
ParamList: z.array(z.number()),
|
ParamList: z.array(z.number())
|
||||||
});
|
});
|
||||||
|
|
||||||
export const relicDetailSchema = z.object({
|
export const relicDetailSchema = z.object({
|
||||||
Name: z.string(),
|
Name: z.string(),
|
||||||
Icon: z.string(),
|
Icon: z.string(),
|
||||||
Parts: z.record(partDataSchema),
|
Parts: z.record(z.string(), partDataSchema),
|
||||||
RequireNum: z.record(requireBonusSchema),
|
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
|
// Generated by ts-to-zod
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import { extraDataSchema } from "./extraData.zod";
|
|
||||||
|
|
||||||
export const subAffixSchema = z.object({
|
export const subAffixSchema = z.object({
|
||||||
sub_affix_id: z.number(),
|
sub_affix_id: z.number(),
|
||||||
count: z.number(),
|
count: z.number(),
|
||||||
step: z.number(),
|
step: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const relicJsonSchema = z.object({
|
export const relicJsonSchema = z.object({
|
||||||
level: z.number(),
|
level: z.number(),
|
||||||
relic_id: z.number(),
|
relic_id: z.number(),
|
||||||
relic_set_id: z.number(),
|
relic_set_id: z.number(),
|
||||||
main_affix_id: z.number(),
|
main_affix_id: z.number(),
|
||||||
sub_affixes: z.array(subAffixSchema),
|
sub_affixes: z.array(subAffixSchema),
|
||||||
internal_uid: z.number(),
|
internal_uid: z.number(),
|
||||||
equip_avatar: z.number(),
|
equip_avatar: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const lightconeJsonSchema = z.object({
|
export const lightconeJsonSchema = z.object({
|
||||||
level: z.number(),
|
level: z.number(),
|
||||||
item_id: z.number(),
|
item_id: z.number(),
|
||||||
equip_avatar: z.number(),
|
equip_avatar: z.number(),
|
||||||
rank: z.number(),
|
rank: z.number(),
|
||||||
promotion: z.number(),
|
promotion: z.number(),
|
||||||
internal_uid: z.number(),
|
internal_uid: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const avatarDataSchema = z.object({
|
export const avatarDataSchema = z.object({
|
||||||
rank: z.number(),
|
rank: z.number(),
|
||||||
skills: z.record(z.number()),
|
skills: z.record(z.string(), z.number())
|
||||||
});
|
});
|
||||||
|
|
||||||
export const avatarJsonSchema = z.object({
|
export const avatarJsonSchema = z.object({
|
||||||
owner_uid: z.number().optional(),
|
owner_uid: z.number().optional(),
|
||||||
avatar_id: z.number(),
|
avatar_id: z.number(),
|
||||||
data: avatarDataSchema,
|
data: avatarDataSchema,
|
||||||
level: z.number(),
|
level: z.number(),
|
||||||
promotion: z.number(),
|
promotion: z.number(),
|
||||||
techniques: z.array(z.number()),
|
techniques: z.array(z.number()),
|
||||||
sp_value: z.number(),
|
sp_value: z.number(),
|
||||||
sp_max: z.number(),
|
sp_max: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const monsterJsonSchema = z.object({
|
export const monsterJsonSchema = z.object({
|
||||||
monster_id: z.number(),
|
monster_id: z.number(),
|
||||||
level: z.number(),
|
level: z.number(),
|
||||||
amount: z.number(),
|
amount: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const dynamicKeyJsonSchema = z.object({
|
export const dynamicKeyJsonSchema = z.object({
|
||||||
key: z.string(),
|
key: z.string(),
|
||||||
value: z.number(),
|
value: z.number()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const battleBuffJsonSchema = z.object({
|
export const battleBuffJsonSchema = z.object({
|
||||||
level: z.number(),
|
level: z.number(),
|
||||||
id: z.number(),
|
id: z.number(),
|
||||||
dynamic_key: dynamicKeyJsonSchema.optional(),
|
dynamic_key: dynamicKeyJsonSchema.optional()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const battleConfigJsonSchema = z.object({
|
export const battleConfigJsonSchema = z.object({
|
||||||
battle_type: z.string(),
|
battle_type: z.string(),
|
||||||
blessings: z.array(battleBuffJsonSchema),
|
blessings: z.array(battleBuffJsonSchema),
|
||||||
custom_stats: z.array(subAffixSchema),
|
custom_stats: z.array(subAffixSchema),
|
||||||
cycle_count: z.number(),
|
cycle_count: z.number(),
|
||||||
stage_id: z.number(),
|
stage_id: z.number(),
|
||||||
path_resonance_id: z.number(),
|
path_resonance_id: z.number(),
|
||||||
monsters: z.array(z.array(monsterJsonSchema)),
|
monsters: z.array(z.array(monsterJsonSchema))
|
||||||
});
|
});
|
||||||
|
|
||||||
export const loadoutJsonSchema = z.object({
|
const loadoutJsonSchema = z.object({
|
||||||
name: z.string(),
|
name: z.string(),
|
||||||
avatar_id: z.number(),
|
avatar_id: z.number(),
|
||||||
relic_list: z.array(z.string()),
|
relic_list: z.array(z.string())
|
||||||
});
|
});
|
||||||
|
|
||||||
export const freeSRJsonSchema = z.object({
|
export const freeSrJsonSchema = z.object({
|
||||||
key: z.string().optional(),
|
key: z.string().optional(),
|
||||||
lightcones: z.array(lightconeJsonSchema),
|
lightcones: z.array(lightconeJsonSchema),
|
||||||
relics: z.array(relicJsonSchema),
|
relics: z.array(relicJsonSchema),
|
||||||
avatars: z.record(avatarJsonSchema),
|
avatars: z.record(z.string(), avatarJsonSchema),
|
||||||
battle_config: battleConfigJsonSchema,
|
battle_config: battleConfigJsonSchema,
|
||||||
loadout: z.array(loadoutJsonSchema).optional(),
|
loadout: z.array(loadoutJsonSchema).optional()
|
||||||
});
|
});
|
||||||
|
|
||||||
export const pSResponseSchema = z.object({
|
const extraDataSchema = z.any();
|
||||||
status: z.number(),
|
|
||||||
message: z.string(),
|
export const psResponseSchema = z.object({
|
||||||
extra_data: extraDataSchema.optional(),
|
status: z.number(),
|
||||||
|
message: z.string(),
|
||||||
|
extra_data: extraDataSchema.optional()
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user