diff --git a/src/index.tsx b/src/index.tsx index dab22a7..71c77a0 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -3450,6 +3450,8 @@ export type GetStreamMonitoringDetailsQuery = { elapsedTime?: number | null; currentHomography?: { __typename?: "HomographyInfoGQL"; + id: number; + frameIndex: number; crop: { __typename?: "BoundingBoxGQL"; left: number; @@ -3663,6 +3665,7 @@ export type GetVideoQuery = { } | null; homographyHistory: Array<{ __typename?: "HomographyInfoGQL"; + id: number; frameIndex: number; crop: { __typename?: "BoundingBoxGQL"; @@ -3864,6 +3867,72 @@ export type GetHeaderInfoByVideoIdQuery = { }; }; +export type FindPrerecordTableLayoutMutationVariables = Exact<{ + b64Image: Scalars["Base64"]["input"]; + videoId: Scalars["Int"]["input"]; +}>; + +export type FindPrerecordTableLayoutMutation = { + __typename?: "Mutation"; + findPrerecordTableLayout?: { + __typename?: "HomographyInfoGQL"; + id: number; + frameIndex: number; + crop: { + __typename?: "BoundingBoxGQL"; + left: number; + top: number; + width: number; + height: number; + }; + pockets: Array<{ + __typename?: "BoundingBoxGQL"; + left: number; + top: number; + width: number; + height: number; + }>; + sourcePoints: { + __typename?: "PocketPointsGQL"; + topLeft: { __typename?: "IntPoint2D"; x: number; y: number }; + topSide: { __typename?: "IntPoint2D"; x: number; y: number }; + topRight: { __typename?: "IntPoint2D"; x: number; y: number }; + bottomLeft: { __typename?: "IntPoint2D"; x: number; y: number }; + bottomSide: { __typename?: "IntPoint2D"; x: number; y: number }; + bottomRight: { __typename?: "IntPoint2D"; x: number; y: number }; + }; + } | null; +}; + +export type HomographyInfoFragment = { + __typename?: "HomographyInfoGQL"; + id: number; + frameIndex: number; + crop: { + __typename?: "BoundingBoxGQL"; + left: number; + top: number; + width: number; + height: number; + }; + pockets: Array<{ + __typename?: "BoundingBoxGQL"; + left: number; + top: number; + width: number; + height: number; + }>; + sourcePoints: { + __typename?: "PocketPointsGQL"; + topLeft: { __typename?: "IntPoint2D"; x: number; y: number }; + topSide: { __typename?: "IntPoint2D"; x: number; y: number }; + topRight: { __typename?: "IntPoint2D"; x: number; y: number }; + bottomLeft: { __typename?: "IntPoint2D"; x: number; y: number }; + bottomSide: { __typename?: "IntPoint2D"; x: number; y: number }; + bottomRight: { __typename?: "IntPoint2D"; x: number; y: number }; + }; +}; + export type CreateUploadStreamMutationVariables = Exact<{ videoMetadataInput: VideoMetadataInput; }>; @@ -4196,6 +4265,50 @@ export const VideoDurationDataFragmentDoc = gql` ${PlaylistWithSegmentStartTimesFragmentDoc} ${StreamWithEndFramesFragmentDoc} `; +export const HomographyInfoFragmentDoc = gql` + fragment HomographyInfo on HomographyInfoGQL { + id + frameIndex + crop { + left + top + width + height + } + pockets { + left + top + width + height + } + sourcePoints { + topLeft { + x + y + } + topSide { + x + y + } + topRight { + x + y + } + bottomLeft { + x + y + } + bottomSide { + x + y + } + bottomRight { + x + y + } + } + } +`; export const GetAggregatedShotMetricsDocument = gql` query GetAggregatedShotMetrics($aggregateInput: AggregateInputGQL!) { getAggregatedShotMetrics(aggregateInput: $aggregateInput) { @@ -6068,44 +6181,7 @@ export const GetStreamMonitoringDetailsDocument = gql` makePercentage elapsedTime currentHomography { - crop { - left - top - width - height - } - pockets { - left - top - width - height - } - sourcePoints { - topLeft { - x - y - } - topSide { - x - y - } - topRight { - x - y - } - bottomLeft { - x - y - } - bottomSide { - x - y - } - bottomRight { - x - y - } - } + ...HomographyInfo } stream { id @@ -6126,6 +6202,7 @@ export const GetStreamMonitoringDetailsDocument = gql` } } } + ${HomographyInfoFragmentDoc} `; /** @@ -6575,45 +6652,7 @@ export const GetVideoDocument = gql` segmentDurations } homographyHistory { - frameIndex - crop { - left - top - width - height - } - pockets { - left - top - width - height - } - sourcePoints { - topLeft { - x - y - } - topSide { - x - y - } - topRight { - x - y - } - bottomLeft { - x - y - } - bottomSide { - x - y - } - bottomRight { - x - y - } - } + ...HomographyInfo } stream { id @@ -6630,6 +6669,7 @@ export const GetVideoDocument = gql` } } } + ${HomographyInfoFragmentDoc} `; /** @@ -7063,6 +7103,59 @@ export type GetHeaderInfoByVideoIdQueryResult = Apollo.QueryResult< GetHeaderInfoByVideoIdQuery, GetHeaderInfoByVideoIdQueryVariables >; +export const FindPrerecordTableLayoutDocument = gql` + mutation FindPrerecordTableLayout($b64Image: Base64!, $videoId: Int!) { + findPrerecordTableLayout(b64Image: $b64Image, videoId: $videoId) { + ...HomographyInfo + } + } + ${HomographyInfoFragmentDoc} +`; +export type FindPrerecordTableLayoutMutationFn = Apollo.MutationFunction< + FindPrerecordTableLayoutMutation, + FindPrerecordTableLayoutMutationVariables +>; + +/** + * __useFindPrerecordTableLayoutMutation__ + * + * To run a mutation, you first call `useFindPrerecordTableLayoutMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useFindPrerecordTableLayoutMutation` returns a tuple that includes: + * - A mutate function that you can call at any time to execute the mutation + * - An object with fields that represent the current status of the mutation's execution + * + * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2; + * + * @example + * const [findPrerecordTableLayoutMutation, { data, loading, error }] = useFindPrerecordTableLayoutMutation({ + * variables: { + * b64Image: // value for 'b64Image' + * videoId: // value for 'videoId' + * }, + * }); + */ +export function useFindPrerecordTableLayoutMutation( + baseOptions?: Apollo.MutationHookOptions< + FindPrerecordTableLayoutMutation, + FindPrerecordTableLayoutMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + FindPrerecordTableLayoutMutation, + FindPrerecordTableLayoutMutationVariables + >(FindPrerecordTableLayoutDocument, options); +} +export type FindPrerecordTableLayoutMutationHookResult = ReturnType< + typeof useFindPrerecordTableLayoutMutation +>; +export type FindPrerecordTableLayoutMutationResult = + Apollo.MutationResult; +export type FindPrerecordTableLayoutMutationOptions = + Apollo.BaseMutationOptions< + FindPrerecordTableLayoutMutation, + FindPrerecordTableLayoutMutationVariables + >; export const CreateUploadStreamDocument = gql` mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) { createUploadStream(videoMetadata: $videoMetadataInput) { diff --git a/src/operations/video.gql b/src/operations/video.gql index 64549e4..03c140b 100644 --- a/src/operations/video.gql +++ b/src/operations/video.gql @@ -5,44 +5,7 @@ query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) { makePercentage elapsedTime currentHomography { - crop { - left - top - width - height - } - pockets { - left - top - width - height - } - sourcePoints { - topLeft { - x - y - } - topSide { - x - y - } - topRight { - x - y - } - bottomLeft { - x - y - } - bottomSide { - x - y - } - bottomRight { - x - y - } - } + ...HomographyInfo } stream { id @@ -154,45 +117,7 @@ query GetVideo($videoId: Int!) { segmentDurations } homographyHistory { - frameIndex - crop { - left - top - width - height - } - pockets { - left - top - width - height - } - sourcePoints { - topLeft { - x - y - } - topSide { - x - y - } - topRight { - x - y - } - bottomLeft { - x - y - } - bottomSide { - x - y - } - bottomRight { - x - y - } - } + ...HomographyInfo } stream { id @@ -288,3 +213,52 @@ query GetHeaderInfoByVideoId($videoId: Int!) { startTime } } + +mutation FindPrerecordTableLayout($b64Image: Base64!, $videoId: Int!) { + findPrerecordTableLayout(b64Image: $b64Image, videoId: $videoId) { + ...HomographyInfo + } +} + +fragment HomographyInfo on HomographyInfoGQL { + id + frameIndex + crop { + left + top + width + height + } + pockets { + left + top + width + height + } + sourcePoints { + topLeft { + x + y + } + topSide { + x + y + } + topRight { + x + y + } + bottomLeft { + x + y + } + bottomSide { + x + y + } + bottomRight { + x + y + } + } +}