(obj: Record<K, unknown>)
| 5 | // imported before index.ts has finished initializing zChartEventFilter. |
| 6 | // Keep in sync with zChartEventFilter in ./index.ts. |
| 7 | function objectToZodEnums<K extends string>(obj: Record<K, unknown>): [K, ...K[]] { |
| 8 | const [firstKey, ...otherKeys] = Object.keys(obj) as K[]; |
| 9 | return [firstKey!, ...otherKeys]; |
| 10 | } |
| 11 | |
| 12 | const zChartEventFilter = z.object({ |
| 13 | id: z.string().optional().describe('Unique identifier for the filter'), |