Add operation for set segment duration #19

Merged
colonelpanic merged 1 commits from loewy/set-segment-duration-operation into master 2024-07-16 17:54:20 -06:00
2 changed files with 81 additions and 0 deletions

View File

@ -1686,6 +1686,17 @@ export type GetHlsInitUploadLinkMutation = {
};
};
export type SetSegmentDurationMutationVariables = Exact<{
videoId: Scalars["Int"]["input"];
segmentId: Scalars["Int"]["input"];
duration: Scalars["Float"]["input"];
}>;
export type SetSegmentDurationMutation = {
__typename?: "Mutation";
setSegmentDuration: boolean;
};
export type EditUploadStreamMutationVariables = Exact<{
videoId: Scalars["Int"]["input"];
videoMetadataInput: VideoMetadataInput;
@ -3505,6 +3516,64 @@ export type GetHlsInitUploadLinkMutationOptions = Apollo.BaseMutationOptions<
GetHlsInitUploadLinkMutation,
GetHlsInitUploadLinkMutationVariables
>;
export const SetSegmentDurationDocument = gql`
mutation SetSegmentDuration(
$videoId: Int!
$segmentId: Int!
$duration: Float!
) {
setSegmentDuration(
videoId: $videoId
segmentId: $segmentId
duration: $duration
)
}
`;
export type SetSegmentDurationMutationFn = Apollo.MutationFunction<
SetSegmentDurationMutation,
SetSegmentDurationMutationVariables
>;
/**
* __useSetSegmentDurationMutation__
*
* To run a mutation, you first call `useSetSegmentDurationMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useSetSegmentDurationMutation` returns a tuple that includes:
* - A mutate function that you can call at any time to execute the mutation
* - An object with fields that represent the current status of the mutation's execution
*
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
*
* @example
* const [setSegmentDurationMutation, { data, loading, error }] = useSetSegmentDurationMutation({
* variables: {
* videoId: // value for 'videoId'
* segmentId: // value for 'segmentId'
* duration: // value for 'duration'
* },
* });
*/
export function useSetSegmentDurationMutation(
baseOptions?: Apollo.MutationHookOptions<
SetSegmentDurationMutation,
SetSegmentDurationMutationVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useMutation<
SetSegmentDurationMutation,
SetSegmentDurationMutationVariables
>(SetSegmentDurationDocument, options);
}
export type SetSegmentDurationMutationHookResult = ReturnType<
typeof useSetSegmentDurationMutation
>;
export type SetSegmentDurationMutationResult =
Apollo.MutationResult<SetSegmentDurationMutation>;
export type SetSegmentDurationMutationOptions = Apollo.BaseMutationOptions<
SetSegmentDurationMutation,
SetSegmentDurationMutationVariables
>;
export const EditUploadStreamDocument = gql`
mutation EditUploadStream(
$videoId: Int!

View File

@ -24,6 +24,18 @@ mutation GetHlsInitUploadLink($videoId: Int!) {
}
}
mutation SetSegmentDuration(
$videoId: Int!
$segmentId: Int!
$duration: Float!
) {
setSegmentDuration(
videoId: $videoId
segmentId: $segmentId
duration: $duration
)
}
mutation EditUploadStream(
$videoId: Int!
$videoMetadataInput: VideoMetadataInput!