diff --git a/frontend/codegen.ts b/frontend/codegen.ts index 84fb23fda..eb3be6a72 100644 --- a/frontend/codegen.ts +++ b/frontend/codegen.ts @@ -6,13 +6,6 @@ import type { CodegenConfig } from "@graphql-codegen/cli"; -// Adds a comment to the top of generated files to ignore linting and formatting -const lintIgnore = { - add: { - content: "/* prettier-ignore */\n/* eslint-disable */", - }, -} as const; - const config: CodegenConfig = { schema: "./schema.graphql", documents: ["src/**/*.{tsx,ts}", "!src/gql/**/*"], @@ -21,6 +14,7 @@ const config: CodegenConfig = { "./src/gql/": { preset: "client", config: { + useTypeImports: true, // By default, unknown scalars are generated as `any`. This is not ideal for catching potential bugs. defaultScalarType: "unknown", scalars: { @@ -28,10 +22,6 @@ const config: CodegenConfig = { Url: "string", }, }, - plugins: [lintIgnore], - }, - "./src/gql/schema.ts": { - plugins: ["urql-introspection", lintIgnore], }, }, }; diff --git a/frontend/package-lock.json b/frontend/package-lock.json index ed1dd49bb..ef9fe6c52 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -16,7 +16,6 @@ "@tanstack/router-zod-adapter": "^1.70.0", "@urql/core": "^5.0.6", "@urql/devtools": "^2.0.3", - "@urql/exchange-graphcache": "^7.2.0", "@urql/exchange-refocus": "^1.1.0", "@urql/exchange-request-policy": "^1.2.0", "@vector-im/compound-design-tokens": "1.8.0", @@ -43,7 +42,7 @@ "@codecov/vite-plugin": "^1.2.0", "@graphql-codegen/add": "^5.0.3", "@graphql-codegen/cli": "^5.0.3", - "@graphql-codegen/client-preset": "4.3.3", + "@graphql-codegen/client-preset": "^4.4.0", "@graphql-codegen/urql-introspection": "^3.0.0", "@storybook/addon-essentials": "^8.3.5", "@storybook/react": "^8.3.5", @@ -2181,54 +2180,6 @@ } } }, - "node_modules/@graphql-codegen/cli/node_modules/@graphql-codegen/client-preset": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@graphql-codegen/client-preset/-/client-preset-4.4.0.tgz", - "integrity": "sha512-Q0NHFK7KXLhEaRC/k82ge0dHDfeHJEvvDeV0vV3+oSurHNa/lpxQtbK2BqknZe+JDfZ1YOOvYT93XsAkYD+SQg==", - "dev": true, - "license": "MIT", - "dependencies": { - "@babel/helper-plugin-utils": "^7.20.2", - "@babel/template": "^7.20.7", - "@graphql-codegen/add": "^5.0.3", - "@graphql-codegen/gql-tag-operations": "4.0.10", - "@graphql-codegen/plugin-helpers": "^5.0.4", - "@graphql-codegen/typed-document-node": "^5.0.10", - "@graphql-codegen/typescript": "^4.1.0", - "@graphql-codegen/typescript-operations": "^4.3.0", - "@graphql-codegen/visitor-plugin-common": "^5.4.0", - "@graphql-tools/documents": "^1.0.0", - "@graphql-tools/utils": "^10.0.0", - "@graphql-typed-document-node/core": "3.2.0", - "tslib": "~2.6.0" - }, - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" - } - }, - "node_modules/@graphql-codegen/cli/node_modules/@graphql-codegen/gql-tag-operations": { - "version": "4.0.10", - "resolved": "https://registry.npmjs.org/@graphql-codegen/gql-tag-operations/-/gql-tag-operations-4.0.10.tgz", - "integrity": "sha512-WsBEVL3XQdBboFJJL5WxrUjkuo3B7Sa51R9NbT7PKBe0HCNstoouGZIvQJRUubttFCqTTyoFtNsoRSKB+rsRug==", - "dev": true, - "license": "MIT", - "dependencies": { - "@graphql-codegen/plugin-helpers": "^5.0.4", - "@graphql-codegen/visitor-plugin-common": "5.4.0", - "@graphql-tools/utils": "^10.0.0", - "auto-bind": "~4.0.0", - "tslib": "~2.6.0" - }, - "engines": { - "node": ">=16" - }, - "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" - } - }, "node_modules/@graphql-codegen/cli/node_modules/ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", @@ -2286,26 +2237,29 @@ } }, "node_modules/@graphql-codegen/client-preset": { - "version": "4.3.3", - "resolved": "https://registry.npmjs.org/@graphql-codegen/client-preset/-/client-preset-4.3.3.tgz", - "integrity": "sha512-IrDsSVe8bkKtxgVfKPHzjL9tYlv7KEpA59R4gZLqx/t2WIJncW1i0OMvoz9tgoZsFEs8OKKgXZbnwPZ/Qf1kEw==", + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@graphql-codegen/client-preset/-/client-preset-4.4.0.tgz", + "integrity": "sha512-Q0NHFK7KXLhEaRC/k82ge0dHDfeHJEvvDeV0vV3+oSurHNa/lpxQtbK2BqknZe+JDfZ1YOOvYT93XsAkYD+SQg==", "dev": true, "license": "MIT", "dependencies": { "@babel/helper-plugin-utils": "^7.20.2", "@babel/template": "^7.20.7", "@graphql-codegen/add": "^5.0.3", - "@graphql-codegen/gql-tag-operations": "4.0.9", + "@graphql-codegen/gql-tag-operations": "4.0.10", "@graphql-codegen/plugin-helpers": "^5.0.4", - "@graphql-codegen/typed-document-node": "^5.0.9", - "@graphql-codegen/typescript": "^4.0.9", - "@graphql-codegen/typescript-operations": "^4.2.3", - "@graphql-codegen/visitor-plugin-common": "^5.3.1", + "@graphql-codegen/typed-document-node": "^5.0.10", + "@graphql-codegen/typescript": "^4.1.0", + "@graphql-codegen/typescript-operations": "^4.3.0", + "@graphql-codegen/visitor-plugin-common": "^5.4.0", "@graphql-tools/documents": "^1.0.0", "@graphql-tools/utils": "^10.0.0", "@graphql-typed-document-node/core": "3.2.0", "tslib": "~2.6.0" }, + "engines": { + "node": ">=16" + }, "peerDependencies": { "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" } @@ -2327,39 +2281,20 @@ } }, "node_modules/@graphql-codegen/gql-tag-operations": { - "version": "4.0.9", - "resolved": "https://registry.npmjs.org/@graphql-codegen/gql-tag-operations/-/gql-tag-operations-4.0.9.tgz", - "integrity": "sha512-lVgu1HClel896HqZAEjynatlU6eJrYOw+rh05DPgM150xvmb7Gz5TnRHA2vfwlDNIXDaToAIpz5RFfkjjnYM1Q==", + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/@graphql-codegen/gql-tag-operations/-/gql-tag-operations-4.0.10.tgz", + "integrity": "sha512-WsBEVL3XQdBboFJJL5WxrUjkuo3B7Sa51R9NbT7PKBe0HCNstoouGZIvQJRUubttFCqTTyoFtNsoRSKB+rsRug==", "dev": true, "license": "MIT", "dependencies": { "@graphql-codegen/plugin-helpers": "^5.0.4", - "@graphql-codegen/visitor-plugin-common": "5.3.1", + "@graphql-codegen/visitor-plugin-common": "5.4.0", "@graphql-tools/utils": "^10.0.0", "auto-bind": "~4.0.0", "tslib": "~2.6.0" }, - "peerDependencies": { - "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" - } - }, - "node_modules/@graphql-codegen/gql-tag-operations/node_modules/@graphql-codegen/visitor-plugin-common": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@graphql-codegen/visitor-plugin-common/-/visitor-plugin-common-5.3.1.tgz", - "integrity": "sha512-MktoBdNZhSmugiDjmFl1z6rEUUaqyxtFJYWnDilE7onkPgyw//O0M+TuPBJPBWdyV6J2ond0Hdqtq+rkghgSIQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@graphql-codegen/plugin-helpers": "^5.0.4", - "@graphql-tools/optimize": "^2.0.0", - "@graphql-tools/relay-operation-optimizer": "^7.0.0", - "@graphql-tools/utils": "^10.0.0", - "auto-bind": "~4.0.0", - "change-case-all": "1.0.15", - "dependency-graph": "^0.11.0", - "graphql-tag": "^2.11.0", - "parse-filepath": "^1.0.2", - "tslib": "~2.6.0" + "engines": { + "node": ">=16" }, "peerDependencies": { "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" @@ -6332,20 +6267,6 @@ "graphql": ">= 0.11.0" } }, - "node_modules/@urql/exchange-graphcache": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@urql/exchange-graphcache/-/exchange-graphcache-7.2.0.tgz", - "integrity": "sha512-NPSfcHyhZnqTuu2OtBTS0b80YMQe1fOEpECZWyRd1A4WSfU/BJjsNSI/AXnG7ABGGCMtLvfTWRSlzsoLwPjwlQ==", - "license": "MIT", - "dependencies": { - "@0no-co/graphql.web": "^1.0.5", - "@urql/core": "^5.0.0", - "wonka": "^6.3.2" - }, - "peerDependencies": { - "@urql/core": "^5.0.0" - } - }, "node_modules/@urql/exchange-refocus": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@urql/exchange-refocus/-/exchange-refocus-1.1.0.tgz", diff --git a/frontend/package.json b/frontend/package.json index 38fd54947..86cf5c346 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -25,7 +25,6 @@ "@tanstack/router-zod-adapter": "^1.70.0", "@urql/core": "^5.0.6", "@urql/devtools": "^2.0.3", - "@urql/exchange-graphcache": "^7.2.0", "@urql/exchange-refocus": "^1.1.0", "@urql/exchange-request-policy": "^1.2.0", "@vector-im/compound-design-tokens": "1.8.0", @@ -52,7 +51,7 @@ "@codecov/vite-plugin": "^1.2.0", "@graphql-codegen/add": "^5.0.3", "@graphql-codegen/cli": "^5.0.3", - "@graphql-codegen/client-preset": "4.3.3", + "@graphql-codegen/client-preset": "^4.4.0", "@graphql-codegen/urql-introspection": "^3.0.0", "@storybook/addon-essentials": "^8.3.5", "@storybook/react": "^8.3.5", diff --git a/frontend/src/gql/fragment-masking.ts b/frontend/src/gql/fragment-masking.ts index aca71b135..743a364fe 100644 --- a/frontend/src/gql/fragment-masking.ts +++ b/frontend/src/gql/fragment-masking.ts @@ -1,7 +1,7 @@ /* eslint-disable */ -import { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core'; -import { FragmentDefinitionNode } from 'graphql'; -import { Incremental } from './graphql'; +import type { ResultOf, DocumentTypeDecoration, TypedDocumentNode } from '@graphql-typed-document-node/core'; +import type { FragmentDefinitionNode } from 'graphql'; +import type { Incremental } from './graphql'; export type FragmentType> = TDocumentType extends DocumentTypeDecoration< diff --git a/frontend/src/gql/gql.ts b/frontend/src/gql/gql.ts index 2d605bfca..1782c82af 100644 --- a/frontend/src/gql/gql.ts +++ b/frontend/src/gql/gql.ts @@ -1,6 +1,6 @@ /* eslint-disable */ import * as types from './graphql'; -import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; +import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; /** * Map of all GraphQL operations in the project. @@ -11,6 +11,7 @@ import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/ * 3. It does not support dead code elimination, so it will add unused operations. * * Therefore it is highly recommended to use the babel or swc plugin for production. + * Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size */ const documents = { "\n fragment PasswordChange_siteConfig on SiteConfig {\n id\n passwordChangeAllowed\n }\n": types.PasswordChange_SiteConfigFragmentDoc, diff --git a/frontend/src/gql/graphql.ts b/frontend/src/gql/graphql.ts index 44fa3332d..e953da68a 100644 --- a/frontend/src/gql/graphql.ts +++ b/frontend/src/gql/graphql.ts @@ -1,7 +1,5 @@ /* eslint-disable */ -/* prettier-ignore */ -/* eslint-disable */ -import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; +import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; @@ -38,19 +36,6 @@ export type AddEmailInput = { userId: Scalars['ID']['input']; }; -/** The payload of the `addEmail` mutation */ -export type AddEmailPayload = { - __typename?: 'AddEmailPayload'; - /** The email address that was added */ - email?: Maybe; - /** Status of the operation */ - status: AddEmailStatus; - /** The user to whom the email address was added */ - user?: Maybe; - /** The list of policy violations if the email address was denied */ - violations?: Maybe>; -}; - /** The status of the `addEmail` mutation */ export enum AddEmailStatus { /** The email address was added */ @@ -77,15 +62,6 @@ export type AddUserInput = { username: Scalars['String']['input']; }; -/** The payload for the `addUser` mutation. */ -export type AddUserPayload = { - __typename?: 'AddUserPayload'; - /** Status of the operation */ - status: AddUserStatus; - /** The user that was added. */ - user?: Maybe; -}; - /** The status of the `addUser` mutation. */ export enum AddUserStatus { /** The user was added. */ @@ -104,123 +80,6 @@ export type AllowUserCrossSigningResetInput = { userId: Scalars['ID']['input']; }; -/** The payload for the `allowUserCrossSigningReset` mutation. */ -export type AllowUserCrossSigningResetPayload = { - __typename?: 'AllowUserCrossSigningResetPayload'; - /** The user that was updated. */ - user?: Maybe; -}; - -export type Anonymous = Node & { - __typename?: 'Anonymous'; - id: Scalars['ID']['output']; -}; - -/** A session in an application, either a compatibility or an OAuth 2.0 one */ -export type AppSession = CompatSession | Oauth2Session; - -export type AppSessionConnection = { - __typename?: 'AppSessionConnection'; - /** A list of edges. */ - edges: Array; - /** A list of nodes. */ - nodes: Array; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** Identifies the total count of items in the connection. */ - totalCount: Scalars['Int']['output']; -}; - -/** An edge in a connection. */ -export type AppSessionEdge = { - __typename?: 'AppSessionEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node: AppSession; -}; - -/** - * An authentication records when a user enter their credential in a browser - * session. - */ -export type Authentication = CreationEvent & Node & { - __typename?: 'Authentication'; - /** When the object was created. */ - createdAt: Scalars['DateTime']['output']; - /** ID of the object. */ - id: Scalars['ID']['output']; -}; - -/** A browser session represents a logged in user in a browser. */ -export type BrowserSession = CreationEvent & Node & { - __typename?: 'BrowserSession'; - /** - * Get the list of both compat and OAuth 2.0 sessions started by this - * browser session, chronologically sorted - */ - appSessions: AppSessionConnection; - /** When the object was created. */ - createdAt: Scalars['DateTime']['output']; - /** When the session was finished. */ - finishedAt?: Maybe; - /** ID of the object. */ - id: Scalars['ID']['output']; - /** The last time the session was active. */ - lastActiveAt?: Maybe; - /** The last IP address used by the session. */ - lastActiveIp?: Maybe; - /** The most recent authentication of this session. */ - lastAuthentication?: Maybe; - /** The state of the session. */ - state: SessionState; - /** The user logged in this session. */ - user: User; - /** The user-agent with which the session was created. */ - userAgent?: Maybe; -}; - - -/** A browser session represents a logged in user in a browser. */ -export type BrowserSessionAppSessionsArgs = { - after?: InputMaybe; - before?: InputMaybe; - device?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; - state?: InputMaybe; -}; - -export type BrowserSessionConnection = { - __typename?: 'BrowserSessionConnection'; - /** A list of edges. */ - edges: Array; - /** A list of nodes. */ - nodes: Array; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** Identifies the total count of items in the connection. */ - totalCount: Scalars['Int']['output']; -}; - -/** An edge in a connection. */ -export type BrowserSessionEdge = { - __typename?: 'BrowserSessionEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node: BrowserSession; -}; - -export type CaptchaConfig = { - __typename?: 'CaptchaConfig'; - id: Scalars['ID']['output']; - /** Which Captcha service is being used */ - service: CaptchaService; - /** The site key used by the instance */ - siteKey: Scalars['String']['output']; -}; - /** Which Captcha service is being used */ export enum CaptchaService { CloudflareTurnstile = 'CLOUDFLARE_TURNSTILE', @@ -228,57 +87,6 @@ export enum CaptchaService { RecaptchaV2 = 'RECAPTCHA_V2' } -/** - * A compat session represents a client session which used the legacy Matrix - * login API. - */ -export type CompatSession = CreationEvent & Node & { - __typename?: 'CompatSession'; - /** The browser session which started this session, if any. */ - browserSession?: Maybe; - /** When the object was created. */ - createdAt: Scalars['DateTime']['output']; - /** The Matrix Device ID of this session. */ - deviceId: Scalars['String']['output']; - /** When the session ended. */ - finishedAt?: Maybe; - /** ID of the object. */ - id: Scalars['ID']['output']; - /** The last time the session was active. */ - lastActiveAt?: Maybe; - /** The last IP address used by the session. */ - lastActiveIp?: Maybe; - /** The associated SSO login, if any. */ - ssoLogin?: Maybe; - /** The state of the session. */ - state: SessionState; - /** The user authorized for this session. */ - user: User; - /** The user-agent with which the session was created. */ - userAgent?: Maybe; -}; - -export type CompatSessionConnection = { - __typename?: 'CompatSessionConnection'; - /** A list of edges. */ - edges: Array; - /** A list of nodes. */ - nodes: Array; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** Identifies the total count of items in the connection. */ - totalCount: Scalars['Int']['output']; -}; - -/** An edge in a connection. */ -export type CompatSessionEdge = { - __typename?: 'CompatSessionEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node: CompatSession; -}; - /** The type of a compatibility session. */ export enum CompatSessionType { /** The session was created by a SSO login. */ @@ -287,50 +95,6 @@ export enum CompatSessionType { Unknown = 'UNKNOWN' } -/** - * A compat SSO login represents a login done through the legacy Matrix login - * API, via the `m.login.sso` login method. - */ -export type CompatSsoLogin = Node & { - __typename?: 'CompatSsoLogin'; - /** When the object was created. */ - createdAt: Scalars['DateTime']['output']; - /** When the client exchanged the login token sent during the redirection. */ - exchangedAt?: Maybe; - /** - * When the login was fulfilled, and the user was redirected back to the - * client. - */ - fulfilledAt?: Maybe; - /** ID of the object. */ - id: Scalars['ID']['output']; - /** The redirect URI used during the login. */ - redirectUri: Scalars['Url']['output']; - /** The compat session which was started by this login. */ - session?: Maybe; -}; - -export type CompatSsoLoginConnection = { - __typename?: 'CompatSsoLoginConnection'; - /** A list of edges. */ - edges: Array; - /** A list of nodes. */ - nodes: Array; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** Identifies the total count of items in the connection. */ - totalCount: Scalars['Int']['output']; -}; - -/** An edge in a connection. */ -export type CompatSsoLoginEdge = { - __typename?: 'CompatSsoLoginEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node: CompatSsoLogin; -}; - /** The input of the `createOauth2Session` mutation. */ export type CreateOAuth2SessionInput = { /** Whether the session should issue a never-expiring access token */ @@ -341,23 +105,6 @@ export type CreateOAuth2SessionInput = { userId: Scalars['ID']['input']; }; -/** The payload of the `createOauth2Session` mutation. */ -export type CreateOAuth2SessionPayload = { - __typename?: 'CreateOAuth2SessionPayload'; - /** Access token for this session */ - accessToken: Scalars['String']['output']; - /** The OAuth 2.0 session which was just created */ - oauth2Session: Oauth2Session; - /** Refresh token for this session, if it is not a permanent session */ - refreshToken?: Maybe; -}; - -/** An object with a creation date. */ -export type CreationEvent = { - /** When the object was created. */ - createdAt: Scalars['DateTime']['output']; -}; - /** A filter for dates, with a lower bound and an upper bound */ export type DateFilter = { /** The lower bound of the date range */ @@ -384,14 +131,6 @@ export type EndBrowserSessionInput = { browserSessionId: Scalars['ID']['input']; }; -export type EndBrowserSessionPayload = { - __typename?: 'EndBrowserSessionPayload'; - /** Returns the ended session. */ - browserSession?: Maybe; - /** The status of the mutation. */ - status: EndBrowserSessionStatus; -}; - /** The status of the `endBrowserSession` mutation. */ export enum EndBrowserSessionStatus { /** The session was ended. */ @@ -406,14 +145,6 @@ export type EndCompatSessionInput = { compatSessionId: Scalars['ID']['input']; }; -export type EndCompatSessionPayload = { - __typename?: 'EndCompatSessionPayload'; - /** Returns the ended session. */ - compatSession?: Maybe; - /** The status of the mutation. */ - status: EndCompatSessionStatus; -}; - /** The status of the `endCompatSession` mutation. */ export enum EndCompatSessionStatus { /** The session was ended. */ @@ -428,14 +159,6 @@ export type EndOAuth2SessionInput = { oauth2SessionId: Scalars['ID']['input']; }; -export type EndOAuth2SessionPayload = { - __typename?: 'EndOAuth2SessionPayload'; - /** Returns the ended session. */ - oauth2Session?: Maybe; - /** The status of the mutation. */ - status: EndOAuth2SessionStatus; -}; - /** The status of the `endOauth2Session` mutation. */ export enum EndOAuth2SessionStatus { /** The session was ended. */ @@ -452,15 +175,6 @@ export type LockUserInput = { userId: Scalars['ID']['input']; }; -/** The payload for the `lockUser` mutation. */ -export type LockUserPayload = { - __typename?: 'LockUserPayload'; - /** Status of the operation */ - status: LockUserStatus; - /** The user that was locked. */ - user?: Maybe; -}; - /** The status of the `lockUser` mutation. */ export enum LockUserStatus { /** The user was locked. */ @@ -469,176 +183,6 @@ export enum LockUserStatus { NotFound = 'NOT_FOUND' } -export type MatrixUser = { - __typename?: 'MatrixUser'; - /** The avatar URL of the user, if any. */ - avatarUrl?: Maybe; - /** Whether the user is deactivated on the homeserver. */ - deactivated: Scalars['Boolean']['output']; - /** The display name of the user, if any. */ - displayName?: Maybe; - /** The Matrix ID of the user. */ - mxid: Scalars['String']['output']; -}; - -/** The mutations root of the GraphQL interface. */ -export type Mutation = { - __typename?: 'Mutation'; - /** Add an email address to the specified user */ - addEmail: AddEmailPayload; - /** Add a user. This is only available to administrators. */ - addUser: AddUserPayload; - /** Temporarily allow user to reset their cross-signing keys. */ - allowUserCrossSigningReset: AllowUserCrossSigningResetPayload; - /** - * Create a new arbitrary OAuth 2.0 Session. - * - * Only available for administrators. - */ - createOauth2Session: CreateOAuth2SessionPayload; - endBrowserSession: EndBrowserSessionPayload; - endCompatSession: EndCompatSessionPayload; - endOauth2Session: EndOAuth2SessionPayload; - /** Lock a user. This is only available to administrators. */ - lockUser: LockUserPayload; - /** Remove an email address */ - removeEmail: RemoveEmailPayload; - /** Send a verification code for an email address */ - sendVerificationEmail: SendVerificationEmailPayload; - /** - * Set whether a user can request admin. This is only available to - * administrators. - */ - setCanRequestAdmin: SetCanRequestAdminPayload; - /** Set the display name of a user */ - setDisplayName: SetDisplayNamePayload; - /** - * Set the password for a user. - * - * This can be used by server administrators to set any user's password, - * or, provided the capability hasn't been disabled on this server, - * by a user to change their own password as long as they know their - * current password. - */ - setPassword: SetPasswordPayload; - /** Set the password for yourself, using a recovery ticket sent by e-mail. */ - setPasswordByRecovery: SetPasswordPayload; - /** Set an email address as primary */ - setPrimaryEmail: SetPrimaryEmailPayload; - /** Unlock a user. This is only available to administrators. */ - unlockUser: UnlockUserPayload; - /** Submit a verification code for an email address */ - verifyEmail: VerifyEmailPayload; -}; - - -/** The mutations root of the GraphQL interface. */ -export type MutationAddEmailArgs = { - input: AddEmailInput; -}; - - -/** The mutations root of the GraphQL interface. */ -export type MutationAddUserArgs = { - input: AddUserInput; -}; - - -/** The mutations root of the GraphQL interface. */ -export type MutationAllowUserCrossSigningResetArgs = { - input: AllowUserCrossSigningResetInput; -}; - - -/** The mutations root of the GraphQL interface. */ -export type MutationCreateOauth2SessionArgs = { - input: CreateOAuth2SessionInput; -}; - - -/** The mutations root of the GraphQL interface. */ -export type MutationEndBrowserSessionArgs = { - input: EndBrowserSessionInput; -}; - - -/** The mutations root of the GraphQL interface. */ -export type MutationEndCompatSessionArgs = { - input: EndCompatSessionInput; -}; - - -/** The mutations root of the GraphQL interface. */ -export type MutationEndOauth2SessionArgs = { - input: EndOAuth2SessionInput; -}; - - -/** The mutations root of the GraphQL interface. */ -export type MutationLockUserArgs = { - input: LockUserInput; -}; - - -/** The mutations root of the GraphQL interface. */ -export type MutationRemoveEmailArgs = { - input: RemoveEmailInput; -}; - - -/** The mutations root of the GraphQL interface. */ -export type MutationSendVerificationEmailArgs = { - input: SendVerificationEmailInput; -}; - - -/** The mutations root of the GraphQL interface. */ -export type MutationSetCanRequestAdminArgs = { - input: SetCanRequestAdminInput; -}; - - -/** The mutations root of the GraphQL interface. */ -export type MutationSetDisplayNameArgs = { - input: SetDisplayNameInput; -}; - - -/** The mutations root of the GraphQL interface. */ -export type MutationSetPasswordArgs = { - input: SetPasswordInput; -}; - - -/** The mutations root of the GraphQL interface. */ -export type MutationSetPasswordByRecoveryArgs = { - input: SetPasswordByRecoveryInput; -}; - - -/** The mutations root of the GraphQL interface. */ -export type MutationSetPrimaryEmailArgs = { - input: SetPrimaryEmailInput; -}; - - -/** The mutations root of the GraphQL interface. */ -export type MutationUnlockUserArgs = { - input: UnlockUserInput; -}; - - -/** The mutations root of the GraphQL interface. */ -export type MutationVerifyEmailArgs = { - input: VerifyEmailInput; -}; - -/** An object with an ID. */ -export type Node = { - /** ID of the object. */ - id: Scalars['ID']['output']; -}; - /** The application type advertised by the client. */ export enum Oauth2ApplicationType { /** Client is a native application. */ @@ -647,248 +191,12 @@ export enum Oauth2ApplicationType { Web = 'WEB' } -/** An OAuth 2.0 client */ -export type Oauth2Client = Node & { - __typename?: 'Oauth2Client'; - /** The application type advertised by the client. */ - applicationType?: Maybe; - /** OAuth 2.0 client ID */ - clientId: Scalars['String']['output']; - /** Client name advertised by the client. */ - clientName?: Maybe; - /** Client URI advertised by the client. */ - clientUri?: Maybe; - /** ID of the object. */ - id: Scalars['ID']['output']; - /** Logo URI advertised by the client. */ - logoUri?: Maybe; - /** Privacy policy URI advertised by the client. */ - policyUri?: Maybe; - /** List of redirect URIs used for authorization grants by the client. */ - redirectUris: Array; - /** Terms of services URI advertised by the client. */ - tosUri?: Maybe; -}; - -/** - * An OAuth 2.0 session represents a client session which used the OAuth APIs - * to login. - */ -export type Oauth2Session = CreationEvent & Node & { - __typename?: 'Oauth2Session'; - /** The browser session which started this OAuth 2.0 session. */ - browserSession?: Maybe; - /** OAuth 2.0 client used by this session. */ - client: Oauth2Client; - /** When the object was created. */ - createdAt: Scalars['DateTime']['output']; - /** When the session ended. */ - finishedAt?: Maybe; - /** ID of the object. */ - id: Scalars['ID']['output']; - /** The last time the session was active. */ - lastActiveAt?: Maybe; - /** The last IP address used by the session. */ - lastActiveIp?: Maybe; - /** Scope granted for this session. */ - scope: Scalars['String']['output']; - /** The state of the session. */ - state: SessionState; - /** User authorized for this session. */ - user?: Maybe; - /** The user-agent with which the session was created. */ - userAgent?: Maybe; -}; - -export type Oauth2SessionConnection = { - __typename?: 'Oauth2SessionConnection'; - /** A list of edges. */ - edges: Array; - /** A list of nodes. */ - nodes: Array; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** Identifies the total count of items in the connection. */ - totalCount: Scalars['Int']['output']; -}; - -/** An edge in a connection. */ -export type Oauth2SessionEdge = { - __typename?: 'Oauth2SessionEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node: Oauth2Session; -}; - -/** Information about pagination in a connection */ -export type PageInfo = { - __typename?: 'PageInfo'; - /** When paginating forwards, the cursor to continue. */ - endCursor?: Maybe; - /** When paginating forwards, are there more items? */ - hasNextPage: Scalars['Boolean']['output']; - /** When paginating backwards, are there more items? */ - hasPreviousPage: Scalars['Boolean']['output']; - /** When paginating backwards, the cursor to continue. */ - startCursor?: Maybe; -}; - -/** The query root of the GraphQL interface. */ -export type Query = { - __typename?: 'Query'; - /** Fetch a browser session by its ID. */ - browserSession?: Maybe; - /** Fetch a compatible session by its ID. */ - compatSession?: Maybe; - /** - * Get the current logged in browser session - * @deprecated Use `viewerSession` instead. - */ - currentBrowserSession?: Maybe; - /** - * Get the current logged in user - * @deprecated Use `viewer` instead. - */ - currentUser?: Maybe; - /** Fetches an object given its ID. */ - node?: Maybe; - /** Fetch an OAuth 2.0 client by its ID. */ - oauth2Client?: Maybe; - /** Fetch an OAuth 2.0 session by its ID. */ - oauth2Session?: Maybe; - /** Lookup a compat or OAuth 2.0 session */ - session?: Maybe; - /** Get the current site configuration */ - siteConfig: SiteConfig; - /** Fetch an upstream OAuth 2.0 link by its ID. */ - upstreamOauth2Link?: Maybe; - /** Fetch an upstream OAuth 2.0 provider by its ID. */ - upstreamOauth2Provider?: Maybe; - /** Get a list of upstream OAuth 2.0 providers. */ - upstreamOauth2Providers: UpstreamOAuth2ProviderConnection; - /** Fetch a user by its ID. */ - user?: Maybe; - /** Fetch a user by its username. */ - userByUsername?: Maybe; - /** Fetch a user email by its ID. */ - userEmail?: Maybe; - /** - * Get a list of users. - * - * This is only available to administrators. - */ - users: UserConnection; - /** Get the viewer */ - viewer: Viewer; - /** Get the viewer's session */ - viewerSession: ViewerSession; -}; - - -/** The query root of the GraphQL interface. */ -export type QueryBrowserSessionArgs = { - id: Scalars['ID']['input']; -}; - - -/** The query root of the GraphQL interface. */ -export type QueryCompatSessionArgs = { - id: Scalars['ID']['input']; -}; - - -/** The query root of the GraphQL interface. */ -export type QueryNodeArgs = { - id: Scalars['ID']['input']; -}; - - -/** The query root of the GraphQL interface. */ -export type QueryOauth2ClientArgs = { - id: Scalars['ID']['input']; -}; - - -/** The query root of the GraphQL interface. */ -export type QueryOauth2SessionArgs = { - id: Scalars['ID']['input']; -}; - - -/** The query root of the GraphQL interface. */ -export type QuerySessionArgs = { - deviceId: Scalars['String']['input']; - userId: Scalars['ID']['input']; -}; - - -/** The query root of the GraphQL interface. */ -export type QueryUpstreamOauth2LinkArgs = { - id: Scalars['ID']['input']; -}; - - -/** The query root of the GraphQL interface. */ -export type QueryUpstreamOauth2ProviderArgs = { - id: Scalars['ID']['input']; -}; - - -/** The query root of the GraphQL interface. */ -export type QueryUpstreamOauth2ProvidersArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - - -/** The query root of the GraphQL interface. */ -export type QueryUserArgs = { - id: Scalars['ID']['input']; -}; - - -/** The query root of the GraphQL interface. */ -export type QueryUserByUsernameArgs = { - username: Scalars['String']['input']; -}; - - -/** The query root of the GraphQL interface. */ -export type QueryUserEmailArgs = { - id: Scalars['ID']['input']; -}; - - -/** The query root of the GraphQL interface. */ -export type QueryUsersArgs = { - after?: InputMaybe; - before?: InputMaybe; - canRequestAdmin?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; - state?: InputMaybe; -}; - /** The input for the `removeEmail` mutation */ export type RemoveEmailInput = { /** The ID of the email address to remove */ userEmailId: Scalars['ID']['input']; }; -/** The payload of the `removeEmail` mutation */ -export type RemoveEmailPayload = { - __typename?: 'RemoveEmailPayload'; - /** The email address that was removed */ - email?: Maybe; - /** Status of the operation */ - status: RemoveEmailStatus; - /** The user to whom the email address belonged */ - user?: Maybe; -}; - /** The status of the `removeEmail` mutation */ export enum RemoveEmailStatus { /** The email address was not found */ @@ -905,17 +213,6 @@ export type SendVerificationEmailInput = { userEmailId: Scalars['ID']['input']; }; -/** The payload of the `sendVerificationEmail` mutation */ -export type SendVerificationEmailPayload = { - __typename?: 'SendVerificationEmailPayload'; - /** The email address to which the verification email was sent */ - email: UserEmail; - /** Status of the operation */ - status: SendVerificationEmailStatus; - /** The user to whom the email address belongs */ - user: User; -}; - /** The status of the `sendVerificationEmail` mutation */ export enum SendVerificationEmailStatus { /** The email address is already verified */ @@ -924,9 +221,6 @@ export enum SendVerificationEmailStatus { Sent = 'SENT' } -/** A client session, either compat or OAuth 2.0 */ -export type Session = CompatSession | Oauth2Session; - /** The state of a session */ export enum SessionState { /** The session is active. */ @@ -943,13 +237,6 @@ export type SetCanRequestAdminInput = { userId: Scalars['ID']['input']; }; -/** The payload for the `setCanRequestAdmin` mutation. */ -export type SetCanRequestAdminPayload = { - __typename?: 'SetCanRequestAdminPayload'; - /** The user that was updated. */ - user?: Maybe; -}; - /** The input for the `addEmail` mutation */ export type SetDisplayNameInput = { /** The display name to set. If `None`, the display name will be removed. */ @@ -958,15 +245,6 @@ export type SetDisplayNameInput = { userId: Scalars['ID']['input']; }; -/** The payload of the `setDisplayName` mutation */ -export type SetDisplayNamePayload = { - __typename?: 'SetDisplayNamePayload'; - /** Status of the operation */ - status: SetDisplayNameStatus; - /** The user that was updated */ - user?: Maybe; -}; - /** The status of the `setDisplayName` mutation */ export enum SetDisplayNameStatus { /** The display name is invalid */ @@ -1004,13 +282,6 @@ export type SetPasswordInput = { userId: Scalars['ID']['input']; }; -/** The return type for the `setPassword` mutation. */ -export type SetPasswordPayload = { - __typename?: 'SetPasswordPayload'; - /** Status of the operation */ - status: SetPasswordStatus; -}; - /** The status of the `setPassword` mutation. */ export enum SetPasswordStatus { /** Your account is locked and you can't change its password. */ @@ -1057,14 +328,6 @@ export type SetPrimaryEmailInput = { userEmailId: Scalars['ID']['input']; }; -/** The payload of the `setPrimaryEmail` mutation */ -export type SetPrimaryEmailPayload = { - __typename?: 'SetPrimaryEmailPayload'; - status: SetPrimaryEmailStatus; - /** The user to whom the email address belongs */ - user?: Maybe; -}; - /** The status of the `setPrimaryEmail` mutation */ export enum SetPrimaryEmailStatus { /** The email address was not found */ @@ -1075,53 +338,12 @@ export enum SetPrimaryEmailStatus { Unverified = 'UNVERIFIED' } -export type SiteConfig = Node & { - __typename?: 'SiteConfig'; - /** The configuration of CAPTCHA provider. */ - captchaConfig?: Maybe; - /** Whether users can change their display name. */ - displayNameChangeAllowed: Scalars['Boolean']['output']; - /** Whether users can change their email. */ - emailChangeAllowed: Scalars['Boolean']['output']; - /** The ID of the site configuration. */ - id: Scalars['ID']['output']; - /** Imprint to show in the footer. */ - imprint?: Maybe; - /** - * Minimum password complexity, from 0 to 4, in terms of a zxcvbn score. - * The exact scorer (including dictionaries and other data tables) - * in use is . - */ - minimumPasswordComplexity: Scalars['Int']['output']; - /** Whether passwords are enabled and users can change their own passwords. */ - passwordChangeAllowed: Scalars['Boolean']['output']; - /** Whether passwords are enabled for login. */ - passwordLoginEnabled: Scalars['Boolean']['output']; - /** Whether passwords are enabled and users can register using a password. */ - passwordRegistrationEnabled: Scalars['Boolean']['output']; - /** The URL to the privacy policy. */ - policyUri?: Maybe; - /** The server name of the homeserver. */ - serverName: Scalars['String']['output']; - /** The URL to the terms of service. */ - tosUri?: Maybe; -}; - /** The input for the `unlockUser` mutation. */ export type UnlockUserInput = { /** The ID of the user to unlock */ userId: Scalars['ID']['input']; }; -/** The payload for the `unlockUser` mutation. */ -export type UnlockUserPayload = { - __typename?: 'UnlockUserPayload'; - /** Status of the operation */ - status: UnlockUserStatus; - /** The user that was unlocked. */ - user?: Maybe; -}; - /** The status of the `unlockUser` mutation. */ export enum UnlockUserStatus { /** The user was not found. */ @@ -1130,263 +352,6 @@ export enum UnlockUserStatus { Unlocked = 'UNLOCKED' } -export type UpstreamOAuth2Link = CreationEvent & Node & { - __typename?: 'UpstreamOAuth2Link'; - /** When the object was created. */ - createdAt: Scalars['DateTime']['output']; - /** ID of the object. */ - id: Scalars['ID']['output']; - /** The provider for which this link is. */ - provider: UpstreamOAuth2Provider; - /** Subject used for linking */ - subject: Scalars['String']['output']; - /** The user to which this link is associated. */ - user?: Maybe; -}; - -export type UpstreamOAuth2LinkConnection = { - __typename?: 'UpstreamOAuth2LinkConnection'; - /** A list of edges. */ - edges: Array; - /** A list of nodes. */ - nodes: Array; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** Identifies the total count of items in the connection. */ - totalCount: Scalars['Int']['output']; -}; - -/** An edge in a connection. */ -export type UpstreamOAuth2LinkEdge = { - __typename?: 'UpstreamOAuth2LinkEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node: UpstreamOAuth2Link; -}; - -export type UpstreamOAuth2Provider = CreationEvent & Node & { - __typename?: 'UpstreamOAuth2Provider'; - /** Client ID used for this provider. */ - clientId: Scalars['String']['output']; - /** When the object was created. */ - createdAt: Scalars['DateTime']['output']; - /** ID of the object. */ - id: Scalars['ID']['output']; - /** OpenID Connect issuer URL. */ - issuer: Scalars['String']['output']; -}; - -export type UpstreamOAuth2ProviderConnection = { - __typename?: 'UpstreamOAuth2ProviderConnection'; - /** A list of edges. */ - edges: Array; - /** A list of nodes. */ - nodes: Array; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** Identifies the total count of items in the connection. */ - totalCount: Scalars['Int']['output']; -}; - -/** An edge in a connection. */ -export type UpstreamOAuth2ProviderEdge = { - __typename?: 'UpstreamOAuth2ProviderEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node: UpstreamOAuth2Provider; -}; - -/** A user is an individual's account. */ -export type User = Node & { - __typename?: 'User'; - /** - * Get the list of both compat and OAuth 2.0 sessions, chronologically - * sorted - */ - appSessions: AppSessionConnection; - /** Get the list of active browser sessions, chronologically sorted */ - browserSessions: BrowserSessionConnection; - /** Whether the user can request admin privileges. */ - canRequestAdmin: Scalars['Boolean']['output']; - /** Get the list of compatibility sessions, chronologically sorted */ - compatSessions: CompatSessionConnection; - /** Get the list of compatibility SSO logins, chronologically sorted */ - compatSsoLogins: CompatSsoLoginConnection; - /** When the object was created. */ - createdAt: Scalars['DateTime']['output']; - /** Get the list of emails, chronologically sorted */ - emails: UserEmailConnection; - /** ID of the object. */ - id: Scalars['ID']['output']; - /** When the user was locked out. */ - lockedAt?: Maybe; - /** Access to the user's Matrix account information. */ - matrix: MatrixUser; - /** Get the list of OAuth 2.0 sessions, chronologically sorted */ - oauth2Sessions: Oauth2SessionConnection; - /** Primary email address of the user. */ - primaryEmail?: Maybe; - /** Get the list of upstream OAuth 2.0 links */ - upstreamOauth2Links: UpstreamOAuth2LinkConnection; - /** Username chosen by the user. */ - username: Scalars['String']['output']; -}; - - -/** A user is an individual's account. */ -export type UserAppSessionsArgs = { - after?: InputMaybe; - before?: InputMaybe; - browserSession?: InputMaybe; - device?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; - lastActive?: InputMaybe; - state?: InputMaybe; -}; - - -/** A user is an individual's account. */ -export type UserBrowserSessionsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; - lastActive?: InputMaybe; - state?: InputMaybe; -}; - - -/** A user is an individual's account. */ -export type UserCompatSessionsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; - lastActive?: InputMaybe; - state?: InputMaybe; - type?: InputMaybe; -}; - - -/** A user is an individual's account. */ -export type UserCompatSsoLoginsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - - -/** A user is an individual's account. */ -export type UserEmailsArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; - state?: InputMaybe; -}; - - -/** A user is an individual's account. */ -export type UserOauth2SessionsArgs = { - after?: InputMaybe; - before?: InputMaybe; - client?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; - lastActive?: InputMaybe; - state?: InputMaybe; -}; - - -/** A user is an individual's account. */ -export type UserUpstreamOauth2LinksArgs = { - after?: InputMaybe; - before?: InputMaybe; - first?: InputMaybe; - last?: InputMaybe; -}; - -/** A parsed user agent string */ -export type UserAgent = { - __typename?: 'UserAgent'; - /** The device type */ - deviceType: DeviceType; - /** The device model */ - model?: Maybe; - /** The name of the browser */ - name?: Maybe; - /** The operating system name */ - os?: Maybe; - /** The operating system version */ - osVersion?: Maybe; - /** The user agent string */ - raw: Scalars['String']['output']; - /** The version of the browser */ - version?: Maybe; -}; - -export type UserConnection = { - __typename?: 'UserConnection'; - /** A list of edges. */ - edges: Array; - /** A list of nodes. */ - nodes: Array; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** Identifies the total count of items in the connection. */ - totalCount: Scalars['Int']['output']; -}; - -/** An edge in a connection. */ -export type UserEdge = { - __typename?: 'UserEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node: User; -}; - -/** A user email address */ -export type UserEmail = CreationEvent & Node & { - __typename?: 'UserEmail'; - /** - * When the email address was confirmed. Is `null` if the email was never - * verified by the user. - */ - confirmedAt?: Maybe; - /** When the object was created. */ - createdAt: Scalars['DateTime']['output']; - /** Email address */ - email: Scalars['String']['output']; - /** ID of the object. */ - id: Scalars['ID']['output']; -}; - -export type UserEmailConnection = { - __typename?: 'UserEmailConnection'; - /** A list of edges. */ - edges: Array; - /** A list of nodes. */ - nodes: Array; - /** Information to aid in pagination. */ - pageInfo: PageInfo; - /** Identifies the total count of items in the connection. */ - totalCount: Scalars['Int']['output']; -}; - -/** An edge in a connection. */ -export type UserEmailEdge = { - __typename?: 'UserEmailEdge'; - /** A cursor for use in pagination */ - cursor: Scalars['String']['output']; - /** The item at the end of the edge */ - node: UserEmail; -}; - /** The state of a compatibility session. */ export enum UserEmailState { /** The email address has been confirmed. */ @@ -1411,17 +376,6 @@ export type VerifyEmailInput = { userEmailId: Scalars['ID']['input']; }; -/** The payload of the `verifyEmail` mutation */ -export type VerifyEmailPayload = { - __typename?: 'VerifyEmailPayload'; - /** The email address that was verified */ - email?: Maybe; - /** Status of the operation */ - status: VerifyEmailStatus; - /** The user to whom the email address belongs */ - user?: Maybe; -}; - /** The status of the `verifyEmail` mutation */ export enum VerifyEmailStatus { /** The email address was already verified before */ @@ -1432,12 +386,6 @@ export enum VerifyEmailStatus { Verified = 'VERIFIED' } -/** Represents the current viewer */ -export type Viewer = Anonymous | User; - -/** Represents the current viewer's session */ -export type ViewerSession = Anonymous | BrowserSession | Oauth2Session; - export type PasswordChange_SiteConfigFragment = { __typename?: 'SiteConfig', id: string, passwordChangeAllowed: boolean } & { ' $fragmentName'?: 'PasswordChange_SiteConfigFragment' }; export type BrowserSession_SessionFragment = { __typename?: 'BrowserSession', id: string, createdAt: string, finishedAt?: string | null, lastActiveIp?: string | null, lastActiveAt?: string | null, userAgent?: { __typename?: 'UserAgent', raw: string, name?: string | null, os?: string | null, model?: string | null, deviceType: DeviceType } | null, lastAuthentication?: { __typename?: 'Authentication', id: string, createdAt: string } | null } & { ' $fragmentName'?: 'BrowserSession_SessionFragment' }; diff --git a/frontend/src/gql/schema.ts b/frontend/src/gql/schema.ts deleted file mode 100644 index 7b4163030..000000000 --- a/frontend/src/gql/schema.ts +++ /dev/null @@ -1,3930 +0,0 @@ -/* prettier-ignore */ -/* eslint-disable */ -import { IntrospectionQuery } from 'graphql'; -export default { - "__schema": { - "queryType": { - "name": "Query" - }, - "mutationType": { - "name": "Mutation" - }, - "subscriptionType": null, - "types": [ - { - "kind": "OBJECT", - "name": "AddEmailPayload", - "fields": [ - { - "name": "email", - "type": { - "kind": "OBJECT", - "name": "UserEmail", - "ofType": null - }, - "args": [] - }, - { - "name": "status", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "user", - "type": { - "kind": "OBJECT", - "name": "User", - "ofType": null - }, - "args": [] - }, - { - "name": "violations", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "AddUserPayload", - "fields": [ - { - "name": "status", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "user", - "type": { - "kind": "OBJECT", - "name": "User", - "ofType": null - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "AllowUserCrossSigningResetPayload", - "fields": [ - { - "name": "user", - "type": { - "kind": "OBJECT", - "name": "User", - "ofType": null - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "Anonymous", - "fields": [ - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [ - { - "kind": "INTERFACE", - "name": "Node" - } - ] - }, - { - "kind": "UNION", - "name": "AppSession", - "possibleTypes": [ - { - "kind": "OBJECT", - "name": "CompatSession" - }, - { - "kind": "OBJECT", - "name": "Oauth2Session" - } - ] - }, - { - "kind": "OBJECT", - "name": "AppSessionConnection", - "fields": [ - { - "name": "edges", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "AppSessionEdge", - "ofType": null - } - } - } - }, - "args": [] - }, - { - "name": "nodes", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "UNION", - "name": "AppSession", - "ofType": null - } - } - } - }, - "args": [] - }, - { - "name": "pageInfo", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "PageInfo", - "ofType": null - } - }, - "args": [] - }, - { - "name": "totalCount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "AppSessionEdge", - "fields": [ - { - "name": "cursor", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "node", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "UNION", - "name": "AppSession", - "ofType": null - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "Authentication", - "fields": [ - { - "name": "createdAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [ - { - "kind": "INTERFACE", - "name": "CreationEvent" - }, - { - "kind": "INTERFACE", - "name": "Node" - } - ] - }, - { - "kind": "OBJECT", - "name": "BrowserSession", - "fields": [ - { - "name": "appSessions", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "AppSessionConnection", - "ofType": null - } - }, - "args": [ - { - "name": "after", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "before", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "device", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "first", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "last", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "state", - "type": { - "kind": "SCALAR", - "name": "Any" - } - } - ] - }, - { - "name": "createdAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "finishedAt", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "lastActiveAt", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "lastActiveIp", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "lastAuthentication", - "type": { - "kind": "OBJECT", - "name": "Authentication", - "ofType": null - }, - "args": [] - }, - { - "name": "state", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "user", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "User", - "ofType": null - } - }, - "args": [] - }, - { - "name": "userAgent", - "type": { - "kind": "OBJECT", - "name": "UserAgent", - "ofType": null - }, - "args": [] - } - ], - "interfaces": [ - { - "kind": "INTERFACE", - "name": "CreationEvent" - }, - { - "kind": "INTERFACE", - "name": "Node" - } - ] - }, - { - "kind": "OBJECT", - "name": "BrowserSessionConnection", - "fields": [ - { - "name": "edges", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "BrowserSessionEdge", - "ofType": null - } - } - } - }, - "args": [] - }, - { - "name": "nodes", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "BrowserSession", - "ofType": null - } - } - } - }, - "args": [] - }, - { - "name": "pageInfo", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "PageInfo", - "ofType": null - } - }, - "args": [] - }, - { - "name": "totalCount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "BrowserSessionEdge", - "fields": [ - { - "name": "cursor", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "node", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "BrowserSession", - "ofType": null - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "CaptchaConfig", - "fields": [ - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "service", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "siteKey", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "CompatSession", - "fields": [ - { - "name": "browserSession", - "type": { - "kind": "OBJECT", - "name": "BrowserSession", - "ofType": null - }, - "args": [] - }, - { - "name": "createdAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "deviceId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "finishedAt", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "lastActiveAt", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "lastActiveIp", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "ssoLogin", - "type": { - "kind": "OBJECT", - "name": "CompatSsoLogin", - "ofType": null - }, - "args": [] - }, - { - "name": "state", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "user", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "User", - "ofType": null - } - }, - "args": [] - }, - { - "name": "userAgent", - "type": { - "kind": "OBJECT", - "name": "UserAgent", - "ofType": null - }, - "args": [] - } - ], - "interfaces": [ - { - "kind": "INTERFACE", - "name": "CreationEvent" - }, - { - "kind": "INTERFACE", - "name": "Node" - } - ] - }, - { - "kind": "OBJECT", - "name": "CompatSessionConnection", - "fields": [ - { - "name": "edges", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CompatSessionEdge", - "ofType": null - } - } - } - }, - "args": [] - }, - { - "name": "nodes", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CompatSession", - "ofType": null - } - } - } - }, - "args": [] - }, - { - "name": "pageInfo", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "PageInfo", - "ofType": null - } - }, - "args": [] - }, - { - "name": "totalCount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "CompatSessionEdge", - "fields": [ - { - "name": "cursor", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "node", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CompatSession", - "ofType": null - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "CompatSsoLogin", - "fields": [ - { - "name": "createdAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "exchangedAt", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "fulfilledAt", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "redirectUri", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "session", - "type": { - "kind": "OBJECT", - "name": "CompatSession", - "ofType": null - }, - "args": [] - } - ], - "interfaces": [ - { - "kind": "INTERFACE", - "name": "Node" - } - ] - }, - { - "kind": "OBJECT", - "name": "CompatSsoLoginConnection", - "fields": [ - { - "name": "edges", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CompatSsoLoginEdge", - "ofType": null - } - } - } - }, - "args": [] - }, - { - "name": "nodes", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CompatSsoLogin", - "ofType": null - } - } - } - }, - "args": [] - }, - { - "name": "pageInfo", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "PageInfo", - "ofType": null - } - }, - "args": [] - }, - { - "name": "totalCount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "CompatSsoLoginEdge", - "fields": [ - { - "name": "cursor", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "node", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CompatSsoLogin", - "ofType": null - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "CreateOAuth2SessionPayload", - "fields": [ - { - "name": "accessToken", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "oauth2Session", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "Oauth2Session", - "ofType": null - } - }, - "args": [] - }, - { - "name": "refreshToken", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "INTERFACE", - "name": "CreationEvent", - "fields": [ - { - "name": "createdAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [], - "possibleTypes": [ - { - "kind": "OBJECT", - "name": "Authentication" - }, - { - "kind": "OBJECT", - "name": "BrowserSession" - }, - { - "kind": "OBJECT", - "name": "CompatSession" - }, - { - "kind": "OBJECT", - "name": "Oauth2Session" - }, - { - "kind": "OBJECT", - "name": "UpstreamOAuth2Link" - }, - { - "kind": "OBJECT", - "name": "UpstreamOAuth2Provider" - }, - { - "kind": "OBJECT", - "name": "UserEmail" - } - ] - }, - { - "kind": "OBJECT", - "name": "EndBrowserSessionPayload", - "fields": [ - { - "name": "browserSession", - "type": { - "kind": "OBJECT", - "name": "BrowserSession", - "ofType": null - }, - "args": [] - }, - { - "name": "status", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "EndCompatSessionPayload", - "fields": [ - { - "name": "compatSession", - "type": { - "kind": "OBJECT", - "name": "CompatSession", - "ofType": null - }, - "args": [] - }, - { - "name": "status", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "EndOAuth2SessionPayload", - "fields": [ - { - "name": "oauth2Session", - "type": { - "kind": "OBJECT", - "name": "Oauth2Session", - "ofType": null - }, - "args": [] - }, - { - "name": "status", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "LockUserPayload", - "fields": [ - { - "name": "status", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "user", - "type": { - "kind": "OBJECT", - "name": "User", - "ofType": null - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "MatrixUser", - "fields": [ - { - "name": "avatarUrl", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "deactivated", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "displayName", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "mxid", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "Mutation", - "fields": [ - { - "name": "addEmail", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "AddEmailPayload", - "ofType": null - } - }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "addUser", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "AddUserPayload", - "ofType": null - } - }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "allowUserCrossSigningReset", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "AllowUserCrossSigningResetPayload", - "ofType": null - } - }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "createOauth2Session", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CreateOAuth2SessionPayload", - "ofType": null - } - }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "endBrowserSession", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "EndBrowserSessionPayload", - "ofType": null - } - }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "endCompatSession", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "EndCompatSessionPayload", - "ofType": null - } - }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "endOauth2Session", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "EndOAuth2SessionPayload", - "ofType": null - } - }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "lockUser", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LockUserPayload", - "ofType": null - } - }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "removeEmail", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "RemoveEmailPayload", - "ofType": null - } - }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "sendVerificationEmail", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SendVerificationEmailPayload", - "ofType": null - } - }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "setCanRequestAdmin", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SetCanRequestAdminPayload", - "ofType": null - } - }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "setDisplayName", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SetDisplayNamePayload", - "ofType": null - } - }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "setPassword", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SetPasswordPayload", - "ofType": null - } - }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "setPasswordByRecovery", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SetPasswordPayload", - "ofType": null - } - }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "setPrimaryEmail", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SetPrimaryEmailPayload", - "ofType": null - } - }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "unlockUser", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "UnlockUserPayload", - "ofType": null - } - }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "verifyEmail", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "VerifyEmailPayload", - "ofType": null - } - }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - } - ], - "interfaces": [] - }, - { - "kind": "INTERFACE", - "name": "Node", - "fields": [ - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [], - "possibleTypes": [ - { - "kind": "OBJECT", - "name": "Anonymous" - }, - { - "kind": "OBJECT", - "name": "Authentication" - }, - { - "kind": "OBJECT", - "name": "BrowserSession" - }, - { - "kind": "OBJECT", - "name": "CompatSession" - }, - { - "kind": "OBJECT", - "name": "CompatSsoLogin" - }, - { - "kind": "OBJECT", - "name": "Oauth2Client" - }, - { - "kind": "OBJECT", - "name": "Oauth2Session" - }, - { - "kind": "OBJECT", - "name": "SiteConfig" - }, - { - "kind": "OBJECT", - "name": "UpstreamOAuth2Link" - }, - { - "kind": "OBJECT", - "name": "UpstreamOAuth2Provider" - }, - { - "kind": "OBJECT", - "name": "User" - }, - { - "kind": "OBJECT", - "name": "UserEmail" - } - ] - }, - { - "kind": "OBJECT", - "name": "Oauth2Client", - "fields": [ - { - "name": "applicationType", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "clientId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "clientName", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "clientUri", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "logoUri", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "policyUri", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "redirectUris", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - }, - "args": [] - }, - { - "name": "tosUri", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - } - ], - "interfaces": [ - { - "kind": "INTERFACE", - "name": "Node" - } - ] - }, - { - "kind": "OBJECT", - "name": "Oauth2Session", - "fields": [ - { - "name": "browserSession", - "type": { - "kind": "OBJECT", - "name": "BrowserSession", - "ofType": null - }, - "args": [] - }, - { - "name": "client", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "Oauth2Client", - "ofType": null - } - }, - "args": [] - }, - { - "name": "createdAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "finishedAt", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "lastActiveAt", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "lastActiveIp", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "scope", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "state", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "user", - "type": { - "kind": "OBJECT", - "name": "User", - "ofType": null - }, - "args": [] - }, - { - "name": "userAgent", - "type": { - "kind": "OBJECT", - "name": "UserAgent", - "ofType": null - }, - "args": [] - } - ], - "interfaces": [ - { - "kind": "INTERFACE", - "name": "CreationEvent" - }, - { - "kind": "INTERFACE", - "name": "Node" - } - ] - }, - { - "kind": "OBJECT", - "name": "Oauth2SessionConnection", - "fields": [ - { - "name": "edges", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "Oauth2SessionEdge", - "ofType": null - } - } - } - }, - "args": [] - }, - { - "name": "nodes", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "Oauth2Session", - "ofType": null - } - } - } - }, - "args": [] - }, - { - "name": "pageInfo", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "PageInfo", - "ofType": null - } - }, - "args": [] - }, - { - "name": "totalCount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "Oauth2SessionEdge", - "fields": [ - { - "name": "cursor", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "node", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "Oauth2Session", - "ofType": null - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "PageInfo", - "fields": [ - { - "name": "endCursor", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "hasNextPage", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "hasPreviousPage", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "startCursor", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "Query", - "fields": [ - { - "name": "browserSession", - "type": { - "kind": "OBJECT", - "name": "BrowserSession", - "ofType": null - }, - "args": [ - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "compatSession", - "type": { - "kind": "OBJECT", - "name": "CompatSession", - "ofType": null - }, - "args": [ - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "currentBrowserSession", - "type": { - "kind": "OBJECT", - "name": "BrowserSession", - "ofType": null - }, - "args": [] - }, - { - "name": "currentUser", - "type": { - "kind": "OBJECT", - "name": "User", - "ofType": null - }, - "args": [] - }, - { - "name": "node", - "type": { - "kind": "INTERFACE", - "name": "Node", - "ofType": null - }, - "args": [ - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "oauth2Client", - "type": { - "kind": "OBJECT", - "name": "Oauth2Client", - "ofType": null - }, - "args": [ - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "oauth2Session", - "type": { - "kind": "OBJECT", - "name": "Oauth2Session", - "ofType": null - }, - "args": [ - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "session", - "type": { - "kind": "UNION", - "name": "Session", - "ofType": null - }, - "args": [ - { - "name": "deviceId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - }, - { - "name": "userId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "siteConfig", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SiteConfig", - "ofType": null - } - }, - "args": [] - }, - { - "name": "upstreamOauth2Link", - "type": { - "kind": "OBJECT", - "name": "UpstreamOAuth2Link", - "ofType": null - }, - "args": [ - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "upstreamOauth2Provider", - "type": { - "kind": "OBJECT", - "name": "UpstreamOAuth2Provider", - "ofType": null - }, - "args": [ - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "upstreamOauth2Providers", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "UpstreamOAuth2ProviderConnection", - "ofType": null - } - }, - "args": [ - { - "name": "after", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "before", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "first", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "last", - "type": { - "kind": "SCALAR", - "name": "Any" - } - } - ] - }, - { - "name": "user", - "type": { - "kind": "OBJECT", - "name": "User", - "ofType": null - }, - "args": [ - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "userByUsername", - "type": { - "kind": "OBJECT", - "name": "User", - "ofType": null - }, - "args": [ - { - "name": "username", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "userEmail", - "type": { - "kind": "OBJECT", - "name": "UserEmail", - "ofType": null - }, - "args": [ - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - } - } - ] - }, - { - "name": "users", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "UserConnection", - "ofType": null - } - }, - "args": [ - { - "name": "after", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "before", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "canRequestAdmin", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "first", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "last", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "state", - "type": { - "kind": "SCALAR", - "name": "Any" - } - } - ] - }, - { - "name": "viewer", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "UNION", - "name": "Viewer", - "ofType": null - } - }, - "args": [] - }, - { - "name": "viewerSession", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "UNION", - "name": "ViewerSession", - "ofType": null - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "RemoveEmailPayload", - "fields": [ - { - "name": "email", - "type": { - "kind": "OBJECT", - "name": "UserEmail", - "ofType": null - }, - "args": [] - }, - { - "name": "status", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "user", - "type": { - "kind": "OBJECT", - "name": "User", - "ofType": null - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "SendVerificationEmailPayload", - "fields": [ - { - "name": "email", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "UserEmail", - "ofType": null - } - }, - "args": [] - }, - { - "name": "status", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "user", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "User", - "ofType": null - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "UNION", - "name": "Session", - "possibleTypes": [ - { - "kind": "OBJECT", - "name": "CompatSession" - }, - { - "kind": "OBJECT", - "name": "Oauth2Session" - } - ] - }, - { - "kind": "OBJECT", - "name": "SetCanRequestAdminPayload", - "fields": [ - { - "name": "user", - "type": { - "kind": "OBJECT", - "name": "User", - "ofType": null - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "SetDisplayNamePayload", - "fields": [ - { - "name": "status", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "user", - "type": { - "kind": "OBJECT", - "name": "User", - "ofType": null - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "SetPasswordPayload", - "fields": [ - { - "name": "status", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "SetPrimaryEmailPayload", - "fields": [ - { - "name": "status", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "user", - "type": { - "kind": "OBJECT", - "name": "User", - "ofType": null - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "SiteConfig", - "fields": [ - { - "name": "captchaConfig", - "type": { - "kind": "OBJECT", - "name": "CaptchaConfig", - "ofType": null - }, - "args": [] - }, - { - "name": "displayNameChangeAllowed", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "emailChangeAllowed", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "imprint", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "minimumPasswordComplexity", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "passwordChangeAllowed", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "passwordLoginEnabled", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "passwordRegistrationEnabled", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "policyUri", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "serverName", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "tosUri", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - } - ], - "interfaces": [ - { - "kind": "INTERFACE", - "name": "Node" - } - ] - }, - { - "kind": "OBJECT", - "name": "UnlockUserPayload", - "fields": [ - { - "name": "status", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "user", - "type": { - "kind": "OBJECT", - "name": "User", - "ofType": null - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "UpstreamOAuth2Link", - "fields": [ - { - "name": "createdAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "provider", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "UpstreamOAuth2Provider", - "ofType": null - } - }, - "args": [] - }, - { - "name": "subject", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "user", - "type": { - "kind": "OBJECT", - "name": "User", - "ofType": null - }, - "args": [] - } - ], - "interfaces": [ - { - "kind": "INTERFACE", - "name": "CreationEvent" - }, - { - "kind": "INTERFACE", - "name": "Node" - } - ] - }, - { - "kind": "OBJECT", - "name": "UpstreamOAuth2LinkConnection", - "fields": [ - { - "name": "edges", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "UpstreamOAuth2LinkEdge", - "ofType": null - } - } - } - }, - "args": [] - }, - { - "name": "nodes", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "UpstreamOAuth2Link", - "ofType": null - } - } - } - }, - "args": [] - }, - { - "name": "pageInfo", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "PageInfo", - "ofType": null - } - }, - "args": [] - }, - { - "name": "totalCount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "UpstreamOAuth2LinkEdge", - "fields": [ - { - "name": "cursor", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "node", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "UpstreamOAuth2Link", - "ofType": null - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "UpstreamOAuth2Provider", - "fields": [ - { - "name": "clientId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "createdAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "issuer", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [ - { - "kind": "INTERFACE", - "name": "CreationEvent" - }, - { - "kind": "INTERFACE", - "name": "Node" - } - ] - }, - { - "kind": "OBJECT", - "name": "UpstreamOAuth2ProviderConnection", - "fields": [ - { - "name": "edges", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "UpstreamOAuth2ProviderEdge", - "ofType": null - } - } - } - }, - "args": [] - }, - { - "name": "nodes", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "UpstreamOAuth2Provider", - "ofType": null - } - } - } - }, - "args": [] - }, - { - "name": "pageInfo", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "PageInfo", - "ofType": null - } - }, - "args": [] - }, - { - "name": "totalCount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "UpstreamOAuth2ProviderEdge", - "fields": [ - { - "name": "cursor", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "node", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "UpstreamOAuth2Provider", - "ofType": null - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "User", - "fields": [ - { - "name": "appSessions", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "AppSessionConnection", - "ofType": null - } - }, - "args": [ - { - "name": "after", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "before", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "browserSession", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "device", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "first", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "last", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "lastActive", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "state", - "type": { - "kind": "SCALAR", - "name": "Any" - } - } - ] - }, - { - "name": "browserSessions", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "BrowserSessionConnection", - "ofType": null - } - }, - "args": [ - { - "name": "after", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "before", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "first", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "last", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "lastActive", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "state", - "type": { - "kind": "SCALAR", - "name": "Any" - } - } - ] - }, - { - "name": "canRequestAdmin", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "compatSessions", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CompatSessionConnection", - "ofType": null - } - }, - "args": [ - { - "name": "after", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "before", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "first", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "last", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "lastActive", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "state", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "type", - "type": { - "kind": "SCALAR", - "name": "Any" - } - } - ] - }, - { - "name": "compatSsoLogins", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CompatSsoLoginConnection", - "ofType": null - } - }, - "args": [ - { - "name": "after", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "before", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "first", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "last", - "type": { - "kind": "SCALAR", - "name": "Any" - } - } - ] - }, - { - "name": "createdAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "emails", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "UserEmailConnection", - "ofType": null - } - }, - "args": [ - { - "name": "after", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "before", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "first", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "last", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "state", - "type": { - "kind": "SCALAR", - "name": "Any" - } - } - ] - }, - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "lockedAt", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "matrix", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "MatrixUser", - "ofType": null - } - }, - "args": [] - }, - { - "name": "oauth2Sessions", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "Oauth2SessionConnection", - "ofType": null - } - }, - "args": [ - { - "name": "after", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "before", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "client", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "first", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "last", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "lastActive", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "state", - "type": { - "kind": "SCALAR", - "name": "Any" - } - } - ] - }, - { - "name": "primaryEmail", - "type": { - "kind": "OBJECT", - "name": "UserEmail", - "ofType": null - }, - "args": [] - }, - { - "name": "upstreamOauth2Links", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "UpstreamOAuth2LinkConnection", - "ofType": null - } - }, - "args": [ - { - "name": "after", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "before", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "first", - "type": { - "kind": "SCALAR", - "name": "Any" - } - }, - { - "name": "last", - "type": { - "kind": "SCALAR", - "name": "Any" - } - } - ] - }, - { - "name": "username", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [ - { - "kind": "INTERFACE", - "name": "Node" - } - ] - }, - { - "kind": "OBJECT", - "name": "UserAgent", - "fields": [ - { - "name": "deviceType", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "model", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "os", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "osVersion", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "raw", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "version", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "UserConnection", - "fields": [ - { - "name": "edges", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "UserEdge", - "ofType": null - } - } - } - }, - "args": [] - }, - { - "name": "nodes", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "User", - "ofType": null - } - } - } - }, - "args": [] - }, - { - "name": "pageInfo", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "PageInfo", - "ofType": null - } - }, - "args": [] - }, - { - "name": "totalCount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "UserEdge", - "fields": [ - { - "name": "cursor", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "node", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "User", - "ofType": null - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "UserEmail", - "fields": [ - { - "name": "confirmedAt", - "type": { - "kind": "SCALAR", - "name": "Any" - }, - "args": [] - }, - { - "name": "createdAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "email", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [ - { - "kind": "INTERFACE", - "name": "CreationEvent" - }, - { - "kind": "INTERFACE", - "name": "Node" - } - ] - }, - { - "kind": "OBJECT", - "name": "UserEmailConnection", - "fields": [ - { - "name": "edges", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "UserEmailEdge", - "ofType": null - } - } - } - }, - "args": [] - }, - { - "name": "nodes", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "UserEmail", - "ofType": null - } - } - } - }, - "args": [] - }, - { - "name": "pageInfo", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "PageInfo", - "ofType": null - } - }, - "args": [] - }, - { - "name": "totalCount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "UserEmailEdge", - "fields": [ - { - "name": "cursor", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "node", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "UserEmail", - "ofType": null - } - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "VerifyEmailPayload", - "fields": [ - { - "name": "email", - "type": { - "kind": "OBJECT", - "name": "UserEmail", - "ofType": null - }, - "args": [] - }, - { - "name": "status", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Any" - } - }, - "args": [] - }, - { - "name": "user", - "type": { - "kind": "OBJECT", - "name": "User", - "ofType": null - }, - "args": [] - } - ], - "interfaces": [] - }, - { - "kind": "UNION", - "name": "Viewer", - "possibleTypes": [ - { - "kind": "OBJECT", - "name": "Anonymous" - }, - { - "kind": "OBJECT", - "name": "User" - } - ] - }, - { - "kind": "UNION", - "name": "ViewerSession", - "possibleTypes": [ - { - "kind": "OBJECT", - "name": "Anonymous" - }, - { - "kind": "OBJECT", - "name": "BrowserSession" - }, - { - "kind": "OBJECT", - "name": "Oauth2Session" - } - ] - }, - { - "kind": "SCALAR", - "name": "Any" - } - ], - "directives": [] - } -} as unknown as IntrospectionQuery; \ No newline at end of file diff --git a/frontend/src/graphql.ts b/frontend/src/graphql.ts index 8f80076c2..72b51ed47 100644 --- a/frontend/src/graphql.ts +++ b/frontend/src/graphql.ts @@ -4,106 +4,12 @@ // SPDX-License-Identifier: AGPL-3.0-only // Please see LICENSE in the repository root for full details. -import { createClient, fetchExchange } from "@urql/core"; +import { cacheExchange, createClient, fetchExchange } from "@urql/core"; import { devtoolsExchange } from "@urql/devtools"; -import { cacheExchange } from "@urql/exchange-graphcache"; import { refocusExchange } from "@urql/exchange-refocus"; import { requestPolicyExchange } from "@urql/exchange-request-policy"; import appConfig from "./config"; -import type { - MutationAddEmailArgs, - MutationRemoveEmailArgs, - MutationVerifyEmailArgs, - RemoveEmailPayload, - VerifyEmailPayload, -} from "./gql/graphql"; -import schema from "./gql/schema"; - -const cache = cacheExchange({ - schema, - keys: { - // This is embedded in the `User` entity and has no ID - MatrixUser: () => null, - }, - updates: { - Mutation: { - addEmail: (result, args: MutationAddEmailArgs, cache, _info) => { - const key = cache.keyOfEntity({ - __typename: "User", - id: args.input.userId, - }); - - // Invalidate the emails field on the User object so that it gets refetched - const fields = cache - .inspectFields(key) - .filter((field) => field.fieldName === "emails"); - for (const field of fields) { - cache.invalidate(key, field.fieldName, field.arguments); - } - }, - - removeEmail: ( - result: { removeEmail?: RemoveEmailPayload }, - args: MutationRemoveEmailArgs, - cache, - _info, - ) => { - // Invalidate the email entity - cache.invalidate({ - __typename: "UserEmail", - id: args.input.userEmailId, - }); - - // Let's try to figure out the userId to invalidate the emails field on the User object - const userId = result.removeEmail?.user?.id; - if (userId) { - const key = cache.keyOfEntity({ - __typename: "User", - id: userId, - }); - - // Invalidate the emails field on the User object so that it gets refetched - const fields = cache - .inspectFields(key) - .filter((field) => field.fieldName === "emails"); - for (const field of fields) { - cache.invalidate(key, field.fieldName, field.arguments); - } - } - }, - - verifyEmail: ( - result: { verifyEmail?: VerifyEmailPayload }, - args: MutationVerifyEmailArgs, - cache, - _info, - ) => { - // Invalidate the email entity - cache.invalidate({ - __typename: "UserEmail", - id: args.input.userEmailId, - }); - - // Let's try to figure out the userId to invalidate the emails field on the User object - const userId = result.verifyEmail?.user?.id; - if (userId) { - const key = cache.keyOfEntity({ - __typename: "User", - id: userId, - }); - - // Invalidate the emails field on the User object so that it gets refetched - for (const field of cache - .inspectFields(key) - .filter((field) => field.fieldName === "emails")) { - cache.invalidate(key, field.fieldName, field.arguments); - } - } - }, - }, - }, -}); const exchanges = [ // This sets the policy to 'cache-and-network' after 5 minutes @@ -114,8 +20,8 @@ const exchanges = [ // This refetches all queries when the tab is refocused refocusExchange(), - // The unified cache - cache, + // Simple cache + cacheExchange, // Use `fetch` to execute the requests fetchExchange, diff --git a/frontend/src/pagination.ts b/frontend/src/pagination.ts index e08f71ec7..5616e7439 100644 --- a/frontend/src/pagination.ts +++ b/frontend/src/pagination.ts @@ -7,7 +7,13 @@ import { useState } from "react"; import * as z from "zod"; -import type { PageInfo } from "./gql/graphql"; +// PageInfo we get on connections from the GraphQL API +type PageInfo = { + hasNextPage: boolean; + hasPreviousPage: boolean; + startCursor?: string | null; + endCursor?: string | null; +}; export const FIRST_PAGE = Symbol("FIRST_PAGE"); export const LAST_PAGE = Symbol("LAST_PAGE");