wip
This commit is contained in:
		@@ -1378,6 +1378,34 @@ export const endpoints = {
 | 
			
		||||
			}
 | 
			
		||||
		}],
 | 
			
		||||
	},
 | 
			
		||||
	'admin/abuse-user-reports': {
 | 
			
		||||
		tags: ['admin'],
 | 
			
		||||
	
 | 
			
		||||
		requireCredential: true,
 | 
			
		||||
		requireModerator: true,
 | 
			
		||||
	
 | 
			
		||||
		defines: [{
 | 
			
		||||
			req: {
 | 
			
		||||
				type: 'object',
 | 
			
		||||
				properties: {
 | 
			
		||||
					limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
 | 
			
		||||
					sinceId: { type: 'string', format: 'misskey:id' },
 | 
			
		||||
					untilId: { type: 'string', format: 'misskey:id' },
 | 
			
		||||
					state: { type: ['string', 'null'], default: null },
 | 
			
		||||
					reporterOrigin: { type: 'string', enum: ['combined', 'local', 'remote'], default: 'combined' },
 | 
			
		||||
					targetUserOrigin: { type: 'string', enum: ['combined', 'local', 'remote'], default: 'combined' },
 | 
			
		||||
					forwarded: { type: 'boolean', default: false },
 | 
			
		||||
				},
 | 
			
		||||
				required: [],
 | 
			
		||||
			},
 | 
			
		||||
			res: {
 | 
			
		||||
				type: 'array',
 | 
			
		||||
				items: {
 | 
			
		||||
					$ref: 'https://misskey-hub.net/api/schemas/AbuseUserReport',
 | 
			
		||||
				},
 | 
			
		||||
			},
 | 
			
		||||
		}],
 | 
			
		||||
	},
 | 
			
		||||
} as const satisfies { [x: string]: IEndpointMeta; };
 | 
			
		||||
 | 
			
		||||
/**
 | 
			
		||||
 
 | 
			
		||||
@@ -36,6 +36,7 @@ import { packedFlashSchema } from './schemas/flash.js';
 | 
			
		||||
import { packedAdSchema } from './schemas/ad.js';
 | 
			
		||||
import { packedAnnouncementSchema } from './schemas/announcement.js';
 | 
			
		||||
import { packedRelaySchema } from './schemas/relay.js';
 | 
			
		||||
import { packedAbuseUserReportSchema } from './schemas/abuse-user-report.js';
 | 
			
		||||
import {
 | 
			
		||||
	packedRoleSchema,
 | 
			
		||||
	packedRoleAssignSchema,
 | 
			
		||||
@@ -87,6 +88,7 @@ export const refs = {
 | 
			
		||||
	RoleAssign: packedRoleAssignSchema,
 | 
			
		||||
	RolePolicy: packedRolePolicySchema,
 | 
			
		||||
	RoleCondFormula: packedRoleCondFormulaSchema,
 | 
			
		||||
	AbuseUserReport: packedAbuseUserReportSchema,
 | 
			
		||||
 | 
			
		||||
	Error: Error,
 | 
			
		||||
	ApiError: ApiError,
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										52
									
								
								packages/misskey-js/src/schemas/abuse-user-report.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										52
									
								
								packages/misskey-js/src/schemas/abuse-user-report.ts
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,52 @@
 | 
			
		||||
import type { JSONSchema7Definition } from 'schema-type';
 | 
			
		||||
 | 
			
		||||
export const packedAbuseUserReportSchema = {
 | 
			
		||||
	$id: 'https://misskey-hub.net/api/schemas/AbuseUserReport',
 | 
			
		||||
 | 
			
		||||
	type: 'object',
 | 
			
		||||
	properties: {
 | 
			
		||||
		id: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
 | 
			
		||||
		createdAt: {
 | 
			
		||||
			type: 'string',
 | 
			
		||||
			format: 'date-time',
 | 
			
		||||
		},
 | 
			
		||||
        comment: {
 | 
			
		||||
			type: 'string',
 | 
			
		||||
		},
 | 
			
		||||
		resolved: {
 | 
			
		||||
			type: 'boolean',
 | 
			
		||||
			examples: [false],
 | 
			
		||||
		},
 | 
			
		||||
		reporterId: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
 | 
			
		||||
		reporter: { $ref: 'https://misskey-hub.net/api/schemas/UserDetailed' },
 | 
			
		||||
		targetUserId: { $ref: 'https://misskey-hub.net/api/schemas/Id' },
 | 
			
		||||
		targetUser: { $ref: 'https://misskey-hub.net/api/schemas/UserDetailed' },
 | 
			
		||||
		assigneeId: {
 | 
			
		||||
			oneOf: [
 | 
			
		||||
				{ $ref: 'https://misskey-hub.net/api/schemas/Id' },
 | 
			
		||||
				{ type: 'null' },
 | 
			
		||||
			]
 | 
			
		||||
		},
 | 
			
		||||
		assignee: {
 | 
			
		||||
			oneOf: [
 | 
			
		||||
				{ $ref: 'https://misskey-hub.net/api/schemas/UserDetailed' },
 | 
			
		||||
				{ type: 'null' },
 | 
			
		||||
			]
 | 
			
		||||
		},
 | 
			
		||||
		forwarded: {
 | 
			
		||||
			type: 'boolean',
 | 
			
		||||
		},
 | 
			
		||||
    },
 | 
			
		||||
    required: [
 | 
			
		||||
        'id',
 | 
			
		||||
        'createdAt',
 | 
			
		||||
		'comment',
 | 
			
		||||
		'resolved',
 | 
			
		||||
		'reporterId',
 | 
			
		||||
		'reporter',
 | 
			
		||||
		'targetUserId',
 | 
			
		||||
		'targetUser',
 | 
			
		||||
		'assigneeId',
 | 
			
		||||
		'forwarded',
 | 
			
		||||
    ],
 | 
			
		||||
} as const satisfies JSONSchema7Definition;
 | 
			
		||||
		Reference in New Issue
	
	Block a user