Compare commits

...

5 Commits

Author SHA1 Message Date
4005416233 Merge branch 'master' into loewy/add-resolution-in-get-shots
All checks were successful
Tests / Tests (pull_request) Successful in 15s
2024-08-26 10:23:07 -06:00
db4a6315cd Merge pull request 'Add stream type to get videos' (#43) from kat/add-stream-type-get-videos into master
Reviewed-on: #43
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-08-26 08:36:44 -06:00
af38fdea64 Add stream type to get videos
All checks were successful
Tests / Tests (pull_request) Successful in 7s
2024-08-26 06:56:40 -06:00
a030a0ef16 Merge pull request 'Error reporting types and Errors for Shot Annotation' (#41) from mk/allow-error-reporting into master
Reviewed-on: #41
Reviewed-by: Ivan Malison <ivanmalison@gmail.com>
2024-08-21 16:59:34 -06:00
7a6cc2739f Error reporting types and Errors
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2024-08-21 13:41:24 -07:00
3 changed files with 90 additions and 13 deletions

View File

@ -34,6 +34,16 @@ export type Scalars = {
JSON: { input: any; output: any };
};
export type AddShotAnnotationErrors = {
__typename?: "AddShotAnnotationErrors";
error: DoesNotOwnShotErrOtherErrorNeedsNote;
};
export type AddShotAnnotationReturn = {
__typename?: "AddShotAnnotationReturn";
value: SuccessfulAddAddShotAnnotationErrors;
};
export type AggregateInputGql = {
aggregations: Array<AggregationInput>;
filterInput?: InputMaybe<FilterInput>;
@ -131,6 +141,16 @@ export enum DeviceTypeEnum {
Ios = "IOS",
}
export type DoesNotOwnShotErr = {
__typename?: "DoesNotOwnShotErr";
msg?: Maybe<Scalars["String"]["output"]>;
shotId: Scalars["Int"]["output"];
};
export type DoesNotOwnShotErrOtherErrorNeedsNote =
| DoesNotOwnShotErr
| OtherErrorNeedsNote;
export type EnumAggregation = {
feature: Scalars["String"]["input"];
};
@ -1179,7 +1199,7 @@ export type MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailed
export type Mutation = {
__typename?: "Mutation";
addAnnotationToShot: Scalars["Boolean"]["output"];
addAnnotationToShot: AddShotAnnotationReturn;
createBucketSet: BucketSetGql;
createUploadStream: CreateUploadStreamReturn;
deleteVideo: Scalars["Boolean"]["output"];
@ -1194,6 +1214,7 @@ export type Mutation = {
export type MutationAddAnnotationToShotArgs = {
annotationName: Scalars["String"]["input"];
notes?: InputMaybe<Scalars["String"]["input"]>;
shotId: Scalars["Int"]["input"];
};
@ -1247,6 +1268,11 @@ export type NoInitForChunkedUploadErr = {
segmentType: StreamSegmentTypeEnum;
};
export type OtherErrorNeedsNote = {
__typename?: "OtherErrorNeedsNote";
msg?: Maybe<Scalars["String"]["output"]>;
};
export type PageInfoGql = {
__typename?: "PageInfoGQL";
endCursor?: Maybe<Scalars["String"]["output"]>;
@ -1323,6 +1349,10 @@ export type QueryGetPlayTimeArgs = {
userId: Scalars["Int"]["input"];
};
export type QueryGetShotAnnotationTypesArgs = {
errorTypes?: InputMaybe<Scalars["Boolean"]["input"]>;
};
export type QueryGetShotsArgs = {
filterInput: FilterInput;
limit?: Scalars["Int"]["input"];
@ -1387,6 +1417,7 @@ export type ShotAnnotationGql = {
__typename?: "ShotAnnotationGQL";
createdAt?: Maybe<Scalars["DateTime"]["output"]>;
creator: UserGql;
errorDefault: Scalars["Boolean"]["output"];
notes: Scalars["String"]["output"];
shotId: Scalars["Int"]["output"];
type: ShotAnnotationTypeGql;
@ -1437,6 +1468,15 @@ export enum StreamSegmentTypeEnum {
RbChunkedMp4 = "RB_CHUNKED_MP4",
}
export type SuccessfulAdd = {
__typename?: "SuccessfulAdd";
value: Scalars["Boolean"]["output"];
};
export type SuccessfulAddAddShotAnnotationErrors =
| AddShotAnnotationErrors
| SuccessfulAdd;
export type TagGql = {
__typename?: "TagGQL";
group?: Maybe<Scalars["String"]["output"]>;
@ -2015,13 +2055,10 @@ export type GetVideosQuery = {
getVideos: Array<{
__typename?: "VideoGQL";
id: number;
playlist?: {
__typename?: "HLSPlaylistGQL";
segmentDurations: Array<number>;
} | null;
stream?: {
__typename?: "UploadStreamGQL";
id: string;
streamSegmentType: StreamSegmentTypeEnum;
segments: Array<{
__typename?: "UploadSegmentGQL";
uploaded: boolean;
@ -2031,6 +2068,10 @@ export type GetVideosQuery = {
framesPerSecond?: number | null;
}>;
} | null;
playlist?: {
__typename?: "HLSPlaylistGQL";
segmentDurations: Array<number>;
} | null;
}>;
};
@ -3580,11 +3621,9 @@ export const GetVideosDocument = gql`
query GetVideos($videoIds: [Int!]!) {
getVideos(videoIds: $videoIds) {
id
playlist {
segmentDurations
}
stream {
id
streamSegmentType
segments {
uploaded
valid
@ -3593,6 +3632,9 @@ export const GetVideosDocument = gql`
framesPerSecond
}
}
playlist {
segmentDurations
}
}
}
`;

View File

@ -118,11 +118,9 @@ query GetVideoDetails($videoId: Int!) {
query GetVideos($videoIds: [Int!]!) {
getVideos(videoIds: $videoIds) {
id
playlist {
segmentDurations
}
stream {
id
streamSegmentType
segments {
uploaded
valid
@ -131,6 +129,9 @@ query GetVideos($videoIds: [Int!]!) {
framesPerSecond
}
}
playlist {
segmentDurations
}
}
}

View File

@ -14,7 +14,7 @@ type Query {
shotsPagination: GetShotsPagination = null
limit: Int! = 500
): [ShotGQL!]!
getShotAnnotationTypes: [ShotAnnotationTypeGQL!]!
getShotAnnotationTypes(errorTypes: Boolean = false): [ShotAnnotationTypeGQL!]!
getUser(userId: Int!): UserGQL
getLoggedInUser: UserGQL
getUsernames(
@ -231,6 +231,7 @@ type ShotAnnotationGQL {
type: ShotAnnotationTypeGQL!
creator: UserGQL!
notes: String!
errorDefault: Boolean!
createdAt: DateTime
updatedAt: DateTime
}
@ -434,7 +435,11 @@ scalar JSON
type Mutation {
createBucketSet(params: CreateBucketSetInput!): BucketSetGQL!
setLoggerLevel(path: String!, level: String!): Boolean!
addAnnotationToShot(shotId: Int!, annotationName: String!): Boolean!
addAnnotationToShot(
shotId: Int!
annotationName: String!
notes: String = null
): AddShotAnnotationReturn!
getProfileImageUploadLink(
fileExt: String = ".png"
): GetProfileUploadLinkReturn!
@ -459,6 +464,35 @@ input CreateBucketSetInput {
buckets: [BucketInputGQL!]!
}
type AddShotAnnotationReturn {
value: SuccessfulAddAddShotAnnotationErrors!
}
union SuccessfulAddAddShotAnnotationErrors =
SuccessfulAdd
| AddShotAnnotationErrors
type SuccessfulAdd {
value: Boolean!
}
type AddShotAnnotationErrors {
error: DoesNotOwnShotErrOtherErrorNeedsNote!
}
union DoesNotOwnShotErrOtherErrorNeedsNote =
DoesNotOwnShotErr
| OtherErrorNeedsNote
type DoesNotOwnShotErr {
shotId: Int!
msg: String
}
type OtherErrorNeedsNote {
msg: String
}
type GetProfileUploadLinkReturn {
value: UploadLinkGetProfileUploadLinkErrors!
}