api-client/packages/hoppscotch-data/src/rest-request-response/original-request/v/4.ts
Nivedin 2bd3f36bfa
fix: schema error and test updation flow (#5124)
Co-authored-by: jamesgeorge007 <25279263+jamesgeorge007@users.noreply.github.com>
2025-06-13 09:55:05 +05:30

20 lines
415 B
TypeScript

import { defineVersion } from "verzod"
import { z } from "zod"
import { V3_SCHEMA } from "./3"
import { HoppRESTAuth } from "../../../rest/v/12/auth"
export const V4_SCHEMA = V3_SCHEMA.extend({
v: z.literal("4"),
auth: HoppRESTAuth,
})
export default defineVersion({
initial: false,
schema: V4_SCHEMA,
up(old: z.infer<typeof V3_SCHEMA>) {
return {
...old,
v: "4" as const,
}
},
})