/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: a4c839233fe5 */ import * as z from "zod/v3"; import { DatasourceUserDefinition, DatasourceUserDefinition$Outbound, DatasourceUserDefinition$outboundSchema, } from "./datasourceuserdefinition.js"; /** * Describes the request body of the /indexuser API call */ export type IndexUserRequest = { /** * Version number for document for optimistic concurrency control. If absent or 0 then no version checks are done. */ version?: number | undefined; /** * The datasource for which the user is added */ datasource: string; /** * describes a user in the datasource */ user: DatasourceUserDefinition; }; /** @internal */ export type IndexUserRequest$Outbound = { version?: number | undefined; datasource: string; user: DatasourceUserDefinition$Outbound; }; /** @internal */ export const IndexUserRequest$outboundSchema: z.ZodType< IndexUserRequest$Outbound, z.ZodTypeDef, IndexUserRequest > = z.object({ version: z.number().int().optional(), datasource: z.string(), user: DatasourceUserDefinition$outboundSchema, }); export function indexUserRequestToJSON( indexUserRequest: IndexUserRequest, ): string { return JSON.stringify( IndexUserRequest$outboundSchema.parse(indexUserRequest), ); }