Adds proper error return to stuff involving upload links #39
163
src/index.tsx
163
src/index.tsx
@ -1102,11 +1102,15 @@ export type GetShotsPagination = {
|
||||
startFrameAfter: Scalars["Int"]["input"];
|
||||
};
|
||||
|
||||
export type GetUploadLinkErrors = {
|
||||
__typename?: "GetUploadLinkErrors";
|
||||
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErr;
|
||||
};
|
||||
|
||||
export type GetUploadLinkReturn = {
|
||||
__typename?: "GetUploadLinkReturn";
|
||||
headers: Array<Maybe<Header>>;
|
||||
uploadCompletionCursor?: Maybe<Scalars["Int"]["output"]>;
|
||||
uploadUrl: Scalars["String"]["output"];
|
||||
stream?: Maybe<UploadStreamGql>;
|
||||
value: UploadLinkGetUploadLinkErrors;
|
||||
};
|
||||
|
||||
export type HlsPlaylistGql = {
|
||||
@ -1149,6 +1153,20 @@ export type MakePercentageIntervalGql = {
|
||||
makePercentage: Scalars["Float"]["output"];
|
||||
};
|
||||
|
||||
export type MustHaveSetForUploadLinkErr = {
|
||||
__typename?: "MustHaveSetForUploadLinkErr";
|
||||
framesPerSecond?: Maybe<Scalars["Boolean"]["output"]>;
|
||||
resolution?: Maybe<Scalars["Boolean"]["output"]>;
|
||||
};
|
||||
|
||||
export type MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErr =
|
||||
|
||||
| MustHaveSetForUploadLinkErr
|
||||
| NoInitForChunkedUploadErr
|
||||
| ProcessingFailedErr
|
||||
| SegmentAlreadyUploadedErr
|
||||
| TooManyProfileImageUploadsErr;
|
||||
|
||||
export type Mutation = {
|
||||
__typename?: "Mutation";
|
||||
addAnnotationToShot: Scalars["Boolean"]["output"];
|
||||
@ -1214,6 +1232,11 @@ export type MutationSetSegmentDurationArgs = {
|
||||
videoId: Scalars["Int"]["input"];
|
||||
};
|
||||
|
||||
export type NoInitForChunkedUploadErr = {
|
||||
__typename?: "NoInitForChunkedUploadErr";
|
||||
segmentType: StreamSegmentTypeEnum;
|
||||
};
|
||||
|
||||
export type PageInfoGql = {
|
||||
__typename?: "PageInfoGQL";
|
||||
endCursor?: Maybe<Scalars["String"]["output"]>;
|
||||
@ -1243,6 +1266,11 @@ export type PocketingIntentionFeaturesGql = {
|
||||
targetPocketDistance?: Maybe<Scalars["Float"]["output"]>;
|
||||
};
|
||||
|
||||
export type ProcessingFailedErr = {
|
||||
__typename?: "ProcessingFailedErr";
|
||||
processing: VideoProcessingGql;
|
||||
};
|
||||
|
||||
export enum ProcessingStatusEnum {
|
||||
Created = "CREATED",
|
||||
Failed = "FAILED",
|
||||
@ -1335,6 +1363,11 @@ export type RangeFilter = {
|
||||
lessThanInclusive?: Scalars["Boolean"]["input"];
|
||||
};
|
||||
|
||||
export type SegmentAlreadyUploadedErr = {
|
||||
__typename?: "SegmentAlreadyUploadedErr";
|
||||
segmentId: Scalars["Int"]["output"];
|
||||
};
|
||||
|
||||
export type SerializedShotPathsGql = {
|
||||
__typename?: "SerializedShotPathsGQL";
|
||||
b64EncodedBuffer?: Maybe<Scalars["String"]["output"]>;
|
||||
@ -1408,6 +1441,19 @@ export type TargetMetricsGql = {
|
||||
makePercentage?: Maybe<Scalars["Float"]["output"]>;
|
||||
};
|
||||
|
||||
export type TooManyProfileImageUploadsErr = {
|
||||
__typename?: "TooManyProfileImageUploadsErr";
|
||||
linksRequested: Scalars["Int"]["output"];
|
||||
};
|
||||
|
||||
export type UploadLink = {
|
||||
__typename?: "UploadLink";
|
||||
headers: Array<Maybe<Header>>;
|
||||
uploadUrl: Scalars["String"]["output"];
|
||||
};
|
||||
|
||||
export type UploadLinkGetUploadLinkErrors = GetUploadLinkErrors | UploadLink;
|
||||
|
||||
export type UploadSegmentGql = {
|
||||
__typename?: "UploadSegmentGQL";
|
||||
durationInSeconds?: Maybe<Scalars["Float"]["output"]>;
|
||||
@ -1731,6 +1777,21 @@ export type GetProfileImageUploadLinkMutation = {
|
||||
__typename?: "Mutation";
|
||||
getProfileImageUploadLink: {
|
||||
__typename?: "GetUploadLinkReturn";
|
||||
value:
|
||||
| {
|
||||
__typename?: "GetUploadLinkErrors";
|
||||
error:
|
||||
| { __typename?: "MustHaveSetForUploadLinkErr" }
|
||||
| { __typename?: "NoInitForChunkedUploadErr" }
|
||||
| { __typename?: "ProcessingFailedErr" }
|
||||
| { __typename?: "SegmentAlreadyUploadedErr" }
|
||||
| {
|
||||
__typename?: "TooManyProfileImageUploadsErr";
|
||||
linksRequested: number;
|
||||
};
|
||||
}
|
||||
| {
|
||||
__typename?: "UploadLink";
|
||||
uploadUrl: string;
|
||||
headers: Array<{
|
||||
__typename?: "Header";
|
||||
@ -1738,6 +1799,7 @@ export type GetProfileImageUploadLinkMutation = {
|
||||
value: string;
|
||||
} | null>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
export type EditProfileImageUriMutationVariables = Exact<{
|
||||
@ -2095,6 +2157,32 @@ export type GetUploadLinkMutation = {
|
||||
__typename?: "Mutation";
|
||||
getUploadLink: {
|
||||
__typename?: "GetUploadLinkReturn";
|
||||
value:
|
||||
| {
|
||||
__typename?: "GetUploadLinkErrors";
|
||||
error:
|
||||
| {
|
||||
__typename?: "MustHaveSetForUploadLinkErr";
|
||||
resolution?: boolean | null;
|
||||
framesPerSecond?: boolean | null;
|
||||
}
|
||||
| { __typename?: "NoInitForChunkedUploadErr" }
|
||||
| {
|
||||
__typename?: "ProcessingFailedErr";
|
||||
processing: {
|
||||
__typename?: "VideoProcessingGQL";
|
||||
status: ProcessingStatusEnum;
|
||||
errors: Array<{
|
||||
__typename?: "VideoProcessingErrorGQL";
|
||||
message: string;
|
||||
}>;
|
||||
};
|
||||
}
|
||||
| { __typename?: "SegmentAlreadyUploadedErr"; segmentId: number }
|
||||
| { __typename?: "TooManyProfileImageUploadsErr" };
|
||||
}
|
||||
| {
|
||||
__typename?: "UploadLink";
|
||||
uploadUrl: string;
|
||||
headers: Array<{
|
||||
__typename?: "Header";
|
||||
@ -2102,6 +2190,11 @@ export type GetUploadLinkMutation = {
|
||||
value: string;
|
||||
} | null>;
|
||||
};
|
||||
stream?: {
|
||||
__typename?: "UploadStreamGQL";
|
||||
uploadCompletionCursor: number;
|
||||
} | null;
|
||||
};
|
||||
};
|
||||
|
||||
export type GetHlsInitUploadLinkMutationVariables = Exact<{
|
||||
@ -2112,6 +2205,21 @@ export type GetHlsInitUploadLinkMutation = {
|
||||
__typename?: "Mutation";
|
||||
getHlsInitUploadLink: {
|
||||
__typename?: "GetUploadLinkReturn";
|
||||
value:
|
||||
| {
|
||||
__typename?: "GetUploadLinkErrors";
|
||||
error:
|
||||
| { __typename?: "MustHaveSetForUploadLinkErr" }
|
||||
| {
|
||||
__typename?: "NoInitForChunkedUploadErr";
|
||||
segmentType: StreamSegmentTypeEnum;
|
||||
}
|
||||
| { __typename?: "ProcessingFailedErr" }
|
||||
| { __typename?: "SegmentAlreadyUploadedErr" }
|
||||
| { __typename?: "TooManyProfileImageUploadsErr" };
|
||||
}
|
||||
| {
|
||||
__typename?: "UploadLink";
|
||||
uploadUrl: string;
|
||||
headers: Array<{
|
||||
__typename?: "Header";
|
||||
@ -2119,6 +2227,7 @@ export type GetHlsInitUploadLinkMutation = {
|
||||
value: string;
|
||||
} | null>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
export type SetSegmentDurationMutationVariables = Exact<{
|
||||
@ -2727,12 +2836,23 @@ export type GetShotAnnotationTypesQueryResult = Apollo.QueryResult<
|
||||
export const GetProfileImageUploadLinkDocument = gql`
|
||||
mutation getProfileImageUploadLink($fileExt: String = ".png") {
|
||||
getProfileImageUploadLink(fileExt: $fileExt) {
|
||||
value {
|
||||
... on UploadLink {
|
||||
uploadUrl
|
||||
headers {
|
||||
key
|
||||
value
|
||||
}
|
||||
}
|
||||
... on GetUploadLinkErrors {
|
||||
error {
|
||||
... on TooManyProfileImageUploadsErr {
|
||||
linksRequested
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export type GetProfileImageUploadLinkMutationFn = Apollo.MutationFunction<
|
||||
@ -3994,12 +4114,38 @@ export type CreateUploadStreamMutationOptions = Apollo.BaseMutationOptions<
|
||||
export const GetUploadLinkDocument = gql`
|
||||
mutation GetUploadLink($videoId: Int!, $segmentIndex: Int!) {
|
||||
getUploadLink(videoId: $videoId, segmentIndex: $segmentIndex) {
|
||||
value {
|
||||
... on UploadLink {
|
||||
uploadUrl
|
||||
headers {
|
||||
key
|
||||
value
|
||||
}
|
||||
}
|
||||
... on GetUploadLinkErrors {
|
||||
error {
|
||||
... on MustHaveSetForUploadLinkErr {
|
||||
resolution
|
||||
framesPerSecond
|
||||
}
|
||||
... on SegmentAlreadyUploadedErr {
|
||||
segmentId
|
||||
}
|
||||
... on ProcessingFailedErr {
|
||||
processing {
|
||||
status
|
||||
errors {
|
||||
message
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stream {
|
||||
uploadCompletionCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export type GetUploadLinkMutationFn = Apollo.MutationFunction<
|
||||
@ -4049,12 +4195,23 @@ export type GetUploadLinkMutationOptions = Apollo.BaseMutationOptions<
|
||||
export const GetHlsInitUploadLinkDocument = gql`
|
||||
mutation GetHlsInitUploadLink($videoId: Int!) {
|
||||
getHlsInitUploadLink(videoId: $videoId) {
|
||||
value {
|
||||
... on UploadLink {
|
||||
uploadUrl
|
||||
headers {
|
||||
key
|
||||
value
|
||||
}
|
||||
}
|
||||
... on GetUploadLinkErrors {
|
||||
error {
|
||||
... on NoInitForChunkedUploadErr {
|
||||
segmentType
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
export type GetHlsInitUploadLinkMutationFn = Apollo.MutationFunction<
|
||||
|
@ -1,11 +1,22 @@
|
||||
mutation getProfileImageUploadLink($fileExt: String = ".png") {
|
||||
getProfileImageUploadLink(fileExt: $fileExt) {
|
||||
value {
|
||||
... on UploadLink {
|
||||
uploadUrl
|
||||
headers {
|
||||
key
|
||||
value
|
||||
}
|
||||
}
|
||||
... on GetUploadLinkErrors {
|
||||
error {
|
||||
... on TooManyProfileImageUploadsErr {
|
||||
linksRequested
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mutation editProfileImageUri($profileImageUri: String!) {
|
||||
|
@ -6,22 +6,59 @@ mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) {
|
||||
|
||||
mutation GetUploadLink($videoId: Int!, $segmentIndex: Int!) {
|
||||
getUploadLink(videoId: $videoId, segmentIndex: $segmentIndex) {
|
||||
value {
|
||||
... on UploadLink {
|
||||
uploadUrl
|
||||
headers {
|
||||
key
|
||||
value
|
||||
}
|
||||
}
|
||||
... on GetUploadLinkErrors {
|
||||
error {
|
||||
... on MustHaveSetForUploadLinkErr {
|
||||
resolution
|
||||
framesPerSecond
|
||||
}
|
||||
... on SegmentAlreadyUploadedErr {
|
||||
segmentId
|
||||
}
|
||||
... on ProcessingFailedErr {
|
||||
processing {
|
||||
status
|
||||
errors {
|
||||
message
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
stream {
|
||||
uploadCompletionCursor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mutation GetHlsInitUploadLink($videoId: Int!) {
|
||||
getHlsInitUploadLink(videoId: $videoId) {
|
||||
value {
|
||||
... on UploadLink {
|
||||
uploadUrl
|
||||
headers {
|
||||
key
|
||||
value
|
||||
}
|
||||
}
|
||||
... on GetUploadLinkErrors {
|
||||
error {
|
||||
... on NoInitForChunkedUploadErr {
|
||||
segmentType
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mutation SetSegmentDuration(
|
||||
|
@ -458,9 +458,15 @@ input CreateBucketSetInput {
|
||||
}
|
||||
|
||||
type GetUploadLinkReturn {
|
||||
value: UploadLinkGetUploadLinkErrors!
|
||||
stream: UploadStreamGQL
|
||||
}
|
||||
|
||||
union UploadLinkGetUploadLinkErrors = UploadLink | GetUploadLinkErrors
|
||||
|
||||
type UploadLink {
|
||||
uploadUrl: String!
|
||||
headers: [Header]!
|
||||
uploadCompletionCursor: Int
|
||||
}
|
||||
|
||||
type Header {
|
||||
@ -468,6 +474,38 @@ 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 TooManyProfileImageUploadsErr {
|
||||
linksRequested: Int!
|
||||
}
|
||||
|
||||
type CreateUploadStreamReturn {
|
||||
videoId: Int!
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user