We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9bcd991 commit c8a8188Copy full SHA for c8a8188
1 file changed
packages/types/src/cloud.ts
@@ -721,3 +721,25 @@ export type LeaveResponse = {
721
taskId?: string
722
timestamp?: string
723
}
724
+
725
+/**
726
+ * UsageStats
727
+ */
728
729
+export const usageStatsSchema = z.object({
730
+ success: z.boolean(),
731
+ data: z.object({
732
+ dates: z.array(z.string()), // Array of date strings
733
+ tasks: z.array(z.number()), // Array of task counts
734
+ tokens: z.array(z.number()), // Array of token counts
735
+ costs: z.array(z.number()), // Array of costs in USD
736
+ totals: z.object({
737
+ tasks: z.number(),
738
+ tokens: z.number(),
739
+ cost: z.number(), // Total cost in USD
740
+ }),
741
742
+ period: z.number(), // Period in days (e.g., 30)
743
+})
744
745
+export type UsageStats = z.infer<typeof usageStatsSchema>
0 commit comments