Merge pull request 'Add player cluster + labeling mutation types' (#240) from dean/labeling-api-types into master

Reviewed-on: #240
This commit is contained in:
2026-05-09 00:38:29 +00:00
2 changed files with 90 additions and 0 deletions

View File

@@ -205,6 +205,11 @@ export enum ClientUploadStatusEnum {
UploadEnabled = "UPLOAD_ENABLED",
}
export type ClusterAssignmentInput = {
clusterId: Scalars["Int"]["input"];
userId?: InputMaybe<Scalars["Int"]["input"]>;
};
export type CommentGql = {
__typename?: "CommentGQL";
id: Scalars["Int"]["output"];
@@ -2182,6 +2187,12 @@ export type FilterInput =
videoId: Array<Scalars["Int"]["input"]>;
};
export type FinalizePlayerAssignmentsInput = {
clusterAssignments?: Array<ClusterAssignmentInput>;
shotMoves?: Array<ShotMoveInput>;
videoId: Scalars["Int"]["input"];
};
export type FloatOrdering = {
descending?: Scalars["Boolean"]["input"];
startingAt?: InputMaybe<Scalars["Float"]["input"]>;
@@ -2394,6 +2405,7 @@ export type Mutation = {
editUploadStream: Scalars["Boolean"]["output"];
editUser: UserGql;
ensureStripeCustomerExists: UserGql;
finalizePlayerAssignments: Array<PlayerClusterGql>;
findPrerecordTableLayout?: Maybe<HomographyInfoGql>;
followUser: UserGql;
getHlsInitUploadLink: GetUploadLinkReturn;
@@ -2517,6 +2529,10 @@ export type MutationEditUserArgs = {
input: EditUserInputGql;
};
export type MutationFinalizePlayerAssignmentsArgs = {
input: FinalizePlayerAssignmentsInput;
};
export type MutationFindPrerecordTableLayoutArgs = {
b64Image: Scalars["String"]["input"];
videoId: Scalars["Int"]["input"];
@@ -2679,6 +2695,29 @@ export type PageInfoGql = {
hasNextPage: Scalars["Boolean"]["output"];
};
export type PlayerClusterGql = {
__typename?: "PlayerClusterGQL";
clusterId: Scalars["Int"]["output"];
confirmed: Scalars["Boolean"]["output"];
nShots: Scalars["Int"]["output"];
shots: Array<PlayerClusterShotGql>;
userId?: Maybe<Scalars["Int"]["output"]>;
videoId: Scalars["Int"]["output"];
};
export type PlayerClusterShotGql = {
__typename?: "PlayerClusterShotGQL";
bboxX1: Scalars["Int"]["output"];
bboxX2: Scalars["Int"]["output"];
bboxY1: Scalars["Int"]["output"];
bboxY2: Scalars["Int"]["output"];
confidence: Scalars["Float"]["output"];
cropUrl?: Maybe<Scalars["String"]["output"]>;
fullFrameUrl?: Maybe<Scalars["String"]["output"]>;
isConfirmed: Scalars["Boolean"]["output"];
shotId: Scalars["Int"]["output"];
};
export enum PocketEnum {
Corner = "CORNER",
Side = "SIDE",
@@ -2789,6 +2828,7 @@ export type Query = {
notifications: NotificationConnection;
ruleSets: Array<RuleSet>;
unreadNotificationCount: Scalars["Int"]["output"];
videoPlayerClusters: Array<PlayerClusterGql>;
waitFor: Scalars["Float"]["output"];
};
@@ -2955,6 +2995,10 @@ export type QueryNotificationsArgs = {
offset?: Scalars["Int"]["input"];
};
export type QueryVideoPlayerClustersArgs = {
videoId: Scalars["Int"]["input"];
};
export type QueryWaitForArgs = {
duration: Scalars["Float"]["input"];
};
@@ -3172,6 +3216,11 @@ export type ShotGql = {
videoId: Scalars["Int"]["output"];
};
export type ShotMoveInput = {
newClusterId: Scalars["Int"]["input"];
shotId: Scalars["Int"]["input"];
};
export type ShotsOrderingComponent =
| {
difficulty: FloatOrdering;

View File

@@ -49,6 +49,7 @@ type Query {
limit: Int! = 500
countRespectsLimit: Boolean! = false
): GetRunsResult!
videoPlayerClusters(videoId: Int!): [PlayerClusterGQL!]!
getShotAnnotationTypes(errorTypes: Boolean = false): [ShotAnnotationTypeGQL!]!
getTableState(
b64Image: String!
@@ -860,6 +861,27 @@ input DatetimeOrdering {
startingAt: DateTime = null
}
type PlayerClusterGQL {
videoId: Int!
clusterId: Int!
nShots: Int!
userId: Int
confirmed: Boolean!
shots: [PlayerClusterShotGQL!]!
}
type PlayerClusterShotGQL {
shotId: Int!
bboxX1: Int!
bboxY1: Int!
bboxX2: Int!
bboxY2: Int!
confidence: Float!
isConfirmed: Boolean!
cropUrl: String
fullFrameUrl: String
}
type TableStateGQL {
identifierToPosition: [[Float!]!]!
homography: HomographyInfoGQL
@@ -1094,6 +1116,9 @@ type Mutation {
markAllNotificationsAsRead: Boolean!
markNotificationsAsRead(notificationIds: [Int!]!): Boolean!
deleteNotification(notificationId: Int!): Boolean!
finalizePlayerAssignments(
input: FinalizePlayerAssignmentsInput!
): [PlayerClusterGQL!]!
addAnnotationToShot(
shotId: Int!
annotationName: String!
@@ -1165,6 +1190,22 @@ enum ReportReasonEnum {
OTHER
}
input FinalizePlayerAssignmentsInput {
videoId: Int!
clusterAssignments: [ClusterAssignmentInput!]! = []
shotMoves: [ShotMoveInput!]! = []
}
input ClusterAssignmentInput {
clusterId: Int!
userId: Int = null
}
input ShotMoveInput {
shotId: Int!
newClusterId: Int!
}
type AddShotAnnotationReturn {
value: SuccessfulAddAddShotAnnotationErrors!
}