feat(admin): adapt new config system (#11360)

feat(server): add test mail api

feat(admin): adapt new config system
This commit is contained in:
forehalo
2025-04-01 15:00:10 +00:00
parent 8427293d36
commit dad858014f
29 changed files with 718 additions and 400 deletions

View File

@@ -0,0 +1,10 @@
mutation sendTestEmail($host: String!, $port: Int!, $sender: String!, $username: String!, $password: String!, $ignoreTLS: Boolean!) {
sendTestEmail(config: {
host: $host,
port: $port,
sender: $sender,
username: $username,
password: $password,
ignoreTLS: $ignoreTLS,
})
}

View File

@@ -220,6 +220,16 @@ export const listUsersQuery = {
}`,
};
export const sendTestEmailMutation = {
id: 'sendTestEmailMutation' as const,
op: 'sendTestEmail',
query: `mutation sendTestEmail($host: String!, $port: Int!, $sender: String!, $username: String!, $password: String!, $ignoreTLS: Boolean!) {
sendTestEmail(
config: {host: $host, port: $port, sender: $sender, username: $username, password: $password, ignoreTLS: $ignoreTLS}
)
}`,
};
export const updateAccountFeaturesMutation = {
id: 'updateAccountFeaturesMutation' as const,
op: 'updateAccountFeatures',

View File

@@ -1111,6 +1111,7 @@ export interface Mutation {
sendChangeEmail: Scalars['Boolean']['output'];
sendChangePasswordEmail: Scalars['Boolean']['output'];
sendSetPasswordEmail: Scalars['Boolean']['output'];
sendTestEmail: Scalars['Boolean']['output'];
sendVerifyChangeEmail: Scalars['Boolean']['output'];
sendVerifyEmail: Scalars['Boolean']['output'];
setBlob: Scalars['String']['output'];
@@ -1404,6 +1405,10 @@ export interface MutationSendSetPasswordEmailArgs {
email?: InputMaybe<Scalars['String']['input']>;
}
export interface MutationSendTestEmailArgs {
config: Scalars['JSONObject']['input'];
}
export interface MutationSendVerifyChangeEmailArgs {
callbackUrl: Scalars['String']['input'];
email: Scalars['String']['input'];
@@ -2509,6 +2514,20 @@ export type ListUsersQuery = {
}>;
};
export type SendTestEmailMutationVariables = Exact<{
host: Scalars['String']['input'];
port: Scalars['Int']['input'];
sender: Scalars['String']['input'];
username: Scalars['String']['input'];
password: Scalars['String']['input'];
ignoreTLS: Scalars['Boolean']['input'];
}>;
export type SendTestEmailMutation = {
__typename?: 'Mutation';
sendTestEmail: boolean;
};
export type UpdateAccountFeaturesMutationVariables = Exact<{
userId: Scalars['String']['input'];
features: Array<FeatureType> | FeatureType;
@@ -4587,6 +4606,11 @@ export type Mutations =
variables: ImportUsersMutationVariables;
response: ImportUsersMutation;
}
| {
name: 'sendTestEmailMutation';
variables: SendTestEmailMutationVariables;
response: SendTestEmailMutation;
}
| {
name: 'updateAccountFeaturesMutation';
variables: UpdateAccountFeaturesMutationVariables;