Compare commits
15 Commits
kat/expose
...
15b307a88f
Author | SHA1 | Date | |
---|---|---|---|
15b307a88f | |||
72b338bfc2 | |||
267486774c | |||
b94a568ef1 | |||
b773ccfc8f | |||
fd5c28e073 | |||
4c232829b6 | |||
ddf1036009 | |||
9b3e5c23a0 | |||
a7eae9d46b | |||
8c3e9d6273 | |||
f306cc6c16 | |||
643cdb29e3 | |||
89287a0100 | |||
41169e2848 |
156
src/index.tsx
156
src/index.tsx
@@ -124,6 +124,7 @@ export type CueObjectFeaturesGql = {
|
||||
cueObjectAngle?: Maybe<Scalars["Float"]["output"]>;
|
||||
cueObjectDistance?: Maybe<Scalars["Float"]["output"]>;
|
||||
shotDirection?: Maybe<ShotDirectionEnum>;
|
||||
spinType?: Maybe<SpinTypeEnum>;
|
||||
};
|
||||
|
||||
export type DeployedConfigGql = {
|
||||
@@ -949,7 +950,7 @@ export type FilterInput =
|
||||
notFilter?: never;
|
||||
orFilters?: never;
|
||||
shotDirection?: never;
|
||||
spinType: Array<Scalars["String"]["input"]>;
|
||||
spinType: Array<SpinTypeEnum>;
|
||||
tableSize?: never;
|
||||
tags?: never;
|
||||
targetPocketDistance?: never;
|
||||
@@ -1132,9 +1133,15 @@ export type GetShotsPagination = {
|
||||
startFrameAfter: Scalars["Int"]["input"];
|
||||
};
|
||||
|
||||
export type GetShotsResult = {
|
||||
__typename?: "GetShotsResult";
|
||||
count?: Maybe<Scalars["Int"]["output"]>;
|
||||
shots: Array<ShotGql>;
|
||||
};
|
||||
|
||||
export type GetUploadLinkErrors = {
|
||||
__typename?: "GetUploadLinkErrors";
|
||||
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErr;
|
||||
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr;
|
||||
};
|
||||
|
||||
export type GetUploadLinkReturn = {
|
||||
@@ -1171,6 +1178,11 @@ export enum InitPlaylistUploadStatusEnum {
|
||||
Uploaded = "UPLOADED",
|
||||
}
|
||||
|
||||
export type InitUploadAlreadyCompletedErr = {
|
||||
__typename?: "InitUploadAlreadyCompletedErr";
|
||||
segmentType: StreamSegmentTypeEnum;
|
||||
};
|
||||
|
||||
export type IntPoint2D = {
|
||||
__typename?: "IntPoint2D";
|
||||
x: Scalars["Int"]["output"];
|
||||
@@ -1189,12 +1201,14 @@ export type MustHaveSetForUploadLinkErr = {
|
||||
resolution?: Maybe<Scalars["Boolean"]["output"]>;
|
||||
};
|
||||
|
||||
export type MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErr =
|
||||
export type MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr =
|
||||
|
||||
| InitUploadAlreadyCompletedErr
|
||||
| MustHaveSetForUploadLinkErr
|
||||
| NoInitForChunkedUploadErr
|
||||
| ProcessingFailedErr
|
||||
| SegmentAlreadyUploadedErr
|
||||
| TooManyInitUploadsErr
|
||||
| TooManyProfileImageUploadsErr;
|
||||
|
||||
export type Mutation = {
|
||||
@@ -1327,6 +1341,7 @@ export type Query = {
|
||||
getPlayTime: UserPlayTimeGql;
|
||||
getShotAnnotationTypes: Array<ShotAnnotationTypeGql>;
|
||||
getShots: Array<ShotGql>;
|
||||
getShotsWithMetadata: GetShotsResult;
|
||||
getUser?: Maybe<UserGql>;
|
||||
getUserTags: Array<TagGql>;
|
||||
getUserVideos: VideoHistoryGql;
|
||||
@@ -1359,6 +1374,12 @@ export type QueryGetShotsArgs = {
|
||||
shotsPagination?: InputMaybe<GetShotsPagination>;
|
||||
};
|
||||
|
||||
export type QueryGetShotsWithMetadataArgs = {
|
||||
filterInput: FilterInput;
|
||||
limit?: Scalars["Int"]["input"];
|
||||
shotsPagination?: InputMaybe<GetShotsPagination>;
|
||||
};
|
||||
|
||||
export type QueryGetUserArgs = {
|
||||
userId: Scalars["Int"]["input"];
|
||||
};
|
||||
@@ -1458,6 +1479,13 @@ export type ShotGql = {
|
||||
videoId: Scalars["Int"]["output"];
|
||||
};
|
||||
|
||||
export enum SpinTypeEnum {
|
||||
Center = "CENTER",
|
||||
Draw = "DRAW",
|
||||
Follow = "FOLLOW",
|
||||
Unknown = "UNKNOWN",
|
||||
}
|
||||
|
||||
export type StreamErrorGql = {
|
||||
__typename?: "StreamErrorGQL";
|
||||
message: Scalars["String"]["output"];
|
||||
@@ -1491,6 +1519,11 @@ export type TargetMetricsGql = {
|
||||
makePercentage?: Maybe<Scalars["Float"]["output"]>;
|
||||
};
|
||||
|
||||
export type TooManyInitUploadsErr = {
|
||||
__typename?: "TooManyInitUploadsErr";
|
||||
linksRequested: Scalars["Int"]["output"];
|
||||
};
|
||||
|
||||
export type TooManyProfileImageUploadsErr = {
|
||||
__typename?: "TooManyProfileImageUploadsErr";
|
||||
linksRequested: Scalars["Int"]["output"];
|
||||
@@ -1576,6 +1609,7 @@ export type VideoGql = {
|
||||
__typename?: "VideoGQL";
|
||||
averageTimeBetweenShots?: Maybe<Scalars["Float"]["output"]>;
|
||||
createdAt?: Maybe<Scalars["DateTime"]["output"]>;
|
||||
currentHomography?: Maybe<HomographyInfoGql>;
|
||||
currentProcessing?: Maybe<VideoProcessingGql>;
|
||||
elapsedTime?: Maybe<Scalars["Float"]["output"]>;
|
||||
endTime?: Maybe<Scalars["DateTime"]["output"]>;
|
||||
@@ -1777,6 +1811,7 @@ export type GetShotsQueryVariables = Exact<{
|
||||
includeCueObjectDistance?: Scalars["Boolean"]["input"];
|
||||
includeCueObjectAngle?: Scalars["Boolean"]["input"];
|
||||
includeCueBallSpeed?: Scalars["Boolean"]["input"];
|
||||
includeSpinType?: Scalars["Boolean"]["input"];
|
||||
includeShotDirection?: Scalars["Boolean"]["input"];
|
||||
includeTargetPocketDistance?: Scalars["Boolean"]["input"];
|
||||
includeMake?: Scalars["Boolean"]["input"];
|
||||
@@ -1812,6 +1847,7 @@ export type GetShotsQuery = {
|
||||
cueObjectAngle?: number | null;
|
||||
cueBallSpeed?: number | null;
|
||||
shotDirection?: ShotDirectionEnum | null;
|
||||
spinType?: SpinTypeEnum | null;
|
||||
} | null;
|
||||
pocketingIntentionFeatures?: {
|
||||
__typename?: "PocketingIntentionFeaturesGQL";
|
||||
@@ -1822,6 +1858,25 @@ export type GetShotsQuery = {
|
||||
}>;
|
||||
};
|
||||
|
||||
export type GetSerializedShotPathsQueryVariables = Exact<{
|
||||
filterInput: FilterInput;
|
||||
}>;
|
||||
|
||||
export type GetSerializedShotPathsQuery = {
|
||||
__typename?: "Query";
|
||||
getShots: Array<{
|
||||
__typename?: "ShotGQL";
|
||||
id: number;
|
||||
videoId: number;
|
||||
startFrame: number;
|
||||
endFrame: number;
|
||||
serializedShotPaths?: {
|
||||
__typename?: "SerializedShotPathsGQL";
|
||||
b64EncodedBuffer?: string | null;
|
||||
} | null;
|
||||
}>;
|
||||
};
|
||||
|
||||
export type GetShotAnnotationTypesQueryVariables = Exact<{
|
||||
[key: string]: never;
|
||||
}>;
|
||||
@@ -2224,6 +2279,7 @@ export type GetUploadLinkMutation = {
|
||||
| {
|
||||
__typename?: "GetUploadLinkErrors";
|
||||
error:
|
||||
| { __typename?: "InitUploadAlreadyCompletedErr" }
|
||||
| {
|
||||
__typename?: "MustHaveSetForUploadLinkErr";
|
||||
resolution?: boolean | null;
|
||||
@@ -2242,6 +2298,7 @@ export type GetUploadLinkMutation = {
|
||||
};
|
||||
}
|
||||
| { __typename?: "SegmentAlreadyUploadedErr"; segmentId: number }
|
||||
| { __typename?: "TooManyInitUploadsErr" }
|
||||
| { __typename?: "TooManyProfileImageUploadsErr" };
|
||||
}
|
||||
| {
|
||||
@@ -2272,6 +2329,10 @@ export type GetHlsInitUploadLinkMutation = {
|
||||
| {
|
||||
__typename?: "GetUploadLinkErrors";
|
||||
error:
|
||||
| {
|
||||
__typename?: "InitUploadAlreadyCompletedErr";
|
||||
segmentType: StreamSegmentTypeEnum;
|
||||
}
|
||||
| { __typename?: "MustHaveSetForUploadLinkErr" }
|
||||
| {
|
||||
__typename?: "NoInitForChunkedUploadErr";
|
||||
@@ -2279,6 +2340,7 @@ export type GetHlsInitUploadLinkMutation = {
|
||||
}
|
||||
| { __typename?: "ProcessingFailedErr" }
|
||||
| { __typename?: "SegmentAlreadyUploadedErr" }
|
||||
| { __typename?: "TooManyInitUploadsErr"; linksRequested: number }
|
||||
| { __typename?: "TooManyProfileImageUploadsErr" };
|
||||
}
|
||||
| {
|
||||
@@ -2715,6 +2777,7 @@ export const GetShotsDocument = gql`
|
||||
$includeCueObjectDistance: Boolean! = false
|
||||
$includeCueObjectAngle: Boolean! = false
|
||||
$includeCueBallSpeed: Boolean! = false
|
||||
$includeSpinType: Boolean! = false
|
||||
$includeShotDirection: Boolean! = false
|
||||
$includeTargetPocketDistance: Boolean! = false
|
||||
$includeMake: Boolean! = false
|
||||
@@ -2748,6 +2811,7 @@ export const GetShotsDocument = gql`
|
||||
cueObjectAngle @include(if: $includeCueObjectAngle)
|
||||
cueBallSpeed @include(if: $includeCueBallSpeed)
|
||||
shotDirection @include(if: $includeShotDirection)
|
||||
spinType @include(if: $includeSpinType)
|
||||
}
|
||||
pocketingIntentionFeatures
|
||||
@include(if: $includePocketingIntentionFeatures) {
|
||||
@@ -2781,6 +2845,7 @@ export const GetShotsDocument = gql`
|
||||
* includeCueObjectDistance: // value for 'includeCueObjectDistance'
|
||||
* includeCueObjectAngle: // value for 'includeCueObjectAngle'
|
||||
* includeCueBallSpeed: // value for 'includeCueBallSpeed'
|
||||
* includeSpinType: // value for 'includeSpinType'
|
||||
* includeShotDirection: // value for 'includeShotDirection'
|
||||
* includeTargetPocketDistance: // value for 'includeTargetPocketDistance'
|
||||
* includeMake: // value for 'includeMake'
|
||||
@@ -2832,6 +2897,85 @@ export type GetShotsQueryResult = Apollo.QueryResult<
|
||||
GetShotsQuery,
|
||||
GetShotsQueryVariables
|
||||
>;
|
||||
export const GetSerializedShotPathsDocument = gql`
|
||||
query GetSerializedShotPaths($filterInput: FilterInput!) {
|
||||
getShots(filterInput: $filterInput) {
|
||||
id
|
||||
videoId
|
||||
startFrame
|
||||
endFrame
|
||||
serializedShotPaths {
|
||||
b64EncodedBuffer
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useGetSerializedShotPathsQuery__
|
||||
*
|
||||
* To run a query within a React component, call `useGetSerializedShotPathsQuery` and pass it any options that fit your needs.
|
||||
* When your component renders, `useGetSerializedShotPathsQuery` 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 } = useGetSerializedShotPathsQuery({
|
||||
* variables: {
|
||||
* filterInput: // value for 'filterInput'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useGetSerializedShotPathsQuery(
|
||||
baseOptions: Apollo.QueryHookOptions<
|
||||
GetSerializedShotPathsQuery,
|
||||
GetSerializedShotPathsQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useQuery<
|
||||
GetSerializedShotPathsQuery,
|
||||
GetSerializedShotPathsQueryVariables
|
||||
>(GetSerializedShotPathsDocument, options);
|
||||
}
|
||||
export function useGetSerializedShotPathsLazyQuery(
|
||||
baseOptions?: Apollo.LazyQueryHookOptions<
|
||||
GetSerializedShotPathsQuery,
|
||||
GetSerializedShotPathsQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useLazyQuery<
|
||||
GetSerializedShotPathsQuery,
|
||||
GetSerializedShotPathsQueryVariables
|
||||
>(GetSerializedShotPathsDocument, options);
|
||||
}
|
||||
export function useGetSerializedShotPathsSuspenseQuery(
|
||||
baseOptions?: Apollo.SuspenseQueryHookOptions<
|
||||
GetSerializedShotPathsQuery,
|
||||
GetSerializedShotPathsQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useSuspenseQuery<
|
||||
GetSerializedShotPathsQuery,
|
||||
GetSerializedShotPathsQueryVariables
|
||||
>(GetSerializedShotPathsDocument, options);
|
||||
}
|
||||
export type GetSerializedShotPathsQueryHookResult = ReturnType<
|
||||
typeof useGetSerializedShotPathsQuery
|
||||
>;
|
||||
export type GetSerializedShotPathsLazyQueryHookResult = ReturnType<
|
||||
typeof useGetSerializedShotPathsLazyQuery
|
||||
>;
|
||||
export type GetSerializedShotPathsSuspenseQueryHookResult = ReturnType<
|
||||
typeof useGetSerializedShotPathsSuspenseQuery
|
||||
>;
|
||||
export type GetSerializedShotPathsQueryResult = Apollo.QueryResult<
|
||||
GetSerializedShotPathsQuery,
|
||||
GetSerializedShotPathsQueryVariables
|
||||
>;
|
||||
export const GetShotAnnotationTypesDocument = gql`
|
||||
query GetShotAnnotationTypes {
|
||||
getShotAnnotationTypes {
|
||||
@@ -4282,6 +4426,12 @@ export const GetHlsInitUploadLinkDocument = gql`
|
||||
... on NoInitForChunkedUploadErr {
|
||||
segmentType
|
||||
}
|
||||
... on InitUploadAlreadyCompletedErr {
|
||||
segmentType
|
||||
}
|
||||
... on TooManyInitUploadsErr {
|
||||
linksRequested
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -9,6 +9,7 @@ query GetShots(
|
||||
$includeCueObjectDistance: Boolean! = false
|
||||
$includeCueObjectAngle: Boolean! = false
|
||||
$includeCueBallSpeed: Boolean! = false
|
||||
$includeSpinType: Boolean! = false
|
||||
$includeShotDirection: Boolean! = false
|
||||
$includeTargetPocketDistance: Boolean! = false
|
||||
$includeMake: Boolean! = false
|
||||
@@ -42,6 +43,7 @@ query GetShots(
|
||||
cueObjectAngle @include(if: $includeCueObjectAngle)
|
||||
cueBallSpeed @include(if: $includeCueBallSpeed)
|
||||
shotDirection @include(if: $includeShotDirection)
|
||||
spinType @include(if: $includeSpinType)
|
||||
}
|
||||
pocketingIntentionFeatures
|
||||
@include(if: $includePocketingIntentionFeatures) {
|
||||
@@ -52,6 +54,18 @@ query GetShots(
|
||||
}
|
||||
}
|
||||
|
||||
query GetSerializedShotPaths($filterInput: FilterInput!) {
|
||||
getShots(filterInput: $filterInput) {
|
||||
id
|
||||
videoId
|
||||
startFrame
|
||||
endFrame
|
||||
serializedShotPaths {
|
||||
b64EncodedBuffer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
query GetShotAnnotationTypes {
|
||||
getShotAnnotationTypes {
|
||||
id
|
||||
|
@@ -55,6 +55,12 @@ mutation GetHlsInitUploadLink($videoId: Int!) {
|
||||
... on NoInitForChunkedUploadErr {
|
||||
segmentType
|
||||
}
|
||||
... on InitUploadAlreadyCompletedErr {
|
||||
segmentType
|
||||
}
|
||||
... on TooManyInitUploadsErr {
|
||||
linksRequested
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -9,6 +9,11 @@ type Query {
|
||||
videoId: ID!
|
||||
intervalDuration: Int! = 300
|
||||
): [MakePercentageIntervalGQL!]!
|
||||
getShotsWithMetadata(
|
||||
filterInput: FilterInput!
|
||||
shotsPagination: GetShotsPagination = null
|
||||
limit: Int! = 500
|
||||
): GetShotsResult!
|
||||
getShots(
|
||||
filterInput: FilterInput!
|
||||
shotsPagination: GetShotsPagination = null
|
||||
@@ -102,8 +107,8 @@ input FilterInput @oneOf {
|
||||
kickAngle: RangeFilter
|
||||
kickDistance: RangeFilter
|
||||
cueAngleAfterObject: RangeFilter
|
||||
spinType: [SpinTypeEnum!]
|
||||
cueSpeedAfterObject: RangeFilter
|
||||
spinType: [String!]
|
||||
falsePositiveScore: RangeFilter
|
||||
}
|
||||
|
||||
@@ -140,6 +145,13 @@ input ShotAnnotationInput {
|
||||
name: String!
|
||||
}
|
||||
|
||||
enum SpinTypeEnum {
|
||||
DRAW
|
||||
FOLLOW
|
||||
CENTER
|
||||
UNKNOWN
|
||||
}
|
||||
|
||||
type BucketSetGQL {
|
||||
keyName: String!
|
||||
feature: String!
|
||||
@@ -164,6 +176,11 @@ type MakePercentageIntervalGQL {
|
||||
elapsedTime: Float!
|
||||
}
|
||||
|
||||
type GetShotsResult {
|
||||
shots: [ShotGQL!]!
|
||||
count: Int
|
||||
}
|
||||
|
||||
type ShotGQL {
|
||||
id: Int!
|
||||
videoId: Int!
|
||||
@@ -191,6 +208,7 @@ type CueObjectFeaturesGQL {
|
||||
cueObjectAngle: Float
|
||||
cueBallSpeed: Float
|
||||
shotDirection: ShotDirectionEnum
|
||||
spinType: SpinTypeEnum
|
||||
}
|
||||
|
||||
type PocketingIntentionFeaturesGQL {
|
||||
@@ -262,6 +280,7 @@ type VideoGQL {
|
||||
stream: UploadStreamGQL
|
||||
playlist: HLSPlaylistGQL
|
||||
tags: [VideoTag!]!
|
||||
currentHomography: HomographyInfoGQL
|
||||
homographyHistory: [HomographyInfoGQL!]!
|
||||
currentProcessing: VideoProcessingGQL
|
||||
}
|
||||
@@ -568,15 +587,17 @@ type GetUploadLinkReturn {
|
||||
union UploadLinkGetUploadLinkErrors = UploadLink | GetUploadLinkErrors
|
||||
|
||||
type GetUploadLinkErrors {
|
||||
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErr!
|
||||
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr!
|
||||
}
|
||||
|
||||
union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErr =
|
||||
union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr =
|
||||
MustHaveSetForUploadLinkErr
|
||||
| SegmentAlreadyUploadedErr
|
||||
| ProcessingFailedErr
|
||||
| NoInitForChunkedUploadErr
|
||||
| TooManyProfileImageUploadsErr
|
||||
| InitUploadAlreadyCompletedErr
|
||||
| TooManyInitUploadsErr
|
||||
|
||||
type MustHaveSetForUploadLinkErr {
|
||||
resolution: Boolean
|
||||
@@ -594,3 +615,11 @@ type ProcessingFailedErr {
|
||||
type NoInitForChunkedUploadErr {
|
||||
segmentType: StreamSegmentTypeEnum!
|
||||
}
|
||||
|
||||
type InitUploadAlreadyCompletedErr {
|
||||
segmentType: StreamSegmentTypeEnum!
|
||||
}
|
||||
|
||||
type TooManyInitUploadsErr {
|
||||
linksRequested: Int!
|
||||
}
|
||||
|
Reference in New Issue
Block a user