diff --git a/packages/types/src/cloud.ts b/packages/types/src/cloud.ts index 903dfcb93fd..f6acb28c363 100644 --- a/packages/types/src/cloud.ts +++ b/packages/types/src/cloud.ts @@ -721,3 +721,25 @@ export type LeaveResponse = { taskId?: string timestamp?: string } + +/** + * UsageStats + */ + +export const usageStatsSchema = z.object({ + success: z.boolean(), + data: z.object({ + dates: z.array(z.string()), // Array of date strings + tasks: z.array(z.number()), // Array of task counts + tokens: z.array(z.number()), // Array of token counts + costs: z.array(z.number()), // Array of costs in USD + totals: z.object({ + tasks: z.number(), + tokens: z.number(), + cost: z.number(), // Total cost in USD + }), + }), + period: z.number(), // Period in days (e.g., 30) +}) + +export type UsageStats = z.infer