Compare commits
18 Commits
c0ee55069e
...
kat/update
| Author | SHA1 | Date | |
|---|---|---|---|
| 14863e3357 | |||
|
|
58f01c567c | ||
| 937368c753 | |||
| d8c11875d4 | |||
| bacd9e77f0 | |||
| 69d755ba32 | |||
| 31fb95e3b0 | |||
| 7d0f9870dd | |||
| 4a493b4e8d | |||
| 341dc819a0 | |||
| b58aecf7a5 | |||
| 301c017d5e | |||
| 1a4b676635 | |||
| ce54bef0b4 | |||
| 2699d29d7b | |||
| 63a07d58ca | |||
| 59fe332fe0 | |||
| 33723f4ea2 |
517
src/index.tsx
517
src/index.tsx
@@ -72,6 +72,12 @@ export type AggregationInput =
|
|||||||
}
|
}
|
||||||
| { bucketSet?: never; datetimeRange?: never; enum: EnumAggregation };
|
| { bucketSet?: never; datetimeRange?: never; enum: EnumAggregation };
|
||||||
|
|
||||||
|
export enum AlignedIntervalEnum {
|
||||||
|
Month = "MONTH",
|
||||||
|
Week = "WEEK",
|
||||||
|
Year = "YEAR",
|
||||||
|
}
|
||||||
|
|
||||||
export type BankFeaturesGql = {
|
export type BankFeaturesGql = {
|
||||||
__typename?: "BankFeaturesGQL";
|
__typename?: "BankFeaturesGQL";
|
||||||
bankAngle: Scalars["Float"]["output"];
|
bankAngle: Scalars["Float"]["output"];
|
||||||
@@ -1503,6 +1509,7 @@ export type GetShotsPagination = {
|
|||||||
export type GetShotsResult = {
|
export type GetShotsResult = {
|
||||||
__typename?: "GetShotsResult";
|
__typename?: "GetShotsResult";
|
||||||
count?: Maybe<Scalars["Int"]["output"]>;
|
count?: Maybe<Scalars["Int"]["output"]>;
|
||||||
|
ids: Array<Scalars["Int"]["output"]>;
|
||||||
shots: Array<ShotGql>;
|
shots: Array<ShotGql>;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -1727,6 +1734,7 @@ export type Query = {
|
|||||||
getPlayTime: UserPlayTimeGql;
|
getPlayTime: UserPlayTimeGql;
|
||||||
getShotAnnotationTypes: Array<ShotAnnotationTypeGql>;
|
getShotAnnotationTypes: Array<ShotAnnotationTypeGql>;
|
||||||
getShots: Array<ShotGql>;
|
getShots: Array<ShotGql>;
|
||||||
|
getShotsByIds: Array<ShotGql>;
|
||||||
getShotsWithMetadata: GetShotsResult;
|
getShotsWithMetadata: GetShotsResult;
|
||||||
getUser?: Maybe<UserGql>;
|
getUser?: Maybe<UserGql>;
|
||||||
getUserTags: Array<TagGql>;
|
getUserTags: Array<TagGql>;
|
||||||
@@ -1760,8 +1768,13 @@ export type QueryGetShotsArgs = {
|
|||||||
shotsPagination?: InputMaybe<GetShotsPagination>;
|
shotsPagination?: InputMaybe<GetShotsPagination>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type QueryGetShotsByIdsArgs = {
|
||||||
|
ids: Array<Scalars["Int"]["input"]>;
|
||||||
|
};
|
||||||
|
|
||||||
export type QueryGetShotsWithMetadataArgs = {
|
export type QueryGetShotsWithMetadataArgs = {
|
||||||
filterInput: FilterInput;
|
filterInput: FilterInput;
|
||||||
|
ids?: InputMaybe<Array<Scalars["Int"]["input"]>>;
|
||||||
limit?: Scalars["Int"]["input"];
|
limit?: Scalars["Int"]["input"];
|
||||||
shotsPagination?: InputMaybe<GetShotsPagination>;
|
shotsPagination?: InputMaybe<GetShotsPagination>;
|
||||||
};
|
};
|
||||||
@@ -1914,20 +1927,17 @@ export type TargetMetricsGql = {
|
|||||||
spinTypeCounts?: Maybe<SpinTypeCountsGql>;
|
spinTypeCounts?: Maybe<SpinTypeCountsGql>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TimeInterval = {
|
export type TimeDeltaGql = {
|
||||||
/** True eg 1/15-3/15 => [(1/15,1/31), (2/1,2/28), (3/1,3/15)] False eg 1/15-2/15 => [(1/15,2/14), (2/14,3/15)] */
|
|
||||||
calendarAlignedMonths?: Scalars["Boolean"]["input"];
|
|
||||||
days?: InputMaybe<Scalars["Int"]["input"]>;
|
days?: InputMaybe<Scalars["Int"]["input"]>;
|
||||||
hours?: InputMaybe<Scalars["Int"]["input"]>;
|
|
||||||
minutes?: InputMaybe<Scalars["Int"]["input"]>;
|
|
||||||
months?: InputMaybe<Scalars["Int"]["input"]>;
|
months?: InputMaybe<Scalars["Int"]["input"]>;
|
||||||
/** A second is the base unit and cannot be subdivided */
|
|
||||||
seconds?: InputMaybe<Scalars["Int"]["input"]>;
|
|
||||||
weeks?: InputMaybe<Scalars["Int"]["input"]>;
|
weeks?: InputMaybe<Scalars["Int"]["input"]>;
|
||||||
/** Assumes a year is 365 days long */
|
|
||||||
years?: InputMaybe<Scalars["Int"]["input"]>;
|
years?: InputMaybe<Scalars["Int"]["input"]>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type TimeInterval =
|
||||||
|
| { aligned: AlignedIntervalEnum; timedelta?: never }
|
||||||
|
| { aligned?: never; timedelta: TimeDeltaGql };
|
||||||
|
|
||||||
export type TooManyInitUploadsErr = {
|
export type TooManyInitUploadsErr = {
|
||||||
__typename?: "TooManyInitUploadsErr";
|
__typename?: "TooManyInitUploadsErr";
|
||||||
linksRequested: Scalars["Int"]["output"];
|
linksRequested: Scalars["Int"]["output"];
|
||||||
@@ -2209,64 +2219,6 @@ export type GetVideoMakePercentageIntervalsQuery = {
|
|||||||
}>;
|
}>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type GetShotsQueryVariables = Exact<{
|
|
||||||
filterInput: FilterInput;
|
|
||||||
shotsPagination?: InputMaybe<GetShotsPagination>;
|
|
||||||
limit?: InputMaybe<Scalars["Int"]["input"]>;
|
|
||||||
includeCreatedAt?: Scalars["Boolean"]["input"];
|
|
||||||
includeUpdatedAt?: Scalars["Boolean"]["input"];
|
|
||||||
includeCueObjectFeatures?: Scalars["Boolean"]["input"];
|
|
||||||
includePocketingIntentionFeatures?: Scalars["Boolean"]["input"];
|
|
||||||
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"];
|
|
||||||
includeIntendedPocketType?: Scalars["Boolean"]["input"];
|
|
||||||
}>;
|
|
||||||
|
|
||||||
export type GetShotsQuery = {
|
|
||||||
__typename?: "Query";
|
|
||||||
getShots: Array<{
|
|
||||||
__typename?: "ShotGQL";
|
|
||||||
id: number;
|
|
||||||
videoId: number;
|
|
||||||
startFrame: number;
|
|
||||||
endFrame: number;
|
|
||||||
falsePositiveScore?: number | null;
|
|
||||||
createdAt?: any | null;
|
|
||||||
updatedAt?: any | null;
|
|
||||||
user?: { __typename?: "UserGQL"; id: number } | null;
|
|
||||||
video?: {
|
|
||||||
__typename?: "VideoGQL";
|
|
||||||
stream?: {
|
|
||||||
__typename?: "UploadStreamGQL";
|
|
||||||
resolution: {
|
|
||||||
__typename?: "VideoResolutionGQL";
|
|
||||||
width?: number | null;
|
|
||||||
height?: number | null;
|
|
||||||
};
|
|
||||||
} | null;
|
|
||||||
} | null;
|
|
||||||
cueObjectFeatures?: {
|
|
||||||
__typename?: "CueObjectFeaturesGQL";
|
|
||||||
cueObjectDistance?: number | null;
|
|
||||||
cueObjectAngle?: number | null;
|
|
||||||
cueBallSpeed?: number | null;
|
|
||||||
shotDirection?: ShotDirectionEnum | null;
|
|
||||||
spinType?: SpinTypeEnum | null;
|
|
||||||
} | null;
|
|
||||||
pocketingIntentionFeatures?: {
|
|
||||||
__typename?: "PocketingIntentionFeaturesGQL";
|
|
||||||
targetPocketDistance?: number | null;
|
|
||||||
make?: boolean | null;
|
|
||||||
intendedPocketType?: PocketEnum | null;
|
|
||||||
} | null;
|
|
||||||
}>;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type GetSerializedShotPathsQueryVariables = Exact<{
|
export type GetSerializedShotPathsQueryVariables = Exact<{
|
||||||
filterInput: FilterInput;
|
filterInput: FilterInput;
|
||||||
}>;
|
}>;
|
||||||
@@ -2303,18 +2255,7 @@ export type GetShotsWithMetadataQueryVariables = Exact<{
|
|||||||
filterInput: FilterInput;
|
filterInput: FilterInput;
|
||||||
shotsPagination?: InputMaybe<GetShotsPagination>;
|
shotsPagination?: InputMaybe<GetShotsPagination>;
|
||||||
limit?: InputMaybe<Scalars["Int"]["input"]>;
|
limit?: InputMaybe<Scalars["Int"]["input"]>;
|
||||||
includeCreatedAt?: Scalars["Boolean"]["input"];
|
ids?: InputMaybe<Array<Scalars["Int"]["input"]> | Scalars["Int"]["input"]>;
|
||||||
includeUpdatedAt?: Scalars["Boolean"]["input"];
|
|
||||||
includeCueObjectFeatures?: Scalars["Boolean"]["input"];
|
|
||||||
includePocketingIntentionFeatures?: Scalars["Boolean"]["input"];
|
|
||||||
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"];
|
|
||||||
includeIntendedPocketType?: Scalars["Boolean"]["input"];
|
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
export type GetShotsWithMetadataQuery = {
|
export type GetShotsWithMetadataQuery = {
|
||||||
@@ -2322,6 +2263,7 @@ export type GetShotsWithMetadataQuery = {
|
|||||||
getShotsWithMetadata: {
|
getShotsWithMetadata: {
|
||||||
__typename?: "GetShotsResult";
|
__typename?: "GetShotsResult";
|
||||||
count?: number | null;
|
count?: number | null;
|
||||||
|
ids: Array<number>;
|
||||||
shots: Array<{
|
shots: Array<{
|
||||||
__typename?: "ShotGQL";
|
__typename?: "ShotGQL";
|
||||||
id: number;
|
id: number;
|
||||||
@@ -2371,6 +2313,107 @@ export type GetShotsWithMetadataQuery = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type GetShotsByIdsQueryVariables = Exact<{
|
||||||
|
ids: Array<Scalars["Int"]["input"]> | Scalars["Int"]["input"];
|
||||||
|
}>;
|
||||||
|
|
||||||
|
export type GetShotsByIdsQuery = {
|
||||||
|
__typename?: "Query";
|
||||||
|
getShotsByIds: Array<{
|
||||||
|
__typename?: "ShotGQL";
|
||||||
|
id: number;
|
||||||
|
videoId: number;
|
||||||
|
startFrame: number;
|
||||||
|
endFrame: number;
|
||||||
|
falsePositiveScore?: number | null;
|
||||||
|
createdAt?: any | null;
|
||||||
|
updatedAt?: any | null;
|
||||||
|
user?: { __typename?: "UserGQL"; id: number } | null;
|
||||||
|
video?: {
|
||||||
|
__typename?: "VideoGQL";
|
||||||
|
stream?: {
|
||||||
|
__typename?: "UploadStreamGQL";
|
||||||
|
resolution: {
|
||||||
|
__typename?: "VideoResolutionGQL";
|
||||||
|
width?: number | null;
|
||||||
|
height?: number | null;
|
||||||
|
};
|
||||||
|
} | null;
|
||||||
|
} | null;
|
||||||
|
cueObjectFeatures?: {
|
||||||
|
__typename?: "CueObjectFeaturesGQL";
|
||||||
|
cueObjectDistance?: number | null;
|
||||||
|
cueObjectAngle?: number | null;
|
||||||
|
cueBallSpeed?: number | null;
|
||||||
|
shotDirection?: ShotDirectionEnum | null;
|
||||||
|
spinType?: SpinTypeEnum | null;
|
||||||
|
} | null;
|
||||||
|
pocketingIntentionFeatures?: {
|
||||||
|
__typename?: "PocketingIntentionFeaturesGQL";
|
||||||
|
targetPocketDistance?: number | null;
|
||||||
|
make?: boolean | null;
|
||||||
|
intendedPocketType?: PocketEnum | null;
|
||||||
|
} | null;
|
||||||
|
pocketingIntentionInfo?: {
|
||||||
|
__typename?: "PocketingIntentionInfoGQL";
|
||||||
|
ballId: number;
|
||||||
|
pocketId: PocketIdentifier;
|
||||||
|
pathMetadataIndex: number;
|
||||||
|
} | null;
|
||||||
|
serializedShotPaths?: {
|
||||||
|
__typename?: "SerializedShotPathsGQL";
|
||||||
|
b64EncodedBuffer?: string | null;
|
||||||
|
} | null;
|
||||||
|
}>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type ShotWithAllFeaturesFragment = {
|
||||||
|
__typename?: "ShotGQL";
|
||||||
|
id: number;
|
||||||
|
videoId: number;
|
||||||
|
startFrame: number;
|
||||||
|
endFrame: number;
|
||||||
|
falsePositiveScore?: number | null;
|
||||||
|
createdAt?: any | null;
|
||||||
|
updatedAt?: any | null;
|
||||||
|
user?: { __typename?: "UserGQL"; id: number } | null;
|
||||||
|
video?: {
|
||||||
|
__typename?: "VideoGQL";
|
||||||
|
stream?: {
|
||||||
|
__typename?: "UploadStreamGQL";
|
||||||
|
resolution: {
|
||||||
|
__typename?: "VideoResolutionGQL";
|
||||||
|
width?: number | null;
|
||||||
|
height?: number | null;
|
||||||
|
};
|
||||||
|
} | null;
|
||||||
|
} | null;
|
||||||
|
cueObjectFeatures?: {
|
||||||
|
__typename?: "CueObjectFeaturesGQL";
|
||||||
|
cueObjectDistance?: number | null;
|
||||||
|
cueObjectAngle?: number | null;
|
||||||
|
cueBallSpeed?: number | null;
|
||||||
|
shotDirection?: ShotDirectionEnum | null;
|
||||||
|
spinType?: SpinTypeEnum | null;
|
||||||
|
} | null;
|
||||||
|
pocketingIntentionFeatures?: {
|
||||||
|
__typename?: "PocketingIntentionFeaturesGQL";
|
||||||
|
targetPocketDistance?: number | null;
|
||||||
|
make?: boolean | null;
|
||||||
|
intendedPocketType?: PocketEnum | null;
|
||||||
|
} | null;
|
||||||
|
pocketingIntentionInfo?: {
|
||||||
|
__typename?: "PocketingIntentionInfoGQL";
|
||||||
|
ballId: number;
|
||||||
|
pocketId: PocketIdentifier;
|
||||||
|
pathMetadataIndex: number;
|
||||||
|
} | null;
|
||||||
|
serializedShotPaths?: {
|
||||||
|
__typename?: "SerializedShotPathsGQL";
|
||||||
|
b64EncodedBuffer?: string | null;
|
||||||
|
} | null;
|
||||||
|
};
|
||||||
|
|
||||||
export type GetProfileImageUploadLinkMutationVariables = Exact<{
|
export type GetProfileImageUploadLinkMutationVariables = Exact<{
|
||||||
fileExt?: InputMaybe<Scalars["String"]["input"]>;
|
fileExt?: InputMaybe<Scalars["String"]["input"]>;
|
||||||
}>;
|
}>;
|
||||||
@@ -2914,6 +2957,48 @@ export type GetUploadStreamsWithDetailsQuery = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const ShotWithAllFeaturesFragmentDoc = gql`
|
||||||
|
fragment ShotWithAllFeatures on ShotGQL {
|
||||||
|
id
|
||||||
|
videoId
|
||||||
|
startFrame
|
||||||
|
endFrame
|
||||||
|
user {
|
||||||
|
id
|
||||||
|
}
|
||||||
|
falsePositiveScore
|
||||||
|
video {
|
||||||
|
stream {
|
||||||
|
resolution {
|
||||||
|
width
|
||||||
|
height
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
createdAt
|
||||||
|
updatedAt
|
||||||
|
cueObjectFeatures {
|
||||||
|
cueObjectDistance
|
||||||
|
cueObjectAngle
|
||||||
|
cueBallSpeed
|
||||||
|
shotDirection
|
||||||
|
spinType
|
||||||
|
}
|
||||||
|
pocketingIntentionFeatures {
|
||||||
|
targetPocketDistance
|
||||||
|
make
|
||||||
|
intendedPocketType
|
||||||
|
}
|
||||||
|
pocketingIntentionInfo {
|
||||||
|
ballId
|
||||||
|
pocketId
|
||||||
|
pathMetadataIndex
|
||||||
|
}
|
||||||
|
serializedShotPaths {
|
||||||
|
b64EncodedBuffer
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
export const GetAggregatedShotMetricsDocument = gql`
|
export const GetAggregatedShotMetricsDocument = gql`
|
||||||
query GetAggregatedShotMetrics($aggregateInput: AggregateInputGQL!) {
|
query GetAggregatedShotMetrics($aggregateInput: AggregateInputGQL!) {
|
||||||
getAggregatedShotMetrics(aggregateInput: $aggregateInput) {
|
getAggregatedShotMetrics(aggregateInput: $aggregateInput) {
|
||||||
@@ -3253,138 +3338,6 @@ export type GetVideoMakePercentageIntervalsQueryResult = Apollo.QueryResult<
|
|||||||
GetVideoMakePercentageIntervalsQuery,
|
GetVideoMakePercentageIntervalsQuery,
|
||||||
GetVideoMakePercentageIntervalsQueryVariables
|
GetVideoMakePercentageIntervalsQueryVariables
|
||||||
>;
|
>;
|
||||||
export const GetShotsDocument = gql`
|
|
||||||
query GetShots(
|
|
||||||
$filterInput: FilterInput!
|
|
||||||
$shotsPagination: GetShotsPagination
|
|
||||||
$limit: Int
|
|
||||||
$includeCreatedAt: Boolean! = false
|
|
||||||
$includeUpdatedAt: Boolean! = false
|
|
||||||
$includeCueObjectFeatures: Boolean! = false
|
|
||||||
$includePocketingIntentionFeatures: Boolean! = false
|
|
||||||
$includeCueObjectDistance: Boolean! = false
|
|
||||||
$includeCueObjectAngle: Boolean! = false
|
|
||||||
$includeCueBallSpeed: Boolean! = false
|
|
||||||
$includeSpinType: Boolean! = false
|
|
||||||
$includeShotDirection: Boolean! = false
|
|
||||||
$includeTargetPocketDistance: Boolean! = false
|
|
||||||
$includeMake: Boolean! = false
|
|
||||||
$includeIntendedPocketType: Boolean! = false
|
|
||||||
) {
|
|
||||||
getShots(
|
|
||||||
filterInput: $filterInput
|
|
||||||
shotsPagination: $shotsPagination
|
|
||||||
limit: $limit
|
|
||||||
) {
|
|
||||||
id
|
|
||||||
videoId
|
|
||||||
startFrame
|
|
||||||
endFrame
|
|
||||||
user {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
falsePositiveScore
|
|
||||||
video {
|
|
||||||
stream {
|
|
||||||
resolution {
|
|
||||||
width
|
|
||||||
height
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
createdAt @include(if: $includeCreatedAt)
|
|
||||||
updatedAt @include(if: $includeUpdatedAt)
|
|
||||||
cueObjectFeatures @include(if: $includeCueObjectFeatures) {
|
|
||||||
cueObjectDistance @include(if: $includeCueObjectDistance)
|
|
||||||
cueObjectAngle @include(if: $includeCueObjectAngle)
|
|
||||||
cueBallSpeed @include(if: $includeCueBallSpeed)
|
|
||||||
shotDirection @include(if: $includeShotDirection)
|
|
||||||
spinType @include(if: $includeSpinType)
|
|
||||||
}
|
|
||||||
pocketingIntentionFeatures
|
|
||||||
@include(if: $includePocketingIntentionFeatures) {
|
|
||||||
targetPocketDistance @include(if: $includeTargetPocketDistance)
|
|
||||||
make @include(if: $includeMake)
|
|
||||||
intendedPocketType @include(if: $includeIntendedPocketType)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* __useGetShotsQuery__
|
|
||||||
*
|
|
||||||
* To run a query within a React component, call `useGetShotsQuery` and pass it any options that fit your needs.
|
|
||||||
* When your component renders, `useGetShotsQuery` 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 } = useGetShotsQuery({
|
|
||||||
* variables: {
|
|
||||||
* filterInput: // value for 'filterInput'
|
|
||||||
* shotsPagination: // value for 'shotsPagination'
|
|
||||||
* limit: // value for 'limit'
|
|
||||||
* includeCreatedAt: // value for 'includeCreatedAt'
|
|
||||||
* includeUpdatedAt: // value for 'includeUpdatedAt'
|
|
||||||
* includeCueObjectFeatures: // value for 'includeCueObjectFeatures'
|
|
||||||
* includePocketingIntentionFeatures: // value for 'includePocketingIntentionFeatures'
|
|
||||||
* 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'
|
|
||||||
* includeIntendedPocketType: // value for 'includeIntendedPocketType'
|
|
||||||
* },
|
|
||||||
* });
|
|
||||||
*/
|
|
||||||
export function useGetShotsQuery(
|
|
||||||
baseOptions: Apollo.QueryHookOptions<GetShotsQuery, GetShotsQueryVariables>,
|
|
||||||
) {
|
|
||||||
const options = { ...defaultOptions, ...baseOptions };
|
|
||||||
return Apollo.useQuery<GetShotsQuery, GetShotsQueryVariables>(
|
|
||||||
GetShotsDocument,
|
|
||||||
options,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
export function useGetShotsLazyQuery(
|
|
||||||
baseOptions?: Apollo.LazyQueryHookOptions<
|
|
||||||
GetShotsQuery,
|
|
||||||
GetShotsQueryVariables
|
|
||||||
>,
|
|
||||||
) {
|
|
||||||
const options = { ...defaultOptions, ...baseOptions };
|
|
||||||
return Apollo.useLazyQuery<GetShotsQuery, GetShotsQueryVariables>(
|
|
||||||
GetShotsDocument,
|
|
||||||
options,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
export function useGetShotsSuspenseQuery(
|
|
||||||
baseOptions?: Apollo.SuspenseQueryHookOptions<
|
|
||||||
GetShotsQuery,
|
|
||||||
GetShotsQueryVariables
|
|
||||||
>,
|
|
||||||
) {
|
|
||||||
const options = { ...defaultOptions, ...baseOptions };
|
|
||||||
return Apollo.useSuspenseQuery<GetShotsQuery, GetShotsQueryVariables>(
|
|
||||||
GetShotsDocument,
|
|
||||||
options,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
export type GetShotsQueryHookResult = ReturnType<typeof useGetShotsQuery>;
|
|
||||||
export type GetShotsLazyQueryHookResult = ReturnType<
|
|
||||||
typeof useGetShotsLazyQuery
|
|
||||||
>;
|
|
||||||
export type GetShotsSuspenseQueryHookResult = ReturnType<
|
|
||||||
typeof useGetShotsSuspenseQuery
|
|
||||||
>;
|
|
||||||
export type GetShotsQueryResult = Apollo.QueryResult<
|
|
||||||
GetShotsQuery,
|
|
||||||
GetShotsQueryVariables
|
|
||||||
>;
|
|
||||||
export const GetSerializedShotPathsDocument = gql`
|
export const GetSerializedShotPathsDocument = gql`
|
||||||
query GetSerializedShotPaths($filterInput: FilterInput!) {
|
query GetSerializedShotPaths($filterInput: FilterInput!) {
|
||||||
getShots(filterInput: $filterInput) {
|
getShots(filterInput: $filterInput) {
|
||||||
@@ -3542,69 +3495,22 @@ export const GetShotsWithMetadataDocument = gql`
|
|||||||
$filterInput: FilterInput!
|
$filterInput: FilterInput!
|
||||||
$shotsPagination: GetShotsPagination
|
$shotsPagination: GetShotsPagination
|
||||||
$limit: Int
|
$limit: Int
|
||||||
$includeCreatedAt: Boolean! = false
|
$ids: [Int!]
|
||||||
$includeUpdatedAt: Boolean! = false
|
|
||||||
$includeCueObjectFeatures: Boolean! = false
|
|
||||||
$includePocketingIntentionFeatures: Boolean! = false
|
|
||||||
$includeCueObjectDistance: Boolean! = false
|
|
||||||
$includeCueObjectAngle: Boolean! = false
|
|
||||||
$includeCueBallSpeed: Boolean! = false
|
|
||||||
$includeSpinType: Boolean! = false
|
|
||||||
$includeShotDirection: Boolean! = false
|
|
||||||
$includeTargetPocketDistance: Boolean! = false
|
|
||||||
$includeMake: Boolean! = false
|
|
||||||
$includeIntendedPocketType: Boolean! = false
|
|
||||||
) {
|
) {
|
||||||
getShotsWithMetadata(
|
getShotsWithMetadata(
|
||||||
filterInput: $filterInput
|
filterInput: $filterInput
|
||||||
shotsPagination: $shotsPagination
|
shotsPagination: $shotsPagination
|
||||||
limit: $limit
|
limit: $limit
|
||||||
|
ids: $ids
|
||||||
) {
|
) {
|
||||||
count
|
count
|
||||||
shots {
|
shots {
|
||||||
id
|
...ShotWithAllFeatures
|
||||||
videoId
|
|
||||||
startFrame
|
|
||||||
endFrame
|
|
||||||
user {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
falsePositiveScore
|
|
||||||
video {
|
|
||||||
stream {
|
|
||||||
resolution {
|
|
||||||
width
|
|
||||||
height
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
createdAt @include(if: $includeCreatedAt)
|
|
||||||
updatedAt @include(if: $includeUpdatedAt)
|
|
||||||
cueObjectFeatures @include(if: $includeCueObjectFeatures) {
|
|
||||||
cueObjectDistance @include(if: $includeCueObjectDistance)
|
|
||||||
cueObjectAngle @include(if: $includeCueObjectAngle)
|
|
||||||
cueBallSpeed @include(if: $includeCueBallSpeed)
|
|
||||||
shotDirection @include(if: $includeShotDirection)
|
|
||||||
spinType @include(if: $includeSpinType)
|
|
||||||
}
|
|
||||||
pocketingIntentionFeatures
|
|
||||||
@include(if: $includePocketingIntentionFeatures) {
|
|
||||||
targetPocketDistance @include(if: $includeTargetPocketDistance)
|
|
||||||
make @include(if: $includeMake)
|
|
||||||
intendedPocketType @include(if: $includeIntendedPocketType)
|
|
||||||
}
|
|
||||||
pocketingIntentionInfo
|
|
||||||
@include(if: $includePocketingIntentionFeatures) {
|
|
||||||
ballId
|
|
||||||
pocketId
|
|
||||||
pathMetadataIndex
|
|
||||||
}
|
|
||||||
serializedShotPaths @include(if: $includePocketingIntentionFeatures) {
|
|
||||||
b64EncodedBuffer
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
ids
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
${ShotWithAllFeaturesFragmentDoc}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -3622,18 +3528,7 @@ export const GetShotsWithMetadataDocument = gql`
|
|||||||
* filterInput: // value for 'filterInput'
|
* filterInput: // value for 'filterInput'
|
||||||
* shotsPagination: // value for 'shotsPagination'
|
* shotsPagination: // value for 'shotsPagination'
|
||||||
* limit: // value for 'limit'
|
* limit: // value for 'limit'
|
||||||
* includeCreatedAt: // value for 'includeCreatedAt'
|
* ids: // value for 'ids'
|
||||||
* includeUpdatedAt: // value for 'includeUpdatedAt'
|
|
||||||
* includeCueObjectFeatures: // value for 'includeCueObjectFeatures'
|
|
||||||
* includePocketingIntentionFeatures: // value for 'includePocketingIntentionFeatures'
|
|
||||||
* 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'
|
|
||||||
* includeIntendedPocketType: // value for 'includeIntendedPocketType'
|
|
||||||
* },
|
* },
|
||||||
* });
|
* });
|
||||||
*/
|
*/
|
||||||
@@ -3686,6 +3581,80 @@ export type GetShotsWithMetadataQueryResult = Apollo.QueryResult<
|
|||||||
GetShotsWithMetadataQuery,
|
GetShotsWithMetadataQuery,
|
||||||
GetShotsWithMetadataQueryVariables
|
GetShotsWithMetadataQueryVariables
|
||||||
>;
|
>;
|
||||||
|
export const GetShotsByIdsDocument = gql`
|
||||||
|
query GetShotsByIds($ids: [Int!]!) {
|
||||||
|
getShotsByIds(ids: $ids) {
|
||||||
|
...ShotWithAllFeatures
|
||||||
|
}
|
||||||
|
}
|
||||||
|
${ShotWithAllFeaturesFragmentDoc}
|
||||||
|
`;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __useGetShotsByIdsQuery__
|
||||||
|
*
|
||||||
|
* To run a query within a React component, call `useGetShotsByIdsQuery` and pass it any options that fit your needs.
|
||||||
|
* When your component renders, `useGetShotsByIdsQuery` 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 } = useGetShotsByIdsQuery({
|
||||||
|
* variables: {
|
||||||
|
* ids: // value for 'ids'
|
||||||
|
* },
|
||||||
|
* });
|
||||||
|
*/
|
||||||
|
export function useGetShotsByIdsQuery(
|
||||||
|
baseOptions: Apollo.QueryHookOptions<
|
||||||
|
GetShotsByIdsQuery,
|
||||||
|
GetShotsByIdsQueryVariables
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const options = { ...defaultOptions, ...baseOptions };
|
||||||
|
return Apollo.useQuery<GetShotsByIdsQuery, GetShotsByIdsQueryVariables>(
|
||||||
|
GetShotsByIdsDocument,
|
||||||
|
options,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export function useGetShotsByIdsLazyQuery(
|
||||||
|
baseOptions?: Apollo.LazyQueryHookOptions<
|
||||||
|
GetShotsByIdsQuery,
|
||||||
|
GetShotsByIdsQueryVariables
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const options = { ...defaultOptions, ...baseOptions };
|
||||||
|
return Apollo.useLazyQuery<GetShotsByIdsQuery, GetShotsByIdsQueryVariables>(
|
||||||
|
GetShotsByIdsDocument,
|
||||||
|
options,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
export function useGetShotsByIdsSuspenseQuery(
|
||||||
|
baseOptions?: Apollo.SuspenseQueryHookOptions<
|
||||||
|
GetShotsByIdsQuery,
|
||||||
|
GetShotsByIdsQueryVariables
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const options = { ...defaultOptions, ...baseOptions };
|
||||||
|
return Apollo.useSuspenseQuery<
|
||||||
|
GetShotsByIdsQuery,
|
||||||
|
GetShotsByIdsQueryVariables
|
||||||
|
>(GetShotsByIdsDocument, options);
|
||||||
|
}
|
||||||
|
export type GetShotsByIdsQueryHookResult = ReturnType<
|
||||||
|
typeof useGetShotsByIdsQuery
|
||||||
|
>;
|
||||||
|
export type GetShotsByIdsLazyQueryHookResult = ReturnType<
|
||||||
|
typeof useGetShotsByIdsLazyQuery
|
||||||
|
>;
|
||||||
|
export type GetShotsByIdsSuspenseQueryHookResult = ReturnType<
|
||||||
|
typeof useGetShotsByIdsSuspenseQuery
|
||||||
|
>;
|
||||||
|
export type GetShotsByIdsQueryResult = Apollo.QueryResult<
|
||||||
|
GetShotsByIdsQuery,
|
||||||
|
GetShotsByIdsQueryVariables
|
||||||
|
>;
|
||||||
export const GetProfileImageUploadLinkDocument = gql`
|
export const GetProfileImageUploadLinkDocument = gql`
|
||||||
mutation getProfileImageUploadLink($fileExt: String = ".png") {
|
mutation getProfileImageUploadLink($fileExt: String = ".png") {
|
||||||
getProfileImageUploadLink(fileExt: $fileExt) {
|
getProfileImageUploadLink(fileExt: $fileExt) {
|
||||||
|
|||||||
@@ -1,59 +1,3 @@
|
|||||||
query GetShots(
|
|
||||||
$filterInput: FilterInput!
|
|
||||||
$shotsPagination: GetShotsPagination
|
|
||||||
$limit: Int
|
|
||||||
$includeCreatedAt: Boolean! = false
|
|
||||||
$includeUpdatedAt: Boolean! = false
|
|
||||||
$includeCueObjectFeatures: Boolean! = false
|
|
||||||
$includePocketingIntentionFeatures: Boolean! = false
|
|
||||||
$includeCueObjectDistance: Boolean! = false
|
|
||||||
$includeCueObjectAngle: Boolean! = false
|
|
||||||
$includeCueBallSpeed: Boolean! = false
|
|
||||||
$includeSpinType: Boolean! = false
|
|
||||||
$includeShotDirection: Boolean! = false
|
|
||||||
$includeTargetPocketDistance: Boolean! = false
|
|
||||||
$includeMake: Boolean! = false
|
|
||||||
$includeIntendedPocketType: Boolean! = false
|
|
||||||
) {
|
|
||||||
getShots(
|
|
||||||
filterInput: $filterInput
|
|
||||||
shotsPagination: $shotsPagination
|
|
||||||
limit: $limit
|
|
||||||
) {
|
|
||||||
id
|
|
||||||
videoId
|
|
||||||
startFrame
|
|
||||||
endFrame
|
|
||||||
user {
|
|
||||||
id
|
|
||||||
}
|
|
||||||
falsePositiveScore
|
|
||||||
video {
|
|
||||||
stream {
|
|
||||||
resolution {
|
|
||||||
width
|
|
||||||
height
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
createdAt @include(if: $includeCreatedAt)
|
|
||||||
updatedAt @include(if: $includeUpdatedAt)
|
|
||||||
cueObjectFeatures @include(if: $includeCueObjectFeatures) {
|
|
||||||
cueObjectDistance @include(if: $includeCueObjectDistance)
|
|
||||||
cueObjectAngle @include(if: $includeCueObjectAngle)
|
|
||||||
cueBallSpeed @include(if: $includeCueBallSpeed)
|
|
||||||
shotDirection @include(if: $includeShotDirection)
|
|
||||||
spinType @include(if: $includeSpinType)
|
|
||||||
}
|
|
||||||
pocketingIntentionFeatures
|
|
||||||
@include(if: $includePocketingIntentionFeatures) {
|
|
||||||
targetPocketDistance @include(if: $includeTargetPocketDistance)
|
|
||||||
make @include(if: $includeMake)
|
|
||||||
intendedPocketType @include(if: $includeIntendedPocketType)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
query GetSerializedShotPaths($filterInput: FilterInput!) {
|
query GetSerializedShotPaths($filterInput: FilterInput!) {
|
||||||
getShots(filterInput: $filterInput) {
|
getShots(filterInput: $filterInput) {
|
||||||
id
|
id
|
||||||
@@ -77,26 +21,29 @@ query GetShotsWithMetadata(
|
|||||||
$filterInput: FilterInput!
|
$filterInput: FilterInput!
|
||||||
$shotsPagination: GetShotsPagination
|
$shotsPagination: GetShotsPagination
|
||||||
$limit: Int
|
$limit: Int
|
||||||
$includeCreatedAt: Boolean! = false
|
$ids: [Int!]
|
||||||
$includeUpdatedAt: Boolean! = false
|
|
||||||
$includeCueObjectFeatures: Boolean! = false
|
|
||||||
$includePocketingIntentionFeatures: Boolean! = false
|
|
||||||
$includeCueObjectDistance: Boolean! = false
|
|
||||||
$includeCueObjectAngle: Boolean! = false
|
|
||||||
$includeCueBallSpeed: Boolean! = false
|
|
||||||
$includeSpinType: Boolean! = false
|
|
||||||
$includeShotDirection: Boolean! = false
|
|
||||||
$includeTargetPocketDistance: Boolean! = false
|
|
||||||
$includeMake: Boolean! = false
|
|
||||||
$includeIntendedPocketType: Boolean! = false
|
|
||||||
) {
|
) {
|
||||||
getShotsWithMetadata(
|
getShotsWithMetadata(
|
||||||
filterInput: $filterInput
|
filterInput: $filterInput
|
||||||
shotsPagination: $shotsPagination
|
shotsPagination: $shotsPagination
|
||||||
limit: $limit
|
limit: $limit
|
||||||
|
ids: $ids
|
||||||
) {
|
) {
|
||||||
count
|
count
|
||||||
shots {
|
shots {
|
||||||
|
...ShotWithAllFeatures
|
||||||
|
}
|
||||||
|
ids
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
query GetShotsByIds($ids: [Int!]!) {
|
||||||
|
getShotsByIds(ids: $ids) {
|
||||||
|
...ShotWithAllFeatures
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fragment ShotWithAllFeatures on ShotGQL {
|
||||||
id
|
id
|
||||||
videoId
|
videoId
|
||||||
startFrame
|
startFrame
|
||||||
@@ -113,29 +60,26 @@ query GetShotsWithMetadata(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
createdAt @include(if: $includeCreatedAt)
|
createdAt
|
||||||
updatedAt @include(if: $includeUpdatedAt)
|
updatedAt
|
||||||
cueObjectFeatures @include(if: $includeCueObjectFeatures) {
|
cueObjectFeatures {
|
||||||
cueObjectDistance @include(if: $includeCueObjectDistance)
|
cueObjectDistance
|
||||||
cueObjectAngle @include(if: $includeCueObjectAngle)
|
cueObjectAngle
|
||||||
cueBallSpeed @include(if: $includeCueBallSpeed)
|
cueBallSpeed
|
||||||
shotDirection @include(if: $includeShotDirection)
|
shotDirection
|
||||||
spinType @include(if: $includeSpinType)
|
spinType
|
||||||
}
|
}
|
||||||
pocketingIntentionFeatures
|
pocketingIntentionFeatures {
|
||||||
@include(if: $includePocketingIntentionFeatures) {
|
targetPocketDistance
|
||||||
targetPocketDistance @include(if: $includeTargetPocketDistance)
|
make
|
||||||
make @include(if: $includeMake)
|
intendedPocketType
|
||||||
intendedPocketType @include(if: $includeIntendedPocketType)
|
|
||||||
}
|
}
|
||||||
pocketingIntentionInfo @include(if: $includePocketingIntentionFeatures) {
|
pocketingIntentionInfo {
|
||||||
ballId
|
ballId
|
||||||
pocketId
|
pocketId
|
||||||
pathMetadataIndex
|
pathMetadataIndex
|
||||||
}
|
}
|
||||||
serializedShotPaths @include(if: $includePocketingIntentionFeatures) {
|
serializedShotPaths {
|
||||||
b64EncodedBuffer
|
b64EncodedBuffer
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ type Query {
|
|||||||
): [MakePercentageIntervalGQL!]!
|
): [MakePercentageIntervalGQL!]!
|
||||||
getShotsWithMetadata(
|
getShotsWithMetadata(
|
||||||
filterInput: FilterInput!
|
filterInput: FilterInput!
|
||||||
|
ids: [Int!] = null
|
||||||
shotsPagination: GetShotsPagination = null
|
shotsPagination: GetShotsPagination = null
|
||||||
limit: Int! = 500
|
limit: Int! = 500
|
||||||
): GetShotsResult!
|
): GetShotsResult!
|
||||||
@@ -19,6 +20,7 @@ type Query {
|
|||||||
shotsPagination: GetShotsPagination = null
|
shotsPagination: GetShotsPagination = null
|
||||||
limit: Int! = 500
|
limit: Int! = 500
|
||||||
): [ShotGQL!]!
|
): [ShotGQL!]!
|
||||||
|
getShotsByIds(ids: [Int!]!): [ShotGQL!]!
|
||||||
getShotAnnotationTypes(errorTypes: Boolean = false): [ShotAnnotationTypeGQL!]!
|
getShotAnnotationTypes(errorTypes: Boolean = false): [ShotAnnotationTypeGQL!]!
|
||||||
getUser(userId: Int!): UserGQL
|
getUser(userId: Int!): UserGQL
|
||||||
getLoggedInUser: UserGQL
|
getLoggedInUser: UserGQL
|
||||||
@@ -107,26 +109,22 @@ Date with time (isoformat)
|
|||||||
"""
|
"""
|
||||||
scalar DateTime
|
scalar DateTime
|
||||||
|
|
||||||
input TimeInterval {
|
input TimeInterval @oneOf {
|
||||||
"""
|
timedelta: TimeDeltaGQL
|
||||||
A second is the base unit and cannot be subdivided
|
aligned: AlignedIntervalEnum
|
||||||
"""
|
}
|
||||||
seconds: Int = 0
|
|
||||||
minutes: Int = 0
|
input TimeDeltaGQL {
|
||||||
hours: Int = 0
|
|
||||||
days: Int = 0
|
days: Int = 0
|
||||||
weeks: Int = 0
|
weeks: Int = 0
|
||||||
months: Int = 0
|
months: Int = 0
|
||||||
|
|
||||||
"""
|
|
||||||
Assumes a year is 365 days long
|
|
||||||
"""
|
|
||||||
years: Int = 0
|
years: Int = 0
|
||||||
|
}
|
||||||
|
|
||||||
"""
|
enum AlignedIntervalEnum {
|
||||||
True eg 1/15-3/15 => [(1/15,1/31), (2/1,2/28), (3/1,3/15)] False eg 1/15-2/15 => [(1/15,2/14), (2/14,3/15)]
|
MONTH
|
||||||
"""
|
YEAR
|
||||||
calendarAlignedMonths: Boolean! = true
|
WEEK
|
||||||
}
|
}
|
||||||
|
|
||||||
input FilterInput @oneOf {
|
input FilterInput @oneOf {
|
||||||
@@ -248,6 +246,7 @@ type MakePercentageIntervalGQL {
|
|||||||
type GetShotsResult {
|
type GetShotsResult {
|
||||||
shots: [ShotGQL!]!
|
shots: [ShotGQL!]!
|
||||||
count: Int
|
count: Int
|
||||||
|
ids: [Int!]!
|
||||||
}
|
}
|
||||||
|
|
||||||
type ShotGQL {
|
type ShotGQL {
|
||||||
|
|||||||
Reference in New Issue
Block a user