/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: e0cab242c799 */ import * as z from "zod/v3"; import { DatasourceGroupDefinition, DatasourceGroupDefinition$Outbound, DatasourceGroupDefinition$outboundSchema, } from "./datasourcegroupdefinition.js"; /** * Describes the request body of the /indexgroup API call */ export type IndexGroupRequest = { /** * 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 group is added */ datasource: string; /** * describes a group in the datasource */ group: DatasourceGroupDefinition; }; /** @internal */ export type IndexGroupRequest$Outbound = { version?: number | undefined; datasource: string; group: DatasourceGroupDefinition$Outbound; }; /** @internal */ export const IndexGroupRequest$outboundSchema: z.ZodType< IndexGroupRequest$Outbound, z.ZodTypeDef, IndexGroupRequest > = z.object({ version: z.number().int().optional(), datasource: z.string(), group: DatasourceGroupDefinition$outboundSchema, }); export function indexGroupRequestToJSON( indexGroupRequest: IndexGroupRequest, ): string { return JSON.stringify( IndexGroupRequest$outboundSchema.parse(indexGroupRequest), ); }