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

View File

@ -1,29 +1,5 @@
mutation CreateUploadStream( mutation CreateUploadStream($videoMetadataInput: VideoMetadataInput!) {
$videoName: String! createUploadStream(videoMetadata: $videoMetadataInput) {
$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
}
) {
videoId videoId
} }
} }
@ -40,14 +16,7 @@ mutation GetUploadLink($videoId: Int!, $segmentIndex: Int!) {
mutation TerminateUploadStream( mutation TerminateUploadStream(
$videoId: Int! $videoId: Int!
$videoName: String $videoMetadataInput: VideoMetadataInput!
$gameType: String
$tableSize: String
) { ) {
terminateUploadStream( terminateUploadStream(videoId: $videoId, videoMetadata: $videoMetadataInput)
videoId: $videoId
videoName: $videoName
gameType: $gameType
tableSize: $tableSize
)
} }

View File

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