From e783050a027ae989c3095838f422c32b260b1738 Mon Sep 17 00:00:00 2001 From: Loewy Date: Tue, 23 Sep 2025 11:02:16 -0700 Subject: [PATCH] operations --- src/index.tsx | 179 ++++++++++++++++++++++++++ src/operations/content-moderation.gql | 15 +++ 2 files changed, 194 insertions(+) create mode 100644 src/operations/content-moderation.gql diff --git a/src/index.tsx b/src/index.tsx index 7fcffe1..8b5a492 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -3383,6 +3383,32 @@ export type GetDeployedConfigQuery = { }; }; +export type BlockContentMutationVariables = Exact<{ + videoId: Scalars["Int"]["input"]; +}>; + +export type BlockContentMutation = { + __typename?: "Mutation"; + blockContent: boolean; +}; + +export type BlockUserMutationVariables = Exact<{ + userId: Scalars["Int"]["input"]; +}>; + +export type BlockUserMutation = { __typename?: "Mutation"; blockUser: boolean }; + +export type ReportContentMutationVariables = Exact<{ + videoId: Scalars["Int"]["input"]; + reason: ReportReasonEnum; + customReason?: InputMaybe; +}>; + +export type ReportContentMutation = { + __typename?: "Mutation"; + reportContent: boolean; +}; + export type GetFeedQueryVariables = Exact<{ limit?: Scalars["Int"]["input"]; after?: InputMaybe; @@ -6277,6 +6303,159 @@ export type GetDeployedConfigQueryResult = Apollo.QueryResult< GetDeployedConfigQuery, GetDeployedConfigQueryVariables >; +export const BlockContentDocument = gql` + mutation blockContent($videoId: Int!) { + blockContent(videoId: $videoId) + } +`; +export type BlockContentMutationFn = Apollo.MutationFunction< + BlockContentMutation, + BlockContentMutationVariables +>; + +/** + * __useBlockContentMutation__ + * + * To run a mutation, you first call `useBlockContentMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useBlockContentMutation` 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 [blockContentMutation, { data, loading, error }] = useBlockContentMutation({ + * variables: { + * videoId: // value for 'videoId' + * }, + * }); + */ +export function useBlockContentMutation( + baseOptions?: Apollo.MutationHookOptions< + BlockContentMutation, + BlockContentMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + BlockContentMutation, + BlockContentMutationVariables + >(BlockContentDocument, options); +} +export type BlockContentMutationHookResult = ReturnType< + typeof useBlockContentMutation +>; +export type BlockContentMutationResult = + Apollo.MutationResult; +export type BlockContentMutationOptions = Apollo.BaseMutationOptions< + BlockContentMutation, + BlockContentMutationVariables +>; +export const BlockUserDocument = gql` + mutation blockUser($userId: Int!) { + blockUser(userId: $userId) + } +`; +export type BlockUserMutationFn = Apollo.MutationFunction< + BlockUserMutation, + BlockUserMutationVariables +>; + +/** + * __useBlockUserMutation__ + * + * To run a mutation, you first call `useBlockUserMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useBlockUserMutation` 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 [blockUserMutation, { data, loading, error }] = useBlockUserMutation({ + * variables: { + * userId: // value for 'userId' + * }, + * }); + */ +export function useBlockUserMutation( + baseOptions?: Apollo.MutationHookOptions< + BlockUserMutation, + BlockUserMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation( + BlockUserDocument, + options, + ); +} +export type BlockUserMutationHookResult = ReturnType< + typeof useBlockUserMutation +>; +export type BlockUserMutationResult = Apollo.MutationResult; +export type BlockUserMutationOptions = Apollo.BaseMutationOptions< + BlockUserMutation, + BlockUserMutationVariables +>; +export const ReportContentDocument = gql` + mutation reportContent( + $videoId: Int! + $reason: ReportReasonEnum! + $customReason: String = null + ) { + reportContent( + videoId: $videoId + reason: $reason + customReason: $customReason + ) + } +`; +export type ReportContentMutationFn = Apollo.MutationFunction< + ReportContentMutation, + ReportContentMutationVariables +>; + +/** + * __useReportContentMutation__ + * + * To run a mutation, you first call `useReportContentMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useReportContentMutation` 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 [reportContentMutation, { data, loading, error }] = useReportContentMutation({ + * variables: { + * videoId: // value for 'videoId' + * reason: // value for 'reason' + * customReason: // value for 'customReason' + * }, + * }); + */ +export function useReportContentMutation( + baseOptions?: Apollo.MutationHookOptions< + ReportContentMutation, + ReportContentMutationVariables + >, +) { + const options = { ...defaultOptions, ...baseOptions }; + return Apollo.useMutation< + ReportContentMutation, + ReportContentMutationVariables + >(ReportContentDocument, options); +} +export type ReportContentMutationHookResult = ReturnType< + typeof useReportContentMutation +>; +export type ReportContentMutationResult = + Apollo.MutationResult; +export type ReportContentMutationOptions = Apollo.BaseMutationOptions< + ReportContentMutation, + ReportContentMutationVariables +>; export const GetFeedDocument = gql` query GetFeed( $limit: Int! = 5 diff --git a/src/operations/content-moderation.gql b/src/operations/content-moderation.gql new file mode 100644 index 0000000..f9cc12f --- /dev/null +++ b/src/operations/content-moderation.gql @@ -0,0 +1,15 @@ +mutation blockContent($videoId: Int!) { + blockContent(videoId: $videoId) +} + +mutation blockUser($userId: Int!) { + blockUser(userId: $userId) +} + +mutation reportContent( + $videoId: Int! + $reason: ReportReasonEnum! + $customReason: String = null +) { + reportContent(videoId: $videoId, reason: $reason, customReason: $customReason) +}