mirror of
https://github.com/latentPrion/cppbessot.git
synced 2026-04-17 18:44:23 +00:00
Add generated test-schema-v1.2
This commit is contained in:
55
db/test-schema-v1.2/generated-zod/schemas.ts
Normal file
55
db/test-schema-v1.2/generated-zod/schemas.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* AUTO-GENERATED BY CppBeSsot.
|
||||
* Direct edits are pointless: this file is regenerated.
|
||||
* Update the OpenAPI schema and/or CppBeSsot templates, then regenerate generated-* outputs.
|
||||
*/
|
||||
|
||||
import { makeApi, Zodios, type ZodiosOptions } from "@zodios/core";
|
||||
import { z } from "zod";
|
||||
|
||||
const Agent = z
|
||||
.object({
|
||||
id: z.string(),
|
||||
role: z.string(),
|
||||
persistent: z.boolean(),
|
||||
displayName: z.string().optional(),
|
||||
trustScore: z.number().int().gte(0).lte(100).optional(),
|
||||
})
|
||||
.passthrough();
|
||||
const GovernmentAddress = z
|
||||
.object({
|
||||
id: z.string(),
|
||||
addressLabel: z.string().optional(),
|
||||
regionLookupKey: z.string().optional(),
|
||||
})
|
||||
.passthrough();
|
||||
const TripAttemptResult = z
|
||||
.object({
|
||||
id: z.string(),
|
||||
result: z.string(),
|
||||
retryReason: z.string().optional(),
|
||||
governmentSuspensionReason: z.string().optional(),
|
||||
governmentTerminationReason: z.string().optional(),
|
||||
complianceSuspensionReason: z.string().optional(),
|
||||
complianceTerminationReason: z.string().optional(),
|
||||
policySuspensionReason: z.string().optional(),
|
||||
policyTerminationReason: z.string().optional(),
|
||||
cancelationReason: z.string().optional(),
|
||||
failureReason: z.string().optional(),
|
||||
details: z.string().optional(),
|
||||
})
|
||||
.passthrough();
|
||||
|
||||
export const schemas = {
|
||||
Agent,
|
||||
GovernmentAddress,
|
||||
TripAttemptResult,
|
||||
};
|
||||
|
||||
const endpoints = makeApi([]);
|
||||
|
||||
export const api = new Zodios(endpoints);
|
||||
|
||||
export function createApiClient(baseUrl: string, options?: ZodiosOptions) {
|
||||
return new Zodios(baseUrl, endpoints, options);
|
||||
}
|
||||
Reference in New Issue
Block a user