Add weekly cohort funnel to getUsageStats
All checks were successful
Tests / Tests (pull_request) Successful in 13s

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Dean Wenstrand
2026-07-11 17:40:10 -07:00
parent 9ebe2e61df
commit 40c4b82a59
3 changed files with 36 additions and 0 deletions

View File

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

View File

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

View File

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