Compare commits

..

6 Commits

Author SHA1 Message Date
e0b150aa2a add current homography operation
All checks were successful
Tests / Tests (pull_request) Successful in 6s
2024-09-06 19:00:13 -06:00
2bdfcb994e Merge pull request 'Added get shots with metadadata operation' (#51) from add-get-shots-with-metadata-query into master
Reviewed-on: #51
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-09-05 23:18:37 -06:00
d5c6014548 Merge remote-tracking branch 'origin/master' into add-get-shots-with-metadata-query
All checks were successful
Tests / Tests (pull_request) Successful in 15s
2024-09-05 23:17:53 -06:00
de6fcacfd0 Merge pull request 'Added GetUserTagsQuery' (#50) from micah/add-get-tags-query into master
Reviewed-on: #50
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-09-05 20:28:16 -06:00
993f62b6cf Added get shots with metadadata operation
All checks were successful
Tests / Tests (pull_request) Successful in 10s
2024-09-05 20:46:25 -05:00
aabd74d7d7 Added GetUserTagsQuery
All checks were successful
Tests / Tests (pull_request) Successful in 8s
2024-09-05 18:35:08 -07:00
3 changed files with 346 additions and 0 deletions

View File

@ -1890,6 +1890,68 @@ export type GetShotAnnotationTypesQuery = {
}>;
};
export type GetShotsWithMetadataQueryVariables = 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 GetShotsWithMetadataQuery = {
__typename?: "Query";
getShotsWithMetadata: {
__typename?: "GetShotsResult";
count?: number | null;
shots: 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 GetProfileImageUploadLinkMutationVariables = Exact<{
fileExt?: InputMaybe<Scalars["String"]["input"]>;
}>;
@ -1972,6 +2034,13 @@ export type GetUsernamesQuery = {
getUsernames: Array<string>;
};
export type GetUserTagsQueryVariables = Exact<{ [key: string]: never }>;
export type GetUserTagsQuery = {
__typename?: "Query";
getUserTags: Array<{ __typename?: "TagGQL"; id: number; name: string }>;
};
export type GetStreamMonitoringDetailsQueryVariables = Exact<{
videoId: Scalars["Int"]["input"];
debuggingJson?: InputMaybe<Scalars["JSON"]["input"]>;
@ -3049,6 +3118,146 @@ export type GetShotAnnotationTypesQueryResult = Apollo.QueryResult<
GetShotAnnotationTypesQuery,
GetShotAnnotationTypesQueryVariables
>;
export const GetShotsWithMetadataDocument = gql`
query GetShotsWithMetadata(
$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
) {
getShotsWithMetadata(
filterInput: $filterInput
shotsPagination: $shotsPagination
limit: $limit
) {
count
shots {
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)
}
}
}
}
`;
/**
* __useGetShotsWithMetadataQuery__
*
* To run a query within a React component, call `useGetShotsWithMetadataQuery` and pass it any options that fit your needs.
* When your component renders, `useGetShotsWithMetadataQuery` 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 } = useGetShotsWithMetadataQuery({
* 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 useGetShotsWithMetadataQuery(
baseOptions: Apollo.QueryHookOptions<
GetShotsWithMetadataQuery,
GetShotsWithMetadataQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<
GetShotsWithMetadataQuery,
GetShotsWithMetadataQueryVariables
>(GetShotsWithMetadataDocument, options);
}
export function useGetShotsWithMetadataLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetShotsWithMetadataQuery,
GetShotsWithMetadataQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<
GetShotsWithMetadataQuery,
GetShotsWithMetadataQueryVariables
>(GetShotsWithMetadataDocument, options);
}
export function useGetShotsWithMetadataSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
GetShotsWithMetadataQuery,
GetShotsWithMetadataQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<
GetShotsWithMetadataQuery,
GetShotsWithMetadataQueryVariables
>(GetShotsWithMetadataDocument, options);
}
export type GetShotsWithMetadataQueryHookResult = ReturnType<
typeof useGetShotsWithMetadataQuery
>;
export type GetShotsWithMetadataLazyQueryHookResult = ReturnType<
typeof useGetShotsWithMetadataLazyQuery
>;
export type GetShotsWithMetadataSuspenseQueryHookResult = ReturnType<
typeof useGetShotsWithMetadataSuspenseQuery
>;
export type GetShotsWithMetadataQueryResult = Apollo.QueryResult<
GetShotsWithMetadataQuery,
GetShotsWithMetadataQueryVariables
>;
export const GetProfileImageUploadLinkDocument = gql`
mutation getProfileImageUploadLink($fileExt: String = ".png") {
getProfileImageUploadLink(fileExt: $fileExt) {
@ -3399,6 +3608,77 @@ export type GetUsernamesQueryResult = Apollo.QueryResult<
GetUsernamesQuery,
GetUsernamesQueryVariables
>;
export const GetUserTagsDocument = gql`
query GetUserTags {
getUserTags {
id
name
}
}
`;
/**
* __useGetUserTagsQuery__
*
* To run a query within a React component, call `useGetUserTagsQuery` and pass it any options that fit your needs.
* When your component renders, `useGetUserTagsQuery` 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 } = useGetUserTagsQuery({
* variables: {
* },
* });
*/
export function useGetUserTagsQuery(
baseOptions?: Apollo.QueryHookOptions<
GetUserTagsQuery,
GetUserTagsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useQuery<GetUserTagsQuery, GetUserTagsQueryVariables>(
GetUserTagsDocument,
options,
);
}
export function useGetUserTagsLazyQuery(
baseOptions?: Apollo.LazyQueryHookOptions<
GetUserTagsQuery,
GetUserTagsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useLazyQuery<GetUserTagsQuery, GetUserTagsQueryVariables>(
GetUserTagsDocument,
options,
);
}
export function useGetUserTagsSuspenseQuery(
baseOptions?: Apollo.SuspenseQueryHookOptions<
GetUserTagsQuery,
GetUserTagsQueryVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useSuspenseQuery<GetUserTagsQuery, GetUserTagsQueryVariables>(
GetUserTagsDocument,
options,
);
}
export type GetUserTagsQueryHookResult = ReturnType<typeof useGetUserTagsQuery>;
export type GetUserTagsLazyQueryHookResult = ReturnType<
typeof useGetUserTagsLazyQuery
>;
export type GetUserTagsSuspenseQueryHookResult = ReturnType<
typeof useGetUserTagsSuspenseQuery
>;
export type GetUserTagsQueryResult = Apollo.QueryResult<
GetUserTagsQuery,
GetUserTagsQueryVariables
>;
export const GetStreamMonitoringDetailsDocument = gql`
query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) {
getVideo(videoId: $videoId, debuggingJson: $debuggingJson) {

View File

@ -72,3 +72,62 @@ query GetShotAnnotationTypes {
name
}
}
query GetShotsWithMetadata(
$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
) {
getShotsWithMetadata(
filterInput: $filterInput
shotsPagination: $shotsPagination
limit: $limit
) {
count
shots {
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)
}
}
}
}

View File

@ -56,3 +56,10 @@ query getUsernames(
) {
getUsernames(matchString: $matchString, limit: $limit, after: $after)
}
query GetUserTags {
getUserTags {
id
name
}
}