You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-20 12:02:22 +03:00
Ability to set the primary email and cleanup the email lists
This commit is contained in:
@@ -184,6 +184,8 @@ export type Mutation = {
|
||||
removeEmail: RemoveEmailPayload;
|
||||
/** Send a verification code for an email address */
|
||||
sendVerificationEmail: SendVerificationEmailPayload;
|
||||
/** Set an email address as primary */
|
||||
setPrimaryEmail: SetPrimaryEmailPayload;
|
||||
/** Submit a verification code for an email address */
|
||||
verifyEmail: VerifyEmailPayload;
|
||||
};
|
||||
@@ -203,6 +205,11 @@ export type MutationSendVerificationEmailArgs = {
|
||||
input: SendVerificationEmailInput;
|
||||
};
|
||||
|
||||
/** The mutations root of the GraphQL interface. */
|
||||
export type MutationSetPrimaryEmailArgs = {
|
||||
input: SetPrimaryEmailInput;
|
||||
};
|
||||
|
||||
/** The mutations root of the GraphQL interface. */
|
||||
export type MutationVerifyEmailArgs = {
|
||||
input: VerifyEmailInput;
|
||||
@@ -413,6 +420,28 @@ export enum SendVerificationEmailStatus {
|
||||
Sent = "SENT",
|
||||
}
|
||||
|
||||
/** The input for the `setPrimaryEmail` mutation */
|
||||
export type SetPrimaryEmailInput = {
|
||||
/** The ID of the email address to set as primary */
|
||||
userEmailId: Scalars["ID"];
|
||||
};
|
||||
|
||||
/** The payload of the `setPrimaryEmail` mutation */
|
||||
export type SetPrimaryEmailPayload = {
|
||||
__typename?: "SetPrimaryEmailPayload";
|
||||
status: SetPrimaryEmailStatus;
|
||||
/** The user to whom the email address belongs */
|
||||
user?: Maybe<User>;
|
||||
};
|
||||
|
||||
/** The status of the `setPrimaryEmail` mutation */
|
||||
export enum SetPrimaryEmailStatus {
|
||||
/** The email address was not found */
|
||||
NotFound = "NOT_FOUND",
|
||||
/** The email address was set as primary */
|
||||
Set = "SET",
|
||||
}
|
||||
|
||||
export type UpstreamOAuth2Link = CreationEvent &
|
||||
Node & {
|
||||
__typename?: "UpstreamOAuth2Link";
|
||||
@@ -861,6 +890,23 @@ export type RemoveEmailMutation = {
|
||||
};
|
||||
};
|
||||
|
||||
export type SetPrimaryEmailMutationVariables = Exact<{
|
||||
id: Scalars["ID"];
|
||||
}>;
|
||||
|
||||
export type SetPrimaryEmailMutation = {
|
||||
__typename?: "Mutation";
|
||||
setPrimaryEmail: {
|
||||
__typename?: "SetPrimaryEmailPayload";
|
||||
status: SetPrimaryEmailStatus;
|
||||
user?: {
|
||||
__typename?: "User";
|
||||
id: string;
|
||||
primaryEmail?: { __typename?: "UserEmail"; id: string } | null;
|
||||
} | null;
|
||||
};
|
||||
};
|
||||
|
||||
export type UserEmailListQueryQueryVariables = Exact<{
|
||||
userId: Scalars["ID"];
|
||||
first?: InputMaybe<Scalars["Int"]>;
|
||||
@@ -2218,6 +2264,86 @@ export const RemoveEmailDocument = {
|
||||
},
|
||||
],
|
||||
} as unknown as DocumentNode<RemoveEmailMutation, RemoveEmailMutationVariables>;
|
||||
export const SetPrimaryEmailDocument = {
|
||||
kind: "Document",
|
||||
definitions: [
|
||||
{
|
||||
kind: "OperationDefinition",
|
||||
operation: "mutation",
|
||||
name: { kind: "Name", value: "SetPrimaryEmail" },
|
||||
variableDefinitions: [
|
||||
{
|
||||
kind: "VariableDefinition",
|
||||
variable: { kind: "Variable", name: { kind: "Name", value: "id" } },
|
||||
type: {
|
||||
kind: "NonNullType",
|
||||
type: { kind: "NamedType", name: { kind: "Name", value: "ID" } },
|
||||
},
|
||||
},
|
||||
],
|
||||
selectionSet: {
|
||||
kind: "SelectionSet",
|
||||
selections: [
|
||||
{
|
||||
kind: "Field",
|
||||
name: { kind: "Name", value: "setPrimaryEmail" },
|
||||
arguments: [
|
||||
{
|
||||
kind: "Argument",
|
||||
name: { kind: "Name", value: "input" },
|
||||
value: {
|
||||
kind: "ObjectValue",
|
||||
fields: [
|
||||
{
|
||||
kind: "ObjectField",
|
||||
name: { kind: "Name", value: "userEmailId" },
|
||||
value: {
|
||||
kind: "Variable",
|
||||
name: { kind: "Name", value: "id" },
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
selectionSet: {
|
||||
kind: "SelectionSet",
|
||||
selections: [
|
||||
{ kind: "Field", name: { kind: "Name", value: "status" } },
|
||||
{
|
||||
kind: "Field",
|
||||
name: { kind: "Name", value: "user" },
|
||||
selectionSet: {
|
||||
kind: "SelectionSet",
|
||||
selections: [
|
||||
{ kind: "Field", name: { kind: "Name", value: "id" } },
|
||||
{
|
||||
kind: "Field",
|
||||
name: { kind: "Name", value: "primaryEmail" },
|
||||
selectionSet: {
|
||||
kind: "SelectionSet",
|
||||
selections: [
|
||||
{
|
||||
kind: "Field",
|
||||
name: { kind: "Name", value: "id" },
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
} as unknown as DocumentNode<
|
||||
SetPrimaryEmailMutation,
|
||||
SetPrimaryEmailMutationVariables
|
||||
>;
|
||||
export const UserEmailListQueryDocument = {
|
||||
kind: "Document",
|
||||
definitions: [
|
||||
|
||||
Reference in New Issue
Block a user