diff --git a/src/index.tsx b/src/index.tsx index fada181..4c84046 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -28,6 +28,8 @@ export type Scalars = { Boolean: { input: boolean; output: boolean }; Int: { input: number; output: number }; Float: { input: number; output: number }; + /** Date (isoformat) */ + Date: { input: any; output: any }; /** Date with time (isoformat) */ DateTime: { input: any; output: any }; /** The `JSON` scalar type represents JSON values as specified by [ECMA-404](https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf). */ @@ -132,6 +134,15 @@ export type CueObjectFeaturesGql = { spinType?: Maybe; }; +export type DateRangeFilter = { + greaterThan?: InputMaybe; + greaterThanEqualTo?: InputMaybe; + greaterThanInclusive?: Scalars["Boolean"]["input"]; + includeOnNone?: Scalars["Boolean"]["input"]; + lessThan?: InputMaybe; + lessThanInclusive?: Scalars["Boolean"]["input"]; +}; + export type DatetimeRangeAggregationInput = { endDatetime: Scalars["DateTime"]["input"]; interval: TimeInterval; @@ -174,6 +185,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -210,6 +222,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -246,6 +259,7 @@ export type FilterInput = backcut: Array; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -280,8 +294,9 @@ export type FilterInput = andFilters?: never; annotations?: never; backcut?: never; - bankAngle: RangeFilter; + bankAngle: FloatRangeFilter; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -317,7 +332,8 @@ export type FilterInput = annotations?: never; backcut?: never; bankAngle?: never; - bankDistance: RangeFilter; + bankDistance: FloatRangeFilter; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -354,7 +370,8 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; - cueAngleAfterObject: RangeFilter; + createdAt: DateRangeFilter; + cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; @@ -390,8 +407,9 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; - cueAngleAfterObject?: never; - cueBallSpeed: RangeFilter; + createdAt?: never; + cueAngleAfterObject: FloatRangeFilter; + cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; cueSpeedAfterObject?: never; @@ -426,9 +444,10 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; - cueBallSpeed?: never; - cueObjectAngle: RangeFilter; + cueBallSpeed: FloatRangeFilter; + cueObjectAngle?: never; cueObjectDistance?: never; cueSpeedAfterObject?: never; difficulty?: never; @@ -462,10 +481,11 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; - cueObjectAngle?: never; - cueObjectDistance: RangeFilter; + cueObjectAngle: FloatRangeFilter; + cueObjectDistance?: never; cueSpeedAfterObject?: never; difficulty?: never; falsePositiveScore?: never; @@ -498,11 +518,12 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; - cueObjectDistance?: never; - cueSpeedAfterObject: RangeFilter; + cueObjectDistance: FloatRangeFilter; + cueSpeedAfterObject?: never; difficulty?: never; falsePositiveScore?: never; intendedPocketType?: never; @@ -534,12 +555,13 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; - cueSpeedAfterObject?: never; - difficulty: RangeFilter; + cueSpeedAfterObject: FloatRangeFilter; + difficulty?: never; falsePositiveScore?: never; intendedPocketType?: never; isDirect?: never; @@ -570,13 +592,14 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; cueObjectDistance?: never; cueSpeedAfterObject?: never; - difficulty?: never; - falsePositiveScore: RangeFilter; + difficulty: FloatRangeFilter; + falsePositiveScore?: never; intendedPocketType?: never; isDirect?: never; isLeft?: never; @@ -606,6 +629,44 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; + cueAngleAfterObject?: never; + cueBallSpeed?: never; + cueObjectAngle?: never; + cueObjectDistance?: never; + cueSpeedAfterObject?: never; + difficulty?: never; + falsePositiveScore: FloatRangeFilter; + intendedPocketType?: never; + isDirect?: never; + isLeft?: never; + isLeftMiss?: never; + isRight?: never; + isRightMiss?: never; + isStraight?: never; + kickAngle?: never; + kickDistance?: never; + make?: never; + missAngleInDegrees?: never; + notFilter?: never; + orFilters?: never; + shotDirection?: never; + spinType?: never; + tableSize?: never; + tags?: never; + targetPocketAngle?: never; + targetPocketAngleDirection?: never; + targetPocketDistance?: never; + userId?: never; + videoId?: never; + } + | { + andFilters?: never; + annotations?: never; + backcut?: never; + bankAngle?: never; + bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -642,6 +703,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -678,6 +740,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -714,6 +777,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -750,6 +814,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -786,6 +851,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -822,6 +888,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -858,6 +925,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -872,7 +940,7 @@ export type FilterInput = isRight?: never; isRightMiss?: never; isStraight?: never; - kickAngle: RangeFilter; + kickAngle: FloatRangeFilter; kickDistance?: never; make?: never; missAngleInDegrees?: never; @@ -894,6 +962,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -909,7 +978,7 @@ export type FilterInput = isRightMiss?: never; isStraight?: never; kickAngle?: never; - kickDistance: RangeFilter; + kickDistance: FloatRangeFilter; make?: never; missAngleInDegrees?: never; notFilter?: never; @@ -930,6 +999,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -966,6 +1036,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -983,7 +1054,7 @@ export type FilterInput = kickAngle?: never; kickDistance?: never; make?: never; - missAngleInDegrees: RangeFilter; + missAngleInDegrees: FloatRangeFilter; notFilter?: never; orFilters?: never; shotDirection?: never; @@ -1002,6 +1073,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -1038,6 +1110,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -1074,6 +1147,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -1110,6 +1184,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -1146,6 +1221,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -1168,7 +1244,7 @@ export type FilterInput = orFilters?: never; shotDirection?: never; spinType?: never; - tableSize: RangeFilter; + tableSize: FloatRangeFilter; tags?: never; targetPocketAngle?: never; targetPocketAngleDirection?: never; @@ -1182,6 +1258,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -1218,6 +1295,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -1242,7 +1320,7 @@ export type FilterInput = spinType?: never; tableSize?: never; tags?: never; - targetPocketAngle: RangeFilter; + targetPocketAngle: FloatRangeFilter; targetPocketAngleDirection?: never; targetPocketDistance?: never; userId?: never; @@ -1254,6 +1332,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -1290,6 +1369,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -1316,7 +1396,7 @@ export type FilterInput = tags?: never; targetPocketAngle?: never; targetPocketAngleDirection?: never; - targetPocketDistance: RangeFilter; + targetPocketDistance: FloatRangeFilter; userId?: never; videoId?: never; } @@ -1326,6 +1406,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -1362,6 +1443,7 @@ export type FilterInput = backcut?: never; bankAngle?: never; bankDistance?: never; + createdAt?: never; cueAngleAfterObject?: never; cueBallSpeed?: never; cueObjectAngle?: never; @@ -1393,6 +1475,15 @@ export type FilterInput = videoId: Array; }; +export type FloatRangeFilter = { + greaterThan?: InputMaybe; + greaterThanEqualTo?: InputMaybe; + greaterThanInclusive?: Scalars["Boolean"]["input"]; + includeOnNone?: Scalars["Boolean"]["input"]; + lessThan?: InputMaybe; + lessThanInclusive?: Scalars["Boolean"]["input"]; +}; + export type GetProfileUploadLinkErrors = { __typename?: "GetProfileUploadLinkErrors"; error: TooManyProfileImageUploadsErr; @@ -1709,15 +1800,6 @@ export type QueryWaitForArgs = { duration: Scalars["Float"]["input"]; }; -export type RangeFilter = { - greaterThan?: InputMaybe; - greaterThanEqualTo?: InputMaybe; - greaterThanInclusive?: Scalars["Boolean"]["input"]; - includeOnNone?: Scalars["Boolean"]["input"]; - lessThan?: InputMaybe; - lessThanInclusive?: Scalars["Boolean"]["input"]; -}; - export type SegmentAlreadyUploadedErr = { __typename?: "SegmentAlreadyUploadedErr"; segmentId: Scalars["Int"]["output"]; diff --git a/src/operations/shots.gql b/src/operations/shots.gql index 545443c..7249449 100644 --- a/src/operations/shots.gql +++ b/src/operations/shots.gql @@ -116,6 +116,7 @@ query GetShotsWithMetadata( serializedShotPaths { b64EncodedBuffer } + createdAt @include(if: $includeCreatedAt) updatedAt @include(if: $includeUpdatedAt) cueObjectFeatures @include(if: $includeCueObjectFeatures) { diff --git a/src/schema.gql b/src/schema.gql index 310c284..d75c6d2 100644 --- a/src/schema.gql +++ b/src/schema.gql @@ -131,11 +131,11 @@ input FilterInput @oneOf { andFilters: [FilterInput!] orFilters: [FilterInput!] notFilter: FilterInput - cueObjectDistance: RangeFilter - targetPocketDistance: RangeFilter - cueObjectAngle: RangeFilter - cueBallSpeed: RangeFilter - difficulty: RangeFilter + cueObjectDistance: FloatRangeFilter + targetPocketDistance: FloatRangeFilter + cueObjectAngle: FloatRangeFilter + cueBallSpeed: FloatRangeFilter + difficulty: FloatRangeFilter intendedPocketType: [PocketEnum!] shotDirection: [ShotDirectionEnum!] videoId: [Int!] @@ -149,22 +149,23 @@ input FilterInput @oneOf { isLeftMiss: [Boolean!] isRightMiss: [Boolean!] isDirect: [Boolean!] - tableSize: RangeFilter - bankAngle: RangeFilter - bankDistance: RangeFilter - kickAngle: RangeFilter - kickDistance: RangeFilter - cueAngleAfterObject: RangeFilter + tableSize: FloatRangeFilter + bankAngle: FloatRangeFilter + bankDistance: FloatRangeFilter + kickAngle: FloatRangeFilter + kickDistance: FloatRangeFilter + cueAngleAfterObject: FloatRangeFilter spinType: [SpinTypeEnum!] - cueSpeedAfterObject: RangeFilter - falsePositiveScore: RangeFilter + cueSpeedAfterObject: FloatRangeFilter + falsePositiveScore: FloatRangeFilter backcut: [Boolean!] targetPocketAngleDirection: [ShotDirectionEnum!] - targetPocketAngle: RangeFilter - missAngleInDegrees: RangeFilter + targetPocketAngle: FloatRangeFilter + missAngleInDegrees: FloatRangeFilter + createdAt: DateRangeFilter } -input RangeFilter { +input FloatRangeFilter { lessThan: Float = null greaterThanEqualTo: Float = null greaterThan: Float = null @@ -204,6 +205,20 @@ enum SpinTypeEnum { UNKNOWN } +input DateRangeFilter { + lessThan: Date = null + greaterThanEqualTo: Date = null + greaterThan: Date = null + includeOnNone: Boolean! = false + lessThanInclusive: Boolean! = false + greaterThanInclusive: Boolean! = true +} + +""" +Date (isoformat) +""" +scalar Date + type BucketSetGQL { keyName: String! feature: String!