Compare commits

...

3 Commits

Author SHA1 Message Date
12f7e1f115 Merge pull request 'Add operation getHlsInitUploadLink' (#18) from loewy/operation-get-hls-init-upload-link into master
Reviewed-on: #18
2024-07-16 15:28:43 -06:00
296ad969f4 Merge branch 'master' into loewy/operation-get-hls-init-upload-link
All checks were successful
Tests / Tests (pull_request) Successful in 9s
2024-07-16 15:27:37 -06:00
67d8bcac21 add operation for hls init link
All checks were successful
Tests / Tests (pull_request) Successful in 14s
2024-07-15 17:29:55 -07:00
2 changed files with 81 additions and 0 deletions

View File

@ -1669,6 +1669,23 @@ export type GetUploadLinkMutation = {
};
};
export type GetHlsInitUploadLinkMutationVariables = Exact<{
videoId: Scalars["Int"]["input"];
}>;
export type GetHlsInitUploadLinkMutation = {
__typename?: "Mutation";
getHlsInitUploadLink: {
__typename?: "GetUploadLinkReturn";
uploadUrl: string;
headers: Array<{
__typename?: "Header";
key: string;
value: string;
} | null>;
};
};
export type EditUploadStreamMutationVariables = Exact<{
videoId: Scalars["Int"]["input"];
videoMetadataInput: VideoMetadataInput;
@ -3434,6 +3451,60 @@ export type GetUploadLinkMutationOptions = Apollo.BaseMutationOptions<
GetUploadLinkMutation,
GetUploadLinkMutationVariables
>;
export const GetHlsInitUploadLinkDocument = gql`
mutation GetHlsInitUploadLink($videoId: Int!) {
getHlsInitUploadLink(videoId: $videoId) {
uploadUrl
headers {
key
value
}
}
}
`;
export type GetHlsInitUploadLinkMutationFn = Apollo.MutationFunction<
GetHlsInitUploadLinkMutation,
GetHlsInitUploadLinkMutationVariables
>;
/**
* __useGetHlsInitUploadLinkMutation__
*
* To run a mutation, you first call `useGetHlsInitUploadLinkMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useGetHlsInitUploadLinkMutation` 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 [getHlsInitUploadLinkMutation, { data, loading, error }] = useGetHlsInitUploadLinkMutation({
* variables: {
* videoId: // value for 'videoId'
* },
* });
*/
export function useGetHlsInitUploadLinkMutation(
baseOptions?: Apollo.MutationHookOptions<
GetHlsInitUploadLinkMutation,
GetHlsInitUploadLinkMutationVariables
>,
) {
const options = { ...defaultOptions, ...baseOptions };
return Apollo.useMutation<
GetHlsInitUploadLinkMutation,
GetHlsInitUploadLinkMutationVariables
>(GetHlsInitUploadLinkDocument, options);
}
export type GetHlsInitUploadLinkMutationHookResult = ReturnType<
typeof useGetHlsInitUploadLinkMutation
>;
export type GetHlsInitUploadLinkMutationResult =
Apollo.MutationResult<GetHlsInitUploadLinkMutation>;
export type GetHlsInitUploadLinkMutationOptions = Apollo.BaseMutationOptions<
GetHlsInitUploadLinkMutation,
GetHlsInitUploadLinkMutationVariables
>;
export const EditUploadStreamDocument = gql`
mutation EditUploadStream(
$videoId: Int!

View File

@ -14,6 +14,16 @@ mutation GetUploadLink($videoId: Int!, $segmentIndex: Int!) {
}
}
mutation GetHlsInitUploadLink($videoId: Int!) {
getHlsInitUploadLink(videoId: $videoId) {
uploadUrl
headers {
key
value
}
}
}
mutation EditUploadStream(
$videoId: Int!
$videoMetadataInput: VideoMetadataInput!