Compare commits
2 Commits
db82f66c5d
...
90fc81776f
Author | SHA1 | Date | |
---|---|---|---|
90fc81776f | |||
838304efdd |
136
src/index.tsx
136
src/index.tsx
@ -355,6 +355,27 @@ export enum WallTypeEnum {
|
|||||||
Short = 'SHORT'
|
Short = 'SHORT'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type GetAggregateShotsQueryVariables = Exact<{
|
||||||
|
bucketSets: Array<BucketSetInputGql> | BucketSetInputGql;
|
||||||
|
}>;
|
||||||
|
|
||||||
|
|
||||||
|
export type GetAggregateShotsQuery = { __typename?: 'Query', getAggregateShots: Array<{ __typename?: 'AggregateResultGQL', featureBuckets: Array<{ __typename?: 'BucketGQL', rangeKey: string, lowerBound: number }>, targetMetrics: Array<{ __typename?: 'TargetMetricGQL', count?: number | null, makePercentage?: number | null, floatFeature?: { __typename?: 'TargetFloatFeatureGQL', featureName: string, average?: number | null, median?: number | null } | null }> }> };
|
||||||
|
|
||||||
|
export type GetShotsQueryVariables = Exact<{
|
||||||
|
filterInput?: InputMaybe<FilterInput>;
|
||||||
|
includeCueObjectDistance?: Scalars['Boolean']['input'];
|
||||||
|
includeCueObjectAngle?: Scalars['Boolean']['input'];
|
||||||
|
includeCueBallSpeed?: 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 | null, videoId?: number | null, startFrame?: number | null, endFrame?: number | null, createdAt?: any | null, updatedAt?: any | null, cueObjectFeatures?: { __typename?: 'CueObjectFeaturesGQL', cueObjectDistance?: number | null, cueObjectAngle?: number | null, cueBallSpeed?: number | null, shotDirection?: ShotDirectionEnum | null } | null, pocketingIntentionFeatures?: { __typename?: 'PocketingIntentionFeaturesGQL', targetPocketDistance?: number | null, make?: boolean | null, intendedPocketType?: PocketEnum | null } | null }> };
|
||||||
|
|
||||||
export type CreateUploadStreamMutationVariables = Exact<{
|
export type CreateUploadStreamMutationVariables = Exact<{
|
||||||
videoName: Scalars['String']['input'];
|
videoName: Scalars['String']['input'];
|
||||||
deviceType?: InputMaybe<DeviceTypeEnum>;
|
deviceType?: InputMaybe<DeviceTypeEnum>;
|
||||||
@ -387,6 +408,121 @@ export type TerminateUploadStreamMutationVariables = Exact<{
|
|||||||
export type TerminateUploadStreamMutation = { __typename?: 'Mutation', terminateUploadStream: boolean };
|
export type TerminateUploadStreamMutation = { __typename?: 'Mutation', terminateUploadStream: boolean };
|
||||||
|
|
||||||
|
|
||||||
|
export const GetAggregateShotsDocument = gql`
|
||||||
|
query GetAggregateShots($bucketSets: [BucketSetInputGQL!]!) {
|
||||||
|
getAggregateShots(bucketSets: $bucketSets) {
|
||||||
|
featureBuckets {
|
||||||
|
rangeKey
|
||||||
|
lowerBound
|
||||||
|
}
|
||||||
|
targetMetrics {
|
||||||
|
count
|
||||||
|
makePercentage
|
||||||
|
floatFeature {
|
||||||
|
featureName
|
||||||
|
average
|
||||||
|
median
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __useGetAggregateShotsQuery__
|
||||||
|
*
|
||||||
|
* To run a query within a React component, call `useGetAggregateShotsQuery` and pass it any options that fit your needs.
|
||||||
|
* When your component renders, `useGetAggregateShotsQuery` 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 } = useGetAggregateShotsQuery({
|
||||||
|
* variables: {
|
||||||
|
* bucketSets: // value for 'bucketSets'
|
||||||
|
* },
|
||||||
|
* });
|
||||||
|
*/
|
||||||
|
export function useGetAggregateShotsQuery(baseOptions: Apollo.QueryHookOptions<GetAggregateShotsQuery, GetAggregateShotsQueryVariables>) {
|
||||||
|
const options = {...defaultOptions, ...baseOptions}
|
||||||
|
return Apollo.useQuery<GetAggregateShotsQuery, GetAggregateShotsQueryVariables>(GetAggregateShotsDocument, options);
|
||||||
|
}
|
||||||
|
export function useGetAggregateShotsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<GetAggregateShotsQuery, GetAggregateShotsQueryVariables>) {
|
||||||
|
const options = {...defaultOptions, ...baseOptions}
|
||||||
|
return Apollo.useLazyQuery<GetAggregateShotsQuery, GetAggregateShotsQueryVariables>(GetAggregateShotsDocument, options);
|
||||||
|
}
|
||||||
|
export function useGetAggregateShotsSuspenseQuery(baseOptions?: Apollo.SuspenseQueryHookOptions<GetAggregateShotsQuery, GetAggregateShotsQueryVariables>) {
|
||||||
|
const options = {...defaultOptions, ...baseOptions}
|
||||||
|
return Apollo.useSuspenseQuery<GetAggregateShotsQuery, GetAggregateShotsQueryVariables>(GetAggregateShotsDocument, options);
|
||||||
|
}
|
||||||
|
export type GetAggregateShotsQueryHookResult = ReturnType<typeof useGetAggregateShotsQuery>;
|
||||||
|
export type GetAggregateShotsLazyQueryHookResult = ReturnType<typeof useGetAggregateShotsLazyQuery>;
|
||||||
|
export type GetAggregateShotsSuspenseQueryHookResult = ReturnType<typeof useGetAggregateShotsSuspenseQuery>;
|
||||||
|
export type GetAggregateShotsQueryResult = Apollo.QueryResult<GetAggregateShotsQuery, GetAggregateShotsQueryVariables>;
|
||||||
|
export const GetShotsDocument = gql`
|
||||||
|
query GetShots($filterInput: FilterInput, $includeCueObjectDistance: Boolean! = false, $includeCueObjectAngle: Boolean! = false, $includeCueBallSpeed: Boolean! = false, $includeShotDirection: Boolean! = false, $includeTargetPocketDistance: Boolean! = false, $includeMake: Boolean! = false, $includeIntendedPocketType: Boolean! = false) {
|
||||||
|
getShots(filterInput: $filterInput) {
|
||||||
|
id
|
||||||
|
videoId
|
||||||
|
startFrame
|
||||||
|
endFrame
|
||||||
|
createdAt
|
||||||
|
updatedAt
|
||||||
|
cueObjectFeatures {
|
||||||
|
cueObjectDistance @include(if: $includeCueObjectDistance)
|
||||||
|
cueObjectAngle @include(if: $includeCueObjectAngle)
|
||||||
|
cueBallSpeed @include(if: $includeCueBallSpeed)
|
||||||
|
shotDirection @include(if: $includeShotDirection)
|
||||||
|
}
|
||||||
|
pocketingIntentionFeatures {
|
||||||
|
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'
|
||||||
|
* includeCueObjectDistance: // value for 'includeCueObjectDistance'
|
||||||
|
* includeCueObjectAngle: // value for 'includeCueObjectAngle'
|
||||||
|
* includeCueBallSpeed: // value for 'includeCueBallSpeed'
|
||||||
|
* 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 CreateUploadStreamDocument = gql`
|
export const CreateUploadStreamDocument = gql`
|
||||||
mutation CreateUploadStream($videoName: String!, $deviceType: DeviceTypeEnum, $osVersion: String, $appVersion: String, $browserName: String, $browserVersion: String, $locale: String, $timezone: String, $networkType: String, $ipAddress: String) {
|
mutation CreateUploadStream($videoName: String!, $deviceType: DeviceTypeEnum, $osVersion: String, $appVersion: String, $browserName: String, $browserVersion: String, $locale: String, $timezone: String, $networkType: String, $ipAddress: String) {
|
||||||
createUploadStream(
|
createUploadStream(
|
||||||
|
17
src/operations/bucketed_metrics.gql
Normal file
17
src/operations/bucketed_metrics.gql
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
query GetAggregateShots($bucketSets: [BucketSetInputGQL!]!) {
|
||||||
|
getAggregateShots(bucketSets: $bucketSets) {
|
||||||
|
featureBuckets {
|
||||||
|
rangeKey
|
||||||
|
lowerBound
|
||||||
|
}
|
||||||
|
targetMetrics {
|
||||||
|
count
|
||||||
|
makePercentage
|
||||||
|
floatFeature {
|
||||||
|
featureName
|
||||||
|
average
|
||||||
|
median
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
30
src/operations/shots.gql
Normal file
30
src/operations/shots.gql
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
query GetShots(
|
||||||
|
$filterInput: FilterInput
|
||||||
|
$includeCueObjectDistance: Boolean! = false
|
||||||
|
$includeCueObjectAngle: Boolean! = false
|
||||||
|
$includeCueBallSpeed: Boolean! = false
|
||||||
|
$includeShotDirection: Boolean! = false
|
||||||
|
$includeTargetPocketDistance: Boolean! = false
|
||||||
|
$includeMake: Boolean! = false
|
||||||
|
$includeIntendedPocketType: Boolean! = false
|
||||||
|
) {
|
||||||
|
getShots(filterInput: $filterInput) {
|
||||||
|
id
|
||||||
|
videoId
|
||||||
|
startFrame
|
||||||
|
endFrame
|
||||||
|
createdAt
|
||||||
|
updatedAt
|
||||||
|
cueObjectFeatures {
|
||||||
|
cueObjectDistance @include(if: $includeCueObjectDistance)
|
||||||
|
cueObjectAngle @include(if: $includeCueObjectAngle)
|
||||||
|
cueBallSpeed @include(if: $includeCueBallSpeed)
|
||||||
|
shotDirection @include(if: $includeShotDirection)
|
||||||
|
}
|
||||||
|
pocketingIntentionFeatures {
|
||||||
|
targetPocketDistance @include(if: $includeTargetPocketDistance)
|
||||||
|
make @include(if: $includeMake)
|
||||||
|
intendedPocketType @include(if: $includeIntendedPocketType)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user