Add operation for FindPrerecordTableLayoutMutation + HomographyInfoGql fragment #121

Merged
loewy merged 1 commits from loewy/add-operation-check-homography into master 2024-11-07 16:51:17 -07:00
2 changed files with 221 additions and 154 deletions
Showing only changes of commit bd7ffa7fdb - Show all commits

View File

@ -3450,6 +3450,8 @@ export type GetStreamMonitoringDetailsQuery = {
elapsedTime?: number | null; elapsedTime?: number | null;
currentHomography?: { currentHomography?: {
__typename?: "HomographyInfoGQL"; __typename?: "HomographyInfoGQL";
id: number;
frameIndex: number;
crop: { crop: {
__typename?: "BoundingBoxGQL"; __typename?: "BoundingBoxGQL";
left: number; left: number;
@ -3663,6 +3665,7 @@ export type GetVideoQuery = {
} | null; } | null;
homographyHistory: Array<{ homographyHistory: Array<{
__typename?: "HomographyInfoGQL"; __typename?: "HomographyInfoGQL";
id: number;
frameIndex: number; frameIndex: number;
crop: { crop: {
__typename?: "BoundingBoxGQL"; __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<{ export type CreateUploadStreamMutationVariables = Exact<{
videoMetadataInput: VideoMetadataInput; videoMetadataInput: VideoMetadataInput;
}>; }>;
@ -4196,6 +4265,50 @@ export const VideoDurationDataFragmentDoc = gql`
${PlaylistWithSegmentStartTimesFragmentDoc} ${PlaylistWithSegmentStartTimesFragmentDoc}
${StreamWithEndFramesFragmentDoc} ${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` export const GetAggregatedShotMetricsDocument = gql`
query GetAggregatedShotMetrics($aggregateInput: AggregateInputGQL!) { query GetAggregatedShotMetrics($aggregateInput: AggregateInputGQL!) {
getAggregatedShotMetrics(aggregateInput: $aggregateInput) { getAggregatedShotMetrics(aggregateInput: $aggregateInput) {
@ -6068,44 +6181,7 @@ export const GetStreamMonitoringDetailsDocument = gql`
makePercentage makePercentage
elapsedTime elapsedTime
currentHomography { currentHomography {
crop { ...HomographyInfo
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
}
}
} }
stream { stream {
id id
@ -6126,6 +6202,7 @@ export const GetStreamMonitoringDetailsDocument = gql`
} }
} }
} }
${HomographyInfoFragmentDoc}
`; `;
/** /**
@ -6575,45 +6652,7 @@ export const GetVideoDocument = gql`
segmentDurations segmentDurations
} }
homographyHistory { homographyHistory {
frameIndex ...HomographyInfo
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
}
}
} }
stream { stream {
id id
@ -6630,6 +6669,7 @@ export const GetVideoDocument = gql`
} }
} }
} }
${HomographyInfoFragmentDoc}
`; `;
/** /**
@ -7063,6 +7103,59 @@ export type GetHeaderInfoByVideoIdQueryResult = Apollo.QueryResult<
GetHeaderInfoByVideoIdQuery, GetHeaderInfoByVideoIdQuery,
GetHeaderInfoByVideoIdQueryVariables 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<FindPrerecordTableLayoutMutation>;
export type FindPrerecordTableLayoutMutationOptions =
Apollo.BaseMutationOptions<
FindPrerecordTableLayoutMutation,
FindPrerecordTableLayoutMutationVariables
>;
export const CreateUploadStreamDocument = gql` export const CreateUploadStreamDocument = gql`
mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) { mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) {
createUploadStream(videoMetadata: $videoMetadataInput) { createUploadStream(videoMetadata: $videoMetadataInput) {

View File

@ -5,44 +5,7 @@ query GetStreamMonitoringDetails($videoId: Int!, $debuggingJson: JSON) {
makePercentage makePercentage
elapsedTime elapsedTime
currentHomography { currentHomography {
crop { ...HomographyInfo
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
}
}
} }
stream { stream {
id id
@ -154,45 +117,7 @@ query GetVideo($videoId: Int!) {
segmentDurations segmentDurations
} }
homographyHistory { homographyHistory {
frameIndex ...HomographyInfo
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
}
}
} }
stream { stream {
id id
@ -288,3 +213,52 @@ query GetHeaderInfoByVideoId($videoId: Int!) {
startTime 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
}
}
}