Merge pull request 'Add separate return to profile image' (#40) from mk/add-separate-return-to-image-upload-link into master

Reviewed-on: #40
Reviewed-by: loewy <loewymalkov@gmail.com>
This commit is contained in:
countablecloud 2024-08-19 15:58:15 -06:00
commit 41c9701e18
4 changed files with 78 additions and 45 deletions

View File

@ -1097,6 +1097,16 @@ export type FilterInput =
videoId: Array<Scalars["Int"]["input"]>;
};
export type GetProfileUploadLinkErrors = {
__typename?: "GetProfileUploadLinkErrors";
error: TooManyProfileImageUploadsErr;
};
export type GetProfileUploadLinkReturn = {
__typename?: "GetProfileUploadLinkReturn";
value: UploadLinkGetProfileUploadLinkErrors;
};
export type GetShotsPagination = {
createdAfter: CreatedAfter;
startFrameAfter: Scalars["Int"]["input"];
@ -1176,7 +1186,7 @@ export type Mutation = {
editProfileImageUri: UserGql;
editUploadStream: Scalars["Boolean"]["output"];
getHlsInitUploadLink: GetUploadLinkReturn;
getProfileImageUploadLink: GetUploadLinkReturn;
getProfileImageUploadLink: GetProfileUploadLinkReturn;
getUploadLink: GetUploadLinkReturn;
setLoggerLevel: Scalars["Boolean"]["output"];
setSegmentDuration: Scalars["Boolean"]["output"];
@ -1452,6 +1462,10 @@ export type UploadLink = {
uploadUrl: Scalars["String"]["output"];
};
export type UploadLinkGetProfileUploadLinkErrors =
| GetProfileUploadLinkErrors
| UploadLink;
export type UploadLinkGetUploadLinkErrors = GetUploadLinkErrors | UploadLink;
export type UploadSegmentGql = {
@ -1777,19 +1791,14 @@ export type GetProfileImageUploadLinkMutationVariables = Exact<{
export type GetProfileImageUploadLinkMutation = {
__typename?: "Mutation";
getProfileImageUploadLink: {
__typename?: "GetUploadLinkReturn";
__typename?: "GetProfileUploadLinkReturn";
value:
| {
__typename?: "GetUploadLinkErrors";
error:
| { __typename?: "MustHaveSetForUploadLinkErr" }
| { __typename?: "NoInitForChunkedUploadErr" }
| { __typename?: "ProcessingFailedErr" }
| { __typename?: "SegmentAlreadyUploadedErr" }
| {
__typename?: "TooManyProfileImageUploadsErr";
linksRequested: number;
};
__typename?: "GetProfileUploadLinkErrors";
error: {
__typename?: "TooManyProfileImageUploadsErr";
linksRequested: number;
};
}
| {
__typename?: "UploadLink";
@ -2191,6 +2200,10 @@ export type GetUploadLinkMutation = {
value: string;
} | null>;
};
stream?: {
__typename?: "UploadStreamGQL";
uploadCompletionCursor: number;
} | null;
};
};
@ -2842,7 +2855,7 @@ export const GetProfileImageUploadLinkDocument = gql`
value
}
}
... on GetUploadLinkErrors {
... on GetProfileUploadLinkErrors {
error {
... on TooManyProfileImageUploadsErr {
linksRequested
@ -4140,6 +4153,9 @@ export const GetUploadLinkDocument = gql`
}
}
}
stream {
uploadCompletionCursor
}
}
}
`;

View File

@ -8,7 +8,7 @@ mutation getProfileImageUploadLink($fileExt: String = ".png") {
value
}
}
... on GetUploadLinkErrors {
... on GetProfileUploadLinkErrors {
error {
... on TooManyProfileImageUploadsErr {
linksRequested

View File

@ -34,6 +34,9 @@ mutation GetUploadLink($videoId: Int!, $segmentIndex: Int!) {
}
}
}
stream {
uploadCompletionCursor
}
}
}

View File

@ -435,7 +435,9 @@ type Mutation {
createBucketSet(params: CreateBucketSetInput!): BucketSetGQL!
setLoggerLevel(path: String!, level: String!): Boolean!
addAnnotationToShot(shotId: Int!, annotationName: String!): Boolean!
getProfileImageUploadLink(fileExt: String = ".png"): GetUploadLinkReturn!
getProfileImageUploadLink(
fileExt: String = ".png"
): GetProfileUploadLinkReturn!
editProfileImageUri(profileImageUri: String!): UserGQL!
createUploadStream(
videoMetadata: VideoMetadataInput!
@ -457,12 +459,13 @@ input CreateBucketSetInput {
buckets: [BucketInputGQL!]!
}
type GetUploadLinkReturn {
value: UploadLinkGetUploadLinkErrors!
stream: UploadStreamGQL
type GetProfileUploadLinkReturn {
value: UploadLinkGetProfileUploadLinkErrors!
}
union UploadLinkGetUploadLinkErrors = UploadLink | GetUploadLinkErrors
union UploadLinkGetProfileUploadLinkErrors =
UploadLink
| GetProfileUploadLinkErrors
type UploadLink {
uploadUrl: String!
@ -474,32 +477,8 @@ type Header {
value: String!
}
type GetUploadLinkErrors {
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErr!
}
union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErr =
MustHaveSetForUploadLinkErr
| SegmentAlreadyUploadedErr
| ProcessingFailedErr
| NoInitForChunkedUploadErr
| TooManyProfileImageUploadsErr
type MustHaveSetForUploadLinkErr {
resolution: Boolean
framesPerSecond: Boolean
}
type SegmentAlreadyUploadedErr {
segmentId: Int!
}
type ProcessingFailedErr {
processing: VideoProcessingGQL!
}
type NoInitForChunkedUploadErr {
segmentType: StreamSegmentTypeEnum!
type GetProfileUploadLinkErrors {
error: TooManyProfileImageUploadsErr!
}
type TooManyProfileImageUploadsErr {
@ -546,3 +525,38 @@ input VideoResolution {
width: Int!
height: Int!
}
type GetUploadLinkReturn {
value: UploadLinkGetUploadLinkErrors!
stream: UploadStreamGQL
}
union UploadLinkGetUploadLinkErrors = UploadLink | GetUploadLinkErrors
type GetUploadLinkErrors {
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErr!
}
union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErr =
MustHaveSetForUploadLinkErr
| SegmentAlreadyUploadedErr
| ProcessingFailedErr
| NoInitForChunkedUploadErr
| TooManyProfileImageUploadsErr
type MustHaveSetForUploadLinkErr {
resolution: Boolean
framesPerSecond: Boolean
}
type SegmentAlreadyUploadedErr {
segmentId: Int!
}
type ProcessingFailedErr {
processing: VideoProcessingGQL!
}
type NoInitForChunkedUploadErr {
segmentType: StreamSegmentTypeEnum!
}