Add pastDueUsers, newPaidToday, and cohort paidTotal to usage stats #314

Merged
dean merged 1 commits from dean/usage-stats-pastdue-alltime into master 2026-08-01 02:42:49 +00:00
3 changed files with 141 additions and 0 deletions

View File

@@ -265,6 +265,7 @@ export type CohortStatsGql = {
activated7d: Scalars["Int"]["output"];
activatedNotPaid7d: Scalars["Int"]["output"];
paid7d: Scalars["Int"]["output"];
paidTotal: Scalars["Int"]["output"];
signups: Scalars["Int"]["output"];
weekStart: Scalars["Date"]["output"];
};
@@ -315,6 +316,11 @@ export type CreatePoolHallInput = {
timezone?: InputMaybe<Scalars["String"]["input"]>;
};
export type CreateShotShareLinkInput = {
paddingSeconds?: InputMaybe<Scalars["Float"]["input"]>;
shotIds: Array<Scalars["Int"]["input"]>;
};
export type CreateSubscriptionResultGql = {
__typename?: "CreateSubscriptionResultGQL";
checkoutUrl: Scalars["String"]["output"];
@@ -2318,6 +2324,8 @@ export type FunnelStatsGql = {
freemiumEpoch: Scalars["Date"]["output"];
newPaid7d: Scalars["Int"]["output"];
newPaid30d: Scalars["Int"]["output"];
newPaidToday: Scalars["Int"]["output"];
pastDueUsers: Scalars["Int"]["output"];
payingUsers: Scalars["Int"]["output"];
retentionPrevActive: Scalars["Int"]["output"];
retentionReturned: Scalars["Int"]["output"];
@@ -2391,6 +2399,12 @@ export type GetUploadLinkReturn = {
value: UploadLinkGetUploadLinkErrors;
};
export type GetUploadLinksReturn = {
__typename?: "GetUploadLinksReturn";
stream?: Maybe<UploadStreamGql>;
value: UploadLinkBatchGetUploadLinkErrors;
};
export type HlsPlaylistGql = {
__typename?: "HLSPlaylistGQL";
m3u8Text: Scalars["String"]["output"];
@@ -2524,6 +2538,7 @@ export type Mutation = {
createPoolHall: PoolHall;
createPoolHallCamera: PoolHallCameraStreamCredentials;
createRuleSet: RuleSet;
createShotShareLink: ShareLinkGql;
createSubscription: CreateSubscriptionResultGql;
createUploadStream: CreateUploadStreamReturn;
deleteComment: Scalars["Boolean"]["output"];
@@ -2547,6 +2562,7 @@ export type Mutation = {
getHlsInitUploadLink: GetUploadLinkReturn;
getProfileImageUploadLink: GetProfileUploadLinkReturn;
getUploadLink: GetUploadLinkReturn;
getUploadLinks: GetUploadLinksReturn;
grantManualEntitlement: UserSubscriptionStatusGql;
inviteUsersToChallenge: Array<ChallengeInvitation>;
markAllNotificationsAsRead: Scalars["Boolean"]["output"];
@@ -2637,6 +2653,10 @@ export type MutationCreateRuleSetArgs = {
name: Scalars["String"]["input"];
};
export type MutationCreateShotShareLinkArgs = {
input: CreateShotShareLinkInput;
};
export type MutationCreateSubscriptionArgs = {
priceId: Scalars["String"]["input"];
};
@@ -2731,6 +2751,11 @@ export type MutationGetUploadLinkArgs = {
videoId: Scalars["Int"]["input"];
};
export type MutationGetUploadLinksArgs = {
segmentIndexes: Array<Scalars["Int"]["input"]>;
videoId: Scalars["Int"]["input"];
};
export type MutationGrantManualEntitlementArgs = {
endsAt?: InputMaybe<Scalars["DateTime"]["input"]>;
reason?: InputMaybe<Scalars["String"]["input"]>;
@@ -3571,17 +3596,33 @@ export type SegmentStartTimesGql = {
segmentStartTimes: Array<Scalars["Float"]["output"]>;
};
export type SegmentUploadLink = {
__typename?: "SegmentUploadLink";
headers: Array<Maybe<Header>>;
segmentIndex: Scalars["Int"]["output"];
uploadUrl: Scalars["String"]["output"];
};
export type SerializedShotPathsGql = {
__typename?: "SerializedShotPathsGQL";
b64EncodedBuffer?: Maybe<Scalars["String"]["output"]>;
};
export type SessionCoachBaselineGql = {
__typename?: "SessionCoachBaselineGQL";
attemptCount: Scalars["Int"]["output"];
madeCount: Scalars["Int"]["output"];
makePercentage: Scalars["Float"]["output"];
sessionCount: Scalars["Int"]["output"];
};
export enum SessionCoachCandidateFamilyEnum {
Aiming = "AIMING",
BackCut = "BACK_CUT",
CueToObjectDistance = "CUE_TO_OBJECT_DISTANCE",
CutAngle = "CUT_ANGLE",
ObjectToPocketDistance = "OBJECT_TO_POCKET_DISTANCE",
Overall = "OVERALL",
Spin = "SPIN",
}
@@ -3601,8 +3642,11 @@ export type SessionCoachCandidateGql = {
};
export enum SessionCoachCandidateKindEnum {
BaselineComparison = "BASELINE_COMPARISON",
DirectionalMiss = "DIRECTIONAL_MISS",
OutcomePattern = "OUTCOME_PATTERN",
SessionStreak = "SESSION_STREAK",
StrengthPattern = "STRENGTH_PATTERN",
UsagePattern = "USAGE_PATTERN",
}
@@ -3611,16 +3655,26 @@ export type SessionCoachDecisionGql = {
body?: Maybe<Scalars["String"]["output"]>;
drillId?: Maybe<Scalars["String"]["output"]>;
drillReason?: Maybe<Scalars["String"]["output"]>;
positiveBody?: Maybe<Scalars["String"]["output"]>;
positiveTitle?: Maybe<Scalars["String"]["output"]>;
practiceAttemptCount?: Maybe<Scalars["Int"]["output"]>;
practiceTarget?: Maybe<Scalars["String"]["output"]>;
selectedCandidateId?: Maybe<Scalars["ID"]["output"]>;
selectedPositiveCandidateId?: Maybe<Scalars["ID"]["output"]>;
sessionSummary?: Maybe<Scalars["String"]["output"]>;
suggestedAction?: Maybe<Scalars["String"]["output"]>;
supportingCandidateIds: Array<Scalars["ID"]["output"]>;
supportingShotIds: Array<Scalars["Int"]["output"]>;
title?: Maybe<Scalars["String"]["output"]>;
};
export type SessionCoachEvidenceGql = {
__typename?: "SessionCoachEvidenceGQL";
attemptCount: Scalars["Int"]["output"];
baselineAttemptCount: Scalars["Int"]["output"];
baselineMadeCount: Scalars["Int"]["output"];
baselineMakePercentage?: Maybe<Scalars["Float"]["output"]>;
baselineSessionCount: Scalars["Int"]["output"];
bucketKey: Scalars["String"]["output"];
bucketLabel: Scalars["String"]["output"];
comparisonAttemptCount: Scalars["Int"]["output"];
@@ -3642,12 +3696,15 @@ export type SessionCoachGql = {
candidates: Array<SessionCoachCandidateGql>;
generatedAt: Scalars["DateTime"]["output"];
ineligibilityReason?: Maybe<SessionCoachIneligibilityReasonEnum>;
longestMakeStreak: Scalars["Int"]["output"];
madeCount: Scalars["Int"]["output"];
makePercentage?: Maybe<Scalars["Float"]["output"]>;
missedCount: Scalars["Int"]["output"];
positiveCandidates: Array<SessionCoachCandidateGql>;
primaryCandidate?: Maybe<SessionCoachCandidateGql>;
processingId?: Maybe<Scalars["Int"]["output"]>;
processingStatus?: Maybe<Scalars["String"]["output"]>;
recentBaseline?: Maybe<SessionCoachBaselineGql>;
shotCount: Scalars["Int"]["output"];
state: SessionCoachStateEnum;
summary?: Maybe<Scalars["String"]["output"]>;
@@ -3673,6 +3730,7 @@ export type SessionCoachGenerationDiagnosticsGql = {
promptVersion: Scalars["String"]["output"];
providerKey: Scalars["String"]["output"];
startedAt?: Maybe<Scalars["DateTime"]["output"]>;
synthesisRationale?: Maybe<Scalars["String"]["output"]>;
updatedAt: Scalars["DateTime"]["output"];
};
@@ -3705,6 +3763,12 @@ export enum SessionCoachStateEnum {
Ready = "READY",
}
export type ShareLinkGql = {
__typename?: "ShareLinkGQL";
slug: Scalars["String"]["output"];
url: Scalars["String"]["output"];
};
export type ShotAnnotationGql = {
__typename?: "ShotAnnotationGQL";
createdAt?: Maybe<Scalars["DateTime"]["output"]>;
@@ -4111,6 +4175,16 @@ export type UploadLink = {
uploadUrl: Scalars["String"]["output"];
};
export type UploadLinkBatch = {
__typename?: "UploadLinkBatch";
alreadyUploaded: Array<Scalars["Int"]["output"]>;
links: Array<SegmentUploadLink>;
};
export type UploadLinkBatchGetUploadLinkErrors =
| GetUploadLinkErrors
| UploadLinkBatch;
export type UploadLinkGetProfileUploadLinkErrors =
| GetProfileUploadLinkErrors
| UploadLink;
@@ -7990,6 +8064,8 @@ export type GetUsageStatsQuery = {
activationCohort: number;
activationActivated: number;
payingUsers: number;
pastDueUsers: number;
newPaidToday: number;
newPaid7d: number;
newPaid30d: number;
retentionPrevActive: number;
@@ -8002,6 +8078,7 @@ export type GetUsageStatsQuery = {
activated7d: number;
paid7d: number;
activatedNotPaid7d: number;
paidTotal: number;
}>;
windows: Array<{
__typename?: "UsageStatsWindowGQL";
@@ -16934,6 +17011,8 @@ export const GetUsageStatsDocument = gql`
activationCohort
activationActivated
payingUsers
pastDueUsers
newPaidToday
newPaid7d
newPaid30d
retentionPrevActive
@@ -16945,6 +17024,7 @@ export const GetUsageStatsDocument = gql`
activated7d
paid7d
activatedNotPaid7d
paidTotal
}
totalUsers
totalVideos

View File

@@ -7,6 +7,8 @@ query getUsageStats($days: Int! = 30) {
activationCohort
activationActivated
payingUsers
pastDueUsers
newPaidToday
newPaid7d
newPaid30d
retentionPrevActive
@@ -18,6 +20,7 @@ query getUsageStats($days: Int! = 30) {
activated7d
paid7d
activatedNotPaid7d
paidTotal
}
totalUsers
totalVideos

View File

@@ -214,6 +214,7 @@ type CohortStatsGQL {
activated7d: Int!
paid7d: Int!
activatedNotPaid7d: Int!
paidTotal: Int!
}
type CommentGQL {
@@ -259,6 +260,11 @@ input CreatePoolHallInput {
timezone: String = null
}
input CreateShotShareLinkInput {
shotIds: [Int!]!
paddingSeconds: Float = null
}
type CreateSubscriptionResultGQL {
checkoutUrl: String!
sessionId: String!
@@ -459,6 +465,8 @@ type FunnelStatsGQL {
activationCohort: Int!
activationActivated: Int!
payingUsers: Int!
pastDueUsers: Int!
newPaidToday: Int!
newPaid7d: Int!
newPaid30d: Int!
retentionPrevActive: Int!
@@ -526,6 +534,11 @@ type GetUploadLinkReturn {
stream: UploadStreamGQL
}
type GetUploadLinksReturn {
value: UploadLinkBatchGetUploadLinkErrors!
stream: UploadStreamGQL
}
type HLSPlaylistGQL {
videoId: Int!
m3u8Text: String!
@@ -701,6 +714,7 @@ type Mutation {
cancelCameraClaimSession(claimSessionId: ID!): CameraClaimSession!
endCameraLease(leaseId: ID!): CameraLease!
extendCameraLease(leaseId: ID!, additionalMinutes: Int! = 60): CameraLease!
createShotShareLink(input: CreateShotShareLinkInput!): ShareLinkGQL!
finalizePlayerAssignments(
input: FinalizePlayerAssignmentsInput!
): [PlayerClusterGQL!]!
@@ -755,6 +769,7 @@ type Mutation {
expectedDurationSeconds: Float = null
): CreateUploadStreamReturn!
getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn!
getUploadLinks(videoId: Int!, segmentIndexes: [Int!]!): GetUploadLinksReturn!
getHlsInitUploadLink(videoId: Int!): GetUploadLinkReturn!
setSegmentDuration(
videoId: Int!
@@ -1289,11 +1304,25 @@ type SegmentAlreadyUploadedErr {
segmentId: Int!
}
type SegmentUploadLink {
segmentIndex: Int!
uploadUrl: String!
headers: [Header]!
}
type SerializedShotPathsGQL {
b64EncodedBuffer: String
}
type SessionCoachBaselineGQL {
sessionCount: Int!
attemptCount: Int!
madeCount: Int!
makePercentage: Float!
}
enum SessionCoachCandidateFamilyEnum {
OVERALL
AIMING
CUT_ANGLE
SPIN
@@ -1317,13 +1346,22 @@ type SessionCoachCandidateGQL {
}
enum SessionCoachCandidateKindEnum {
BASELINE_COMPARISON
SESSION_STREAK
STRENGTH_PATTERN
DIRECTIONAL_MISS
OUTCOME_PATTERN
USAGE_PATTERN
}
type SessionCoachDecisionGQL {
selectedPositiveCandidateId: ID
positiveTitle: String
positiveBody: String
selectedCandidateId: ID
supportingCandidateIds: [ID!]!
supportingShotIds: [Int!]!
sessionSummary: String
title: String
body: String
suggestedAction: String
@@ -1346,6 +1384,10 @@ type SessionCoachEvidenceGQL {
patternShotCount: Int!
score: Float!
rankReason: String!
baselineSessionCount: Int!
baselineAttemptCount: Int!
baselineMadeCount: Int!
baselineMakePercentage: Float
}
type SessionCoachGQL {
@@ -1363,6 +1405,9 @@ type SessionCoachGQL {
unknownOutcomeCount: Int!
analyzedShotCount: Int!
makePercentage: Float
longestMakeStreak: Int!
recentBaseline: SessionCoachBaselineGQL
positiveCandidates: [SessionCoachCandidateGQL!]!
primaryCandidate: SessionCoachCandidateGQL
candidates: [SessionCoachCandidateGQL!]!
agentGeneration: SessionCoachGenerationGQL
@@ -1386,6 +1431,7 @@ type SessionCoachGenerationDiagnosticsGQL {
startedAt: DateTime
lastEnqueuedAt: DateTime
abstentionReason: String
synthesisRationale: String
}
type SessionCoachGenerationGQL {
@@ -1416,6 +1462,11 @@ enum SessionCoachStateEnum {
FAILED
}
type ShareLinkGQL {
slug: String!
url: String!
}
type ShotAnnotationGQL {
shotId: Int!
type: ShotAnnotationTypeGQL!
@@ -1750,6 +1801,13 @@ type UploadLink {
headers: [Header]!
}
type UploadLinkBatch {
links: [SegmentUploadLink!]!
alreadyUploaded: [Int!]!
}
union UploadLinkBatchGetUploadLinkErrors = UploadLinkBatch | GetUploadLinkErrors
union UploadLinkGetProfileUploadLinkErrors =
UploadLink
| GetProfileUploadLinkErrors