Add getUsageStats admin query types

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Dean Wenstrand
2026-07-11 10:29:07 -07:00
parent 905a1ca6db
commit 4758c95149
2 changed files with 72 additions and 0 deletions

View File

@@ -3018,6 +3018,12 @@ export type ProcessingFailedErr = {
processing: VideoProcessingGql; processing: VideoProcessingGql;
}; };
export type ProcessingStatusCountGql = {
__typename?: "ProcessingStatusCountGQL";
count: Scalars["Int"]["output"];
status: Scalars["String"]["output"];
};
export enum ProcessingStatusEnum { export enum ProcessingStatusEnum {
Created = "CREATED", Created = "CREATED",
Failed = "FAILED", Failed = "FAILED",
@@ -3065,6 +3071,7 @@ export type Query = {
getShotsWithMetadata: GetShotsResult; getShotsWithMetadata: GetShotsResult;
getStorageStatus?: Maybe<StorageStatusGql>; getStorageStatus?: Maybe<StorageStatusGql>;
getTableState: TableStateGql; getTableState: TableStateGql;
getUsageStats: UsageStatsGql;
getUser?: Maybe<UserGql>; getUser?: Maybe<UserGql>;
getUserRelationshipsMatching: UserRelationshipsResult; getUserRelationshipsMatching: UserRelationshipsResult;
getUserSubscriptionStatus: UserSubscriptionStatusGql; getUserSubscriptionStatus: UserSubscriptionStatusGql;
@@ -3229,6 +3236,10 @@ export type QueryGetTableStateArgs = {
useHomography?: InputMaybe<HomographyInputGql>; useHomography?: InputMaybe<HomographyInputGql>;
}; };
export type QueryGetUsageStatsArgs = {
days?: Scalars["Int"]["input"];
};
export type QueryGetUserArgs = { export type QueryGetUserArgs = {
userId: Scalars["Int"]["input"]; userId: Scalars["Int"]["input"];
}; };
@@ -3944,6 +3955,35 @@ export type UploadStreamGql = {
uploadsCompleted: Scalars["Int"]["output"]; uploadsCompleted: Scalars["Int"]["output"];
}; };
export type UsageStatsDailyGql = {
__typename?: "UsageStatsDailyGQL";
activeUsers: Scalars["Int"]["output"];
day: Scalars["Date"]["output"];
newUsers: Scalars["Int"]["output"];
sessions: Scalars["Int"]["output"];
shots: Scalars["Int"]["output"];
};
export type UsageStatsGql = {
__typename?: "UsageStatsGQL";
daily: Array<UsageStatsDailyGql>;
processingLast24h: Array<ProcessingStatusCountGql>;
totalRuns: Scalars["Int"]["output"];
totalShots: Scalars["Int"]["output"];
totalUsers: Scalars["Int"]["output"];
totalVideos: Scalars["Int"]["output"];
windows: Array<UsageStatsWindowGql>;
};
export type UsageStatsWindowGql = {
__typename?: "UsageStatsWindowGQL";
activeUsers: Scalars["Int"]["output"];
label: Scalars["String"]["output"];
newUsers: Scalars["Int"]["output"];
sessions: Scalars["Int"]["output"];
shots: Scalars["Int"]["output"];
};
export type UserGql = { export type UserGql = {
__typename?: "UserGQL"; __typename?: "UserGQL";
activeVideoId?: Maybe<Scalars["Int"]["output"]>; activeVideoId?: Maybe<Scalars["Int"]["output"]>;

View File

@@ -100,6 +100,7 @@ type Query {
countRespectsLimit: Boolean! = false countRespectsLimit: Boolean! = false
): [ShotGQL!]! ): [ShotGQL!]!
getShotsByIds(ids: [Int!]!): [ShotGQL!]! getShotsByIds(ids: [Int!]!): [ShotGQL!]!
getUsageStats(days: Int! = 30): UsageStatsGQL!
getUser(userId: Int!): UserGQL getUser(userId: Int!): UserGQL
doesUsernameExist(candidateUsername: String!): Boolean! doesUsernameExist(candidateUsername: String!): Boolean!
getLoggedInUser: UserGQL getLoggedInUser: UserGQL
@@ -1168,6 +1169,37 @@ input CreatedAfter @oneOf {
createdAt: DateTime createdAt: DateTime
} }
type UsageStatsGQL {
totalUsers: Int!
totalVideos: Int!
totalShots: Int!
totalRuns: Int!
windows: [UsageStatsWindowGQL!]!
daily: [UsageStatsDailyGQL!]!
processingLast24h: [ProcessingStatusCountGQL!]!
}
type UsageStatsWindowGQL {
label: String!
newUsers: Int!
activeUsers: Int!
sessions: Int!
shots: Int!
}
type UsageStatsDailyGQL {
day: Date!
newUsers: Int!
activeUsers: Int!
sessions: Int!
shots: Int!
}
type ProcessingStatusCountGQL {
status: String!
count: Int!
}
type UserRelationshipsResult { type UserRelationshipsResult {
inquiringUser: UserGQL! inquiringUser: UserGQL!
relationships: [UserRelationship!]! relationships: [UserRelationship!]!