import type { SegmentationTypes } from "@cargo-ai/types"; import type { Token } from "../core.js"; /** Filter keys whose value is a resource uuid a CDK handle can supply as a token. */ type UuidKey = "relatedModelUuid" | "segmentUuid" | "workflowUuid"; /** * Deep-widen the uuid-bearing keys of a wire filter type to also accept a `Token`. * Distributes over unions (so each discriminated condition member is preserved) * and keeps every other key's type — and optionality — untouched. */ type Tokenized = T extends readonly (infer E)[] ? Tokenized[] : T extends object ? { [K in keyof T]: K extends UuidKey ? T[K] | Token : Tokenized; } : T; /** A segmentation filter whose resource-uuid slots also accept CDK handle tokens. */ export type Filter = Tokenized; export {}; //# sourceMappingURL=filter.d.ts.map