diff --git a/src/index.tsx b/src/index.tsx index 3da3a46..680b6b0 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -3018,6 +3018,12 @@ export type ProcessingFailedErr = { processing: VideoProcessingGql; }; +export type ProcessingStatusCountGql = { + __typename?: "ProcessingStatusCountGQL"; + count: Scalars["Int"]["output"]; + status: Scalars["String"]["output"]; +}; + export enum ProcessingStatusEnum { Created = "CREATED", Failed = "FAILED", @@ -3065,6 +3071,7 @@ export type Query = { getShotsWithMetadata: GetShotsResult; getStorageStatus?: Maybe; getTableState: TableStateGql; + getUsageStats: UsageStatsGql; getUser?: Maybe; getUserRelationshipsMatching: UserRelationshipsResult; getUserSubscriptionStatus: UserSubscriptionStatusGql; @@ -3229,6 +3236,10 @@ export type QueryGetTableStateArgs = { useHomography?: InputMaybe; }; +export type QueryGetUsageStatsArgs = { + days?: Scalars["Int"]["input"]; +}; + export type QueryGetUserArgs = { userId: Scalars["Int"]["input"]; }; @@ -3944,6 +3955,35 @@ export type UploadStreamGql = { 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; + processingLast24h: Array; + totalRuns: Scalars["Int"]["output"]; + totalShots: Scalars["Int"]["output"]; + totalUsers: Scalars["Int"]["output"]; + totalVideos: Scalars["Int"]["output"]; + windows: Array; +}; + +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 = { __typename?: "UserGQL"; activeVideoId?: Maybe; diff --git a/src/schema.gql b/src/schema.gql index 844aefd..465f9be 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -100,6 +100,7 @@ type Query { countRespectsLimit: Boolean! = false ): [ShotGQL!]! getShotsByIds(ids: [Int!]!): [ShotGQL!]! + getUsageStats(days: Int! = 30): UsageStatsGQL! getUser(userId: Int!): UserGQL doesUsernameExist(candidateUsername: String!): Boolean! getLoggedInUser: UserGQL @@ -1168,6 +1169,37 @@ input CreatedAfter @oneOf { 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 { inquiringUser: UserGQL! relationships: [UserRelationship!]!