Merge pull request 'Add weekly cohort funnel to getUsageStats' (#293) from dean/usage-stats-cohorts into master

Reviewed-on: #293
This commit is contained in:
2026-07-12 04:07:43 +00:00
3 changed files with 41 additions and 0 deletions

View File

@@ -260,6 +260,15 @@ export type ClusterAssignmentInput = {
userId?: InputMaybe<Scalars["Int"]["input"]>; userId?: InputMaybe<Scalars["Int"]["input"]>;
}; };
export type CohortStatsGql = {
__typename?: "CohortStatsGQL";
activated7d: Scalars["Int"]["output"];
activatedNotPaid7d: Scalars["Int"]["output"];
paid7d: Scalars["Int"]["output"];
signups: Scalars["Int"]["output"];
weekStart: Scalars["Date"]["output"];
};
export type CommentGql = { export type CommentGql = {
__typename?: "CommentGQL"; __typename?: "CommentGQL";
id: Scalars["Int"]["output"]; id: Scalars["Int"]["output"];
@@ -3980,6 +3989,7 @@ export type UsageStatsDailyGql = {
export type UsageStatsGql = { export type UsageStatsGql = {
__typename?: "UsageStatsGQL"; __typename?: "UsageStatsGQL";
cohorts: Array<CohortStatsGql>;
daily: Array<UsageStatsDailyGql>; daily: Array<UsageStatsDailyGql>;
funnel: FunnelStatsGql; funnel: FunnelStatsGql;
processingLast24h: Array<ProcessingStatusCountGql>; processingLast24h: Array<ProcessingStatusCountGql>;
@@ -7475,6 +7485,14 @@ export type GetUsageStatsQuery = {
retentionPrevActive: number; retentionPrevActive: number;
retentionReturned: number; retentionReturned: number;
}; };
cohorts: Array<{
__typename?: "CohortStatsGQL";
weekStart: any;
signups: number;
activated7d: number;
paid7d: number;
activatedNotPaid7d: number;
}>;
windows: Array<{ windows: Array<{
__typename?: "UsageStatsWindowGQL"; __typename?: "UsageStatsWindowGQL";
label: string; label: string;
@@ -15788,6 +15806,13 @@ export const GetUsageStatsDocument = gql`
retentionPrevActive retentionPrevActive
retentionReturned retentionReturned
} }
cohorts {
weekStart
signups
activated7d
paid7d
activatedNotPaid7d
}
totalUsers totalUsers
totalVideos totalVideos
totalShots totalShots

View File

@@ -12,6 +12,13 @@ query getUsageStats($days: Int! = 30) {
retentionPrevActive retentionPrevActive
retentionReturned retentionReturned
} }
cohorts {
weekStart
signups
activated7d
paid7d
activatedNotPaid7d
}
totalUsers totalUsers
totalVideos totalVideos
totalShots totalShots

View File

@@ -1175,6 +1175,7 @@ type UsageStatsGQL {
totalVideos: Int! totalVideos: Int!
totalShots: Int! totalShots: Int!
totalRuns: Int! totalRuns: Int!
cohorts: [CohortStatsGQL!]!
windows: [UsageStatsWindowGQL!]! windows: [UsageStatsWindowGQL!]!
daily: [UsageStatsDailyGQL!]! daily: [UsageStatsDailyGQL!]!
processingLast24h: [ProcessingStatusCountGQL!]! processingLast24h: [ProcessingStatusCountGQL!]!
@@ -1193,6 +1194,14 @@ type FunnelStatsGQL {
retentionReturned: Int! retentionReturned: Int!
} }
type CohortStatsGQL {
weekStart: Date!
signups: Int!
activated7d: Int!
paid7d: Int!
activatedNotPaid7d: Int!
}
type UsageStatsWindowGQL { type UsageStatsWindowGQL {
label: String! label: String!
newUsers: Int! newUsers: Int!