/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v3"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type GetTenantTokenRequest = { /** * The ID of the tenant. Required when using AdminApiKey authentication. */ tenantId: string; }; /** @internal */ export const GetTenantTokenRequest$inboundSchema: z.ZodType< GetTenantTokenRequest, z.ZodTypeDef, unknown > = z.object({ tenant_id: z.string(), }).transform((v) => { return remap$(v, { "tenant_id": "tenantId", }); }); /** @internal */ export type GetTenantTokenRequest$Outbound = { tenant_id: string; }; /** @internal */ export const GetTenantTokenRequest$outboundSchema: z.ZodType< GetTenantTokenRequest$Outbound, z.ZodTypeDef, GetTenantTokenRequest > = z.object({ tenantId: z.string(), }).transform((v) => { return remap$(v, { tenantId: "tenant_id", }); }); export function getTenantTokenRequestToJSON( getTenantTokenRequest: GetTenantTokenRequest, ): string { return JSON.stringify( GetTenantTokenRequest$outboundSchema.parse(getTenantTokenRequest), ); } export function getTenantTokenRequestFromJSON( jsonString: string, ): SafeParseResult { return safeParse( jsonString, (x) => GetTenantTokenRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetTenantTokenRequest' from JSON`, ); }