Compare commits

..

2 Commits

Author SHA1 Message Date
032fa6b898 Merge pull request 'Add pastDueUsers, newPaidToday, and cohort paidTotal to usage stats' (#314) from dean/usage-stats-pastdue-alltime into master
Reviewed-on: #314
2026-08-01 02:42:49 +00:00
Dean Wenstrand
81565b7676 Add pastDueUsers, newPaidToday, and cohort paidTotal to usage stats
All checks were successful
Tests / Tests (pull_request) Successful in 4m48s
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-31 22:28:53 -04:00
4 changed files with 49 additions and 262 deletions

View File

@@ -265,6 +265,7 @@ export type CohortStatsGql = {
activated7d: Scalars["Int"]["output"]; activated7d: Scalars["Int"]["output"];
activatedNotPaid7d: Scalars["Int"]["output"]; activatedNotPaid7d: Scalars["Int"]["output"];
paid7d: Scalars["Int"]["output"]; paid7d: Scalars["Int"]["output"];
paidTotal: Scalars["Int"]["output"];
signups: Scalars["Int"]["output"]; signups: Scalars["Int"]["output"];
weekStart: Scalars["Date"]["output"]; weekStart: Scalars["Date"]["output"];
}; };
@@ -2323,6 +2324,8 @@ export type FunnelStatsGql = {
freemiumEpoch: Scalars["Date"]["output"]; freemiumEpoch: Scalars["Date"]["output"];
newPaid7d: Scalars["Int"]["output"]; newPaid7d: Scalars["Int"]["output"];
newPaid30d: Scalars["Int"]["output"]; newPaid30d: Scalars["Int"]["output"];
newPaidToday: Scalars["Int"]["output"];
pastDueUsers: Scalars["Int"]["output"];
payingUsers: Scalars["Int"]["output"]; payingUsers: Scalars["Int"]["output"];
retentionPrevActive: Scalars["Int"]["output"]; retentionPrevActive: Scalars["Int"]["output"];
retentionReturned: Scalars["Int"]["output"]; retentionReturned: Scalars["Int"]["output"];
@@ -4078,7 +4081,6 @@ export type SyncAppleSubscriptionResultGql = {
export type TableStateGql = { export type TableStateGql = {
__typename?: "TableStateGQL"; __typename?: "TableStateGQL";
homography?: Maybe<HomographyInfoGql>; homography?: Maybe<HomographyInfoGql>;
identifierToBox: Array<BoundingBoxGql>;
identifierToColor: Array<Maybe<RgbColorGql>>; identifierToColor: Array<Maybe<RgbColorGql>>;
identifierToPosition: Array<Array<Scalars["Float"]["output"]>>; identifierToPosition: Array<Array<Scalars["Float"]["output"]>>;
}; };
@@ -7481,76 +7483,6 @@ export type FinalizePlayerAssignmentsMutation = {
}>; }>;
}; };
export type TableStateLayoutFieldsFragment = {
__typename?: "TableStateGQL";
identifierToPosition: Array<Array<number>>;
identifierToColor: Array<{ __typename?: "RGBColorGQL"; hex: string } | null>;
};
export type DetectionBoxFieldsFragment = {
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
};
export type DetectionPocketPointFieldsFragment = {
__typename?: "PocketPointsGQL";
topLeft: { __typename?: "IntPoint2D"; x: number; y: number };
topSide: { __typename?: "IntPoint2D"; x: number; y: number };
topRight: { __typename?: "IntPoint2D"; x: number; y: number };
bottomLeft: { __typename?: "IntPoint2D"; x: number; y: number };
bottomSide: { __typename?: "IntPoint2D"; x: number; y: number };
bottomRight: { __typename?: "IntPoint2D"; x: number; y: number };
};
export type TableStateDetectionFieldsFragment = {
__typename?: "TableStateGQL";
identifierToBox: Array<{
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
}>;
homography?: {
__typename?: "HomographyInfoGQL";
crop: {
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
};
pockets: Array<{
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
}>;
sourcePoints: {
__typename?: "PocketPointsGQL";
topLeft: { __typename?: "IntPoint2D"; x: number; y: number };
topSide: { __typename?: "IntPoint2D"; x: number; y: number };
topRight: { __typename?: "IntPoint2D"; x: number; y: number };
bottomLeft: { __typename?: "IntPoint2D"; x: number; y: number };
bottomSide: { __typename?: "IntPoint2D"; x: number; y: number };
bottomRight: { __typename?: "IntPoint2D"; x: number; y: number };
};
destPoints: {
__typename?: "PocketPointsGQL";
topLeft: { __typename?: "IntPoint2D"; x: number; y: number };
topSide: { __typename?: "IntPoint2D"; x: number; y: number };
topRight: { __typename?: "IntPoint2D"; x: number; y: number };
bottomLeft: { __typename?: "IntPoint2D"; x: number; y: number };
bottomSide: { __typename?: "IntPoint2D"; x: number; y: number };
bottomRight: { __typename?: "IntPoint2D"; x: number; y: number };
};
} | null;
};
export type GetTableStateQueryVariables = Exact<{ export type GetTableStateQueryVariables = Exact<{
b64Image: Scalars["String"]["input"]; b64Image: Scalars["String"]["input"];
tableSize?: InputMaybe<Scalars["Float"]["input"]>; tableSize?: InputMaybe<Scalars["Float"]["input"]>;
@@ -7566,48 +7498,6 @@ export type GetTableStateQuery = {
__typename?: "RGBColorGQL"; __typename?: "RGBColorGQL";
hex: string; hex: string;
} | null>; } | null>;
identifierToBox: Array<{
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
}>;
homography?: {
__typename?: "HomographyInfoGQL";
crop: {
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
};
pockets: Array<{
__typename?: "BoundingBoxGQL";
left: number;
top: number;
width: number;
height: number;
}>;
sourcePoints: {
__typename?: "PocketPointsGQL";
topLeft: { __typename?: "IntPoint2D"; x: number; y: number };
topSide: { __typename?: "IntPoint2D"; x: number; y: number };
topRight: { __typename?: "IntPoint2D"; x: number; y: number };
bottomLeft: { __typename?: "IntPoint2D"; x: number; y: number };
bottomSide: { __typename?: "IntPoint2D"; x: number; y: number };
bottomRight: { __typename?: "IntPoint2D"; x: number; y: number };
};
destPoints: {
__typename?: "PocketPointsGQL";
topLeft: { __typename?: "IntPoint2D"; x: number; y: number };
topSide: { __typename?: "IntPoint2D"; x: number; y: number };
topRight: { __typename?: "IntPoint2D"; x: number; y: number };
bottomLeft: { __typename?: "IntPoint2D"; x: number; y: number };
bottomSide: { __typename?: "IntPoint2D"; x: number; y: number };
bottomRight: { __typename?: "IntPoint2D"; x: number; y: number };
};
} | null;
}; };
}; };
@@ -8268,6 +8158,8 @@ export type GetUsageStatsQuery = {
activationCohort: number; activationCohort: number;
activationActivated: number; activationActivated: number;
payingUsers: number; payingUsers: number;
pastDueUsers: number;
newPaidToday: number;
newPaid7d: number; newPaid7d: number;
newPaid30d: number; newPaid30d: number;
retentionPrevActive: number; retentionPrevActive: number;
@@ -8280,6 +8172,7 @@ export type GetUsageStatsQuery = {
activated7d: number; activated7d: number;
paid7d: number; paid7d: number;
activatedNotPaid7d: number; activatedNotPaid7d: number;
paidTotal: number;
}>; }>;
windows: Array<{ windows: Array<{
__typename?: "UsageStatsWindowGQL"; __typename?: "UsageStatsWindowGQL";
@@ -10093,73 +9986,6 @@ export const PlayerClusterFieldsFragmentDoc = gql`
} }
${PlayerClusterShotFieldsFragmentDoc} ${PlayerClusterShotFieldsFragmentDoc}
`; `;
export const TableStateLayoutFieldsFragmentDoc = gql`
fragment TableStateLayoutFields on TableStateGQL {
identifierToPosition
identifierToColor {
hex
}
}
`;
export const DetectionBoxFieldsFragmentDoc = gql`
fragment DetectionBoxFields on BoundingBoxGQL {
left
top
width
height
}
`;
export const DetectionPocketPointFieldsFragmentDoc = gql`
fragment DetectionPocketPointFields on PocketPointsGQL {
topLeft {
x
y
}
topSide {
x
y
}
topRight {
x
y
}
bottomLeft {
x
y
}
bottomSide {
x
y
}
bottomRight {
x
y
}
}
`;
export const TableStateDetectionFieldsFragmentDoc = gql`
fragment TableStateDetectionFields on TableStateGQL {
identifierToBox {
...DetectionBoxFields
}
homography {
crop {
...DetectionBoxFields
}
pockets {
...DetectionBoxFields
}
sourcePoints {
...DetectionPocketPointFields
}
destPoints {
...DetectionPocketPointFields
}
}
}
${DetectionBoxFieldsFragmentDoc}
${DetectionPocketPointFieldsFragmentDoc}
`;
export const ShotClipRangeFragmentDoc = gql` export const ShotClipRangeFragmentDoc = gql`
fragment ShotClipRange on ShotGQL { fragment ShotClipRange on ShotGQL {
id id
@@ -16111,12 +15937,12 @@ export const GetTableStateDocument = gql`
tableSize: $tableSize tableSize: $tableSize
useHomography: $useHomography useHomography: $useHomography
) { ) {
...TableStateLayoutFields identifierToPosition
...TableStateDetectionFields identifierToColor {
hex
}
} }
} }
${TableStateLayoutFieldsFragmentDoc}
${TableStateDetectionFieldsFragmentDoc}
`; `;
/** /**
@@ -16192,11 +16018,13 @@ export const GetLiveTableStateDocument = gql`
videoId videoId
frameIndex frameIndex
tableState { tableState {
...TableStateLayoutFields identifierToPosition
identifierToColor {
hex
}
} }
} }
} }
${TableStateLayoutFieldsFragmentDoc}
`; `;
/** /**
@@ -16271,11 +16099,13 @@ export const GetShotTableStateDocument = gql`
videoId videoId
frameIndex frameIndex
tableState { tableState {
...TableStateLayoutFields identifierToPosition
identifierToColor {
hex
}
} }
} }
} }
${TableStateLayoutFieldsFragmentDoc}
`; `;
/** /**
@@ -17430,6 +17260,8 @@ export const GetUsageStatsDocument = gql`
activationCohort activationCohort
activationActivated activationActivated
payingUsers payingUsers
pastDueUsers
newPaidToday
newPaid7d newPaid7d
newPaid30d newPaid30d
retentionPrevActive retentionPrevActive
@@ -17441,6 +17273,7 @@ export const GetUsageStatsDocument = gql`
activated7d activated7d
paid7d paid7d
activatedNotPaid7d activatedNotPaid7d
paidTotal
} }
totalUsers totalUsers
totalVideos totalVideos

View File

@@ -1,72 +1,3 @@
fragment TableStateLayoutFields on TableStateGQL {
identifierToPosition
identifierToColor {
hex
}
}
fragment DetectionBoxFields on BoundingBoxGQL {
left
top
width
height
}
fragment DetectionPocketPointFields on PocketPointsGQL {
topLeft {
x
y
}
topSide {
x
y
}
topRight {
x
y
}
bottomLeft {
x
y
}
bottomSide {
x
y
}
bottomRight {
x
y
}
}
# Everything needed to redraw a detection over the image it came from:
# the detector's boxes plus the homography that turned them into plane
# positions. Boxes, pocket boxes, and source points share the crop's
# coordinate space; the crop locates that space in the full frame.
#
# Only the photo query selects this. The live and shot queries read a
# frame out of a video the app never holds, so there is no image to
# overlay, and getLiveTableState is polled every five seconds.
fragment TableStateDetectionFields on TableStateGQL {
identifierToBox {
...DetectionBoxFields
}
homography {
crop {
...DetectionBoxFields
}
pockets {
...DetectionBoxFields
}
sourcePoints {
...DetectionPocketPointFields
}
destPoints {
...DetectionPocketPointFields
}
}
}
query GetTableState( query GetTableState(
$b64Image: String! $b64Image: String!
$tableSize: Float $tableSize: Float
@@ -77,8 +8,10 @@ query GetTableState(
tableSize: $tableSize tableSize: $tableSize
useHomography: $useHomography useHomography: $useHomography
) { ) {
...TableStateLayoutFields identifierToPosition
...TableStateDetectionFields identifierToColor {
hex
}
} }
} }
@@ -87,7 +20,10 @@ query GetLiveTableState($videoId: Int!) {
videoId videoId
frameIndex frameIndex
tableState { tableState {
...TableStateLayoutFields identifierToPosition
identifierToColor {
hex
}
} }
} }
} }
@@ -98,7 +34,10 @@ query GetShotTableState($shotId: Int!) {
videoId videoId
frameIndex frameIndex
tableState { tableState {
...TableStateLayoutFields identifierToPosition
identifierToColor {
hex
}
} }
} }
} }

View File

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

View File

@@ -214,6 +214,7 @@ type CohortStatsGQL {
activated7d: Int! activated7d: Int!
paid7d: Int! paid7d: Int!
activatedNotPaid7d: Int! activatedNotPaid7d: Int!
paidTotal: Int!
} }
type CommentGQL { type CommentGQL {
@@ -264,6 +265,11 @@ input CreatePoolHallInput {
timezone: String = null timezone: String = null
} }
input CreateShotShareLinkInput {
shotIds: [Int!]!
paddingSeconds: Float = null
}
type CreateSubscriptionResultGQL { type CreateSubscriptionResultGQL {
checkoutUrl: String! checkoutUrl: String!
sessionId: String! sessionId: String!
@@ -464,6 +470,8 @@ type FunnelStatsGQL {
activationCohort: Int! activationCohort: Int!
activationActivated: Int! activationActivated: Int!
payingUsers: Int! payingUsers: Int!
pastDueUsers: Int!
newPaidToday: Int!
newPaid7d: Int! newPaid7d: Int!
newPaid30d: Int! newPaid30d: Int!
retentionPrevActive: Int! retentionPrevActive: Int!
@@ -1459,6 +1467,11 @@ enum SessionCoachStateEnum {
FAILED FAILED
} }
type ShareLinkGQL {
slug: String!
url: String!
}
type ShotAnnotationGQL { type ShotAnnotationGQL {
shotId: Int! shotId: Int!
type: ShotAnnotationTypeGQL! type: ShotAnnotationTypeGQL!
@@ -1708,7 +1721,6 @@ type TableStateGQL {
identifierToPosition: [[Float!]!]! identifierToPosition: [[Float!]!]!
homography: HomographyInfoGQL homography: HomographyInfoGQL
identifierToColor: [RGBColorGQL]! identifierToColor: [RGBColorGQL]!
identifierToBox: [BoundingBoxGQL!]!
} }
type TagClassGQL { type TagClassGQL {