From 9c7b1c1fcf92cf61df43cd51d391fcfcd505090f Mon Sep 17 00:00:00 2001 From: Siddharth Date: Thu, 19 Oct 2023 04:40:44 +0530 Subject: [PATCH 1/7] feat: adding email verification rebase --- apps/dashboard/app/profile/page.tsx | 18 + .../email/add-email-modal.tsx | 173 + .../profile-settings/email/email.tsx | 62 + .../profile-settings/email/verify-modal.tsx | 144 + .../profile-settings/server-actions.ts | 104 + .../components/profile-settings/totp.tsx | 40 + apps/dashboard/components/side-bar.tsx | 176 - apps/dashboard/components/side-bar/index.tsx | 103 + .../components/side-bar/navigation-links.tsx | 50 + .../components/side-bar/side-bar-overlay.tsx | 26 + .../components/side-bar/side-bar-style.tsx | 18 + apps/dashboard/next.config.js | 11 +- apps/dashboard/services/graphql/generated.ts | 4855 ++++++----------- .../services/graphql/mutations/email.ts | 133 + .../services/graphql/mutations/totp.ts | 87 + .../services/graphql/queries/me-data.ts | 6 + 16 files changed, 2566 insertions(+), 3440 deletions(-) create mode 100644 apps/dashboard/app/profile/page.tsx create mode 100644 apps/dashboard/components/profile-settings/email/add-email-modal.tsx create mode 100644 apps/dashboard/components/profile-settings/email/email.tsx create mode 100644 apps/dashboard/components/profile-settings/email/verify-modal.tsx create mode 100644 apps/dashboard/components/profile-settings/server-actions.ts create mode 100644 apps/dashboard/components/profile-settings/totp.tsx delete mode 100644 apps/dashboard/components/side-bar.tsx create mode 100644 apps/dashboard/components/side-bar/index.tsx create mode 100644 apps/dashboard/components/side-bar/navigation-links.tsx create mode 100644 apps/dashboard/components/side-bar/side-bar-overlay.tsx create mode 100644 apps/dashboard/components/side-bar/side-bar-style.tsx create mode 100644 apps/dashboard/services/graphql/mutations/email.ts create mode 100644 apps/dashboard/services/graphql/mutations/totp.ts diff --git a/apps/dashboard/app/profile/page.tsx b/apps/dashboard/app/profile/page.tsx new file mode 100644 index 0000000000..f6e3b6ff24 --- /dev/null +++ b/apps/dashboard/app/profile/page.tsx @@ -0,0 +1,18 @@ +import { getServerSession } from "next-auth"; +import { authOptions } from "./../api/auth/[...nextauth]/route"; +import ContentContainer from "@/components/content-container"; +import { Box } from "@mui/joy"; +import EnableEmail from "@/components/profile-settings/email/email"; + +export default async function Home() { + const session = await getServerSession(authOptions); + const totpEnabled = session?.userData.data.me?.totpEnabled; + const email = session?.userData.data.me?.email; + return ( +
+ + + +
+ ); +} \ No newline at end of file diff --git a/apps/dashboard/components/profile-settings/email/add-email-modal.tsx b/apps/dashboard/components/profile-settings/email/add-email-modal.tsx new file mode 100644 index 0000000000..29ffaf858b --- /dev/null +++ b/apps/dashboard/components/profile-settings/email/add-email-modal.tsx @@ -0,0 +1,173 @@ +"use client"; +// Import statements +import React from "react"; +import { + Box, + Button, + CircularProgress, + Input, + Modal, + Sheet, + Typography, +} from "@mui/joy"; +import { + emailRegisterInitiateServerAction, + emailRegisterValidateServerAction, +} from "./../server-actions"; +// @ts-ignore +import { experimental_useFormState as useFormState } from "react-dom"; +// @ts-ignore +import { experimental_useFormStatus as useFormStatus } from "react-dom"; + +type emailDataProps = { + readonly address?: string | null | undefined; + readonly verified?: boolean | null | undefined; + modalOpen: boolean; + setModalOpen: (modalOpen: boolean) => void; +}; + +function EnableEmailModal({ + address, + verified, + modalOpen, + setModalOpen, +}: emailDataProps) { + const { pending } = useFormStatus(); + const [initiateState, initiateFormAction] = useFormState( + emailRegisterInitiateServerAction, + null + ); + const [validateState, validateFormAction] = useFormState( + emailRegisterValidateServerAction, + null + ); + + const handleClose = (event: React.SyntheticEvent, reason: string) => { + if (reason === "backdropClick") { + event.stopPropagation(); + return; + } + + setModalOpen(false); + }; + + return ( + + + {address && !verified && initiateState?.message !== "success" ? ( +
+ {pending ? ( + + ) : ( + <> + + Email Confirmation + + A code will be sent to your email {address} + + + + + + + )} + + ) : initiateState?.message === "success" ? ( +
+ {pending ? ( + + ) : ( + <> + + Validation Code + + + + + + + + + )} + + ) : ( +
+ {pending ? ( + + ) : ( + <> + + Email Entry + + Enter your Email Id + + + + + + + )} + + )} +
+
+ ); +} + +export default EnableEmailModal; diff --git a/apps/dashboard/components/profile-settings/email/email.tsx b/apps/dashboard/components/profile-settings/email/email.tsx new file mode 100644 index 0000000000..670df08098 --- /dev/null +++ b/apps/dashboard/components/profile-settings/email/email.tsx @@ -0,0 +1,62 @@ +"use client"; +import React, { useState } from "react"; +import { Button, Typography } from "@mui/joy"; +import AddEmailModal from "./add-email-modal"; +import VerifyModal from "./verify-modal"; + +import { Box } from "@mui/joy"; + +type EmailDataProps = { + readonly address?: string | null | undefined; + readonly verified?: boolean | null | undefined; +}; + +function EnableEmail({ address, verified }: EmailDataProps) { + const [modalOpen, setModalOpen] = useState(false); + console.log(address, verified); + return ( + + Email Address + <> + {verified ? ( + <>{address} + ) : address ? ( + <> + + + + ) : ( + <> + + + )} + + + ); +} + +export default EnableEmail; diff --git a/apps/dashboard/components/profile-settings/email/verify-modal.tsx b/apps/dashboard/components/profile-settings/email/verify-modal.tsx new file mode 100644 index 0000000000..daab952d0e --- /dev/null +++ b/apps/dashboard/components/profile-settings/email/verify-modal.tsx @@ -0,0 +1,144 @@ +"use client"; +// Import statements +import React from "react"; +import { + Box, + Button, + CircularProgress, + Input, + Modal, + Sheet, + Typography, +} from "@mui/joy"; +import { + emailRegisterInitiateServerAction, + emailRegisterValidateServerAction, +} from "./../server-actions"; +// @ts-ignore +import { experimental_useFormState as useFormState } from "react-dom"; +// @ts-ignore +import { experimental_useFormStatus as useFormStatus } from "react-dom"; +import { useRouter } from "next/navigation"; +import { revalidatePath } from "next/cache"; + +type emailDataProps = { + readonly address?: string | null | undefined; + readonly verified?: boolean | null | undefined; + modalOpen: boolean; + setModalOpen: (modalOpen: boolean) => void; +}; + +function EnableEmailModal({ + address, + verified, + modalOpen, + setModalOpen, +}: emailDataProps) { + const { pending } = useFormStatus(); + const router = useRouter(); + const [initiateState, initiateFormAction] = useFormState( + emailRegisterInitiateServerAction, + null + ); + const [validateState, validateFormAction] = useFormState( + emailRegisterValidateServerAction, + null + ); + + const handleClose = (event: React.SyntheticEvent, reason: string) => { + if (reason === "backdropClick") { + event.stopPropagation(); + return; + } + revalidatePath("/profile", "page"); + }; + + return initiateState?.message === "success" ? ( +
+ {pending ? ( + + ) : ( + <> + + Validation Code + + + + + + + + + )} + + ) : address ? ( + + +
+ {pending ? ( + + ) : ( + <> + + Email Confirmation + + A code will be sent to your email {address} + + + + + + + )} + +
+
+ ) : null; +} + +export default EnableEmailModal; diff --git a/apps/dashboard/components/profile-settings/server-actions.ts b/apps/dashboard/components/profile-settings/server-actions.ts new file mode 100644 index 0000000000..8d85422910 --- /dev/null +++ b/apps/dashboard/components/profile-settings/server-actions.ts @@ -0,0 +1,104 @@ +"use server"; +import { authOptions } from "@/app/api/auth/[...nextauth]/route"; +import { + deleteEmail, + emailRegistrationInitiate, + emailRegistrationValidate, +} from "@/services/graphql/mutations/email"; +import { from } from "@apollo/client"; +import { getServerSession } from "next-auth"; +import { revalidatePath } from "next/cache"; +import { redirect } from "next/navigation"; +import { useFormState } from "react-dom"; + +export const emailRegisterInitiateServerAction = async ( + _prevState: unknown, + form: FormData +) => { + const email = form.get("email"); + if (!email || typeof email !== "string") { + return { + error: true, + message: "Invalid Email", + data: null, + }; + } + + const session = await getServerSession(authOptions); + const token = session?.accessToken; + if (!token && typeof token !== "string") { + return { + error: true, + message: "Invalid Token", + data: null, + }; + } + + if ( + session?.userData.data.me?.email?.address && + !session?.userData.data.me?.email?.verified + ) { + await deleteEmail(token); + } + + const data = await emailRegistrationInitiate(email, token); + if (data instanceof Error) { + return { + error: true, + message: data.message, + data: null, + }; + } + + revalidatePath("/"); + return { + error: false, + message: "success", + data: data, + }; +}; + +export const emailRegisterValidateServerAction = async ( + _prevState: unknown, + form: FormData +) => { + const code = form.get("code"); + const emailRegistrationId = form.get("emailRegistrationId"); + if ( + !code || + !emailRegistrationId || + typeof code !== "string" || + typeof emailRegistrationId !== "string" + ) { + return { + error: true, + message: "Invalid values", + data: null, + }; + } + + const session = await getServerSession(authOptions); + const token = session?.accessToken; + if (!token && typeof token !== "string") { + return { + error: true, + message: "Invalid Token", + data: null, + }; + } + + const data = await emailRegistrationValidate( + code, + emailRegistrationId, + token + ); + if (data instanceof Error) { + return { + error: true, + message: data.message, + data: null, + }; + } + + redirect("/profile"); +}; diff --git a/apps/dashboard/components/profile-settings/totp.tsx b/apps/dashboard/components/profile-settings/totp.tsx new file mode 100644 index 0000000000..b1d61f9b97 --- /dev/null +++ b/apps/dashboard/components/profile-settings/totp.tsx @@ -0,0 +1,40 @@ +// "use client"; +// import React, { useState } from "react"; +// import { Box, Button, Modal } from "@mui/joy"; +// import { totpInitiateServerAction } from "./server-actions"; +// import { useFormState, useFormStatus } from "react-dom"; + +// function EnableTotp() { +// const [modalOpen, setModalOpen] = useState(false); +// const [responseData, setResponseData] = useState({ +// error: false, +// message: "null", +// data: null, +// }); + +// const handleClick = async () => { +// const response = await totpInitiateServerAction(); +// if (response.error || !response.data) { +// return; +// } +// setResponseData(response?.data); +// }; + +// return ( +// <> +// {responseData.message === "success" && ( +// setModalOpen(false)} +// aria-labelledby="modal-modal-title" +// aria-describedby="modal-modal-description" +// > +// {responseData.message} +// +// )} +// +// +// ); +// } + +// export default EnableTotp; diff --git a/apps/dashboard/components/side-bar.tsx b/apps/dashboard/components/side-bar.tsx deleted file mode 100644 index cc74febbc6..0000000000 --- a/apps/dashboard/components/side-bar.tsx +++ /dev/null @@ -1,176 +0,0 @@ -"use client" -import GlobalStyles from "@mui/joy/GlobalStyles" -import Box from "@mui/joy/Box" -import List from "@mui/joy/List" -import ListItem from "@mui/joy/ListItem" -import ListItemButton, { listItemButtonClasses } from "@mui/joy/ListItemButton" -import Sheet from "@mui/joy/Sheet" -import Divider from "@mui/material/Divider" -import Link from "next/link" -import ReceiptLongIcon from "@mui/icons-material/ReceiptLong" -import HomeOutlinedIcon from "@mui/icons-material/HomeOutlined" -import { Typography } from "@mui/joy" -import { usePathname } from "next/navigation" - -import Logo from "./logo" -import { closeSidebar } from "./utils" - -export default function Sidebar() { - const path = usePathname() - const isCurrentPath = (href: string) => path === href - return ( - - ({ - ":root": { - "--Sidebar-width": "220px", - [theme.breakpoints.up("lg")]: { - "--Sidebar-width": "240px", - }, - }, - ".Sidebar-overlay": { - backdropFilter: "blur(10px)", - }, - })} - /> - closeSidebar()} - /> - - - - - - - - - { - closeSidebar() - }} - sx={{ - "backgroundColor": isCurrentPath("/") - ? "rgba(0, 0, 0, 0.08)" - : "transparent", - "&:hover": { - backgroundColor: "rgba(0, 0, 0, 0.08)", - }, - "&::before": { - content: isCurrentPath("/") ? '""' : "none", - position: "absolute", - top: 0, - left: 0, - width: "4px", - height: "100%", - backgroundColor: "var(--primaryColor)", - }, - }} - > - - Home - - - - - - { - closeSidebar() - }} - sx={{ - "backgroundColor": isCurrentPath("/transactions") - ? "rgba(0, 0, 0, 0.08)" - : "transparent", - "&:hover": { - backgroundColor: "rgba(0, 0, 0, 0.08)", - }, - "&::before": { - content: isCurrentPath("/transactions") ? '""' : "none", - position: "absolute", - top: 0, - left: 0, - width: "4px", - height: "100%", - backgroundColor: "var(--primaryColor)", - }, - }} - > - - Transactions - - - - - - - ) -} diff --git a/apps/dashboard/components/side-bar/index.tsx b/apps/dashboard/components/side-bar/index.tsx new file mode 100644 index 0000000000..fc8628cc46 --- /dev/null +++ b/apps/dashboard/components/side-bar/index.tsx @@ -0,0 +1,103 @@ +"use client"; +import React from "react"; +import Box from "@mui/joy/Box"; +import List from "@mui/joy/List"; +import Sheet from "@mui/joy/Sheet"; +import Divider from "@mui/material/Divider"; +import ReceiptLongIcon from "@mui/icons-material/ReceiptLong"; +import HomeOutlinedIcon from "@mui/icons-material/HomeOutlined"; +import { usePathname } from "next/navigation"; +import Logo from "./../logo"; +import { SidebarStyles } from "./side-bar-style"; +import { SidebarOverlay } from "./side-bar-overlay"; +import { NavigationLink } from "./navigation-links"; +import SettingsIcon from "@mui/icons-material/Settings"; + +const Sidebar: React.FC = () => { + const path = usePathname(); + const isCurrentPath = (href: string): boolean => path === href; + + return ( + + + + + + + + + + } + label="Home" + isCurrentPath={isCurrentPath} + /> + } + label="Transactions" + isCurrentPath={isCurrentPath} + /> + } + label="Profile" + isCurrentPath={isCurrentPath} + /> + + + + ); +}; + +export default Sidebar; diff --git a/apps/dashboard/components/side-bar/navigation-links.tsx b/apps/dashboard/components/side-bar/navigation-links.tsx new file mode 100644 index 0000000000..96b3620763 --- /dev/null +++ b/apps/dashboard/components/side-bar/navigation-links.tsx @@ -0,0 +1,50 @@ +import React from "react"; +import Link from "next/link"; +import ListItem from "@mui/joy/ListItem"; +import ListItemButton from "@mui/joy/ListItemButton"; +import { Typography } from "@mui/joy"; +import { closeSidebar } from "./../utils"; + +interface NavigationLinkProps { + href: string; + icon: React.ReactElement; + label: string; + isCurrentPath: (href: string) => boolean; +} + +export const NavigationLink: React.FC = ({ + href, + icon, + label, + isCurrentPath, +}) => ( + + + { + closeSidebar(); + }} + sx={{ + backgroundColor: isCurrentPath(href) + ? "rgba(0, 0, 0, 0.08)" + : "transparent", + "&:hover": { + backgroundColor: "rgba(0, 0, 0, 0.08)", + }, + "&::before": { + content: isCurrentPath(href) ? '""' : "none", + position: "absolute", + top: 0, + left: 0, + width: "4px", + height: "100%", + backgroundColor: "var(--primaryColor)", + }, + }} + > + {icon} + {label} + + + +); diff --git a/apps/dashboard/components/side-bar/side-bar-overlay.tsx b/apps/dashboard/components/side-bar/side-bar-overlay.tsx new file mode 100644 index 0000000000..e5b3a0253f --- /dev/null +++ b/apps/dashboard/components/side-bar/side-bar-overlay.tsx @@ -0,0 +1,26 @@ +import React from "react"; +import Box from "@mui/joy/Box"; +import { closeSidebar } from "./../utils"; + +export const SidebarOverlay: React.FC = () => ( + closeSidebar()} + /> +); diff --git a/apps/dashboard/components/side-bar/side-bar-style.tsx b/apps/dashboard/components/side-bar/side-bar-style.tsx new file mode 100644 index 0000000000..3026545e72 --- /dev/null +++ b/apps/dashboard/components/side-bar/side-bar-style.tsx @@ -0,0 +1,18 @@ +import React from "react"; +import GlobalStyles from "@mui/joy/GlobalStyles"; + +export const SidebarStyles: React.FC = () => ( + ({ + ":root": { + "--Sidebar-width": "220px", + [theme.breakpoints.up("lg")]: { + "--Sidebar-width": "240px", + }, + }, + ".Sidebar-overlay": { + backdropFilter: "blur(10px)", + }, + })} + /> +); diff --git a/apps/dashboard/next.config.js b/apps/dashboard/next.config.js index 3d65fb4e50..a37a9b7cdc 100644 --- a/apps/dashboard/next.config.js +++ b/apps/dashboard/next.config.js @@ -1,9 +1,10 @@ /** @type {import('next').NextConfig} */ - -module.exports = { +const nextConfig = { experimental: { - outputFileTracingRoot: require('path').join(__dirname, '../../'), serverActions: true, + outputFileTracingRoot: require("path").join(__dirname, "../../"), }, - output: 'standalone', -}; + output: "standalone", +} + +module.exports = nextConfig diff --git a/apps/dashboard/services/graphql/generated.ts b/apps/dashboard/services/graphql/generated.ts index 99fad80488..2b80e0724f 100644 --- a/apps/dashboard/services/graphql/generated.ts +++ b/apps/dashboard/services/graphql/generated.ts @@ -1,115 +1,96 @@ // this file is autogenerated by codegen /* eslint-disable */ -import { - GraphQLResolveInfo, - GraphQLScalarType, - GraphQLScalarTypeConfig, -} from "graphql"; -import { gql } from "@apollo/client"; -import * as Apollo from "@apollo/client"; +import { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql'; +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; -}; -export type MakeEmpty< - T extends { [key: string]: unknown }, - K extends keyof T, -> = { [_ in K]?: never }; -export type Incremental = - | T - | { - [P in keyof T]?: P extends " $fragmentName" | "__typename" ? T[P] : never; - }; +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 }; +export type MakeEmpty = { [_ in K]?: never }; +export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type Omit = Pick>; -export type RequireFields = Omit & { - [P in K]-?: NonNullable; -}; +export type RequireFields = Omit & { [P in K]-?: NonNullable }; 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 }; + 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; } /** An Opaque Bearer token */ - AuthToken: { input: string; output: string }; + AuthToken: { input: string; output: string; } /** (Positive) Cent amount (1/100 of a dollar) */ - CentAmount: { input: number; output: number }; + CentAmount: { input: number; output: number; } /** An alias name that a user can set for a wallet (with which they have transactions) */ - ContactAlias: { input: string; output: string }; + ContactAlias: { input: string; output: string; } /** A CCA2 country code (ex US, FR, etc) */ - CountryCode: { input: string; output: string }; + CountryCode: { input: string; output: string; } /** Display currency of an account */ - DisplayCurrency: { input: string; output: string }; + DisplayCurrency: { input: string; output: string; } /** Email address */ - EmailAddress: { input: string; output: string }; + EmailAddress: { input: string; output: string; } /** An id to be passed between registrationInitiate and registrationValidate for confirming email */ - EmailRegistrationId: { input: string; output: string }; - EndpointId: { input: string; output: string }; + EmailRegistrationId: { input: string; output: string; } + EndpointId: { input: string; output: string; } /** Url that will be fetched on events for the account */ - EndpointUrl: { input: string; output: string }; + EndpointUrl: { input: string; output: string; } /** Feedback shared with our user */ - Feedback: { input: string; output: string }; + Feedback: { input: string; output: string; } /** Hex-encoded string of 32 bytes */ - Hex32Bytes: { input: string; output: string }; - Language: { input: string; output: string }; - LeaderboardName: { input: string; output: string }; - LnPaymentPreImage: { input: string; output: string }; + Hex32Bytes: { input: string; output: string; } + Language: { input: string; output: string; } + LeaderboardName: { input: string; output: string; } + LnPaymentPreImage: { input: string; output: string; } /** BOLT11 lightning invoice payment request with the amount included */ - LnPaymentRequest: { input: string; output: string }; - LnPaymentSecret: { input: string; output: string }; + LnPaymentRequest: { input: string; output: string; } + LnPaymentSecret: { input: string; output: string; } /** Text field in a lightning payment transaction */ - Memo: { input: string; output: string }; + Memo: { input: string; output: string; } /** (Positive) amount of minutes */ - Minutes: { input: string; output: string }; - NotificationCategory: { input: string; output: string }; + Minutes: { input: string; output: string; } + NotificationCategory: { input: string; output: string; } /** An address for an on-chain bitcoin destination */ - OnChainAddress: { input: string; output: string }; - OnChainTxHash: { input: string; output: string }; + OnChainAddress: { input: string; output: string; } + OnChainTxHash: { input: string; output: string; } /** An authentication code valid for a single use */ - OneTimeAuthCode: { input: string; output: string }; - PaymentHash: { input: string; output: string }; + OneTimeAuthCode: { input: string; output: string; } + PaymentHash: { input: string; output: string; } /** Phone number which includes country code */ - Phone: { input: string; output: string }; + Phone: { input: string; output: string; } /** Non-fractional signed whole numeric value between -(2^53) + 1 and 2^53 - 1 */ - SafeInt: { input: number; output: number }; + SafeInt: { input: number; output: number; } /** (Positive) Satoshi amount */ - SatAmount: { input: number; output: number }; + SatAmount: { input: number; output: number; } /** (Positive) amount of seconds */ - Seconds: { input: number; output: number }; + Seconds: { input: number; output: number; } /** An amount (of a currency) that can be negative (e.g. in a transaction) */ - SignedAmount: { input: number; output: number }; + SignedAmount: { input: number; output: number; } /** A string amount (of a currency) that can be negative (e.g. in a transaction) */ - SignedDisplayMajorAmount: { input: string; output: string }; + SignedDisplayMajorAmount: { input: string; output: string; } /** Timestamp field, serialized as Unix time (the number of seconds since the Unix epoch) */ - Timestamp: { input: number; output: number }; + Timestamp: { input: number; output: number; } /** A time-based one-time password */ - TotpCode: { input: string; output: string }; + TotpCode: { input: string; output: string; } /** An id to be passed between set and verify for confirming totp */ - TotpRegistrationId: { input: string; output: string }; + TotpRegistrationId: { input: string; output: string; } /** A secret to generate time-based one-time password */ - TotpSecret: { input: string; output: string }; + TotpSecret: { input: string; output: string; } /** Unique identifier of a user */ - Username: { input: string; output: string }; + Username: { input: string; output: string; } /** Unique identifier of a wallet */ - WalletId: { input: string; output: string }; - _FieldSet: { input: string; output: string }; + WalletId: { input: string; output: string; } + _FieldSet: { input: string; output: string; } }; export type Account = { readonly callbackEndpoints: ReadonlyArray; - readonly csvTransactions: Scalars["String"]["output"]; - readonly defaultWalletId: Scalars["WalletId"]["output"]; - readonly displayCurrency: Scalars["DisplayCurrency"]["output"]; - readonly id: Scalars["ID"]["output"]; + readonly csvTransactions: Scalars['String']['output']; + readonly defaultWalletId: Scalars['WalletId']['output']; + readonly displayCurrency: Scalars['DisplayCurrency']['output']; + readonly id: Scalars['ID']['output']; readonly level: AccountLevel; readonly limits: AccountLimits; readonly notificationSettings: NotificationSettings; @@ -118,28 +99,28 @@ export type Account = { readonly wallets: ReadonlyArray; }; + export type AccountCsvTransactionsArgs = { - walletIds: ReadonlyArray; + walletIds: ReadonlyArray; }; + export type AccountTransactionsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; - walletIds?: InputMaybe< - ReadonlyArray> - >; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + walletIds?: InputMaybe>>; }; export type AccountDeletePayload = { - readonly __typename: "AccountDeletePayload"; + readonly __typename: 'AccountDeletePayload'; readonly errors: ReadonlyArray; - readonly success: Scalars["Boolean"]["output"]; + readonly success: Scalars['Boolean']['output']; }; export type AccountDisableNotificationCategoryInput = { - readonly category: Scalars["NotificationCategory"]["input"]; + readonly category: Scalars['NotificationCategory']['input']; readonly channel?: InputMaybe; }; @@ -148,7 +129,7 @@ export type AccountDisableNotificationChannelInput = { }; export type AccountEnableNotificationCategoryInput = { - readonly category: Scalars["NotificationCategory"]["input"]; + readonly category: Scalars['NotificationCategory']['input']; readonly channel?: InputMaybe; }; @@ -157,23 +138,23 @@ export type AccountEnableNotificationChannelInput = { }; export const AccountLevel = { - One: "ONE", - Two: "TWO", - Zero: "ZERO", + One: 'ONE', + Two: 'TWO', + Zero: 'ZERO' } as const; -export type AccountLevel = (typeof AccountLevel)[keyof typeof AccountLevel]; +export type AccountLevel = typeof AccountLevel[keyof typeof AccountLevel]; export type AccountLimit = { /** The rolling time interval in seconds that the limits would apply for. */ - readonly interval?: Maybe; + readonly interval?: Maybe; /** The amount of cents remaining below the limit for the current 24 hour period. */ - readonly remainingLimit?: Maybe; + readonly remainingLimit?: Maybe; /** The current maximum limit for a given 24 hour period. */ - readonly totalLimit: Scalars["CentAmount"]["output"]; + readonly totalLimit: Scalars['CentAmount']['output']; }; export type AccountLimits = { - readonly __typename: "AccountLimits"; + readonly __typename: 'AccountLimits'; /** Limits for converting between currencies among a account's own wallets. */ readonly convert: ReadonlyArray; /** Limits for sending to other internal accounts. */ @@ -183,133 +164,135 @@ export type AccountLimits = { }; export type AccountUpdateDefaultWalletIdInput = { - readonly walletId: Scalars["WalletId"]["input"]; + readonly walletId: Scalars['WalletId']['input']; }; export type AccountUpdateDefaultWalletIdPayload = { - readonly __typename: "AccountUpdateDefaultWalletIdPayload"; + readonly __typename: 'AccountUpdateDefaultWalletIdPayload'; readonly account?: Maybe; readonly errors: ReadonlyArray; }; export type AccountUpdateDisplayCurrencyInput = { - readonly currency: Scalars["DisplayCurrency"]["input"]; + readonly currency: Scalars['DisplayCurrency']['input']; }; export type AccountUpdateDisplayCurrencyPayload = { - readonly __typename: "AccountUpdateDisplayCurrencyPayload"; + readonly __typename: 'AccountUpdateDisplayCurrencyPayload'; readonly account?: Maybe; readonly errors: ReadonlyArray; }; export type AccountUpdateNotificationSettingsPayload = { - readonly __typename: "AccountUpdateNotificationSettingsPayload"; + readonly __typename: 'AccountUpdateNotificationSettingsPayload'; readonly account?: Maybe; readonly errors: ReadonlyArray; }; export type AuthTokenPayload = { - readonly __typename: "AuthTokenPayload"; - readonly authToken?: Maybe; + readonly __typename: 'AuthTokenPayload'; + readonly authToken?: Maybe; readonly errors: ReadonlyArray; - readonly totpRequired?: Maybe; + readonly totpRequired?: Maybe; }; /** A wallet belonging to an account which contains a BTC balance and a list of transactions. */ export type BtcWallet = Wallet & { - readonly __typename: "BTCWallet"; - readonly accountId: Scalars["ID"]["output"]; + readonly __typename: 'BTCWallet'; + readonly accountId: Scalars['ID']['output']; /** A balance stored in BTC. */ - readonly balance: Scalars["SignedAmount"]["output"]; - readonly id: Scalars["ID"]["output"]; + readonly balance: Scalars['SignedAmount']['output']; + readonly id: Scalars['ID']['output']; /** An unconfirmed incoming onchain balance. */ - readonly pendingIncomingBalance: Scalars["SignedAmount"]["output"]; + readonly pendingIncomingBalance: Scalars['SignedAmount']['output']; /** A list of BTC transactions associated with this wallet. */ readonly transactions?: Maybe; readonly transactionsByAddress?: Maybe; readonly walletCurrency: WalletCurrency; }; + /** A wallet belonging to an account which contains a BTC balance and a list of transactions. */ export type BtcWalletTransactionsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; + /** A wallet belonging to an account which contains a BTC balance and a list of transactions. */ export type BtcWalletTransactionsByAddressArgs = { - address: Scalars["OnChainAddress"]["input"]; - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + address: Scalars['OnChainAddress']['input']; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type BuildInformation = { - readonly __typename: "BuildInformation"; - readonly commitHash?: Maybe; - readonly helmRevision?: Maybe; + readonly __typename: 'BuildInformation'; + readonly commitHash?: Maybe; + readonly helmRevision?: Maybe; }; export type CallbackEndpoint = { - readonly __typename: "CallbackEndpoint"; - readonly id: Scalars["EndpointId"]["output"]; - readonly url: Scalars["EndpointUrl"]["output"]; + readonly __typename: 'CallbackEndpoint'; + readonly id: Scalars['EndpointId']['output']; + readonly url: Scalars['EndpointUrl']['output']; }; export type CallbackEndpointAddInput = { /** callback endpoint to be called */ - readonly url: Scalars["EndpointUrl"]["input"]; + readonly url: Scalars['EndpointUrl']['input']; }; export type CallbackEndpointAddPayload = { - readonly __typename: "CallbackEndpointAddPayload"; + readonly __typename: 'CallbackEndpointAddPayload'; readonly errors: ReadonlyArray; - readonly id?: Maybe; + readonly id?: Maybe; }; export type CallbackEndpointDeleteInput = { - readonly id: Scalars["EndpointId"]["input"]; + readonly id: Scalars['EndpointId']['input']; }; export type CaptchaCreateChallengePayload = { - readonly __typename: "CaptchaCreateChallengePayload"; + readonly __typename: 'CaptchaCreateChallengePayload'; readonly errors: ReadonlyArray; readonly result?: Maybe; }; export type CaptchaCreateChallengeResult = { - readonly __typename: "CaptchaCreateChallengeResult"; - readonly challengeCode: Scalars["String"]["output"]; - readonly failbackMode: Scalars["Boolean"]["output"]; - readonly id: Scalars["String"]["output"]; - readonly newCaptcha: Scalars["Boolean"]["output"]; + readonly __typename: 'CaptchaCreateChallengeResult'; + readonly challengeCode: Scalars['String']['output']; + readonly failbackMode: Scalars['Boolean']['output']; + readonly id: Scalars['String']['output']; + readonly newCaptcha: Scalars['Boolean']['output']; }; export type CaptchaRequestAuthCodeInput = { - readonly challengeCode: Scalars["String"]["input"]; + readonly challengeCode: Scalars['String']['input']; readonly channel?: InputMaybe; - readonly phone: Scalars["Phone"]["input"]; - readonly secCode: Scalars["String"]["input"]; - readonly validationCode: Scalars["String"]["input"]; + readonly phone: Scalars['Phone']['input']; + readonly secCode: Scalars['String']['input']; + readonly validationCode: Scalars['String']['input']; }; export type CentAmountPayload = { - readonly __typename: "CentAmountPayload"; - readonly amount?: Maybe; + readonly __typename: 'CentAmountPayload'; + readonly amount?: Maybe; readonly errors: ReadonlyArray; }; export type ConsumerAccount = Account & { - readonly __typename: "ConsumerAccount"; + readonly __typename: 'ConsumerAccount'; readonly callbackEndpoints: ReadonlyArray; /** return CSV stream, base64 encoded, of the list of transactions in the wallet */ - readonly csvTransactions: Scalars["String"]["output"]; - readonly defaultWalletId: Scalars["WalletId"]["output"]; - readonly displayCurrency: Scalars["DisplayCurrency"]["output"]; - readonly id: Scalars["ID"]["output"]; + readonly csvTransactions: Scalars['String']['output']; + readonly defaultWalletId: Scalars['WalletId']['output']; + readonly displayCurrency: Scalars['DisplayCurrency']['output']; + readonly id: Scalars['ID']['output']; readonly level: AccountLevel; readonly limits: AccountLimits; readonly notificationSettings: NotificationSettings; @@ -322,376 +305,369 @@ export type ConsumerAccount = Account & { readonly welcomeProfile?: Maybe; }; + export type ConsumerAccountCsvTransactionsArgs = { - walletIds: ReadonlyArray; + walletIds: ReadonlyArray; }; + export type ConsumerAccountTransactionsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; - walletIds?: InputMaybe< - ReadonlyArray> - >; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; + walletIds?: InputMaybe>>; }; export type Coordinates = { - readonly __typename: "Coordinates"; - readonly latitude: Scalars["Float"]["output"]; - readonly longitude: Scalars["Float"]["output"]; + readonly __typename: 'Coordinates'; + readonly latitude: Scalars['Float']['output']; + readonly longitude: Scalars['Float']['output']; }; export type Country = { - readonly __typename: "Country"; - readonly id: Scalars["CountryCode"]["output"]; + readonly __typename: 'Country'; + readonly id: Scalars['CountryCode']['output']; readonly supportedAuthChannels: ReadonlyArray; }; export type Currency = { - readonly __typename: "Currency"; - readonly flag: Scalars["String"]["output"]; - readonly fractionDigits: Scalars["Int"]["output"]; - readonly id: Scalars["ID"]["output"]; - readonly name: Scalars["String"]["output"]; - readonly symbol: Scalars["String"]["output"]; + readonly __typename: 'Currency'; + readonly flag: Scalars['String']['output']; + readonly fractionDigits: Scalars['Int']['output']; + readonly id: Scalars['ID']['output']; + readonly name: Scalars['String']['output']; + readonly symbol: Scalars['String']['output']; }; export type DepositFeesInformation = { - readonly __typename: "DepositFeesInformation"; - readonly minBankFee: Scalars["String"]["output"]; + readonly __typename: 'DepositFeesInformation'; + readonly minBankFee: Scalars['String']['output']; /** below this amount minBankFee will be charged */ - readonly minBankFeeThreshold: Scalars["String"]["output"]; + readonly minBankFeeThreshold: Scalars['String']['output']; /** ratio to charge as basis points above minBankFeeThreshold amount */ - readonly ratio: Scalars["String"]["output"]; + readonly ratio: Scalars['String']['output']; }; export type DeviceNotificationTokenCreateInput = { - readonly deviceToken: Scalars["String"]["input"]; + readonly deviceToken: Scalars['String']['input']; }; export type Email = { - readonly __typename: "Email"; - readonly address?: Maybe; - readonly verified?: Maybe; + readonly __typename: 'Email'; + readonly address?: Maybe; + readonly verified?: Maybe; }; export type Error = { - readonly code?: Maybe; - readonly message: Scalars["String"]["output"]; - readonly path?: Maybe>>; + readonly code?: Maybe; + readonly message: Scalars['String']['output']; + readonly path?: Maybe>>; }; export const ExchangeCurrencyUnit = { - Btcsat: "BTCSAT", - Usdcent: "USDCENT", + Btcsat: 'BTCSAT', + Usdcent: 'USDCENT' } as const; -export type ExchangeCurrencyUnit = - (typeof ExchangeCurrencyUnit)[keyof typeof ExchangeCurrencyUnit]; +export type ExchangeCurrencyUnit = typeof ExchangeCurrencyUnit[keyof typeof ExchangeCurrencyUnit]; export type FeedbackSubmitInput = { - readonly feedback: Scalars["Feedback"]["input"]; + readonly feedback: Scalars['Feedback']['input']; }; export type FeesInformation = { - readonly __typename: "FeesInformation"; + readonly __typename: 'FeesInformation'; readonly deposit: DepositFeesInformation; }; /** Provides global settings for the application which might have an impact for the user. */ export type Globals = { - readonly __typename: "Globals"; + readonly __typename: 'Globals'; readonly buildInformation: BuildInformation; readonly feesInformation: FeesInformation; /** The domain name for lightning addresses accepted by this Galoy instance */ - readonly lightningAddressDomain: Scalars["String"]["output"]; - readonly lightningAddressDomainAliases: ReadonlyArray< - Scalars["String"]["output"] - >; + readonly lightningAddressDomain: Scalars['String']['output']; + readonly lightningAddressDomainAliases: ReadonlyArray; /** Which network (mainnet, testnet, regtest, signet) this instance is running on. */ readonly network: Network; /** * A list of public keys for the running lightning nodes. * This can be used to know if an invoice belongs to one of our nodes. */ - readonly nodesIds: ReadonlyArray; + readonly nodesIds: ReadonlyArray; /** A list of countries and their supported auth channels */ readonly supportedCountries: ReadonlyArray; }; export type GraphQlApplicationError = Error & { - readonly __typename: "GraphQLApplicationError"; - readonly code?: Maybe; - readonly message: Scalars["String"]["output"]; - readonly path?: Maybe>>; + readonly __typename: 'GraphQLApplicationError'; + readonly code?: Maybe; + readonly message: Scalars['String']['output']; + readonly path?: Maybe>>; }; -export type InitiationVia = - | InitiationViaIntraLedger - | InitiationViaLn - | InitiationViaOnChain; +export type InitiationVia = InitiationViaIntraLedger | InitiationViaLn | InitiationViaOnChain; export type InitiationViaIntraLedger = { - readonly __typename: "InitiationViaIntraLedger"; - readonly counterPartyUsername?: Maybe; - readonly counterPartyWalletId?: Maybe; + readonly __typename: 'InitiationViaIntraLedger'; + readonly counterPartyUsername?: Maybe; + readonly counterPartyWalletId?: Maybe; }; export type InitiationViaLn = { - readonly __typename: "InitiationViaLn"; - readonly paymentHash: Scalars["PaymentHash"]["output"]; + readonly __typename: 'InitiationViaLn'; + readonly paymentHash: Scalars['PaymentHash']['output']; }; export type InitiationViaOnChain = { - readonly __typename: "InitiationViaOnChain"; - readonly address: Scalars["OnChainAddress"]["output"]; + readonly __typename: 'InitiationViaOnChain'; + readonly address: Scalars['OnChainAddress']['output']; }; export type IntraLedgerPaymentSendInput = { /** Amount in satoshis. */ - readonly amount: Scalars["SatAmount"]["input"]; + readonly amount: Scalars['SatAmount']['input']; /** Optional memo to be attached to the payment. */ - readonly memo?: InputMaybe; - readonly recipientWalletId: Scalars["WalletId"]["input"]; + readonly memo?: InputMaybe; + readonly recipientWalletId: Scalars['WalletId']['input']; /** The wallet ID of the sender. */ - readonly walletId: Scalars["WalletId"]["input"]; + readonly walletId: Scalars['WalletId']['input']; }; export type IntraLedgerUpdate = { - readonly __typename: "IntraLedgerUpdate"; - readonly amount: Scalars["SatAmount"]["output"]; - readonly displayCurrencyPerSat: Scalars["Float"]["output"]; + readonly __typename: 'IntraLedgerUpdate'; + readonly amount: Scalars['SatAmount']['output']; + readonly displayCurrencyPerSat: Scalars['Float']['output']; readonly txNotificationType: TxNotificationType; /** @deprecated updated over displayCurrencyPerSat */ - readonly usdPerSat: Scalars["Float"]["output"]; - readonly walletId: Scalars["WalletId"]["output"]; + readonly usdPerSat: Scalars['Float']['output']; + readonly walletId: Scalars['WalletId']['output']; }; export type IntraLedgerUsdPaymentSendInput = { /** Amount in cents. */ - readonly amount: Scalars["CentAmount"]["input"]; + readonly amount: Scalars['CentAmount']['input']; /** Optional memo to be attached to the payment. */ - readonly memo?: InputMaybe; - readonly recipientWalletId: Scalars["WalletId"]["input"]; + readonly memo?: InputMaybe; + readonly recipientWalletId: Scalars['WalletId']['input']; /** The wallet ID of the sender. */ - readonly walletId: Scalars["WalletId"]["input"]; + readonly walletId: Scalars['WalletId']['input']; }; export const InvoicePaymentStatus = { - Expired: "EXPIRED", - Paid: "PAID", - Pending: "PENDING", + Expired: 'EXPIRED', + Paid: 'PAID', + Pending: 'PENDING' } as const; -export type InvoicePaymentStatus = - (typeof InvoicePaymentStatus)[keyof typeof InvoicePaymentStatus]; +export type InvoicePaymentStatus = typeof InvoicePaymentStatus[keyof typeof InvoicePaymentStatus]; export type Leader = { - readonly __typename: "Leader"; - readonly name?: Maybe; - readonly points: Scalars["Int"]["output"]; - readonly rank: Scalars["Int"]["output"]; + readonly __typename: 'Leader'; + readonly name?: Maybe; + readonly points: Scalars['Int']['output']; + readonly rank: Scalars['Int']['output']; }; export type Leaderboard = { - readonly __typename: "Leaderboard"; + readonly __typename: 'Leaderboard'; readonly leaders: ReadonlyArray; readonly range: WelcomeRange; }; export type LnInvoice = { - readonly __typename: "LnInvoice"; - readonly paymentHash: Scalars["PaymentHash"]["output"]; - readonly paymentRequest: Scalars["LnPaymentRequest"]["output"]; - readonly paymentSecret: Scalars["LnPaymentSecret"]["output"]; - readonly satoshis?: Maybe; + readonly __typename: 'LnInvoice'; + readonly paymentHash: Scalars['PaymentHash']['output']; + readonly paymentRequest: Scalars['LnPaymentRequest']['output']; + readonly paymentSecret: Scalars['LnPaymentSecret']['output']; + readonly satoshis?: Maybe; }; export type LnInvoiceCreateInput = { /** Amount in satoshis. */ - readonly amount: Scalars["SatAmount"]["input"]; + readonly amount: Scalars['SatAmount']['input']; /** Optional invoice expiration time in minutes. */ - readonly expiresIn?: InputMaybe; + readonly expiresIn?: InputMaybe; /** Optional memo for the lightning invoice. */ - readonly memo?: InputMaybe; + readonly memo?: InputMaybe; /** Wallet ID for a BTC wallet belonging to the current account. */ - readonly walletId: Scalars["WalletId"]["input"]; + readonly walletId: Scalars['WalletId']['input']; }; export type LnInvoiceCreateOnBehalfOfRecipientInput = { /** Amount in satoshis. */ - readonly amount: Scalars["SatAmount"]["input"]; - readonly descriptionHash?: InputMaybe; + readonly amount: Scalars['SatAmount']['input']; + readonly descriptionHash?: InputMaybe; /** Optional invoice expiration time in minutes. */ - readonly expiresIn?: InputMaybe; + readonly expiresIn?: InputMaybe; /** Optional memo for the lightning invoice. */ - readonly memo?: InputMaybe; + readonly memo?: InputMaybe; /** Wallet ID for a BTC wallet which belongs to any account. */ - readonly recipientWalletId: Scalars["WalletId"]["input"]; + readonly recipientWalletId: Scalars['WalletId']['input']; }; export type LnInvoiceFeeProbeInput = { - readonly paymentRequest: Scalars["LnPaymentRequest"]["input"]; - readonly walletId: Scalars["WalletId"]["input"]; + readonly paymentRequest: Scalars['LnPaymentRequest']['input']; + readonly walletId: Scalars['WalletId']['input']; }; export type LnInvoicePayload = { - readonly __typename: "LnInvoicePayload"; + readonly __typename: 'LnInvoicePayload'; readonly errors: ReadonlyArray; readonly invoice?: Maybe; }; export type LnInvoicePaymentInput = { /** Optional memo to associate with the lightning invoice. */ - readonly memo?: InputMaybe; + readonly memo?: InputMaybe; /** Payment request representing the invoice which is being paid. */ - readonly paymentRequest: Scalars["LnPaymentRequest"]["input"]; + readonly paymentRequest: Scalars['LnPaymentRequest']['input']; /** Wallet ID with sufficient balance to cover amount of invoice. Must belong to the account of the current user. */ - readonly walletId: Scalars["WalletId"]["input"]; + readonly walletId: Scalars['WalletId']['input']; }; export type LnInvoicePaymentStatusInput = { - readonly paymentRequest: Scalars["LnPaymentRequest"]["input"]; + readonly paymentRequest: Scalars['LnPaymentRequest']['input']; }; export type LnInvoicePaymentStatusPayload = { - readonly __typename: "LnInvoicePaymentStatusPayload"; + readonly __typename: 'LnInvoicePaymentStatusPayload'; readonly errors: ReadonlyArray; readonly status?: Maybe; }; export type LnNoAmountInvoice = { - readonly __typename: "LnNoAmountInvoice"; - readonly paymentHash: Scalars["PaymentHash"]["output"]; - readonly paymentRequest: Scalars["LnPaymentRequest"]["output"]; - readonly paymentSecret: Scalars["LnPaymentSecret"]["output"]; + readonly __typename: 'LnNoAmountInvoice'; + readonly paymentHash: Scalars['PaymentHash']['output']; + readonly paymentRequest: Scalars['LnPaymentRequest']['output']; + readonly paymentSecret: Scalars['LnPaymentSecret']['output']; }; export type LnNoAmountInvoiceCreateInput = { /** Optional invoice expiration time in minutes. */ - readonly expiresIn?: InputMaybe; + readonly expiresIn?: InputMaybe; /** Optional memo for the lightning invoice. */ - readonly memo?: InputMaybe; + readonly memo?: InputMaybe; /** ID for either a USD or BTC wallet belonging to the account of the current user. */ - readonly walletId: Scalars["WalletId"]["input"]; + readonly walletId: Scalars['WalletId']['input']; }; export type LnNoAmountInvoiceCreateOnBehalfOfRecipientInput = { /** Optional invoice expiration time in minutes. */ - readonly expiresIn?: InputMaybe; + readonly expiresIn?: InputMaybe; /** Optional memo for the lightning invoice. */ - readonly memo?: InputMaybe; + readonly memo?: InputMaybe; /** ID for either a USD or BTC wallet which belongs to the account of any user. */ - readonly recipientWalletId: Scalars["WalletId"]["input"]; + readonly recipientWalletId: Scalars['WalletId']['input']; }; export type LnNoAmountInvoiceFeeProbeInput = { - readonly amount: Scalars["SatAmount"]["input"]; - readonly paymentRequest: Scalars["LnPaymentRequest"]["input"]; - readonly walletId: Scalars["WalletId"]["input"]; + readonly amount: Scalars['SatAmount']['input']; + readonly paymentRequest: Scalars['LnPaymentRequest']['input']; + readonly walletId: Scalars['WalletId']['input']; }; export type LnNoAmountInvoicePayload = { - readonly __typename: "LnNoAmountInvoicePayload"; + readonly __typename: 'LnNoAmountInvoicePayload'; readonly errors: ReadonlyArray; readonly invoice?: Maybe; }; export type LnNoAmountInvoicePaymentInput = { /** Amount to pay in satoshis. */ - readonly amount: Scalars["SatAmount"]["input"]; + readonly amount: Scalars['SatAmount']['input']; /** Optional memo to associate with the lightning invoice. */ - readonly memo?: InputMaybe; + readonly memo?: InputMaybe; /** Payment request representing the invoice which is being paid. */ - readonly paymentRequest: Scalars["LnPaymentRequest"]["input"]; + readonly paymentRequest: Scalars['LnPaymentRequest']['input']; /** Wallet ID with sufficient balance to cover amount defined in mutation request. Must belong to the account of the current user. */ - readonly walletId: Scalars["WalletId"]["input"]; + readonly walletId: Scalars['WalletId']['input']; }; export type LnNoAmountUsdInvoiceFeeProbeInput = { - readonly amount: Scalars["CentAmount"]["input"]; - readonly paymentRequest: Scalars["LnPaymentRequest"]["input"]; - readonly walletId: Scalars["WalletId"]["input"]; + readonly amount: Scalars['CentAmount']['input']; + readonly paymentRequest: Scalars['LnPaymentRequest']['input']; + readonly walletId: Scalars['WalletId']['input']; }; export type LnNoAmountUsdInvoicePaymentInput = { /** Amount to pay in USD cents. */ - readonly amount: Scalars["CentAmount"]["input"]; + readonly amount: Scalars['CentAmount']['input']; /** Optional memo to associate with the lightning invoice. */ - readonly memo?: InputMaybe; + readonly memo?: InputMaybe; /** Payment request representing the invoice which is being paid. */ - readonly paymentRequest: Scalars["LnPaymentRequest"]["input"]; + readonly paymentRequest: Scalars['LnPaymentRequest']['input']; /** Wallet ID with sufficient balance to cover amount defined in mutation request. Must belong to the account of the current user. */ - readonly walletId: Scalars["WalletId"]["input"]; + readonly walletId: Scalars['WalletId']['input']; }; export type LnUpdate = { - readonly __typename: "LnUpdate"; - readonly paymentHash: Scalars["PaymentHash"]["output"]; + readonly __typename: 'LnUpdate'; + readonly paymentHash: Scalars['PaymentHash']['output']; readonly status: InvoicePaymentStatus; - readonly walletId: Scalars["WalletId"]["output"]; + readonly walletId: Scalars['WalletId']['output']; }; export type LnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientInput = { /** Amount in satoshis. */ - readonly amount: Scalars["SatAmount"]["input"]; - readonly descriptionHash?: InputMaybe; + readonly amount: Scalars['SatAmount']['input']; + readonly descriptionHash?: InputMaybe; /** Optional invoice expiration time in minutes. */ - readonly expiresIn?: InputMaybe; + readonly expiresIn?: InputMaybe; /** Optional memo for the lightning invoice. Acts as a note to the recipient. */ - readonly memo?: InputMaybe; + readonly memo?: InputMaybe; /** Wallet ID for a USD wallet which belongs to the account of any user. */ - readonly recipientWalletId: Scalars["WalletId"]["input"]; + readonly recipientWalletId: Scalars['WalletId']['input']; }; export type LnUsdInvoiceCreateInput = { /** Amount in USD cents. */ - readonly amount: Scalars["CentAmount"]["input"]; + readonly amount: Scalars['CentAmount']['input']; /** Optional invoice expiration time in minutes. */ - readonly expiresIn?: InputMaybe; + readonly expiresIn?: InputMaybe; /** Optional memo for the lightning invoice. */ - readonly memo?: InputMaybe; + readonly memo?: InputMaybe; /** Wallet ID for a USD wallet belonging to the current user. */ - readonly walletId: Scalars["WalletId"]["input"]; + readonly walletId: Scalars['WalletId']['input']; }; export type LnUsdInvoiceCreateOnBehalfOfRecipientInput = { /** Amount in USD cents. */ - readonly amount: Scalars["CentAmount"]["input"]; - readonly descriptionHash?: InputMaybe; + readonly amount: Scalars['CentAmount']['input']; + readonly descriptionHash?: InputMaybe; /** Optional invoice expiration time in minutes. */ - readonly expiresIn?: InputMaybe; + readonly expiresIn?: InputMaybe; /** Optional memo for the lightning invoice. Acts as a note to the recipient. */ - readonly memo?: InputMaybe; + readonly memo?: InputMaybe; /** Wallet ID for a USD wallet which belongs to the account of any user. */ - readonly recipientWalletId: Scalars["WalletId"]["input"]; + readonly recipientWalletId: Scalars['WalletId']['input']; }; export type LnUsdInvoiceFeeProbeInput = { - readonly paymentRequest: Scalars["LnPaymentRequest"]["input"]; - readonly walletId: Scalars["WalletId"]["input"]; + readonly paymentRequest: Scalars['LnPaymentRequest']['input']; + readonly walletId: Scalars['WalletId']['input']; }; export type MapInfo = { - readonly __typename: "MapInfo"; + readonly __typename: 'MapInfo'; readonly coordinates: Coordinates; - readonly title: Scalars["String"]["output"]; + readonly title: Scalars['String']['output']; }; export type MapMarker = { - readonly __typename: "MapMarker"; + readonly __typename: 'MapMarker'; readonly mapInfo: MapInfo; - readonly username?: Maybe; + readonly username?: Maybe; }; export type MobileVersions = { - readonly __typename: "MobileVersions"; - readonly currentSupported: Scalars["Int"]["output"]; - readonly minSupported: Scalars["Int"]["output"]; - readonly platform: Scalars["String"]["output"]; + readonly __typename: 'MobileVersions'; + readonly currentSupported: Scalars['Int']['output']; + readonly minSupported: Scalars['Int']['output']; + readonly platform: Scalars['String']['output']; }; export type Mutation = { - readonly __typename: "Mutation"; + readonly __typename: 'Mutation'; readonly accountDelete: AccountDeletePayload; readonly accountDisableNotificationCategory: AccountUpdateNotificationSettingsPayload; readonly accountDisableNotificationChannel: AccountUpdateNotificationSettingsPayload; @@ -802,8 +778,6 @@ export type Mutation = { readonly userPhoneDelete: UserPhoneDeletePayload; readonly userPhoneRegistrationInitiate: SuccessPayload; readonly userPhoneRegistrationValidate: UserPhoneRegistrationValidatePayload; - /** @deprecated Use QuizCompletedMutation instead */ - readonly userQuizQuestionUpdateCompleted: UserQuizQuestionUpdateCompletedPayload; readonly userTotpDelete: UserTotpDeletePayload; readonly userTotpRegistrationInitiate: UserTotpRegistrationInitiatePayload; readonly userTotpRegistrationValidate: UserTotpRegistrationValidatePayload; @@ -812,432 +786,469 @@ export type Mutation = { readonly userUpdateUsername: UserUpdateUsernamePayload; }; + export type MutationAccountDisableNotificationCategoryArgs = { input: AccountDisableNotificationCategoryInput; }; + export type MutationAccountDisableNotificationChannelArgs = { input: AccountDisableNotificationChannelInput; }; + export type MutationAccountEnableNotificationCategoryArgs = { input: AccountEnableNotificationCategoryInput; }; + export type MutationAccountEnableNotificationChannelArgs = { input: AccountEnableNotificationChannelInput; }; + export type MutationAccountUpdateDefaultWalletIdArgs = { input: AccountUpdateDefaultWalletIdInput; }; + export type MutationAccountUpdateDisplayCurrencyArgs = { input: AccountUpdateDisplayCurrencyInput; }; + export type MutationCallbackEndpointAddArgs = { input: CallbackEndpointAddInput; }; + export type MutationCallbackEndpointDeleteArgs = { input: CallbackEndpointDeleteInput; }; + export type MutationCaptchaRequestAuthCodeArgs = { input: CaptchaRequestAuthCodeInput; }; + export type MutationDeviceNotificationTokenCreateArgs = { input: DeviceNotificationTokenCreateInput; }; + export type MutationFeedbackSubmitArgs = { input: FeedbackSubmitInput; }; + export type MutationIntraLedgerPaymentSendArgs = { input: IntraLedgerPaymentSendInput; }; + export type MutationIntraLedgerUsdPaymentSendArgs = { input: IntraLedgerUsdPaymentSendInput; }; + export type MutationLnInvoiceCreateArgs = { input: LnInvoiceCreateInput; }; + export type MutationLnInvoiceCreateOnBehalfOfRecipientArgs = { input: LnInvoiceCreateOnBehalfOfRecipientInput; }; + export type MutationLnInvoiceFeeProbeArgs = { input: LnInvoiceFeeProbeInput; }; + export type MutationLnInvoicePaymentSendArgs = { input: LnInvoicePaymentInput; }; + export type MutationLnNoAmountInvoiceCreateArgs = { input: LnNoAmountInvoiceCreateInput; }; + export type MutationLnNoAmountInvoiceCreateOnBehalfOfRecipientArgs = { input: LnNoAmountInvoiceCreateOnBehalfOfRecipientInput; }; + export type MutationLnNoAmountInvoiceFeeProbeArgs = { input: LnNoAmountInvoiceFeeProbeInput; }; + export type MutationLnNoAmountInvoicePaymentSendArgs = { input: LnNoAmountInvoicePaymentInput; }; + export type MutationLnNoAmountUsdInvoiceFeeProbeArgs = { input: LnNoAmountUsdInvoiceFeeProbeInput; }; + export type MutationLnNoAmountUsdInvoicePaymentSendArgs = { input: LnNoAmountUsdInvoicePaymentInput; }; + export type MutationLnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientArgs = { input: LnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientInput; }; + export type MutationLnUsdInvoiceCreateArgs = { input: LnUsdInvoiceCreateInput; }; + export type MutationLnUsdInvoiceCreateOnBehalfOfRecipientArgs = { input: LnUsdInvoiceCreateOnBehalfOfRecipientInput; }; + export type MutationLnUsdInvoiceFeeProbeArgs = { input: LnUsdInvoiceFeeProbeInput; }; + export type MutationOnChainAddressCreateArgs = { input: OnChainAddressCreateInput; }; + export type MutationOnChainAddressCurrentArgs = { input: OnChainAddressCurrentInput; }; + export type MutationOnChainPaymentSendArgs = { input: OnChainPaymentSendInput; }; + export type MutationOnChainPaymentSendAllArgs = { input: OnChainPaymentSendAllInput; }; + export type MutationOnChainUsdPaymentSendArgs = { input: OnChainUsdPaymentSendInput; }; + export type MutationOnChainUsdPaymentSendAsBtcDenominatedArgs = { input: OnChainUsdPaymentSendAsBtcDenominatedInput; }; + export type MutationQuizCompletedArgs = { input: QuizCompletedInput; }; + export type MutationUserContactUpdateAliasArgs = { input: UserContactUpdateAliasInput; }; + export type MutationUserEmailRegistrationInitiateArgs = { input: UserEmailRegistrationInitiateInput; }; + export type MutationUserEmailRegistrationValidateArgs = { input: UserEmailRegistrationValidateInput; }; + export type MutationUserLoginArgs = { input: UserLoginInput; }; + export type MutationUserLoginUpgradeArgs = { input: UserLoginUpgradeInput; }; + export type MutationUserLogoutArgs = { input?: InputMaybe; }; + export type MutationUserPhoneRegistrationInitiateArgs = { input: UserPhoneRegistrationInitiateInput; }; + export type MutationUserPhoneRegistrationValidateArgs = { input: UserPhoneRegistrationValidateInput; }; -export type MutationUserQuizQuestionUpdateCompletedArgs = { - input: UserQuizQuestionUpdateCompletedInput; -}; export type MutationUserTotpDeleteArgs = { input: UserTotpDeleteInput; }; + export type MutationUserTotpRegistrationInitiateArgs = { input: UserTotpRegistrationInitiateInput; }; + export type MutationUserTotpRegistrationValidateArgs = { input: UserTotpRegistrationValidateInput; }; + export type MutationUserUpdateLanguageArgs = { input: UserUpdateLanguageInput; }; + export type MutationUserUpdateUsernameArgs = { input: UserUpdateUsernameInput; }; export type MyUpdatesPayload = { - readonly __typename: "MyUpdatesPayload"; + readonly __typename: 'MyUpdatesPayload'; readonly errors: ReadonlyArray; readonly me?: Maybe; readonly update?: Maybe; }; export const Network = { - Mainnet: "mainnet", - Regtest: "regtest", - Signet: "signet", - Testnet: "testnet", + Mainnet: 'mainnet', + Regtest: 'regtest', + Signet: 'signet', + Testnet: 'testnet' } as const; -export type Network = (typeof Network)[keyof typeof Network]; +export type Network = typeof Network[keyof typeof Network]; export const NotificationChannel = { - Push: "PUSH", + Push: 'PUSH' } as const; -export type NotificationChannel = - (typeof NotificationChannel)[keyof typeof NotificationChannel]; +export type NotificationChannel = typeof NotificationChannel[keyof typeof NotificationChannel]; export type NotificationChannelSettings = { - readonly __typename: "NotificationChannelSettings"; - readonly disabledCategories: ReadonlyArray< - Scalars["NotificationCategory"]["output"] - >; - readonly enabled: Scalars["Boolean"]["output"]; + readonly __typename: 'NotificationChannelSettings'; + readonly disabledCategories: ReadonlyArray; + readonly enabled: Scalars['Boolean']['output']; }; export type NotificationSettings = { - readonly __typename: "NotificationSettings"; + readonly __typename: 'NotificationSettings'; readonly push: NotificationChannelSettings; }; export type OnChainAddressCreateInput = { - readonly walletId: Scalars["WalletId"]["input"]; + readonly walletId: Scalars['WalletId']['input']; }; export type OnChainAddressCurrentInput = { - readonly walletId: Scalars["WalletId"]["input"]; + readonly walletId: Scalars['WalletId']['input']; }; export type OnChainAddressPayload = { - readonly __typename: "OnChainAddressPayload"; - readonly address?: Maybe; + readonly __typename: 'OnChainAddressPayload'; + readonly address?: Maybe; readonly errors: ReadonlyArray; }; export type OnChainPaymentSendAllInput = { - readonly address: Scalars["OnChainAddress"]["input"]; - readonly memo?: InputMaybe; + readonly address: Scalars['OnChainAddress']['input']; + readonly memo?: InputMaybe; readonly speed?: InputMaybe; - readonly walletId: Scalars["WalletId"]["input"]; + readonly walletId: Scalars['WalletId']['input']; }; export type OnChainPaymentSendInput = { - readonly address: Scalars["OnChainAddress"]["input"]; - readonly amount: Scalars["SatAmount"]["input"]; - readonly memo?: InputMaybe; + readonly address: Scalars['OnChainAddress']['input']; + readonly amount: Scalars['SatAmount']['input']; + readonly memo?: InputMaybe; readonly speed?: InputMaybe; - readonly walletId: Scalars["WalletId"]["input"]; + readonly walletId: Scalars['WalletId']['input']; }; export type OnChainTxFee = { - readonly __typename: "OnChainTxFee"; - readonly amount: Scalars["SatAmount"]["output"]; + readonly __typename: 'OnChainTxFee'; + readonly amount: Scalars['SatAmount']['output']; }; export type OnChainUpdate = { - readonly __typename: "OnChainUpdate"; - readonly amount: Scalars["SatAmount"]["output"]; - readonly displayCurrencyPerSat: Scalars["Float"]["output"]; - readonly txHash: Scalars["OnChainTxHash"]["output"]; + readonly __typename: 'OnChainUpdate'; + readonly amount: Scalars['SatAmount']['output']; + readonly displayCurrencyPerSat: Scalars['Float']['output']; + readonly txHash: Scalars['OnChainTxHash']['output']; readonly txNotificationType: TxNotificationType; /** @deprecated updated over displayCurrencyPerSat */ - readonly usdPerSat: Scalars["Float"]["output"]; - readonly walletId: Scalars["WalletId"]["output"]; + readonly usdPerSat: Scalars['Float']['output']; + readonly walletId: Scalars['WalletId']['output']; }; export type OnChainUsdPaymentSendAsBtcDenominatedInput = { - readonly address: Scalars["OnChainAddress"]["input"]; - readonly amount: Scalars["SatAmount"]["input"]; - readonly memo?: InputMaybe; + readonly address: Scalars['OnChainAddress']['input']; + readonly amount: Scalars['SatAmount']['input']; + readonly memo?: InputMaybe; readonly speed?: InputMaybe; - readonly walletId: Scalars["WalletId"]["input"]; + readonly walletId: Scalars['WalletId']['input']; }; export type OnChainUsdPaymentSendInput = { - readonly address: Scalars["OnChainAddress"]["input"]; - readonly amount: Scalars["CentAmount"]["input"]; - readonly memo?: InputMaybe; + readonly address: Scalars['OnChainAddress']['input']; + readonly amount: Scalars['CentAmount']['input']; + readonly memo?: InputMaybe; readonly speed?: InputMaybe; - readonly walletId: Scalars["WalletId"]["input"]; + readonly walletId: Scalars['WalletId']['input']; }; export type OnChainUsdTxFee = { - readonly __typename: "OnChainUsdTxFee"; - readonly amount: Scalars["CentAmount"]["output"]; + readonly __typename: 'OnChainUsdTxFee'; + readonly amount: Scalars['CentAmount']['output']; }; export type OneDayAccountLimit = AccountLimit & { - readonly __typename: "OneDayAccountLimit"; + readonly __typename: 'OneDayAccountLimit'; /** The rolling time interval value in seconds for the current 24 hour period. */ - readonly interval?: Maybe; + readonly interval?: Maybe; /** The amount of cents remaining below the limit for the current 24 hour period. */ - readonly remainingLimit?: Maybe; + readonly remainingLimit?: Maybe; /** The current maximum limit for a given 24 hour period. */ - readonly totalLimit: Scalars["CentAmount"]["output"]; + readonly totalLimit: Scalars['CentAmount']['output']; }; /** Information about pagination in a connection. */ export type PageInfo = { - readonly __typename: "PageInfo"; + readonly __typename: 'PageInfo'; /** When paginating forwards, the cursor to continue. */ - readonly endCursor?: Maybe; + readonly endCursor?: Maybe; /** When paginating forwards, are there more items? */ - readonly hasNextPage: Scalars["Boolean"]["output"]; + readonly hasNextPage: Scalars['Boolean']['output']; /** When paginating backwards, are there more items? */ - readonly hasPreviousPage: Scalars["Boolean"]["output"]; + readonly hasPreviousPage: Scalars['Boolean']['output']; /** When paginating backwards, the cursor to continue. */ - readonly startCursor?: Maybe; + readonly startCursor?: Maybe; }; export type PaymentSendPayload = { - readonly __typename: "PaymentSendPayload"; + readonly __typename: 'PaymentSendPayload'; readonly errors: ReadonlyArray; readonly status?: Maybe; }; export const PaymentSendResult = { - AlreadyPaid: "ALREADY_PAID", - Failure: "FAILURE", - Pending: "PENDING", - Success: "SUCCESS", + AlreadyPaid: 'ALREADY_PAID', + Failure: 'FAILURE', + Pending: 'PENDING', + Success: 'SUCCESS' } as const; -export type PaymentSendResult = - (typeof PaymentSendResult)[keyof typeof PaymentSendResult]; +export type PaymentSendResult = typeof PaymentSendResult[keyof typeof PaymentSendResult]; export const PayoutSpeed = { - Fast: "FAST", + Fast: 'FAST' } as const; -export type PayoutSpeed = (typeof PayoutSpeed)[keyof typeof PayoutSpeed]; +export type PayoutSpeed = typeof PayoutSpeed[keyof typeof PayoutSpeed]; export const PhoneCodeChannelType = { - Sms: "SMS", - Whatsapp: "WHATSAPP", + Sms: 'SMS', + Whatsapp: 'WHATSAPP' } as const; -export type PhoneCodeChannelType = - (typeof PhoneCodeChannelType)[keyof typeof PhoneCodeChannelType]; +export type PhoneCodeChannelType = typeof PhoneCodeChannelType[keyof typeof PhoneCodeChannelType]; /** Price amount expressed in base/offset. To calculate, use: `base / 10^offset` */ export type Price = { - readonly __typename: "Price"; - readonly base: Scalars["SafeInt"]["output"]; - readonly currencyUnit: Scalars["String"]["output"]; - readonly formattedAmount: Scalars["String"]["output"]; - readonly offset: Scalars["Int"]["output"]; + readonly __typename: 'Price'; + readonly base: Scalars['SafeInt']['output']; + readonly currencyUnit: Scalars['String']['output']; + readonly formattedAmount: Scalars['String']['output']; + readonly offset: Scalars['Int']['output']; }; /** The range for the X axis in the BTC price graph */ export const PriceGraphRange = { - FiveYears: "FIVE_YEARS", - OneDay: "ONE_DAY", - OneMonth: "ONE_MONTH", - OneWeek: "ONE_WEEK", - OneYear: "ONE_YEAR", + FiveYears: 'FIVE_YEARS', + OneDay: 'ONE_DAY', + OneMonth: 'ONE_MONTH', + OneWeek: 'ONE_WEEK', + OneYear: 'ONE_YEAR' } as const; -export type PriceGraphRange = - (typeof PriceGraphRange)[keyof typeof PriceGraphRange]; +export type PriceGraphRange = typeof PriceGraphRange[keyof typeof PriceGraphRange]; export type PriceInput = { - readonly amount: Scalars["SatAmount"]["input"]; + readonly amount: Scalars['SatAmount']['input']; readonly amountCurrencyUnit: ExchangeCurrencyUnit; readonly priceCurrencyUnit: ExchangeCurrencyUnit; }; export type PriceInterface = { - readonly base: Scalars["SafeInt"]["output"]; + readonly base: Scalars['SafeInt']['output']; /** @deprecated Deprecated due to type renaming */ - readonly currencyUnit: Scalars["String"]["output"]; - readonly offset: Scalars["Int"]["output"]; + readonly currencyUnit: Scalars['String']['output']; + readonly offset: Scalars['Int']['output']; }; /** Price of 1 sat in base/offset. To calculate, use: `base / 10^offset` */ export type PriceOfOneSatInMinorUnit = PriceInterface & { - readonly __typename: "PriceOfOneSatInMinorUnit"; - readonly base: Scalars["SafeInt"]["output"]; + readonly __typename: 'PriceOfOneSatInMinorUnit'; + readonly base: Scalars['SafeInt']['output']; /** @deprecated Deprecated due to type renaming */ - readonly currencyUnit: Scalars["String"]["output"]; - readonly offset: Scalars["Int"]["output"]; + readonly currencyUnit: Scalars['String']['output']; + readonly offset: Scalars['Int']['output']; }; /** Price of 1 sat or 1 usd cent in base/offset. To calculate, use: `base / 10^offset` */ export type PriceOfOneSettlementMinorUnitInDisplayMinorUnit = PriceInterface & { - readonly __typename: "PriceOfOneSettlementMinorUnitInDisplayMinorUnit"; - readonly base: Scalars["SafeInt"]["output"]; + readonly __typename: 'PriceOfOneSettlementMinorUnitInDisplayMinorUnit'; + readonly base: Scalars['SafeInt']['output']; /** @deprecated Deprecated due to type renaming */ - readonly currencyUnit: Scalars["String"]["output"]; + readonly currencyUnit: Scalars['String']['output']; /** @deprecated Deprecated please use `base / 10^offset` */ - readonly formattedAmount: Scalars["String"]["output"]; - readonly offset: Scalars["Int"]["output"]; + readonly formattedAmount: Scalars['String']['output']; + readonly offset: Scalars['Int']['output']; }; /** Price of 1 usd cent in base/offset. To calculate, use: `base / 10^offset` */ export type PriceOfOneUsdCentInMinorUnit = PriceInterface & { - readonly __typename: "PriceOfOneUsdCentInMinorUnit"; - readonly base: Scalars["SafeInt"]["output"]; + readonly __typename: 'PriceOfOneUsdCentInMinorUnit'; + readonly base: Scalars['SafeInt']['output']; /** @deprecated Deprecated due to type renaming */ - readonly currencyUnit: Scalars["String"]["output"]; - readonly offset: Scalars["Int"]["output"]; + readonly currencyUnit: Scalars['String']['output']; + readonly offset: Scalars['Int']['output']; }; export type PricePayload = { - readonly __typename: "PricePayload"; + readonly __typename: 'PricePayload'; readonly errors: ReadonlyArray; readonly price?: Maybe; }; export type PricePoint = { - readonly __typename: "PricePoint"; + readonly __typename: 'PricePoint'; readonly price: Price; /** Unix timestamp (number of seconds elapsed since January 1, 1970 00:00:00 UTC) */ - readonly timestamp: Scalars["Timestamp"]["output"]; + readonly timestamp: Scalars['Timestamp']['output']; }; /** A public view of a generic wallet which stores value in one of our supported currencies. */ export type PublicWallet = { - readonly __typename: "PublicWallet"; - readonly id: Scalars["ID"]["output"]; + readonly __typename: 'PublicWallet'; + readonly id: Scalars['ID']['output']; readonly walletCurrency: WalletCurrency; }; export type Query = { - readonly __typename: "Query"; + readonly __typename: 'Query'; readonly accountDefaultWallet: PublicWallet; /** @deprecated Deprecated in favor of realtimePrice */ readonly btcPrice?: Maybe; @@ -1256,143 +1267,151 @@ export type Query = { /** Returns 1 Sat and 1 Usd Cent price for the given currency */ readonly realtimePrice: RealtimePrice; /** @deprecated will be migrated to AccountDefaultWalletId */ - readonly userDefaultWalletId: Scalars["WalletId"]["output"]; - readonly usernameAvailable?: Maybe; + readonly userDefaultWalletId: Scalars['WalletId']['output']; + readonly usernameAvailable?: Maybe; readonly welcomeLeaderboard: Leaderboard; }; + export type QueryAccountDefaultWalletArgs = { - username: Scalars["Username"]["input"]; + username: Scalars['Username']['input']; walletCurrency?: InputMaybe; }; + export type QueryBtcPriceArgs = { - currency?: Scalars["DisplayCurrency"]["input"]; + currency?: Scalars['DisplayCurrency']['input']; }; + export type QueryBtcPriceListArgs = { range: PriceGraphRange; }; + export type QueryLnInvoicePaymentStatusArgs = { input: LnInvoicePaymentStatusInput; }; + export type QueryOnChainTxFeeArgs = { - address: Scalars["OnChainAddress"]["input"]; - amount: Scalars["SatAmount"]["input"]; + address: Scalars['OnChainAddress']['input']; + amount: Scalars['SatAmount']['input']; speed?: InputMaybe; - walletId: Scalars["WalletId"]["input"]; + walletId: Scalars['WalletId']['input']; }; + export type QueryOnChainUsdTxFeeArgs = { - address: Scalars["OnChainAddress"]["input"]; - amount: Scalars["CentAmount"]["input"]; + address: Scalars['OnChainAddress']['input']; + amount: Scalars['CentAmount']['input']; speed?: InputMaybe; - walletId: Scalars["WalletId"]["input"]; + walletId: Scalars['WalletId']['input']; }; + export type QueryOnChainUsdTxFeeAsBtcDenominatedArgs = { - address: Scalars["OnChainAddress"]["input"]; - amount: Scalars["SatAmount"]["input"]; + address: Scalars['OnChainAddress']['input']; + amount: Scalars['SatAmount']['input']; speed?: InputMaybe; - walletId: Scalars["WalletId"]["input"]; + walletId: Scalars['WalletId']['input']; }; + export type QueryRealtimePriceArgs = { - currency?: InputMaybe; + currency?: InputMaybe; }; + export type QueryUserDefaultWalletIdArgs = { - username: Scalars["Username"]["input"]; + username: Scalars['Username']['input']; }; + export type QueryUsernameAvailableArgs = { - username: Scalars["Username"]["input"]; + username: Scalars['Username']['input']; }; + export type QueryWelcomeLeaderboardArgs = { input: WelcomeLeaderboardInput; }; export type Quiz = { - readonly __typename: "Quiz"; + readonly __typename: 'Quiz'; /** The reward in Satoshis for the quiz question */ - readonly amount: Scalars["SatAmount"]["output"]; - readonly completed: Scalars["Boolean"]["output"]; - readonly id: Scalars["ID"]["output"]; + readonly amount: Scalars['SatAmount']['output']; + readonly completed: Scalars['Boolean']['output']; + readonly id: Scalars['ID']['output']; }; export type QuizCompletedInput = { - readonly id: Scalars["ID"]["input"]; + readonly id: Scalars['ID']['input']; }; export type QuizCompletedPayload = { - readonly __typename: "QuizCompletedPayload"; + readonly __typename: 'QuizCompletedPayload'; readonly errors: ReadonlyArray; readonly quiz?: Maybe; }; export type QuizQuestion = { - readonly __typename: "QuizQuestion"; + readonly __typename: 'QuizQuestion'; /** The earn reward in Satoshis for the quiz question */ - readonly earnAmount: Scalars["SatAmount"]["output"]; - readonly id: Scalars["ID"]["output"]; + readonly earnAmount: Scalars['SatAmount']['output']; + readonly id: Scalars['ID']['output']; }; export type RealtimePrice = { - readonly __typename: "RealtimePrice"; + readonly __typename: 'RealtimePrice'; readonly btcSatPrice: PriceOfOneSatInMinorUnit; - readonly denominatorCurrency: Scalars["DisplayCurrency"]["output"]; - readonly id: Scalars["ID"]["output"]; + readonly denominatorCurrency: Scalars['DisplayCurrency']['output']; + readonly id: Scalars['ID']['output']; /** Unix timestamp (number of seconds elapsed since January 1, 1970 00:00:00 UTC) */ - readonly timestamp: Scalars["Timestamp"]["output"]; + readonly timestamp: Scalars['Timestamp']['output']; readonly usdCentPrice: PriceOfOneUsdCentInMinorUnit; }; export type RealtimePriceInput = { - readonly currency?: InputMaybe; + readonly currency?: InputMaybe; }; export type RealtimePricePayload = { - readonly __typename: "RealtimePricePayload"; + readonly __typename: 'RealtimePricePayload'; readonly errors: ReadonlyArray; readonly realtimePrice?: Maybe; }; export type SatAmountPayload = { - readonly __typename: "SatAmountPayload"; - readonly amount?: Maybe; + readonly __typename: 'SatAmountPayload'; + readonly amount?: Maybe; readonly errors: ReadonlyArray; }; -export type SettlementVia = - | SettlementViaIntraLedger - | SettlementViaLn - | SettlementViaOnChain; +export type SettlementVia = SettlementViaIntraLedger | SettlementViaLn | SettlementViaOnChain; export type SettlementViaIntraLedger = { - readonly __typename: "SettlementViaIntraLedger"; + readonly __typename: 'SettlementViaIntraLedger'; /** Settlement destination: Could be null if the payee does not have a username */ - readonly counterPartyUsername?: Maybe; - readonly counterPartyWalletId?: Maybe; + readonly counterPartyUsername?: Maybe; + readonly counterPartyWalletId?: Maybe; }; export type SettlementViaLn = { - readonly __typename: "SettlementViaLn"; + readonly __typename: 'SettlementViaLn'; /** @deprecated Shifting property to 'preImage' to improve granularity of the LnPaymentSecret type */ - readonly paymentSecret?: Maybe; - readonly preImage?: Maybe; + readonly paymentSecret?: Maybe; + readonly preImage?: Maybe; }; export type SettlementViaOnChain = { - readonly __typename: "SettlementViaOnChain"; - readonly transactionHash?: Maybe; - readonly vout?: Maybe; + readonly __typename: 'SettlementViaOnChain'; + readonly transactionHash?: Maybe; + readonly vout?: Maybe; }; export type Subscription = { - readonly __typename: "Subscription"; + readonly __typename: 'Subscription'; readonly lnInvoicePaymentStatus: LnInvoicePaymentStatusPayload; readonly myUpdates: MyUpdatesPayload; readonly price: PricePayload; @@ -1400,22 +1419,25 @@ export type Subscription = { readonly realtimePrice: RealtimePricePayload; }; + export type SubscriptionLnInvoicePaymentStatusArgs = { input: LnInvoicePaymentStatusInput; }; + export type SubscriptionPriceArgs = { input: PriceInput; }; + export type SubscriptionRealtimePriceArgs = { input: RealtimePriceInput; }; export type SuccessPayload = { - readonly __typename: "SuccessPayload"; + readonly __typename: 'SuccessPayload'; readonly errors: ReadonlyArray; - readonly success?: Maybe; + readonly success?: Maybe; }; /** @@ -1426,21 +1448,21 @@ export type SuccessPayload = { * or with lightning but settled intraledger. */ export type Transaction = { - readonly __typename: "Transaction"; - readonly createdAt: Scalars["Timestamp"]["output"]; + readonly __typename: 'Transaction'; + readonly createdAt: Scalars['Timestamp']['output']; readonly direction: TxDirection; - readonly id: Scalars["ID"]["output"]; + readonly id: Scalars['ID']['output']; /** From which protocol the payment has been initiated. */ readonly initiationVia: InitiationVia; - readonly memo?: Maybe; + readonly memo?: Maybe; /** Amount of the settlement currency sent or received. */ - readonly settlementAmount: Scalars["SignedAmount"]["output"]; + readonly settlementAmount: Scalars['SignedAmount']['output']; /** Wallet currency for transaction. */ readonly settlementCurrency: WalletCurrency; - readonly settlementDisplayAmount: Scalars["SignedDisplayMajorAmount"]["output"]; - readonly settlementDisplayCurrency: Scalars["DisplayCurrency"]["output"]; - readonly settlementDisplayFee: Scalars["SignedDisplayMajorAmount"]["output"]; - readonly settlementFee: Scalars["SignedAmount"]["output"]; + readonly settlementDisplayAmount: Scalars['SignedDisplayMajorAmount']['output']; + readonly settlementDisplayCurrency: Scalars['DisplayCurrency']['output']; + readonly settlementDisplayFee: Scalars['SignedDisplayMajorAmount']['output']; + readonly settlementFee: Scalars['SignedAmount']['output']; /** Price in WALLETCURRENCY/SETTLEMENTUNIT at time of settlement. */ readonly settlementPrice: PriceOfOneSettlementMinorUnitInDisplayMinorUnit; /** To which protocol the payment has settled on. */ @@ -1450,7 +1472,7 @@ export type Transaction = { /** A connection to a list of items. */ export type TransactionConnection = { - readonly __typename: "TransactionConnection"; + readonly __typename: 'TransactionConnection'; /** A list of edges. */ readonly edges?: Maybe>; /** Information to aid in pagination. */ @@ -1459,76 +1481,77 @@ export type TransactionConnection = { /** An edge in a connection. */ export type TransactionEdge = { - readonly __typename: "TransactionEdge"; + readonly __typename: 'TransactionEdge'; /** A cursor for use in pagination */ - readonly cursor: Scalars["String"]["output"]; + readonly cursor: Scalars['String']['output']; /** The item at the end of the edge */ readonly node: Transaction; }; export const TxDirection = { - Receive: "RECEIVE", - Send: "SEND", + Receive: 'RECEIVE', + Send: 'SEND' } as const; -export type TxDirection = (typeof TxDirection)[keyof typeof TxDirection]; +export type TxDirection = typeof TxDirection[keyof typeof TxDirection]; export const TxNotificationType = { - IntraLedgerPayment: "IntraLedgerPayment", - IntraLedgerReceipt: "IntraLedgerReceipt", - LnInvoicePaid: "LnInvoicePaid", - OnchainPayment: "OnchainPayment", - OnchainReceipt: "OnchainReceipt", - OnchainReceiptPending: "OnchainReceiptPending", + IntraLedgerPayment: 'IntraLedgerPayment', + IntraLedgerReceipt: 'IntraLedgerReceipt', + LnInvoicePaid: 'LnInvoicePaid', + OnchainPayment: 'OnchainPayment', + OnchainReceipt: 'OnchainReceipt', + OnchainReceiptPending: 'OnchainReceiptPending' } as const; -export type TxNotificationType = - (typeof TxNotificationType)[keyof typeof TxNotificationType]; +export type TxNotificationType = typeof TxNotificationType[keyof typeof TxNotificationType]; export const TxStatus = { - Failure: "FAILURE", - Pending: "PENDING", - Success: "SUCCESS", + Failure: 'FAILURE', + Pending: 'PENDING', + Success: 'SUCCESS' } as const; -export type TxStatus = (typeof TxStatus)[keyof typeof TxStatus]; +export type TxStatus = typeof TxStatus[keyof typeof TxStatus]; export type UpgradePayload = { - readonly __typename: "UpgradePayload"; - readonly authToken?: Maybe; + readonly __typename: 'UpgradePayload'; + readonly authToken?: Maybe; readonly errors: ReadonlyArray; - readonly success: Scalars["Boolean"]["output"]; + readonly success: Scalars['Boolean']['output']; }; /** A wallet belonging to an account which contains a USD balance and a list of transactions. */ export type UsdWallet = Wallet & { - readonly __typename: "UsdWallet"; - readonly accountId: Scalars["ID"]["output"]; - readonly balance: Scalars["SignedAmount"]["output"]; - readonly id: Scalars["ID"]["output"]; + readonly __typename: 'UsdWallet'; + readonly accountId: Scalars['ID']['output']; + readonly balance: Scalars['SignedAmount']['output']; + readonly id: Scalars['ID']['output']; /** An unconfirmed incoming onchain balance. */ - readonly pendingIncomingBalance: Scalars["SignedAmount"]["output"]; + readonly pendingIncomingBalance: Scalars['SignedAmount']['output']; readonly transactions?: Maybe; readonly transactionsByAddress?: Maybe; readonly walletCurrency: WalletCurrency; }; + /** A wallet belonging to an account which contains a USD balance and a list of transactions. */ export type UsdWalletTransactionsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; + /** A wallet belonging to an account which contains a USD balance and a list of transactions. */ export type UsdWalletTransactionsByAddressArgs = { - address: Scalars["OnChainAddress"]["input"]; - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + address: Scalars['OnChainAddress']['input']; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type User = { - readonly __typename: "User"; + readonly __typename: 'User'; /** * Get single contact details. * Can include the transactions associated with the contact. @@ -1541,217 +1564,202 @@ export type User = { * @deprecated will be moved to account */ readonly contacts: ReadonlyArray; - readonly createdAt: Scalars["Timestamp"]["output"]; + readonly createdAt: Scalars['Timestamp']['output']; readonly defaultAccount: Account; /** Email address */ readonly email?: Maybe; - readonly id: Scalars["ID"]["output"]; + readonly id: Scalars['ID']['output']; /** * Preferred language for user. * When value is 'default' the intent is to use preferred language from OS settings. */ - readonly language: Scalars["Language"]["output"]; + readonly language: Scalars['Language']['output']; /** Phone number with international calling code. */ - readonly phone?: Maybe; + readonly phone?: Maybe; /** * List the quiz questions the user may have completed. * @deprecated use Quiz from Account instead */ readonly quizQuestions: ReadonlyArray; /** Whether TOTP is enabled for this user. */ - readonly totpEnabled: Scalars["Boolean"]["output"]; + readonly totpEnabled: Scalars['Boolean']['output']; /** * Optional immutable user friendly identifier. * @deprecated will be moved to @Handle in Account and Wallet */ - readonly username?: Maybe; + readonly username?: Maybe; }; + export type UserContactByUsernameArgs = { - username: Scalars["Username"]["input"]; + username: Scalars['Username']['input']; }; export type UserContact = { - readonly __typename: "UserContact"; + readonly __typename: 'UserContact'; /** * Alias the user can set for this contact. * Only the user can see the alias attached to their contact. */ - readonly alias?: Maybe; - readonly id: Scalars["Username"]["output"]; + readonly alias?: Maybe; + readonly id: Scalars['Username']['output']; /** Paginated list of transactions sent to/from this contact. */ readonly transactions?: Maybe; - readonly transactionsCount: Scalars["Int"]["output"]; + readonly transactionsCount: Scalars['Int']['output']; /** Actual identifier of the contact. */ - readonly username: Scalars["Username"]["output"]; + readonly username: Scalars['Username']['output']; }; + export type UserContactTransactionsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export type UserContactUpdateAliasInput = { - readonly alias: Scalars["ContactAlias"]["input"]; - readonly username: Scalars["Username"]["input"]; + readonly alias: Scalars['ContactAlias']['input']; + readonly username: Scalars['Username']['input']; }; export type UserContactUpdateAliasPayload = { - readonly __typename: "UserContactUpdateAliasPayload"; + readonly __typename: 'UserContactUpdateAliasPayload'; readonly contact?: Maybe; readonly errors: ReadonlyArray; }; export type UserEmailDeletePayload = { - readonly __typename: "UserEmailDeletePayload"; + readonly __typename: 'UserEmailDeletePayload'; readonly errors: ReadonlyArray; readonly me?: Maybe; }; export type UserEmailRegistrationInitiateInput = { - readonly email: Scalars["EmailAddress"]["input"]; + readonly email: Scalars['EmailAddress']['input']; }; export type UserEmailRegistrationInitiatePayload = { - readonly __typename: "UserEmailRegistrationInitiatePayload"; - readonly emailRegistrationId?: Maybe< - Scalars["EmailRegistrationId"]["output"] - >; + readonly __typename: 'UserEmailRegistrationInitiatePayload'; + readonly emailRegistrationId?: Maybe; readonly errors: ReadonlyArray; readonly me?: Maybe; }; export type UserEmailRegistrationValidateInput = { - readonly code: Scalars["OneTimeAuthCode"]["input"]; - readonly emailRegistrationId: Scalars["EmailRegistrationId"]["input"]; + readonly code: Scalars['OneTimeAuthCode']['input']; + readonly emailRegistrationId: Scalars['EmailRegistrationId']['input']; }; export type UserEmailRegistrationValidatePayload = { - readonly __typename: "UserEmailRegistrationValidatePayload"; + readonly __typename: 'UserEmailRegistrationValidatePayload'; readonly errors: ReadonlyArray; readonly me?: Maybe; }; export type UserLoginInput = { - readonly code: Scalars["OneTimeAuthCode"]["input"]; - readonly phone: Scalars["Phone"]["input"]; + readonly code: Scalars['OneTimeAuthCode']['input']; + readonly phone: Scalars['Phone']['input']; }; export type UserLoginUpgradeInput = { - readonly code: Scalars["OneTimeAuthCode"]["input"]; - readonly phone: Scalars["Phone"]["input"]; + readonly code: Scalars['OneTimeAuthCode']['input']; + readonly phone: Scalars['Phone']['input']; }; export type UserLogoutInput = { - readonly deviceToken: Scalars["String"]["input"]; + readonly deviceToken: Scalars['String']['input']; }; export type UserPhoneDeletePayload = { - readonly __typename: "UserPhoneDeletePayload"; + readonly __typename: 'UserPhoneDeletePayload'; readonly errors: ReadonlyArray; readonly me?: Maybe; }; export type UserPhoneRegistrationInitiateInput = { readonly channel?: InputMaybe; - readonly phone: Scalars["Phone"]["input"]; + readonly phone: Scalars['Phone']['input']; }; export type UserPhoneRegistrationValidateInput = { - readonly code: Scalars["OneTimeAuthCode"]["input"]; - readonly phone: Scalars["Phone"]["input"]; + readonly code: Scalars['OneTimeAuthCode']['input']; + readonly phone: Scalars['Phone']['input']; }; export type UserPhoneRegistrationValidatePayload = { - readonly __typename: "UserPhoneRegistrationValidatePayload"; + readonly __typename: 'UserPhoneRegistrationValidatePayload'; readonly errors: ReadonlyArray; readonly me?: Maybe; }; export type UserQuizQuestion = { - readonly __typename: "UserQuizQuestion"; - readonly completed: Scalars["Boolean"]["output"]; + readonly __typename: 'UserQuizQuestion'; + readonly completed: Scalars['Boolean']['output']; readonly question: QuizQuestion; }; -export type UserQuizQuestionUpdateCompletedInput = { - readonly id: Scalars["ID"]["input"]; -}; - -export type UserQuizQuestionUpdateCompletedPayload = { - readonly __typename: "UserQuizQuestionUpdateCompletedPayload"; - readonly errors: ReadonlyArray; - readonly userQuizQuestion?: Maybe; -}; - export type UserTotpDeleteInput = { - readonly authToken: Scalars["AuthToken"]["input"]; + readonly authToken: Scalars['AuthToken']['input']; }; export type UserTotpDeletePayload = { - readonly __typename: "UserTotpDeletePayload"; + readonly __typename: 'UserTotpDeletePayload'; readonly errors: ReadonlyArray; readonly me?: Maybe; }; export type UserTotpRegistrationInitiateInput = { - readonly authToken: Scalars["AuthToken"]["input"]; + readonly authToken: Scalars['AuthToken']['input']; }; export type UserTotpRegistrationInitiatePayload = { - readonly __typename: "UserTotpRegistrationInitiatePayload"; + readonly __typename: 'UserTotpRegistrationInitiatePayload'; readonly errors: ReadonlyArray; - readonly totpRegistrationId?: Maybe; - readonly totpSecret?: Maybe; + readonly totpRegistrationId?: Maybe; + readonly totpSecret?: Maybe; }; export type UserTotpRegistrationValidateInput = { - readonly authToken: Scalars["AuthToken"]["input"]; - readonly totpCode: Scalars["TotpCode"]["input"]; - readonly totpRegistrationId: Scalars["TotpRegistrationId"]["input"]; + readonly authToken: Scalars['AuthToken']['input']; + readonly totpCode: Scalars['TotpCode']['input']; + readonly totpRegistrationId: Scalars['TotpRegistrationId']['input']; }; export type UserTotpRegistrationValidatePayload = { - readonly __typename: "UserTotpRegistrationValidatePayload"; + readonly __typename: 'UserTotpRegistrationValidatePayload'; readonly errors: ReadonlyArray; readonly me?: Maybe; }; -export type UserUpdate = - | IntraLedgerUpdate - | LnUpdate - | OnChainUpdate - | Price - | RealtimePrice; +export type UserUpdate = IntraLedgerUpdate | LnUpdate | OnChainUpdate | Price | RealtimePrice; export type UserUpdateLanguageInput = { - readonly language: Scalars["Language"]["input"]; + readonly language: Scalars['Language']['input']; }; export type UserUpdateLanguagePayload = { - readonly __typename: "UserUpdateLanguagePayload"; + readonly __typename: 'UserUpdateLanguagePayload'; readonly errors: ReadonlyArray; readonly user?: Maybe; }; export type UserUpdateUsernameInput = { - readonly username: Scalars["Username"]["input"]; + readonly username: Scalars['Username']['input']; }; export type UserUpdateUsernamePayload = { - readonly __typename: "UserUpdateUsernamePayload"; + readonly __typename: 'UserUpdateUsernamePayload'; readonly errors: ReadonlyArray; readonly user?: Maybe; }; /** A generic wallet which stores value in one of our supported currencies. */ export type Wallet = { - readonly accountId: Scalars["ID"]["output"]; - readonly balance: Scalars["SignedAmount"]["output"]; - readonly id: Scalars["ID"]["output"]; - readonly pendingIncomingBalance: Scalars["SignedAmount"]["output"]; + readonly accountId: Scalars['ID']['output']; + readonly balance: Scalars['SignedAmount']['output']; + readonly id: Scalars['ID']['output']; + readonly pendingIncomingBalance: Scalars['SignedAmount']['output']; /** * Transactions are ordered anti-chronologically, * ie: the newest transaction will be first @@ -1765,318 +1773,268 @@ export type Wallet = { readonly walletCurrency: WalletCurrency; }; + /** A generic wallet which stores value in one of our supported currencies. */ export type WalletTransactionsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; + /** A generic wallet which stores value in one of our supported currencies. */ export type WalletTransactionsByAddressArgs = { - address: Scalars["OnChainAddress"]["input"]; - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; + address: Scalars['OnChainAddress']['input']; + after?: InputMaybe; + before?: InputMaybe; + first?: InputMaybe; + last?: InputMaybe; }; export const WalletCurrency = { - Btc: "BTC", - Usd: "USD", + Btc: 'BTC', + Usd: 'USD' } as const; -export type WalletCurrency = - (typeof WalletCurrency)[keyof typeof WalletCurrency]; +export type WalletCurrency = typeof WalletCurrency[keyof typeof WalletCurrency]; export type WelcomeLeaderboardInput = { readonly range: WelcomeRange; }; export type WelcomeProfile = { - readonly __typename: "WelcomeProfile"; - readonly allTimePoints: Scalars["Int"]["output"]; - readonly allTimeRank: Scalars["Int"]["output"]; - readonly innerCircleAllTimeCount: Scalars["Int"]["output"]; - readonly innerCircleThisMonthCount: Scalars["Int"]["output"]; - readonly leaderboardName?: Maybe; - readonly outerCircleAllTimeCount: Scalars["Int"]["output"]; - readonly outerCircleThisMonthCount: Scalars["Int"]["output"]; - readonly thisMonthPoints: Scalars["Int"]["output"]; - readonly thisMonthRank: Scalars["Int"]["output"]; + readonly __typename: 'WelcomeProfile'; + readonly allTimePoints: Scalars['Int']['output']; + readonly allTimeRank: Scalars['Int']['output']; + readonly innerCircleAllTimeCount: Scalars['Int']['output']; + readonly innerCircleThisMonthCount: Scalars['Int']['output']; + readonly leaderboardName?: Maybe; + readonly outerCircleAllTimeCount: Scalars['Int']['output']; + readonly outerCircleThisMonthCount: Scalars['Int']['output']; + readonly thisMonthPoints: Scalars['Int']['output']; + readonly thisMonthRank: Scalars['Int']['output']; }; export const WelcomeRange = { - AllTime: "AllTime", - ThisMonth: "ThisMonth", + AllTime: 'AllTime', + ThisMonth: 'ThisMonth' } as const; -export type WelcomeRange = (typeof WelcomeRange)[keyof typeof WelcomeRange]; +export type WelcomeRange = typeof WelcomeRange[keyof typeof WelcomeRange]; +export type UserEmailRegistrationInitiateMutationVariables = Exact<{ + input: UserEmailRegistrationInitiateInput; +}>; + + +export type UserEmailRegistrationInitiateMutation = { readonly __typename: 'Mutation', readonly userEmailRegistrationInitiate: { readonly __typename: 'UserEmailRegistrationInitiatePayload', readonly emailRegistrationId?: string | null, readonly errors: ReadonlyArray<{ readonly __typename: 'GraphQLApplicationError', readonly message: string, readonly code?: string | null }> } }; + +export type UserEmailRegistrationValidateMutationVariables = Exact<{ + input: UserEmailRegistrationValidateInput; +}>; + + +export type UserEmailRegistrationValidateMutation = { readonly __typename: 'Mutation', readonly userEmailRegistrationValidate: { readonly __typename: 'UserEmailRegistrationValidatePayload', readonly errors: ReadonlyArray<{ readonly __typename: 'GraphQLApplicationError', readonly message: string, readonly code?: string | null }> } }; + +export type UserEmailDeleteMutationVariables = Exact<{ [key: string]: never; }>; + + +export type UserEmailDeleteMutation = { readonly __typename: 'Mutation', readonly userEmailDelete: { readonly __typename: 'UserEmailDeletePayload', readonly errors: ReadonlyArray<{ readonly __typename: 'GraphQLApplicationError', readonly code?: string | null, readonly message: string }> } }; + export type GetPaginatedTransactionsQueryVariables = Exact<{ - first?: InputMaybe; - after?: InputMaybe; - before?: InputMaybe; + first?: InputMaybe; + after?: InputMaybe; + before?: InputMaybe; }>; -export type GetPaginatedTransactionsQuery = { - readonly __typename: "Query"; - readonly me?: { - readonly __typename: "User"; - readonly id: string; - readonly defaultAccount: { - readonly __typename: "ConsumerAccount"; - readonly transactions?: { - readonly __typename: "TransactionConnection"; - readonly edges?: ReadonlyArray<{ - readonly __typename: "TransactionEdge"; - readonly cursor: string; - readonly node: { - readonly __typename: "Transaction"; - readonly createdAt: number; - readonly direction: TxDirection; - readonly id: string; - readonly memo?: string | null; - readonly settlementAmount: number; - readonly settlementCurrency: WalletCurrency; - readonly settlementDisplayAmount: string; - readonly settlementDisplayCurrency: string; - readonly settlementDisplayFee: string; - readonly settlementFee: number; - readonly status: TxStatus; - readonly settlementVia: - | { - readonly __typename: "SettlementViaIntraLedger"; - readonly counterPartyUsername?: string | null; - readonly counterPartyWalletId?: string | null; - } - | { - readonly __typename: "SettlementViaLn"; - readonly paymentSecret?: string | null; - readonly preImage?: string | null; - } - | { - readonly __typename: "SettlementViaOnChain"; - readonly transactionHash?: string | null; - readonly vout?: number | null; - }; - readonly settlementPrice: { - readonly __typename: "PriceOfOneSettlementMinorUnitInDisplayMinorUnit"; - readonly base: number; - readonly currencyUnit: string; - readonly formattedAmount: string; - readonly offset: number; - }; - readonly initiationVia: - | { - readonly __typename: "InitiationViaIntraLedger"; - readonly counterPartyUsername?: string | null; - readonly counterPartyWalletId?: string | null; - } - | { - readonly __typename: "InitiationViaLn"; - readonly paymentHash: string; - } - | { - readonly __typename: "InitiationViaOnChain"; - readonly address: string; - }; - }; - }> | null; - readonly pageInfo: { - readonly __typename: "PageInfo"; - readonly endCursor?: string | null; - readonly hasNextPage: boolean; - readonly hasPreviousPage: boolean; - readonly startCursor?: string | null; - }; - } | null; - }; - } | null; -}; + +export type GetPaginatedTransactionsQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly transactions?: { readonly __typename: 'TransactionConnection', readonly edges?: ReadonlyArray<{ readonly __typename: 'TransactionEdge', readonly cursor: string, readonly node: { readonly __typename: 'Transaction', readonly createdAt: number, readonly direction: TxDirection, readonly id: string, readonly memo?: string | null, readonly settlementAmount: number, readonly settlementCurrency: WalletCurrency, readonly settlementDisplayAmount: string, readonly settlementDisplayCurrency: string, readonly settlementDisplayFee: string, readonly settlementFee: number, readonly status: TxStatus, readonly settlementVia: { readonly __typename: 'SettlementViaIntraLedger', readonly counterPartyUsername?: string | null, readonly counterPartyWalletId?: string | null } | { readonly __typename: 'SettlementViaLn', readonly paymentSecret?: string | null, readonly preImage?: string | null } | { readonly __typename: 'SettlementViaOnChain', readonly transactionHash?: string | null, readonly vout?: number | null }, readonly settlementPrice: { readonly __typename: 'PriceOfOneSettlementMinorUnitInDisplayMinorUnit', readonly base: number, readonly currencyUnit: string, readonly formattedAmount: string, readonly offset: number }, readonly initiationVia: { readonly __typename: 'InitiationViaIntraLedger', readonly counterPartyUsername?: string | null, readonly counterPartyWalletId?: string | null } | { readonly __typename: 'InitiationViaLn', readonly paymentHash: string } | { readonly __typename: 'InitiationViaOnChain', readonly address: string } } }> | null, readonly pageInfo: { readonly __typename: 'PageInfo', readonly endCursor?: string | null, readonly hasNextPage: boolean, readonly hasPreviousPage: boolean, readonly startCursor?: string | null } } | null } } | null }; export type GetFirstTransactionsQueryVariables = Exact<{ - first?: InputMaybe; + first?: InputMaybe; }>; -export type GetFirstTransactionsQuery = { - readonly __typename: "Query"; - readonly me?: { - readonly __typename: "User"; - readonly id: string; - readonly defaultAccount: { - readonly __typename: "ConsumerAccount"; - readonly transactions?: { - readonly __typename: "TransactionConnection"; - readonly edges?: ReadonlyArray<{ - readonly __typename: "TransactionEdge"; - readonly cursor: string; - readonly node: { - readonly __typename: "Transaction"; - readonly createdAt: number; - readonly direction: TxDirection; - readonly id: string; - readonly memo?: string | null; - readonly settlementAmount: number; - readonly settlementCurrency: WalletCurrency; - readonly settlementDisplayAmount: string; - readonly settlementDisplayCurrency: string; - readonly settlementDisplayFee: string; - readonly settlementFee: number; - readonly status: TxStatus; - readonly settlementVia: - | { - readonly __typename: "SettlementViaIntraLedger"; - readonly counterPartyUsername?: string | null; - readonly counterPartyWalletId?: string | null; - } - | { - readonly __typename: "SettlementViaLn"; - readonly paymentSecret?: string | null; - readonly preImage?: string | null; - } - | { - readonly __typename: "SettlementViaOnChain"; - readonly transactionHash?: string | null; - readonly vout?: number | null; - }; - readonly settlementPrice: { - readonly __typename: "PriceOfOneSettlementMinorUnitInDisplayMinorUnit"; - readonly base: number; - readonly currencyUnit: string; - readonly formattedAmount: string; - readonly offset: number; - }; - readonly initiationVia: - | { - readonly __typename: "InitiationViaIntraLedger"; - readonly counterPartyUsername?: string | null; - readonly counterPartyWalletId?: string | null; - } - | { - readonly __typename: "InitiationViaLn"; - readonly paymentHash: string; - } - | { - readonly __typename: "InitiationViaOnChain"; - readonly address: string; - }; - }; - }> | null; - readonly pageInfo: { - readonly __typename: "PageInfo"; - readonly endCursor?: string | null; - readonly hasNextPage: boolean; - readonly hasPreviousPage: boolean; - readonly startCursor?: string | null; - }; - } | null; - }; - } | null; -}; - -export type MeQueryVariables = Exact<{ [key: string]: never }>; - -export type MeQuery = { - readonly __typename: "Query"; - readonly me?: { - readonly __typename: "User"; - readonly createdAt: number; - readonly id: string; - readonly language: string; - readonly phone?: string | null; - readonly defaultAccount: { - readonly __typename: "ConsumerAccount"; - readonly defaultWalletId: string; - readonly displayCurrency: string; - readonly id: string; - readonly level: AccountLevel; - readonly wallets: ReadonlyArray< - | { - readonly __typename: "BTCWallet"; - readonly accountId: string; - readonly balance: number; - readonly id: string; - readonly pendingIncomingBalance: number; - readonly walletCurrency: WalletCurrency; - } - | { - readonly __typename: "UsdWallet"; - readonly accountId: string; - readonly balance: number; - readonly id: string; - readonly pendingIncomingBalance: number; - readonly walletCurrency: WalletCurrency; - } - >; - }; - } | null; -}; +export type GetFirstTransactionsQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly id: string, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly transactions?: { readonly __typename: 'TransactionConnection', readonly edges?: ReadonlyArray<{ readonly __typename: 'TransactionEdge', readonly cursor: string, readonly node: { readonly __typename: 'Transaction', readonly createdAt: number, readonly direction: TxDirection, readonly id: string, readonly memo?: string | null, readonly settlementAmount: number, readonly settlementCurrency: WalletCurrency, readonly settlementDisplayAmount: string, readonly settlementDisplayCurrency: string, readonly settlementDisplayFee: string, readonly settlementFee: number, readonly status: TxStatus, readonly settlementVia: { readonly __typename: 'SettlementViaIntraLedger', readonly counterPartyUsername?: string | null, readonly counterPartyWalletId?: string | null } | { readonly __typename: 'SettlementViaLn', readonly paymentSecret?: string | null, readonly preImage?: string | null } | { readonly __typename: 'SettlementViaOnChain', readonly transactionHash?: string | null, readonly vout?: number | null }, readonly settlementPrice: { readonly __typename: 'PriceOfOneSettlementMinorUnitInDisplayMinorUnit', readonly base: number, readonly currencyUnit: string, readonly formattedAmount: string, readonly offset: number }, readonly initiationVia: { readonly __typename: 'InitiationViaIntraLedger', readonly counterPartyUsername?: string | null, readonly counterPartyWalletId?: string | null } | { readonly __typename: 'InitiationViaLn', readonly paymentHash: string } | { readonly __typename: 'InitiationViaOnChain', readonly address: string } } }> | null, readonly pageInfo: { readonly __typename: 'PageInfo', readonly endCursor?: string | null, readonly hasNextPage: boolean, readonly hasPreviousPage: boolean, readonly startCursor?: string | null } } | null } } | null }; + +export type MeQueryVariables = Exact<{ [key: string]: never; }>; + + +export type MeQuery = { readonly __typename: 'Query', readonly me?: { readonly __typename: 'User', readonly createdAt: number, readonly id: string, readonly language: string, readonly phone?: string | null, readonly totpEnabled: boolean, readonly username?: string | null, readonly defaultAccount: { readonly __typename: 'ConsumerAccount', readonly defaultWalletId: string, readonly displayCurrency: string, readonly id: string, readonly level: AccountLevel, readonly wallets: ReadonlyArray<{ readonly __typename: 'BTCWallet', readonly accountId: string, readonly balance: number, readonly id: string, readonly pendingIncomingBalance: number, readonly walletCurrency: WalletCurrency } | { readonly __typename: 'UsdWallet', readonly accountId: string, readonly balance: number, readonly id: string, readonly pendingIncomingBalance: number, readonly walletCurrency: WalletCurrency }> }, readonly email?: { readonly __typename: 'Email', readonly address?: string | null, readonly verified?: boolean | null } | null } | null }; + + +export const UserEmailRegistrationInitiateDocument = gql` + mutation UserEmailRegistrationInitiate($input: UserEmailRegistrationInitiateInput!) { + userEmailRegistrationInitiate(input: $input) { + emailRegistrationId + errors { + message + code + } + } +} + `; +export type UserEmailRegistrationInitiateMutationFn = Apollo.MutationFunction; + +/** + * __useUserEmailRegistrationInitiateMutation__ + * + * To run a mutation, you first call `useUserEmailRegistrationInitiateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUserEmailRegistrationInitiateMutation` 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 [userEmailRegistrationInitiateMutation, { data, loading, error }] = useUserEmailRegistrationInitiateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useUserEmailRegistrationInitiateMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UserEmailRegistrationInitiateDocument, options); + } +export type UserEmailRegistrationInitiateMutationHookResult = ReturnType; +export type UserEmailRegistrationInitiateMutationResult = Apollo.MutationResult; +export type UserEmailRegistrationInitiateMutationOptions = Apollo.BaseMutationOptions; +export const UserEmailRegistrationValidateDocument = gql` + mutation UserEmailRegistrationValidate($input: UserEmailRegistrationValidateInput!) { + userEmailRegistrationValidate(input: $input) { + errors { + message + code + } + } +} + `; +export type UserEmailRegistrationValidateMutationFn = Apollo.MutationFunction; + +/** + * __useUserEmailRegistrationValidateMutation__ + * + * To run a mutation, you first call `useUserEmailRegistrationValidateMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUserEmailRegistrationValidateMutation` 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 [userEmailRegistrationValidateMutation, { data, loading, error }] = useUserEmailRegistrationValidateMutation({ + * variables: { + * input: // value for 'input' + * }, + * }); + */ +export function useUserEmailRegistrationValidateMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UserEmailRegistrationValidateDocument, options); + } +export type UserEmailRegistrationValidateMutationHookResult = ReturnType; +export type UserEmailRegistrationValidateMutationResult = Apollo.MutationResult; +export type UserEmailRegistrationValidateMutationOptions = Apollo.BaseMutationOptions; +export const UserEmailDeleteDocument = gql` + mutation UserEmailDelete { + userEmailDelete { + errors { + code + message + } + } +} + `; +export type UserEmailDeleteMutationFn = Apollo.MutationFunction; + +/** + * __useUserEmailDeleteMutation__ + * + * To run a mutation, you first call `useUserEmailDeleteMutation` within a React component and pass it any options that fit your needs. + * When your component renders, `useUserEmailDeleteMutation` 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 [userEmailDeleteMutation, { data, loading, error }] = useUserEmailDeleteMutation({ + * variables: { + * }, + * }); + */ +export function useUserEmailDeleteMutation(baseOptions?: Apollo.MutationHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useMutation(UserEmailDeleteDocument, options); + } +export type UserEmailDeleteMutationHookResult = ReturnType; +export type UserEmailDeleteMutationResult = Apollo.MutationResult; +export type UserEmailDeleteMutationOptions = Apollo.BaseMutationOptions; export const GetPaginatedTransactionsDocument = gql` - query GetPaginatedTransactions($first: Int, $after: String, $before: String) { - me { - id - defaultAccount { - transactions(first: $first, after: $after, before: $before) { - edges { - cursor - node { - createdAt - direction - id - memo - settlementAmount - settlementCurrency - settlementDisplayAmount - settlementDisplayCurrency - settlementDisplayFee - settlementFee - settlementVia { - ... on SettlementViaIntraLedger { - counterPartyUsername - counterPartyWalletId - } - ... on SettlementViaLn { - paymentSecret - preImage - } - ... on SettlementViaOnChain { - transactionHash - vout - } + query GetPaginatedTransactions($first: Int, $after: String, $before: String) { + me { + id + defaultAccount { + transactions(first: $first, after: $after, before: $before) { + edges { + cursor + node { + createdAt + direction + id + memo + settlementAmount + settlementCurrency + settlementDisplayAmount + settlementDisplayCurrency + settlementDisplayFee + settlementFee + settlementVia { + ... on SettlementViaIntraLedger { + counterPartyUsername + counterPartyWalletId } - status - settlementPrice { - base - currencyUnit - formattedAmount - offset + ... on SettlementViaLn { + paymentSecret + preImage } - initiationVia { - ... on InitiationViaIntraLedger { - counterPartyUsername - counterPartyWalletId - } - ... on InitiationViaOnChain { - address - } - ... on InitiationViaLn { - paymentHash - } + ... on SettlementViaOnChain { + transactionHash + vout + } + } + status + settlementPrice { + base + currencyUnit + formattedAmount + offset + } + initiationVia { + ... on InitiationViaIntraLedger { + counterPartyUsername + counterPartyWalletId + } + ... on InitiationViaOnChain { + address + } + ... on InitiationViaLn { + paymentHash } } } - pageInfo { - endCursor - hasNextPage - hasPreviousPage - startCursor - } + } + pageInfo { + endCursor + hasNextPage + hasPreviousPage + startCursor } } } } -`; +} + `; /** * __useGetPaginatedTransactionsQuery__ @@ -2096,105 +2054,82 @@ export const GetPaginatedTransactionsDocument = gql` * }, * }); */ -export function useGetPaginatedTransactionsQuery( - baseOptions?: Apollo.QueryHookOptions< - GetPaginatedTransactionsQuery, - GetPaginatedTransactionsQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery< - GetPaginatedTransactionsQuery, - GetPaginatedTransactionsQueryVariables - >(GetPaginatedTransactionsDocument, options); -} -export function useGetPaginatedTransactionsLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - GetPaginatedTransactionsQuery, - GetPaginatedTransactionsQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - GetPaginatedTransactionsQuery, - GetPaginatedTransactionsQueryVariables - >(GetPaginatedTransactionsDocument, options); -} -export type GetPaginatedTransactionsQueryHookResult = ReturnType< - typeof useGetPaginatedTransactionsQuery ->; -export type GetPaginatedTransactionsLazyQueryHookResult = ReturnType< - typeof useGetPaginatedTransactionsLazyQuery ->; -export type GetPaginatedTransactionsQueryResult = Apollo.QueryResult< - GetPaginatedTransactionsQuery, - GetPaginatedTransactionsQueryVariables ->; +export function useGetPaginatedTransactionsQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetPaginatedTransactionsDocument, options); + } +export function useGetPaginatedTransactionsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetPaginatedTransactionsDocument, options); + } +export type GetPaginatedTransactionsQueryHookResult = ReturnType; +export type GetPaginatedTransactionsLazyQueryHookResult = ReturnType; +export type GetPaginatedTransactionsQueryResult = Apollo.QueryResult; export const GetFirstTransactionsDocument = gql` - query GetFirstTransactions($first: Int) { - me { - id - defaultAccount { - transactions(first: $first) { - edges { - cursor - node { - createdAt - direction - id - memo - settlementAmount - settlementCurrency - settlementDisplayAmount - settlementDisplayCurrency - settlementDisplayFee - settlementFee - settlementVia { - ... on SettlementViaIntraLedger { - counterPartyUsername - counterPartyWalletId - } - ... on SettlementViaLn { - paymentSecret - preImage - } - ... on SettlementViaOnChain { - transactionHash - vout - } + query GetFirstTransactions($first: Int) { + me { + id + defaultAccount { + transactions(first: $first) { + edges { + cursor + node { + createdAt + direction + id + memo + settlementAmount + settlementCurrency + settlementDisplayAmount + settlementDisplayCurrency + settlementDisplayFee + settlementFee + settlementVia { + ... on SettlementViaIntraLedger { + counterPartyUsername + counterPartyWalletId } - status - settlementPrice { - base - currencyUnit - formattedAmount - offset + ... on SettlementViaLn { + paymentSecret + preImage } - initiationVia { - ... on InitiationViaIntraLedger { - counterPartyUsername - counterPartyWalletId - } - ... on InitiationViaOnChain { - address - } - ... on InitiationViaLn { - paymentHash - } + ... on SettlementViaOnChain { + transactionHash + vout + } + } + status + settlementPrice { + base + currencyUnit + formattedAmount + offset + } + initiationVia { + ... on InitiationViaIntraLedger { + counterPartyUsername + counterPartyWalletId + } + ... on InitiationViaOnChain { + address + } + ... on InitiationViaLn { + paymentHash } } } - pageInfo { - endCursor - hasNextPage - hasPreviousPage - startCursor - } + } + pageInfo { + endCursor + hasNextPage + hasPreviousPage + startCursor } } } } -`; +} + `; /** * __useGetFirstTransactionsQuery__ @@ -2212,63 +2147,46 @@ export const GetFirstTransactionsDocument = gql` * }, * }); */ -export function useGetFirstTransactionsQuery( - baseOptions?: Apollo.QueryHookOptions< - GetFirstTransactionsQuery, - GetFirstTransactionsQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery< - GetFirstTransactionsQuery, - GetFirstTransactionsQueryVariables - >(GetFirstTransactionsDocument, options); -} -export function useGetFirstTransactionsLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions< - GetFirstTransactionsQuery, - GetFirstTransactionsQueryVariables - >, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery< - GetFirstTransactionsQuery, - GetFirstTransactionsQueryVariables - >(GetFirstTransactionsDocument, options); -} -export type GetFirstTransactionsQueryHookResult = ReturnType< - typeof useGetFirstTransactionsQuery ->; -export type GetFirstTransactionsLazyQueryHookResult = ReturnType< - typeof useGetFirstTransactionsLazyQuery ->; -export type GetFirstTransactionsQueryResult = Apollo.QueryResult< - GetFirstTransactionsQuery, - GetFirstTransactionsQueryVariables ->; +export function useGetFirstTransactionsQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(GetFirstTransactionsDocument, options); + } +export function useGetFirstTransactionsLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(GetFirstTransactionsDocument, options); + } +export type GetFirstTransactionsQueryHookResult = ReturnType; +export type GetFirstTransactionsLazyQueryHookResult = ReturnType; +export type GetFirstTransactionsQueryResult = Apollo.QueryResult; export const MeDocument = gql` - query me { - me { - createdAt + query me { + me { + createdAt + id + language + phone + defaultAccount { + defaultWalletId + displayCurrency id - language - phone - defaultAccount { - defaultWalletId - displayCurrency + level + wallets { + accountId + balance id - level - wallets { - accountId - balance - id - pendingIncomingBalance - walletCurrency - } + pendingIncomingBalance + walletCurrency } } + totpEnabled + username + email { + address + verified + } } -`; +} + `; /** * __useMeQuery__ @@ -2285,71 +2203,51 @@ export const MeDocument = gql` * }, * }); */ -export function useMeQuery( - baseOptions?: Apollo.QueryHookOptions, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useQuery(MeDocument, options); -} -export function useMeLazyQuery( - baseOptions?: Apollo.LazyQueryHookOptions, -) { - const options = { ...defaultOptions, ...baseOptions }; - return Apollo.useLazyQuery(MeDocument, options); -} +export function useMeQuery(baseOptions?: Apollo.QueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useQuery(MeDocument, options); + } +export function useMeLazyQuery(baseOptions?: Apollo.LazyQueryHookOptions) { + const options = {...defaultOptions, ...baseOptions} + return Apollo.useLazyQuery(MeDocument, options); + } export type MeQueryHookResult = ReturnType; export type MeLazyQueryHookResult = ReturnType; export type MeQueryResult = Apollo.QueryResult; + export type ResolverTypeWrapper = Promise | T; + export type ResolverWithResolve = { resolve: ResolverFn; }; -export type Resolver = - | ResolverFn - | ResolverWithResolve; +export type Resolver = ResolverFn | ResolverWithResolve; export type ResolverFn = ( parent: TParent, args: TArgs, context: TContext, - info: GraphQLResolveInfo, + info: GraphQLResolveInfo ) => Promise | TResult; export type SubscriptionSubscribeFn = ( parent: TParent, args: TArgs, context: TContext, - info: GraphQLResolveInfo, + info: GraphQLResolveInfo ) => AsyncIterable | Promise>; export type SubscriptionResolveFn = ( parent: TParent, args: TArgs, context: TContext, - info: GraphQLResolveInfo, + info: GraphQLResolveInfo ) => TResult | Promise; -export interface SubscriptionSubscriberObject< - TResult, - TKey extends string, - TParent, - TContext, - TArgs, -> { - subscribe: SubscriptionSubscribeFn< - { [key in TKey]: TResult }, - TParent, - TContext, - TArgs - >; - resolve?: SubscriptionResolveFn< - TResult, - { [key in TKey]: TResult }, - TContext, - TArgs - >; +export interface SubscriptionSubscriberObject { + subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult }, TParent, TContext, TArgs>; + resolve?: SubscriptionResolveFn; } export interface SubscriptionResolverObject { @@ -2357,110 +2255,69 @@ export interface SubscriptionResolverObject { resolve: SubscriptionResolveFn; } -export type SubscriptionObject< - TResult, - TKey extends string, - TParent, - TContext, - TArgs, -> = +export type SubscriptionObject = | SubscriptionSubscriberObject | SubscriptionResolverObject; -export type SubscriptionResolver< - TResult, - TKey extends string, - TParent = {}, - TContext = {}, - TArgs = {}, -> = - | (( - ...args: any[] - ) => SubscriptionObject) +export type SubscriptionResolver = + | ((...args: any[]) => SubscriptionObject) | SubscriptionObject; export type TypeResolveFn = ( parent: TParent, context: TContext, - info: GraphQLResolveInfo, + info: GraphQLResolveInfo ) => Maybe | Promise>; -export type IsTypeOfResolverFn = ( - obj: T, - context: TContext, - info: GraphQLResolveInfo, -) => boolean | Promise; +export type IsTypeOfResolverFn = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise; export type NextResolverFn = () => Promise; -export type DirectiveResolverFn< - TResult = {}, - TParent = {}, - TContext = {}, - TArgs = {}, -> = ( +export type DirectiveResolverFn = ( next: NextResolverFn, parent: TParent, args: TArgs, context: TContext, - info: GraphQLResolveInfo, + info: GraphQLResolveInfo ) => TResult | Promise; /** Mapping of union types */ export type ResolversUnionTypes> = { - InitiationVia: - | InitiationViaIntraLedger - | InitiationViaLn - | InitiationViaOnChain; - SettlementVia: - | SettlementViaIntraLedger - | SettlementViaLn - | SettlementViaOnChain; - UserUpdate: - | IntraLedgerUpdate - | LnUpdate - | OnChainUpdate - | Price - | RealtimePrice; + InitiationVia: ( InitiationViaIntraLedger ) | ( InitiationViaLn ) | ( InitiationViaOnChain ); + SettlementVia: ( SettlementViaIntraLedger ) | ( SettlementViaLn ) | ( SettlementViaOnChain ); + UserUpdate: ( IntraLedgerUpdate ) | ( LnUpdate ) | ( OnChainUpdate ) | ( Price ) | ( RealtimePrice ); }; /** Mapping of interface types */ export type ResolversInterfaceTypes> = { - Account: ConsumerAccount; - AccountLimit: OneDayAccountLimit; - Error: GraphQlApplicationError; - PriceInterface: - | PriceOfOneSatInMinorUnit - | PriceOfOneSettlementMinorUnitInDisplayMinorUnit - | PriceOfOneUsdCentInMinorUnit; - Wallet: BtcWallet | UsdWallet; + Account: ( ConsumerAccount ); + AccountLimit: ( OneDayAccountLimit ); + Error: ( GraphQlApplicationError ); + PriceInterface: ( PriceOfOneSatInMinorUnit ) | ( PriceOfOneSettlementMinorUnitInDisplayMinorUnit ) | ( PriceOfOneUsdCentInMinorUnit ); + Wallet: ( BtcWallet ) | ( UsdWallet ); }; /** Mapping between all available schema types and the resolvers types */ export type ResolversTypes = { - Account: ResolverTypeWrapper< - ResolversInterfaceTypes["Account"] - >; - String: ResolverTypeWrapper; - ID: ResolverTypeWrapper; - Int: ResolverTypeWrapper; + Account: ResolverTypeWrapper['Account']>; + String: ResolverTypeWrapper; + ID: ResolverTypeWrapper; + Int: ResolverTypeWrapper; AccountDeletePayload: ResolverTypeWrapper; - Boolean: ResolverTypeWrapper; + Boolean: ResolverTypeWrapper; AccountDisableNotificationCategoryInput: AccountDisableNotificationCategoryInput; AccountDisableNotificationChannelInput: AccountDisableNotificationChannelInput; AccountEnableNotificationCategoryInput: AccountEnableNotificationCategoryInput; AccountEnableNotificationChannelInput: AccountEnableNotificationChannelInput; AccountLevel: AccountLevel; - AccountLimit: ResolverTypeWrapper< - ResolversInterfaceTypes["AccountLimit"] - >; + AccountLimit: ResolverTypeWrapper['AccountLimit']>; AccountLimits: ResolverTypeWrapper; AccountUpdateDefaultWalletIdInput: AccountUpdateDefaultWalletIdInput; AccountUpdateDefaultWalletIdPayload: ResolverTypeWrapper; AccountUpdateDisplayCurrencyInput: AccountUpdateDisplayCurrencyInput; AccountUpdateDisplayCurrencyPayload: ResolverTypeWrapper; AccountUpdateNotificationSettingsPayload: ResolverTypeWrapper; - AuthToken: ResolverTypeWrapper; + AuthToken: ResolverTypeWrapper; AuthTokenPayload: ResolverTypeWrapper; BTCWallet: ResolverTypeWrapper; BuildInformation: ResolverTypeWrapper; @@ -2471,36 +2328,32 @@ export type ResolversTypes = { CaptchaCreateChallengePayload: ResolverTypeWrapper; CaptchaCreateChallengeResult: ResolverTypeWrapper; CaptchaRequestAuthCodeInput: CaptchaRequestAuthCodeInput; - CentAmount: ResolverTypeWrapper; + CentAmount: ResolverTypeWrapper; CentAmountPayload: ResolverTypeWrapper; ConsumerAccount: ResolverTypeWrapper; - ContactAlias: ResolverTypeWrapper; + ContactAlias: ResolverTypeWrapper; Coordinates: ResolverTypeWrapper; - Float: ResolverTypeWrapper; + Float: ResolverTypeWrapper; Country: ResolverTypeWrapper; - CountryCode: ResolverTypeWrapper; + CountryCode: ResolverTypeWrapper; Currency: ResolverTypeWrapper; DepositFeesInformation: ResolverTypeWrapper; DeviceNotificationTokenCreateInput: DeviceNotificationTokenCreateInput; - DisplayCurrency: ResolverTypeWrapper; + DisplayCurrency: ResolverTypeWrapper; Email: ResolverTypeWrapper; - EmailAddress: ResolverTypeWrapper; - EmailRegistrationId: ResolverTypeWrapper< - Scalars["EmailRegistrationId"]["output"] - >; - EndpointId: ResolverTypeWrapper; - EndpointUrl: ResolverTypeWrapper; - Error: ResolverTypeWrapper["Error"]>; + EmailAddress: ResolverTypeWrapper; + EmailRegistrationId: ResolverTypeWrapper; + EndpointId: ResolverTypeWrapper; + EndpointUrl: ResolverTypeWrapper; + Error: ResolverTypeWrapper['Error']>; ExchangeCurrencyUnit: ExchangeCurrencyUnit; - Feedback: ResolverTypeWrapper; + Feedback: ResolverTypeWrapper; FeedbackSubmitInput: FeedbackSubmitInput; FeesInformation: ResolverTypeWrapper; Globals: ResolverTypeWrapper; GraphQLApplicationError: ResolverTypeWrapper; - Hex32Bytes: ResolverTypeWrapper; - InitiationVia: ResolverTypeWrapper< - ResolversUnionTypes["InitiationVia"] - >; + Hex32Bytes: ResolverTypeWrapper; + InitiationVia: ResolverTypeWrapper['InitiationVia']>; InitiationViaIntraLedger: ResolverTypeWrapper; InitiationViaLn: ResolverTypeWrapper; InitiationViaOnChain: ResolverTypeWrapper; @@ -2508,10 +2361,10 @@ export type ResolversTypes = { IntraLedgerUpdate: ResolverTypeWrapper; IntraLedgerUsdPaymentSendInput: IntraLedgerUsdPaymentSendInput; InvoicePaymentStatus: InvoicePaymentStatus; - Language: ResolverTypeWrapper; + Language: ResolverTypeWrapper; Leader: ResolverTypeWrapper; Leaderboard: ResolverTypeWrapper; - LeaderboardName: ResolverTypeWrapper; + LeaderboardName: ResolverTypeWrapper; LnInvoice: ResolverTypeWrapper; LnInvoiceCreateInput: LnInvoiceCreateInput; LnInvoiceCreateOnBehalfOfRecipientInput: LnInvoiceCreateOnBehalfOfRecipientInput; @@ -2528,11 +2381,9 @@ export type ResolversTypes = { LnNoAmountInvoicePaymentInput: LnNoAmountInvoicePaymentInput; LnNoAmountUsdInvoiceFeeProbeInput: LnNoAmountUsdInvoiceFeeProbeInput; LnNoAmountUsdInvoicePaymentInput: LnNoAmountUsdInvoicePaymentInput; - LnPaymentPreImage: ResolverTypeWrapper< - Scalars["LnPaymentPreImage"]["output"] - >; - LnPaymentRequest: ResolverTypeWrapper; - LnPaymentSecret: ResolverTypeWrapper; + LnPaymentPreImage: ResolverTypeWrapper; + LnPaymentRequest: ResolverTypeWrapper; + LnPaymentSecret: ResolverTypeWrapper; LnUpdate: ResolverTypeWrapper; LnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientInput: LnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientInput; LnUsdInvoiceCreateInput: LnUsdInvoiceCreateInput; @@ -2540,49 +2391,41 @@ export type ResolversTypes = { LnUsdInvoiceFeeProbeInput: LnUsdInvoiceFeeProbeInput; MapInfo: ResolverTypeWrapper; MapMarker: ResolverTypeWrapper; - Memo: ResolverTypeWrapper; - Minutes: ResolverTypeWrapper; + Memo: ResolverTypeWrapper; + Minutes: ResolverTypeWrapper; MobileVersions: ResolverTypeWrapper; Mutation: ResolverTypeWrapper<{}>; - MyUpdatesPayload: ResolverTypeWrapper< - Omit & { - update?: Maybe; - } - >; + MyUpdatesPayload: ResolverTypeWrapper & { update?: Maybe }>; Network: Network; - NotificationCategory: ResolverTypeWrapper< - Scalars["NotificationCategory"]["output"] - >; + NotificationCategory: ResolverTypeWrapper; NotificationChannel: NotificationChannel; NotificationChannelSettings: ResolverTypeWrapper; NotificationSettings: ResolverTypeWrapper; - OnChainAddress: ResolverTypeWrapper; + OnChainAddress: ResolverTypeWrapper; OnChainAddressCreateInput: OnChainAddressCreateInput; OnChainAddressCurrentInput: OnChainAddressCurrentInput; OnChainAddressPayload: ResolverTypeWrapper; OnChainPaymentSendAllInput: OnChainPaymentSendAllInput; OnChainPaymentSendInput: OnChainPaymentSendInput; OnChainTxFee: ResolverTypeWrapper; - OnChainTxHash: ResolverTypeWrapper; + OnChainTxHash: ResolverTypeWrapper; OnChainUpdate: ResolverTypeWrapper; OnChainUsdPaymentSendAsBtcDenominatedInput: OnChainUsdPaymentSendAsBtcDenominatedInput; OnChainUsdPaymentSendInput: OnChainUsdPaymentSendInput; OnChainUsdTxFee: ResolverTypeWrapper; OneDayAccountLimit: ResolverTypeWrapper; - OneTimeAuthCode: ResolverTypeWrapper; + OneTimeAuthCode: ResolverTypeWrapper; PageInfo: ResolverTypeWrapper; - PaymentHash: ResolverTypeWrapper; + PaymentHash: ResolverTypeWrapper; PaymentSendPayload: ResolverTypeWrapper; PaymentSendResult: PaymentSendResult; PayoutSpeed: PayoutSpeed; - Phone: ResolverTypeWrapper; + Phone: ResolverTypeWrapper; PhoneCodeChannelType: PhoneCodeChannelType; Price: ResolverTypeWrapper; PriceGraphRange: PriceGraphRange; PriceInput: PriceInput; - PriceInterface: ResolverTypeWrapper< - ResolversInterfaceTypes["PriceInterface"] - >; + PriceInterface: ResolverTypeWrapper['PriceInterface']>; PriceOfOneSatInMinorUnit: ResolverTypeWrapper; PriceOfOneSettlementMinorUnitInDisplayMinorUnit: ResolverTypeWrapper; PriceOfOneUsdCentInMinorUnit: ResolverTypeWrapper; @@ -2597,34 +2440,23 @@ export type ResolversTypes = { RealtimePrice: ResolverTypeWrapper; RealtimePriceInput: RealtimePriceInput; RealtimePricePayload: ResolverTypeWrapper; - SafeInt: ResolverTypeWrapper; - SatAmount: ResolverTypeWrapper; + SafeInt: ResolverTypeWrapper; + SatAmount: ResolverTypeWrapper; SatAmountPayload: ResolverTypeWrapper; - Seconds: ResolverTypeWrapper; - SettlementVia: ResolverTypeWrapper< - ResolversUnionTypes["SettlementVia"] - >; + Seconds: ResolverTypeWrapper; + SettlementVia: ResolverTypeWrapper['SettlementVia']>; SettlementViaIntraLedger: ResolverTypeWrapper; SettlementViaLn: ResolverTypeWrapper; SettlementViaOnChain: ResolverTypeWrapper; - SignedAmount: ResolverTypeWrapper; - SignedDisplayMajorAmount: ResolverTypeWrapper< - Scalars["SignedDisplayMajorAmount"]["output"] - >; + SignedAmount: ResolverTypeWrapper; + SignedDisplayMajorAmount: ResolverTypeWrapper; Subscription: ResolverTypeWrapper<{}>; SuccessPayload: ResolverTypeWrapper; - Timestamp: ResolverTypeWrapper; - TotpCode: ResolverTypeWrapper; - TotpRegistrationId: ResolverTypeWrapper< - Scalars["TotpRegistrationId"]["output"] - >; - TotpSecret: ResolverTypeWrapper; - Transaction: ResolverTypeWrapper< - Omit & { - initiationVia: ResolversTypes["InitiationVia"]; - settlementVia: ResolversTypes["SettlementVia"]; - } - >; + Timestamp: ResolverTypeWrapper; + TotpCode: ResolverTypeWrapper; + TotpRegistrationId: ResolverTypeWrapper; + TotpSecret: ResolverTypeWrapper; + Transaction: ResolverTypeWrapper & { initiationVia: ResolversTypes['InitiationVia'], settlementVia: ResolversTypes['SettlementVia'] }>; TransactionConnection: ResolverTypeWrapper; TransactionEdge: ResolverTypeWrapper; TxDirection: TxDirection; @@ -2649,27 +2481,21 @@ export type ResolversTypes = { UserPhoneRegistrationValidateInput: UserPhoneRegistrationValidateInput; UserPhoneRegistrationValidatePayload: ResolverTypeWrapper; UserQuizQuestion: ResolverTypeWrapper; - UserQuizQuestionUpdateCompletedInput: UserQuizQuestionUpdateCompletedInput; - UserQuizQuestionUpdateCompletedPayload: ResolverTypeWrapper; UserTotpDeleteInput: UserTotpDeleteInput; UserTotpDeletePayload: ResolverTypeWrapper; UserTotpRegistrationInitiateInput: UserTotpRegistrationInitiateInput; UserTotpRegistrationInitiatePayload: ResolverTypeWrapper; UserTotpRegistrationValidateInput: UserTotpRegistrationValidateInput; UserTotpRegistrationValidatePayload: ResolverTypeWrapper; - UserUpdate: ResolverTypeWrapper< - ResolversUnionTypes["UserUpdate"] - >; + UserUpdate: ResolverTypeWrapper['UserUpdate']>; UserUpdateLanguageInput: UserUpdateLanguageInput; UserUpdateLanguagePayload: ResolverTypeWrapper; UserUpdateUsernameInput: UserUpdateUsernameInput; UserUpdateUsernamePayload: ResolverTypeWrapper; - Username: ResolverTypeWrapper; - Wallet: ResolverTypeWrapper< - ResolversInterfaceTypes["Wallet"] - >; + Username: ResolverTypeWrapper; + Wallet: ResolverTypeWrapper['Wallet']>; WalletCurrency: WalletCurrency; - WalletId: ResolverTypeWrapper; + WalletId: ResolverTypeWrapper; WelcomeLeaderboardInput: WelcomeLeaderboardInput; WelcomeProfile: ResolverTypeWrapper; WelcomeRange: WelcomeRange; @@ -2677,24 +2503,24 @@ export type ResolversTypes = { /** Mapping between all available schema types and the resolvers parents */ export type ResolversParentTypes = { - Account: ResolversInterfaceTypes["Account"]; - String: Scalars["String"]["output"]; - ID: Scalars["ID"]["output"]; - Int: Scalars["Int"]["output"]; + Account: ResolversInterfaceTypes['Account']; + String: Scalars['String']['output']; + ID: Scalars['ID']['output']; + Int: Scalars['Int']['output']; AccountDeletePayload: AccountDeletePayload; - Boolean: Scalars["Boolean"]["output"]; + Boolean: Scalars['Boolean']['output']; AccountDisableNotificationCategoryInput: AccountDisableNotificationCategoryInput; AccountDisableNotificationChannelInput: AccountDisableNotificationChannelInput; AccountEnableNotificationCategoryInput: AccountEnableNotificationCategoryInput; AccountEnableNotificationChannelInput: AccountEnableNotificationChannelInput; - AccountLimit: ResolversInterfaceTypes["AccountLimit"]; + AccountLimit: ResolversInterfaceTypes['AccountLimit']; AccountLimits: AccountLimits; AccountUpdateDefaultWalletIdInput: AccountUpdateDefaultWalletIdInput; AccountUpdateDefaultWalletIdPayload: AccountUpdateDefaultWalletIdPayload; AccountUpdateDisplayCurrencyInput: AccountUpdateDisplayCurrencyInput; AccountUpdateDisplayCurrencyPayload: AccountUpdateDisplayCurrencyPayload; AccountUpdateNotificationSettingsPayload: AccountUpdateNotificationSettingsPayload; - AuthToken: Scalars["AuthToken"]["output"]; + AuthToken: Scalars['AuthToken']['output']; AuthTokenPayload: AuthTokenPayload; BTCWallet: BtcWallet; BuildInformation: BuildInformation; @@ -2705,41 +2531,41 @@ export type ResolversParentTypes = { CaptchaCreateChallengePayload: CaptchaCreateChallengePayload; CaptchaCreateChallengeResult: CaptchaCreateChallengeResult; CaptchaRequestAuthCodeInput: CaptchaRequestAuthCodeInput; - CentAmount: Scalars["CentAmount"]["output"]; + CentAmount: Scalars['CentAmount']['output']; CentAmountPayload: CentAmountPayload; ConsumerAccount: ConsumerAccount; - ContactAlias: Scalars["ContactAlias"]["output"]; + ContactAlias: Scalars['ContactAlias']['output']; Coordinates: Coordinates; - Float: Scalars["Float"]["output"]; + Float: Scalars['Float']['output']; Country: Country; - CountryCode: Scalars["CountryCode"]["output"]; + CountryCode: Scalars['CountryCode']['output']; Currency: Currency; DepositFeesInformation: DepositFeesInformation; DeviceNotificationTokenCreateInput: DeviceNotificationTokenCreateInput; - DisplayCurrency: Scalars["DisplayCurrency"]["output"]; + DisplayCurrency: Scalars['DisplayCurrency']['output']; Email: Email; - EmailAddress: Scalars["EmailAddress"]["output"]; - EmailRegistrationId: Scalars["EmailRegistrationId"]["output"]; - EndpointId: Scalars["EndpointId"]["output"]; - EndpointUrl: Scalars["EndpointUrl"]["output"]; - Error: ResolversInterfaceTypes["Error"]; - Feedback: Scalars["Feedback"]["output"]; + EmailAddress: Scalars['EmailAddress']['output']; + EmailRegistrationId: Scalars['EmailRegistrationId']['output']; + EndpointId: Scalars['EndpointId']['output']; + EndpointUrl: Scalars['EndpointUrl']['output']; + Error: ResolversInterfaceTypes['Error']; + Feedback: Scalars['Feedback']['output']; FeedbackSubmitInput: FeedbackSubmitInput; FeesInformation: FeesInformation; Globals: Globals; GraphQLApplicationError: GraphQlApplicationError; - Hex32Bytes: Scalars["Hex32Bytes"]["output"]; - InitiationVia: ResolversUnionTypes["InitiationVia"]; + Hex32Bytes: Scalars['Hex32Bytes']['output']; + InitiationVia: ResolversUnionTypes['InitiationVia']; InitiationViaIntraLedger: InitiationViaIntraLedger; InitiationViaLn: InitiationViaLn; InitiationViaOnChain: InitiationViaOnChain; IntraLedgerPaymentSendInput: IntraLedgerPaymentSendInput; IntraLedgerUpdate: IntraLedgerUpdate; IntraLedgerUsdPaymentSendInput: IntraLedgerUsdPaymentSendInput; - Language: Scalars["Language"]["output"]; + Language: Scalars['Language']['output']; Leader: Leader; Leaderboard: Leaderboard; - LeaderboardName: Scalars["LeaderboardName"]["output"]; + LeaderboardName: Scalars['LeaderboardName']['output']; LnInvoice: LnInvoice; LnInvoiceCreateInput: LnInvoiceCreateInput; LnInvoiceCreateOnBehalfOfRecipientInput: LnInvoiceCreateOnBehalfOfRecipientInput; @@ -2756,9 +2582,9 @@ export type ResolversParentTypes = { LnNoAmountInvoicePaymentInput: LnNoAmountInvoicePaymentInput; LnNoAmountUsdInvoiceFeeProbeInput: LnNoAmountUsdInvoiceFeeProbeInput; LnNoAmountUsdInvoicePaymentInput: LnNoAmountUsdInvoicePaymentInput; - LnPaymentPreImage: Scalars["LnPaymentPreImage"]["output"]; - LnPaymentRequest: Scalars["LnPaymentRequest"]["output"]; - LnPaymentSecret: Scalars["LnPaymentSecret"]["output"]; + LnPaymentPreImage: Scalars['LnPaymentPreImage']['output']; + LnPaymentRequest: Scalars['LnPaymentRequest']['output']; + LnPaymentSecret: Scalars['LnPaymentSecret']['output']; LnUpdate: LnUpdate; LnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientInput: LnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientInput; LnUsdInvoiceCreateInput: LnUsdInvoiceCreateInput; @@ -2766,37 +2592,35 @@ export type ResolversParentTypes = { LnUsdInvoiceFeeProbeInput: LnUsdInvoiceFeeProbeInput; MapInfo: MapInfo; MapMarker: MapMarker; - Memo: Scalars["Memo"]["output"]; - Minutes: Scalars["Minutes"]["output"]; + Memo: Scalars['Memo']['output']; + Minutes: Scalars['Minutes']['output']; MobileVersions: MobileVersions; Mutation: {}; - MyUpdatesPayload: Omit & { - update?: Maybe; - }; - NotificationCategory: Scalars["NotificationCategory"]["output"]; + MyUpdatesPayload: Omit & { update?: Maybe }; + NotificationCategory: Scalars['NotificationCategory']['output']; NotificationChannelSettings: NotificationChannelSettings; NotificationSettings: NotificationSettings; - OnChainAddress: Scalars["OnChainAddress"]["output"]; + OnChainAddress: Scalars['OnChainAddress']['output']; OnChainAddressCreateInput: OnChainAddressCreateInput; OnChainAddressCurrentInput: OnChainAddressCurrentInput; OnChainAddressPayload: OnChainAddressPayload; OnChainPaymentSendAllInput: OnChainPaymentSendAllInput; OnChainPaymentSendInput: OnChainPaymentSendInput; OnChainTxFee: OnChainTxFee; - OnChainTxHash: Scalars["OnChainTxHash"]["output"]; + OnChainTxHash: Scalars['OnChainTxHash']['output']; OnChainUpdate: OnChainUpdate; OnChainUsdPaymentSendAsBtcDenominatedInput: OnChainUsdPaymentSendAsBtcDenominatedInput; OnChainUsdPaymentSendInput: OnChainUsdPaymentSendInput; OnChainUsdTxFee: OnChainUsdTxFee; OneDayAccountLimit: OneDayAccountLimit; - OneTimeAuthCode: Scalars["OneTimeAuthCode"]["output"]; + OneTimeAuthCode: Scalars['OneTimeAuthCode']['output']; PageInfo: PageInfo; - PaymentHash: Scalars["PaymentHash"]["output"]; + PaymentHash: Scalars['PaymentHash']['output']; PaymentSendPayload: PaymentSendPayload; - Phone: Scalars["Phone"]["output"]; + Phone: Scalars['Phone']['output']; Price: Price; PriceInput: PriceInput; - PriceInterface: ResolversInterfaceTypes["PriceInterface"]; + PriceInterface: ResolversInterfaceTypes['PriceInterface']; PriceOfOneSatInMinorUnit: PriceOfOneSatInMinorUnit; PriceOfOneSettlementMinorUnitInDisplayMinorUnit: PriceOfOneSettlementMinorUnitInDisplayMinorUnit; PriceOfOneUsdCentInMinorUnit: PriceOfOneUsdCentInMinorUnit; @@ -2811,26 +2635,23 @@ export type ResolversParentTypes = { RealtimePrice: RealtimePrice; RealtimePriceInput: RealtimePriceInput; RealtimePricePayload: RealtimePricePayload; - SafeInt: Scalars["SafeInt"]["output"]; - SatAmount: Scalars["SatAmount"]["output"]; + SafeInt: Scalars['SafeInt']['output']; + SatAmount: Scalars['SatAmount']['output']; SatAmountPayload: SatAmountPayload; - Seconds: Scalars["Seconds"]["output"]; - SettlementVia: ResolversUnionTypes["SettlementVia"]; + Seconds: Scalars['Seconds']['output']; + SettlementVia: ResolversUnionTypes['SettlementVia']; SettlementViaIntraLedger: SettlementViaIntraLedger; SettlementViaLn: SettlementViaLn; SettlementViaOnChain: SettlementViaOnChain; - SignedAmount: Scalars["SignedAmount"]["output"]; - SignedDisplayMajorAmount: Scalars["SignedDisplayMajorAmount"]["output"]; + SignedAmount: Scalars['SignedAmount']['output']; + SignedDisplayMajorAmount: Scalars['SignedDisplayMajorAmount']['output']; Subscription: {}; SuccessPayload: SuccessPayload; - Timestamp: Scalars["Timestamp"]["output"]; - TotpCode: Scalars["TotpCode"]["output"]; - TotpRegistrationId: Scalars["TotpRegistrationId"]["output"]; - TotpSecret: Scalars["TotpSecret"]["output"]; - Transaction: Omit & { - initiationVia: ResolversParentTypes["InitiationVia"]; - settlementVia: ResolversParentTypes["SettlementVia"]; - }; + Timestamp: Scalars['Timestamp']['output']; + TotpCode: Scalars['TotpCode']['output']; + TotpRegistrationId: Scalars['TotpRegistrationId']['output']; + TotpSecret: Scalars['TotpSecret']['output']; + Transaction: Omit & { initiationVia: ResolversParentTypes['InitiationVia'], settlementVia: ResolversParentTypes['SettlementVia'] }; TransactionConnection: TransactionConnection; TransactionEdge: TransactionEdge; UpgradePayload: UpgradePayload; @@ -2852,2385 +2673,902 @@ export type ResolversParentTypes = { UserPhoneRegistrationValidateInput: UserPhoneRegistrationValidateInput; UserPhoneRegistrationValidatePayload: UserPhoneRegistrationValidatePayload; UserQuizQuestion: UserQuizQuestion; - UserQuizQuestionUpdateCompletedInput: UserQuizQuestionUpdateCompletedInput; - UserQuizQuestionUpdateCompletedPayload: UserQuizQuestionUpdateCompletedPayload; UserTotpDeleteInput: UserTotpDeleteInput; UserTotpDeletePayload: UserTotpDeletePayload; UserTotpRegistrationInitiateInput: UserTotpRegistrationInitiateInput; UserTotpRegistrationInitiatePayload: UserTotpRegistrationInitiatePayload; UserTotpRegistrationValidateInput: UserTotpRegistrationValidateInput; UserTotpRegistrationValidatePayload: UserTotpRegistrationValidatePayload; - UserUpdate: ResolversUnionTypes["UserUpdate"]; + UserUpdate: ResolversUnionTypes['UserUpdate']; UserUpdateLanguageInput: UserUpdateLanguageInput; UserUpdateLanguagePayload: UserUpdateLanguagePayload; UserUpdateUsernameInput: UserUpdateUsernameInput; UserUpdateUsernamePayload: UserUpdateUsernamePayload; - Username: Scalars["Username"]["output"]; - Wallet: ResolversInterfaceTypes["Wallet"]; - WalletId: Scalars["WalletId"]["output"]; + Username: Scalars['Username']['output']; + Wallet: ResolversInterfaceTypes['Wallet']; + WalletId: Scalars['WalletId']['output']; WelcomeLeaderboardInput: WelcomeLeaderboardInput; WelcomeProfile: WelcomeProfile; }; export type DeferDirectiveArgs = { - if?: Scalars["Boolean"]["input"]; - label?: Maybe; -}; - -export type DeferDirectiveResolver< - Result, - Parent, - ContextType = any, - Args = DeferDirectiveArgs, -> = DirectiveResolverFn; - -export type AccountResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["Account"] = ResolversParentTypes["Account"], -> = { - __resolveType: TypeResolveFn<"ConsumerAccount", ParentType, ContextType>; - callbackEndpoints?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - csvTransactions?: Resolver< - ResolversTypes["String"], - ParentType, - ContextType, - RequireFields - >; - defaultWalletId?: Resolver< - ResolversTypes["WalletId"], - ParentType, - ContextType - >; - displayCurrency?: Resolver< - ResolversTypes["DisplayCurrency"], - ParentType, - ContextType - >; - id?: Resolver; - level?: Resolver; - limits?: Resolver; - notificationSettings?: Resolver< - ResolversTypes["NotificationSettings"], - ParentType, - ContextType - >; - realtimePrice?: Resolver< - ResolversTypes["RealtimePrice"], - ParentType, - ContextType - >; - transactions?: Resolver< - Maybe, - ParentType, - ContextType, - Partial - >; - wallets?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; -}; - -export type AccountDeletePayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["AccountDeletePayload"] = ResolversParentTypes["AccountDeletePayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - success?: Resolver; + if?: Scalars['Boolean']['input']; + label?: Maybe; +}; + +export type DeferDirectiveResolver = DirectiveResolverFn; + +export type AccountResolvers = { + __resolveType: TypeResolveFn<'ConsumerAccount', ParentType, ContextType>; + callbackEndpoints?: Resolver, ParentType, ContextType>; + csvTransactions?: Resolver>; + defaultWalletId?: Resolver; + displayCurrency?: Resolver; + id?: Resolver; + level?: Resolver; + limits?: Resolver; + notificationSettings?: Resolver; + realtimePrice?: Resolver; + transactions?: Resolver, ParentType, ContextType, Partial>; + wallets?: Resolver, ParentType, ContextType>; +}; + +export type AccountDeletePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + success?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type AccountLimitResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["AccountLimit"] = ResolversParentTypes["AccountLimit"], -> = { - __resolveType: TypeResolveFn<"OneDayAccountLimit", ParentType, ContextType>; - interval?: Resolver< - Maybe, - ParentType, - ContextType - >; - remainingLimit?: Resolver< - Maybe, - ParentType, - ContextType - >; - totalLimit?: Resolver; -}; - -export type AccountLimitsResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["AccountLimits"] = ResolversParentTypes["AccountLimits"], -> = { - convert?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - internalSend?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - withdrawal?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; +export type AccountLimitResolvers = { + __resolveType: TypeResolveFn<'OneDayAccountLimit', ParentType, ContextType>; + interval?: Resolver, ParentType, ContextType>; + remainingLimit?: Resolver, ParentType, ContextType>; + totalLimit?: Resolver; +}; + +export type AccountLimitsResolvers = { + convert?: Resolver, ParentType, ContextType>; + internalSend?: Resolver, ParentType, ContextType>; + withdrawal?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type AccountUpdateDefaultWalletIdPayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["AccountUpdateDefaultWalletIdPayload"] = ResolversParentTypes["AccountUpdateDefaultWalletIdPayload"], -> = { - account?: Resolver< - Maybe, - ParentType, - ContextType - >; - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; +export type AccountUpdateDefaultWalletIdPayloadResolvers = { + account?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type AccountUpdateDisplayCurrencyPayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["AccountUpdateDisplayCurrencyPayload"] = ResolversParentTypes["AccountUpdateDisplayCurrencyPayload"], -> = { - account?: Resolver< - Maybe, - ParentType, - ContextType - >; - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; +export type AccountUpdateDisplayCurrencyPayloadResolvers = { + account?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type AccountUpdateNotificationSettingsPayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["AccountUpdateNotificationSettingsPayload"] = ResolversParentTypes["AccountUpdateNotificationSettingsPayload"], -> = { - account?: Resolver< - Maybe, - ParentType, - ContextType - >; - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; +export type AccountUpdateNotificationSettingsPayloadResolvers = { + account?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export interface AuthTokenScalarConfig - extends GraphQLScalarTypeConfig { - name: "AuthToken"; +export interface AuthTokenScalarConfig extends GraphQLScalarTypeConfig { + name: 'AuthToken'; } -export type AuthTokenPayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["AuthTokenPayload"] = ResolversParentTypes["AuthTokenPayload"], -> = { - authToken?: Resolver< - Maybe, - ParentType, - ContextType - >; - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - totpRequired?: Resolver< - Maybe, - ParentType, - ContextType - >; +export type AuthTokenPayloadResolvers = { + authToken?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; + totpRequired?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type BtcWalletResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["BTCWallet"] = ResolversParentTypes["BTCWallet"], -> = { - accountId?: Resolver; - balance?: Resolver; - id?: Resolver; - pendingIncomingBalance?: Resolver< - ResolversTypes["SignedAmount"], - ParentType, - ContextType - >; - transactions?: Resolver< - Maybe, - ParentType, - ContextType, - Partial - >; - transactionsByAddress?: Resolver< - Maybe, - ParentType, - ContextType, - RequireFields - >; - walletCurrency?: Resolver< - ResolversTypes["WalletCurrency"], - ParentType, - ContextType - >; +export type BtcWalletResolvers = { + accountId?: Resolver; + balance?: Resolver; + id?: Resolver; + pendingIncomingBalance?: Resolver; + transactions?: Resolver, ParentType, ContextType, Partial>; + transactionsByAddress?: Resolver, ParentType, ContextType, RequireFields>; + walletCurrency?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type BuildInformationResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["BuildInformation"] = ResolversParentTypes["BuildInformation"], -> = { - commitHash?: Resolver< - Maybe, - ParentType, - ContextType - >; - helmRevision?: Resolver< - Maybe, - ParentType, - ContextType - >; +export type BuildInformationResolvers = { + commitHash?: Resolver, ParentType, ContextType>; + helmRevision?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type CallbackEndpointResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["CallbackEndpoint"] = ResolversParentTypes["CallbackEndpoint"], -> = { - id?: Resolver; - url?: Resolver; +export type CallbackEndpointResolvers = { + id?: Resolver; + url?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type CallbackEndpointAddPayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["CallbackEndpointAddPayload"] = ResolversParentTypes["CallbackEndpointAddPayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - id?: Resolver, ParentType, ContextType>; +export type CallbackEndpointAddPayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + id?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type CaptchaCreateChallengePayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["CaptchaCreateChallengePayload"] = ResolversParentTypes["CaptchaCreateChallengePayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - result?: Resolver< - Maybe, - ParentType, - ContextType - >; +export type CaptchaCreateChallengePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + result?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type CaptchaCreateChallengeResultResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["CaptchaCreateChallengeResult"] = ResolversParentTypes["CaptchaCreateChallengeResult"], -> = { - challengeCode?: Resolver; - failbackMode?: Resolver; - id?: Resolver; - newCaptcha?: Resolver; +export type CaptchaCreateChallengeResultResolvers = { + challengeCode?: Resolver; + failbackMode?: Resolver; + id?: Resolver; + newCaptcha?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export interface CentAmountScalarConfig - extends GraphQLScalarTypeConfig { - name: "CentAmount"; +export interface CentAmountScalarConfig extends GraphQLScalarTypeConfig { + name: 'CentAmount'; } -export type CentAmountPayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["CentAmountPayload"] = ResolversParentTypes["CentAmountPayload"], -> = { - amount?: Resolver< - Maybe, - ParentType, - ContextType - >; - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; +export type CentAmountPayloadResolvers = { + amount?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type ConsumerAccountResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["ConsumerAccount"] = ResolversParentTypes["ConsumerAccount"], -> = { - callbackEndpoints?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - csvTransactions?: Resolver< - ResolversTypes["String"], - ParentType, - ContextType, - RequireFields - >; - defaultWalletId?: Resolver< - ResolversTypes["WalletId"], - ParentType, - ContextType - >; - displayCurrency?: Resolver< - ResolversTypes["DisplayCurrency"], - ParentType, - ContextType - >; - id?: Resolver; - level?: Resolver; - limits?: Resolver; - notificationSettings?: Resolver< - ResolversTypes["NotificationSettings"], - ParentType, - ContextType - >; - quiz?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - realtimePrice?: Resolver< - ResolversTypes["RealtimePrice"], - ParentType, - ContextType - >; - transactions?: Resolver< - Maybe, - ParentType, - ContextType, - Partial - >; - wallets?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - welcomeProfile?: Resolver< - Maybe, - ParentType, - ContextType - >; +export type ConsumerAccountResolvers = { + callbackEndpoints?: Resolver, ParentType, ContextType>; + csvTransactions?: Resolver>; + defaultWalletId?: Resolver; + displayCurrency?: Resolver; + id?: Resolver; + level?: Resolver; + limits?: Resolver; + notificationSettings?: Resolver; + quiz?: Resolver, ParentType, ContextType>; + realtimePrice?: Resolver; + transactions?: Resolver, ParentType, ContextType, Partial>; + wallets?: Resolver, ParentType, ContextType>; + welcomeProfile?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export interface ContactAliasScalarConfig - extends GraphQLScalarTypeConfig { - name: "ContactAlias"; +export interface ContactAliasScalarConfig extends GraphQLScalarTypeConfig { + name: 'ContactAlias'; } -export type CoordinatesResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["Coordinates"] = ResolversParentTypes["Coordinates"], -> = { - latitude?: Resolver; - longitude?: Resolver; +export type CoordinatesResolvers = { + latitude?: Resolver; + longitude?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type CountryResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["Country"] = ResolversParentTypes["Country"], -> = { - id?: Resolver; - supportedAuthChannels?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; +export type CountryResolvers = { + id?: Resolver; + supportedAuthChannels?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export interface CountryCodeScalarConfig - extends GraphQLScalarTypeConfig { - name: "CountryCode"; +export interface CountryCodeScalarConfig extends GraphQLScalarTypeConfig { + name: 'CountryCode'; } -export type CurrencyResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["Currency"] = ResolversParentTypes["Currency"], -> = { - flag?: Resolver; - fractionDigits?: Resolver; - id?: Resolver; - name?: Resolver; - symbol?: Resolver; +export type CurrencyResolvers = { + flag?: Resolver; + fractionDigits?: Resolver; + id?: Resolver; + name?: Resolver; + symbol?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type DepositFeesInformationResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["DepositFeesInformation"] = ResolversParentTypes["DepositFeesInformation"], -> = { - minBankFee?: Resolver; - minBankFeeThreshold?: Resolver< - ResolversTypes["String"], - ParentType, - ContextType - >; - ratio?: Resolver; +export type DepositFeesInformationResolvers = { + minBankFee?: Resolver; + minBankFeeThreshold?: Resolver; + ratio?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export interface DisplayCurrencyScalarConfig - extends GraphQLScalarTypeConfig { - name: "DisplayCurrency"; +export interface DisplayCurrencyScalarConfig extends GraphQLScalarTypeConfig { + name: 'DisplayCurrency'; } -export type EmailResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["Email"] = ResolversParentTypes["Email"], -> = { - address?: Resolver< - Maybe, - ParentType, - ContextType - >; - verified?: Resolver< - Maybe, - ParentType, - ContextType - >; +export type EmailResolvers = { + address?: Resolver, ParentType, ContextType>; + verified?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export interface EmailAddressScalarConfig - extends GraphQLScalarTypeConfig { - name: "EmailAddress"; +export interface EmailAddressScalarConfig extends GraphQLScalarTypeConfig { + name: 'EmailAddress'; } -export interface EmailRegistrationIdScalarConfig - extends GraphQLScalarTypeConfig { - name: "EmailRegistrationId"; +export interface EmailRegistrationIdScalarConfig extends GraphQLScalarTypeConfig { + name: 'EmailRegistrationId'; } -export interface EndpointIdScalarConfig - extends GraphQLScalarTypeConfig { - name: "EndpointId"; +export interface EndpointIdScalarConfig extends GraphQLScalarTypeConfig { + name: 'EndpointId'; } -export interface EndpointUrlScalarConfig - extends GraphQLScalarTypeConfig { - name: "EndpointUrl"; +export interface EndpointUrlScalarConfig extends GraphQLScalarTypeConfig { + name: 'EndpointUrl'; } -export type ErrorResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["Error"] = ResolversParentTypes["Error"], -> = { - __resolveType: TypeResolveFn< - "GraphQLApplicationError", - ParentType, - ContextType - >; - code?: Resolver, ParentType, ContextType>; - message?: Resolver; - path?: Resolver< - Maybe>>, - ParentType, - ContextType - >; -}; - -export interface FeedbackScalarConfig - extends GraphQLScalarTypeConfig { - name: "Feedback"; +export type ErrorResolvers = { + __resolveType: TypeResolveFn<'GraphQLApplicationError', ParentType, ContextType>; + code?: Resolver, ParentType, ContextType>; + message?: Resolver; + path?: Resolver>>, ParentType, ContextType>; +}; + +export interface FeedbackScalarConfig extends GraphQLScalarTypeConfig { + name: 'Feedback'; } -export type FeesInformationResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["FeesInformation"] = ResolversParentTypes["FeesInformation"], -> = { - deposit?: Resolver< - ResolversTypes["DepositFeesInformation"], - ParentType, - ContextType - >; +export type FeesInformationResolvers = { + deposit?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type GlobalsResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["Globals"] = ResolversParentTypes["Globals"], -> = { - buildInformation?: Resolver< - ResolversTypes["BuildInformation"], - ParentType, - ContextType - >; - feesInformation?: Resolver< - ResolversTypes["FeesInformation"], - ParentType, - ContextType - >; - lightningAddressDomain?: Resolver< - ResolversTypes["String"], - ParentType, - ContextType - >; - lightningAddressDomainAliases?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - network?: Resolver; - nodesIds?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - supportedCountries?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; +export type GlobalsResolvers = { + buildInformation?: Resolver; + feesInformation?: Resolver; + lightningAddressDomain?: Resolver; + lightningAddressDomainAliases?: Resolver, ParentType, ContextType>; + network?: Resolver; + nodesIds?: Resolver, ParentType, ContextType>; + supportedCountries?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type GraphQlApplicationErrorResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["GraphQLApplicationError"] = ResolversParentTypes["GraphQLApplicationError"], -> = { - code?: Resolver, ParentType, ContextType>; - message?: Resolver; - path?: Resolver< - Maybe>>, - ParentType, - ContextType - >; +export type GraphQlApplicationErrorResolvers = { + code?: Resolver, ParentType, ContextType>; + message?: Resolver; + path?: Resolver>>, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export interface Hex32BytesScalarConfig - extends GraphQLScalarTypeConfig { - name: "Hex32Bytes"; +export interface Hex32BytesScalarConfig extends GraphQLScalarTypeConfig { + name: 'Hex32Bytes'; } -export type InitiationViaResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["InitiationVia"] = ResolversParentTypes["InitiationVia"], -> = { - __resolveType: TypeResolveFn< - "InitiationViaIntraLedger" | "InitiationViaLn" | "InitiationViaOnChain", - ParentType, - ContextType - >; -}; - -export type InitiationViaIntraLedgerResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["InitiationViaIntraLedger"] = ResolversParentTypes["InitiationViaIntraLedger"], -> = { - counterPartyUsername?: Resolver< - Maybe, - ParentType, - ContextType - >; - counterPartyWalletId?: Resolver< - Maybe, - ParentType, - ContextType - >; +export type InitiationViaResolvers = { + __resolveType: TypeResolveFn<'InitiationViaIntraLedger' | 'InitiationViaLn' | 'InitiationViaOnChain', ParentType, ContextType>; +}; + +export type InitiationViaIntraLedgerResolvers = { + counterPartyUsername?: Resolver, ParentType, ContextType>; + counterPartyWalletId?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type InitiationViaLnResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["InitiationViaLn"] = ResolversParentTypes["InitiationViaLn"], -> = { - paymentHash?: Resolver< - ResolversTypes["PaymentHash"], - ParentType, - ContextType - >; +export type InitiationViaLnResolvers = { + paymentHash?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type InitiationViaOnChainResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["InitiationViaOnChain"] = ResolversParentTypes["InitiationViaOnChain"], -> = { - address?: Resolver; +export type InitiationViaOnChainResolvers = { + address?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type IntraLedgerUpdateResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["IntraLedgerUpdate"] = ResolversParentTypes["IntraLedgerUpdate"], -> = { - amount?: Resolver; - displayCurrencyPerSat?: Resolver< - ResolversTypes["Float"], - ParentType, - ContextType - >; - txNotificationType?: Resolver< - ResolversTypes["TxNotificationType"], - ParentType, - ContextType - >; - usdPerSat?: Resolver; - walletId?: Resolver; +export type IntraLedgerUpdateResolvers = { + amount?: Resolver; + displayCurrencyPerSat?: Resolver; + txNotificationType?: Resolver; + usdPerSat?: Resolver; + walletId?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export interface LanguageScalarConfig - extends GraphQLScalarTypeConfig { - name: "Language"; +export interface LanguageScalarConfig extends GraphQLScalarTypeConfig { + name: 'Language'; } -export type LeaderResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["Leader"] = ResolversParentTypes["Leader"], -> = { - name?: Resolver< - Maybe, - ParentType, - ContextType - >; - points?: Resolver; - rank?: Resolver; +export type LeaderResolvers = { + name?: Resolver, ParentType, ContextType>; + points?: Resolver; + rank?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type LeaderboardResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["Leaderboard"] = ResolversParentTypes["Leaderboard"], -> = { - leaders?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - range?: Resolver; +export type LeaderboardResolvers = { + leaders?: Resolver, ParentType, ContextType>; + range?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export interface LeaderboardNameScalarConfig - extends GraphQLScalarTypeConfig { - name: "LeaderboardName"; +export interface LeaderboardNameScalarConfig extends GraphQLScalarTypeConfig { + name: 'LeaderboardName'; } -export type LnInvoiceResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["LnInvoice"] = ResolversParentTypes["LnInvoice"], -> = { - paymentHash?: Resolver< - ResolversTypes["PaymentHash"], - ParentType, - ContextType - >; - paymentRequest?: Resolver< - ResolversTypes["LnPaymentRequest"], - ParentType, - ContextType - >; - paymentSecret?: Resolver< - ResolversTypes["LnPaymentSecret"], - ParentType, - ContextType - >; - satoshis?: Resolver< - Maybe, - ParentType, - ContextType - >; +export type LnInvoiceResolvers = { + paymentHash?: Resolver; + paymentRequest?: Resolver; + paymentSecret?: Resolver; + satoshis?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type LnInvoicePayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["LnInvoicePayload"] = ResolversParentTypes["LnInvoicePayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - invoice?: Resolver< - Maybe, - ParentType, - ContextType - >; +export type LnInvoicePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + invoice?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type LnInvoicePaymentStatusPayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["LnInvoicePaymentStatusPayload"] = ResolversParentTypes["LnInvoicePaymentStatusPayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - status?: Resolver< - Maybe, - ParentType, - ContextType - >; +export type LnInvoicePaymentStatusPayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + status?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type LnNoAmountInvoiceResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["LnNoAmountInvoice"] = ResolversParentTypes["LnNoAmountInvoice"], -> = { - paymentHash?: Resolver< - ResolversTypes["PaymentHash"], - ParentType, - ContextType - >; - paymentRequest?: Resolver< - ResolversTypes["LnPaymentRequest"], - ParentType, - ContextType - >; - paymentSecret?: Resolver< - ResolversTypes["LnPaymentSecret"], - ParentType, - ContextType - >; +export type LnNoAmountInvoiceResolvers = { + paymentHash?: Resolver; + paymentRequest?: Resolver; + paymentSecret?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type LnNoAmountInvoicePayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["LnNoAmountInvoicePayload"] = ResolversParentTypes["LnNoAmountInvoicePayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - invoice?: Resolver< - Maybe, - ParentType, - ContextType - >; +export type LnNoAmountInvoicePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + invoice?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export interface LnPaymentPreImageScalarConfig - extends GraphQLScalarTypeConfig { - name: "LnPaymentPreImage"; +export interface LnPaymentPreImageScalarConfig extends GraphQLScalarTypeConfig { + name: 'LnPaymentPreImage'; } -export interface LnPaymentRequestScalarConfig - extends GraphQLScalarTypeConfig { - name: "LnPaymentRequest"; +export interface LnPaymentRequestScalarConfig extends GraphQLScalarTypeConfig { + name: 'LnPaymentRequest'; } -export interface LnPaymentSecretScalarConfig - extends GraphQLScalarTypeConfig { - name: "LnPaymentSecret"; +export interface LnPaymentSecretScalarConfig extends GraphQLScalarTypeConfig { + name: 'LnPaymentSecret'; } -export type LnUpdateResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["LnUpdate"] = ResolversParentTypes["LnUpdate"], -> = { - paymentHash?: Resolver< - ResolversTypes["PaymentHash"], - ParentType, - ContextType - >; - status?: Resolver< - ResolversTypes["InvoicePaymentStatus"], - ParentType, - ContextType - >; - walletId?: Resolver; +export type LnUpdateResolvers = { + paymentHash?: Resolver; + status?: Resolver; + walletId?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type MapInfoResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["MapInfo"] = ResolversParentTypes["MapInfo"], -> = { - coordinates?: Resolver< - ResolversTypes["Coordinates"], - ParentType, - ContextType - >; - title?: Resolver; +export type MapInfoResolvers = { + coordinates?: Resolver; + title?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type MapMarkerResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["MapMarker"] = ResolversParentTypes["MapMarker"], -> = { - mapInfo?: Resolver; - username?: Resolver< - Maybe, - ParentType, - ContextType - >; +export type MapMarkerResolvers = { + mapInfo?: Resolver; + username?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export interface MemoScalarConfig - extends GraphQLScalarTypeConfig { - name: "Memo"; +export interface MemoScalarConfig extends GraphQLScalarTypeConfig { + name: 'Memo'; } -export interface MinutesScalarConfig - extends GraphQLScalarTypeConfig { - name: "Minutes"; +export interface MinutesScalarConfig extends GraphQLScalarTypeConfig { + name: 'Minutes'; } -export type MobileVersionsResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["MobileVersions"] = ResolversParentTypes["MobileVersions"], -> = { - currentSupported?: Resolver; - minSupported?: Resolver; - platform?: Resolver; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export type MutationResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["Mutation"] = ResolversParentTypes["Mutation"], -> = { - accountDelete?: Resolver< - ResolversTypes["AccountDeletePayload"], - ParentType, - ContextType - >; - accountDisableNotificationCategory?: Resolver< - ResolversTypes["AccountUpdateNotificationSettingsPayload"], - ParentType, - ContextType, - RequireFields - >; - accountDisableNotificationChannel?: Resolver< - ResolversTypes["AccountUpdateNotificationSettingsPayload"], - ParentType, - ContextType, - RequireFields - >; - accountEnableNotificationCategory?: Resolver< - ResolversTypes["AccountUpdateNotificationSettingsPayload"], - ParentType, - ContextType, - RequireFields - >; - accountEnableNotificationChannel?: Resolver< - ResolversTypes["AccountUpdateNotificationSettingsPayload"], - ParentType, - ContextType, - RequireFields - >; - accountUpdateDefaultWalletId?: Resolver< - ResolversTypes["AccountUpdateDefaultWalletIdPayload"], - ParentType, - ContextType, - RequireFields - >; - accountUpdateDisplayCurrency?: Resolver< - ResolversTypes["AccountUpdateDisplayCurrencyPayload"], - ParentType, - ContextType, - RequireFields - >; - callbackEndpointAdd?: Resolver< - ResolversTypes["CallbackEndpointAddPayload"], - ParentType, - ContextType, - RequireFields - >; - callbackEndpointDelete?: Resolver< - ResolversTypes["SuccessPayload"], - ParentType, - ContextType, - RequireFields - >; - captchaCreateChallenge?: Resolver< - ResolversTypes["CaptchaCreateChallengePayload"], - ParentType, - ContextType - >; - captchaRequestAuthCode?: Resolver< - ResolversTypes["SuccessPayload"], - ParentType, - ContextType, - RequireFields - >; - deviceNotificationTokenCreate?: Resolver< - ResolversTypes["SuccessPayload"], - ParentType, - ContextType, - RequireFields - >; - feedbackSubmit?: Resolver< - ResolversTypes["SuccessPayload"], - ParentType, - ContextType, - RequireFields - >; - intraLedgerPaymentSend?: Resolver< - ResolversTypes["PaymentSendPayload"], - ParentType, - ContextType, - RequireFields - >; - intraLedgerUsdPaymentSend?: Resolver< - ResolversTypes["PaymentSendPayload"], - ParentType, - ContextType, - RequireFields - >; - lnInvoiceCreate?: Resolver< - ResolversTypes["LnInvoicePayload"], - ParentType, - ContextType, - RequireFields - >; - lnInvoiceCreateOnBehalfOfRecipient?: Resolver< - ResolversTypes["LnInvoicePayload"], - ParentType, - ContextType, - RequireFields - >; - lnInvoiceFeeProbe?: Resolver< - ResolversTypes["SatAmountPayload"], - ParentType, - ContextType, - RequireFields - >; - lnInvoicePaymentSend?: Resolver< - ResolversTypes["PaymentSendPayload"], - ParentType, - ContextType, - RequireFields - >; - lnNoAmountInvoiceCreate?: Resolver< - ResolversTypes["LnNoAmountInvoicePayload"], - ParentType, - ContextType, - RequireFields - >; - lnNoAmountInvoiceCreateOnBehalfOfRecipient?: Resolver< - ResolversTypes["LnNoAmountInvoicePayload"], - ParentType, - ContextType, - RequireFields< - MutationLnNoAmountInvoiceCreateOnBehalfOfRecipientArgs, - "input" - > - >; - lnNoAmountInvoiceFeeProbe?: Resolver< - ResolversTypes["SatAmountPayload"], - ParentType, - ContextType, - RequireFields - >; - lnNoAmountInvoicePaymentSend?: Resolver< - ResolversTypes["PaymentSendPayload"], - ParentType, - ContextType, - RequireFields - >; - lnNoAmountUsdInvoiceFeeProbe?: Resolver< - ResolversTypes["CentAmountPayload"], - ParentType, - ContextType, - RequireFields - >; - lnNoAmountUsdInvoicePaymentSend?: Resolver< - ResolversTypes["PaymentSendPayload"], - ParentType, - ContextType, - RequireFields - >; - lnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipient?: Resolver< - ResolversTypes["LnInvoicePayload"], - ParentType, - ContextType, - RequireFields< - MutationLnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipientArgs, - "input" - > - >; - lnUsdInvoiceCreate?: Resolver< - ResolversTypes["LnInvoicePayload"], - ParentType, - ContextType, - RequireFields - >; - lnUsdInvoiceCreateOnBehalfOfRecipient?: Resolver< - ResolversTypes["LnInvoicePayload"], - ParentType, - ContextType, - RequireFields - >; - lnUsdInvoiceFeeProbe?: Resolver< - ResolversTypes["SatAmountPayload"], - ParentType, - ContextType, - RequireFields - >; - onChainAddressCreate?: Resolver< - ResolversTypes["OnChainAddressPayload"], - ParentType, - ContextType, - RequireFields - >; - onChainAddressCurrent?: Resolver< - ResolversTypes["OnChainAddressPayload"], - ParentType, - ContextType, - RequireFields - >; - onChainPaymentSend?: Resolver< - ResolversTypes["PaymentSendPayload"], - ParentType, - ContextType, - RequireFields - >; - onChainPaymentSendAll?: Resolver< - ResolversTypes["PaymentSendPayload"], - ParentType, - ContextType, - RequireFields - >; - onChainUsdPaymentSend?: Resolver< - ResolversTypes["PaymentSendPayload"], - ParentType, - ContextType, - RequireFields - >; - onChainUsdPaymentSendAsBtcDenominated?: Resolver< - ResolversTypes["PaymentSendPayload"], - ParentType, - ContextType, - RequireFields - >; - quizCompleted?: Resolver< - ResolversTypes["QuizCompletedPayload"], - ParentType, - ContextType, - RequireFields - >; - userContactUpdateAlias?: Resolver< - ResolversTypes["UserContactUpdateAliasPayload"], - ParentType, - ContextType, - RequireFields - >; - userEmailDelete?: Resolver< - ResolversTypes["UserEmailDeletePayload"], - ParentType, - ContextType - >; - userEmailRegistrationInitiate?: Resolver< - ResolversTypes["UserEmailRegistrationInitiatePayload"], - ParentType, - ContextType, - RequireFields - >; - userEmailRegistrationValidate?: Resolver< - ResolversTypes["UserEmailRegistrationValidatePayload"], - ParentType, - ContextType, - RequireFields - >; - userLogin?: Resolver< - ResolversTypes["AuthTokenPayload"], - ParentType, - ContextType, - RequireFields - >; - userLoginUpgrade?: Resolver< - ResolversTypes["UpgradePayload"], - ParentType, - ContextType, - RequireFields - >; - userLogout?: Resolver< - ResolversTypes["SuccessPayload"], - ParentType, - ContextType, - Partial - >; - userPhoneDelete?: Resolver< - ResolversTypes["UserPhoneDeletePayload"], - ParentType, - ContextType - >; - userPhoneRegistrationInitiate?: Resolver< - ResolversTypes["SuccessPayload"], - ParentType, - ContextType, - RequireFields - >; - userPhoneRegistrationValidate?: Resolver< - ResolversTypes["UserPhoneRegistrationValidatePayload"], - ParentType, - ContextType, - RequireFields - >; - userQuizQuestionUpdateCompleted?: Resolver< - ResolversTypes["UserQuizQuestionUpdateCompletedPayload"], - ParentType, - ContextType, - RequireFields - >; - userTotpDelete?: Resolver< - ResolversTypes["UserTotpDeletePayload"], - ParentType, - ContextType, - RequireFields - >; - userTotpRegistrationInitiate?: Resolver< - ResolversTypes["UserTotpRegistrationInitiatePayload"], - ParentType, - ContextType, - RequireFields - >; - userTotpRegistrationValidate?: Resolver< - ResolversTypes["UserTotpRegistrationValidatePayload"], - ParentType, - ContextType, - RequireFields - >; - userUpdateLanguage?: Resolver< - ResolversTypes["UserUpdateLanguagePayload"], - ParentType, - ContextType, - RequireFields - >; - userUpdateUsername?: Resolver< - ResolversTypes["UserUpdateUsernamePayload"], - ParentType, - ContextType, - RequireFields - >; -}; - -export type MyUpdatesPayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["MyUpdatesPayload"] = ResolversParentTypes["MyUpdatesPayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - me?: Resolver, ParentType, ContextType>; - update?: Resolver< - Maybe, - ParentType, - ContextType - >; - __isTypeOf?: IsTypeOfResolverFn; -}; - -export interface NotificationCategoryScalarConfig - extends GraphQLScalarTypeConfig { - name: "NotificationCategory"; +export type MobileVersionsResolvers = { + currentSupported?: Resolver; + minSupported?: Resolver; + platform?: Resolver; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export type MutationResolvers = { + accountDelete?: Resolver; + accountDisableNotificationCategory?: Resolver>; + accountDisableNotificationChannel?: Resolver>; + accountEnableNotificationCategory?: Resolver>; + accountEnableNotificationChannel?: Resolver>; + accountUpdateDefaultWalletId?: Resolver>; + accountUpdateDisplayCurrency?: Resolver>; + callbackEndpointAdd?: Resolver>; + callbackEndpointDelete?: Resolver>; + captchaCreateChallenge?: Resolver; + captchaRequestAuthCode?: Resolver>; + deviceNotificationTokenCreate?: Resolver>; + feedbackSubmit?: Resolver>; + intraLedgerPaymentSend?: Resolver>; + intraLedgerUsdPaymentSend?: Resolver>; + lnInvoiceCreate?: Resolver>; + lnInvoiceCreateOnBehalfOfRecipient?: Resolver>; + lnInvoiceFeeProbe?: Resolver>; + lnInvoicePaymentSend?: Resolver>; + lnNoAmountInvoiceCreate?: Resolver>; + lnNoAmountInvoiceCreateOnBehalfOfRecipient?: Resolver>; + lnNoAmountInvoiceFeeProbe?: Resolver>; + lnNoAmountInvoicePaymentSend?: Resolver>; + lnNoAmountUsdInvoiceFeeProbe?: Resolver>; + lnNoAmountUsdInvoicePaymentSend?: Resolver>; + lnUsdInvoiceBtcDenominatedCreateOnBehalfOfRecipient?: Resolver>; + lnUsdInvoiceCreate?: Resolver>; + lnUsdInvoiceCreateOnBehalfOfRecipient?: Resolver>; + lnUsdInvoiceFeeProbe?: Resolver>; + onChainAddressCreate?: Resolver>; + onChainAddressCurrent?: Resolver>; + onChainPaymentSend?: Resolver>; + onChainPaymentSendAll?: Resolver>; + onChainUsdPaymentSend?: Resolver>; + onChainUsdPaymentSendAsBtcDenominated?: Resolver>; + quizCompleted?: Resolver>; + userContactUpdateAlias?: Resolver>; + userEmailDelete?: Resolver; + userEmailRegistrationInitiate?: Resolver>; + userEmailRegistrationValidate?: Resolver>; + userLogin?: Resolver>; + userLoginUpgrade?: Resolver>; + userLogout?: Resolver>; + userPhoneDelete?: Resolver; + userPhoneRegistrationInitiate?: Resolver>; + userPhoneRegistrationValidate?: Resolver>; + userTotpDelete?: Resolver>; + userTotpRegistrationInitiate?: Resolver>; + userTotpRegistrationValidate?: Resolver>; + userUpdateLanguage?: Resolver>; + userUpdateUsername?: Resolver>; +}; + +export type MyUpdatesPayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + me?: Resolver, ParentType, ContextType>; + update?: Resolver, ParentType, ContextType>; + __isTypeOf?: IsTypeOfResolverFn; +}; + +export interface NotificationCategoryScalarConfig extends GraphQLScalarTypeConfig { + name: 'NotificationCategory'; } -export type NotificationChannelSettingsResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["NotificationChannelSettings"] = ResolversParentTypes["NotificationChannelSettings"], -> = { - disabledCategories?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - enabled?: Resolver; +export type NotificationChannelSettingsResolvers = { + disabledCategories?: Resolver, ParentType, ContextType>; + enabled?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type NotificationSettingsResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["NotificationSettings"] = ResolversParentTypes["NotificationSettings"], -> = { - push?: Resolver< - ResolversTypes["NotificationChannelSettings"], - ParentType, - ContextType - >; +export type NotificationSettingsResolvers = { + push?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export interface OnChainAddressScalarConfig - extends GraphQLScalarTypeConfig { - name: "OnChainAddress"; +export interface OnChainAddressScalarConfig extends GraphQLScalarTypeConfig { + name: 'OnChainAddress'; } -export type OnChainAddressPayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["OnChainAddressPayload"] = ResolversParentTypes["OnChainAddressPayload"], -> = { - address?: Resolver< - Maybe, - ParentType, - ContextType - >; - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; +export type OnChainAddressPayloadResolvers = { + address?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type OnChainTxFeeResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["OnChainTxFee"] = ResolversParentTypes["OnChainTxFee"], -> = { - amount?: Resolver; +export type OnChainTxFeeResolvers = { + amount?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export interface OnChainTxHashScalarConfig - extends GraphQLScalarTypeConfig { - name: "OnChainTxHash"; +export interface OnChainTxHashScalarConfig extends GraphQLScalarTypeConfig { + name: 'OnChainTxHash'; } -export type OnChainUpdateResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["OnChainUpdate"] = ResolversParentTypes["OnChainUpdate"], -> = { - amount?: Resolver; - displayCurrencyPerSat?: Resolver< - ResolversTypes["Float"], - ParentType, - ContextType - >; - txHash?: Resolver; - txNotificationType?: Resolver< - ResolversTypes["TxNotificationType"], - ParentType, - ContextType - >; - usdPerSat?: Resolver; - walletId?: Resolver; +export type OnChainUpdateResolvers = { + amount?: Resolver; + displayCurrencyPerSat?: Resolver; + txHash?: Resolver; + txNotificationType?: Resolver; + usdPerSat?: Resolver; + walletId?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type OnChainUsdTxFeeResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["OnChainUsdTxFee"] = ResolversParentTypes["OnChainUsdTxFee"], -> = { - amount?: Resolver; +export type OnChainUsdTxFeeResolvers = { + amount?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type OneDayAccountLimitResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["OneDayAccountLimit"] = ResolversParentTypes["OneDayAccountLimit"], -> = { - interval?: Resolver< - Maybe, - ParentType, - ContextType - >; - remainingLimit?: Resolver< - Maybe, - ParentType, - ContextType - >; - totalLimit?: Resolver; +export type OneDayAccountLimitResolvers = { + interval?: Resolver, ParentType, ContextType>; + remainingLimit?: Resolver, ParentType, ContextType>; + totalLimit?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export interface OneTimeAuthCodeScalarConfig - extends GraphQLScalarTypeConfig { - name: "OneTimeAuthCode"; +export interface OneTimeAuthCodeScalarConfig extends GraphQLScalarTypeConfig { + name: 'OneTimeAuthCode'; } -export type PageInfoResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["PageInfo"] = ResolversParentTypes["PageInfo"], -> = { - endCursor?: Resolver< - Maybe, - ParentType, - ContextType - >; - hasNextPage?: Resolver; - hasPreviousPage?: Resolver< - ResolversTypes["Boolean"], - ParentType, - ContextType - >; - startCursor?: Resolver< - Maybe, - ParentType, - ContextType - >; +export type PageInfoResolvers = { + endCursor?: Resolver, ParentType, ContextType>; + hasNextPage?: Resolver; + hasPreviousPage?: Resolver; + startCursor?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export interface PaymentHashScalarConfig - extends GraphQLScalarTypeConfig { - name: "PaymentHash"; +export interface PaymentHashScalarConfig extends GraphQLScalarTypeConfig { + name: 'PaymentHash'; } -export type PaymentSendPayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["PaymentSendPayload"] = ResolversParentTypes["PaymentSendPayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - status?: Resolver< - Maybe, - ParentType, - ContextType - >; +export type PaymentSendPayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + status?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export interface PhoneScalarConfig - extends GraphQLScalarTypeConfig { - name: "Phone"; +export interface PhoneScalarConfig extends GraphQLScalarTypeConfig { + name: 'Phone'; } -export type PriceResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["Price"] = ResolversParentTypes["Price"], -> = { - base?: Resolver; - currencyUnit?: Resolver; - formattedAmount?: Resolver; - offset?: Resolver; +export type PriceResolvers = { + base?: Resolver; + currencyUnit?: Resolver; + formattedAmount?: Resolver; + offset?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type PriceInterfaceResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["PriceInterface"] = ResolversParentTypes["PriceInterface"], -> = { - __resolveType: TypeResolveFn< - | "PriceOfOneSatInMinorUnit" - | "PriceOfOneSettlementMinorUnitInDisplayMinorUnit" - | "PriceOfOneUsdCentInMinorUnit", - ParentType, - ContextType - >; - base?: Resolver; - currencyUnit?: Resolver; - offset?: Resolver; -}; - -export type PriceOfOneSatInMinorUnitResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["PriceOfOneSatInMinorUnit"] = ResolversParentTypes["PriceOfOneSatInMinorUnit"], -> = { - base?: Resolver; - currencyUnit?: Resolver; - offset?: Resolver; +export type PriceInterfaceResolvers = { + __resolveType: TypeResolveFn<'PriceOfOneSatInMinorUnit' | 'PriceOfOneSettlementMinorUnitInDisplayMinorUnit' | 'PriceOfOneUsdCentInMinorUnit', ParentType, ContextType>; + base?: Resolver; + currencyUnit?: Resolver; + offset?: Resolver; +}; + +export type PriceOfOneSatInMinorUnitResolvers = { + base?: Resolver; + currencyUnit?: Resolver; + offset?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type PriceOfOneSettlementMinorUnitInDisplayMinorUnitResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["PriceOfOneSettlementMinorUnitInDisplayMinorUnit"] = ResolversParentTypes["PriceOfOneSettlementMinorUnitInDisplayMinorUnit"], -> = { - base?: Resolver; - currencyUnit?: Resolver; - formattedAmount?: Resolver; - offset?: Resolver; +export type PriceOfOneSettlementMinorUnitInDisplayMinorUnitResolvers = { + base?: Resolver; + currencyUnit?: Resolver; + formattedAmount?: Resolver; + offset?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type PriceOfOneUsdCentInMinorUnitResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["PriceOfOneUsdCentInMinorUnit"] = ResolversParentTypes["PriceOfOneUsdCentInMinorUnit"], -> = { - base?: Resolver; - currencyUnit?: Resolver; - offset?: Resolver; +export type PriceOfOneUsdCentInMinorUnitResolvers = { + base?: Resolver; + currencyUnit?: Resolver; + offset?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type PricePayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["PricePayload"] = ResolversParentTypes["PricePayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - price?: Resolver, ParentType, ContextType>; +export type PricePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + price?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type PricePointResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["PricePoint"] = ResolversParentTypes["PricePoint"], -> = { - price?: Resolver; - timestamp?: Resolver; +export type PricePointResolvers = { + price?: Resolver; + timestamp?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type PublicWalletResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["PublicWallet"] = ResolversParentTypes["PublicWallet"], -> = { - id?: Resolver; - walletCurrency?: Resolver< - ResolversTypes["WalletCurrency"], - ParentType, - ContextType - >; +export type PublicWalletResolvers = { + id?: Resolver; + walletCurrency?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type QueryResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["Query"] = ResolversParentTypes["Query"], -> = { - accountDefaultWallet?: Resolver< - ResolversTypes["PublicWallet"], - ParentType, - ContextType, - RequireFields - >; - btcPrice?: Resolver< - Maybe, - ParentType, - ContextType, - RequireFields - >; - btcPriceList?: Resolver< - Maybe>>, - ParentType, - ContextType, - RequireFields - >; - businessMapMarkers?: Resolver< - Maybe>>, - ParentType, - ContextType - >; - currencyList?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - globals?: Resolver, ParentType, ContextType>; - lnInvoicePaymentStatus?: Resolver< - ResolversTypes["LnInvoicePaymentStatusPayload"], - ParentType, - ContextType, - RequireFields - >; - me?: Resolver, ParentType, ContextType>; - mobileVersions?: Resolver< - Maybe>>, - ParentType, - ContextType - >; - onChainTxFee?: Resolver< - ResolversTypes["OnChainTxFee"], - ParentType, - ContextType, - RequireFields< - QueryOnChainTxFeeArgs, - "address" | "amount" | "speed" | "walletId" - > - >; - onChainUsdTxFee?: Resolver< - ResolversTypes["OnChainUsdTxFee"], - ParentType, - ContextType, - RequireFields< - QueryOnChainUsdTxFeeArgs, - "address" | "amount" | "speed" | "walletId" - > - >; - onChainUsdTxFeeAsBtcDenominated?: Resolver< - ResolversTypes["OnChainUsdTxFee"], - ParentType, - ContextType, - RequireFields< - QueryOnChainUsdTxFeeAsBtcDenominatedArgs, - "address" | "amount" | "speed" | "walletId" - > - >; - quizQuestions?: Resolver< - Maybe>>, - ParentType, - ContextType - >; - realtimePrice?: Resolver< - ResolversTypes["RealtimePrice"], - ParentType, - ContextType, - RequireFields - >; - userDefaultWalletId?: Resolver< - ResolversTypes["WalletId"], - ParentType, - ContextType, - RequireFields - >; - usernameAvailable?: Resolver< - Maybe, - ParentType, - ContextType, - RequireFields - >; - welcomeLeaderboard?: Resolver< - ResolversTypes["Leaderboard"], - ParentType, - ContextType, - RequireFields - >; -}; - -export type QuizResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["Quiz"] = ResolversParentTypes["Quiz"], -> = { - amount?: Resolver; - completed?: Resolver; - id?: Resolver; +export type QueryResolvers = { + accountDefaultWallet?: Resolver>; + btcPrice?: Resolver, ParentType, ContextType, RequireFields>; + btcPriceList?: Resolver>>, ParentType, ContextType, RequireFields>; + businessMapMarkers?: Resolver>>, ParentType, ContextType>; + currencyList?: Resolver, ParentType, ContextType>; + globals?: Resolver, ParentType, ContextType>; + lnInvoicePaymentStatus?: Resolver>; + me?: Resolver, ParentType, ContextType>; + mobileVersions?: Resolver>>, ParentType, ContextType>; + onChainTxFee?: Resolver>; + onChainUsdTxFee?: Resolver>; + onChainUsdTxFeeAsBtcDenominated?: Resolver>; + quizQuestions?: Resolver>>, ParentType, ContextType>; + realtimePrice?: Resolver>; + userDefaultWalletId?: Resolver>; + usernameAvailable?: Resolver, ParentType, ContextType, RequireFields>; + welcomeLeaderboard?: Resolver>; +}; + +export type QuizResolvers = { + amount?: Resolver; + completed?: Resolver; + id?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type QuizCompletedPayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["QuizCompletedPayload"] = ResolversParentTypes["QuizCompletedPayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - quiz?: Resolver, ParentType, ContextType>; +export type QuizCompletedPayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + quiz?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type QuizQuestionResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["QuizQuestion"] = ResolversParentTypes["QuizQuestion"], -> = { - earnAmount?: Resolver; - id?: Resolver; +export type QuizQuestionResolvers = { + earnAmount?: Resolver; + id?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type RealtimePriceResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["RealtimePrice"] = ResolversParentTypes["RealtimePrice"], -> = { - btcSatPrice?: Resolver< - ResolversTypes["PriceOfOneSatInMinorUnit"], - ParentType, - ContextType - >; - denominatorCurrency?: Resolver< - ResolversTypes["DisplayCurrency"], - ParentType, - ContextType - >; - id?: Resolver; - timestamp?: Resolver; - usdCentPrice?: Resolver< - ResolversTypes["PriceOfOneUsdCentInMinorUnit"], - ParentType, - ContextType - >; +export type RealtimePriceResolvers = { + btcSatPrice?: Resolver; + denominatorCurrency?: Resolver; + id?: Resolver; + timestamp?: Resolver; + usdCentPrice?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type RealtimePricePayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["RealtimePricePayload"] = ResolversParentTypes["RealtimePricePayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - realtimePrice?: Resolver< - Maybe, - ParentType, - ContextType - >; +export type RealtimePricePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + realtimePrice?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export interface SafeIntScalarConfig - extends GraphQLScalarTypeConfig { - name: "SafeInt"; +export interface SafeIntScalarConfig extends GraphQLScalarTypeConfig { + name: 'SafeInt'; } -export interface SatAmountScalarConfig - extends GraphQLScalarTypeConfig { - name: "SatAmount"; +export interface SatAmountScalarConfig extends GraphQLScalarTypeConfig { + name: 'SatAmount'; } -export type SatAmountPayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["SatAmountPayload"] = ResolversParentTypes["SatAmountPayload"], -> = { - amount?: Resolver< - Maybe, - ParentType, - ContextType - >; - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; +export type SatAmountPayloadResolvers = { + amount?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export interface SecondsScalarConfig - extends GraphQLScalarTypeConfig { - name: "Seconds"; +export interface SecondsScalarConfig extends GraphQLScalarTypeConfig { + name: 'Seconds'; } -export type SettlementViaResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["SettlementVia"] = ResolversParentTypes["SettlementVia"], -> = { - __resolveType: TypeResolveFn< - "SettlementViaIntraLedger" | "SettlementViaLn" | "SettlementViaOnChain", - ParentType, - ContextType - >; -}; - -export type SettlementViaIntraLedgerResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["SettlementViaIntraLedger"] = ResolversParentTypes["SettlementViaIntraLedger"], -> = { - counterPartyUsername?: Resolver< - Maybe, - ParentType, - ContextType - >; - counterPartyWalletId?: Resolver< - Maybe, - ParentType, - ContextType - >; +export type SettlementViaResolvers = { + __resolveType: TypeResolveFn<'SettlementViaIntraLedger' | 'SettlementViaLn' | 'SettlementViaOnChain', ParentType, ContextType>; +}; + +export type SettlementViaIntraLedgerResolvers = { + counterPartyUsername?: Resolver, ParentType, ContextType>; + counterPartyWalletId?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type SettlementViaLnResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["SettlementViaLn"] = ResolversParentTypes["SettlementViaLn"], -> = { - paymentSecret?: Resolver< - Maybe, - ParentType, - ContextType - >; - preImage?: Resolver< - Maybe, - ParentType, - ContextType - >; +export type SettlementViaLnResolvers = { + paymentSecret?: Resolver, ParentType, ContextType>; + preImage?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type SettlementViaOnChainResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["SettlementViaOnChain"] = ResolversParentTypes["SettlementViaOnChain"], -> = { - transactionHash?: Resolver< - Maybe, - ParentType, - ContextType - >; - vout?: Resolver, ParentType, ContextType>; +export type SettlementViaOnChainResolvers = { + transactionHash?: Resolver, ParentType, ContextType>; + vout?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export interface SignedAmountScalarConfig - extends GraphQLScalarTypeConfig { - name: "SignedAmount"; +export interface SignedAmountScalarConfig extends GraphQLScalarTypeConfig { + name: 'SignedAmount'; } -export interface SignedDisplayMajorAmountScalarConfig - extends GraphQLScalarTypeConfig< - ResolversTypes["SignedDisplayMajorAmount"], - any - > { - name: "SignedDisplayMajorAmount"; +export interface SignedDisplayMajorAmountScalarConfig extends GraphQLScalarTypeConfig { + name: 'SignedDisplayMajorAmount'; } -export type SubscriptionResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["Subscription"] = ResolversParentTypes["Subscription"], -> = { - lnInvoicePaymentStatus?: SubscriptionResolver< - ResolversTypes["LnInvoicePaymentStatusPayload"], - "lnInvoicePaymentStatus", - ParentType, - ContextType, - RequireFields - >; - myUpdates?: SubscriptionResolver< - ResolversTypes["MyUpdatesPayload"], - "myUpdates", - ParentType, - ContextType - >; - price?: SubscriptionResolver< - ResolversTypes["PricePayload"], - "price", - ParentType, - ContextType, - RequireFields - >; - realtimePrice?: SubscriptionResolver< - ResolversTypes["RealtimePricePayload"], - "realtimePrice", - ParentType, - ContextType, - RequireFields - >; -}; - -export type SuccessPayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["SuccessPayload"] = ResolversParentTypes["SuccessPayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - success?: Resolver, ParentType, ContextType>; +export type SubscriptionResolvers = { + lnInvoicePaymentStatus?: SubscriptionResolver>; + myUpdates?: SubscriptionResolver; + price?: SubscriptionResolver>; + realtimePrice?: SubscriptionResolver>; +}; + +export type SuccessPayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + success?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export interface TimestampScalarConfig - extends GraphQLScalarTypeConfig { - name: "Timestamp"; +export interface TimestampScalarConfig extends GraphQLScalarTypeConfig { + name: 'Timestamp'; } -export interface TotpCodeScalarConfig - extends GraphQLScalarTypeConfig { - name: "TotpCode"; +export interface TotpCodeScalarConfig extends GraphQLScalarTypeConfig { + name: 'TotpCode'; } -export interface TotpRegistrationIdScalarConfig - extends GraphQLScalarTypeConfig { - name: "TotpRegistrationId"; +export interface TotpRegistrationIdScalarConfig extends GraphQLScalarTypeConfig { + name: 'TotpRegistrationId'; } -export interface TotpSecretScalarConfig - extends GraphQLScalarTypeConfig { - name: "TotpSecret"; +export interface TotpSecretScalarConfig extends GraphQLScalarTypeConfig { + name: 'TotpSecret'; } -export type TransactionResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["Transaction"] = ResolversParentTypes["Transaction"], -> = { - createdAt?: Resolver; - direction?: Resolver; - id?: Resolver; - initiationVia?: Resolver< - ResolversTypes["InitiationVia"], - ParentType, - ContextType - >; - memo?: Resolver, ParentType, ContextType>; - settlementAmount?: Resolver< - ResolversTypes["SignedAmount"], - ParentType, - ContextType - >; - settlementCurrency?: Resolver< - ResolversTypes["WalletCurrency"], - ParentType, - ContextType - >; - settlementDisplayAmount?: Resolver< - ResolversTypes["SignedDisplayMajorAmount"], - ParentType, - ContextType - >; - settlementDisplayCurrency?: Resolver< - ResolversTypes["DisplayCurrency"], - ParentType, - ContextType - >; - settlementDisplayFee?: Resolver< - ResolversTypes["SignedDisplayMajorAmount"], - ParentType, - ContextType - >; - settlementFee?: Resolver< - ResolversTypes["SignedAmount"], - ParentType, - ContextType - >; - settlementPrice?: Resolver< - ResolversTypes["PriceOfOneSettlementMinorUnitInDisplayMinorUnit"], - ParentType, - ContextType - >; - settlementVia?: Resolver< - ResolversTypes["SettlementVia"], - ParentType, - ContextType - >; - status?: Resolver; +export type TransactionResolvers = { + createdAt?: Resolver; + direction?: Resolver; + id?: Resolver; + initiationVia?: Resolver; + memo?: Resolver, ParentType, ContextType>; + settlementAmount?: Resolver; + settlementCurrency?: Resolver; + settlementDisplayAmount?: Resolver; + settlementDisplayCurrency?: Resolver; + settlementDisplayFee?: Resolver; + settlementFee?: Resolver; + settlementPrice?: Resolver; + settlementVia?: Resolver; + status?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type TransactionConnectionResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["TransactionConnection"] = ResolversParentTypes["TransactionConnection"], -> = { - edges?: Resolver< - Maybe>, - ParentType, - ContextType - >; - pageInfo?: Resolver; +export type TransactionConnectionResolvers = { + edges?: Resolver>, ParentType, ContextType>; + pageInfo?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type TransactionEdgeResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["TransactionEdge"] = ResolversParentTypes["TransactionEdge"], -> = { - cursor?: Resolver; - node?: Resolver; +export type TransactionEdgeResolvers = { + cursor?: Resolver; + node?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type UpgradePayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["UpgradePayload"] = ResolversParentTypes["UpgradePayload"], -> = { - authToken?: Resolver< - Maybe, - ParentType, - ContextType - >; - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - success?: Resolver; +export type UpgradePayloadResolvers = { + authToken?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; + success?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type UsdWalletResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["UsdWallet"] = ResolversParentTypes["UsdWallet"], -> = { - accountId?: Resolver; - balance?: Resolver; - id?: Resolver; - pendingIncomingBalance?: Resolver< - ResolversTypes["SignedAmount"], - ParentType, - ContextType - >; - transactions?: Resolver< - Maybe, - ParentType, - ContextType, - Partial - >; - transactionsByAddress?: Resolver< - Maybe, - ParentType, - ContextType, - RequireFields - >; - walletCurrency?: Resolver< - ResolversTypes["WalletCurrency"], - ParentType, - ContextType - >; +export type UsdWalletResolvers = { + accountId?: Resolver; + balance?: Resolver; + id?: Resolver; + pendingIncomingBalance?: Resolver; + transactions?: Resolver, ParentType, ContextType, Partial>; + transactionsByAddress?: Resolver, ParentType, ContextType, RequireFields>; + walletCurrency?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type UserResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["User"] = ResolversParentTypes["User"], -> = { - contactByUsername?: Resolver< - ResolversTypes["UserContact"], - ParentType, - ContextType, - RequireFields - >; - contacts?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - createdAt?: Resolver; - defaultAccount?: Resolver; - email?: Resolver, ParentType, ContextType>; - id?: Resolver; - language?: Resolver; - phone?: Resolver, ParentType, ContextType>; - quizQuestions?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - totpEnabled?: Resolver; - username?: Resolver< - Maybe, - ParentType, - ContextType - >; +export type UserResolvers = { + contactByUsername?: Resolver>; + contacts?: Resolver, ParentType, ContextType>; + createdAt?: Resolver; + defaultAccount?: Resolver; + email?: Resolver, ParentType, ContextType>; + id?: Resolver; + language?: Resolver; + phone?: Resolver, ParentType, ContextType>; + quizQuestions?: Resolver, ParentType, ContextType>; + totpEnabled?: Resolver; + username?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type UserContactResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["UserContact"] = ResolversParentTypes["UserContact"], -> = { - alias?: Resolver< - Maybe, - ParentType, - ContextType - >; - id?: Resolver; - transactions?: Resolver< - Maybe, - ParentType, - ContextType, - Partial - >; - transactionsCount?: Resolver; - username?: Resolver; +export type UserContactResolvers = { + alias?: Resolver, ParentType, ContextType>; + id?: Resolver; + transactions?: Resolver, ParentType, ContextType, Partial>; + transactionsCount?: Resolver; + username?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type UserContactUpdateAliasPayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["UserContactUpdateAliasPayload"] = ResolversParentTypes["UserContactUpdateAliasPayload"], -> = { - contact?: Resolver< - Maybe, - ParentType, - ContextType - >; - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; +export type UserContactUpdateAliasPayloadResolvers = { + contact?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type UserEmailDeletePayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["UserEmailDeletePayload"] = ResolversParentTypes["UserEmailDeletePayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - me?: Resolver, ParentType, ContextType>; +export type UserEmailDeletePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + me?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type UserEmailRegistrationInitiatePayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["UserEmailRegistrationInitiatePayload"] = ResolversParentTypes["UserEmailRegistrationInitiatePayload"], -> = { - emailRegistrationId?: Resolver< - Maybe, - ParentType, - ContextType - >; - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - me?: Resolver, ParentType, ContextType>; +export type UserEmailRegistrationInitiatePayloadResolvers = { + emailRegistrationId?: Resolver, ParentType, ContextType>; + errors?: Resolver, ParentType, ContextType>; + me?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type UserEmailRegistrationValidatePayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["UserEmailRegistrationValidatePayload"] = ResolversParentTypes["UserEmailRegistrationValidatePayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - me?: Resolver, ParentType, ContextType>; +export type UserEmailRegistrationValidatePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + me?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type UserPhoneDeletePayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["UserPhoneDeletePayload"] = ResolversParentTypes["UserPhoneDeletePayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - me?: Resolver, ParentType, ContextType>; +export type UserPhoneDeletePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + me?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type UserPhoneRegistrationValidatePayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["UserPhoneRegistrationValidatePayload"] = ResolversParentTypes["UserPhoneRegistrationValidatePayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - me?: Resolver, ParentType, ContextType>; +export type UserPhoneRegistrationValidatePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + me?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type UserQuizQuestionResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["UserQuizQuestion"] = ResolversParentTypes["UserQuizQuestion"], -> = { - completed?: Resolver; - question?: Resolver; +export type UserQuizQuestionResolvers = { + completed?: Resolver; + question?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; -export type UserQuizQuestionUpdateCompletedPayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["UserQuizQuestionUpdateCompletedPayload"] = ResolversParentTypes["UserQuizQuestionUpdateCompletedPayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - userQuizQuestion?: Resolver< - Maybe, - ParentType, - ContextType - >; +export type UserTotpDeletePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + me?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type UserTotpDeletePayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["UserTotpDeletePayload"] = ResolversParentTypes["UserTotpDeletePayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - me?: Resolver, ParentType, ContextType>; +export type UserTotpRegistrationInitiatePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + totpRegistrationId?: Resolver, ParentType, ContextType>; + totpSecret?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type UserTotpRegistrationInitiatePayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["UserTotpRegistrationInitiatePayload"] = ResolversParentTypes["UserTotpRegistrationInitiatePayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - totpRegistrationId?: Resolver< - Maybe, - ParentType, - ContextType - >; - totpSecret?: Resolver< - Maybe, - ParentType, - ContextType - >; +export type UserTotpRegistrationValidatePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + me?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type UserTotpRegistrationValidatePayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["UserTotpRegistrationValidatePayload"] = ResolversParentTypes["UserTotpRegistrationValidatePayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - me?: Resolver, ParentType, ContextType>; - __isTypeOf?: IsTypeOfResolverFn; +export type UserUpdateResolvers = { + __resolveType: TypeResolveFn<'IntraLedgerUpdate' | 'LnUpdate' | 'OnChainUpdate' | 'Price' | 'RealtimePrice', ParentType, ContextType>; }; -export type UserUpdateResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["UserUpdate"] = ResolversParentTypes["UserUpdate"], -> = { - __resolveType: TypeResolveFn< - | "IntraLedgerUpdate" - | "LnUpdate" - | "OnChainUpdate" - | "Price" - | "RealtimePrice", - ParentType, - ContextType - >; -}; - -export type UserUpdateLanguagePayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["UserUpdateLanguagePayload"] = ResolversParentTypes["UserUpdateLanguagePayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - user?: Resolver, ParentType, ContextType>; +export type UserUpdateLanguagePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + user?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export type UserUpdateUsernamePayloadResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["UserUpdateUsernamePayload"] = ResolversParentTypes["UserUpdateUsernamePayload"], -> = { - errors?: Resolver< - ReadonlyArray, - ParentType, - ContextType - >; - user?: Resolver, ParentType, ContextType>; +export type UserUpdateUsernamePayloadResolvers = { + errors?: Resolver, ParentType, ContextType>; + user?: Resolver, ParentType, ContextType>; __isTypeOf?: IsTypeOfResolverFn; }; -export interface UsernameScalarConfig - extends GraphQLScalarTypeConfig { - name: "Username"; +export interface UsernameScalarConfig extends GraphQLScalarTypeConfig { + name: 'Username'; } -export type WalletResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["Wallet"] = ResolversParentTypes["Wallet"], -> = { - __resolveType: TypeResolveFn< - "BTCWallet" | "UsdWallet", - ParentType, - ContextType - >; - accountId?: Resolver; - balance?: Resolver; - id?: Resolver; - pendingIncomingBalance?: Resolver< - ResolversTypes["SignedAmount"], - ParentType, - ContextType - >; - transactions?: Resolver< - Maybe, - ParentType, - ContextType, - Partial - >; - transactionsByAddress?: Resolver< - Maybe, - ParentType, - ContextType, - RequireFields - >; - walletCurrency?: Resolver< - ResolversTypes["WalletCurrency"], - ParentType, - ContextType - >; -}; - -export interface WalletIdScalarConfig - extends GraphQLScalarTypeConfig { - name: "WalletId"; +export type WalletResolvers = { + __resolveType: TypeResolveFn<'BTCWallet' | 'UsdWallet', ParentType, ContextType>; + accountId?: Resolver; + balance?: Resolver; + id?: Resolver; + pendingIncomingBalance?: Resolver; + transactions?: Resolver, ParentType, ContextType, Partial>; + transactionsByAddress?: Resolver, ParentType, ContextType, RequireFields>; + walletCurrency?: Resolver; +}; + +export interface WalletIdScalarConfig extends GraphQLScalarTypeConfig { + name: 'WalletId'; } -export type WelcomeProfileResolvers< - ContextType = any, - ParentType extends - ResolversParentTypes["WelcomeProfile"] = ResolversParentTypes["WelcomeProfile"], -> = { - allTimePoints?: Resolver; - allTimeRank?: Resolver; - innerCircleAllTimeCount?: Resolver< - ResolversTypes["Int"], - ParentType, - ContextType - >; - innerCircleThisMonthCount?: Resolver< - ResolversTypes["Int"], - ParentType, - ContextType - >; - leaderboardName?: Resolver< - Maybe, - ParentType, - ContextType - >; - outerCircleAllTimeCount?: Resolver< - ResolversTypes["Int"], - ParentType, - ContextType - >; - outerCircleThisMonthCount?: Resolver< - ResolversTypes["Int"], - ParentType, - ContextType - >; - thisMonthPoints?: Resolver; - thisMonthRank?: Resolver; +export type WelcomeProfileResolvers = { + allTimePoints?: Resolver; + allTimeRank?: Resolver; + innerCircleAllTimeCount?: Resolver; + innerCircleThisMonthCount?: Resolver; + leaderboardName?: Resolver, ParentType, ContextType>; + outerCircleAllTimeCount?: Resolver; + outerCircleThisMonthCount?: Resolver; + thisMonthPoints?: Resolver; + thisMonthRank?: Resolver; __isTypeOf?: IsTypeOfResolverFn; }; @@ -5355,7 +3693,6 @@ export type Resolvers = { UserPhoneDeletePayload?: UserPhoneDeletePayloadResolvers; UserPhoneRegistrationValidatePayload?: UserPhoneRegistrationValidatePayloadResolvers; UserQuizQuestion?: UserQuizQuestionResolvers; - UserQuizQuestionUpdateCompletedPayload?: UserQuizQuestionUpdateCompletedPayloadResolvers; UserTotpDeletePayload?: UserTotpDeletePayloadResolvers; UserTotpRegistrationInitiatePayload?: UserTotpRegistrationInitiatePayloadResolvers; UserTotpRegistrationValidatePayload?: UserTotpRegistrationValidatePayloadResolvers; diff --git a/apps/dashboard/services/graphql/mutations/email.ts b/apps/dashboard/services/graphql/mutations/email.ts new file mode 100644 index 0000000000..dd980ece91 --- /dev/null +++ b/apps/dashboard/services/graphql/mutations/email.ts @@ -0,0 +1,133 @@ +import { gql } from "@apollo/client"; +import { apollo } from ".."; +import { + UserEmailDeleteDocument, + UserEmailDeleteMutation, + UserEmailRegistrationInitiateDocument, + UserEmailRegistrationInitiateMutation, + UserEmailRegistrationValidateDocument, + UserEmailRegistrationValidateInput, + UserEmailRegistrationValidateMutation, +} from "../generated"; + +gql` + mutation UserEmailRegistrationInitiate( + $input: UserEmailRegistrationInitiateInput! + ) { + userEmailRegistrationInitiate(input: $input) { + emailRegistrationId + errors { + message + code + } + } + } +`; + +gql` + mutation UserEmailRegistrationValidate( + $input: UserEmailRegistrationValidateInput! + ) { + userEmailRegistrationValidate(input: $input) { + errors { + message + code + } + } + } +`; + +gql` + mutation UserEmailDelete { + userEmailDelete { + errors { + code + message + } + } + } +`; + +export async function emailRegistrationInitiate(email: string, token: string) { + const client = apollo(token).getClient(); + try { + let errorMessages; + const { data } = await client.mutate( + { + mutation: UserEmailRegistrationInitiateDocument, + variables: { input: { email } }, + } + ); + if (data?.userEmailRegistrationInitiate.errors.length) { + errorMessages = data?.userEmailRegistrationInitiate.errors.map( + (err) => err.message + ); + console.error(errorMessages); + throw new Error("Error Initiating Totp Request"); + } + + return data; + } catch (error) { + console.error("Error executing mutation:", error); + throw new Error("Error in emailRegistrationInitiate"); + } +} + +export async function emailRegistrationValidate( + code: string, + emailRegistrationId: string, + token: string +) { + const client = apollo(token).getClient(); + try { + let errorMessages; + const { data } = await client.mutate( + { + mutation: UserEmailRegistrationValidateDocument, + variables: { + input: { + code, + emailRegistrationId, + }, + }, + } + ); + if (data?.userEmailRegistrationValidate.errors.length) { + errorMessages = data?.userEmailRegistrationValidate.errors.map( + (err) => err.message + ); + console.error(errorMessages); + throw new Error("Error Validating Totp Request"); + } + + return data; + } catch (error) { + console.error("Error executing mutation:", error); + throw new Error("Error in UserTotpRegistrationValidate"); + } +} + + +export async function deleteEmail( + token: string +) { + const client = apollo(token).getClient(); + try { + let errorMessages; + const { data } = await client.mutate( + { + mutation: UserEmailDeleteDocument, + } + ); + if (data?.userEmailDelete.errors.length) { + errorMessages = data?.userEmailDelete.errors.map((err) => err.message); + console.error(errorMessages); + throw new Error("Error userEmailDelete Request"); + } + + return data; + } catch (error) { + console.error("Error executing userEmailDelete mutation:", error); + throw new Error("Error in userEmailDelete"); + } +} diff --git a/apps/dashboard/services/graphql/mutations/totp.ts b/apps/dashboard/services/graphql/mutations/totp.ts new file mode 100644 index 0000000000..35d569d46a --- /dev/null +++ b/apps/dashboard/services/graphql/mutations/totp.ts @@ -0,0 +1,87 @@ +// import { gql } from "@apollo/client"; +// import { +// UserTotpRegistrationInitiateDocument, +// UserTotpRegistrationInitiateInput, +// UserTotpRegistrationInitiateMutation, +// UserTotpRegistrationValidateDocument, +// UserTotpRegistrationValidateInput, +// UserTotpRegistrationValidateMutation, +// } from "../generated"; +// import { apollo } from ".."; + +// gql` +// mutation UserTotpRegistrationInitiate( +// $input: UserTotpRegistrationInitiateInput! +// ) { +// userTotpRegistrationInitiate(input: $input) { +// totpRegistrationId +// totpSecret +// errors { +// code +// message +// } +// } +// } +// `; + +// gql` +// mutation UserTotpRegistrationValidate( +// $input: UserTotpRegistrationValidateInput! +// ) { +// userTotpRegistrationValidate(input: $input) { +// errors { +// message +// code +// } +// } +// } +// `; + +// export async function totpRegistrationInitiate(token: string) { +// const client = apollo(token).getClient(); +// try { +// let errorMessages; +// const { data } = await client.mutate({ +// mutation: UserTotpRegistrationInitiateDocument, +// variables: { input: { authToken: token } }, +// }); +// if (data?.userTotpRegistrationInitiate.errors.length) { +// errorMessages = data?.userTotpRegistrationInitiate.errors.map( +// (err) => err.message +// ); +// console.error(errorMessages); +// throw new Error("Error Initiating Totp Request"); +// } + +// return data; +// } catch (error) { +// console.error("Error executing mutation:", error); +// throw new Error("Error in UserTotpRegistrationInitiate"); +// } +// } + +// export async function totpRegistrationValidate( +// input: UserTotpRegistrationValidateInput, +// token: string +// ) { +// const client = apollo(token).getClient(); +// try { +// let errorMessages; +// const { data } = await client.mutate({ +// mutation: UserTotpRegistrationValidateDocument, +// variables: { input }, +// }); +// if (data?.userTotpRegistrationValidate.errors.length) { +// errorMessages = data?.userTotpRegistrationValidate.errors.map( +// (err) => err.message +// ); +// console.error(errorMessages); +// throw new Error("Error Validating Totp Request"); +// } + +// return data; +// } catch (error) { +// console.error("Error executing mutation:", error); +// throw new Error("Error in UserTotpRegistrationValidate"); +// } +// } diff --git a/apps/dashboard/services/graphql/queries/me-data.ts b/apps/dashboard/services/graphql/queries/me-data.ts index 77c678eee1..02453b3e05 100644 --- a/apps/dashboard/services/graphql/queries/me-data.ts +++ b/apps/dashboard/services/graphql/queries/me-data.ts @@ -23,6 +23,12 @@ gql` walletCurrency } } + totpEnabled + username + email { + address + verified + } } } ` From e871d9824453f74eca1ade48d055456b6a7a5f24 Mon Sep 17 00:00:00 2001 From: Siddharth Date: Mon, 23 Oct 2023 09:37:29 +0530 Subject: [PATCH 2/7] feat: added email registration --- apps/dashboard/app/profile/page.tsx | 18 -- .../dashboard/app/security/email/add/page.tsx | 103 +++++++++++ .../app/security/email/verify/page.tsx | 58 ++++++ .../app/security/email/verify/verify-form.tsx | 114 ++++++++++++ apps/dashboard/app/security/page.tsx | 27 +++ .../security}/server-actions.ts | 65 ++++--- .../email/add-email-modal.tsx | 173 ------------------ .../profile-settings/email/email.tsx | 62 ------- .../profile-settings/email/verify-modal.tsx | 144 --------------- .../components/profile-settings/totp.tsx | 40 ---- .../components/security/email/email.tsx | 67 +++++++ apps/dashboard/components/side-bar/index.tsx | 8 +- .../services/graphql/mutations/email.ts | 44 +---- 13 files changed, 423 insertions(+), 500 deletions(-) delete mode 100644 apps/dashboard/app/profile/page.tsx create mode 100644 apps/dashboard/app/security/email/add/page.tsx create mode 100644 apps/dashboard/app/security/email/verify/page.tsx create mode 100644 apps/dashboard/app/security/email/verify/verify-form.tsx create mode 100644 apps/dashboard/app/security/page.tsx rename apps/dashboard/{components/profile-settings => app/security}/server-actions.ts (57%) delete mode 100644 apps/dashboard/components/profile-settings/email/add-email-modal.tsx delete mode 100644 apps/dashboard/components/profile-settings/email/email.tsx delete mode 100644 apps/dashboard/components/profile-settings/email/verify-modal.tsx delete mode 100644 apps/dashboard/components/profile-settings/totp.tsx create mode 100644 apps/dashboard/components/security/email/email.tsx diff --git a/apps/dashboard/app/profile/page.tsx b/apps/dashboard/app/profile/page.tsx deleted file mode 100644 index f6e3b6ff24..0000000000 --- a/apps/dashboard/app/profile/page.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { getServerSession } from "next-auth"; -import { authOptions } from "./../api/auth/[...nextauth]/route"; -import ContentContainer from "@/components/content-container"; -import { Box } from "@mui/joy"; -import EnableEmail from "@/components/profile-settings/email/email"; - -export default async function Home() { - const session = await getServerSession(authOptions); - const totpEnabled = session?.userData.data.me?.totpEnabled; - const email = session?.userData.data.me?.email; - return ( -
- - - -
- ); -} \ No newline at end of file diff --git a/apps/dashboard/app/security/email/add/page.tsx b/apps/dashboard/app/security/email/add/page.tsx new file mode 100644 index 0000000000..e1401efa11 --- /dev/null +++ b/apps/dashboard/app/security/email/add/page.tsx @@ -0,0 +1,103 @@ +"use client"; +import { getServerSession } from "next-auth"; +import { authOptions } from "../../../api/auth/[...nextauth]/route"; +import ContentContainer from "@/components/content-container"; +import ArrowForwardIcon from "@mui/icons-material/ArrowForward"; +// @ts-ignore-next-line no-implicit-any error +import { experimental_useFormState as useFormState } from "react-dom"; +import { emailRegisterInitiateServerAction } from "../../server-actions"; + +import { + Box, + Button, + Input, + FormControl, + FormLabel, + FormHelperText, + Card, + Typography, + Link as MuiLink, +} from "@mui/joy"; +import InfoOutlined from "@mui/icons-material/InfoOutlined"; +import { CheckBox } from "@mui/icons-material"; +import Link from "next/link"; +export default function AddEmail() { + const [state, formAction] = useFormState(emailRegisterInitiateServerAction, { + error: null, + message: null, + responsePayload: {}, + }); + + return ( +
+ + Add Email Address + +
+ Email + + {state.error ? ( + + + Opps! something is wrong. + + ) : null} + + + Cancel + + +
+
+
+
+ ); +} diff --git a/apps/dashboard/app/security/email/verify/page.tsx b/apps/dashboard/app/security/email/verify/page.tsx new file mode 100644 index 0000000000..237da23277 --- /dev/null +++ b/apps/dashboard/app/security/email/verify/page.tsx @@ -0,0 +1,58 @@ +import { authOptions } from "@/app/api/auth/[...nextauth]/route"; +import VerfiyEmailForm from "./verify-form"; +import { getServerSession } from "next-auth"; +import { redirect } from "next/navigation"; +import { + deleteEmail, + emailRegistrationInitiate, +} from "@/services/graphql/mutations/email"; + +type VerifyEmailProp = { + emailRegistrationId: string | null | undefined; +}; + +export default async function VerfiyEmail({ + searchParams, +}: { + searchParams: VerifyEmailProp; +}) { + let { emailRegistrationId } = searchParams; + + const session = await getServerSession(authOptions); + const token = session?.accessToken; + + + // this is if user has address but not verified + if (!emailRegistrationId || typeof emailRegistrationId !== "string") { + const email = session?.userData.data.me?.email?.address; + if (!email || typeof email !== "string" || !token) { + redirect("/security"); + } + + await deleteEmail(token); + let data; + try { + data = await emailRegistrationInitiate(email, token); + } catch (err) { + console.log("error in emailRegistrationInitiate ", err); + redirect("/security"); + } + + if (data?.userEmailRegistrationInitiate.errors.length) { + redirect("/security"); + } + + emailRegistrationId = + data?.userEmailRegistrationInitiate.emailRegistrationId; + } + + if (!emailRegistrationId && typeof emailRegistrationId !== "string") { + redirect("/security"); + } + + return ( + + ); +} diff --git a/apps/dashboard/app/security/email/verify/verify-form.tsx b/apps/dashboard/app/security/email/verify/verify-form.tsx new file mode 100644 index 0000000000..ba4ec56328 --- /dev/null +++ b/apps/dashboard/app/security/email/verify/verify-form.tsx @@ -0,0 +1,114 @@ +"use client"; +import { getServerSession } from "next-auth"; +import { authOptions } from "../../../api/auth/[...nextauth]/route"; +import ContentContainer from "@/components/content-container"; +import ArrowForwardIcon from "@mui/icons-material/ArrowForward"; +// @ts-ignore-next-line no-implicit-any error +import { experimental_useFormState as useFormState } from "react-dom"; +import { emailRegisterValidateServerAction } from "../../server-actions"; + +import { + Box, + Button, + Input, + FormControl, + FormLabel, + FormHelperText, + Card, + Typography, +} from "@mui/joy"; +import InfoOutlined from "@mui/icons-material/InfoOutlined"; +import { CheckBox } from "@mui/icons-material"; +import Link from "next/link"; + +type VerfiyEmailFormProps = { + emailRegistrationId: string; +}; +export default function VerfiyEmailForm({ + emailRegistrationId, +}: VerfiyEmailFormProps) { + const [state, formAction] = useFormState(emailRegisterValidateServerAction, { + error: null, + message: null, + responsePayload: {}, + }); + + return ( +
+ + Verification Code + +
+ Code + + + + {state.error ? ( + + + {state.message} + + ) : null} + + + Cancel + + +
+
+
+
+ ); +} diff --git a/apps/dashboard/app/security/page.tsx b/apps/dashboard/app/security/page.tsx new file mode 100644 index 0000000000..58cb928270 --- /dev/null +++ b/apps/dashboard/app/security/page.tsx @@ -0,0 +1,27 @@ +import { getServerSession } from "next-auth"; +import { authOptions } from "@/app/api/auth/[...nextauth]/route"; +import ContentContainer from "@/components/content-container"; +import EmailSettings from "@/components/security/email/email"; +import { Box } from "@mui/joy"; + +export default async function Home() { + const session = await getServerSession(authOptions); + const totpEnabled = session?.userData.data.me?.totpEnabled; + const email = session?.userData.data.me?.email; + return ( + + + {email ? : null} + + + ); +} diff --git a/apps/dashboard/components/profile-settings/server-actions.ts b/apps/dashboard/app/security/server-actions.ts similarity index 57% rename from apps/dashboard/components/profile-settings/server-actions.ts rename to apps/dashboard/app/security/server-actions.ts index 8d85422910..5b1a9ca4a4 100644 --- a/apps/dashboard/components/profile-settings/server-actions.ts +++ b/apps/dashboard/app/security/server-actions.ts @@ -34,28 +34,30 @@ export const emailRegisterInitiateServerAction = async ( }; } - if ( - session?.userData.data.me?.email?.address && - !session?.userData.data.me?.email?.verified - ) { - await deleteEmail(token); + let data; + try { + data = await emailRegistrationInitiate(email, token); + } catch (err) { + console.log("error in emailRegistrationInitiate ", err); + return { + error: true, + message: + "Something went wrong Please try again and if error persist contact support", + data: null, + }; } - const data = await emailRegistrationInitiate(email, token); - if (data instanceof Error) { + if (data?.userEmailRegistrationInitiate.errors.length) { return { error: true, - message: data.message, + message: data?.userEmailRegistrationInitiate.errors[0], data: null, }; } - revalidatePath("/"); - return { - error: false, - message: "success", - data: data, - }; + const emailRegistrationId = + data?.userEmailRegistrationInitiate.emailRegistrationId; + redirect(`/security/email/verify?emailRegistrationId=${emailRegistrationId}`); }; export const emailRegisterValidateServerAction = async ( @@ -64,10 +66,11 @@ export const emailRegisterValidateServerAction = async ( ) => { const code = form.get("code"); const emailRegistrationId = form.get("emailRegistrationId"); + if ( !code || - !emailRegistrationId || typeof code !== "string" || + !emailRegistrationId || typeof emailRegistrationId !== "string" ) { return { @@ -79,7 +82,8 @@ export const emailRegisterValidateServerAction = async ( const session = await getServerSession(authOptions); const token = session?.accessToken; - if (!token && typeof token !== "string") { + + if (!token || typeof token !== "string") { return { error: true, message: "Invalid Token", @@ -87,18 +91,31 @@ export const emailRegisterValidateServerAction = async ( }; } - const data = await emailRegistrationValidate( - code, - emailRegistrationId, - token - ); - if (data instanceof Error) { + let codeVerificationResponse; + try { + codeVerificationResponse = await emailRegistrationValidate( + code, + emailRegistrationId, + token + ); + } catch (err) { + console.log("error in emailRegistrationValidate ", err); + return { + error: true, + message: + "Something went wrong Please try again and if error persist contact support", + data: null, + }; + } + + if (codeVerificationResponse?.userEmailRegistrationValidate.errors.length) { return { error: true, - message: data.message, + message: + codeVerificationResponse?.userEmailRegistrationValidate.errors[0], data: null, }; } - redirect("/profile"); + redirect("/security"); }; diff --git a/apps/dashboard/components/profile-settings/email/add-email-modal.tsx b/apps/dashboard/components/profile-settings/email/add-email-modal.tsx deleted file mode 100644 index 29ffaf858b..0000000000 --- a/apps/dashboard/components/profile-settings/email/add-email-modal.tsx +++ /dev/null @@ -1,173 +0,0 @@ -"use client"; -// Import statements -import React from "react"; -import { - Box, - Button, - CircularProgress, - Input, - Modal, - Sheet, - Typography, -} from "@mui/joy"; -import { - emailRegisterInitiateServerAction, - emailRegisterValidateServerAction, -} from "./../server-actions"; -// @ts-ignore -import { experimental_useFormState as useFormState } from "react-dom"; -// @ts-ignore -import { experimental_useFormStatus as useFormStatus } from "react-dom"; - -type emailDataProps = { - readonly address?: string | null | undefined; - readonly verified?: boolean | null | undefined; - modalOpen: boolean; - setModalOpen: (modalOpen: boolean) => void; -}; - -function EnableEmailModal({ - address, - verified, - modalOpen, - setModalOpen, -}: emailDataProps) { - const { pending } = useFormStatus(); - const [initiateState, initiateFormAction] = useFormState( - emailRegisterInitiateServerAction, - null - ); - const [validateState, validateFormAction] = useFormState( - emailRegisterValidateServerAction, - null - ); - - const handleClose = (event: React.SyntheticEvent, reason: string) => { - if (reason === "backdropClick") { - event.stopPropagation(); - return; - } - - setModalOpen(false); - }; - - return ( - - - {address && !verified && initiateState?.message !== "success" ? ( -
- {pending ? ( - - ) : ( - <> - - Email Confirmation - - A code will be sent to your email {address} - - - - - - - )} - - ) : initiateState?.message === "success" ? ( -
- {pending ? ( - - ) : ( - <> - - Validation Code - - - - - - - - - )} - - ) : ( -
- {pending ? ( - - ) : ( - <> - - Email Entry - - Enter your Email Id - - - - - - - )} - - )} -
-
- ); -} - -export default EnableEmailModal; diff --git a/apps/dashboard/components/profile-settings/email/email.tsx b/apps/dashboard/components/profile-settings/email/email.tsx deleted file mode 100644 index 670df08098..0000000000 --- a/apps/dashboard/components/profile-settings/email/email.tsx +++ /dev/null @@ -1,62 +0,0 @@ -"use client"; -import React, { useState } from "react"; -import { Button, Typography } from "@mui/joy"; -import AddEmailModal from "./add-email-modal"; -import VerifyModal from "./verify-modal"; - -import { Box } from "@mui/joy"; - -type EmailDataProps = { - readonly address?: string | null | undefined; - readonly verified?: boolean | null | undefined; -}; - -function EnableEmail({ address, verified }: EmailDataProps) { - const [modalOpen, setModalOpen] = useState(false); - console.log(address, verified); - return ( - - Email Address - <> - {verified ? ( - <>{address} - ) : address ? ( - <> - - - - ) : ( - <> - - - )} - - - ); -} - -export default EnableEmail; diff --git a/apps/dashboard/components/profile-settings/email/verify-modal.tsx b/apps/dashboard/components/profile-settings/email/verify-modal.tsx deleted file mode 100644 index daab952d0e..0000000000 --- a/apps/dashboard/components/profile-settings/email/verify-modal.tsx +++ /dev/null @@ -1,144 +0,0 @@ -"use client"; -// Import statements -import React from "react"; -import { - Box, - Button, - CircularProgress, - Input, - Modal, - Sheet, - Typography, -} from "@mui/joy"; -import { - emailRegisterInitiateServerAction, - emailRegisterValidateServerAction, -} from "./../server-actions"; -// @ts-ignore -import { experimental_useFormState as useFormState } from "react-dom"; -// @ts-ignore -import { experimental_useFormStatus as useFormStatus } from "react-dom"; -import { useRouter } from "next/navigation"; -import { revalidatePath } from "next/cache"; - -type emailDataProps = { - readonly address?: string | null | undefined; - readonly verified?: boolean | null | undefined; - modalOpen: boolean; - setModalOpen: (modalOpen: boolean) => void; -}; - -function EnableEmailModal({ - address, - verified, - modalOpen, - setModalOpen, -}: emailDataProps) { - const { pending } = useFormStatus(); - const router = useRouter(); - const [initiateState, initiateFormAction] = useFormState( - emailRegisterInitiateServerAction, - null - ); - const [validateState, validateFormAction] = useFormState( - emailRegisterValidateServerAction, - null - ); - - const handleClose = (event: React.SyntheticEvent, reason: string) => { - if (reason === "backdropClick") { - event.stopPropagation(); - return; - } - revalidatePath("/profile", "page"); - }; - - return initiateState?.message === "success" ? ( -
- {pending ? ( - - ) : ( - <> - - Validation Code - - - - - - - - - )} - - ) : address ? ( - - -
- {pending ? ( - - ) : ( - <> - - Email Confirmation - - A code will be sent to your email {address} - - - - - - - )} - -
-
- ) : null; -} - -export default EnableEmailModal; diff --git a/apps/dashboard/components/profile-settings/totp.tsx b/apps/dashboard/components/profile-settings/totp.tsx deleted file mode 100644 index b1d61f9b97..0000000000 --- a/apps/dashboard/components/profile-settings/totp.tsx +++ /dev/null @@ -1,40 +0,0 @@ -// "use client"; -// import React, { useState } from "react"; -// import { Box, Button, Modal } from "@mui/joy"; -// import { totpInitiateServerAction } from "./server-actions"; -// import { useFormState, useFormStatus } from "react-dom"; - -// function EnableTotp() { -// const [modalOpen, setModalOpen] = useState(false); -// const [responseData, setResponseData] = useState({ -// error: false, -// message: "null", -// data: null, -// }); - -// const handleClick = async () => { -// const response = await totpInitiateServerAction(); -// if (response.error || !response.data) { -// return; -// } -// setResponseData(response?.data); -// }; - -// return ( -// <> -// {responseData.message === "success" && ( -// setModalOpen(false)} -// aria-labelledby="modal-modal-title" -// aria-describedby="modal-modal-description" -// > -// {responseData.message} -// -// )} -// -// -// ); -// } - -// export default EnableTotp; diff --git a/apps/dashboard/components/security/email/email.tsx b/apps/dashboard/components/security/email/email.tsx new file mode 100644 index 0000000000..503ae537ce --- /dev/null +++ b/apps/dashboard/components/security/email/email.tsx @@ -0,0 +1,67 @@ +import React, { useState } from "react"; +import { Button, Typography, Card } from "@mui/joy"; +import { Box } from "@mui/joy"; +import EmailIcon from "@mui/icons-material/Email"; +import DeleteIcon from "@mui/icons-material/Delete"; +import Link from "next/link"; + +type EmailDataProps = { + readonly __typename: "Email"; + readonly address?: string | null | undefined; + readonly verified?: boolean | null | undefined; +}; + +function EmailSettings(emailData: EmailDataProps) { + return ( + + + + + Email + + Use email to login in your Account + + + + {emailData?.address} + + + + {emailData?.verified ? ( + + + + ) : emailData?.address ? ( + + + + ) : ( + + + + )} + + + ); +} + +export default EmailSettings; diff --git a/apps/dashboard/components/side-bar/index.tsx b/apps/dashboard/components/side-bar/index.tsx index fc8628cc46..d763ac6813 100644 --- a/apps/dashboard/components/side-bar/index.tsx +++ b/apps/dashboard/components/side-bar/index.tsx @@ -11,7 +11,7 @@ import Logo from "./../logo"; import { SidebarStyles } from "./side-bar-style"; import { SidebarOverlay } from "./side-bar-overlay"; import { NavigationLink } from "./navigation-links"; -import SettingsIcon from "@mui/icons-material/Settings"; +import SecurityIcon from "@mui/icons-material/Security"; const Sidebar: React.FC = () => { const path = usePathname(); @@ -89,9 +89,9 @@ const Sidebar: React.FC = () => { isCurrentPath={isCurrentPath} /> } - label="Profile" + href="/security" + icon={} + label="security" isCurrentPath={isCurrentPath} /> diff --git a/apps/dashboard/services/graphql/mutations/email.ts b/apps/dashboard/services/graphql/mutations/email.ts index dd980ece91..2f9dec303c 100644 --- a/apps/dashboard/services/graphql/mutations/email.ts +++ b/apps/dashboard/services/graphql/mutations/email.ts @@ -51,24 +51,15 @@ gql` export async function emailRegistrationInitiate(email: string, token: string) { const client = apollo(token).getClient(); try { - let errorMessages; const { data } = await client.mutate( { mutation: UserEmailRegistrationInitiateDocument, variables: { input: { email } }, } ); - if (data?.userEmailRegistrationInitiate.errors.length) { - errorMessages = data?.userEmailRegistrationInitiate.errors.map( - (err) => err.message - ); - console.error(errorMessages); - throw new Error("Error Initiating Totp Request"); - } - return data; } catch (error) { - console.error("Error executing mutation:", error); + console.error("Error executing mutation: emailRegistrationInitiate ==> ", error); throw new Error("Error in emailRegistrationInitiate"); } } @@ -80,7 +71,6 @@ export async function emailRegistrationValidate( ) { const client = apollo(token).getClient(); try { - let errorMessages; const { data } = await client.mutate( { mutation: UserEmailRegistrationValidateDocument, @@ -92,39 +82,23 @@ export async function emailRegistrationValidate( }, } ); - if (data?.userEmailRegistrationValidate.errors.length) { - errorMessages = data?.userEmailRegistrationValidate.errors.map( - (err) => err.message - ); - console.error(errorMessages); - throw new Error("Error Validating Totp Request"); - } - return data; } catch (error) { - console.error("Error executing mutation:", error); + console.error( + "Error executing mutation: UserTotpRegistrationValidate ==> ", + error + ); throw new Error("Error in UserTotpRegistrationValidate"); } } - -export async function deleteEmail( - token: string -) { +export async function deleteEmail(token: string) { const client = apollo(token).getClient(); try { let errorMessages; - const { data } = await client.mutate( - { - mutation: UserEmailDeleteDocument, - } - ); - if (data?.userEmailDelete.errors.length) { - errorMessages = data?.userEmailDelete.errors.map((err) => err.message); - console.error(errorMessages); - throw new Error("Error userEmailDelete Request"); - } - + const { data } = await client.mutate({ + mutation: UserEmailDeleteDocument, + }); return data; } catch (error) { console.error("Error executing userEmailDelete mutation:", error); From 0f430e6437803f52b93ae85e5d1706b1cea10aaf Mon Sep 17 00:00:00 2001 From: Siddharth Date: Wed, 25 Oct 2023 21:37:20 +0530 Subject: [PATCH 3/7] feat: UI changes rebase rebase --- apps/dashboard/app/globals.css | 14 ++- .../dashboard/app/security/email/add/page.tsx | 12 +- .../app/security/email/verify/page.tsx | 7 +- .../app/security/email/verify/verify-form.tsx | 15 ++- apps/dashboard/app/url.ts | 6 +- apps/dashboard/components/logo.tsx | 2 +- .../components/security/email/email.tsx | 50 +++++++-- apps/dashboard/package.json | 2 +- apps/dashboard/theme/theme.ts | 2 +- pnpm-lock.yaml | 106 ++---------------- 10 files changed, 87 insertions(+), 129 deletions(-) diff --git a/apps/dashboard/app/globals.css b/apps/dashboard/app/globals.css index e6b2e04c6d..f494cf76ff 100644 --- a/apps/dashboard/app/globals.css +++ b/apps/dashboard/app/globals.css @@ -14,8 +14,10 @@ --orange: #ff7e1c; --sky: #c3ccff; --primary: #fc5805; - --primary3: #fd800b; + --primaryColorDisabled: #c54404; + --primary3: #010101; --primary4: #fe990d; + --primary4Disabled: #b36800; --primary5: #ffad0d; --blue5: #4453e2; --grey0: #3a3c51; @@ -33,11 +35,17 @@ } [data-joy-color-scheme="light"] { - --inputColor: var(--black); + --logoInputColor: var(--black); + --inputColor: var(--white); --primaryColor: var(--primary); + --primaryColorDisabled: var(--primaryColorDisabled); + } [data-joy-color-scheme="dark"] { - --inputColor: var(--white); + --logoInputColor: var(--white); + --inputColor: var(--black); --primaryColor: var(--primary4); + --primaryColorDisabled: var(--primary4Disabled); + } diff --git a/apps/dashboard/app/security/email/add/page.tsx b/apps/dashboard/app/security/email/add/page.tsx index e1401efa11..4152d48f62 100644 --- a/apps/dashboard/app/security/email/add/page.tsx +++ b/apps/dashboard/app/security/email/add/page.tsx @@ -3,6 +3,9 @@ import { getServerSession } from "next-auth"; import { authOptions } from "../../../api/auth/[...nextauth]/route"; import ContentContainer from "@/components/content-container"; import ArrowForwardIcon from "@mui/icons-material/ArrowForward"; + +// @ts-ignore-next-line no-implicit-any error +import { experimental_useFormStatus as useFormStatus } from "react-dom"; // @ts-ignore-next-line no-implicit-any error import { experimental_useFormState as useFormState } from "react-dom"; import { emailRegisterInitiateServerAction } from "../../server-actions"; @@ -27,7 +30,7 @@ export default function AddEmail() { message: null, responsePayload: {}, }); - + const { pending } = useFormStatus(); return (
- Add Email Address + Add Email Address + Cancel + ) : emailData?.address ? ( - + ) : ( - + )} - + ); } diff --git a/apps/dashboard/package.json b/apps/dashboard/package.json index b87743fd1a..9c010aa90e 100644 --- a/apps/dashboard/package.json +++ b/apps/dashboard/package.json @@ -16,7 +16,7 @@ "@emotion/react": "^11.11.1", "@emotion/styled": "^11.11.0", "@mui/icons-material": "^5.14.13", - "@mui/joy": "^5.0.0-beta.10", + "@mui/joy": "5.0.0-beta.12", "@mui/material": "^5.14.15", "@opentelemetry/api": "^1.6.0", "@opentelemetry/core": "^1.17.1", diff --git a/apps/dashboard/theme/theme.ts b/apps/dashboard/theme/theme.ts index 6c53576d9f..0e5462952d 100644 --- a/apps/dashboard/theme/theme.ts +++ b/apps/dashboard/theme/theme.ts @@ -11,6 +11,6 @@ const theme = extendTheme({ display: inter.style.fontFamily, code: inter.style.fontFamily, }, -}) +}); export default theme diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 004b544261..d12c5dd7c7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -167,8 +167,8 @@ importers: specifier: ^5.14.13 version: 5.14.13(@mui/material@5.14.15)(@types/react@18.2.33)(react@18.2.0) '@mui/joy': - specifier: ^5.0.0-beta.10 - version: 5.0.0-beta.10(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0) + specifier: 5.0.0-beta.12 + version: 5.0.0-beta.12(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0) '@mui/material': specifier: ^5.14.15 version: 5.14.15(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0) @@ -4596,29 +4596,6 @@ packages: dependencies: sparse-bitfield: 3.0.3 - /@mui/base@5.0.0-beta.19(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-maNBgAscddyPNzFZQUJDF/puxM27Li+NqSBsr/lAP8TLns2VvWS2SoL3OKFOIoRnAMKGY/Ic6Aot6gCYeQnssA==} - engines: {node: '>=12.0.0'} - peerDependencies: - '@types/react': ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - react-dom: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - '@types/react': - optional: true - dependencies: - '@babel/runtime': 7.23.2 - '@floating-ui/react-dom': 2.0.2(react-dom@18.2.0)(react@18.2.0) - '@mui/types': 7.2.7(@types/react@18.2.33) - '@mui/utils': 5.14.15(@types/react@18.2.33)(react@18.2.0) - '@popperjs/core': 2.11.8 - '@types/react': 18.2.33 - clsx: 2.0.0 - prop-types: 15.8.1 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - dev: false - /@mui/base@5.0.0-beta.21(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0): resolution: {integrity: sha512-eTKWx3WV/nwmRUK4z4K1MzlMyWCsi3WJ3RtV4DiXZeRh4qd4JCyp1Zzzi8Wv9xM4dEBmqQntFoei716PzwmFfA==} engines: {node: '>=12.0.0'} @@ -4642,10 +4619,6 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false - /@mui/core-downloads-tracker@5.14.13: - resolution: {integrity: sha512-3ZUbzcH4yloLKlV6Y+S0Edn2wef9t+EGHSfEkwVCn8E0ULdshifEFgfEroKRegQifDIwcKS/ofccxuZ8njTAYg==} - dev: false - /@mui/core-downloads-tracker@5.14.15: resolution: {integrity: sha512-ZCDzBWtCKjAYAlKKM3PA/jG/3uVIDT9ZitOtVixIVmTCQyc5jSV1qhJX8+qIGz4RQZ9KLzPWO2tXd0O5hvzouQ==} dev: false @@ -4667,8 +4640,8 @@ packages: react: 18.2.0 dev: false - /@mui/joy@5.0.0-beta.10(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-HntqF/z2q8QM8bMwfS19ok9qoarQFaJCvm1AsFYB8ndxODTMj5gpSJ6YzjM0i5MT/vGurIAU96xVx8R7jok8tg==} + /@mui/joy@5.0.0-beta.12(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-e5G9EGkxiCXWNFbSdo4V4TzqjwDqlgMbCHygzFlBwrgY1pn4jBxC5NZe4btq2CREpAi9nZlCeYgHd3ejKYBGBg==} engines: {node: '>=12.0.0'} peerDependencies: '@emotion/react': ^11.5.0 @@ -4684,14 +4657,14 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.23.1 + '@babel/runtime': 7.23.2 '@emotion/react': 11.11.1(@types/react@18.2.33)(react@18.2.0) '@emotion/styled': 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.33)(react@18.2.0) - '@mui/base': 5.0.0-beta.19(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0) - '@mui/core-downloads-tracker': 5.14.13 - '@mui/system': 5.14.13(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.33)(react@18.2.0) - '@mui/types': 7.2.6(@types/react@18.2.33) - '@mui/utils': 5.14.13(@types/react@18.2.33)(react@18.2.0) + '@mui/base': 5.0.0-beta.21(@types/react@18.2.33)(react-dom@18.2.0)(react@18.2.0) + '@mui/core-downloads-tracker': 5.14.15 + '@mui/system': 5.14.15(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.33)(react@18.2.0) + '@mui/types': 7.2.7(@types/react@18.2.33) + '@mui/utils': 5.14.15(@types/react@18.2.33)(react@18.2.0) '@types/react': 18.2.33 clsx: 2.0.0 prop-types: 15.8.1 @@ -4774,36 +4747,6 @@ packages: react: 18.2.0 dev: false - /@mui/system@5.14.13(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.33)(react@18.2.0): - resolution: {integrity: sha512-+5+Dx50lG4csbx2sGjrKLozXQJeCpJ4dIBZolyFLkZ+XphD1keQWouLUvJkPQ3MSglLLKuD37pp52YjMncZMEQ==} - engines: {node: '>=12.0.0'} - peerDependencies: - '@emotion/react': ^11.5.0 - '@emotion/styled': ^11.3.0 - '@types/react': ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - '@emotion/react': - optional: true - '@emotion/styled': - optional: true - '@types/react': - optional: true - dependencies: - '@babel/runtime': 7.23.2 - '@emotion/react': 11.11.1(@types/react@18.2.33)(react@18.2.0) - '@emotion/styled': 11.11.0(@emotion/react@11.11.1)(@types/react@18.2.33)(react@18.2.0) - '@mui/private-theming': 5.14.15(@types/react@18.2.33)(react@18.2.0) - '@mui/styled-engine': 5.14.15(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(react@18.2.0) - '@mui/types': 7.2.7(@types/react@18.2.33) - '@mui/utils': 5.14.15(@types/react@18.2.33)(react@18.2.0) - '@types/react': 18.2.33 - clsx: 2.0.0 - csstype: 3.1.2 - prop-types: 15.8.1 - react: 18.2.0 - dev: false - /@mui/system@5.14.15(@emotion/react@11.11.1)(@emotion/styled@11.11.0)(@types/react@18.2.33)(react@18.2.0): resolution: {integrity: sha512-zr0Gdk1RgKiEk+tCMB900LaOpEC8NaGvxtkmMdL/CXgkqQZSVZOt2PQsxJWaw7kE4YVkIe4VukFVc43qcq9u3w==} engines: {node: '>=12.0.0'} @@ -4834,17 +4777,6 @@ packages: react: 18.2.0 dev: false - /@mui/types@7.2.6(@types/react@18.2.33): - resolution: {integrity: sha512-7sjLQrUmBwufm/M7jw/quNiPK/oor2+pGUQP2CULRcFCArYTq78oJ3D5esTaL0UMkXKJvDqXn6Ike69yAOBQng==} - peerDependencies: - '@types/react': ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - '@types/react': - optional: true - dependencies: - '@types/react': 18.2.33 - dev: false - /@mui/types@7.2.7(@types/react@18.2.33): resolution: {integrity: sha512-sofpWmcBqOlTzRbr1cLQuUDKaUYVZTw8ENQrtL39TECRNENEzwgnNPh6WMfqMZlMvf1Aj9DLg74XPjnLr0izUQ==} peerDependencies: @@ -4856,24 +4788,6 @@ packages: '@types/react': 18.2.33 dev: false - /@mui/utils@5.14.13(@types/react@18.2.33)(react@18.2.0): - resolution: {integrity: sha512-2AFpyXWw7uDCIqRu7eU2i/EplZtks5LAMzQvIhC79sPV9IhOZU2qwOWVnPtdctRXiQJOAaXulg+A37pfhEueQw==} - engines: {node: '>=12.0.0'} - peerDependencies: - '@types/react': ^17.0.0 || ^18.0.0 - react: ^17.0.0 || ^18.0.0 - peerDependenciesMeta: - '@types/react': - optional: true - dependencies: - '@babel/runtime': 7.23.2 - '@types/prop-types': 15.7.8 - '@types/react': 18.2.33 - prop-types: 15.8.1 - react: 18.2.0 - react-is: 18.2.0 - dev: false - /@mui/utils@5.14.15(@types/react@18.2.33)(react@18.2.0): resolution: {integrity: sha512-QBfHovAvTa0J1jXuYDaXGk+Yyp7+Fm8GSqx6nK2JbezGqzCFfirNdop/+bL9Flh/OQ/64PeXcW4HGDdOge+n3A==} engines: {node: '>=12.0.0'} From 2c7e209afea68d9f7af03e51f973af4e560ec4da Mon Sep 17 00:00:00 2001 From: Siddharth Date: Fri, 27 Oct 2023 12:48:40 +0530 Subject: [PATCH 4/7] fix: lint fixes --- .../dashboard/app/security/email/add/page.tsx | 40 ++++----- .../app/security/email/verify/page.tsx | 52 ++++++------ .../app/security/email/verify/verify-form.tsx | 50 ++++++----- apps/dashboard/app/security/page.tsx | 18 ++-- apps/dashboard/app/security/server-actions.ts | 79 +++++++++--------- apps/dashboard/app/url.ts | 3 +- .../components/security/email/email.tsx | 26 +++--- apps/dashboard/components/side-bar/index.tsx | 39 ++++----- .../components/side-bar/navigation-links.tsx | 29 ++++--- .../components/side-bar/side-bar-overlay.tsx | 9 +- .../components/side-bar/side-bar-style.tsx | 6 +- .../services/graphql/mutations/email.ts | 82 ++++++++----------- apps/dashboard/theme/theme.ts | 2 +- 13 files changed, 205 insertions(+), 230 deletions(-) diff --git a/apps/dashboard/app/security/email/add/page.tsx b/apps/dashboard/app/security/email/add/page.tsx index 4152d48f62..d4e4aefb5f 100644 --- a/apps/dashboard/app/security/email/add/page.tsx +++ b/apps/dashboard/app/security/email/add/page.tsx @@ -1,14 +1,15 @@ -"use client"; -import { getServerSession } from "next-auth"; -import { authOptions } from "../../../api/auth/[...nextauth]/route"; -import ContentContainer from "@/components/content-container"; -import ArrowForwardIcon from "@mui/icons-material/ArrowForward"; +"use client" -// @ts-ignore-next-line no-implicit-any error -import { experimental_useFormStatus as useFormStatus } from "react-dom"; -// @ts-ignore-next-line no-implicit-any error -import { experimental_useFormState as useFormState } from "react-dom"; -import { emailRegisterInitiateServerAction } from "../../server-actions"; +import ArrowForwardIcon from "@mui/icons-material/ArrowForward" + +import { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore-next-line no-implicit-any error + experimental_useFormStatus as useFormStatus, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore-next-line no-implicit-any error + experimental_useFormState as useFormState, +} from "react-dom" import { Box, @@ -19,18 +20,19 @@ import { FormHelperText, Card, Typography, - Link as MuiLink, -} from "@mui/joy"; -import InfoOutlined from "@mui/icons-material/InfoOutlined"; -import { CheckBox } from "@mui/icons-material"; -import Link from "next/link"; +} from "@mui/joy" +import InfoOutlined from "@mui/icons-material/InfoOutlined" +import Link from "next/link" + +import { emailRegisterInitiateServerAction } from "../../server-actions" + export default function AddEmail() { const [state, formAction] = useFormState(emailRegisterInitiateServerAction, { error: null, message: null, responsePayload: {}, - }); - const { pending } = useFormStatus(); + }) + const { pending } = useFormStatus() return (
- Opps! something is wrong. + Oops! something is wrong. ) : null} @@ -103,5 +105,5 @@ export default function AddEmail() {
- ); + ) } diff --git a/apps/dashboard/app/security/email/verify/page.tsx b/apps/dashboard/app/security/email/verify/page.tsx index 11d5059ffd..96f6ad60c3 100644 --- a/apps/dashboard/app/security/email/verify/page.tsx +++ b/apps/dashboard/app/security/email/verify/page.tsx @@ -1,57 +1,53 @@ -import { authOptions } from "@/app/api/auth/[...nextauth]/route"; -import VerfiyEmailForm from "./verify-form"; -import { getServerSession } from "next-auth"; -import { redirect } from "next/navigation"; +import { getServerSession } from "next-auth" +import { redirect } from "next/navigation" + +import VerifyEmailForm from "./verify-form" + import { deleteEmail, emailRegistrationInitiate, -} from "@/services/graphql/mutations/email"; -import { useFormStatus } from "react-dom"; +} from "@/services/graphql/mutations/email" +import { authOptions } from "@/app/api/auth/[...nextauth]/route" type VerifyEmailProp = { - emailRegistrationId: string | null | undefined; -}; + emailRegistrationId: string | null | undefined +} export default async function VerifyEmail({ searchParams, }: { - searchParams: VerifyEmailProp; + searchParams: VerifyEmailProp }) { - let { emailRegistrationId } = searchParams; - const session = await getServerSession(authOptions); - const token = session?.accessToken; + let { emailRegistrationId } = searchParams + const session = await getServerSession(authOptions) + const token = session?.accessToken // this is if user has address but not verified if (!emailRegistrationId || typeof emailRegistrationId !== "string") { - const email = session?.userData.data.me?.email?.address; + const email = session?.userData.data.me?.email?.address if (!email || typeof email !== "string" || !token) { - redirect("/security"); + redirect("/security") } - await deleteEmail(token); - let data; + await deleteEmail(token) + let data try { - data = await emailRegistrationInitiate(email, token); + data = await emailRegistrationInitiate(email, token) } catch (err) { - console.log("error in emailRegistrationInitiate ", err); - redirect("/security"); + console.log("error in emailRegistrationInitiate ", err) + redirect("/security") } if (data?.userEmailRegistrationInitiate.errors.length) { - redirect("/security"); + redirect("/security") } - emailRegistrationId = - data?.userEmailRegistrationInitiate.emailRegistrationId; + emailRegistrationId = data?.userEmailRegistrationInitiate.emailRegistrationId } if (!emailRegistrationId && typeof emailRegistrationId !== "string") { - redirect("/security"); + redirect("/security") } - return ( - - ); + return } diff --git a/apps/dashboard/app/security/email/verify/verify-form.tsx b/apps/dashboard/app/security/email/verify/verify-form.tsx index 18421688e6..4e973abfb9 100644 --- a/apps/dashboard/app/security/email/verify/verify-form.tsx +++ b/apps/dashboard/app/security/email/verify/verify-form.tsx @@ -1,13 +1,14 @@ -"use client"; -import { getServerSession } from "next-auth"; -import { authOptions } from "../../../api/auth/[...nextauth]/route"; -import ContentContainer from "@/components/content-container"; -import ArrowForwardIcon from "@mui/icons-material/ArrowForward"; -// @ts-ignore-next-line no-implicit-any error -import { experimental_useFormStatus as useFormStatus } from "react-dom"; -// @ts-ignore-next-line no-implicit-any error -import { experimental_useFormState as useFormState } from "react-dom"; -import { emailRegisterValidateServerAction } from "../../server-actions"; +"use client" + +import ArrowForwardIcon from "@mui/icons-material/ArrowForward" +import { + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore-next-line no-implicit-any error + experimental_useFormStatus as useFormStatus, + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore-next-line no-implicit-any error + experimental_useFormState as useFormState, +} from "react-dom" import { Box, @@ -18,24 +19,23 @@ import { FormHelperText, Card, Typography, -} from "@mui/joy"; -import InfoOutlined from "@mui/icons-material/InfoOutlined"; -import { CheckBox } from "@mui/icons-material"; -import Link from "next/link"; +} from "@mui/joy" +import InfoOutlined from "@mui/icons-material/InfoOutlined" +import Link from "next/link" + +import { emailRegisterValidateServerAction } from "../../server-actions" type VerifyEmailFormProps = { - emailRegistrationId: string; -}; -export default function VerifyEmailForm({ - emailRegistrationId, -}: VerifyEmailFormProps) { - const { pending } = useFormStatus(); + emailRegistrationId: string +} +export default function VerifyEmailForm({ emailRegistrationId }: VerifyEmailFormProps) { + const { pending } = useFormStatus() const [state, formAction] = useFormState(emailRegisterValidateServerAction, { error: null, message: null, responsePayload: {}, - }); + }) return (
Code - +
- ); + ) } diff --git a/apps/dashboard/app/security/page.tsx b/apps/dashboard/app/security/page.tsx index 58cb928270..8b14107473 100644 --- a/apps/dashboard/app/security/page.tsx +++ b/apps/dashboard/app/security/page.tsx @@ -1,13 +1,13 @@ -import { getServerSession } from "next-auth"; -import { authOptions } from "@/app/api/auth/[...nextauth]/route"; -import ContentContainer from "@/components/content-container"; -import EmailSettings from "@/components/security/email/email"; -import { Box } from "@mui/joy"; +import { getServerSession } from "next-auth" +import { Box } from "@mui/joy" + +import { authOptions } from "@/app/api/auth/[...nextauth]/route" +import ContentContainer from "@/components/content-container" +import EmailSettings from "@/components/security/email/email" export default async function Home() { - const session = await getServerSession(authOptions); - const totpEnabled = session?.userData.data.me?.totpEnabled; - const email = session?.userData.data.me?.email; + const session = await getServerSession(authOptions) + const email = session?.userData.data.me?.email return ( : null} - ); + ) } diff --git a/apps/dashboard/app/security/server-actions.ts b/apps/dashboard/app/security/server-actions.ts index 5b1a9ca4a4..77d88c6f11 100644 --- a/apps/dashboard/app/security/server-actions.ts +++ b/apps/dashboard/app/security/server-actions.ts @@ -1,50 +1,47 @@ -"use server"; -import { authOptions } from "@/app/api/auth/[...nextauth]/route"; +"use server" +import { getServerSession } from "next-auth" +import { redirect } from "next/navigation" + import { - deleteEmail, emailRegistrationInitiate, emailRegistrationValidate, -} from "@/services/graphql/mutations/email"; -import { from } from "@apollo/client"; -import { getServerSession } from "next-auth"; -import { revalidatePath } from "next/cache"; -import { redirect } from "next/navigation"; -import { useFormState } from "react-dom"; +} from "@/services/graphql/mutations/email" +import { authOptions } from "@/app/api/auth/[...nextauth]/route" export const emailRegisterInitiateServerAction = async ( _prevState: unknown, - form: FormData + form: FormData, ) => { - const email = form.get("email"); + const email = form.get("email") if (!email || typeof email !== "string") { return { error: true, message: "Invalid Email", data: null, - }; + } } - const session = await getServerSession(authOptions); - const token = session?.accessToken; + const session = await getServerSession(authOptions) + const token = session?.accessToken if (!token && typeof token !== "string") { return { error: true, message: "Invalid Token", data: null, - }; + } } - let data; + let data try { - data = await emailRegistrationInitiate(email, token); + data = await emailRegistrationInitiate(email, token) } catch (err) { - console.log("error in emailRegistrationInitiate ", err); + console.log("error in emailRegistrationInitiate ", err) return { error: true, message: "Something went wrong Please try again and if error persist contact support", data: null, - }; + } } if (data?.userEmailRegistrationInitiate.errors.length) { @@ -52,20 +49,19 @@ export const emailRegisterInitiateServerAction = async ( error: true, message: data?.userEmailRegistrationInitiate.errors[0], data: null, - }; + } } - const emailRegistrationId = - data?.userEmailRegistrationInitiate.emailRegistrationId; - redirect(`/security/email/verify?emailRegistrationId=${emailRegistrationId}`); -}; + const emailRegistrationId = data?.userEmailRegistrationInitiate.emailRegistrationId + redirect(`/security/email/verify?emailRegistrationId=${emailRegistrationId}`) +} export const emailRegisterValidateServerAction = async ( _prevState: unknown, - form: FormData + form: FormData, ) => { - const code = form.get("code"); - const emailRegistrationId = form.get("emailRegistrationId"); + const code = form.get("code") + const emailRegistrationId = form.get("emailRegistrationId") if ( !code || @@ -77,45 +73,44 @@ export const emailRegisterValidateServerAction = async ( error: true, message: "Invalid values", data: null, - }; + } } - const session = await getServerSession(authOptions); - const token = session?.accessToken; + const session = await getServerSession(authOptions) + const token = session?.accessToken if (!token || typeof token !== "string") { return { error: true, message: "Invalid Token", data: null, - }; + } } - let codeVerificationResponse; + let codeVerificationResponse try { codeVerificationResponse = await emailRegistrationValidate( code, emailRegistrationId, - token - ); + token, + ) } catch (err) { - console.log("error in emailRegistrationValidate ", err); + console.log("error in emailRegistrationValidate ", err) return { error: true, message: "Something went wrong Please try again and if error persist contact support", data: null, - }; + } } - + if (codeVerificationResponse?.userEmailRegistrationValidate.errors.length) { return { error: true, - message: - codeVerificationResponse?.userEmailRegistrationValidate.errors[0], + message: codeVerificationResponse?.userEmailRegistrationValidate.errors[0], data: null, - }; + } } - redirect("/security"); -}; + redirect("/security") +} diff --git a/apps/dashboard/app/url.ts b/apps/dashboard/app/url.ts index 70095560e5..bb7e6b725e 100644 --- a/apps/dashboard/app/url.ts +++ b/apps/dashboard/app/url.ts @@ -9,5 +9,4 @@ export const URLS: Record = { "/security": { title: "Security", protected: true }, "/security/email/add": { title: "Add Email", protected: true }, "/security/email/verify": { title: "Verify Email", protected: true }, - -}; +} diff --git a/apps/dashboard/components/security/email/email.tsx b/apps/dashboard/components/security/email/email.tsx index 3eb9593965..2c19bdd28c 100644 --- a/apps/dashboard/components/security/email/email.tsx +++ b/apps/dashboard/components/security/email/email.tsx @@ -1,20 +1,18 @@ - "use client" -import { Button, Typography, Card } from "@mui/joy"; -import { Box } from "@mui/joy"; -import MailOutlineIcon from "@mui/icons-material/MailOutline"; -import DeleteIcon from "@mui/icons-material/Delete"; -import Link from "next/link"; +import { Button, Typography, Box } from "@mui/joy" +import MailOutlineIcon from "@mui/icons-material/MailOutline" +import DeleteIcon from "@mui/icons-material/Delete" +import Link from "next/link" type EmailDataProps = { - readonly __typename: "Email"; - readonly address?: string | null | undefined; - readonly verified?: boolean | null | undefined; -}; + readonly __typename: "Email" + readonly address?: string | null | undefined + readonly verified?: boolean | null | undefined +} type EmailSettingsProps = { - emailData: EmailDataProps; -}; + emailData: EmailDataProps +} function EmailSettings({ emailData }: EmailSettingsProps) { return ( @@ -87,7 +85,7 @@ function EmailSettings({ emailData }: EmailSettingsProps) { )} - ); + ) } -export default EmailSettings; +export default EmailSettings diff --git a/apps/dashboard/components/side-bar/index.tsx b/apps/dashboard/components/side-bar/index.tsx index d763ac6813..40e3b11aaf 100644 --- a/apps/dashboard/components/side-bar/index.tsx +++ b/apps/dashboard/components/side-bar/index.tsx @@ -1,21 +1,22 @@ -"use client"; -import React from "react"; -import Box from "@mui/joy/Box"; -import List from "@mui/joy/List"; -import Sheet from "@mui/joy/Sheet"; -import Divider from "@mui/material/Divider"; -import ReceiptLongIcon from "@mui/icons-material/ReceiptLong"; -import HomeOutlinedIcon from "@mui/icons-material/HomeOutlined"; -import { usePathname } from "next/navigation"; -import Logo from "./../logo"; -import { SidebarStyles } from "./side-bar-style"; -import { SidebarOverlay } from "./side-bar-overlay"; -import { NavigationLink } from "./navigation-links"; -import SecurityIcon from "@mui/icons-material/Security"; +"use client" +import React from "react" +import Box from "@mui/joy/Box" +import List from "@mui/joy/List" +import Sheet from "@mui/joy/Sheet" +import Divider from "@mui/material/Divider" +import ReceiptLongIcon from "@mui/icons-material/ReceiptLong" +import HomeOutlinedIcon from "@mui/icons-material/HomeOutlined" +import { usePathname } from "next/navigation" +import SecurityIcon from "@mui/icons-material/Security" + +import Logo from "./../logo" +import { SidebarStyles } from "./side-bar-style" +import { SidebarOverlay } from "./side-bar-overlay" +import { NavigationLink } from "./navigation-links" const Sidebar: React.FC = () => { - const path = usePathname(); - const isCurrentPath = (href: string): boolean => path === href; + const path = usePathname() + const isCurrentPath = (href: string): boolean => path === href return ( { - ); -}; + ) +} -export default Sidebar; +export default Sidebar diff --git a/apps/dashboard/components/side-bar/navigation-links.tsx b/apps/dashboard/components/side-bar/navigation-links.tsx index 96b3620763..cadfe36b1d 100644 --- a/apps/dashboard/components/side-bar/navigation-links.tsx +++ b/apps/dashboard/components/side-bar/navigation-links.tsx @@ -1,15 +1,16 @@ -import React from "react"; -import Link from "next/link"; -import ListItem from "@mui/joy/ListItem"; -import ListItemButton from "@mui/joy/ListItemButton"; -import { Typography } from "@mui/joy"; -import { closeSidebar } from "./../utils"; +import React from "react" +import Link from "next/link" +import ListItem from "@mui/joy/ListItem" +import ListItemButton from "@mui/joy/ListItemButton" +import { Typography } from "@mui/joy" + +import { closeSidebar } from "./../utils" interface NavigationLinkProps { - href: string; - icon: React.ReactElement; - label: string; - isCurrentPath: (href: string) => boolean; + href: string + icon: React.ReactElement + label: string + isCurrentPath: (href: string) => boolean } export const NavigationLink: React.FC = ({ @@ -22,12 +23,10 @@ export const NavigationLink: React.FC = ({ { - closeSidebar(); + closeSidebar() }} sx={{ - backgroundColor: isCurrentPath(href) - ? "rgba(0, 0, 0, 0.08)" - : "transparent", + "backgroundColor": isCurrentPath(href) ? "rgba(0, 0, 0, 0.08)" : "transparent", "&:hover": { backgroundColor: "rgba(0, 0, 0, 0.08)", }, @@ -47,4 +46,4 @@ export const NavigationLink: React.FC = ({ -); +) diff --git a/apps/dashboard/components/side-bar/side-bar-overlay.tsx b/apps/dashboard/components/side-bar/side-bar-overlay.tsx index e5b3a0253f..318e0f5b26 100644 --- a/apps/dashboard/components/side-bar/side-bar-overlay.tsx +++ b/apps/dashboard/components/side-bar/side-bar-overlay.tsx @@ -1,6 +1,7 @@ -import React from "react"; -import Box from "@mui/joy/Box"; -import { closeSidebar } from "./../utils"; +import React from "react" +import Box from "@mui/joy/Box" + +import { closeSidebar } from "./../utils" export const SidebarOverlay: React.FC = () => ( ( }} onClick={() => closeSidebar()} /> -); +) diff --git a/apps/dashboard/components/side-bar/side-bar-style.tsx b/apps/dashboard/components/side-bar/side-bar-style.tsx index 3026545e72..8e56f523ee 100644 --- a/apps/dashboard/components/side-bar/side-bar-style.tsx +++ b/apps/dashboard/components/side-bar/side-bar-style.tsx @@ -1,5 +1,5 @@ -import React from "react"; -import GlobalStyles from "@mui/joy/GlobalStyles"; +import React from "react" +import GlobalStyles from "@mui/joy/GlobalStyles" export const SidebarStyles: React.FC = () => ( ( }, })} /> -); +) diff --git a/apps/dashboard/services/graphql/mutations/email.ts b/apps/dashboard/services/graphql/mutations/email.ts index 2f9dec303c..985c34d983 100644 --- a/apps/dashboard/services/graphql/mutations/email.ts +++ b/apps/dashboard/services/graphql/mutations/email.ts @@ -1,19 +1,17 @@ -import { gql } from "@apollo/client"; -import { apollo } from ".."; +import { gql } from "@apollo/client" + +import { apollo } from ".." import { UserEmailDeleteDocument, UserEmailDeleteMutation, UserEmailRegistrationInitiateDocument, UserEmailRegistrationInitiateMutation, UserEmailRegistrationValidateDocument, - UserEmailRegistrationValidateInput, UserEmailRegistrationValidateMutation, -} from "../generated"; +} from "../generated" gql` - mutation UserEmailRegistrationInitiate( - $input: UserEmailRegistrationInitiateInput! - ) { + mutation UserEmailRegistrationInitiate($input: UserEmailRegistrationInitiateInput!) { userEmailRegistrationInitiate(input: $input) { emailRegistrationId errors { @@ -22,12 +20,10 @@ gql` } } } -`; +` gql` - mutation UserEmailRegistrationValidate( - $input: UserEmailRegistrationValidateInput! - ) { + mutation UserEmailRegistrationValidate($input: UserEmailRegistrationValidateInput!) { userEmailRegistrationValidate(input: $input) { errors { message @@ -35,7 +31,7 @@ gql` } } } -`; +` gql` mutation UserEmailDelete { @@ -46,62 +42,54 @@ gql` } } } -`; +` export async function emailRegistrationInitiate(email: string, token: string) { - const client = apollo(token).getClient(); + const client = apollo(token).getClient() try { - const { data } = await client.mutate( - { - mutation: UserEmailRegistrationInitiateDocument, - variables: { input: { email } }, - } - ); - return data; + const { data } = await client.mutate({ + mutation: UserEmailRegistrationInitiateDocument, + variables: { input: { email } }, + }) + return data } catch (error) { - console.error("Error executing mutation: emailRegistrationInitiate ==> ", error); - throw new Error("Error in emailRegistrationInitiate"); + console.error("Error executing mutation: emailRegistrationInitiate ==> ", error) + throw new Error("Error in emailRegistrationInitiate") } } export async function emailRegistrationValidate( code: string, emailRegistrationId: string, - token: string + token: string, ) { - const client = apollo(token).getClient(); + const client = apollo(token).getClient() try { - const { data } = await client.mutate( - { - mutation: UserEmailRegistrationValidateDocument, - variables: { - input: { - code, - emailRegistrationId, - }, + const { data } = await client.mutate({ + mutation: UserEmailRegistrationValidateDocument, + variables: { + input: { + code, + emailRegistrationId, }, - } - ); - return data; + }, + }) + return data } catch (error) { - console.error( - "Error executing mutation: UserTotpRegistrationValidate ==> ", - error - ); - throw new Error("Error in UserTotpRegistrationValidate"); + console.error("Error executing mutation: UserTotpRegistrationValidate ==> ", error) + throw new Error("Error in UserTotpRegistrationValidate") } } export async function deleteEmail(token: string) { - const client = apollo(token).getClient(); + const client = apollo(token).getClient() try { - let errorMessages; const { data } = await client.mutate({ mutation: UserEmailDeleteDocument, - }); - return data; + }) + return data } catch (error) { - console.error("Error executing userEmailDelete mutation:", error); - throw new Error("Error in userEmailDelete"); + console.error("Error executing userEmailDelete mutation:", error) + throw new Error("Error in userEmailDelete") } } diff --git a/apps/dashboard/theme/theme.ts b/apps/dashboard/theme/theme.ts index 0e5462952d..6c53576d9f 100644 --- a/apps/dashboard/theme/theme.ts +++ b/apps/dashboard/theme/theme.ts @@ -11,6 +11,6 @@ const theme = extendTheme({ display: inter.style.fontFamily, code: inter.style.fontFamily, }, -}); +}) export default theme From 4b581d19c941517d9064926933055503ed11b629 Mon Sep 17 00:00:00 2001 From: Siddharth Date: Fri, 27 Oct 2023 12:50:58 +0530 Subject: [PATCH 5/7] chore: removed comment file --- .../services/graphql/mutations/totp.ts | 87 ------------------- 1 file changed, 87 deletions(-) delete mode 100644 apps/dashboard/services/graphql/mutations/totp.ts diff --git a/apps/dashboard/services/graphql/mutations/totp.ts b/apps/dashboard/services/graphql/mutations/totp.ts deleted file mode 100644 index 35d569d46a..0000000000 --- a/apps/dashboard/services/graphql/mutations/totp.ts +++ /dev/null @@ -1,87 +0,0 @@ -// import { gql } from "@apollo/client"; -// import { -// UserTotpRegistrationInitiateDocument, -// UserTotpRegistrationInitiateInput, -// UserTotpRegistrationInitiateMutation, -// UserTotpRegistrationValidateDocument, -// UserTotpRegistrationValidateInput, -// UserTotpRegistrationValidateMutation, -// } from "../generated"; -// import { apollo } from ".."; - -// gql` -// mutation UserTotpRegistrationInitiate( -// $input: UserTotpRegistrationInitiateInput! -// ) { -// userTotpRegistrationInitiate(input: $input) { -// totpRegistrationId -// totpSecret -// errors { -// code -// message -// } -// } -// } -// `; - -// gql` -// mutation UserTotpRegistrationValidate( -// $input: UserTotpRegistrationValidateInput! -// ) { -// userTotpRegistrationValidate(input: $input) { -// errors { -// message -// code -// } -// } -// } -// `; - -// export async function totpRegistrationInitiate(token: string) { -// const client = apollo(token).getClient(); -// try { -// let errorMessages; -// const { data } = await client.mutate({ -// mutation: UserTotpRegistrationInitiateDocument, -// variables: { input: { authToken: token } }, -// }); -// if (data?.userTotpRegistrationInitiate.errors.length) { -// errorMessages = data?.userTotpRegistrationInitiate.errors.map( -// (err) => err.message -// ); -// console.error(errorMessages); -// throw new Error("Error Initiating Totp Request"); -// } - -// return data; -// } catch (error) { -// console.error("Error executing mutation:", error); -// throw new Error("Error in UserTotpRegistrationInitiate"); -// } -// } - -// export async function totpRegistrationValidate( -// input: UserTotpRegistrationValidateInput, -// token: string -// ) { -// const client = apollo(token).getClient(); -// try { -// let errorMessages; -// const { data } = await client.mutate({ -// mutation: UserTotpRegistrationValidateDocument, -// variables: { input }, -// }); -// if (data?.userTotpRegistrationValidate.errors.length) { -// errorMessages = data?.userTotpRegistrationValidate.errors.map( -// (err) => err.message -// ); -// console.error(errorMessages); -// throw new Error("Error Validating Totp Request"); -// } - -// return data; -// } catch (error) { -// console.error("Error executing mutation:", error); -// throw new Error("Error in UserTotpRegistrationValidate"); -// } -// } From 2a9860d76dfb7b75fd48eb42c7dd84452398719c Mon Sep 17 00:00:00 2001 From: Siddharth Date: Mon, 30 Oct 2023 02:45:51 +0530 Subject: [PATCH 6/7] feat: Ui changes, refactoring --- .../dashboard/app/security/email/add/page.tsx | 59 ++++-- .../app/security/email/verify/page.tsx | 24 ++- .../app/security/email/verify/verify-form.tsx | 69 +++++-- apps/dashboard/app/security/server-actions.ts | 27 ++- .../components/form-submit-button.tsx | 20 ++ .../components/security/email/email.tsx | 183 +++++++++++++----- .../services/graphql/mutations/email.ts | 4 - 7 files changed, 284 insertions(+), 102 deletions(-) create mode 100644 apps/dashboard/components/form-submit-button.tsx diff --git a/apps/dashboard/app/security/email/add/page.tsx b/apps/dashboard/app/security/email/add/page.tsx index d4e4aefb5f..d71556eb7f 100644 --- a/apps/dashboard/app/security/email/add/page.tsx +++ b/apps/dashboard/app/security/email/add/page.tsx @@ -1,11 +1,7 @@ "use client" - import ArrowForwardIcon from "@mui/icons-material/ArrowForward" import { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore-next-line no-implicit-any error - experimental_useFormStatus as useFormStatus, // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore-next-line no-implicit-any error experimental_useFormState as useFormState, @@ -16,23 +12,24 @@ import { Button, Input, FormControl, - FormLabel, FormHelperText, - Card, Typography, + Card, } from "@mui/joy" import InfoOutlined from "@mui/icons-material/InfoOutlined" import Link from "next/link" import { emailRegisterInitiateServerAction } from "../../server-actions" +import FormSubmitButton from "@/components/form-submit-button" + export default function AddEmail() { const [state, formAction] = useFormState(emailRegisterInitiateServerAction, { error: null, message: null, responsePayload: {}, }) - const { pending } = useFormStatus() + return (
- - Add Email Address - + Add Your Email Address + + A Verification Code sent to this Email + - Email - Oops! something is wrong. + {state.message} ) : null} @@ -87,23 +85,46 @@ export default function AddEmail() { alignItems: "center", }} > - Cancel - + + Send Code - + - + + This Email can be used to login to your Account. + +
) } diff --git a/apps/dashboard/app/security/email/verify/page.tsx b/apps/dashboard/app/security/email/verify/page.tsx index 96f6ad60c3..68b6a9017d 100644 --- a/apps/dashboard/app/security/email/verify/page.tsx +++ b/apps/dashboard/app/security/email/verify/page.tsx @@ -8,6 +8,7 @@ import { emailRegistrationInitiate, } from "@/services/graphql/mutations/email" import { authOptions } from "@/app/api/auth/[...nextauth]/route" +import { UserEmailRegistrationInitiateMutation } from "@/services/graphql/generated" type VerifyEmailProp = { emailRegistrationId: string | null | undefined @@ -23,14 +24,18 @@ export default async function VerifyEmail({ const token = session?.accessToken // this is if user has address but not verified - if (!emailRegistrationId || typeof emailRegistrationId !== "string") { - const email = session?.userData.data.me?.email?.address - if (!email || typeof email !== "string" || !token) { - redirect("/security") - } + const email = session?.userData.data.me?.email?.address + if (!email || typeof email !== "string") { + redirect("/security") + } + if (!token || typeof token !== "string") { + redirect("/security") + } + + if (!emailRegistrationId || typeof emailRegistrationId !== "string") { await deleteEmail(token) - let data + let data: UserEmailRegistrationInitiateMutation | null | undefined try { data = await emailRegistrationInitiate(email, token) } catch (err) { @@ -49,5 +54,10 @@ export default async function VerifyEmail({ redirect("/security") } - return + return ( + + ) } diff --git a/apps/dashboard/app/security/email/verify/verify-form.tsx b/apps/dashboard/app/security/email/verify/verify-form.tsx index 4e973abfb9..a88e267812 100644 --- a/apps/dashboard/app/security/email/verify/verify-form.tsx +++ b/apps/dashboard/app/security/email/verify/verify-form.tsx @@ -2,9 +2,6 @@ import ArrowForwardIcon from "@mui/icons-material/ArrowForward" import { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment - // @ts-ignore-next-line no-implicit-any error - experimental_useFormStatus as useFormStatus, // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore-next-line no-implicit-any error experimental_useFormState as useFormState, @@ -15,7 +12,6 @@ import { Button, Input, FormControl, - FormLabel, FormHelperText, Card, Typography, @@ -25,12 +21,16 @@ import Link from "next/link" import { emailRegisterValidateServerAction } from "../../server-actions" +import FormSubmitButton from "@/components/form-submit-button" + type VerifyEmailFormProps = { emailRegistrationId: string + email: string } -export default function VerifyEmailForm({ emailRegistrationId }: VerifyEmailFormProps) { - const { pending } = useFormStatus() - +export default function VerifyEmailForm({ + emailRegistrationId, + email, +}: VerifyEmailFormProps) { const [state, formAction] = useFormState(emailRegisterValidateServerAction, { error: null, message: null, @@ -46,16 +46,28 @@ export default function VerifyEmailForm({ emailRegistrationId }: VerifyEmailForm marginTop: "4em", }} > - - Verification Code + Email Verification Code + + Enter The verfication Code sent to your Email + + {email}{" "} + +
- Code - {state.message.message} + {state.message} ) : null} - Cancel - + + Confirm - +
-
+ + This Email can be used to login to your Account. + +
) } diff --git a/apps/dashboard/app/security/server-actions.ts b/apps/dashboard/app/security/server-actions.ts index 77d88c6f11..95d7417167 100644 --- a/apps/dashboard/app/security/server-actions.ts +++ b/apps/dashboard/app/security/server-actions.ts @@ -2,12 +2,20 @@ import { getServerSession } from "next-auth" import { redirect } from "next/navigation" +import { revalidatePath } from "next/cache" + import { + deleteEmail, emailRegistrationInitiate, emailRegistrationValidate, } from "@/services/graphql/mutations/email" import { authOptions } from "@/app/api/auth/[...nextauth]/route" +import { + UserEmailRegistrationInitiateMutation, + UserEmailRegistrationValidateMutation, +} from "@/services/graphql/generated" + export const emailRegisterInitiateServerAction = async ( _prevState: unknown, form: FormData, @@ -31,7 +39,7 @@ export const emailRegisterInitiateServerAction = async ( } } - let data + let data: UserEmailRegistrationInitiateMutation | null | undefined try { data = await emailRegistrationInitiate(email, token) } catch (err) { @@ -45,9 +53,10 @@ export const emailRegisterInitiateServerAction = async ( } if (data?.userEmailRegistrationInitiate.errors.length) { + console.log() return { error: true, - message: data?.userEmailRegistrationInitiate.errors[0], + message: data?.userEmailRegistrationInitiate.errors[0].message, data: null, } } @@ -87,7 +96,7 @@ export const emailRegisterValidateServerAction = async ( } } - let codeVerificationResponse + let codeVerificationResponse: UserEmailRegistrationValidateMutation | null | undefined try { codeVerificationResponse = await emailRegistrationValidate( code, @@ -107,10 +116,20 @@ export const emailRegisterValidateServerAction = async ( if (codeVerificationResponse?.userEmailRegistrationValidate.errors.length) { return { error: true, - message: codeVerificationResponse?.userEmailRegistrationValidate.errors[0], + message: codeVerificationResponse?.userEmailRegistrationValidate.errors[0].message, data: null, } } redirect("/security") } + +export const deleteEmailServerAction = async () => { + const session = await getServerSession(authOptions) + const token = session?.accessToken + if (!token && typeof token !== "string") { + return + } + await deleteEmail(token) + revalidatePath("/security") +} diff --git a/apps/dashboard/components/form-submit-button.tsx b/apps/dashboard/components/form-submit-button.tsx new file mode 100644 index 0000000000..ef7072fcc7 --- /dev/null +++ b/apps/dashboard/components/form-submit-button.tsx @@ -0,0 +1,20 @@ +import React from "react" +import { Button } from "@mui/joy" + +// Using ts-ignore to bypass the experimental function's type checking +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore +import { experimental_useFormStatus as useFormStatus } from "react-dom" + +type FormButtonProps = Omit, "loading"> + +const FormSubmitButton: React.FC = ({ children, ...props }) => { + const { pending } = useFormStatus() + return ( + + ) +} + +export default FormSubmitButton diff --git a/apps/dashboard/components/security/email/email.tsx b/apps/dashboard/components/security/email/email.tsx index 2c19bdd28c..7c16bc4f37 100644 --- a/apps/dashboard/components/security/email/email.tsx +++ b/apps/dashboard/components/security/email/email.tsx @@ -1,8 +1,13 @@ "use client" -import { Button, Typography, Box } from "@mui/joy" -import MailOutlineIcon from "@mui/icons-material/MailOutline" +import { Button, Typography, Box, Modal, Sheet, ModalClose } from "@mui/joy" import DeleteIcon from "@mui/icons-material/Delete" import Link from "next/link" +import { useState } from "react" +import ReportProblemRoundedIcon from "@mui/icons-material/ReportProblemRounded" + +import MailRoundedIcon from "@mui/icons-material/MailRounded" + +import { deleteEmailServerAction } from "@/app/security/server-actions" type EmailDataProps = { readonly __typename: "Email" @@ -15,76 +20,154 @@ type EmailSettingsProps = { } function EmailSettings({ emailData }: EmailSettingsProps) { + const [open, setOpen] = useState(false) + const [loading, setLoading] = useState(false) return ( - + <> + setOpen(false)} + sx={{ display: "flex", justifyContent: "center", alignItems: "center" }} + > + + + + + + Remove Email Address + + + + Are You sure you want to remove this Email from your Account? You will not be + able to Login via this email again. + + + + + - + + Email + + Use email to login in your Account + - Email + > + {emailData?.address} + - Use email to login in your Account + {emailData?.address} - - - - {emailData?.address} - - - {emailData?.verified ? ( - - - - ) : emailData?.address ? ( - - - - ) : ( - - - - )} + + {emailData?.verified ? ( + + + + ) : emailData?.address ? ( + + + + + + + ) : ( + + + + )} + -
+ ) } diff --git a/apps/dashboard/services/graphql/mutations/email.ts b/apps/dashboard/services/graphql/mutations/email.ts index 985c34d983..e5825cdc69 100644 --- a/apps/dashboard/services/graphql/mutations/email.ts +++ b/apps/dashboard/services/graphql/mutations/email.ts @@ -20,9 +20,7 @@ gql` } } } -` -gql` mutation UserEmailRegistrationValidate($input: UserEmailRegistrationValidateInput!) { userEmailRegistrationValidate(input: $input) { errors { @@ -31,9 +29,7 @@ gql` } } } -` -gql` mutation UserEmailDelete { userEmailDelete { errors { From f0d6a9b61d40c8b8a4d4540e5cee4c9cb0d82cab Mon Sep 17 00:00:00 2001 From: Siddharth Date: Mon, 30 Oct 2023 02:57:45 +0530 Subject: [PATCH 7/7] feat: changes in messages. --- apps/dashboard/app/security/email/add/page.tsx | 4 ++-- apps/dashboard/app/security/email/verify/verify-form.tsx | 4 ++-- apps/dashboard/components/security/email/email.tsx | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/dashboard/app/security/email/add/page.tsx b/apps/dashboard/app/security/email/add/page.tsx index d71556eb7f..a742f4ec8c 100644 --- a/apps/dashboard/app/security/email/add/page.tsx +++ b/apps/dashboard/app/security/email/add/page.tsx @@ -51,7 +51,7 @@ export default function AddEmail() { > Add Your Email Address - A Verification Code sent to this Email + A verification code was sent to this email. - This Email can be used to login to your Account. + This email can be used to log in to your account. diff --git a/apps/dashboard/app/security/email/verify/verify-form.tsx b/apps/dashboard/app/security/email/verify/verify-form.tsx index a88e267812..5927f5ea94 100644 --- a/apps/dashboard/app/security/email/verify/verify-form.tsx +++ b/apps/dashboard/app/security/email/verify/verify-form.tsx @@ -58,7 +58,7 @@ export default function VerifyEmailForm({ > Email Verification Code - Enter The verfication Code sent to your Email + Enter the verification code sent to your email. - This Email can be used to login to your Account. + This email can be used to log in to your account. diff --git a/apps/dashboard/components/security/email/email.tsx b/apps/dashboard/components/security/email/email.tsx index 7c16bc4f37..ee49c832aa 100644 --- a/apps/dashboard/components/security/email/email.tsx +++ b/apps/dashboard/components/security/email/email.tsx @@ -66,8 +66,8 @@ function EmailSettings({ emailData }: EmailSettingsProps) { - Are You sure you want to remove this Email from your Account? You will not be - able to Login via this email again. + Are you sure you want to remove this email from your account? You will not be + able to log in via this email again.