Update upload_stream and terminate_stream gql

This commit is contained in:
Kat Huang 2024-03-04 20:10:49 -07:00
parent b051809869
commit babb111fa6
3 changed files with 52 additions and 151 deletions

View File

@ -155,8 +155,7 @@ export type MutationCreateBucketSetArgs = {
};
export type MutationCreateUploadStreamArgs = {
uploadMetadata?: InputMaybe<UploadMetadataInput>;
videoName?: InputMaybe<Scalars["String"]["input"]>;
videoMetadata?: InputMaybe<VideoMetadataInput>;
};
export type MutationGetUploadLinkArgs = {
@ -165,10 +164,8 @@ export type MutationGetUploadLinkArgs = {
};
export type MutationTerminateUploadStreamArgs = {
gameType?: InputMaybe<Scalars["String"]["input"]>;
tableSize?: InputMaybe<Scalars["String"]["input"]>;
videoId: Scalars["Int"]["input"];
videoName?: InputMaybe<Scalars["String"]["input"]>;
videoMetadata?: InputMaybe<VideoMetadataInput>;
};
export type OrFilter = {
@ -286,7 +283,17 @@ export type TargetPocketDistanceInput = {
value: RangeFilter;
};
export type UploadMetadataInput = {
export type UploadStreamGql = {
__typename?: "UploadStreamGQL";
createdAt: Scalars["DateTime"]["output"];
id: Scalars["ID"]["output"];
isCompleted: Scalars["Boolean"]["output"];
linksRequested: Scalars["Int"]["output"];
updatedAt: Scalars["DateTime"]["output"];
uploadsCompleted: Scalars["Int"]["output"];
};
export type UploadStreamMetadataInput = {
appVersion?: InputMaybe<Scalars["String"]["input"]>;
browserName?: InputMaybe<Scalars["String"]["input"]>;
browserVersion?: InputMaybe<Scalars["String"]["input"]>;
@ -298,30 +305,6 @@ export type UploadMetadataInput = {
timezone?: InputMaybe<Scalars["String"]["input"]>;
};
export type UploadStreamGql = {
__typename?: "UploadStreamGQL";
createdAt: Scalars["DateTime"]["output"];
id: Scalars["ID"]["output"];
isCompleted: Scalars["Boolean"]["output"];
linksRequested: Scalars["Int"]["output"];
updatedAt: Scalars["DateTime"]["output"];
uploadMetadata: UploadStreamMetadata;
uploadsCompleted: Scalars["Int"]["output"];
};
export type UploadStreamMetadata = {
__typename?: "UploadStreamMetadata";
appVersion?: Maybe<Scalars["String"]["output"]>;
browserName?: Maybe<Scalars["String"]["output"]>;
browserVersion?: Maybe<Scalars["String"]["output"]>;
deviceType?: Maybe<DeviceTypeEnum>;
ipAddress?: Maybe<Scalars["String"]["output"]>;
locale?: Maybe<Scalars["String"]["output"]>;
networkType?: Maybe<Scalars["String"]["output"]>;
osVersion?: Maybe<Scalars["String"]["output"]>;
timezone?: Maybe<Scalars["String"]["output"]>;
};
export type UserGql = {
__typename?: "UserGQL";
createdAt?: Maybe<Scalars["DateTime"]["output"]>;
@ -368,6 +351,15 @@ export type VideoGql = {
updatedAt?: Maybe<Scalars["DateTime"]["output"]>;
};
export type VideoMetadataInput = {
endTime?: InputMaybe<Scalars["DateTime"]["input"]>;
gameType?: InputMaybe<Scalars["String"]["input"]>;
startTime?: InputMaybe<Scalars["DateTime"]["input"]>;
tableSize?: InputMaybe<Scalars["String"]["input"]>;
uploadStreamMetadataInput?: InputMaybe<UploadStreamMetadataInput>;
videoName?: InputMaybe<Scalars["String"]["input"]>;
};
export enum WallTypeEnum {
Long = "LONG",
Short = "SHORT",
@ -489,16 +481,7 @@ export type GetShotsQuery = {
};
export type CreateUploadStreamMutationVariables = Exact<{
videoName: Scalars["String"]["input"];
deviceType?: InputMaybe<DeviceTypeEnum>;
osVersion?: InputMaybe<Scalars["String"]["input"]>;
appVersion?: InputMaybe<Scalars["String"]["input"]>;
browserName?: InputMaybe<Scalars["String"]["input"]>;
browserVersion?: InputMaybe<Scalars["String"]["input"]>;
locale?: InputMaybe<Scalars["String"]["input"]>;
timezone?: InputMaybe<Scalars["String"]["input"]>;
networkType?: InputMaybe<Scalars["String"]["input"]>;
ipAddress?: InputMaybe<Scalars["String"]["input"]>;
videoMetadataInput: VideoMetadataInput;
}>;
export type CreateUploadStreamMutation = {
@ -529,9 +512,7 @@ export type GetUploadLinkMutation = {
export type TerminateUploadStreamMutationVariables = Exact<{
videoId: Scalars["Int"]["input"];
videoName?: InputMaybe<Scalars["String"]["input"]>;
gameType?: InputMaybe<Scalars["String"]["input"]>;
tableSize?: InputMaybe<Scalars["String"]["input"]>;
videoMetadataInput: VideoMetadataInput;
}>;
export type TerminateUploadStreamMutation = {
@ -828,32 +809,8 @@ export type GetShotsQueryResult = Apollo.QueryResult<
GetShotsQueryVariables
>;
export const CreateUploadStreamDocument = gql`
mutation CreateUploadStream(
$videoName: String!
$deviceType: DeviceTypeEnum
$osVersion: String
$appVersion: String
$browserName: String
$browserVersion: String
$locale: String
$timezone: String
$networkType: String
$ipAddress: String
) {
createUploadStream(
videoName: $videoName
uploadMetadata: {
deviceType: $deviceType
osVersion: $osVersion
appVersion: $appVersion
browserName: $browserName
browserVersion: $browserVersion
locale: $locale
timezone: $timezone
networkType: $networkType
ipAddress: $ipAddress
}
) {
mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) {
createUploadStream(videoMetadata: $videoMetadataInput) {
videoId
}
}
@ -876,16 +833,7 @@ export type CreateUploadStreamMutationFn = Apollo.MutationFunction<
* @example
* const [createUploadStreamMutation, { data, loading, error }] = useCreateUploadStreamMutation({
* variables: {
* videoName: // value for 'videoName'
* deviceType: // value for 'deviceType'
* osVersion: // value for 'osVersion'
* appVersion: // value for 'appVersion'
* browserName: // value for 'browserName'
* browserVersion: // value for 'browserVersion'
* locale: // value for 'locale'
* timezone: // value for 'timezone'
* networkType: // value for 'networkType'
* ipAddress: // value for 'ipAddress'
* videoMetadataInput: // value for 'videoMetadataInput'
* },
* });
*/
@ -968,16 +916,9 @@ export type GetUploadLinkMutationOptions = Apollo.BaseMutationOptions<
export const TerminateUploadStreamDocument = gql`
mutation TerminateUploadStream(
$videoId: Int!
$videoName: String
$gameType: String
$tableSize: String
$videoMetadataInput: VideoMetadataInput!
) {
terminateUploadStream(
videoId: $videoId
videoName: $videoName
gameType: $gameType
tableSize: $tableSize
)
terminateUploadStream(videoId: $videoId, videoMetadata: $videoMetadataInput)
}
`;
export type TerminateUploadStreamMutationFn = Apollo.MutationFunction<
@ -999,9 +940,7 @@ export type TerminateUploadStreamMutationFn = Apollo.MutationFunction<
* const [terminateUploadStreamMutation, { data, loading, error }] = useTerminateUploadStreamMutation({
* variables: {
* videoId: // value for 'videoId'
* videoName: // value for 'videoName'
* gameType: // value for 'gameType'
* tableSize: // value for 'tableSize'
* videoMetadataInput: // value for 'videoMetadataInput'
* },
* });
*/

View File

@ -1,29 +1,5 @@
mutation CreateUploadStream(
$videoName: String!
$deviceType: DeviceTypeEnum
$osVersion: String
$appVersion: String
$browserName: String
$browserVersion: String
$locale: String
$timezone: String
$networkType: String
$ipAddress: String
) {
createUploadStream(
videoName: $videoName
uploadMetadata: {
deviceType: $deviceType
osVersion: $osVersion
appVersion: $appVersion
browserName: $browserName
browserVersion: $browserVersion
locale: $locale
timezone: $timezone
networkType: $networkType
ipAddress: $ipAddress
}
) {
mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) {
createUploadStream(videoMetadata: $videoMetadataInput) {
videoId
}
}
@ -40,14 +16,7 @@ mutation GetUploadLink($videoId: Int!, $segmentIndex: Int!) {
mutation TerminateUploadStream(
$videoId: Int!
$videoName: String
$gameType: String
$tableSize: String
$videoMetadataInput: VideoMetadataInput!
) {
terminateUploadStream(
videoId: $videoId
videoName: $videoName
gameType: $gameType
tableSize: $tableSize
)
terminateUploadStream(videoId: $videoId, videoMetadata: $videoMetadataInput)
}

View File

@ -149,29 +149,10 @@ type UploadStreamGQL {
linksRequested: Int!
uploadsCompleted: Int!
isCompleted: Boolean!
uploadMetadata: UploadStreamMetadata!
createdAt: DateTime!
updatedAt: DateTime!
}
type UploadStreamMetadata {
deviceType: DeviceTypeEnum
osVersion: String
appVersion: String
browserName: String
browserVersion: String
locale: String
timezone: String
networkType: String
ipAddress: String
}
enum DeviceTypeEnum {
IOS
ANDROID
BROWSER
}
input FilterInput {
andFilters: AndFilter = null
orFilters: OrFilter = null
@ -243,15 +224,12 @@ type PageInfoGQL {
type Mutation {
createBucketSet(params: CreateBucketSetInput!): BucketSetGQL!
createUploadStream(
uploadMetadata: UploadMetadataInput
videoName: String = null
videoMetadata: VideoMetadataInput
): CreateUploadStreamReturn!
getUploadLink(videoId: Int!, segmentIndex: Int!): GetUploadLinkReturn!
terminateUploadStream(
videoId: Int!
videoName: String = null
gameType: String = null
tableSize: String = null
videoMetadata: VideoMetadataInput = null
): Boolean!
}
@ -265,7 +243,16 @@ type CreateUploadStreamReturn {
videoId: Int!
}
input UploadMetadataInput {
input VideoMetadataInput {
videoName: String = null
startTime: DateTime = null
endTime: DateTime = null
gameType: String = null
tableSize: String = null
uploadStreamMetadataInput: UploadStreamMetadataInput = null
}
input UploadStreamMetadataInput {
deviceType: DeviceTypeEnum = null
osVersion: String = null
appVersion: String = null
@ -277,6 +264,12 @@ input UploadMetadataInput {
ipAddress: String = null
}
enum DeviceTypeEnum {
IOS
ANDROID
BROWSER
}
type GetUploadLinkReturn {
uploadUrl: String!
headers: [Header]!