@databutton/firebase-types 1.92.6 → 1.92.7

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.
@@ -1,4 +1,5 @@
1
1
  import type { Timestamp } from "firebase/firestore";
2
+ import type { TimeGranularity, TimeRangeFilter } from "../../accounts/handle-generate-usage-report.js";
2
3
  import type { RunMigrationsResponse } from "../db-api.js";
3
4
  import type { CreateProjectErrorCode } from "./enums.js";
4
5
  import type { Datafile, Dataframe, Job, Project, ProjectTemplate, ScheduleTarget, ScheduleWhen } from "./persisted.js";
@@ -341,4 +342,35 @@ export type DiagnosticsRequest = {
341
342
  export type DiagnosticsResponse = {
342
343
  success: boolean;
343
344
  };
345
+ export type GenerateUsageReportRequest = {
346
+ accountId: string;
347
+ timeRangeFilter: TimeRangeFilter;
348
+ timeGranularity: TimeGranularity;
349
+ };
350
+ export type GenerateUsageReportResponse = {
351
+ from: string;
352
+ to: string;
353
+ transactions: {
354
+ count: number;
355
+ sumCredits: number;
356
+ };
357
+ account: {
358
+ id: string;
359
+ name: string;
360
+ };
361
+ projects: {
362
+ id: string;
363
+ name: string;
364
+ }[];
365
+ users: {
366
+ id: string;
367
+ email: string;
368
+ }[];
369
+ usageData: {
370
+ timestamp: string;
371
+ projectId: string;
372
+ userId: string;
373
+ credits: number;
374
+ }[];
375
+ };
344
376
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databutton/firebase-types",
3
- "version": "1.92.6",
3
+ "version": "1.92.7",
4
4
  "main": "lib/types/published/index.js",
5
5
  "type": "module",
6
6
  "engines": {