Compare commits
17 Commits
mk/video-c
...
ae746ccac0
Author | SHA1 | Date | |
---|---|---|---|
ae746ccac0 | |||
98266c7775 | |||
|
4918720ae3 | ||
8463ebf0e7 | |||
753179ca58 | |||
9ee5c721c1 | |||
00cca10cb3 | |||
ad704cad75 | |||
e2743abb59 | |||
e109e89a40 | |||
67bad20d24 | |||
0160455b9f | |||
170ff70b7a | |||
8df09b8c93 | |||
644ea66e98 | |||
0a5097c5c0 | |||
f4445f7ecb |
289
src/index.tsx
289
src/index.tsx
@@ -94,6 +94,13 @@ export type BoundingBoxGql = {
|
||||
width: Scalars["Float"]["output"];
|
||||
};
|
||||
|
||||
export type BoundingBoxInputGql = {
|
||||
height: Scalars["Float"]["input"];
|
||||
left: Scalars["Float"]["input"];
|
||||
top: Scalars["Float"]["input"];
|
||||
width: Scalars["Float"]["input"];
|
||||
};
|
||||
|
||||
export type BucketGql = {
|
||||
__typename?: "BucketGQL";
|
||||
lowerBound: Scalars["Float"]["output"];
|
||||
@@ -124,11 +131,9 @@ export enum ClientUploadStatusEnum {
|
||||
|
||||
export type CommentGql = {
|
||||
__typename?: "CommentGQL";
|
||||
createdAt?: Maybe<Scalars["DateTime"]["output"]>;
|
||||
id: Scalars["Int"]["output"];
|
||||
message: Scalars["String"]["output"];
|
||||
replies: Array<CommentGql>;
|
||||
updatedAt?: Maybe<Scalars["DateTime"]["output"]>;
|
||||
user: UserGql;
|
||||
};
|
||||
|
||||
@@ -2164,6 +2169,13 @@ export type HomographyInfoGql = {
|
||||
sourcePoints: PocketPointsGql;
|
||||
};
|
||||
|
||||
export type HomographyInputGql = {
|
||||
crop: BoundingBoxInputGql;
|
||||
destPoints: PocketPointsInputGql;
|
||||
pockets: Array<BoundingBoxInputGql>;
|
||||
sourcePoints: PocketPointsInputGql;
|
||||
};
|
||||
|
||||
export enum IncludePrivateEnum {
|
||||
All = "ALL",
|
||||
Mine = "MINE",
|
||||
@@ -2192,6 +2204,11 @@ export type IntPoint2D = {
|
||||
y: Scalars["Int"]["output"];
|
||||
};
|
||||
|
||||
export type IntPoint2DInput = {
|
||||
x: Scalars["Int"]["input"];
|
||||
y: Scalars["Int"]["input"];
|
||||
};
|
||||
|
||||
export type MakePercentageIntervalGql = {
|
||||
__typename?: "MakePercentageIntervalGQL";
|
||||
elapsedTime: Scalars["Float"]["output"];
|
||||
@@ -2409,6 +2426,15 @@ export type PocketPointsGql = {
|
||||
topSide: IntPoint2D;
|
||||
};
|
||||
|
||||
export type PocketPointsInputGql = {
|
||||
bottomLeft: IntPoint2DInput;
|
||||
bottomRight: IntPoint2DInput;
|
||||
bottomSide: IntPoint2DInput;
|
||||
topLeft: IntPoint2DInput;
|
||||
topRight: IntPoint2DInput;
|
||||
topSide: IntPoint2DInput;
|
||||
};
|
||||
|
||||
export type PocketingIntentionFeaturesGql = {
|
||||
__typename?: "PocketingIntentionFeaturesGQL";
|
||||
backcut?: Maybe<Scalars["Boolean"]["output"]>;
|
||||
@@ -2462,6 +2488,7 @@ export type Query = {
|
||||
getShots: Array<ShotGql>;
|
||||
getShotsByIds: Array<ShotGql>;
|
||||
getShotsWithMetadata: GetShotsResult;
|
||||
getTableState: TableStateGql;
|
||||
getUser?: Maybe<UserGql>;
|
||||
getUserRelationshipsMatching: UserRelationshipsResult;
|
||||
getUserTags: Array<TagGql>;
|
||||
@@ -2555,6 +2582,12 @@ export type QueryGetShotsWithMetadataArgs = {
|
||||
shotsPagination?: InputMaybe<GetShotsPagination>;
|
||||
};
|
||||
|
||||
export type QueryGetTableStateArgs = {
|
||||
b64Image: Scalars["String"]["input"];
|
||||
tableSize?: InputMaybe<Scalars["Float"]["input"]>;
|
||||
useHomography?: InputMaybe<HomographyInputGql>;
|
||||
};
|
||||
|
||||
export type QueryGetUserArgs = {
|
||||
userId: Scalars["Int"]["input"];
|
||||
};
|
||||
@@ -2868,6 +2901,12 @@ export type SuccessfulAddAddShotAnnotationErrors =
|
||||
| AddShotAnnotationErrors
|
||||
| SuccessfulAdd;
|
||||
|
||||
export type TableStateGql = {
|
||||
__typename?: "TableStateGQL";
|
||||
homography?: Maybe<HomographyInfoGql>;
|
||||
identifierToPosition: Array<Array<Scalars["Float"]["output"]>>;
|
||||
};
|
||||
|
||||
export type TagClassGql = {
|
||||
__typename?: "TagClassGQL";
|
||||
id: Scalars["Int"]["output"];
|
||||
@@ -3222,6 +3261,7 @@ export type GetFeedQuery = {
|
||||
id: string;
|
||||
lastIntendedSegmentBound?: number | null;
|
||||
isCompleted: boolean;
|
||||
streamSegmentType: StreamSegmentTypeEnum;
|
||||
} | null;
|
||||
tags: Array<{
|
||||
__typename?: "VideoTag";
|
||||
@@ -3250,6 +3290,12 @@ export type GetFeedQuery = {
|
||||
id: number;
|
||||
username: string;
|
||||
profileImageUri?: string | null;
|
||||
followers?: Array<{
|
||||
__typename?: "UserGQL";
|
||||
id: number;
|
||||
username: string;
|
||||
profileImageUri?: string | null;
|
||||
}> | null;
|
||||
};
|
||||
}>;
|
||||
}>;
|
||||
@@ -3289,6 +3335,7 @@ export type VideoCardFieldsFragment = {
|
||||
id: string;
|
||||
lastIntendedSegmentBound?: number | null;
|
||||
isCompleted: boolean;
|
||||
streamSegmentType: StreamSegmentTypeEnum;
|
||||
} | null;
|
||||
tags: Array<{
|
||||
__typename?: "VideoTag";
|
||||
@@ -3314,6 +3361,12 @@ export type VideoCardFieldsFragment = {
|
||||
id: number;
|
||||
username: string;
|
||||
profileImageUri?: string | null;
|
||||
followers?: Array<{
|
||||
__typename?: "UserGQL";
|
||||
id: number;
|
||||
username: string;
|
||||
profileImageUri?: string | null;
|
||||
}> | null;
|
||||
};
|
||||
}>;
|
||||
};
|
||||
@@ -3359,6 +3412,7 @@ export type GetVideoFeedQuery = {
|
||||
id: string;
|
||||
lastIntendedSegmentBound?: number | null;
|
||||
isCompleted: boolean;
|
||||
streamSegmentType: StreamSegmentTypeEnum;
|
||||
} | null;
|
||||
tags: Array<{
|
||||
__typename?: "VideoTag";
|
||||
@@ -3387,6 +3441,12 @@ export type GetVideoFeedQuery = {
|
||||
id: number;
|
||||
username: string;
|
||||
profileImageUri?: string | null;
|
||||
followers?: Array<{
|
||||
__typename?: "UserGQL";
|
||||
id: number;
|
||||
username: string;
|
||||
profileImageUri?: string | null;
|
||||
}> | null;
|
||||
};
|
||||
}>;
|
||||
}>;
|
||||
@@ -3606,6 +3666,8 @@ export type GetRunsForHighlightsQueryVariables = Exact<{
|
||||
filterInput: RunFilterInput;
|
||||
runIds?: InputMaybe<Array<Scalars["Int"]["input"]> | Scalars["Int"]["input"]>;
|
||||
runsOrdering?: InputMaybe<GetRunsOrdering>;
|
||||
limit?: Scalars["Int"]["input"];
|
||||
countRespectsLimit?: Scalars["Boolean"]["input"];
|
||||
}>;
|
||||
|
||||
export type GetRunsForHighlightsQuery = {
|
||||
@@ -3625,6 +3687,55 @@ export type GetRunsForHighlightsQuery = {
|
||||
};
|
||||
};
|
||||
|
||||
export type PocketingIntentionFragmentFragment = {
|
||||
__typename?: "PocketingIntentionFeaturesGQL";
|
||||
make?: boolean | null;
|
||||
targetPocketDistance?: number | null;
|
||||
targetPocketAngle?: number | null;
|
||||
targetPocketAngleDirection?: ShotDirectionEnum | null;
|
||||
marginOfErrorInDegrees?: number | null;
|
||||
intendedPocketType?: PocketEnum | null;
|
||||
difficulty?: number | null;
|
||||
};
|
||||
|
||||
export type GetRunsWithTimestampsQueryVariables = Exact<{
|
||||
filterInput: RunFilterInput;
|
||||
runIds?: InputMaybe<Array<Scalars["Int"]["input"]> | Scalars["Int"]["input"]>;
|
||||
runsOrdering?: InputMaybe<GetRunsOrdering>;
|
||||
}>;
|
||||
|
||||
export type GetRunsWithTimestampsQuery = {
|
||||
__typename?: "Query";
|
||||
getRuns: {
|
||||
__typename?: "GetRunsResult";
|
||||
count?: number | null;
|
||||
runIds: Array<number>;
|
||||
runs: Array<{
|
||||
__typename?: "RunGQL";
|
||||
id: number;
|
||||
runLength: number;
|
||||
userId: number;
|
||||
videoId: number;
|
||||
shots: Array<{
|
||||
__typename?: "ShotGQL";
|
||||
videoId: number;
|
||||
id: number;
|
||||
createdAt?: any | null;
|
||||
pocketingIntentionFeatures?: {
|
||||
__typename?: "PocketingIntentionFeaturesGQL";
|
||||
make?: boolean | null;
|
||||
targetPocketDistance?: number | null;
|
||||
targetPocketAngle?: number | null;
|
||||
targetPocketAngleDirection?: ShotDirectionEnum | null;
|
||||
marginOfErrorInDegrees?: number | null;
|
||||
intendedPocketType?: PocketEnum | null;
|
||||
difficulty?: number | null;
|
||||
} | null;
|
||||
}>;
|
||||
}>;
|
||||
};
|
||||
};
|
||||
|
||||
export type GetSerializedShotPathsQueryVariables = Exact<{
|
||||
filterInput: FilterInput;
|
||||
}>;
|
||||
@@ -3793,6 +3904,15 @@ export type GetShotsWithMetadataFilterResultQuery = {
|
||||
name: string;
|
||||
};
|
||||
}>;
|
||||
video?: {
|
||||
__typename?: "VideoGQL";
|
||||
id: number;
|
||||
stream?: {
|
||||
__typename?: "UploadStreamGQL";
|
||||
id: string;
|
||||
streamSegmentType: StreamSegmentTypeEnum;
|
||||
} | null;
|
||||
} | null;
|
||||
}>;
|
||||
};
|
||||
};
|
||||
@@ -3862,6 +3982,15 @@ export type GetShotsWithMetadataQuery = {
|
||||
name: string;
|
||||
};
|
||||
}>;
|
||||
video?: {
|
||||
__typename?: "VideoGQL";
|
||||
id: number;
|
||||
stream?: {
|
||||
__typename?: "UploadStreamGQL";
|
||||
id: string;
|
||||
streamSegmentType: StreamSegmentTypeEnum;
|
||||
} | null;
|
||||
} | null;
|
||||
}>;
|
||||
};
|
||||
};
|
||||
@@ -3920,6 +4049,15 @@ export type GetShotsByIdsQuery = {
|
||||
notes: string;
|
||||
type: { __typename?: "ShotAnnotationTypeGQL"; id: number; name: string };
|
||||
}>;
|
||||
video?: {
|
||||
__typename?: "VideoGQL";
|
||||
id: number;
|
||||
stream?: {
|
||||
__typename?: "UploadStreamGQL";
|
||||
id: string;
|
||||
streamSegmentType: StreamSegmentTypeEnum;
|
||||
} | null;
|
||||
} | null;
|
||||
}>;
|
||||
};
|
||||
|
||||
@@ -3971,6 +4109,15 @@ export type ShotWithAllFeaturesFragment = {
|
||||
notes: string;
|
||||
type: { __typename?: "ShotAnnotationTypeGQL"; id: number; name: string };
|
||||
}>;
|
||||
video?: {
|
||||
__typename?: "VideoGQL";
|
||||
id: number;
|
||||
stream?: {
|
||||
__typename?: "UploadStreamGQL";
|
||||
id: string;
|
||||
streamSegmentType: StreamSegmentTypeEnum;
|
||||
} | null;
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type EditShotMutationVariables = Exact<{
|
||||
@@ -4039,6 +4186,15 @@ export type EditShotMutation = {
|
||||
name: string;
|
||||
};
|
||||
}>;
|
||||
video?: {
|
||||
__typename?: "VideoGQL";
|
||||
id: number;
|
||||
stream?: {
|
||||
__typename?: "UploadStreamGQL";
|
||||
id: string;
|
||||
streamSegmentType: StreamSegmentTypeEnum;
|
||||
} | null;
|
||||
} | null;
|
||||
} | null;
|
||||
};
|
||||
};
|
||||
@@ -5062,6 +5218,7 @@ export const VideoCardFieldsFragmentDoc = gql`
|
||||
id
|
||||
lastIntendedSegmentBound
|
||||
isCompleted
|
||||
streamSegmentType
|
||||
}
|
||||
tableSize
|
||||
tags {
|
||||
@@ -5086,6 +5243,11 @@ export const VideoCardFieldsFragmentDoc = gql`
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
followers {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
}
|
||||
}
|
||||
reaction
|
||||
}
|
||||
@@ -5097,6 +5259,17 @@ export const MedalFieldsFragmentDoc = gql`
|
||||
nickname
|
||||
}
|
||||
`;
|
||||
export const PocketingIntentionFragmentFragmentDoc = gql`
|
||||
fragment PocketingIntentionFragment on PocketingIntentionFeaturesGQL {
|
||||
make
|
||||
targetPocketDistance
|
||||
targetPocketAngle
|
||||
targetPocketAngleDirection
|
||||
marginOfErrorInDegrees
|
||||
intendedPocketType
|
||||
difficulty
|
||||
}
|
||||
`;
|
||||
export const ShotWithAllFeaturesFragmentDoc = gql`
|
||||
fragment ShotWithAllFeatures on ShotGQL {
|
||||
id
|
||||
@@ -5151,6 +5324,13 @@ export const ShotWithAllFeaturesFragmentDoc = gql`
|
||||
}
|
||||
notes
|
||||
}
|
||||
video {
|
||||
id
|
||||
stream {
|
||||
id
|
||||
streamSegmentType
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const UserFragmentFragmentDoc = gql`
|
||||
@@ -6068,11 +6248,15 @@ export const GetRunsForHighlightsDocument = gql`
|
||||
$filterInput: RunFilterInput!
|
||||
$runIds: [Int!] = null
|
||||
$runsOrdering: GetRunsOrdering
|
||||
$limit: Int! = 500
|
||||
$countRespectsLimit: Boolean! = false
|
||||
) {
|
||||
getRuns(
|
||||
filterInput: $filterInput
|
||||
runIds: $runIds
|
||||
runsOrdering: $runsOrdering
|
||||
limit: $limit
|
||||
countRespectsLimit: $countRespectsLimit
|
||||
) {
|
||||
count
|
||||
runs {
|
||||
@@ -6105,6 +6289,8 @@ export const GetRunsForHighlightsDocument = gql`
|
||||
* filterInput: // value for 'filterInput'
|
||||
* runIds: // value for 'runIds'
|
||||
* runsOrdering: // value for 'runsOrdering'
|
||||
* limit: // value for 'limit'
|
||||
* countRespectsLimit: // value for 'countRespectsLimit'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
@@ -6157,6 +6343,105 @@ export type GetRunsForHighlightsQueryResult = Apollo.QueryResult<
|
||||
GetRunsForHighlightsQuery,
|
||||
GetRunsForHighlightsQueryVariables
|
||||
>;
|
||||
export const GetRunsWithTimestampsDocument = gql`
|
||||
query GetRunsWithTimestamps(
|
||||
$filterInput: RunFilterInput!
|
||||
$runIds: [Int!] = null
|
||||
$runsOrdering: GetRunsOrdering
|
||||
) {
|
||||
getRuns(
|
||||
filterInput: $filterInput
|
||||
runIds: $runIds
|
||||
runsOrdering: $runsOrdering
|
||||
) {
|
||||
count
|
||||
runs {
|
||||
id
|
||||
runLength
|
||||
userId
|
||||
videoId
|
||||
shots {
|
||||
videoId
|
||||
id
|
||||
createdAt
|
||||
pocketingIntentionFeatures {
|
||||
...PocketingIntentionFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
runIds
|
||||
}
|
||||
}
|
||||
${PocketingIntentionFragmentFragmentDoc}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useGetRunsWithTimestampsQuery__
|
||||
*
|
||||
* To run a query within a React component, call `useGetRunsWithTimestampsQuery` and pass it any options that fit your needs.
|
||||
* When your component renders, `useGetRunsWithTimestampsQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
||||
* you can use to render your UI.
|
||||
*
|
||||
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
||||
*
|
||||
* @example
|
||||
* const { data, loading, error } = useGetRunsWithTimestampsQuery({
|
||||
* variables: {
|
||||
* filterInput: // value for 'filterInput'
|
||||
* runIds: // value for 'runIds'
|
||||
* runsOrdering: // value for 'runsOrdering'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useGetRunsWithTimestampsQuery(
|
||||
baseOptions: Apollo.QueryHookOptions<
|
||||
GetRunsWithTimestampsQuery,
|
||||
GetRunsWithTimestampsQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useQuery<
|
||||
GetRunsWithTimestampsQuery,
|
||||
GetRunsWithTimestampsQueryVariables
|
||||
>(GetRunsWithTimestampsDocument, options);
|
||||
}
|
||||
export function useGetRunsWithTimestampsLazyQuery(
|
||||
baseOptions?: Apollo.LazyQueryHookOptions<
|
||||
GetRunsWithTimestampsQuery,
|
||||
GetRunsWithTimestampsQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useLazyQuery<
|
||||
GetRunsWithTimestampsQuery,
|
||||
GetRunsWithTimestampsQueryVariables
|
||||
>(GetRunsWithTimestampsDocument, options);
|
||||
}
|
||||
export function useGetRunsWithTimestampsSuspenseQuery(
|
||||
baseOptions?: Apollo.SuspenseQueryHookOptions<
|
||||
GetRunsWithTimestampsQuery,
|
||||
GetRunsWithTimestampsQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useSuspenseQuery<
|
||||
GetRunsWithTimestampsQuery,
|
||||
GetRunsWithTimestampsQueryVariables
|
||||
>(GetRunsWithTimestampsDocument, options);
|
||||
}
|
||||
export type GetRunsWithTimestampsQueryHookResult = ReturnType<
|
||||
typeof useGetRunsWithTimestampsQuery
|
||||
>;
|
||||
export type GetRunsWithTimestampsLazyQueryHookResult = ReturnType<
|
||||
typeof useGetRunsWithTimestampsLazyQuery
|
||||
>;
|
||||
export type GetRunsWithTimestampsSuspenseQueryHookResult = ReturnType<
|
||||
typeof useGetRunsWithTimestampsSuspenseQuery
|
||||
>;
|
||||
export type GetRunsWithTimestampsQueryResult = Apollo.QueryResult<
|
||||
GetRunsWithTimestampsQuery,
|
||||
GetRunsWithTimestampsQueryVariables
|
||||
>;
|
||||
export const GetSerializedShotPathsDocument = gql`
|
||||
query GetSerializedShotPaths($filterInput: FilterInput!) {
|
||||
getShots(filterInput: $filterInput) {
|
||||
|
@@ -40,6 +40,7 @@ fragment VideoCardFields on VideoGQL {
|
||||
id
|
||||
lastIntendedSegmentBound
|
||||
isCompleted
|
||||
streamSegmentType
|
||||
}
|
||||
tableSize
|
||||
tags {
|
||||
@@ -64,6 +65,11 @@ fragment VideoCardFields on VideoGQL {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
followers {
|
||||
id
|
||||
username
|
||||
profileImageUri
|
||||
}
|
||||
}
|
||||
reaction
|
||||
}
|
||||
|
@@ -2,6 +2,45 @@ query GetRunsForHighlights(
|
||||
$filterInput: RunFilterInput!
|
||||
$runIds: [Int!] = null
|
||||
$runsOrdering: GetRunsOrdering
|
||||
$limit: Int! = 500
|
||||
$countRespectsLimit: Boolean! = false
|
||||
) {
|
||||
getRuns(
|
||||
filterInput: $filterInput
|
||||
runIds: $runIds
|
||||
runsOrdering: $runsOrdering
|
||||
limit: $limit
|
||||
countRespectsLimit: $countRespectsLimit
|
||||
) {
|
||||
count
|
||||
runs {
|
||||
id
|
||||
runLength
|
||||
userId
|
||||
videoId
|
||||
shots {
|
||||
videoId
|
||||
id
|
||||
}
|
||||
}
|
||||
runIds
|
||||
}
|
||||
}
|
||||
|
||||
fragment PocketingIntentionFragment on PocketingIntentionFeaturesGQL {
|
||||
make
|
||||
targetPocketDistance
|
||||
targetPocketAngle
|
||||
targetPocketAngleDirection
|
||||
marginOfErrorInDegrees
|
||||
intendedPocketType
|
||||
difficulty
|
||||
}
|
||||
|
||||
query GetRunsWithTimestamps(
|
||||
$filterInput: RunFilterInput!
|
||||
$runIds: [Int!] = null
|
||||
$runsOrdering: GetRunsOrdering
|
||||
) {
|
||||
getRuns(
|
||||
filterInput: $filterInput
|
||||
@@ -17,6 +56,10 @@ query GetRunsForHighlights(
|
||||
shots {
|
||||
videoId
|
||||
id
|
||||
createdAt
|
||||
pocketingIntentionFeatures {
|
||||
...PocketingIntentionFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
runIds
|
||||
|
@@ -185,6 +185,13 @@ fragment ShotWithAllFeatures on ShotGQL {
|
||||
}
|
||||
notes
|
||||
}
|
||||
video {
|
||||
id
|
||||
stream {
|
||||
id
|
||||
streamSegmentType
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mutation EditShot($shotId: Int!, $fieldsToEdit: EditableShotFieldInputGQL!) {
|
||||
|
456
src/schema.gql
456
src/schema.gql
@@ -5,10 +5,28 @@ type Query {
|
||||
getBucketSet(keyName: String!): BucketSetGQL
|
||||
getDeployedConfig: DeployedConfigGQL!
|
||||
waitFor(duration: Float!): Float!
|
||||
getFeedVideos(
|
||||
limit: Int! = 5
|
||||
after: String = null
|
||||
includePrivate: IncludePrivateEnum! = MINE
|
||||
includeCallersVideos: Boolean = true
|
||||
filters: VideoFilterInput = null
|
||||
feedInput: VideoFeedInputGQL = null
|
||||
): VideoHistoryGQL!
|
||||
getVideoMakePercentageIntervals(
|
||||
videoId: ID!
|
||||
intervalDuration: Int! = 300
|
||||
): [MakePercentageIntervalGQL!]!
|
||||
getLongestRunsLeaderboard(
|
||||
interval: TimeInterval = null
|
||||
when: DateTime = null
|
||||
limit: Int! = 100
|
||||
requiredTags: [String!] = null
|
||||
): RunLeaderboardGQL!
|
||||
getMakesLeaderboard(
|
||||
interval: TimeInterval = null
|
||||
when: DateTime = null
|
||||
): CountLeaderboardGQL!
|
||||
getMedals(scope: MedalScope!, userId: Int = null): RequestedMedalsGQL!
|
||||
getRuns(
|
||||
filterInput: RunFilterInput!
|
||||
@@ -17,6 +35,12 @@ type Query {
|
||||
limit: Int! = 500
|
||||
countRespectsLimit: Boolean! = false
|
||||
): GetRunsResult!
|
||||
getShotAnnotationTypes(errorTypes: Boolean = false): [ShotAnnotationTypeGQL!]!
|
||||
getTableState(
|
||||
b64Image: String!
|
||||
tableSize: Float = 100
|
||||
useHomography: HomographyInputGQL = null
|
||||
): TableStateGQL!
|
||||
getOrderedShots(
|
||||
filterInput: FilterInput!
|
||||
ids: [Int!] = null
|
||||
@@ -38,7 +62,6 @@ type Query {
|
||||
countRespectsLimit: Boolean! = false
|
||||
): [ShotGQL!]!
|
||||
getShotsByIds(ids: [Int!]!): [ShotGQL!]!
|
||||
getShotAnnotationTypes(errorTypes: Boolean = false): [ShotAnnotationTypeGQL!]!
|
||||
getUser(userId: Int!): UserGQL
|
||||
doesUsernameExist(candidateUsername: String!): Boolean!
|
||||
getLoggedInUser: UserGQL
|
||||
@@ -63,24 +86,6 @@ type Query {
|
||||
getUserTags(includeRetiredTags: Boolean = false): [TagGQL!]!
|
||||
getVideo(videoId: Int!, debuggingJson: JSON = null): VideoGQL!
|
||||
getVideos(videoIds: [Int!]!): [VideoGQL!]!
|
||||
getFeedVideos(
|
||||
limit: Int! = 5
|
||||
after: String = null
|
||||
includePrivate: IncludePrivateEnum! = MINE
|
||||
includeCallersVideos: Boolean = true
|
||||
filters: VideoFilterInput = null
|
||||
feedInput: VideoFeedInputGQL = null
|
||||
): VideoHistoryGQL!
|
||||
getLongestRunsLeaderboard(
|
||||
interval: TimeInterval = null
|
||||
when: DateTime = null
|
||||
limit: Int! = 100
|
||||
requiredTags: [String!] = null
|
||||
): RunLeaderboardGQL!
|
||||
getMakesLeaderboard(
|
||||
interval: TimeInterval = null
|
||||
when: DateTime = null
|
||||
): CountLeaderboardGQL!
|
||||
}
|
||||
|
||||
type AggregateResultGQL {
|
||||
@@ -288,70 +293,54 @@ type DeployedConfigGQL {
|
||||
minimumAllowedAppVersion: String!
|
||||
}
|
||||
|
||||
type MakePercentageIntervalGQL {
|
||||
makePercentage: Float!
|
||||
elapsedTime: Float!
|
||||
type VideoHistoryGQL {
|
||||
videos: [VideoGQL!]!
|
||||
pageInfo: PageInfoGQL!
|
||||
}
|
||||
|
||||
type RequestedMedalsGQL {
|
||||
distanceOver66: MedalGQL
|
||||
distanceOver78: MedalGQL
|
||||
distanceOver90: MedalGQL
|
||||
runLength3: MedalGQL
|
||||
runLength5: MedalGQL
|
||||
runLength8: MedalGQL
|
||||
runLength10: MedalGQL
|
||||
runLength15: MedalGQL
|
||||
runLength20: MedalGQL
|
||||
runLength25: MedalGQL
|
||||
runLength30: MedalGQL
|
||||
runLength40: MedalGQL
|
||||
runLength50: MedalGQL
|
||||
totalMakes25: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes50: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes75: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes200: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes300: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes400: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes750: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes100: MedalGQL
|
||||
totalMakes500: MedalGQL
|
||||
totalMakes1000: MedalGQL
|
||||
totalMakes5000: MedalGQL
|
||||
totalMakes10000: MedalGQL
|
||||
dailyMakes50: MedalGQL
|
||||
dailyMakes100: MedalGQL
|
||||
dailyMakes150: MedalGQL
|
||||
dailyMakes200: MedalGQL
|
||||
dailyMakes250: MedalGQL
|
||||
}
|
||||
|
||||
type MedalGQL {
|
||||
count: Int!
|
||||
nickname: String
|
||||
}
|
||||
|
||||
input MedalScope @oneOf {
|
||||
videoId: Int
|
||||
interval: TimeInterval
|
||||
@deprecated(reason: "NO LONGER SUPPORTED, USE DATETIME_RANGE")
|
||||
datetimeRange: DatetimeRangeAggregationInput
|
||||
}
|
||||
|
||||
type GetRunsResult {
|
||||
runs: [RunGQL!]!
|
||||
count: Int
|
||||
runIds: [Int!]!
|
||||
}
|
||||
|
||||
type RunGQL {
|
||||
type VideoGQL {
|
||||
id: Int!
|
||||
runLength: Int!
|
||||
videoId: Int!
|
||||
userId: Int!
|
||||
owner: UserGQL
|
||||
name: String
|
||||
screenshotUri: String
|
||||
totalShotsMade: Int!
|
||||
totalShots: Int!
|
||||
makePercentage: Float!
|
||||
medianRun: Float
|
||||
averageTimeBetweenShots: Float
|
||||
averageDifficulty: Float
|
||||
createdAt: DateTime
|
||||
updatedAt: DateTime
|
||||
shots: [ShotGQL!]!
|
||||
video: VideoGQL!
|
||||
user: UserGQL!
|
||||
startTime: DateTime
|
||||
endTime: DateTime
|
||||
elapsedTime: Float
|
||||
framesPerSecond: Float!
|
||||
tableSize: Float!
|
||||
private: Boolean!
|
||||
stream: UploadStreamGQL
|
||||
playlist: HLSPlaylistGQL
|
||||
tags: [VideoTag!]!
|
||||
currentHomography: HomographyInfoGQL
|
||||
homographyHistory: [HomographyInfoGQL!]!
|
||||
currentProcessing: VideoProcessingGQL
|
||||
reactions: [ReactionGQL!]!
|
||||
comments: [CommentGQL!]!
|
||||
}
|
||||
|
||||
type UserGQL {
|
||||
id: Int!
|
||||
firebaseUid: String
|
||||
username: String!
|
||||
isAdmin: Boolean
|
||||
fargoRating: Int
|
||||
activeVideoId: Int
|
||||
profileImageUri: String
|
||||
createdAt: DateTime
|
||||
updatedAt: DateTime
|
||||
videosPrivateByDefault: Boolean
|
||||
following: [UserGQL!]
|
||||
followers: [UserGQL!]
|
||||
}
|
||||
|
||||
type ShotGQL {
|
||||
@@ -423,21 +412,6 @@ type SerializedShotPathsGQL {
|
||||
b64EncodedBuffer: String
|
||||
}
|
||||
|
||||
type UserGQL {
|
||||
id: Int!
|
||||
firebaseUid: String
|
||||
username: String!
|
||||
isAdmin: Boolean
|
||||
fargoRating: Int
|
||||
activeVideoId: Int
|
||||
profileImageUri: String
|
||||
createdAt: DateTime
|
||||
updatedAt: DateTime
|
||||
videosPrivateByDefault: Boolean
|
||||
following: [UserGQL!]
|
||||
followers: [UserGQL!]
|
||||
}
|
||||
|
||||
type ShotAnnotationGQL {
|
||||
shotId: Int!
|
||||
type: ShotAnnotationTypeGQL!
|
||||
@@ -453,34 +427,19 @@ type ShotAnnotationTypeGQL {
|
||||
name: String!
|
||||
}
|
||||
|
||||
type VideoGQL {
|
||||
type RunGQL {
|
||||
id: Int!
|
||||
owner: UserGQL
|
||||
name: String
|
||||
screenshotUri: String
|
||||
totalShotsMade: Int!
|
||||
totalShots: Int!
|
||||
makePercentage: Float!
|
||||
medianRun: Float
|
||||
averageTimeBetweenShots: Float
|
||||
averageDifficulty: Float
|
||||
createdAt: DateTime
|
||||
updatedAt: DateTime
|
||||
runLength: Int!
|
||||
videoId: Int!
|
||||
userId: Int!
|
||||
shots: [ShotGQL!]!
|
||||
startTime: DateTime
|
||||
endTime: DateTime
|
||||
elapsedTime: Float
|
||||
framesPerSecond: Float!
|
||||
tableSize: Float!
|
||||
private: Boolean!
|
||||
stream: UploadStreamGQL
|
||||
playlist: HLSPlaylistGQL
|
||||
tags: [VideoTag!]!
|
||||
currentHomography: HomographyInfoGQL
|
||||
homographyHistory: [HomographyInfoGQL!]!
|
||||
currentProcessing: VideoProcessingGQL
|
||||
reactions: [ReactionGQL!]!
|
||||
comments: [CommentGQL!]!
|
||||
video: VideoGQL!
|
||||
user: UserGQL!
|
||||
}
|
||||
|
||||
type RunFeaturesGQL {
|
||||
runId: Int!
|
||||
indexInRun: Int!
|
||||
}
|
||||
|
||||
type UploadStreamGQL {
|
||||
@@ -622,15 +581,6 @@ type ReactionGQL {
|
||||
updatedAt: DateTime
|
||||
}
|
||||
|
||||
type CommentGQL {
|
||||
id: Int!
|
||||
user: UserGQL!
|
||||
message: String!
|
||||
replies: [CommentGQL!]!
|
||||
createdAt: DateTime
|
||||
updatedAt: DateTime
|
||||
}
|
||||
|
||||
enum ReactionEnum {
|
||||
LIKE
|
||||
HEART
|
||||
@@ -638,9 +588,107 @@ enum ReactionEnum {
|
||||
HUNDRED
|
||||
}
|
||||
|
||||
type RunFeaturesGQL {
|
||||
runId: Int!
|
||||
indexInRun: Int!
|
||||
type CommentGQL {
|
||||
id: Int!
|
||||
user: UserGQL!
|
||||
message: String!
|
||||
replies: [CommentGQL!]!
|
||||
}
|
||||
|
||||
type PageInfoGQL {
|
||||
hasNextPage: Boolean!
|
||||
endCursor: String
|
||||
}
|
||||
|
||||
enum IncludePrivateEnum {
|
||||
ALL
|
||||
MINE
|
||||
NONE
|
||||
}
|
||||
|
||||
input VideoFilterInput {
|
||||
isStreamCompleted: Boolean = null
|
||||
requireCursorCompletion: Boolean! = true
|
||||
createdAt: DateRangeFilter = null
|
||||
excludeVideosWithNoShots: Boolean = null
|
||||
}
|
||||
|
||||
input VideoFeedInputGQL @oneOf {
|
||||
followedByUserId: Int
|
||||
userId: Int
|
||||
allUsers: Boolean
|
||||
}
|
||||
|
||||
type MakePercentageIntervalGQL {
|
||||
makePercentage: Float!
|
||||
elapsedTime: Float!
|
||||
}
|
||||
|
||||
type RunLeaderboardGQL {
|
||||
entries: [RunGQL!]!
|
||||
}
|
||||
|
||||
type CountLeaderboardGQL {
|
||||
entries: [UserShotCountEntry!]!
|
||||
}
|
||||
|
||||
type UserShotCountEntry {
|
||||
user: UserGQL!
|
||||
value: Int!
|
||||
total: Int!
|
||||
proportionMade: Float!
|
||||
videos: Int!
|
||||
}
|
||||
|
||||
type RequestedMedalsGQL {
|
||||
distanceOver66: MedalGQL
|
||||
distanceOver78: MedalGQL
|
||||
distanceOver90: MedalGQL
|
||||
runLength3: MedalGQL
|
||||
runLength5: MedalGQL
|
||||
runLength8: MedalGQL
|
||||
runLength10: MedalGQL
|
||||
runLength15: MedalGQL
|
||||
runLength20: MedalGQL
|
||||
runLength25: MedalGQL
|
||||
runLength30: MedalGQL
|
||||
runLength40: MedalGQL
|
||||
runLength50: MedalGQL
|
||||
totalMakes25: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes50: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes75: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes200: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes300: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes400: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes750: MedalGQL @deprecated(reason: "no longer supported")
|
||||
totalMakes100: MedalGQL
|
||||
totalMakes500: MedalGQL
|
||||
totalMakes1000: MedalGQL
|
||||
totalMakes5000: MedalGQL
|
||||
totalMakes10000: MedalGQL
|
||||
dailyMakes50: MedalGQL
|
||||
dailyMakes100: MedalGQL
|
||||
dailyMakes150: MedalGQL
|
||||
dailyMakes200: MedalGQL
|
||||
dailyMakes250: MedalGQL
|
||||
}
|
||||
|
||||
type MedalGQL {
|
||||
count: Int!
|
||||
nickname: String
|
||||
}
|
||||
|
||||
input MedalScope @oneOf {
|
||||
videoId: Int
|
||||
interval: TimeInterval
|
||||
@deprecated(reason: "NO LONGER SUPPORTED, USE DATETIME_RANGE")
|
||||
datetimeRange: DatetimeRangeAggregationInput
|
||||
}
|
||||
|
||||
type GetRunsResult {
|
||||
runs: [RunGQL!]!
|
||||
count: Int
|
||||
runIds: [Int!]!
|
||||
}
|
||||
|
||||
input RunFilterInput {
|
||||
@@ -675,6 +723,39 @@ input DatetimeOrdering {
|
||||
startingAt: DateTime = null
|
||||
}
|
||||
|
||||
type TableStateGQL {
|
||||
identifierToPosition: [[Float!]!]!
|
||||
homography: HomographyInfoGQL
|
||||
}
|
||||
|
||||
input HomographyInputGQL {
|
||||
crop: BoundingBoxInputGQL!
|
||||
pockets: [BoundingBoxInputGQL!]!
|
||||
sourcePoints: PocketPointsInputGQL!
|
||||
destPoints: PocketPointsInputGQL!
|
||||
}
|
||||
|
||||
input BoundingBoxInputGQL {
|
||||
left: Float!
|
||||
top: Float!
|
||||
width: Float!
|
||||
height: Float!
|
||||
}
|
||||
|
||||
input PocketPointsInputGQL {
|
||||
topLeft: IntPoint2DInput!
|
||||
topSide: IntPoint2DInput!
|
||||
topRight: IntPoint2DInput!
|
||||
bottomLeft: IntPoint2DInput!
|
||||
bottomSide: IntPoint2DInput!
|
||||
bottomRight: IntPoint2DInput!
|
||||
}
|
||||
|
||||
input IntPoint2DInput {
|
||||
x: Int!
|
||||
y: Int!
|
||||
}
|
||||
|
||||
type GetShotsResult {
|
||||
shots: [ShotGQL!]!
|
||||
count: Int
|
||||
@@ -724,23 +805,6 @@ type UserPlayTimeGQL {
|
||||
totalSeconds: Float!
|
||||
}
|
||||
|
||||
input VideoFilterInput {
|
||||
isStreamCompleted: Boolean = null
|
||||
requireCursorCompletion: Boolean! = true
|
||||
createdAt: DateRangeFilter = null
|
||||
excludeVideosWithNoShots: Boolean = null
|
||||
}
|
||||
|
||||
type VideoHistoryGQL {
|
||||
videos: [VideoGQL!]!
|
||||
pageInfo: PageInfoGQL!
|
||||
}
|
||||
|
||||
type PageInfoGQL {
|
||||
hasNextPage: Boolean!
|
||||
endCursor: String
|
||||
}
|
||||
|
||||
type TagGQL {
|
||||
id: Int!
|
||||
name: String!
|
||||
@@ -761,41 +825,17 @@ scalar JSON
|
||||
url: "https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf"
|
||||
)
|
||||
|
||||
enum IncludePrivateEnum {
|
||||
ALL
|
||||
MINE
|
||||
NONE
|
||||
}
|
||||
|
||||
input VideoFeedInputGQL @oneOf {
|
||||
followedByUserId: Int
|
||||
userId: Int
|
||||
allUsers: Boolean
|
||||
}
|
||||
|
||||
type RunLeaderboardGQL {
|
||||
entries: [RunGQL!]!
|
||||
}
|
||||
|
||||
type CountLeaderboardGQL {
|
||||
entries: [UserShotCountEntry!]!
|
||||
}
|
||||
|
||||
type UserShotCountEntry {
|
||||
user: UserGQL!
|
||||
value: Int!
|
||||
total: Int!
|
||||
proportionMade: Float!
|
||||
videos: Int!
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
createBucketSet(params: CreateBucketSetInput!): BucketSetGQL!
|
||||
setLoggerLevel(path: String!, level: String!): Boolean!
|
||||
editShot(
|
||||
shotId: Int!
|
||||
fieldsToEdit: EditableShotFieldInputGQL!
|
||||
): EditShotReturn!
|
||||
reactToVideo(videoId: Int!, reaction: ReactionEnum): Boolean!
|
||||
commentOnVideo(
|
||||
videoId: Int!
|
||||
message: String!
|
||||
parentCommentId: Int
|
||||
): Boolean!
|
||||
editComment(videoId: Int!, commentId: Int!, newMessage: String!): Boolean!
|
||||
deleteComment(videoId: Int!, commentId: Int!): Boolean!
|
||||
addAnnotationToShot(
|
||||
shotId: Int!
|
||||
annotationName: String!
|
||||
@@ -805,6 +845,10 @@ type Mutation {
|
||||
shotId: Int!
|
||||
annotations: [UpdateAnnotationInputGQL!]!
|
||||
): UpdateShotAnnotationReturn!
|
||||
editShot(
|
||||
shotId: Int!
|
||||
fieldsToEdit: EditableShotFieldInputGQL!
|
||||
): EditShotReturn!
|
||||
getProfileImageUploadLink(
|
||||
fileExt: String = ".png"
|
||||
): GetProfileUploadLinkReturn!
|
||||
@@ -827,14 +871,6 @@ type Mutation {
|
||||
editUploadStream(videoId: Int!, videoMetadata: VideoMetadataInput!): Boolean!
|
||||
deleteVideo(videoId: Int!): Boolean!
|
||||
deleteTags(videoId: Int!, tagsToDelete: [VideoTagInput!]!): Boolean!
|
||||
reactToVideo(videoId: Int!, reaction: ReactionEnum): Boolean!
|
||||
commentOnVideo(
|
||||
videoId: Int!
|
||||
message: String!
|
||||
parentCommentId: Int
|
||||
): Boolean!
|
||||
editComment(videoId: Int!, commentId: Int!, newMessage: String!): Boolean!
|
||||
deleteComment(videoId: Int!, commentId: Int!): Boolean!
|
||||
}
|
||||
|
||||
input CreateBucketSetInput {
|
||||
@@ -843,27 +879,6 @@ input CreateBucketSetInput {
|
||||
buckets: [BucketInputGQL!]!
|
||||
}
|
||||
|
||||
type EditShotReturn {
|
||||
shot: ShotGQL
|
||||
error: DoesNotOwnShotErr
|
||||
}
|
||||
|
||||
type DoesNotOwnShotErr {
|
||||
shotId: Int!
|
||||
msg: String
|
||||
}
|
||||
|
||||
input EditableShotFieldInputGQL {
|
||||
intendedPocketType: PocketEnum
|
||||
shotDirection: ShotDirectionEnum
|
||||
spinType: SpinTypeEnum
|
||||
targetPocketAngleDirection: ShotDirectionEnum
|
||||
make: Boolean
|
||||
backcut: Boolean
|
||||
excludeFromStats: Boolean
|
||||
notes: String
|
||||
}
|
||||
|
||||
type AddShotAnnotationReturn {
|
||||
value: SuccessfulAddAddShotAnnotationErrors!
|
||||
}
|
||||
@@ -884,6 +899,11 @@ union DoesNotOwnShotErrOtherErrorNeedsNote =
|
||||
DoesNotOwnShotErr
|
||||
| OtherErrorNeedsNote
|
||||
|
||||
type DoesNotOwnShotErr {
|
||||
shotId: Int!
|
||||
msg: String
|
||||
}
|
||||
|
||||
type OtherErrorNeedsNote {
|
||||
msg: String
|
||||
}
|
||||
@@ -898,6 +918,22 @@ input UpdateAnnotationInputGQL {
|
||||
notes: String = null
|
||||
}
|
||||
|
||||
type EditShotReturn {
|
||||
shot: ShotGQL
|
||||
error: DoesNotOwnShotErr
|
||||
}
|
||||
|
||||
input EditableShotFieldInputGQL {
|
||||
intendedPocketType: PocketEnum
|
||||
shotDirection: ShotDirectionEnum
|
||||
spinType: SpinTypeEnum
|
||||
targetPocketAngleDirection: ShotDirectionEnum
|
||||
make: Boolean
|
||||
backcut: Boolean
|
||||
excludeFromStats: Boolean
|
||||
notes: String
|
||||
}
|
||||
|
||||
type GetProfileUploadLinkReturn {
|
||||
value: UploadLinkGetProfileUploadLinkErrors!
|
||||
}
|
||||
|
Reference in New Issue
Block a user