Compare commits
3 Commits
kat/reserv
...
70015a942c
| Author | SHA1 | Date | |
|---|---|---|---|
| 70015a942c | |||
| 91cfcb28e7 | |||
| b2a09c1b8c |
186
src/index.tsx
186
src/index.tsx
@@ -1747,6 +1747,7 @@ export type Mutation = {
|
|||||||
getUploadLink: GetUploadLinkReturn;
|
getUploadLink: GetUploadLinkReturn;
|
||||||
setLoggerLevel: Scalars["Boolean"]["output"];
|
setLoggerLevel: Scalars["Boolean"]["output"];
|
||||||
setSegmentDuration: Scalars["Boolean"]["output"];
|
setSegmentDuration: Scalars["Boolean"]["output"];
|
||||||
|
updateShotAnnotations: UpdateShotAnnotationReturn;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type MutationAddAnnotationToShotArgs = {
|
export type MutationAddAnnotationToShotArgs = {
|
||||||
@@ -1800,6 +1801,11 @@ export type MutationSetSegmentDurationArgs = {
|
|||||||
videoId: Scalars["Int"]["input"];
|
videoId: Scalars["Int"]["input"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type MutationUpdateShotAnnotationsArgs = {
|
||||||
|
annotations: Array<UpdateAnnotationInputGql>;
|
||||||
|
shotId: Scalars["Int"]["input"];
|
||||||
|
};
|
||||||
|
|
||||||
export type NoInitForChunkedUploadErr = {
|
export type NoInitForChunkedUploadErr = {
|
||||||
__typename?: "NoInitForChunkedUploadErr";
|
__typename?: "NoInitForChunkedUploadErr";
|
||||||
segmentType: StreamSegmentTypeEnum;
|
segmentType: StreamSegmentTypeEnum;
|
||||||
@@ -2061,6 +2067,15 @@ export type SuccessfulAddAddShotAnnotationErrors =
|
|||||||
| AddShotAnnotationErrors
|
| AddShotAnnotationErrors
|
||||||
| SuccessfulAdd;
|
| SuccessfulAdd;
|
||||||
|
|
||||||
|
export type SuccessfulUpdate = {
|
||||||
|
__typename?: "SuccessfulUpdate";
|
||||||
|
value: Scalars["Boolean"]["output"];
|
||||||
|
};
|
||||||
|
|
||||||
|
export type SuccessfulUpdateUpdateShotAnnotationErrors =
|
||||||
|
| SuccessfulUpdate
|
||||||
|
| UpdateShotAnnotationErrors;
|
||||||
|
|
||||||
export type TagGql = {
|
export type TagGql = {
|
||||||
__typename?: "TagGQL";
|
__typename?: "TagGQL";
|
||||||
group?: Maybe<Scalars["String"]["output"]>;
|
group?: Maybe<Scalars["String"]["output"]>;
|
||||||
@@ -2098,6 +2113,21 @@ export type TooManyProfileImageUploadsErr = {
|
|||||||
linksRequested: Scalars["Int"]["output"];
|
linksRequested: Scalars["Int"]["output"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type UpdateAnnotationInputGql = {
|
||||||
|
name: Scalars["String"]["input"];
|
||||||
|
notes?: InputMaybe<Scalars["String"]["input"]>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type UpdateShotAnnotationErrors = {
|
||||||
|
__typename?: "UpdateShotAnnotationErrors";
|
||||||
|
error?: Maybe<DoesNotOwnShotErr>;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type UpdateShotAnnotationReturn = {
|
||||||
|
__typename?: "UpdateShotAnnotationReturn";
|
||||||
|
value: SuccessfulUpdateUpdateShotAnnotationErrors;
|
||||||
|
};
|
||||||
|
|
||||||
export type UploadLink = {
|
export type UploadLink = {
|
||||||
__typename?: "UploadLink";
|
__typename?: "UploadLink";
|
||||||
headers: Array<Maybe<Header>>;
|
headers: Array<Maybe<Header>>;
|
||||||
@@ -2424,6 +2454,72 @@ export type GetShotsWithVideoGqlQuery = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type GetShotsWithMetadataFilterResultQueryVariables = Exact<{
|
||||||
|
filterInput: FilterInput;
|
||||||
|
shotsPagination?: InputMaybe<GetShotsPagination>;
|
||||||
|
limit?: InputMaybe<Scalars["Int"]["input"]>;
|
||||||
|
ids?: InputMaybe<Array<Scalars["Int"]["input"]> | Scalars["Int"]["input"]>;
|
||||||
|
}>;
|
||||||
|
|
||||||
|
export type GetShotsWithMetadataFilterResultQuery = {
|
||||||
|
__typename?: "Query";
|
||||||
|
getShotsWithMetadata: {
|
||||||
|
__typename?: "GetShotsResult";
|
||||||
|
count?: number | null;
|
||||||
|
ids: Array<number>;
|
||||||
|
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";
|
||||||
|
id: number;
|
||||||
|
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";
|
||||||
|
make?: boolean | null;
|
||||||
|
targetPocketDistance?: number | null;
|
||||||
|
targetPocketAngle?: number | null;
|
||||||
|
targetPocketAngleDirection?: ShotDirectionEnum | null;
|
||||||
|
marginOfErrorInDegrees?: number | null;
|
||||||
|
intendedPocketType?: PocketEnum | null;
|
||||||
|
} | null;
|
||||||
|
pocketingIntentionInfo?: {
|
||||||
|
__typename?: "PocketingIntentionInfoGQL";
|
||||||
|
ballId: number;
|
||||||
|
pocketId: PocketIdentifier;
|
||||||
|
pathMetadataIndex: number;
|
||||||
|
} | null;
|
||||||
|
serializedShotPaths?: {
|
||||||
|
__typename?: "SerializedShotPathsGQL";
|
||||||
|
b64EncodedBuffer?: string | null;
|
||||||
|
} | null;
|
||||||
|
}>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
export type GetShotsWithMetadataQueryVariables = Exact<{
|
export type GetShotsWithMetadataQueryVariables = Exact<{
|
||||||
filterInput: FilterInput;
|
filterInput: FilterInput;
|
||||||
shotsPagination?: InputMaybe<GetShotsPagination>;
|
shotsPagination?: InputMaybe<GetShotsPagination>;
|
||||||
@@ -3775,6 +3871,96 @@ export type GetShotsWithVideoGqlQueryResult = Apollo.QueryResult<
|
|||||||
GetShotsWithVideoGqlQuery,
|
GetShotsWithVideoGqlQuery,
|
||||||
GetShotsWithVideoGqlQueryVariables
|
GetShotsWithVideoGqlQueryVariables
|
||||||
>;
|
>;
|
||||||
|
export const GetShotsWithMetadataFilterResultDocument = gql`
|
||||||
|
query GetShotsWithMetadataFilterResult(
|
||||||
|
$filterInput: FilterInput!
|
||||||
|
$shotsPagination: GetShotsPagination
|
||||||
|
$limit: Int
|
||||||
|
$ids: [Int!]
|
||||||
|
) {
|
||||||
|
getShotsWithMetadata(
|
||||||
|
filterInput: $filterInput
|
||||||
|
shotsPagination: $shotsPagination
|
||||||
|
limit: $limit
|
||||||
|
ids: $ids
|
||||||
|
) {
|
||||||
|
count
|
||||||
|
shots {
|
||||||
|
...ShotWithAllFeatures
|
||||||
|
}
|
||||||
|
ids
|
||||||
|
}
|
||||||
|
}
|
||||||
|
${ShotWithAllFeaturesFragmentDoc}
|
||||||
|
`;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* __useGetShotsWithMetadataFilterResultQuery__
|
||||||
|
*
|
||||||
|
* To run a query within a React component, call `useGetShotsWithMetadataFilterResultQuery` and pass it any options that fit your needs.
|
||||||
|
* When your component renders, `useGetShotsWithMetadataFilterResultQuery` 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 } = useGetShotsWithMetadataFilterResultQuery({
|
||||||
|
* variables: {
|
||||||
|
* filterInput: // value for 'filterInput'
|
||||||
|
* shotsPagination: // value for 'shotsPagination'
|
||||||
|
* limit: // value for 'limit'
|
||||||
|
* ids: // value for 'ids'
|
||||||
|
* },
|
||||||
|
* });
|
||||||
|
*/
|
||||||
|
export function useGetShotsWithMetadataFilterResultQuery(
|
||||||
|
baseOptions: Apollo.QueryHookOptions<
|
||||||
|
GetShotsWithMetadataFilterResultQuery,
|
||||||
|
GetShotsWithMetadataFilterResultQueryVariables
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const options = { ...defaultOptions, ...baseOptions };
|
||||||
|
return Apollo.useQuery<
|
||||||
|
GetShotsWithMetadataFilterResultQuery,
|
||||||
|
GetShotsWithMetadataFilterResultQueryVariables
|
||||||
|
>(GetShotsWithMetadataFilterResultDocument, options);
|
||||||
|
}
|
||||||
|
export function useGetShotsWithMetadataFilterResultLazyQuery(
|
||||||
|
baseOptions?: Apollo.LazyQueryHookOptions<
|
||||||
|
GetShotsWithMetadataFilterResultQuery,
|
||||||
|
GetShotsWithMetadataFilterResultQueryVariables
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const options = { ...defaultOptions, ...baseOptions };
|
||||||
|
return Apollo.useLazyQuery<
|
||||||
|
GetShotsWithMetadataFilterResultQuery,
|
||||||
|
GetShotsWithMetadataFilterResultQueryVariables
|
||||||
|
>(GetShotsWithMetadataFilterResultDocument, options);
|
||||||
|
}
|
||||||
|
export function useGetShotsWithMetadataFilterResultSuspenseQuery(
|
||||||
|
baseOptions?: Apollo.SuspenseQueryHookOptions<
|
||||||
|
GetShotsWithMetadataFilterResultQuery,
|
||||||
|
GetShotsWithMetadataFilterResultQueryVariables
|
||||||
|
>,
|
||||||
|
) {
|
||||||
|
const options = { ...defaultOptions, ...baseOptions };
|
||||||
|
return Apollo.useSuspenseQuery<
|
||||||
|
GetShotsWithMetadataFilterResultQuery,
|
||||||
|
GetShotsWithMetadataFilterResultQueryVariables
|
||||||
|
>(GetShotsWithMetadataFilterResultDocument, options);
|
||||||
|
}
|
||||||
|
export type GetShotsWithMetadataFilterResultQueryHookResult = ReturnType<
|
||||||
|
typeof useGetShotsWithMetadataFilterResultQuery
|
||||||
|
>;
|
||||||
|
export type GetShotsWithMetadataFilterResultLazyQueryHookResult = ReturnType<
|
||||||
|
typeof useGetShotsWithMetadataFilterResultLazyQuery
|
||||||
|
>;
|
||||||
|
export type GetShotsWithMetadataFilterResultSuspenseQueryHookResult =
|
||||||
|
ReturnType<typeof useGetShotsWithMetadataFilterResultSuspenseQuery>;
|
||||||
|
export type GetShotsWithMetadataFilterResultQueryResult = Apollo.QueryResult<
|
||||||
|
GetShotsWithMetadataFilterResultQuery,
|
||||||
|
GetShotsWithMetadataFilterResultQueryVariables
|
||||||
|
>;
|
||||||
export const GetShotsWithMetadataDocument = gql`
|
export const GetShotsWithMetadataDocument = gql`
|
||||||
query GetShotsWithMetadata(
|
query GetShotsWithMetadata(
|
||||||
$filterInput: FilterInput!
|
$filterInput: FilterInput!
|
||||||
|
|||||||
@@ -31,6 +31,28 @@ query GetShotsWithVideoGql($filterInput: FilterInput!, $limit: Int) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
## Reserved for playlists (which are created from a filter)
|
||||||
|
query GetShotsWithMetadataFilterResult(
|
||||||
|
$filterInput: FilterInput!
|
||||||
|
$shotsPagination: GetShotsPagination
|
||||||
|
$limit: Int
|
||||||
|
$ids: [Int!]
|
||||||
|
) {
|
||||||
|
getShotsWithMetadata(
|
||||||
|
filterInput: $filterInput
|
||||||
|
shotsPagination: $shotsPagination
|
||||||
|
limit: $limit
|
||||||
|
ids: $ids
|
||||||
|
) {
|
||||||
|
count
|
||||||
|
shots {
|
||||||
|
...ShotWithAllFeatures
|
||||||
|
}
|
||||||
|
ids
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# TODO: Delete
|
||||||
query GetShotsWithMetadata(
|
query GetShotsWithMetadata(
|
||||||
$filterInput: FilterInput!
|
$filterInput: FilterInput!
|
||||||
$shotsPagination: GetShotsPagination
|
$shotsPagination: GetShotsPagination
|
||||||
|
|||||||
@@ -545,6 +545,10 @@ type Mutation {
|
|||||||
annotationName: String!
|
annotationName: String!
|
||||||
notes: String = null
|
notes: String = null
|
||||||
): AddShotAnnotationReturn!
|
): AddShotAnnotationReturn!
|
||||||
|
updateShotAnnotations(
|
||||||
|
shotId: Int!
|
||||||
|
annotations: [UpdateAnnotationInputGQL!]!
|
||||||
|
): UpdateShotAnnotationReturn!
|
||||||
getProfileImageUploadLink(
|
getProfileImageUploadLink(
|
||||||
fileExt: String = ".png"
|
fileExt: String = ".png"
|
||||||
): GetProfileUploadLinkReturn!
|
): GetProfileUploadLinkReturn!
|
||||||
@@ -598,6 +602,27 @@ type OtherErrorNeedsNote {
|
|||||||
msg: String
|
msg: String
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type UpdateShotAnnotationReturn {
|
||||||
|
value: SuccessfulUpdateUpdateShotAnnotationErrors!
|
||||||
|
}
|
||||||
|
|
||||||
|
union SuccessfulUpdateUpdateShotAnnotationErrors =
|
||||||
|
SuccessfulUpdate
|
||||||
|
| UpdateShotAnnotationErrors
|
||||||
|
|
||||||
|
type SuccessfulUpdate {
|
||||||
|
value: Boolean!
|
||||||
|
}
|
||||||
|
|
||||||
|
type UpdateShotAnnotationErrors {
|
||||||
|
error: DoesNotOwnShotErr
|
||||||
|
}
|
||||||
|
|
||||||
|
input UpdateAnnotationInputGQL {
|
||||||
|
name: String!
|
||||||
|
notes: String = null
|
||||||
|
}
|
||||||
|
|
||||||
type GetProfileUploadLinkReturn {
|
type GetProfileUploadLinkReturn {
|
||||||
value: UploadLinkGetProfileUploadLinkErrors!
|
value: UploadLinkGetProfileUploadLinkErrors!
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user