/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import * as z from "zod/v4-mini"; import { FilterCondition, FilterCondition$Outbound, FilterCondition$outboundSchema, } from "./filter-condition.js"; import { QueryFilter, QueryFilter$Outbound, QueryFilter$outboundSchema, } from "./query-filter.js"; import { SortCondition, SortCondition$Outbound, SortCondition$outboundSchema, } from "./sort-condition.js"; import { Status, Status$outboundSchema } from "./status.js"; import { TimeRangeFilter, TimeRangeFilter$Outbound, TimeRangeFilter$outboundSchema, } from "./time-range-filter.js"; export type CostsheetFilter = { /** * CostsheetIDs allows filtering by specific costsheet IDs */ costsheetIDs?: Array | undefined; /** * EnvironmentID filters by specific environment ID */ environmentID?: string | undefined; /** * Filters contains custom filtering conditions */ filters?: Array | undefined; /** * LookupKey filters by lookup key */ lookupKey?: string | undefined; /** * Name filters by costsheet name */ name?: string | undefined; queryFilter?: QueryFilter | undefined; /** * Sort specifies result ordering preferences */ sort?: Array | undefined; status?: Status | undefined; /** * TenantID filters by specific tenant ID */ tenantID?: string | undefined; timeRangeFilter?: TimeRangeFilter | undefined; }; /** @internal */ export type CostsheetFilter$Outbound = { costsheetIDs?: Array | undefined; environmentID?: string | undefined; filters?: Array | undefined; lookupKey?: string | undefined; name?: string | undefined; queryFilter?: QueryFilter$Outbound | undefined; sort?: Array | undefined; status?: string | undefined; tenantID?: string | undefined; timeRangeFilter?: TimeRangeFilter$Outbound | undefined; }; /** @internal */ export const CostsheetFilter$outboundSchema: z.ZodMiniType< CostsheetFilter$Outbound, CostsheetFilter > = z.object({ costsheetIDs: z.optional(z.array(z.string())), environmentID: z.optional(z.string()), filters: z.optional(z.array(FilterCondition$outboundSchema)), lookupKey: z.optional(z.string()), name: z.optional(z.string()), queryFilter: z.optional(QueryFilter$outboundSchema), sort: z.optional(z.array(SortCondition$outboundSchema)), status: z.optional(Status$outboundSchema), tenantID: z.optional(z.string()), timeRangeFilter: z.optional(TimeRangeFilter$outboundSchema), }); export function costsheetFilterToJSON( costsheetFilter: CostsheetFilter, ): string { return JSON.stringify(CostsheetFilter$outboundSchema.parse(costsheetFilter)); }