import { gql } from '@apollo/client'; import * as Apollo from '@apollo/client'; export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; const defaultOptions = {} as const; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: string; String: string; Boolean: boolean; Int: number; Float: number; }; export type App = { __typename?: 'App'; logo?: Maybe; name?: Maybe; privacyPolicyUrl?: Maybe; termsOfServiceUrl?: Maybe; uiUrl?: Maybe; websiteUrl?: Maybe; }; export type CreateTenantInput = { email: Scalars['String']; logo?: InputMaybe; name?: InputMaybe; plan: Scalars['String']; }; export type Mutation = { __typename?: 'Mutation'; createTenantAnonymous: Tenant; /** This will create a new user for a tenant. */ createUsers: Array; deleteUser: Scalars['Boolean']; sendPasswordResetLink: Scalars['Boolean']; updateTenant: Tenant; /** Update the user. You can change role, teams and also enable or disable the user from logging in. */ updateUser: User; }; export type MutationCreateTenantAnonymousArgs = { tenant: CreateTenantInput; }; export type MutationCreateUsersArgs = { userNames: Array; }; export type MutationDeleteUserArgs = { userId: Scalars['String']; }; export type MutationSendPasswordResetLinkArgs = { userId: Scalars['String']; }; export type MutationUpdateTenantArgs = { tenant: TenantInput; }; export type MutationUpdateUserArgs = { user: UserInput; }; export type Query = { __typename?: 'Query'; /** Gets useful App configs for the UI to consume */ getAppAnonymous: App; /** Obtain an short lived session url to redirect or present the user its Stripe subscription panel for updating payment or subscription data. */ getCustomerPortal: Scalars['String']; /** Gets a single tenant */ getTenant: Tenant; getTenantAnonymous: TenantAnonymous; /** Lists all tenants */ listTenants: Array; /** List all available user roles that the current user can assign others */ listUserRoles: Array; /** List all users in this tenant. */ listUsers: Array; }; export type Tenant = { __typename?: 'Tenant'; createdAt?: Maybe; id: Scalars['String']; locale?: Maybe; logo: Scalars['String']; mfa?: Maybe; name: Scalars['String']; plan?: Maybe; }; export type TenantAnonymous = { __typename?: 'TenantAnonymous'; id: Scalars['String']; locale?: Maybe; name?: Maybe; }; export type TenantInput = { locale?: InputMaybe; mfa?: InputMaybe; name?: InputMaybe; }; export type User = { __typename?: 'User'; createdAt?: Maybe; email?: Maybe; enabled?: Maybe; fullName?: Maybe; id: Scalars['String']; onboarded?: Maybe; role?: Maybe; teams?: Maybe>; username?: Maybe; }; export type UserInput = { enabled?: InputMaybe; id: Scalars['String']; role?: InputMaybe; }; export type GetCustomerPortalQueryVariables = Exact<{ [key: string]: never; }>; export type GetCustomerPortalQuery = { __typename?: 'Query', getCustomerPortal: string }; export type GetTenantQueryVariables = Exact<{ [key: string]: never; }>; export type GetTenantQuery = { __typename?: 'Query', getTenant: { __typename?: 'Tenant', id: string, name: string, locale?: string | null, logo: string, plan?: string | null, mfa?: boolean | null, createdAt?: string | null } }; export type UpdateTenantMutationVariables = Exact<{ tenant: TenantInput; }>; export type UpdateTenantMutation = { __typename?: 'Mutation', updateTenant: { __typename?: 'Tenant', id: string, name: string, locale?: string | null, logo: string, plan?: string | null, mfa?: boolean | null, createdAt?: string | null } }; export type CreateUsersMutationVariables = Exact<{ userNames: Array | Scalars['String']; }>; export type CreateUsersMutation = { __typename?: 'Mutation', createUsers: Array<{ __typename?: 'User', id: string, fullName?: string | null, email?: string | null, username?: string | null, createdAt?: string | null, onboarded?: boolean | null, enabled?: boolean | null, role?: string | null, teams?: Array | null }> }; export type DeleteUserMutationVariables = Exact<{ userId: Scalars['String']; }>; export type DeleteUserMutation = { __typename?: 'Mutation', deleteUser: boolean }; export type ListUserRolesQueryVariables = Exact<{ [key: string]: never; }>; export type ListUserRolesQuery = { __typename?: 'Query', listUserRoles: Array }; export type ListUsersQueryVariables = Exact<{ [key: string]: never; }>; export type ListUsersQuery = { __typename?: 'Query', listUsers: Array<{ __typename?: 'User', id: string, fullName?: string | null, email?: string | null, username?: string | null, createdAt?: string | null, onboarded?: boolean | null, enabled?: boolean | null, role?: string | null, teams?: Array | null }> }; export type SendPasswordResetLinkMutationVariables = Exact<{ userId: Scalars['String']; }>; export type SendPasswordResetLinkMutation = { __typename?: 'Mutation', sendPasswordResetLink: boolean }; export type UpdateUserMutationVariables = Exact<{ user: UserInput; }>; export type UpdateUserMutation = { __typename?: 'Mutation', updateUser: { __typename?: 'User', id: string, fullName?: string | null, email?: string | null, username?: string | null, createdAt?: string | null, onboarded?: boolean | null, enabled?: boolean | null, role?: string | null, teams?: Array | null } }; export type GetAppAnonymousQueryVariables = Exact<{ [key: string]: never; }>; export type GetAppAnonymousQuery = { __typename?: 'Query', getAppAnonymous: { __typename?: 'App', name?: string | null, logo?: string | null, privacyPolicyUrl?: string | null, termsOfServiceUrl?: string | null } }; export const GetCustomerPortalDocument = gql` query GetCustomerPortal { getCustomerPortal } `; /** * __useGetCustomerPortalQuery__ * * To run a query within a React component, call `useGetCustomerPortalQuery` and pass it any options that fit your needs. * When your component renders, `useGetCustomerPortalQuery` 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 } = useGetCustomerPortalQuery({ * variables: { * }, * }); */ export function useGetCustomerPortalQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useQuery(GetCustomerPortalDocument, options); } export function useGetCustomerPortalLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useLazyQuery(GetCustomerPortalDocument, options); } export type GetCustomerPortalQueryHookResult = ReturnType; export type GetCustomerPortalLazyQueryHookResult = ReturnType; export type GetCustomerPortalQueryResult = Apollo.QueryResult; export const GetTenantDocument = gql` query GetTenant { getTenant { id name locale logo plan mfa createdAt } } `; /** * __useGetTenantQuery__ * * To run a query within a React component, call `useGetTenantQuery` and pass it any options that fit your needs. * When your component renders, `useGetTenantQuery` 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 } = useGetTenantQuery({ * variables: { * }, * }); */ export function useGetTenantQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useQuery(GetTenantDocument, options); } export function useGetTenantLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useLazyQuery(GetTenantDocument, options); } export type GetTenantQueryHookResult = ReturnType; export type GetTenantLazyQueryHookResult = ReturnType; export type GetTenantQueryResult = Apollo.QueryResult; export const UpdateTenantDocument = gql` mutation UpdateTenant($tenant: TenantInput!) { updateTenant(tenant: $tenant) { id name locale logo plan mfa createdAt } } `; export type UpdateTenantMutationFn = Apollo.MutationFunction; /** * __useUpdateTenantMutation__ * * To run a mutation, you first call `useUpdateTenantMutation` within a React component and pass it any options that fit your needs. * When your component renders, `useUpdateTenantMutation` 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 [updateTenantMutation, { data, loading, error }] = useUpdateTenantMutation({ * variables: { * tenant: // value for 'tenant' * }, * }); */ export function useUpdateTenantMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useMutation(UpdateTenantDocument, options); } export type UpdateTenantMutationHookResult = ReturnType; export type UpdateTenantMutationResult = Apollo.MutationResult; export type UpdateTenantMutationOptions = Apollo.BaseMutationOptions; export const CreateUsersDocument = gql` mutation CreateUsers($userNames: [String!]!) { createUsers(userNames: $userNames) { id fullName email username createdAt onboarded enabled role teams } } `; export type CreateUsersMutationFn = Apollo.MutationFunction; /** * __useCreateUsersMutation__ * * To run a mutation, you first call `useCreateUsersMutation` within a React component and pass it any options that fit your needs. * When your component renders, `useCreateUsersMutation` 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 [createUsersMutation, { data, loading, error }] = useCreateUsersMutation({ * variables: { * userNames: // value for 'userNames' * }, * }); */ export function useCreateUsersMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useMutation(CreateUsersDocument, options); } export type CreateUsersMutationHookResult = ReturnType; export type CreateUsersMutationResult = Apollo.MutationResult; export type CreateUsersMutationOptions = Apollo.BaseMutationOptions; export const DeleteUserDocument = gql` mutation DeleteUser($userId: String!) { deleteUser(userId: $userId) } `; export type DeleteUserMutationFn = Apollo.MutationFunction; /** * __useDeleteUserMutation__ * * To run a mutation, you first call `useDeleteUserMutation` within a React component and pass it any options that fit your needs. * When your component renders, `useDeleteUserMutation` 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 [deleteUserMutation, { data, loading, error }] = useDeleteUserMutation({ * variables: { * userId: // value for 'userId' * }, * }); */ export function useDeleteUserMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useMutation(DeleteUserDocument, options); } export type DeleteUserMutationHookResult = ReturnType; export type DeleteUserMutationResult = Apollo.MutationResult; export type DeleteUserMutationOptions = Apollo.BaseMutationOptions; export const ListUserRolesDocument = gql` query ListUserRoles { listUserRoles } `; /** * __useListUserRolesQuery__ * * To run a query within a React component, call `useListUserRolesQuery` and pass it any options that fit your needs. * When your component renders, `useListUserRolesQuery` 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 } = useListUserRolesQuery({ * variables: { * }, * }); */ export function useListUserRolesQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useQuery(ListUserRolesDocument, options); } export function useListUserRolesLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useLazyQuery(ListUserRolesDocument, options); } export type ListUserRolesQueryHookResult = ReturnType; export type ListUserRolesLazyQueryHookResult = ReturnType; export type ListUserRolesQueryResult = Apollo.QueryResult; export const ListUsersDocument = gql` query ListUsers { listUsers { id fullName email username createdAt onboarded enabled role teams } } `; /** * __useListUsersQuery__ * * To run a query within a React component, call `useListUsersQuery` and pass it any options that fit your needs. * When your component renders, `useListUsersQuery` 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 } = useListUsersQuery({ * variables: { * }, * }); */ export function useListUsersQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useQuery(ListUsersDocument, options); } export function useListUsersLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useLazyQuery(ListUsersDocument, options); } export type ListUsersQueryHookResult = ReturnType; export type ListUsersLazyQueryHookResult = ReturnType; export type ListUsersQueryResult = Apollo.QueryResult; export const SendPasswordResetLinkDocument = gql` mutation SendPasswordResetLink($userId: String!) { sendPasswordResetLink(userId: $userId) } `; export type SendPasswordResetLinkMutationFn = Apollo.MutationFunction; /** * __useSendPasswordResetLinkMutation__ * * To run a mutation, you first call `useSendPasswordResetLinkMutation` within a React component and pass it any options that fit your needs. * When your component renders, `useSendPasswordResetLinkMutation` 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 [sendPasswordResetLinkMutation, { data, loading, error }] = useSendPasswordResetLinkMutation({ * variables: { * userId: // value for 'userId' * }, * }); */ export function useSendPasswordResetLinkMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useMutation(SendPasswordResetLinkDocument, options); } export type SendPasswordResetLinkMutationHookResult = ReturnType; export type SendPasswordResetLinkMutationResult = Apollo.MutationResult; export type SendPasswordResetLinkMutationOptions = Apollo.BaseMutationOptions; export const UpdateUserDocument = gql` mutation UpdateUser($user: UserInput!) { updateUser(user: $user) { id fullName email username createdAt onboarded enabled role teams } } `; export type UpdateUserMutationFn = Apollo.MutationFunction; /** * __useUpdateUserMutation__ * * To run a mutation, you first call `useUpdateUserMutation` within a React component and pass it any options that fit your needs. * When your component renders, `useUpdateUserMutation` 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 [updateUserMutation, { data, loading, error }] = useUpdateUserMutation({ * variables: { * user: // value for 'user' * }, * }); */ export function useUpdateUserMutation(baseOptions?: Apollo.MutationHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useMutation(UpdateUserDocument, options); } export type UpdateUserMutationHookResult = ReturnType; export type UpdateUserMutationResult = Apollo.MutationResult; export type UpdateUserMutationOptions = Apollo.BaseMutationOptions; export const GetAppAnonymousDocument = gql` query GetAppAnonymous { getAppAnonymous { name logo privacyPolicyUrl termsOfServiceUrl } } `; /** * __useGetAppAnonymousQuery__ * * To run a query within a React component, call `useGetAppAnonymousQuery` and pass it any options that fit your needs. * When your component renders, `useGetAppAnonymousQuery` 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 } = useGetAppAnonymousQuery({ * variables: { * }, * }); */ export function useGetAppAnonymousQuery(baseOptions?: Apollo.QueryHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useQuery(GetAppAnonymousDocument, options); } export function useGetAppAnonymousLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { const options = {...defaultOptions, ...baseOptions} return Apollo.useLazyQuery(GetAppAnonymousDocument, options); } export type GetAppAnonymousQueryHookResult = ReturnType; export type GetAppAnonymousLazyQueryHookResult = ReturnType; export type GetAppAnonymousQueryResult = Apollo.QueryResult;