1123 lines
42 KiB
TypeScript

import { gql } from '@apollo/client';
import * as Apollo from '@apollo/client';
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
const defaultOptions = {} as const;
/** All built-in and custom scalars, mapped to their actual values */
export type Scalars = {
ID: { input: string; output: string; }
String: { input: string; output: string; }
Boolean: { input: boolean; output: boolean; }
Int: { input: number; output: number; }
Float: { input: number; output: number; }
DateTime: { input: any; output: any; }
Upload: { input: any; output: any; }
};
export type AuthModel = {
__typename?: 'AuthModel';
message?: Maybe<Scalars['String']['output']>;
user?: Maybe<UserModel>;
};
export type CategoryModel = {
__typename?: 'CategoryModel';
createdAt: Scalars['DateTime']['output'];
description?: Maybe<Scalars['String']['output']>;
id: Scalars['ID']['output'];
slug: Scalars['String']['output'];
streams: Array<StreamModel>;
thumbnailUrl: Scalars['String']['output'];
title: Scalars['String']['output'];
updatedAt: Scalars['DateTime']['output'];
};
export type ChangeChatSettingsInput = {
isChatEnable: Scalars['Boolean']['input'];
isChatFollowersOnly: Scalars['Boolean']['input'];
isChatPremiumFollowersOnly: Scalars['Boolean']['input'];
};
export type ChangeEmailInput = {
email: Scalars['String']['input'];
};
export type ChangeNotificationSettingsInput = {
siteNotifications: Scalars['Boolean']['input'];
telegramNotifications: Scalars['Boolean']['input'];
};
export type ChangeNotificationsSettingsResponse = {
__typename?: 'ChangeNotificationsSettingsResponse';
notificationSettings: NotificationSettingsModel;
telegramAuthToken?: Maybe<Scalars['String']['output']>;
};
export type ChangePasswordInput = {
newPassword: Scalars['String']['input'];
oldPassword: Scalars['String']['input'];
};
export type ChangeProfileInfoInput = {
bio: Scalars['String']['input'];
displayName: Scalars['String']['input'];
name: Scalars['String']['input'];
};
export type ChangeStreamInfoInput = {
categoryId: Scalars['String']['input'];
title: Scalars['String']['input'];
};
export type ChatMessageModel = {
__typename?: 'ChatMessageModel';
createdAt: Scalars['DateTime']['output'];
id: Scalars['ID']['output'];
streamId: Scalars['ID']['output'];
text: Scalars['String']['output'];
updatedAt: Scalars['DateTime']['output'];
userId: Scalars['ID']['output'];
};
export type CreatePlanInput = {
description?: InputMaybe<Scalars['String']['input']>;
price: Scalars['Float']['input'];
title: Scalars['String']['input'];
};
export type CreateUserInput = {
email: Scalars['String']['input'];
name: Scalars['String']['input'];
password: Scalars['String']['input'];
};
export type DeactivateAccountInput = {
email: Scalars['String']['input'];
password: Scalars['String']['input'];
pin?: InputMaybe<Scalars['String']['input']>;
};
export type DeviceModel = {
__typename?: 'DeviceModel';
browser: Scalars['String']['output'];
os: Scalars['String']['output'];
type: Scalars['String']['output'];
};
export type EnableTotpInput = {
pin: Scalars['String']['input'];
secret: Scalars['String']['input'];
};
export type FilterInput = {
searchTerm?: InputMaybe<Scalars['String']['input']>;
skip?: InputMaybe<Scalars['Float']['input']>;
take?: InputMaybe<Scalars['Float']['input']>;
};
export type FollowModel = {
__typename?: 'FollowModel';
createdAt: Scalars['DateTime']['output'];
follower: UserModel;
followerId: Scalars['ID']['output'];
following: UserModel;
followingId: Scalars['ID']['output'];
id: Scalars['ID']['output'];
updatedAt: Scalars['DateTime']['output'];
};
export type GenerateStreamTokenInput = {
channelId: Scalars['String']['input'];
userId: Scalars['String']['input'];
};
export type GenerateTokenModel = {
__typename?: 'GenerateTokenModel';
token: Scalars['String']['output'];
};
export type LocationModel = {
__typename?: 'LocationModel';
city: Scalars['String']['output'];
country: Scalars['String']['output'];
latitude: Scalars['Float']['output'];
longitude: Scalars['Float']['output'];
};
export type LoginInput = {
login: Scalars['String']['input'];
password: Scalars['String']['input'];
pin?: InputMaybe<Scalars['String']['input']>;
};
export type MakePaymentModel = {
__typename?: 'MakePaymentModel';
url: Scalars['String']['output'];
};
export type Mutation = {
__typename?: 'Mutation';
changeChatSettings: StreamModel;
changeEmail: UserModel;
changeNotificationSettigs: ChangeNotificationsSettingsResponse;
changePassword: UserModel;
changeProfileAvatar: Scalars['Boolean']['output'];
changeProfileInfo: UserModel;
changeStreamInfo: StreamModel;
changeStreamThumbnail: Scalars['Boolean']['output'];
clearSessionCookie: Scalars['Boolean']['output'];
createIngress: Scalars['Boolean']['output'];
createSocialLink: SocialLinkModel;
createSponsorshipPlan: PlanModel;
createUser: UserModel;
deactivateAccount: AuthModel;
disableTotp: Scalars['Boolean']['output'];
enableTotp: Scalars['Boolean']['output'];
followChannel: FollowModel;
generateStreamToken: GenerateTokenModel;
loginUser: AuthModel;
logoutUser: Scalars['Boolean']['output'];
makePayment: MakePaymentModel;
removeProfileAvatar: Scalars['Boolean']['output'];
removeSession: Scalars['Boolean']['output'];
removeSocialLink: Scalars['Boolean']['output'];
removeSponsorshipPlan: PlanModel;
removeStreamThumbnail: Scalars['Boolean']['output'];
reorderSocialLink: Scalars['Boolean']['output'];
resetPassword: Scalars['Boolean']['output'];
sendChatMessage: ChatMessageModel;
setNewPassword: Scalars['Boolean']['output'];
unfollowChannel: FollowModel;
updateSocialLink: SocialLinkModel;
verifyAccount: AuthModel;
};
export type MutationChangeChatSettingsArgs = {
data: ChangeChatSettingsInput;
};
export type MutationChangeEmailArgs = {
data: ChangeEmailInput;
};
export type MutationChangeNotificationSettigsArgs = {
data: ChangeNotificationSettingsInput;
};
export type MutationChangePasswordArgs = {
data: ChangePasswordInput;
};
export type MutationChangeProfileAvatarArgs = {
avatar: Scalars['Upload']['input'];
};
export type MutationChangeProfileInfoArgs = {
data: ChangeProfileInfoInput;
};
export type MutationChangeStreamInfoArgs = {
data: ChangeStreamInfoInput;
};
export type MutationChangeStreamThumbnailArgs = {
thumbnail: Scalars['Upload']['input'];
};
export type MutationCreateIngressArgs = {
ingressType: Scalars['Float']['input'];
};
export type MutationCreateSocialLinkArgs = {
data: SocialLinkInput;
};
export type MutationCreateSponsorshipPlanArgs = {
data: CreatePlanInput;
};
export type MutationCreateUserArgs = {
data: CreateUserInput;
};
export type MutationDeactivateAccountArgs = {
data: DeactivateAccountInput;
};
export type MutationEnableTotpArgs = {
data: EnableTotpInput;
};
export type MutationFollowChannelArgs = {
channelId: Scalars['String']['input'];
};
export type MutationGenerateStreamTokenArgs = {
data: GenerateStreamTokenInput;
};
export type MutationLoginUserArgs = {
data: LoginInput;
};
export type MutationMakePaymentArgs = {
planId: Scalars['String']['input'];
};
export type MutationRemoveSessionArgs = {
id: Scalars['String']['input'];
};
export type MutationRemoveSocialLinkArgs = {
id: Scalars['String']['input'];
};
export type MutationRemoveSponsorshipPlanArgs = {
planId: Scalars['String']['input'];
};
export type MutationReorderSocialLinkArgs = {
list: Array<SocialLinkOrderInput>;
};
export type MutationResetPasswordArgs = {
data: ResetPasswordInput;
};
export type MutationSendChatMessageArgs = {
data: SendMessageInput;
};
export type MutationSetNewPasswordArgs = {
data: NewPasswordInput;
};
export type MutationUnfollowChannelArgs = {
channelId: Scalars['String']['input'];
};
export type MutationUpdateSocialLinkArgs = {
data: SocialLinkInput;
id: Scalars['String']['input'];
};
export type MutationVerifyAccountArgs = {
data: VerificationInput;
};
export type NewPasswordInput = {
password: Scalars['String']['input'];
passwordRepeat: Scalars['String']['input'];
token: Scalars['String']['input'];
};
export type NotificationModel = {
__typename?: 'NotificationModel';
createdAt: Scalars['DateTime']['output'];
id: Scalars['String']['output'];
isRead: Scalars['Boolean']['output'];
text: Scalars['String']['output'];
type: NotificationType;
updatedAt: Scalars['DateTime']['output'];
user: UserModel;
userId: Scalars['String']['output'];
};
export type NotificationSettingsModel = {
__typename?: 'NotificationSettingsModel';
createdAt: Scalars['DateTime']['output'];
id: Scalars['String']['output'];
siteNotifications: Scalars['Boolean']['output'];
telegramNotifications: Scalars['Boolean']['output'];
updatedAt: Scalars['DateTime']['output'];
user: UserModel;
userId: Scalars['String']['output'];
};
export enum NotificationType {
EnableTwoFactor = 'ENABLE_TWO_FACTOR',
NewFollower = 'NEW_FOLLOWER',
NewSponsorship = 'NEW_SPONSORSHIP',
StreamStart = 'STREAM_START',
VerifiedChannel = 'VERIFIED_CHANNEL'
}
export type PlanModel = {
__typename?: 'PlanModel';
channel: UserModel;
channelId: Scalars['ID']['output'];
createdAt: Scalars['DateTime']['output'];
description?: Maybe<Scalars['String']['output']>;
id: Scalars['ID']['output'];
price: Scalars['Float']['output'];
stripePlanId: Scalars['ID']['output'];
stripeProductId: Scalars['ID']['output'];
title: Scalars['String']['output'];
updatedAt: Scalars['DateTime']['output'];
};
export type Query = {
__typename?: 'Query';
findAllCategories: Array<CategoryModel>;
findAllStreams: Array<StreamModel>;
findCategoryBySlug: CategoryModel;
findChannelByUsername: UserModel;
findChannelFollowersCount: Scalars['Float']['output'];
findCurrentSession: SessionModel;
findMessagesByStream: Array<ChatMessageModel>;
findMyFollowers: Array<FollowModel>;
findMyFollowings: Array<FollowModel>;
findMySponsors: Array<SubscriptionModel>;
findMySponsorshipPlans: Array<PlanModel>;
findMyTransactions: Array<TransactionModel>;
findNotificationByUser: Array<NotificationModel>;
findProfile: UserModel;
findRandomCategories: Array<CategoryModel>;
findRandomStreams: Array<StreamModel>;
findRecommendedChannels: Array<UserModel>;
findSessionsByUser: Array<SessionModel>;
findSocialLinks: Array<SocialLinkModel>;
findSponsorsByChannel: Array<SubscriptionModel>;
findUnreadNotificationsCount: Scalars['Float']['output'];
generateTotpSecret: TotpModel;
};
export type QueryFindAllStreamsArgs = {
filters: FilterInput;
};
export type QueryFindCategoryBySlugArgs = {
slug: Scalars['String']['input'];
};
export type QueryFindChannelByUsernameArgs = {
name: Scalars['String']['input'];
};
export type QueryFindChannelFollowersCountArgs = {
channelId: Scalars['String']['input'];
};
export type QueryFindMessagesByStreamArgs = {
streamId: Scalars['String']['input'];
};
export type QueryFindSponsorsByChannelArgs = {
channelId: Scalars['String']['input'];
};
export type ResetPasswordInput = {
email: Scalars['String']['input'];
};
export type SendMessageInput = {
streamId: Scalars['String']['input'];
text: Scalars['String']['input'];
};
export type SessionMetadataModel = {
__typename?: 'SessionMetadataModel';
device: DeviceModel;
ip: Scalars['String']['output'];
location: LocationModel;
};
export type SessionModel = {
__typename?: 'SessionModel';
createdAt: Scalars['String']['output'];
id: Scalars['ID']['output'];
metadata: SessionMetadataModel;
userId: Scalars['String']['output'];
};
export type SocialLinkInput = {
title: Scalars['String']['input'];
url: Scalars['String']['input'];
};
export type SocialLinkModel = {
__typename?: 'SocialLinkModel';
createdAt: Scalars['DateTime']['output'];
id: Scalars['ID']['output'];
position: Scalars['Float']['output'];
title: Scalars['String']['output'];
updatedAt: Scalars['DateTime']['output'];
url: Scalars['String']['output'];
userId: Scalars['ID']['output'];
};
export type SocialLinkOrderInput = {
id: Scalars['String']['input'];
position: Scalars['Float']['input'];
};
export type StreamModel = {
__typename?: 'StreamModel';
category: CategoryModel;
categoryId: Scalars['ID']['output'];
chatMessages: Array<ChatMessageModel>;
createdAt: Scalars['DateTime']['output'];
id: Scalars['ID']['output'];
ingressId?: Maybe<Scalars['String']['output']>;
isChatEnable: Scalars['Boolean']['output'];
isChatFollowersOnly: Scalars['Boolean']['output'];
isChatPremiumFollowersOnly: Scalars['Boolean']['output'];
isLive: Scalars['Boolean']['output'];
key?: Maybe<Scalars['String']['output']>;
serverUrl?: Maybe<Scalars['String']['output']>;
thumbnailUrl?: Maybe<Scalars['String']['output']>;
title: Scalars['String']['output'];
updatedAt: Scalars['DateTime']['output'];
user: UserModel;
userId: Scalars['ID']['output'];
};
export type Subscription = {
__typename?: 'Subscription';
chatMessageAdded: ChatMessageModel;
};
export type SubscriptionChatMessageAddedArgs = {
streamId: Scalars['String']['input'];
};
export type SubscriptionModel = {
__typename?: 'SubscriptionModel';
channel: UserModel;
channelId: Scalars['String']['output'];
createdAt: Scalars['DateTime']['output'];
expiresAt: Scalars['DateTime']['output'];
id: Scalars['ID']['output'];
plan: PlanModel;
planId: Scalars['String']['output'];
updatedAt: Scalars['DateTime']['output'];
user: UserModel;
userId: Scalars['String']['output'];
};
export type TotpModel = {
__typename?: 'TotpModel';
qrcodeUrl: Scalars['String']['output'];
secret: Scalars['String']['output'];
};
export type TransactionModel = {
__typename?: 'TransactionModel';
amount: Scalars['Float']['output'];
createdAt: Scalars['DateTime']['output'];
currency: Scalars['String']['output'];
id: Scalars['ID']['output'];
status: TransactionStatus;
stripeSubscriptionId: Scalars['ID']['output'];
updatedAt: Scalars['DateTime']['output'];
user: UserModel;
userId: Scalars['ID']['output'];
};
export enum TransactionStatus {
Expired = 'EXPIRED',
Failed = 'FAILED',
Pending = 'PENDING',
Success = 'SUCCESS'
}
export type UserModel = {
__typename?: 'UserModel';
avatar?: Maybe<Scalars['String']['output']>;
bio?: Maybe<Scalars['String']['output']>;
createdAt: Scalars['DateTime']['output'];
deactivatedAt?: Maybe<Scalars['DateTime']['output']>;
displayName: Scalars['String']['output'];
email: Scalars['String']['output'];
followers: Array<FollowModel>;
followings: Array<FollowModel>;
id: Scalars['ID']['output'];
isDeactivated: Scalars['Boolean']['output'];
isEmailVerified: Scalars['Boolean']['output'];
isTotpEnabled: Scalars['Boolean']['output'];
isVerified: Scalars['Boolean']['output'];
name: Scalars['String']['output'];
notification: Array<NotificationModel>;
notificationSettings: NotificationSettingsModel;
password: Scalars['String']['output'];
socialLink: Array<SocialLinkModel>;
stream: StreamModel;
telegramId?: Maybe<Scalars['String']['output']>;
totpSecret?: Maybe<Scalars['String']['output']>;
updatedAt: Scalars['DateTime']['output'];
};
export type VerificationInput = {
token: Scalars['String']['input'];
};
export type ClearSessionCookieMutationVariables = Exact<{ [key: string]: never; }>;
export type ClearSessionCookieMutation = { __typename?: 'Mutation', clearSessionCookie: boolean };
export type CreateUserMutationVariables = Exact<{
data: CreateUserInput;
}>;
export type CreateUserMutation = { __typename?: 'Mutation', createUser: { __typename?: 'UserModel', name: string, password: string, email: string } };
export type LoginUserMutationVariables = Exact<{
data: LoginInput;
}>;
export type LoginUserMutation = { __typename?: 'Mutation', loginUser: { __typename?: 'AuthModel', message?: string | null, user?: { __typename?: 'UserModel', id: string, name: string, email: string } | null } };
export type LogoutUserMutationVariables = Exact<{ [key: string]: never; }>;
export type LogoutUserMutation = { __typename?: 'Mutation', logoutUser: boolean };
export type NewPasswordMutationVariables = Exact<{
data: NewPasswordInput;
}>;
export type NewPasswordMutation = { __typename?: 'Mutation', setNewPassword: boolean };
export type ResetPasswordMutationVariables = Exact<{
data: ResetPasswordInput;
}>;
export type ResetPasswordMutation = { __typename?: 'Mutation', resetPassword: boolean };
export type VerifyAccountMutationVariables = Exact<{
data: VerificationInput;
}>;
export type VerifyAccountMutation = { __typename?: 'Mutation', verifyAccount: { __typename?: 'AuthModel', message?: string | null, user?: { __typename?: 'UserModel', isEmailVerified: boolean } | null } };
export type FindRecommendedChannelsQueryVariables = Exact<{ [key: string]: never; }>;
export type FindRecommendedChannelsQuery = { __typename?: 'Query', findRecommendedChannels: Array<{ __typename?: 'UserModel', id: string, name: string, avatar?: string | null, isVerified: boolean, stream: { __typename?: 'StreamModel', isLive: boolean } }> };
export type FindChannelByUsernameQueryVariables = Exact<{
name: Scalars['String']['input'];
}>;
export type FindChannelByUsernameQuery = { __typename?: 'Query', findChannelByUsername: { __typename?: 'UserModel', name: string, avatar?: string | null, displayName: string, stream: { __typename?: 'StreamModel', title: string } } };
export type FindNotificationByUserQueryVariables = Exact<{ [key: string]: never; }>;
export type FindNotificationByUserQuery = { __typename?: 'Query', findNotificationByUser: Array<{ __typename?: 'NotificationModel', createdAt: any, id: string, isRead: boolean, text: string, type: NotificationType, updatedAt: any, userId: string }> };
export type FindUnreadNotificationsCountQueryVariables = Exact<{ [key: string]: never; }>;
export type FindUnreadNotificationsCountQuery = { __typename?: 'Query', findUnreadNotificationsCount: number };
export type FindProfileQueryVariables = Exact<{ [key: string]: never; }>;
export type FindProfileQuery = { __typename?: 'Query', findProfile: { __typename?: 'UserModel', avatar?: string | null, bio?: string | null, createdAt: any, email: string, id: string, name: string, updatedAt: any, isEmailVerified: boolean, isTotpEnabled: boolean, isVerified: boolean, displayName: string, socialLink: Array<{ __typename?: 'SocialLinkModel', title: string, url: string, position: number }> } };
export const ClearSessionCookieDocument = gql`
mutation ClearSessionCookie {
clearSessionCookie
}
`;
export type ClearSessionCookieMutationFn = Apollo.MutationFunction<ClearSessionCookieMutation, ClearSessionCookieMutationVariables>;
/**
* __useClearSessionCookieMutation__
*
* To run a mutation, you first call `useClearSessionCookieMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useClearSessionCookieMutation` 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 [clearSessionCookieMutation, { data, loading, error }] = useClearSessionCookieMutation({
* variables: {
* },
* });
*/
export function useClearSessionCookieMutation(baseOptions?: Apollo.MutationHookOptions<ClearSessionCookieMutation, ClearSessionCookieMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<ClearSessionCookieMutation, ClearSessionCookieMutationVariables>(ClearSessionCookieDocument, options);
}
export type ClearSessionCookieMutationHookResult = ReturnType<typeof useClearSessionCookieMutation>;
export type ClearSessionCookieMutationResult = Apollo.MutationResult<ClearSessionCookieMutation>;
export type ClearSessionCookieMutationOptions = Apollo.BaseMutationOptions<ClearSessionCookieMutation, ClearSessionCookieMutationVariables>;
export const CreateUserDocument = gql`
mutation CreateUser($data: CreateUserInput!) {
createUser(data: $data) {
name
password
email
}
}
`;
export type CreateUserMutationFn = Apollo.MutationFunction<CreateUserMutation, CreateUserMutationVariables>;
/**
* __useCreateUserMutation__
*
* To run a mutation, you first call `useCreateUserMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useCreateUserMutation` 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 [createUserMutation, { data, loading, error }] = useCreateUserMutation({
* variables: {
* data: // value for 'data'
* },
* });
*/
export function useCreateUserMutation(baseOptions?: Apollo.MutationHookOptions<CreateUserMutation, CreateUserMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<CreateUserMutation, CreateUserMutationVariables>(CreateUserDocument, options);
}
export type CreateUserMutationHookResult = ReturnType<typeof useCreateUserMutation>;
export type CreateUserMutationResult = Apollo.MutationResult<CreateUserMutation>;
export type CreateUserMutationOptions = Apollo.BaseMutationOptions<CreateUserMutation, CreateUserMutationVariables>;
export const LoginUserDocument = gql`
mutation LoginUser($data: LoginInput!) {
loginUser(data: $data) {
message
user {
id
name
email
}
}
}
`;
export type LoginUserMutationFn = Apollo.MutationFunction<LoginUserMutation, LoginUserMutationVariables>;
/**
* __useLoginUserMutation__
*
* To run a mutation, you first call `useLoginUserMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useLoginUserMutation` 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 [loginUserMutation, { data, loading, error }] = useLoginUserMutation({
* variables: {
* data: // value for 'data'
* },
* });
*/
export function useLoginUserMutation(baseOptions?: Apollo.MutationHookOptions<LoginUserMutation, LoginUserMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<LoginUserMutation, LoginUserMutationVariables>(LoginUserDocument, options);
}
export type LoginUserMutationHookResult = ReturnType<typeof useLoginUserMutation>;
export type LoginUserMutationResult = Apollo.MutationResult<LoginUserMutation>;
export type LoginUserMutationOptions = Apollo.BaseMutationOptions<LoginUserMutation, LoginUserMutationVariables>;
export const LogoutUserDocument = gql`
mutation LogoutUser {
logoutUser
}
`;
export type LogoutUserMutationFn = Apollo.MutationFunction<LogoutUserMutation, LogoutUserMutationVariables>;
/**
* __useLogoutUserMutation__
*
* To run a mutation, you first call `useLogoutUserMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useLogoutUserMutation` 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 [logoutUserMutation, { data, loading, error }] = useLogoutUserMutation({
* variables: {
* },
* });
*/
export function useLogoutUserMutation(baseOptions?: Apollo.MutationHookOptions<LogoutUserMutation, LogoutUserMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<LogoutUserMutation, LogoutUserMutationVariables>(LogoutUserDocument, options);
}
export type LogoutUserMutationHookResult = ReturnType<typeof useLogoutUserMutation>;
export type LogoutUserMutationResult = Apollo.MutationResult<LogoutUserMutation>;
export type LogoutUserMutationOptions = Apollo.BaseMutationOptions<LogoutUserMutation, LogoutUserMutationVariables>;
export const NewPasswordDocument = gql`
mutation NewPassword($data: NewPasswordInput!) {
setNewPassword(data: $data)
}
`;
export type NewPasswordMutationFn = Apollo.MutationFunction<NewPasswordMutation, NewPasswordMutationVariables>;
/**
* __useNewPasswordMutation__
*
* To run a mutation, you first call `useNewPasswordMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useNewPasswordMutation` 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 [newPasswordMutation, { data, loading, error }] = useNewPasswordMutation({
* variables: {
* data: // value for 'data'
* },
* });
*/
export function useNewPasswordMutation(baseOptions?: Apollo.MutationHookOptions<NewPasswordMutation, NewPasswordMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<NewPasswordMutation, NewPasswordMutationVariables>(NewPasswordDocument, options);
}
export type NewPasswordMutationHookResult = ReturnType<typeof useNewPasswordMutation>;
export type NewPasswordMutationResult = Apollo.MutationResult<NewPasswordMutation>;
export type NewPasswordMutationOptions = Apollo.BaseMutationOptions<NewPasswordMutation, NewPasswordMutationVariables>;
export const ResetPasswordDocument = gql`
mutation ResetPassword($data: ResetPasswordInput!) {
resetPassword(data: $data)
}
`;
export type ResetPasswordMutationFn = Apollo.MutationFunction<ResetPasswordMutation, ResetPasswordMutationVariables>;
/**
* __useResetPasswordMutation__
*
* To run a mutation, you first call `useResetPasswordMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useResetPasswordMutation` 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 [resetPasswordMutation, { data, loading, error }] = useResetPasswordMutation({
* variables: {
* data: // value for 'data'
* },
* });
*/
export function useResetPasswordMutation(baseOptions?: Apollo.MutationHookOptions<ResetPasswordMutation, ResetPasswordMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<ResetPasswordMutation, ResetPasswordMutationVariables>(ResetPasswordDocument, options);
}
export type ResetPasswordMutationHookResult = ReturnType<typeof useResetPasswordMutation>;
export type ResetPasswordMutationResult = Apollo.MutationResult<ResetPasswordMutation>;
export type ResetPasswordMutationOptions = Apollo.BaseMutationOptions<ResetPasswordMutation, ResetPasswordMutationVariables>;
export const VerifyAccountDocument = gql`
mutation VerifyAccount($data: VerificationInput!) {
verifyAccount(data: $data) {
user {
isEmailVerified
}
message
}
}
`;
export type VerifyAccountMutationFn = Apollo.MutationFunction<VerifyAccountMutation, VerifyAccountMutationVariables>;
/**
* __useVerifyAccountMutation__
*
* To run a mutation, you first call `useVerifyAccountMutation` within a React component and pass it any options that fit your needs.
* When your component renders, `useVerifyAccountMutation` 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 [verifyAccountMutation, { data, loading, error }] = useVerifyAccountMutation({
* variables: {
* data: // value for 'data'
* },
* });
*/
export function useVerifyAccountMutation(baseOptions?: Apollo.MutationHookOptions<VerifyAccountMutation, VerifyAccountMutationVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useMutation<VerifyAccountMutation, VerifyAccountMutationVariables>(VerifyAccountDocument, options);
}
export type VerifyAccountMutationHookResult = ReturnType<typeof useVerifyAccountMutation>;
export type VerifyAccountMutationResult = Apollo.MutationResult<VerifyAccountMutation>;
export type VerifyAccountMutationOptions = Apollo.BaseMutationOptions<VerifyAccountMutation, VerifyAccountMutationVariables>;
export const FindRecommendedChannelsDocument = gql`
query FindRecommendedChannels {
findRecommendedChannels {
id
name
avatar
isVerified
stream {
isLive
}
}
}
`;
/**
* __useFindRecommendedChannelsQuery__
*
* To run a query within a React component, call `useFindRecommendedChannelsQuery` and pass it any options that fit your needs.
* When your component renders, `useFindRecommendedChannelsQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useFindRecommendedChannelsQuery({
* variables: {
* },
* });
*/
export function useFindRecommendedChannelsQuery(baseOptions?: Apollo.QueryHookOptions<FindRecommendedChannelsQuery, FindRecommendedChannelsQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useQuery<FindRecommendedChannelsQuery, FindRecommendedChannelsQueryVariables>(FindRecommendedChannelsDocument, options);
}
export function useFindRecommendedChannelsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FindRecommendedChannelsQuery, FindRecommendedChannelsQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useLazyQuery<FindRecommendedChannelsQuery, FindRecommendedChannelsQueryVariables>(FindRecommendedChannelsDocument, options);
}
export function useFindRecommendedChannelsSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions<FindRecommendedChannelsQuery, FindRecommendedChannelsQueryVariables>) {
const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions}
return Apollo.useSuspenseQuery<FindRecommendedChannelsQuery, FindRecommendedChannelsQueryVariables>(FindRecommendedChannelsDocument, options);
}
export type FindRecommendedChannelsQueryHookResult = ReturnType<typeof useFindRecommendedChannelsQuery>;
export type FindRecommendedChannelsLazyQueryHookResult = ReturnType<typeof useFindRecommendedChannelsLazyQuery>;
export type FindRecommendedChannelsSuspenseQueryHookResult = ReturnType<typeof useFindRecommendedChannelsSuspenseQuery>;
export type FindRecommendedChannelsQueryResult = Apollo.QueryResult<FindRecommendedChannelsQuery, FindRecommendedChannelsQueryVariables>;
export const FindChannelByUsernameDocument = gql`
query FindChannelByUsername($name: String!) {
findChannelByUsername(name: $name) {
name
avatar
displayName
stream {
title
}
}
}
`;
/**
* __useFindChannelByUsernameQuery__
*
* To run a query within a React component, call `useFindChannelByUsernameQuery` and pass it any options that fit your needs.
* When your component renders, `useFindChannelByUsernameQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useFindChannelByUsernameQuery({
* variables: {
* name: // value for 'name'
* },
* });
*/
export function useFindChannelByUsernameQuery(baseOptions: Apollo.QueryHookOptions<FindChannelByUsernameQuery, FindChannelByUsernameQueryVariables> & ({ variables: FindChannelByUsernameQueryVariables; skip?: boolean; } | { skip: boolean; }) ) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useQuery<FindChannelByUsernameQuery, FindChannelByUsernameQueryVariables>(FindChannelByUsernameDocument, options);
}
export function useFindChannelByUsernameLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FindChannelByUsernameQuery, FindChannelByUsernameQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useLazyQuery<FindChannelByUsernameQuery, FindChannelByUsernameQueryVariables>(FindChannelByUsernameDocument, options);
}
export function useFindChannelByUsernameSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions<FindChannelByUsernameQuery, FindChannelByUsernameQueryVariables>) {
const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions}
return Apollo.useSuspenseQuery<FindChannelByUsernameQuery, FindChannelByUsernameQueryVariables>(FindChannelByUsernameDocument, options);
}
export type FindChannelByUsernameQueryHookResult = ReturnType<typeof useFindChannelByUsernameQuery>;
export type FindChannelByUsernameLazyQueryHookResult = ReturnType<typeof useFindChannelByUsernameLazyQuery>;
export type FindChannelByUsernameSuspenseQueryHookResult = ReturnType<typeof useFindChannelByUsernameSuspenseQuery>;
export type FindChannelByUsernameQueryResult = Apollo.QueryResult<FindChannelByUsernameQuery, FindChannelByUsernameQueryVariables>;
export const FindNotificationByUserDocument = gql`
query FindNotificationByUser {
findNotificationByUser {
createdAt
id
isRead
text
type
updatedAt
userId
}
}
`;
/**
* __useFindNotificationByUserQuery__
*
* To run a query within a React component, call `useFindNotificationByUserQuery` and pass it any options that fit your needs.
* When your component renders, `useFindNotificationByUserQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useFindNotificationByUserQuery({
* variables: {
* },
* });
*/
export function useFindNotificationByUserQuery(baseOptions?: Apollo.QueryHookOptions<FindNotificationByUserQuery, FindNotificationByUserQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useQuery<FindNotificationByUserQuery, FindNotificationByUserQueryVariables>(FindNotificationByUserDocument, options);
}
export function useFindNotificationByUserLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FindNotificationByUserQuery, FindNotificationByUserQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useLazyQuery<FindNotificationByUserQuery, FindNotificationByUserQueryVariables>(FindNotificationByUserDocument, options);
}
export function useFindNotificationByUserSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions<FindNotificationByUserQuery, FindNotificationByUserQueryVariables>) {
const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions}
return Apollo.useSuspenseQuery<FindNotificationByUserQuery, FindNotificationByUserQueryVariables>(FindNotificationByUserDocument, options);
}
export type FindNotificationByUserQueryHookResult = ReturnType<typeof useFindNotificationByUserQuery>;
export type FindNotificationByUserLazyQueryHookResult = ReturnType<typeof useFindNotificationByUserLazyQuery>;
export type FindNotificationByUserSuspenseQueryHookResult = ReturnType<typeof useFindNotificationByUserSuspenseQuery>;
export type FindNotificationByUserQueryResult = Apollo.QueryResult<FindNotificationByUserQuery, FindNotificationByUserQueryVariables>;
export const FindUnreadNotificationsCountDocument = gql`
query FindUnreadNotificationsCount {
findUnreadNotificationsCount
}
`;
/**
* __useFindUnreadNotificationsCountQuery__
*
* To run a query within a React component, call `useFindUnreadNotificationsCountQuery` and pass it any options that fit your needs.
* When your component renders, `useFindUnreadNotificationsCountQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useFindUnreadNotificationsCountQuery({
* variables: {
* },
* });
*/
export function useFindUnreadNotificationsCountQuery(baseOptions?: Apollo.QueryHookOptions<FindUnreadNotificationsCountQuery, FindUnreadNotificationsCountQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useQuery<FindUnreadNotificationsCountQuery, FindUnreadNotificationsCountQueryVariables>(FindUnreadNotificationsCountDocument, options);
}
export function useFindUnreadNotificationsCountLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FindUnreadNotificationsCountQuery, FindUnreadNotificationsCountQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useLazyQuery<FindUnreadNotificationsCountQuery, FindUnreadNotificationsCountQueryVariables>(FindUnreadNotificationsCountDocument, options);
}
export function useFindUnreadNotificationsCountSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions<FindUnreadNotificationsCountQuery, FindUnreadNotificationsCountQueryVariables>) {
const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions}
return Apollo.useSuspenseQuery<FindUnreadNotificationsCountQuery, FindUnreadNotificationsCountQueryVariables>(FindUnreadNotificationsCountDocument, options);
}
export type FindUnreadNotificationsCountQueryHookResult = ReturnType<typeof useFindUnreadNotificationsCountQuery>;
export type FindUnreadNotificationsCountLazyQueryHookResult = ReturnType<typeof useFindUnreadNotificationsCountLazyQuery>;
export type FindUnreadNotificationsCountSuspenseQueryHookResult = ReturnType<typeof useFindUnreadNotificationsCountSuspenseQuery>;
export type FindUnreadNotificationsCountQueryResult = Apollo.QueryResult<FindUnreadNotificationsCountQuery, FindUnreadNotificationsCountQueryVariables>;
export const FindProfileDocument = gql`
query FindProfile {
findProfile {
avatar
bio
createdAt
email
id
name
updatedAt
isEmailVerified
isTotpEnabled
isVerified
displayName
socialLink {
title
url
position
}
}
}
`;
/**
* __useFindProfileQuery__
*
* To run a query within a React component, call `useFindProfileQuery` and pass it any options that fit your needs.
* When your component renders, `useFindProfileQuery` returns an object from Apollo Client that contains loading, error, and data properties
* you can use to render your UI.
*
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
*
* @example
* const { data, loading, error } = useFindProfileQuery({
* variables: {
* },
* });
*/
export function useFindProfileQuery(baseOptions?: Apollo.QueryHookOptions<FindProfileQuery, FindProfileQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useQuery<FindProfileQuery, FindProfileQueryVariables>(FindProfileDocument, options);
}
export function useFindProfileLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions<FindProfileQuery, FindProfileQueryVariables>) {
const options = {...defaultOptions, ...baseOptions}
return Apollo.useLazyQuery<FindProfileQuery, FindProfileQueryVariables>(FindProfileDocument, options);
}
export function useFindProfileSuspenseQuery(baseOptions?: Apollo.SkipToken | Apollo.SuspenseQueryHookOptions<FindProfileQuery, FindProfileQueryVariables>) {
const options = baseOptions === Apollo.skipToken ? baseOptions : {...defaultOptions, ...baseOptions}
return Apollo.useSuspenseQuery<FindProfileQuery, FindProfileQueryVariables>(FindProfileDocument, options);
}
export type FindProfileQueryHookResult = ReturnType<typeof useFindProfileQuery>;
export type FindProfileLazyQueryHookResult = ReturnType<typeof useFindProfileLazyQuery>;
export type FindProfileSuspenseQueryHookResult = ReturnType<typeof useFindProfileSuspenseQuery>;
export type FindProfileQueryResult = Apollo.QueryResult<FindProfileQuery, FindProfileQueryVariables>;