WIP: upload quota gql #226
@@ -232,9 +232,18 @@ export type CreateSubscriptionResultGql = {
|
||||
|
||||
export type CreateUploadStreamReturn = {
|
||||
__typename?: "CreateUploadStreamReturn";
|
||||
value: CreateUploadStreamSuccessQuotaExceededErr;
|
||||
};
|
||||
|
||||
export type CreateUploadStreamSuccess = {
|
||||
__typename?: "CreateUploadStreamSuccess";
|
||||
videoId: Scalars["Int"]["output"];
|
||||
};
|
||||
|
||||
export type CreateUploadStreamSuccessQuotaExceededErr =
|
||||
| CreateUploadStreamSuccess
|
||||
| QuotaExceededErr;
|
||||
|
||||
export type CreatedAfter =
|
||||
| { createdAt: Scalars["DateTime"]["input"]; videoId?: never }
|
||||
| { createdAt?: never; videoId: Scalars["Int"]["input"] };
|
||||
@@ -2223,7 +2232,7 @@ export type GetShotsResult = {
|
||||
|
||||
export type GetUploadLinkErrors = {
|
||||
__typename?: "GetUploadLinkErrors";
|
||||
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr;
|
||||
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrQuotaExceededErr;
|
||||
};
|
||||
|
||||
export type GetUploadLinkReturn = {
|
||||
@@ -2327,12 +2336,13 @@ export type MustHaveSetForUploadLinkErr = {
|
||||
resolution?: Maybe<Scalars["Boolean"]["output"]>;
|
||||
};
|
||||
|
||||
export type MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr =
|
||||
export type MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrQuotaExceededErr =
|
||||
|
||||
| InitUploadAlreadyCompletedErr
|
||||
| MustHaveSetForUploadLinkErr
|
||||
| NoInitForChunkedUploadErr
|
||||
| ProcessingFailedErr
|
||||
| QuotaExceededErr
|
||||
| SegmentAlreadyUploadedErr
|
||||
| TooManyInitUploadsErr
|
||||
| TooManyProfileImageUploadsErr;
|
||||
@@ -2432,6 +2442,7 @@ export type MutationCreateSubscriptionArgs = {
|
||||
};
|
||||
|
||||
export type MutationCreateUploadStreamArgs = {
|
||||
expectedDurationSeconds?: InputMaybe<Scalars["Float"]["input"]>;
|
||||
videoMetadata: VideoMetadataInput;
|
||||
};
|
||||
|
||||
@@ -2716,6 +2727,7 @@ export type Query = {
|
||||
getMedals: RequestedMedalsGql;
|
||||
getOrderedShots: GetShotsResult;
|
||||
getPlayTime: UserPlayTimeGql;
|
||||
getQuotaStatus: QuotaStatusGql;
|
||||
getRuns: GetRunsResult;
|
||||
getShotAnnotationTypes: Array<ShotAnnotationTypeGql>;
|
||||
getShots: Array<ShotGql>;
|
||||
@@ -2905,6 +2917,31 @@ export type QueryWaitForArgs = {
|
||||
duration: Scalars["Float"]["input"];
|
||||
};
|
||||
|
||||
export type QuotaExceededErr = {
|
||||
__typename?: "QuotaExceededErr";
|
||||
limit?: Maybe<Scalars["Float"]["output"]>;
|
||||
message: Scalars["String"]["output"];
|
||||
reason: QuotaExceededReasonEnum;
|
||||
used?: Maybe<Scalars["Float"]["output"]>;
|
||||
};
|
||||
|
||||
export enum QuotaExceededReasonEnum {
|
||||
MonthlyDuration = "MONTHLY_DURATION",
|
||||
VideoDuration = "VIDEO_DURATION",
|
||||
}
|
||||
|
||||
export type QuotaStatusGql = {
|
||||
__typename?: "QuotaStatusGQL";
|
||||
canUpload: Scalars["Boolean"]["output"];
|
||||
durationLimitSeconds?: Maybe<Scalars["Int"]["output"]>;
|
||||
durationRemainingSeconds?: Maybe<Scalars["Float"]["output"]>;
|
||||
durationUsedSeconds: Scalars["Float"]["output"];
|
||||
maxVideoDurationSeconds?: Maybe<Scalars["Int"]["output"]>;
|
||||
periodEnd: Scalars["DateTime"]["output"];
|
||||
periodStart: Scalars["DateTime"]["output"];
|
||||
tierName: Scalars["String"]["output"];
|
||||
};
|
||||
|
||||
export enum ReactionEnum {
|
||||
Bullseye = "BULLSEYE",
|
||||
Heart = "HEART",
|
||||
@@ -6239,7 +6276,15 @@ export type CreateUploadStreamMutation = {
|
||||
__typename?: "Mutation";
|
||||
createUploadStream: {
|
||||
__typename?: "CreateUploadStreamReturn";
|
||||
videoId: number;
|
||||
value:
|
||||
| { __typename?: "CreateUploadStreamSuccess"; videoId: number }
|
||||
| {
|
||||
__typename?: "QuotaExceededErr";
|
||||
reason: QuotaExceededReasonEnum;
|
||||
message: string;
|
||||
limit?: number | null;
|
||||
used?: number | null;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -6274,6 +6319,7 @@ export type GetUploadLinkMutation = {
|
||||
}>;
|
||||
};
|
||||
}
|
||||
| { __typename?: "QuotaExceededErr" }
|
||||
| { __typename?: "SegmentAlreadyUploadedErr"; segmentId: number }
|
||||
| { __typename?: "TooManyInitUploadsErr" }
|
||||
| { __typename?: "TooManyProfileImageUploadsErr" };
|
||||
@@ -6316,6 +6362,7 @@ export type GetHlsInitUploadLinkMutation = {
|
||||
segmentType: StreamSegmentTypeEnum;
|
||||
}
|
||||
| { __typename?: "ProcessingFailedErr" }
|
||||
| { __typename?: "QuotaExceededErr" }
|
||||
| { __typename?: "SegmentAlreadyUploadedErr" }
|
||||
| { __typename?: "TooManyInitUploadsErr"; linksRequested: number }
|
||||
| { __typename?: "TooManyProfileImageUploadsErr" };
|
||||
@@ -13201,7 +13248,17 @@ export type FindPrerecordTableLayoutMutationOptions =
|
||||
export const CreateUploadStreamDocument = gql`
|
||||
mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) {
|
||||
createUploadStream(videoMetadata: $videoMetadataInput) {
|
||||
videoId
|
||||
value {
|
||||
... on CreateUploadStreamSuccess {
|
||||
videoId
|
||||
}
|
||||
... on QuotaExceededErr {
|
||||
reason
|
||||
message
|
||||
limit
|
||||
used
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -1,6 +1,16 @@
|
||||
mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) {
|
||||
createUploadStream(videoMetadata: $videoMetadataInput) {
|
||||
videoId
|
||||
value {
|
||||
... on CreateUploadStreamSuccess {
|
||||
videoId
|
||||
}
|
||||
... on QuotaExceededErr {
|
||||
reason
|
||||
message
|
||||
limit
|
||||
used
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -97,6 +97,7 @@ type Query {
|
||||
): UserRelationshipsResult!
|
||||
getAvailableSubscriptionOptions: StripeSubscriptionOptionsGQL!
|
||||
getUserSubscriptionStatus: UserSubscriptionStatusGQL!
|
||||
getQuotaStatus: QuotaStatusGQL!
|
||||
getPlayTime(userId: Int!, filters: VideoFilterInput = null): UserPlayTimeGQL!
|
||||
getUserVideos(
|
||||
userId: Int = null
|
||||
@@ -977,6 +978,17 @@ enum StripeSubscriptionStatusEnum {
|
||||
PAUSED
|
||||
}
|
||||
|
||||
type QuotaStatusGQL {
|
||||
tierName: String!
|
||||
periodStart: DateTime!
|
||||
periodEnd: DateTime!
|
||||
durationUsedSeconds: Float!
|
||||
durationLimitSeconds: Int
|
||||
maxVideoDurationSeconds: Int
|
||||
durationRemainingSeconds: Float
|
||||
canUpload: Boolean!
|
||||
}
|
||||
|
||||
type UserPlayTimeGQL {
|
||||
totalSeconds: Float!
|
||||
}
|
||||
@@ -1082,6 +1094,7 @@ type Mutation {
|
||||
findPrerecordTableLayout(b64Image: String!, videoId: Int!): HomographyInfoGQL
|
||||
createUploadStream(
|
||||
videoMetadata: VideoMetadataInput!
|
||||
expectedDurationSeconds: Float = null
|
||||
): CreateUploadStreamReturn!
|
||||
getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn!
|
||||
getHlsInitUploadLink(videoId: Int!): GetUploadLinkReturn!
|
||||
@@ -1219,9 +1232,29 @@ input CancellationFeedbackMetadataInput {
|
||||
}
|
||||
|
||||
type CreateUploadStreamReturn {
|
||||
value: CreateUploadStreamSuccessQuotaExceededErr!
|
||||
}
|
||||
|
||||
union CreateUploadStreamSuccessQuotaExceededErr =
|
||||
CreateUploadStreamSuccess
|
||||
| QuotaExceededErr
|
||||
|
||||
type CreateUploadStreamSuccess {
|
||||
videoId: Int!
|
||||
}
|
||||
|
||||
type QuotaExceededErr {
|
||||
reason: QuotaExceededReasonEnum!
|
||||
message: String!
|
||||
limit: Float
|
||||
used: Float
|
||||
}
|
||||
|
||||
enum QuotaExceededReasonEnum {
|
||||
MONTHLY_DURATION
|
||||
VIDEO_DURATION
|
||||
}
|
||||
|
||||
input VideoMetadataInput {
|
||||
videoName: String = null
|
||||
startTime: DateTime = null
|
||||
@@ -1257,10 +1290,10 @@ type GetUploadLinkReturn {
|
||||
union UploadLinkGetUploadLinkErrors = UploadLink | GetUploadLinkErrors
|
||||
|
||||
type GetUploadLinkErrors {
|
||||
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr!
|
||||
error: MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrQuotaExceededErr!
|
||||
}
|
||||
|
||||
union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErr =
|
||||
union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoInitForChunkedUploadErrTooManyProfileImageUploadsErrInitUploadAlreadyCompletedErrTooManyInitUploadsErrQuotaExceededErr =
|
||||
MustHaveSetForUploadLinkErr
|
||||
| SegmentAlreadyUploadedErr
|
||||
| ProcessingFailedErr
|
||||
@@ -1268,6 +1301,7 @@ union MustHaveSetForUploadLinkErrSegmentAlreadyUploadedErrProcessingFailedErrNoI
|
||||
| TooManyProfileImageUploadsErr
|
||||
| InitUploadAlreadyCompletedErr
|
||||
| TooManyInitUploadsErr
|
||||
| QuotaExceededErr
|
||||
|
||||
type MustHaveSetForUploadLinkErr {
|
||||
resolution: Boolean
|
||||
|
||||
Reference in New Issue
Block a user