mirror of
https://github.com/latentPrion/cppbessot.git
synced 2026-04-17 18:44:23 +00:00
56 lines
1.5 KiB
TypeScript
56 lines
1.5 KiB
TypeScript
/*
|
|
* 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);
|
|
}
|