forked from woem.men/forkey
update tests to handle signup requests
This commit is contained in:
parent
de319d1b9d
commit
12bd4e720b
6 changed files with 15 additions and 155 deletions
|
@ -651,6 +651,14 @@ export const packedMeDetailedOnlySchema = {
|
|||
type: 'boolean',
|
||||
nullable: true, optional: true,
|
||||
},
|
||||
approved: {
|
||||
type: 'boolean',
|
||||
nullable: false, optional: true,
|
||||
},
|
||||
signupReason: {
|
||||
type: 'string',
|
||||
nullable: true, optional: true,
|
||||
},
|
||||
securityKeysList: {
|
||||
type: 'array',
|
||||
nullable: false, optional: true,
|
||||
|
|
|
@ -148,6 +148,8 @@ describe('ユーザー', () => {
|
|||
achievements: user.achievements,
|
||||
loggedInDays: user.loggedInDays,
|
||||
policies: user.policies,
|
||||
approved: user.approved,
|
||||
signupReason: user.signupReason,
|
||||
...(security ? {
|
||||
email: user.email,
|
||||
emailVerified: user.emailVerified,
|
||||
|
|
|
@ -840,28 +840,6 @@ declare module '../api.js' {
|
|||
credential?: string | null,
|
||||
): Promise<SwitchCaseResponseType<E, P>>;
|
||||
|
||||
/**
|
||||
* No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:approve-user*
|
||||
*/
|
||||
request<E extends 'admin/approve-user', P extends Endpoints[E]['req']>(
|
||||
endpoint: E,
|
||||
params: P,
|
||||
credential?: string | null,
|
||||
): Promise<SwitchCaseResponseType<E, P>>;
|
||||
|
||||
/**
|
||||
* No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:decline-user*
|
||||
*/
|
||||
request<E extends 'admin/decline-user', P extends Endpoints[E]['req']>(
|
||||
endpoint: E,
|
||||
params: P,
|
||||
credential?: string | null,
|
||||
): Promise<SwitchCaseResponseType<E, P>>;
|
||||
|
||||
/**
|
||||
* No description provided.
|
||||
*
|
||||
|
|
|
@ -103,8 +103,6 @@ import type {
|
|||
AdminShowUsersRequest,
|
||||
AdminShowUsersResponse,
|
||||
AdminSuspendUserRequest,
|
||||
AdminApproveUserRequest,
|
||||
AdminDeclineUserRequest,
|
||||
AdminUnsuspendUserRequest,
|
||||
AdminUpdateMetaRequest,
|
||||
AdminUpdateUserNameRequest,
|
||||
|
@ -669,8 +667,6 @@ export type Endpoints = {
|
|||
'admin/show-user': { req: AdminShowUserRequest; res: AdminShowUserResponse };
|
||||
'admin/show-users': { req: AdminShowUsersRequest; res: AdminShowUsersResponse };
|
||||
'admin/suspend-user': { req: AdminSuspendUserRequest; res: EmptyResponse };
|
||||
'admin/approve-user': { req: AdminApproveUserRequest; res: EmptyResponse };
|
||||
'admin/decline-user': { req: AdminDeclineUserRequest; res: EmptyResponse };
|
||||
'admin/unsuspend-user': { req: AdminUnsuspendUserRequest; res: EmptyResponse };
|
||||
'admin/update-meta': { req: AdminUpdateMetaRequest; res: EmptyResponse };
|
||||
'admin/update-user-name': { req: AdminUpdateUserNameRequest; res: EmptyResponse };
|
||||
|
|
|
@ -106,8 +106,6 @@ export type AdminShowUserResponse = operations['admin___show-user']['responses']
|
|||
export type AdminShowUsersRequest = operations['admin___show-users']['requestBody']['content']['application/json'];
|
||||
export type AdminShowUsersResponse = operations['admin___show-users']['responses']['200']['content']['application/json'];
|
||||
export type AdminSuspendUserRequest = operations['admin___suspend-user']['requestBody']['content']['application/json'];
|
||||
export type AdminApproveUserRequest = operations['admin___approve-user']['requestBody']['content']['application/json'];
|
||||
export type AdminDeclineUserRequest = operations['admin___decline-user']['requestBody']['content']['application/json'];
|
||||
export type AdminUnsuspendUserRequest = operations['admin___unsuspend-user']['requestBody']['content']['application/json'];
|
||||
export type AdminUpdateMetaRequest = operations['admin___update-meta']['requestBody']['content']['application/json'];
|
||||
export type AdminUpdateUserNameRequest = operations['admin___update-user-name']['requestBody']['content']['application/json'];
|
||||
|
|
|
@ -697,24 +697,6 @@ export type paths = {
|
|||
*/
|
||||
post: operations['admin___suspend-user'];
|
||||
};
|
||||
'/admin/approve-user': {
|
||||
/**
|
||||
* admin/approve-user
|
||||
* @description No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:approve-user*
|
||||
*/
|
||||
post: operations['admin___approve-user'];
|
||||
};
|
||||
'/admin/decline-user': {
|
||||
/**
|
||||
* admin/decline-user
|
||||
* @description No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:decline-user*
|
||||
*/
|
||||
post: operations['admin___decline-user'];
|
||||
};
|
||||
'/admin/unsuspend-user': {
|
||||
/**
|
||||
* admin/unsuspend-user
|
||||
|
@ -5129,7 +5111,6 @@ export type components = {
|
|||
defaultLightTheme: string | null;
|
||||
disableRegistration: boolean;
|
||||
emailRequiredForSignup: boolean;
|
||||
approvalRequiredForSignup: boolean;
|
||||
enableHcaptcha: boolean;
|
||||
hcaptchaSiteKey: string | null;
|
||||
enableMcaptcha: boolean;
|
||||
|
@ -5185,7 +5166,6 @@ export type components = {
|
|||
features?: {
|
||||
registration: boolean;
|
||||
emailRequiredForSignup: boolean;
|
||||
approvalRequiredForSignup: boolean;
|
||||
localTimeline: boolean;
|
||||
globalTimeline: boolean;
|
||||
hCaptcha: boolean;
|
||||
|
@ -5278,7 +5258,6 @@ export type operations = {
|
|||
cacheRemoteFiles: boolean;
|
||||
cacheRemoteSensitiveFiles: boolean;
|
||||
emailRequiredForSignup: boolean;
|
||||
approvalRequiredForSignup: boolean;
|
||||
enableHcaptcha: boolean;
|
||||
hcaptchaSiteKey: string | null;
|
||||
enableMcaptcha: boolean;
|
||||
|
@ -9908,7 +9887,7 @@ export type operations = {
|
|||
* @default all
|
||||
* @enum {string}
|
||||
*/
|
||||
state?: 'all' | 'alive' | 'available' | 'admin' | 'moderator' | 'adminOrModerator' | 'suspended' | 'approved';
|
||||
state?: 'all' | 'alive' | 'available' | 'admin' | 'moderator' | 'adminOrModerator' | 'suspended';
|
||||
/**
|
||||
* @default combined
|
||||
* @enum {string}
|
||||
|
@ -10015,110 +9994,6 @@ export type operations = {
|
|||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* admin/approve-user
|
||||
* @description No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:approve-user*
|
||||
*/
|
||||
'admin___approve-user': {
|
||||
requestBody: {
|
||||
content: {
|
||||
'application/json': {
|
||||
/** Format: misskey:id */
|
||||
userId: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description OK (without any results) */
|
||||
204: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Client error */
|
||||
400: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description Authentication error */
|
||||
401: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description Forbidden error */
|
||||
403: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description I'm Ai */
|
||||
418: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description Internal server error */
|
||||
500: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* admin/decline-user
|
||||
* @description No description provided.
|
||||
*
|
||||
* **Credential required**: *Yes* / **Permission**: *write:admin:decline-user*
|
||||
*/
|
||||
'admin___decline-user': {
|
||||
requestBody: {
|
||||
content: {
|
||||
'application/json': {
|
||||
/** Format: misskey:id */
|
||||
userId: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description OK (without any results) */
|
||||
204: {
|
||||
content: never;
|
||||
};
|
||||
/** @description Client error */
|
||||
400: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description Authentication error */
|
||||
401: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description Forbidden error */
|
||||
403: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description I'm Ai */
|
||||
418: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
/** @description Internal server error */
|
||||
500: {
|
||||
content: {
|
||||
'application/json': components['schemas']['Error'];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
/**
|
||||
* admin/unsuspend-user
|
||||
* @description No description provided.
|
||||
|
@ -10206,7 +10081,6 @@ export type operations = {
|
|||
cacheRemoteFiles?: boolean;
|
||||
cacheRemoteSensitiveFiles?: boolean;
|
||||
emailRequiredForSignup?: boolean;
|
||||
approvalRequiredForSignup?: boolean;
|
||||
enableHcaptcha?: boolean;
|
||||
hcaptchaSiteKey?: string | null;
|
||||
hcaptchaSecretKey?: string | null;
|
||||
|
@ -15517,6 +15391,8 @@ export type operations = {
|
|||
type?: string | null;
|
||||
/** @enum {string|null} */
|
||||
sort?: '+createdAt' | '-createdAt' | '+name' | '-name' | '+size' | '-size' | null;
|
||||
/** @default */
|
||||
searchQuery?: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -16116,6 +15992,8 @@ export type operations = {
|
|||
* @default null
|
||||
*/
|
||||
folderId?: string | null;
|
||||
/** @default */
|
||||
searchQuery?: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue