@databutton/firebase-types 1.164.0 → 1.165.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2619,6 +2619,31 @@ export interface AiUsageRecordEntry {
|
|
|
2619
2619
|
*/
|
|
2620
2620
|
rawUsage: object;
|
|
2621
2621
|
}
|
|
2622
|
+
/**
|
|
2623
|
+
* V2 of AiUsageRecord — introduces a schema discriminator, mandatory projectId,
|
|
2624
|
+
* mode tracking, and allows system performers for operational (scheduled) agents.
|
|
2625
|
+
*/
|
|
2626
|
+
export interface AiUsageRecordV2 {
|
|
2627
|
+
schema: "2026-08-12";
|
|
2628
|
+
/**
|
|
2629
|
+
* Who or what triggered the usage.
|
|
2630
|
+
* "user" for interactive sessions; "system" for operational/scheduled agents.
|
|
2631
|
+
*/
|
|
2632
|
+
performedBy: PerformedByUser | PerformedBySystem;
|
|
2633
|
+
/** Always set in V2 — operational agents always belong to a project. */
|
|
2634
|
+
projectId: string;
|
|
2635
|
+
recordedAt: Timestamp;
|
|
2636
|
+
totalCostUsd: number;
|
|
2637
|
+
stopReason: "done" | "cancelled" | "error";
|
|
2638
|
+
agent: {
|
|
2639
|
+
mode: "production" | "development";
|
|
2640
|
+
id: string;
|
|
2641
|
+
model: {
|
|
2642
|
+
provider: string;
|
|
2643
|
+
identifier: string;
|
|
2644
|
+
};
|
|
2645
|
+
};
|
|
2646
|
+
}
|
|
2622
2647
|
export interface FormEntry {
|
|
2623
2648
|
anonymousId: string;
|
|
2624
2649
|
eventName: string;
|