Compare commits
26 Commits
mk/extend-
...
284334606d
Author | SHA1 | Date | |
---|---|---|---|
284334606d | |||
a883bc3e2f | |||
b50ea5b573 | |||
de17659dbb | |||
33886b4e9e | |||
9d0ba908dc | |||
7b4880a990 | |||
8ed177b0f3 | |||
976cc66ccb | |||
af461fff00 | |||
7a39b4ca60 | |||
9befbe3833 | |||
68a4c064f3 | |||
54fd741670 | |||
2f9e630de4 | |||
5efd8ef8e5 | |||
6ad3d449d8 | |||
8fe20d1c41 | |||
e151f39582 | |||
f136ddb9ca | |||
5d05614e07 | |||
c4c3ccde00 | |||
e137ce8ad1 | |||
bd5bebb747 | |||
034facebf3 | |||
ac1fceb648 |
@@ -12,7 +12,7 @@
|
||||
"author": "Ivan Malison <IvanMalison@gmail.com>",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@apollo/client": "^3.9.2",
|
||||
"@apollo/client": "^3.11.10",
|
||||
"@graphql-codegen/cli": "^5.0.0",
|
||||
"@graphql-codegen/typescript": "^4.0.1",
|
||||
"@graphql-codegen/typescript-operations": "^4.0.1",
|
||||
|
511
src/index.tsx
511
src/index.tsx
@@ -186,12 +186,29 @@ export type DoesNotOwnShotErrOtherErrorNeedsNote =
|
||||
| DoesNotOwnShotErr
|
||||
| OtherErrorNeedsNote;
|
||||
|
||||
export type EditShotReturn = {
|
||||
__typename?: "EditShotReturn";
|
||||
error?: Maybe<DoesNotOwnShotErr>;
|
||||
shot?: Maybe<ShotGql>;
|
||||
};
|
||||
|
||||
export type EditUserInputGql = {
|
||||
fargoRating?: InputMaybe<Scalars["Int"]["input"]>;
|
||||
username?: InputMaybe<Scalars["String"]["input"]>;
|
||||
videosPrivateByDefault?: InputMaybe<Scalars["Boolean"]["input"]>;
|
||||
};
|
||||
|
||||
export type EditableShotFieldInputGql = {
|
||||
backcut?: InputMaybe<Scalars["Boolean"]["input"]>;
|
||||
excludeFromStats?: InputMaybe<Scalars["Boolean"]["input"]>;
|
||||
intendedPocketType?: InputMaybe<PocketEnum>;
|
||||
make?: InputMaybe<Scalars["Boolean"]["input"]>;
|
||||
notes?: InputMaybe<Scalars["String"]["input"]>;
|
||||
shotDirection?: InputMaybe<ShotDirectionEnum>;
|
||||
spinType?: InputMaybe<SpinTypeEnum>;
|
||||
targetPocketAngleDirection?: InputMaybe<ShotDirectionEnum>;
|
||||
};
|
||||
|
||||
export type EnumAggregation = {
|
||||
feature: Scalars["String"]["input"];
|
||||
};
|
||||
@@ -1964,6 +1981,12 @@ export type HomographyInfoGql = {
|
||||
sourcePoints: PocketPointsGql;
|
||||
};
|
||||
|
||||
export enum IncludePrivateEnum {
|
||||
All = "ALL",
|
||||
Mine = "MINE",
|
||||
None = "NONE",
|
||||
}
|
||||
|
||||
export enum InitPlaylistUploadStatusEnum {
|
||||
NotApplicable = "NOT_APPLICABLE",
|
||||
NotUploaded = "NOT_UPLOADED",
|
||||
@@ -1999,8 +2022,17 @@ export type MedalGql = {
|
||||
};
|
||||
|
||||
export type MedalScope =
|
||||
| { interval: TimeInterval; videoId?: never }
|
||||
| { interval?: never; videoId: Scalars["Int"]["input"] };
|
||||
| {
|
||||
datetimeRange: DatetimeRangeAggregationInput;
|
||||
interval?: never;
|
||||
videoId?: never;
|
||||
} /** @deprecated NO LONGER SUPPORTED, USE DATETIME_RANGE */
|
||||
| { datetimeRange?: never; interval: TimeInterval; videoId?: never }
|
||||
| {
|
||||
datetimeRange?: never;
|
||||
interval?: never;
|
||||
videoId: Scalars["Int"]["input"];
|
||||
};
|
||||
|
||||
export type MustHaveSetForUploadLinkErr = {
|
||||
__typename?: "MustHaveSetForUploadLinkErr";
|
||||
@@ -2025,6 +2057,7 @@ export type Mutation = {
|
||||
createUploadStream: CreateUploadStreamReturn;
|
||||
deleteVideo: Scalars["Boolean"]["output"];
|
||||
editProfileImageUri: UserGql;
|
||||
editShot: EditShotReturn;
|
||||
editUploadStream: Scalars["Boolean"]["output"];
|
||||
editUser: UserGql;
|
||||
findPrerecordTableLayout?: Maybe<HomographyInfoGql>;
|
||||
@@ -2060,6 +2093,11 @@ export type MutationEditProfileImageUriArgs = {
|
||||
profileImageUri: Scalars["String"]["input"];
|
||||
};
|
||||
|
||||
export type MutationEditShotArgs = {
|
||||
fieldsToEdit: EditableShotFieldInputGql;
|
||||
shotId: Scalars["Int"]["input"];
|
||||
};
|
||||
|
||||
export type MutationEditUploadStreamArgs = {
|
||||
videoId: Scalars["Int"]["input"];
|
||||
videoMetadata: VideoMetadataInput;
|
||||
@@ -2227,8 +2265,10 @@ export type QueryGetBucketSetArgs = {
|
||||
|
||||
export type QueryGetFeedVideosArgs = {
|
||||
after?: InputMaybe<Scalars["String"]["input"]>;
|
||||
feedInput?: InputMaybe<VideoFeedInputGql>;
|
||||
filters?: InputMaybe<VideoFilterInput>;
|
||||
includeCallersVideos?: InputMaybe<Scalars["Boolean"]["input"]>;
|
||||
includePrivate?: IncludePrivateEnum;
|
||||
limit?: Scalars["Int"]["input"];
|
||||
};
|
||||
|
||||
@@ -2469,6 +2509,15 @@ export type ShotGql = {
|
||||
|
||||
export type ShotsOrderingComponent =
|
||||
| {
|
||||
difficulty: FloatOrdering;
|
||||
marginOfError?: never;
|
||||
runLength?: never;
|
||||
startFrame?: never;
|
||||
videoCreation?: never;
|
||||
videoId?: never;
|
||||
}
|
||||
| {
|
||||
difficulty?: never;
|
||||
marginOfError: FloatOrdering;
|
||||
runLength?: never;
|
||||
startFrame?: never;
|
||||
@@ -2476,6 +2525,7 @@ export type ShotsOrderingComponent =
|
||||
videoId?: never;
|
||||
}
|
||||
| {
|
||||
difficulty?: never;
|
||||
marginOfError?: never;
|
||||
runLength: IntOrdering;
|
||||
startFrame?: never;
|
||||
@@ -2483,6 +2533,7 @@ export type ShotsOrderingComponent =
|
||||
videoId?: never;
|
||||
}
|
||||
| {
|
||||
difficulty?: never;
|
||||
marginOfError?: never;
|
||||
runLength?: never;
|
||||
startFrame: IntOrdering;
|
||||
@@ -2490,6 +2541,7 @@ export type ShotsOrderingComponent =
|
||||
videoId?: never;
|
||||
}
|
||||
| {
|
||||
difficulty?: never;
|
||||
marginOfError?: never;
|
||||
runLength?: never;
|
||||
startFrame?: never;
|
||||
@@ -2497,6 +2549,7 @@ export type ShotsOrderingComponent =
|
||||
videoId?: never;
|
||||
}
|
||||
| {
|
||||
difficulty?: never;
|
||||
marginOfError?: never;
|
||||
runLength?: never;
|
||||
startFrame?: never;
|
||||
@@ -2664,6 +2717,23 @@ export type UserRelationshipsResult = {
|
||||
relationships: Array<UserRelationship>;
|
||||
};
|
||||
|
||||
export type VideoFeedInputGql =
|
||||
| {
|
||||
allUsers: Scalars["Boolean"]["input"];
|
||||
followedByUserId?: never;
|
||||
userId?: never;
|
||||
}
|
||||
| {
|
||||
allUsers?: never;
|
||||
followedByUserId: Scalars["Int"]["input"];
|
||||
userId?: never;
|
||||
}
|
||||
| {
|
||||
allUsers?: never;
|
||||
followedByUserId?: never;
|
||||
userId: Scalars["Int"]["input"];
|
||||
};
|
||||
|
||||
export type VideoFilterInput = {
|
||||
createdAt?: InputMaybe<DateRangeFilter>;
|
||||
excludeVideosWithNoShots?: InputMaybe<Scalars["Boolean"]["input"]>;
|
||||
@@ -2926,6 +2996,8 @@ export type GetVideoFeedQueryVariables = Exact<{
|
||||
after?: InputMaybe<Scalars["String"]["input"]>;
|
||||
filters?: InputMaybe<VideoFilterInput>;
|
||||
includeCallersVideos?: InputMaybe<Scalars["Boolean"]["input"]>;
|
||||
includePrivate?: InputMaybe<IncludePrivateEnum>;
|
||||
feedInput?: InputMaybe<VideoFeedInputGql>;
|
||||
}>;
|
||||
|
||||
export type GetVideoFeedQuery = {
|
||||
@@ -2999,6 +3071,12 @@ export type GetVideoMakePercentageIntervalsQuery = {
|
||||
}>;
|
||||
};
|
||||
|
||||
export type MedalFieldsFragment = {
|
||||
__typename?: "MedalGQL";
|
||||
count: number;
|
||||
nickname?: string | null;
|
||||
};
|
||||
|
||||
export type GetMedalsQueryVariables = Exact<{
|
||||
scope: MedalScope;
|
||||
userId?: InputMaybe<Scalars["Int"]["input"]>;
|
||||
@@ -3008,11 +3086,6 @@ export type GetMedalsQuery = {
|
||||
__typename?: "Query";
|
||||
getMedals: {
|
||||
__typename?: "RequestedMedalsGQL";
|
||||
distanceOver66?: {
|
||||
__typename?: "MedalGQL";
|
||||
count: number;
|
||||
nickname?: string | null;
|
||||
} | null;
|
||||
distanceOver78?: {
|
||||
__typename?: "MedalGQL";
|
||||
count: number;
|
||||
@@ -3073,37 +3146,52 @@ export type GetMedalsQuery = {
|
||||
count: number;
|
||||
nickname?: string | null;
|
||||
} | null;
|
||||
totalMakes25?: {
|
||||
__typename?: "MedalGQL";
|
||||
count: number;
|
||||
nickname?: string | null;
|
||||
} | null;
|
||||
totalMakes50?: {
|
||||
__typename?: "MedalGQL";
|
||||
count: number;
|
||||
nickname?: string | null;
|
||||
} | null;
|
||||
totalMakes75?: {
|
||||
__typename?: "MedalGQL";
|
||||
count: number;
|
||||
nickname?: string | null;
|
||||
} | null;
|
||||
totalMakes100?: {
|
||||
__typename?: "MedalGQL";
|
||||
count: number;
|
||||
nickname?: string | null;
|
||||
} | null;
|
||||
totalMakes200?: {
|
||||
totalMakes500?: {
|
||||
__typename?: "MedalGQL";
|
||||
count: number;
|
||||
nickname?: string | null;
|
||||
} | null;
|
||||
totalMakes300?: {
|
||||
totalMakes1000?: {
|
||||
__typename?: "MedalGQL";
|
||||
count: number;
|
||||
nickname?: string | null;
|
||||
} | null;
|
||||
totalMakes400?: {
|
||||
totalMakes5000?: {
|
||||
__typename?: "MedalGQL";
|
||||
count: number;
|
||||
nickname?: string | null;
|
||||
} | null;
|
||||
totalMakes10000?: {
|
||||
__typename?: "MedalGQL";
|
||||
count: number;
|
||||
nickname?: string | null;
|
||||
} | null;
|
||||
dailyMakes50?: {
|
||||
__typename?: "MedalGQL";
|
||||
count: number;
|
||||
nickname?: string | null;
|
||||
} | null;
|
||||
dailyMakes100?: {
|
||||
__typename?: "MedalGQL";
|
||||
count: number;
|
||||
nickname?: string | null;
|
||||
} | null;
|
||||
dailyMakes150?: {
|
||||
__typename?: "MedalGQL";
|
||||
count: number;
|
||||
nickname?: string | null;
|
||||
} | null;
|
||||
dailyMakes200?: {
|
||||
__typename?: "MedalGQL";
|
||||
count: number;
|
||||
nickname?: string | null;
|
||||
} | null;
|
||||
dailyMakes250?: {
|
||||
__typename?: "MedalGQL";
|
||||
count: number;
|
||||
nickname?: string | null;
|
||||
@@ -3451,6 +3539,74 @@ export type ShotWithAllFeaturesFragment = {
|
||||
}>;
|
||||
};
|
||||
|
||||
export type EditShotMutationVariables = Exact<{
|
||||
shotId: Scalars["Int"]["input"];
|
||||
fieldsToEdit: EditableShotFieldInputGql;
|
||||
}>;
|
||||
|
||||
export type EditShotMutation = {
|
||||
__typename?: "Mutation";
|
||||
editShot: {
|
||||
__typename?: "EditShotReturn";
|
||||
error?: {
|
||||
__typename?: "DoesNotOwnShotErr";
|
||||
shotId: number;
|
||||
msg?: string | null;
|
||||
} | null;
|
||||
shot?: {
|
||||
__typename?: "ShotGQL";
|
||||
id: number;
|
||||
videoId: number;
|
||||
startFrame: number;
|
||||
endFrame: number;
|
||||
startTime: number;
|
||||
endTime: number;
|
||||
falsePositiveScore?: number | null;
|
||||
createdAt?: any | null;
|
||||
updatedAt?: any | null;
|
||||
user?: { __typename?: "UserGQL"; id: number } | 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;
|
||||
difficulty?: number | null;
|
||||
} | null;
|
||||
pocketingIntentionInfo?: {
|
||||
__typename?: "PocketingIntentionInfoGQL";
|
||||
ballId: number;
|
||||
pocketId: PocketIdentifier;
|
||||
pathMetadataIndex: number;
|
||||
} | null;
|
||||
serializedShotPaths?: {
|
||||
__typename?: "SerializedShotPathsGQL";
|
||||
b64EncodedBuffer?: string | null;
|
||||
} | null;
|
||||
annotations: Array<{
|
||||
__typename?: "ShotAnnotationGQL";
|
||||
shotId: number;
|
||||
notes: string;
|
||||
type: {
|
||||
__typename?: "ShotAnnotationTypeGQL";
|
||||
id: number;
|
||||
name: string;
|
||||
};
|
||||
}>;
|
||||
} | null;
|
||||
};
|
||||
};
|
||||
|
||||
export type GetProfileImageUploadLinkMutationVariables = Exact<{
|
||||
fileExt?: InputMaybe<Scalars["String"]["input"]>;
|
||||
}>;
|
||||
@@ -3490,9 +3646,13 @@ export type EditProfileImageUriMutation = {
|
||||
id: number;
|
||||
firebaseUid?: string | null;
|
||||
username: string;
|
||||
isAdmin?: boolean | null;
|
||||
profileImageUri?: string | null;
|
||||
fargoRating?: number | null;
|
||||
activeVideoId?: number | null;
|
||||
createdAt?: any | null;
|
||||
updatedAt?: any | null;
|
||||
videosPrivateByDefault?: boolean | null;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -3515,6 +3675,27 @@ export type GetLoggedInUserQuery = {
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type GetUserQueryVariables = Exact<{
|
||||
userId: Scalars["Int"]["input"];
|
||||
}>;
|
||||
|
||||
export type GetUserQuery = {
|
||||
__typename?: "Query";
|
||||
getUser?: {
|
||||
__typename?: "UserGQL";
|
||||
id: number;
|
||||
firebaseUid?: string | null;
|
||||
username: string;
|
||||
isAdmin?: boolean | null;
|
||||
profileImageUri?: string | null;
|
||||
fargoRating?: number | null;
|
||||
activeVideoId?: number | null;
|
||||
createdAt?: any | null;
|
||||
updatedAt?: any | null;
|
||||
videosPrivateByDefault?: boolean | null;
|
||||
} | null;
|
||||
};
|
||||
|
||||
export type GetUserPlayTimeQueryVariables = Exact<{
|
||||
userId: Scalars["Int"]["input"];
|
||||
filters?: InputMaybe<VideoFilterInput>;
|
||||
@@ -3659,6 +3840,20 @@ export type EditUserMutation = {
|
||||
};
|
||||
};
|
||||
|
||||
export type UserFragmentFragment = {
|
||||
__typename?: "UserGQL";
|
||||
id: number;
|
||||
firebaseUid?: string | null;
|
||||
username: string;
|
||||
isAdmin?: boolean | null;
|
||||
profileImageUri?: string | null;
|
||||
fargoRating?: number | null;
|
||||
activeVideoId?: number | null;
|
||||
createdAt?: any | null;
|
||||
updatedAt?: any | null;
|
||||
videosPrivateByDefault?: boolean | null;
|
||||
};
|
||||
|
||||
export type GetStreamMonitoringDetailsQueryVariables = Exact<{
|
||||
videoId: Scalars["Int"]["input"];
|
||||
debuggingJson?: InputMaybe<Scalars["JSON"]["input"]>;
|
||||
@@ -3674,6 +3869,7 @@ export type GetStreamMonitoringDetailsQuery = {
|
||||
elapsedTime?: number | null;
|
||||
currentHomography?: {
|
||||
__typename?: "HomographyInfoGQL";
|
||||
id: number;
|
||||
frameIndex: number;
|
||||
crop: {
|
||||
__typename?: "BoundingBoxGQL";
|
||||
@@ -3737,6 +3933,7 @@ export type GetVideoUpdatePageDetailsQuery = {
|
||||
makePercentage: number;
|
||||
elapsedTime?: number | null;
|
||||
tableSize: number;
|
||||
private: boolean;
|
||||
tags: Array<{
|
||||
__typename?: "VideoTag";
|
||||
name: string;
|
||||
@@ -3776,6 +3973,7 @@ export type GetVideoDetailsQuery = {
|
||||
createdAt?: any | null;
|
||||
updatedAt?: any | null;
|
||||
tableSize: number;
|
||||
private: boolean;
|
||||
owner?: {
|
||||
__typename?: "UserGQL";
|
||||
id: number;
|
||||
@@ -3889,6 +4087,7 @@ export type GetVideoQuery = {
|
||||
} | null;
|
||||
homographyHistory: Array<{
|
||||
__typename?: "HomographyInfoGQL";
|
||||
id: number;
|
||||
frameIndex: number;
|
||||
crop: {
|
||||
__typename?: "BoundingBoxGQL";
|
||||
@@ -4099,6 +4298,7 @@ export type FindPrerecordTableLayoutMutation = {
|
||||
__typename?: "Mutation";
|
||||
findPrerecordTableLayout?: {
|
||||
__typename?: "HomographyInfoGQL";
|
||||
id: number;
|
||||
frameIndex: number;
|
||||
crop: {
|
||||
__typename?: "BoundingBoxGQL";
|
||||
@@ -4128,6 +4328,7 @@ export type FindPrerecordTableLayoutMutation = {
|
||||
|
||||
export type HomographyInfoFragment = {
|
||||
__typename?: "HomographyInfoGQL";
|
||||
id: number;
|
||||
frameIndex: number;
|
||||
crop: {
|
||||
__typename?: "BoundingBoxGQL";
|
||||
@@ -4369,6 +4570,12 @@ export const VideoCardFieldsFragmentDoc = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const MedalFieldsFragmentDoc = gql`
|
||||
fragment MedalFields on MedalGQL {
|
||||
count
|
||||
nickname
|
||||
}
|
||||
`;
|
||||
export const ShotWithAllFeaturesFragmentDoc = gql`
|
||||
fragment ShotWithAllFeatures on ShotGQL {
|
||||
id
|
||||
@@ -4417,6 +4624,20 @@ export const ShotWithAllFeaturesFragmentDoc = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
export const UserFragmentFragmentDoc = gql`
|
||||
fragment UserFragment on UserGQL {
|
||||
id
|
||||
firebaseUid
|
||||
username
|
||||
isAdmin
|
||||
profileImageUri
|
||||
fargoRating
|
||||
activeVideoId
|
||||
createdAt
|
||||
updatedAt
|
||||
videosPrivateByDefault
|
||||
}
|
||||
`;
|
||||
export const VideoStreamMetadataFragmentDoc = gql`
|
||||
fragment VideoStreamMetadata on VideoGQL {
|
||||
id
|
||||
@@ -4490,6 +4711,7 @@ export const VideoDurationDataFragmentDoc = gql`
|
||||
`;
|
||||
export const HomographyInfoFragmentDoc = gql`
|
||||
fragment HomographyInfo on HomographyInfoGQL {
|
||||
id
|
||||
frameIndex
|
||||
crop {
|
||||
left
|
||||
@@ -4772,12 +4994,16 @@ export const GetVideoFeedDocument = gql`
|
||||
$after: String = null
|
||||
$filters: VideoFilterInput = null
|
||||
$includeCallersVideos: Boolean = null
|
||||
$includePrivate: IncludePrivateEnum = MINE
|
||||
$feedInput: VideoFeedInputGQL = null
|
||||
) {
|
||||
getFeedVideos(
|
||||
limit: $limit
|
||||
after: $after
|
||||
filters: $filters
|
||||
includeCallersVideos: $includeCallersVideos
|
||||
includePrivate: $includePrivate
|
||||
feedInput: $feedInput
|
||||
) {
|
||||
videos {
|
||||
...VideoCardFields
|
||||
@@ -4807,6 +5033,8 @@ export const GetVideoFeedDocument = gql`
|
||||
* after: // value for 'after'
|
||||
* filters: // value for 'filters'
|
||||
* includeCallersVideos: // value for 'includeCallersVideos'
|
||||
* includePrivate: // value for 'includePrivate'
|
||||
* feedInput: // value for 'feedInput'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
@@ -4943,88 +5171,75 @@ export type GetVideoMakePercentageIntervalsQueryResult = Apollo.QueryResult<
|
||||
export const GetMedalsDocument = gql`
|
||||
query getMedals($scope: MedalScope!, $userId: Int) {
|
||||
getMedals(scope: $scope, userId: $userId) {
|
||||
distanceOver66 {
|
||||
count
|
||||
nickname
|
||||
}
|
||||
distanceOver78 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
distanceOver90 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength3 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength5 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength8 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength10 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength15 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength20 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength25 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength30 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength40 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength50 {
|
||||
count
|
||||
nickname
|
||||
}
|
||||
totalMakes25 {
|
||||
count
|
||||
nickname
|
||||
}
|
||||
totalMakes50 {
|
||||
count
|
||||
nickname
|
||||
}
|
||||
totalMakes75 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
totalMakes100 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
totalMakes200 {
|
||||
count
|
||||
nickname
|
||||
totalMakes500 {
|
||||
...MedalFields
|
||||
}
|
||||
totalMakes300 {
|
||||
count
|
||||
nickname
|
||||
totalMakes1000 {
|
||||
...MedalFields
|
||||
}
|
||||
totalMakes400 {
|
||||
count
|
||||
nickname
|
||||
totalMakes5000 {
|
||||
...MedalFields
|
||||
}
|
||||
totalMakes10000 {
|
||||
...MedalFields
|
||||
}
|
||||
dailyMakes50 {
|
||||
...MedalFields
|
||||
}
|
||||
dailyMakes100 {
|
||||
...MedalFields
|
||||
}
|
||||
dailyMakes150 {
|
||||
...MedalFields
|
||||
}
|
||||
dailyMakes200 {
|
||||
...MedalFields
|
||||
}
|
||||
dailyMakes250 {
|
||||
...MedalFields
|
||||
}
|
||||
}
|
||||
}
|
||||
${MedalFieldsFragmentDoc}
|
||||
`;
|
||||
|
||||
/**
|
||||
@@ -5746,6 +5961,61 @@ export type GetShotsByIdsQueryResult = Apollo.QueryResult<
|
||||
GetShotsByIdsQuery,
|
||||
GetShotsByIdsQueryVariables
|
||||
>;
|
||||
export const EditShotDocument = gql`
|
||||
mutation EditShot($shotId: Int!, $fieldsToEdit: EditableShotFieldInputGQL!) {
|
||||
editShot(shotId: $shotId, fieldsToEdit: $fieldsToEdit) {
|
||||
error {
|
||||
shotId
|
||||
msg
|
||||
}
|
||||
shot {
|
||||
...ShotWithAllFeatures
|
||||
}
|
||||
}
|
||||
}
|
||||
${ShotWithAllFeaturesFragmentDoc}
|
||||
`;
|
||||
export type EditShotMutationFn = Apollo.MutationFunction<
|
||||
EditShotMutation,
|
||||
EditShotMutationVariables
|
||||
>;
|
||||
|
||||
/**
|
||||
* __useEditShotMutation__
|
||||
*
|
||||
* To run a mutation, you first call `useEditShotMutation` within a React component and pass it any options that fit your needs.
|
||||
* When your component renders, `useEditShotMutation` 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 [editShotMutation, { data, loading, error }] = useEditShotMutation({
|
||||
* variables: {
|
||||
* shotId: // value for 'shotId'
|
||||
* fieldsToEdit: // value for 'fieldsToEdit'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useEditShotMutation(
|
||||
baseOptions?: Apollo.MutationHookOptions<
|
||||
EditShotMutation,
|
||||
EditShotMutationVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useMutation<EditShotMutation, EditShotMutationVariables>(
|
||||
EditShotDocument,
|
||||
options,
|
||||
);
|
||||
}
|
||||
export type EditShotMutationHookResult = ReturnType<typeof useEditShotMutation>;
|
||||
export type EditShotMutationResult = Apollo.MutationResult<EditShotMutation>;
|
||||
export type EditShotMutationOptions = Apollo.BaseMutationOptions<
|
||||
EditShotMutation,
|
||||
EditShotMutationVariables
|
||||
>;
|
||||
export const GetProfileImageUploadLinkDocument = gql`
|
||||
mutation getProfileImageUploadLink($fileExt: String = ".png") {
|
||||
getProfileImageUploadLink(fileExt: $fileExt) {
|
||||
@@ -5815,14 +6085,10 @@ export type GetProfileImageUploadLinkMutationOptions =
|
||||
export const EditProfileImageUriDocument = gql`
|
||||
mutation editProfileImageUri($profileImageUri: String!) {
|
||||
editProfileImageUri(profileImageUri: $profileImageUri) {
|
||||
id
|
||||
firebaseUid
|
||||
username
|
||||
profileImageUri
|
||||
createdAt
|
||||
updatedAt
|
||||
...UserFragment
|
||||
}
|
||||
}
|
||||
${UserFragmentFragmentDoc}
|
||||
`;
|
||||
export type EditProfileImageUriMutationFn = Apollo.MutationFunction<
|
||||
EditProfileImageUriMutation,
|
||||
@@ -5870,18 +6136,10 @@ export type EditProfileImageUriMutationOptions = Apollo.BaseMutationOptions<
|
||||
export const GetLoggedInUserDocument = gql`
|
||||
query getLoggedInUser {
|
||||
getLoggedInUser {
|
||||
id
|
||||
firebaseUid
|
||||
username
|
||||
isAdmin
|
||||
profileImageUri
|
||||
fargoRating
|
||||
activeVideoId
|
||||
createdAt
|
||||
updatedAt
|
||||
videosPrivateByDefault
|
||||
...UserFragment
|
||||
}
|
||||
}
|
||||
${UserFragmentFragmentDoc}
|
||||
`;
|
||||
|
||||
/**
|
||||
@@ -5948,6 +6206,73 @@ export type GetLoggedInUserQueryResult = Apollo.QueryResult<
|
||||
GetLoggedInUserQuery,
|
||||
GetLoggedInUserQueryVariables
|
||||
>;
|
||||
export const GetUserDocument = gql`
|
||||
query GetUser($userId: Int!) {
|
||||
getUser(userId: $userId) {
|
||||
...UserFragment
|
||||
}
|
||||
}
|
||||
${UserFragmentFragmentDoc}
|
||||
`;
|
||||
|
||||
/**
|
||||
* __useGetUserQuery__
|
||||
*
|
||||
* To run a query within a React component, call `useGetUserQuery` and pass it any options that fit your needs.
|
||||
* When your component renders, `useGetUserQuery` 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 } = useGetUserQuery({
|
||||
* variables: {
|
||||
* userId: // value for 'userId'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useGetUserQuery(
|
||||
baseOptions: Apollo.QueryHookOptions<GetUserQuery, GetUserQueryVariables>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useQuery<GetUserQuery, GetUserQueryVariables>(
|
||||
GetUserDocument,
|
||||
options,
|
||||
);
|
||||
}
|
||||
export function useGetUserLazyQuery(
|
||||
baseOptions?: Apollo.LazyQueryHookOptions<
|
||||
GetUserQuery,
|
||||
GetUserQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useLazyQuery<GetUserQuery, GetUserQueryVariables>(
|
||||
GetUserDocument,
|
||||
options,
|
||||
);
|
||||
}
|
||||
export function useGetUserSuspenseQuery(
|
||||
baseOptions?: Apollo.SuspenseQueryHookOptions<
|
||||
GetUserQuery,
|
||||
GetUserQueryVariables
|
||||
>,
|
||||
) {
|
||||
const options = { ...defaultOptions, ...baseOptions };
|
||||
return Apollo.useSuspenseQuery<GetUserQuery, GetUserQueryVariables>(
|
||||
GetUserDocument,
|
||||
options,
|
||||
);
|
||||
}
|
||||
export type GetUserQueryHookResult = ReturnType<typeof useGetUserQuery>;
|
||||
export type GetUserLazyQueryHookResult = ReturnType<typeof useGetUserLazyQuery>;
|
||||
export type GetUserSuspenseQueryHookResult = ReturnType<
|
||||
typeof useGetUserSuspenseQuery
|
||||
>;
|
||||
export type GetUserQueryResult = Apollo.QueryResult<
|
||||
GetUserQuery,
|
||||
GetUserQueryVariables
|
||||
>;
|
||||
export const GetUserPlayTimeDocument = gql`
|
||||
query GetUserPlayTime($userId: Int!, $filters: VideoFilterInput) {
|
||||
getPlayTime(userId: $userId, filters: $filters) {
|
||||
@@ -6704,6 +7029,7 @@ export const GetVideoUpdatePageDetailsDocument = gql`
|
||||
makePercentage
|
||||
elapsedTime
|
||||
tableSize
|
||||
private
|
||||
tags {
|
||||
tagClasses {
|
||||
name
|
||||
@@ -6844,6 +7170,7 @@ export const GetVideoDetailsDocument = gql`
|
||||
createdAt
|
||||
updatedAt
|
||||
tableSize
|
||||
private
|
||||
owner {
|
||||
id
|
||||
firebaseUid
|
||||
|
@@ -62,12 +62,16 @@ query GetVideoFeed(
|
||||
$after: String = null
|
||||
$filters: VideoFilterInput = null
|
||||
$includeCallersVideos: Boolean = null
|
||||
$includePrivate: IncludePrivateEnum = MINE
|
||||
$feedInput: VideoFeedInputGQL = null
|
||||
) {
|
||||
getFeedVideos(
|
||||
limit: $limit
|
||||
after: $after
|
||||
filters: $filters
|
||||
includeCallersVideos: $includeCallersVideos
|
||||
includePrivate: $includePrivate
|
||||
feedInput: $feedInput
|
||||
) {
|
||||
videos {
|
||||
...VideoCardFields
|
||||
|
@@ -1,84 +1,75 @@
|
||||
fragment MedalFields on MedalGQL {
|
||||
count
|
||||
nickname
|
||||
}
|
||||
|
||||
query getMedals($scope: MedalScope!, $userId: Int) {
|
||||
getMedals(scope: $scope, userId: $userId) {
|
||||
distanceOver66 {
|
||||
count
|
||||
nickname
|
||||
}
|
||||
distanceOver78 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
distanceOver90 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength3 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength5 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength8 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength10 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength15 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength20 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength25 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength30 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength40 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
runLength50 {
|
||||
count
|
||||
nickname
|
||||
}
|
||||
totalMakes25 {
|
||||
count
|
||||
nickname
|
||||
}
|
||||
totalMakes50 {
|
||||
count
|
||||
nickname
|
||||
}
|
||||
totalMakes75 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
totalMakes100 {
|
||||
count
|
||||
nickname
|
||||
...MedalFields
|
||||
}
|
||||
totalMakes200 {
|
||||
count
|
||||
nickname
|
||||
totalMakes500 {
|
||||
...MedalFields
|
||||
}
|
||||
totalMakes300 {
|
||||
count
|
||||
nickname
|
||||
totalMakes1000 {
|
||||
...MedalFields
|
||||
}
|
||||
totalMakes400 {
|
||||
count
|
||||
nickname
|
||||
totalMakes5000 {
|
||||
...MedalFields
|
||||
}
|
||||
totalMakes10000 {
|
||||
...MedalFields
|
||||
}
|
||||
dailyMakes50 {
|
||||
...MedalFields
|
||||
}
|
||||
dailyMakes100 {
|
||||
...MedalFields
|
||||
}
|
||||
dailyMakes150 {
|
||||
...MedalFields
|
||||
}
|
||||
dailyMakes200 {
|
||||
...MedalFields
|
||||
}
|
||||
dailyMakes250 {
|
||||
...MedalFields
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -178,3 +178,15 @@ fragment ShotWithAllFeatures on ShotGQL {
|
||||
notes
|
||||
}
|
||||
}
|
||||
|
||||
mutation EditShot($shotId: Int!, $fieldsToEdit: EditableShotFieldInputGQL!) {
|
||||
editShot(shotId: $shotId, fieldsToEdit: $fieldsToEdit) {
|
||||
error {
|
||||
shotId
|
||||
msg
|
||||
}
|
||||
shot {
|
||||
...ShotWithAllFeatures
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -21,27 +21,19 @@ mutation getProfileImageUploadLink($fileExt: String = ".png") {
|
||||
|
||||
mutation editProfileImageUri($profileImageUri: String!) {
|
||||
editProfileImageUri(profileImageUri: $profileImageUri) {
|
||||
id
|
||||
firebaseUid
|
||||
username
|
||||
profileImageUri
|
||||
createdAt
|
||||
updatedAt
|
||||
...UserFragment
|
||||
}
|
||||
}
|
||||
|
||||
query getLoggedInUser {
|
||||
getLoggedInUser {
|
||||
id
|
||||
firebaseUid
|
||||
username
|
||||
isAdmin
|
||||
profileImageUri
|
||||
fargoRating
|
||||
activeVideoId
|
||||
createdAt
|
||||
updatedAt
|
||||
videosPrivateByDefault
|
||||
...UserFragment
|
||||
}
|
||||
}
|
||||
|
||||
query GetUser($userId: Int!) {
|
||||
getUser(userId: $userId) {
|
||||
...UserFragment
|
||||
}
|
||||
}
|
||||
|
||||
@@ -157,3 +149,16 @@ mutation editUser(
|
||||
videosPrivateByDefault
|
||||
}
|
||||
}
|
||||
|
||||
fragment UserFragment on UserGQL {
|
||||
id
|
||||
firebaseUid
|
||||
username
|
||||
isAdmin
|
||||
profileImageUri
|
||||
fargoRating
|
||||
activeVideoId
|
||||
createdAt
|
||||
updatedAt
|
||||
videosPrivateByDefault
|
||||
}
|
||||
|
@@ -36,6 +36,7 @@ query GetVideoUpdatePageDetails($videoId: Int!) {
|
||||
makePercentage
|
||||
elapsedTime
|
||||
tableSize
|
||||
private
|
||||
tags {
|
||||
tagClasses {
|
||||
name
|
||||
@@ -65,6 +66,7 @@ query GetVideoDetails($videoId: Int!) {
|
||||
createdAt
|
||||
updatedAt
|
||||
tableSize
|
||||
private
|
||||
owner {
|
||||
id
|
||||
firebaseUid
|
||||
@@ -222,6 +224,7 @@ mutation FindPrerecordTableLayout($b64Image: String!, $videoId: Int!) {
|
||||
}
|
||||
|
||||
fragment HomographyInfo on HomographyInfoGQL {
|
||||
id
|
||||
frameIndex
|
||||
crop {
|
||||
left
|
||||
|
@@ -66,8 +66,10 @@ type Query {
|
||||
getFeedVideos(
|
||||
limit: Int! = 5
|
||||
after: String = null
|
||||
includePrivate: IncludePrivateEnum! = MINE
|
||||
includeCallersVideos: Boolean = true
|
||||
filters: VideoFilterInput = null
|
||||
feedInput: VideoFeedInputGQL = null
|
||||
): VideoHistoryGQL!
|
||||
}
|
||||
|
||||
@@ -320,6 +322,8 @@ type MedalGQL {
|
||||
input MedalScope @oneOf {
|
||||
videoId: Int
|
||||
interval: TimeInterval
|
||||
@deprecated(reason: "NO LONGER SUPPORTED, USE DATETIME_RANGE")
|
||||
datetimeRange: DatetimeRangeAggregationInput
|
||||
}
|
||||
|
||||
type GetRunsResult {
|
||||
@@ -636,6 +640,7 @@ input GetShotsOrdering {
|
||||
input ShotsOrderingComponent @oneOf {
|
||||
videoCreation: DatetimeOrdering
|
||||
marginOfError: FloatOrdering
|
||||
difficulty: FloatOrdering
|
||||
videoId: IntOrdering
|
||||
startFrame: IntOrdering
|
||||
runLength: IntOrdering
|
||||
@@ -702,9 +707,25 @@ scalar JSON
|
||||
url: "https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf"
|
||||
)
|
||||
|
||||
enum IncludePrivateEnum {
|
||||
ALL
|
||||
MINE
|
||||
NONE
|
||||
}
|
||||
|
||||
input VideoFeedInputGQL @oneOf {
|
||||
followedByUserId: Int
|
||||
userId: Int
|
||||
allUsers: Boolean
|
||||
}
|
||||
|
||||
type Mutation {
|
||||
createBucketSet(params: CreateBucketSetInput!): BucketSetGQL!
|
||||
setLoggerLevel(path: String!, level: String!): Boolean!
|
||||
editShot(
|
||||
shotId: Int!
|
||||
fieldsToEdit: EditableShotFieldInputGQL!
|
||||
): EditShotReturn!
|
||||
addAnnotationToShot(
|
||||
shotId: Int!
|
||||
annotationName: String!
|
||||
@@ -742,6 +763,27 @@ input CreateBucketSetInput {
|
||||
buckets: [BucketInputGQL!]!
|
||||
}
|
||||
|
||||
type EditShotReturn {
|
||||
shot: ShotGQL
|
||||
error: DoesNotOwnShotErr
|
||||
}
|
||||
|
||||
type DoesNotOwnShotErr {
|
||||
shotId: Int!
|
||||
msg: String
|
||||
}
|
||||
|
||||
input EditableShotFieldInputGQL {
|
||||
intendedPocketType: PocketEnum
|
||||
shotDirection: ShotDirectionEnum
|
||||
spinType: SpinTypeEnum
|
||||
targetPocketAngleDirection: ShotDirectionEnum
|
||||
make: Boolean
|
||||
backcut: Boolean
|
||||
excludeFromStats: Boolean
|
||||
notes: String
|
||||
}
|
||||
|
||||
type AddShotAnnotationReturn {
|
||||
value: SuccessfulAddAddShotAnnotationErrors!
|
||||
}
|
||||
@@ -762,11 +804,6 @@ union DoesNotOwnShotErrOtherErrorNeedsNote =
|
||||
DoesNotOwnShotErr
|
||||
| OtherErrorNeedsNote
|
||||
|
||||
type DoesNotOwnShotErr {
|
||||
shotId: Int!
|
||||
msg: String
|
||||
}
|
||||
|
||||
type OtherErrorNeedsNote {
|
||||
msg: String
|
||||
}
|
||||
|
18
yarn.lock
18
yarn.lock
@@ -10,10 +10,10 @@
|
||||
"@jridgewell/gen-mapping" "^0.3.0"
|
||||
"@jridgewell/trace-mapping" "^0.3.9"
|
||||
|
||||
"@apollo/client@^3.9.2":
|
||||
version "3.9.2"
|
||||
resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.9.2.tgz#96edf2c212f828bad1ef3d84234fa473c5a27ff8"
|
||||
integrity sha512-Zw9WvXjqhpbgkvAvnj52vstOWwM0iedKWtn1hSq1cODQyoe1CF2uFwMYFI7l56BrAY9CzLi6MQA0AhxpgJgvxw==
|
||||
"@apollo/client@^3.11.10":
|
||||
version "3.12.3"
|
||||
resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.12.3.tgz#0d252749baad8328e06883fe118dc7e73e3bbb1f"
|
||||
integrity sha512-KZ5zymRdb8bMbGUb1wP2U04ff7qIGgaC1BCdCVC+IPFiXkxEhHBc5fDEQOwAUT+vUo9KbBh3g7QK/JCOswn59w==
|
||||
dependencies:
|
||||
"@graphql-typed-document-node/core" "^3.1.1"
|
||||
"@wry/caches" "^1.0.0"
|
||||
@@ -23,7 +23,7 @@
|
||||
hoist-non-react-statics "^3.3.2"
|
||||
optimism "^0.18.0"
|
||||
prop-types "^15.7.2"
|
||||
rehackt "0.0.3"
|
||||
rehackt "^0.1.0"
|
||||
response-iterator "^0.2.6"
|
||||
symbol-observable "^4.0.0"
|
||||
ts-invariant "^0.10.3"
|
||||
@@ -2633,10 +2633,10 @@ regenerator-runtime@^0.14.0:
|
||||
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz#356ade10263f685dda125100cd862c1db895327f"
|
||||
integrity sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==
|
||||
|
||||
rehackt@0.0.3:
|
||||
version "0.0.3"
|
||||
resolved "https://registry.yarnpkg.com/rehackt/-/rehackt-0.0.3.tgz#1ea454620d4641db8342e2db44595cf0e7ac6aa0"
|
||||
integrity sha512-aBRHudKhOWwsTvCbSoinzq+Lej/7R8e8UoPvLZo5HirZIIBLGAgdG7SL9QpdcBoQ7+3QYPi3lRLknAzXBlhZ7g==
|
||||
rehackt@^0.1.0:
|
||||
version "0.1.0"
|
||||
resolved "https://registry.yarnpkg.com/rehackt/-/rehackt-0.1.0.tgz#a7c5e289c87345f70da8728a7eb878e5d03c696b"
|
||||
integrity sha512-7kRDOuLHB87D/JESKxQoRwv4DzbIdwkAGQ7p6QKGdVlY1IZheUnVhlk/4UZlNUVxdAXpyxikE3URsG067ybVzw==
|
||||
|
||||
relay-runtime@12.0.0:
|
||||
version "12.0.0"
|
||||
|
Reference in New Issue
Block a user