Adds proper error return to stuff involving upload links #39
223
src/index.tsx
223
src/index.tsx
@ -1102,11 +1102,15 @@ export type GetShotsPagination = {
|
|||||||
startFrameAfter: Scalars["Int"]["input"];
|
startFrameAfter: Scalars["Int"]["input"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type GetUploadLinkErrors = {
|
||||||
|
__typename?: "GetUploadLinkErrors";
|
||||||
|
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErr;
|
||||||
|
};
|
||||||
|
|
||||||
export type GetUploadLinkReturn = {
|
export type GetUploadLinkReturn = {
|
||||||
__typename?: "GetUploadLinkReturn";
|
__typename?: "GetUploadLinkReturn";
|
||||||
headers: Array<Maybe<Header>>;
|
stream?: Maybe<UploadStreamGql>;
|
||||||
uploadCompletionCursor?: Maybe<Scalars["Int"]["output"]>;
|
value: UploadLinkGetUploadLinkErrors;
|
||||||
uploadUrl: Scalars["String"]["output"];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export type HlsPlaylistGql = {
|
export type HlsPlaylistGql = {
|
||||||
@ -1149,6 +1153,20 @@ export type MakePercentageIntervalGql = {
|
|||||||
makePercentage: Scalars["Float"]["output"];
|
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 = {
|
export type Mutation = {
|
||||||
__typename?: "Mutation";
|
__typename?: "Mutation";
|
||||||
addAnnotationToShot: Scalars["Boolean"]["output"];
|
addAnnotationToShot: Scalars["Boolean"]["output"];
|
||||||
@ -1214,6 +1232,11 @@ export type MutationSetSegmentDurationArgs = {
|
|||||||
videoId: Scalars["Int"]["input"];
|
videoId: Scalars["Int"]["input"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type NoInitForChunkedUploadErr = {
|
||||||
|
__typename?: "NoInitForChunkedUploadErr";
|
||||||
|
segmentType: StreamSegmentTypeEnum;
|
||||||
|
};
|
||||||
|
|
||||||
export type PageInfoGql = {
|
export type PageInfoGql = {
|
||||||
__typename?: "PageInfoGQL";
|
__typename?: "PageInfoGQL";
|
||||||
endCursor?: Maybe<Scalars["String"]["output"]>;
|
endCursor?: Maybe<Scalars["String"]["output"]>;
|
||||||
@ -1243,6 +1266,11 @@ export type PocketingIntentionFeaturesGql = {
|
|||||||
targetPocketDistance?: Maybe<Scalars["Float"]["output"]>;
|
targetPocketDistance?: Maybe<Scalars["Float"]["output"]>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type ProcessingFailedErr = {
|
||||||
|
__typename?: "ProcessingFailedErr";
|
||||||
|
processing: VideoProcessingGql;
|
||||||
|
};
|
||||||
|
|
||||||
export enum ProcessingStatusEnum {
|
export enum ProcessingStatusEnum {
|
||||||
Created = "CREATED",
|
Created = "CREATED",
|
||||||
Failed = "FAILED",
|
Failed = "FAILED",
|
||||||
@ -1335,6 +1363,11 @@ export type RangeFilter = {
|
|||||||
lessThanInclusive?: Scalars["Boolean"]["input"];
|
lessThanInclusive?: Scalars["Boolean"]["input"];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type SegmentAlreadyUploadedErr = {
|
||||||
|
__typename?: "SegmentAlreadyUploadedErr";
|
||||||
|
segmentId: Scalars["Int"]["output"];
|
||||||
|
};
|
||||||
|
|
||||||
export type SerializedShotPathsGql = {
|
export type SerializedShotPathsGql = {
|
||||||
__typename?: "SerializedShotPathsGQL";
|
__typename?: "SerializedShotPathsGQL";
|
||||||
b64EncodedBuffer?: Maybe<Scalars["String"]["output"]>;
|
b64EncodedBuffer?: Maybe<Scalars["String"]["output"]>;
|
||||||
@ -1408,6 +1441,19 @@ export type TargetMetricsGql = {
|
|||||||
makePercentage?: Maybe<Scalars["Float"]["output"]>;
|
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 = {
|
export type UploadSegmentGql = {
|
||||||
__typename?: "UploadSegmentGQL";
|
__typename?: "UploadSegmentGQL";
|
||||||
durationInSeconds?: Maybe<Scalars["Float"]["output"]>;
|
durationInSeconds?: Maybe<Scalars["Float"]["output"]>;
|
||||||
@ -1732,12 +1778,28 @@ export type GetProfileImageUploadLinkMutation = {
|
|||||||
__typename?: "Mutation";
|
__typename?: "Mutation";
|
||||||
getProfileImageUploadLink: {
|
getProfileImageUploadLink: {
|
||||||
__typename?: "GetUploadLinkReturn";
|
__typename?: "GetUploadLinkReturn";
|
||||||
uploadUrl: string;
|
value:
|
||||||
headers: Array<{
|
| {
|
||||||
__typename?: "Header";
|
__typename?: "GetUploadLinkErrors";
|
||||||
key: string;
|
error:
|
||||||
value: string;
|
| { __typename?: "MustHaveSetForUploadLinkErr" }
|
||||||
} | null>;
|
| { __typename?: "NoInitForChunkedUploadErr" }
|
||||||
|
| { __typename?: "ProcessingFailedErr" }
|
||||||
|
| { __typename?: "SegmentAlreadyUploadedErr" }
|
||||||
|
| {
|
||||||
|
__typename?: "TooManyProfileImageUploadsErr";
|
||||||
|
linksRequested: number;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
| {
|
||||||
|
__typename?: "UploadLink";
|
||||||
|
uploadUrl: string;
|
||||||
|
headers: Array<{
|
||||||
|
__typename?: "Header";
|
||||||
|
key: string;
|
||||||
|
value: string;
|
||||||
|
} | null>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2096,12 +2158,43 @@ export type GetUploadLinkMutation = {
|
|||||||
__typename?: "Mutation";
|
__typename?: "Mutation";
|
||||||
getUploadLink: {
|
getUploadLink: {
|
||||||
__typename?: "GetUploadLinkReturn";
|
__typename?: "GetUploadLinkReturn";
|
||||||
uploadUrl: string;
|
value:
|
||||||
headers: Array<{
|
| {
|
||||||
__typename?: "Header";
|
__typename?: "GetUploadLinkErrors";
|
||||||
key: string;
|
error:
|
||||||
value: string;
|
| {
|
||||||
} | null>;
|
__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";
|
||||||
|
key: string;
|
||||||
|
value: string;
|
||||||
|
} | null>;
|
||||||
|
};
|
||||||
|
stream?: {
|
||||||
|
__typename?: "UploadStreamGQL";
|
||||||
|
uploadCompletionCursor: number;
|
||||||
|
} | null;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2113,12 +2206,28 @@ export type GetHlsInitUploadLinkMutation = {
|
|||||||
__typename?: "Mutation";
|
__typename?: "Mutation";
|
||||||
getHlsInitUploadLink: {
|
getHlsInitUploadLink: {
|
||||||
__typename?: "GetUploadLinkReturn";
|
__typename?: "GetUploadLinkReturn";
|
||||||
uploadUrl: string;
|
value:
|
||||||
headers: Array<{
|
| {
|
||||||
__typename?: "Header";
|
__typename?: "GetUploadLinkErrors";
|
||||||
key: string;
|
error:
|
||||||
value: string;
|
| { __typename?: "MustHaveSetForUploadLinkErr" }
|
||||||
} | null>;
|
| {
|
||||||
|
__typename?: "NoInitForChunkedUploadErr";
|
||||||
|
segmentType: StreamSegmentTypeEnum;
|
||||||
|
}
|
||||||
|
| { __typename?: "ProcessingFailedErr" }
|
||||||
|
| { __typename?: "SegmentAlreadyUploadedErr" }
|
||||||
|
| { __typename?: "TooManyProfileImageUploadsErr" };
|
||||||
|
}
|
||||||
|
| {
|
||||||
|
__typename?: "UploadLink";
|
||||||
|
uploadUrl: string;
|
||||||
|
headers: Array<{
|
||||||
|
__typename?: "Header";
|
||||||
|
key: string;
|
||||||
|
value: string;
|
||||||
|
} | null>;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2729,10 +2838,21 @@ export type GetShotAnnotationTypesQueryResult = Apollo.QueryResult<
|
|||||||
export const GetProfileImageUploadLinkDocument = gql`
|
export const GetProfileImageUploadLinkDocument = gql`
|
||||||
mutation getProfileImageUploadLink($fileExt: String = ".png") {
|
mutation getProfileImageUploadLink($fileExt: String = ".png") {
|
||||||
getProfileImageUploadLink(fileExt: $fileExt) {
|
getProfileImageUploadLink(fileExt: $fileExt) {
|
||||||
uploadUrl
|
value {
|
||||||
headers {
|
... on UploadLink {
|
||||||
key
|
uploadUrl
|
||||||
value
|
headers {
|
||||||
|
key
|
||||||
|
value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
... on GetUploadLinkErrors {
|
||||||
|
error {
|
||||||
|
... on TooManyProfileImageUploadsErr {
|
||||||
|
linksRequested
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3996,10 +4116,36 @@ export type CreateUploadStreamMutationOptions = Apollo.BaseMutationOptions<
|
|||||||
export const GetUploadLinkDocument = gql`
|
export const GetUploadLinkDocument = gql`
|
||||||
mutation GetUploadLink($videoId: Int!, $segmentIndex: Int!) {
|
mutation GetUploadLink($videoId: Int!, $segmentIndex: Int!) {
|
||||||
getUploadLink(videoId: $videoId, segmentIndex: $segmentIndex) {
|
getUploadLink(videoId: $videoId, segmentIndex: $segmentIndex) {
|
||||||
uploadUrl
|
value {
|
||||||
headers {
|
... on UploadLink {
|
||||||
key
|
uploadUrl
|
||||||
value
|
headers {
|
||||||
|
key
|
||||||
|
value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
... on GetUploadLinkErrors {
|
||||||
|
error {
|
||||||
|
... on MustHaveSetForUploadLinkErr {
|
||||||
|
resolution
|
||||||
|
framesPerSecond
|
||||||
|
}
|
||||||
|
... on SegmentAlreadyUploadedErr {
|
||||||
|
segmentId
|
||||||
|
}
|
||||||
|
... on ProcessingFailedErr {
|
||||||
|
processing {
|
||||||
|
status
|
||||||
|
errors {
|
||||||
|
message
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stream {
|
||||||
|
uploadCompletionCursor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4051,10 +4197,21 @@ export type GetUploadLinkMutationOptions = Apollo.BaseMutationOptions<
|
|||||||
export const GetHlsInitUploadLinkDocument = gql`
|
export const GetHlsInitUploadLinkDocument = gql`
|
||||||
mutation GetHlsInitUploadLink($videoId: Int!) {
|
mutation GetHlsInitUploadLink($videoId: Int!) {
|
||||||
getHlsInitUploadLink(videoId: $videoId) {
|
getHlsInitUploadLink(videoId: $videoId) {
|
||||||
uploadUrl
|
value {
|
||||||
headers {
|
... on UploadLink {
|
||||||
key
|
uploadUrl
|
||||||
value
|
headers {
|
||||||
|
key
|
||||||
|
value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
... on GetUploadLinkErrors {
|
||||||
|
error {
|
||||||
|
... on NoInitForChunkedUploadErr {
|
||||||
|
segmentType
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,20 @@
|
|||||||
mutation getProfileImageUploadLink($fileExt: String = ".png") {
|
mutation getProfileImageUploadLink($fileExt: String = ".png") {
|
||||||
getProfileImageUploadLink(fileExt: $fileExt) {
|
getProfileImageUploadLink(fileExt: $fileExt) {
|
||||||
uploadUrl
|
value {
|
||||||
headers {
|
... on UploadLink {
|
||||||
key
|
uploadUrl
|
||||||
value
|
headers {
|
||||||
|
key
|
||||||
|
value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
... on GetUploadLinkErrors {
|
||||||
|
error {
|
||||||
|
... on TooManyProfileImageUploadsErr {
|
||||||
|
linksRequested
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,20 +6,57 @@ mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) {
|
|||||||
|
|
||||||
mutation GetUploadLink($videoId: Int!, $segmentIndex: Int!) {
|
mutation GetUploadLink($videoId: Int!, $segmentIndex: Int!) {
|
||||||
getUploadLink(videoId: $videoId, segmentIndex: $segmentIndex) {
|
getUploadLink(videoId: $videoId, segmentIndex: $segmentIndex) {
|
||||||
uploadUrl
|
value {
|
||||||
headers {
|
... on UploadLink {
|
||||||
key
|
uploadUrl
|
||||||
value
|
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!) {
|
mutation GetHlsInitUploadLink($videoId: Int!) {
|
||||||
getHlsInitUploadLink(videoId: $videoId) {
|
getHlsInitUploadLink(videoId: $videoId) {
|
||||||
uploadUrl
|
value {
|
||||||
headers {
|
... on UploadLink {
|
||||||
key
|
uploadUrl
|
||||||
value
|
headers {
|
||||||
|
key
|
||||||
|
value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
... on GetUploadLinkErrors {
|
||||||
|
error {
|
||||||
|
... on NoInitForChunkedUploadErr {
|
||||||
|
segmentType
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -458,9 +458,15 @@ input CreateBucketSetInput {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type GetUploadLinkReturn {
|
type GetUploadLinkReturn {
|
||||||
|
value: UploadLinkGetUploadLinkErrors!
|
||||||
|
stream: UploadStreamGQL
|
||||||
|
}
|
||||||
|
|
||||||
|
union UploadLinkGetUploadLinkErrors = UploadLink | GetUploadLinkErrors
|
||||||
|
|
||||||
|
type UploadLink {
|
||||||
uploadUrl: String!
|
uploadUrl: String!
|
||||||
headers: [Header]!
|
headers: [Header]!
|
||||||
uploadCompletionCursor: Int
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type Header {
|
type Header {
|
||||||
@ -468,6 +474,38 @@ type Header {
|
|||||||
value: String!
|
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 {
|
type CreateUploadStreamReturn {
|
||||||
videoId: Int!
|
videoId: Int!
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user