enhance: ページネーション(一覧表示)の基準日時を指定できるように sinceId/untilIdが指定可能なエンドポイントにおいて、sinceDate/untilDateも指定可能に

This commit is contained in:
syuilo 2025-06-28 20:21:21 +09:00
parent 012b2a9764
commit b8e8f3ad25
69 changed files with 429 additions and 96 deletions

View File

@ -6,10 +6,12 @@
### Client ### Client
- Enhance: 設定の自動バックアップをオンにした直後に自動バックアップするように - Enhance: 設定の自動バックアップをオンにした直後に自動バックアップするように
- Enhance: ファイルアップロード前にキャプション設定を行えるように - Enhance: ファイルアップロード前にキャプション設定を行えるように
- Enhance: ページネーションの並び順を逆にできるように - Enhance: ページネーション(一覧表示)の並び順を逆にできるように
- Enhance: ページネーション(一覧表示)の基準日時を指定できるように
- Fix: ファイルがドライブの既定アップロード先に指定したフォルダにアップロードされない問題を修正 - Fix: ファイルがドライブの既定アップロード先に指定したフォルダにアップロードされない問題を修正
### Server ### Server
- Enhance: sinceId/untilIdが指定可能なエンドポイントにおいて、sinceDate/untilDateも指定可能に
- Fix: ジョブキューのProgressの値を正しく計算する - Fix: ジョブキューのProgressの値を正しく計算する

View File

@ -98,6 +98,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
state: { type: 'string', nullable: true, default: null }, state: { type: 'string', nullable: true, default: null },
reporterOrigin: { type: 'string', enum: ['combined', 'local', 'remote'], default: 'combined' }, reporterOrigin: { type: 'string', enum: ['combined', 'local', 'remote'], default: 'combined' },
targetUserOrigin: { type: 'string', enum: ['combined', 'local', 'remote'], default: 'combined' }, targetUserOrigin: { type: 'string', enum: ['combined', 'local', 'remote'], default: 'combined' },
@ -115,7 +117,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.abuseUserReportsRepository.createQueryBuilder('report'), ps.sinceId, ps.untilId); const query = this.queryService.makePaginationQuery(this.abuseUserReportsRepository.createQueryBuilder('report'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate);
switch (ps.state) { switch (ps.state) {
case 'resolved': query.andWhere('report.resolved = TRUE'); break; case 'resolved': query.andWhere('report.resolved = TRUE'); break;

View File

@ -34,6 +34,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
publishing: { type: 'boolean', default: null, nullable: true }, publishing: { type: 'boolean', default: null, nullable: true },
}, },
required: [], required: [],
@ -48,7 +50,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.adsRepository.createQueryBuilder('ad'), ps.sinceId, ps.untilId); const query = this.queryService.makePaginationQuery(this.adsRepository.createQueryBuilder('ad'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate);
if (ps.publishing === true) { if (ps.publishing === true) {
query.andWhere('ad.expiresAt > :now', { now: new Date() }).andWhere('ad.startsAt <= :now', { now: new Date() }); query.andWhere('ad.expiresAt > :now', { now: new Date() }).andWhere('ad.startsAt <= :now', { now: new Date() });
} else if (ps.publishing === false) { } else if (ps.publishing === false) {

View File

@ -68,6 +68,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
userId: { type: 'string', format: 'misskey:id', nullable: true }, userId: { type: 'string', format: 'misskey:id', nullable: true },
status: { type: 'string', enum: ['all', 'active', 'archived'], default: 'active' }, status: { type: 'string', enum: ['all', 'active', 'archived'], default: 'active' },
}, },
@ -87,7 +89,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private idService: IdService, private idService: IdService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.announcementsRepository.createQueryBuilder('announcement'), ps.sinceId, ps.untilId); const query = this.queryService.makePaginationQuery(this.announcementsRepository.createQueryBuilder('announcement'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate);
if (ps.status === 'archived') { if (ps.status === 'archived') {
query.andWhere('announcement.isActive = false'); query.andWhere('announcement.isActive = false');

View File

@ -71,6 +71,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
userId: { type: 'string', format: 'misskey:id', nullable: true }, userId: { type: 'string', format: 'misskey:id', nullable: true },
}, },
required: [], required: [],

View File

@ -34,6 +34,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
userId: { type: 'string', format: 'misskey:id', nullable: true }, userId: { type: 'string', format: 'misskey:id', nullable: true },
type: { type: 'string', nullable: true, pattern: /^[a-zA-Z0-9\/\-*]+$/.toString().slice(1, -1) }, type: { type: 'string', nullable: true, pattern: /^[a-zA-Z0-9\/\-*]+$/.toString().slice(1, -1) },
origin: { type: 'string', enum: ['combined', 'local', 'remote'], default: 'local' }, origin: { type: 'string', enum: ['combined', 'local', 'remote'], default: 'local' },
@ -57,7 +59,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.driveFilesRepository.createQueryBuilder('file'), ps.sinceId, ps.untilId); const query = this.queryService.makePaginationQuery(this.driveFilesRepository.createQueryBuilder('file'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate);
if (ps.userId) { if (ps.userId) {
query.andWhere('file.userId = :userId', { userId: ps.userId }); query.andWhere('file.userId = :userId', { userId: ps.userId });

View File

@ -74,6 +74,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: [], required: [],
} as const; } as const;
@ -89,7 +91,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private emojiEntityService: EmojiEntityService, private emojiEntityService: EmojiEntityService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const q = this.queryService.makePaginationQuery(this.emojisRepository.createQueryBuilder('emoji'), ps.sinceId, ps.untilId); const q = this.queryService.makePaginationQuery(this.emojisRepository.createQueryBuilder('emoji'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate);
if (ps.host == null) { if (ps.host == null) {
q.andWhere('emoji.host IS NOT NULL'); q.andWhere('emoji.host IS NOT NULL');

View File

@ -68,6 +68,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: [], required: [],
} as const; } as const;
@ -82,7 +84,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const q = this.queryService.makePaginationQuery(this.emojisRepository.createQueryBuilder('emoji'), ps.sinceId, ps.untilId) const q = this.queryService.makePaginationQuery(this.emojisRepository.createQueryBuilder('emoji'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('emoji.host IS NULL'); .andWhere('emoji.host IS NULL');
let emojis: MiEmoji[]; let emojis: MiEmoji[];

View File

@ -49,6 +49,8 @@ export const paramDef = {
roleId: { type: 'string', format: 'misskey:id' }, roleId: { type: 'string', format: 'misskey:id' },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
}, },
required: ['roleId'], required: ['roleId'],
@ -76,7 +78,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
throw new ApiError(meta.errors.noSuchRole); throw new ApiError(meta.errors.noSuchRole);
} }
const query = this.queryService.makePaginationQuery(this.roleAssignmentsRepository.createQueryBuilder('assign'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.roleAssignmentsRepository.createQueryBuilder('assign'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('assign.roleId = :roleId', { roleId: role.id }) .andWhere('assign.roleId = :roleId', { roleId: role.id })
.andWhere(new Brackets(qb => { .andWhere(new Brackets(qb => {
qb qb

View File

@ -63,6 +63,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
type: { type: 'string', nullable: true }, type: { type: 'string', nullable: true },
userId: { type: 'string', format: 'misskey:id', nullable: true }, userId: { type: 'string', format: 'misskey:id', nullable: true },
}, },
@ -79,7 +81,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.moderationLogsRepository.createQueryBuilder('report'), ps.sinceId, ps.untilId); const query = this.queryService.makePaginationQuery(this.moderationLogsRepository.createQueryBuilder('report'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate);
if (ps.type != null) { if (ps.type != null) {
query.andWhere('report.type = :type', { type: ps.type }); query.andWhere('report.type = :type', { type: ps.type });

View File

@ -33,6 +33,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
isActive: { type: 'boolean', default: true }, isActive: { type: 'boolean', default: true },
}, },
required: [], required: [],
@ -48,7 +50,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private announcementEntityService: AnnouncementEntityService, private announcementEntityService: AnnouncementEntityService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.announcementsRepository.createQueryBuilder('announcement'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.announcementsRepository.createQueryBuilder('announcement'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('announcement.isActive = :isActive', { isActive: ps.isActive }) .andWhere('announcement.isActive = :isActive', { isActive: ps.isActive })
.andWhere(new Brackets(qb => { .andWhere(new Brackets(qb => {
if (me) qb.orWhere('announcement.userId = :meId', { meId: me.id }); if (me) qb.orWhere('announcement.userId = :meId', { meId: me.id });

View File

@ -34,6 +34,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: [], required: [],
} as const; } as const;
@ -48,7 +50,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.blockingsRepository.createQueryBuilder('blocking'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.blockingsRepository.createQueryBuilder('blocking'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('blocking.blockerId = :meId', { meId: me.id }); .andWhere('blocking.blockerId = :meId', { meId: me.id });
const blockings = await query const blockings = await query

View File

@ -33,6 +33,8 @@ export const paramDef = {
properties: { properties: {
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 5 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 5 },
}, },
required: [], required: [],
@ -53,8 +55,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
this.channelFollowingsRepository.createQueryBuilder(), this.channelFollowingsRepository.createQueryBuilder(),
ps.sinceId, ps.sinceId,
ps.untilId, ps.untilId,
null, ps.sinceDate,
null, ps.untilDate,
'followeeId', 'followeeId',
) )
.andWhere({ followerId: me.id }); .andWhere({ followerId: me.id });

View File

@ -33,6 +33,8 @@ export const paramDef = {
properties: { properties: {
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 5 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 5 },
}, },
required: [], required: [],
@ -48,7 +50,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.channelsRepository.createQueryBuilder('channel'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.channelsRepository.createQueryBuilder('channel'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('channel.isArchived = FALSE') .andWhere('channel.isArchived = FALSE')
.andWhere({ userId: me.id }); .andWhere({ userId: me.id });

View File

@ -35,6 +35,8 @@ export const paramDef = {
type: { type: 'string', enum: ['nameAndDescription', 'nameOnly'], default: 'nameAndDescription' }, type: { type: 'string', enum: ['nameAndDescription', 'nameOnly'], default: 'nameAndDescription' },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 5 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 5 },
}, },
required: ['query'], required: ['query'],
@ -50,7 +52,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.channelsRepository.createQueryBuilder('channel'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.channelsRepository.createQueryBuilder('channel'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('channel.isArchived = FALSE'); .andWhere('channel.isArchived = FALSE');
if (ps.query !== '') { if (ps.query !== '') {

View File

@ -9,6 +9,7 @@ import { DI } from '@/di-symbols.js';
import { ChatService } from '@/core/ChatService.js'; import { ChatService } from '@/core/ChatService.js';
import { ChatEntityService } from '@/core/entities/ChatEntityService.js'; import { ChatEntityService } from '@/core/entities/ChatEntityService.js';
import { ApiError } from '@/server/api/error.js'; import { ApiError } from '@/server/api/error.js';
import { IdService } from '@/core/IdService.js';
export const meta = { export const meta = {
tags: ['chat'], tags: ['chat'],
@ -42,6 +43,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
roomId: { type: 'string', format: 'misskey:id' }, roomId: { type: 'string', format: 'misskey:id' },
}, },
required: ['roomId'], required: ['roomId'],
@ -52,8 +55,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
constructor( constructor(
private chatEntityService: ChatEntityService, private chatEntityService: ChatEntityService,
private chatService: ChatService, private chatService: ChatService,
private idService: IdService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null);
const sinceId = ps.sinceId ?? (ps.sinceDate ? this.idService.gen(ps.sinceDate!) : null);
await this.chatService.checkChatAvailability(me.id, 'read'); await this.chatService.checkChatAvailability(me.id, 'read');
const room = await this.chatService.findRoomById(ps.roomId); const room = await this.chatService.findRoomById(ps.roomId);
@ -65,7 +72,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
throw new ApiError(meta.errors.noSuchRoom); throw new ApiError(meta.errors.noSuchRoom);
} }
const messages = await this.chatService.roomTimeline(room.id, ps.limit, ps.sinceId, ps.untilId); const messages = await this.chatService.roomTimeline(room.id, ps.limit, sinceId, untilId);
this.chatService.readRoomChatMessage(me.id, room.id); this.chatService.readRoomChatMessage(me.id, room.id);

View File

@ -10,6 +10,7 @@ import { GetterService } from '@/server/api/GetterService.js';
import { ChatService } from '@/core/ChatService.js'; import { ChatService } from '@/core/ChatService.js';
import { ChatEntityService } from '@/core/entities/ChatEntityService.js'; import { ChatEntityService } from '@/core/entities/ChatEntityService.js';
import { ApiError } from '@/server/api/error.js'; import { ApiError } from '@/server/api/error.js';
import { IdService } from '@/core/IdService.js';
export const meta = { export const meta = {
tags: ['chat'], tags: ['chat'],
@ -43,6 +44,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
userId: { type: 'string', format: 'misskey:id' }, userId: { type: 'string', format: 'misskey:id' },
}, },
required: ['userId'], required: ['userId'],
@ -54,8 +57,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private chatEntityService: ChatEntityService, private chatEntityService: ChatEntityService,
private chatService: ChatService, private chatService: ChatService,
private getterService: GetterService, private getterService: GetterService,
private idService: IdService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null);
const sinceId = ps.sinceId ?? (ps.sinceDate ? this.idService.gen(ps.sinceDate!) : null);
await this.chatService.checkChatAvailability(me.id, 'read'); await this.chatService.checkChatAvailability(me.id, 'read');
const other = await this.getterService.getUser(ps.userId).catch(err => { const other = await this.getterService.getUser(ps.userId).catch(err => {
@ -63,7 +70,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
throw err; throw err;
}); });
const messages = await this.chatService.userTimeline(me.id, other.id, ps.limit, ps.sinceId, ps.untilId); const messages = await this.chatService.userTimeline(me.id, other.id, ps.limit, sinceId, untilId);
this.chatService.readUserChatMessage(me.id, other.id); this.chatService.readUserChatMessage(me.id, other.id);

View File

@ -9,6 +9,7 @@ import { DI } from '@/di-symbols.js';
import { ChatService } from '@/core/ChatService.js'; import { ChatService } from '@/core/ChatService.js';
import { ChatEntityService } from '@/core/entities/ChatEntityService.js'; import { ChatEntityService } from '@/core/entities/ChatEntityService.js';
import { ApiError } from '@/server/api/error.js'; import { ApiError } from '@/server/api/error.js';
import { IdService } from '@/core/IdService.js';
export const meta = { export const meta = {
tags: ['chat'], tags: ['chat'],
@ -37,6 +38,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
} as const; } as const;
@ -45,11 +48,15 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
constructor( constructor(
private chatEntityService: ChatEntityService, private chatEntityService: ChatEntityService,
private chatService: ChatService, private chatService: ChatService,
private idService: IdService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null);
const sinceId = ps.sinceId ?? (ps.sinceDate ? this.idService.gen(ps.sinceDate!) : null);
await this.chatService.checkChatAvailability(me.id, 'read'); await this.chatService.checkChatAvailability(me.id, 'read');
const invitations = await this.chatService.getReceivedRoomInvitationsWithPagination(me.id, ps.limit, ps.sinceId, ps.untilId); const invitations = await this.chatService.getReceivedRoomInvitationsWithPagination(me.id, ps.limit, sinceId, untilId);
return this.chatEntityService.packRoomInvitations(invitations, me); return this.chatEntityService.packRoomInvitations(invitations, me);
}); });
} }

View File

@ -10,6 +10,7 @@ import { DI } from '@/di-symbols.js';
import { ApiError } from '@/server/api/error.js'; import { ApiError } from '@/server/api/error.js';
import { ChatService } from '@/core/ChatService.js'; import { ChatService } from '@/core/ChatService.js';
import { ChatEntityService } from '@/core/entities/ChatEntityService.js'; import { ChatEntityService } from '@/core/entities/ChatEntityService.js';
import { IdService } from '@/core/IdService.js';
export const meta = { export const meta = {
tags: ['chat'], tags: ['chat'],
@ -44,6 +45,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: ['roomId'], required: ['roomId'],
} as const; } as const;
@ -53,8 +56,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
constructor( constructor(
private chatService: ChatService, private chatService: ChatService,
private chatEntityService: ChatEntityService, private chatEntityService: ChatEntityService,
private idService: IdService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null);
const sinceId = ps.sinceId ?? (ps.sinceDate ? this.idService.gen(ps.sinceDate!) : null);
await this.chatService.checkChatAvailability(me.id, 'read'); await this.chatService.checkChatAvailability(me.id, 'read');
const room = await this.chatService.findMyRoomById(me.id, ps.roomId); const room = await this.chatService.findMyRoomById(me.id, ps.roomId);
@ -62,7 +69,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
throw new ApiError(meta.errors.noSuchRoom); throw new ApiError(meta.errors.noSuchRoom);
} }
const invitations = await this.chatService.getSentRoomInvitationsWithPagination(ps.roomId, ps.limit, ps.sinceId, ps.untilId); const invitations = await this.chatService.getSentRoomInvitationsWithPagination(ps.roomId, ps.limit, sinceId, untilId);
return this.chatEntityService.packRoomInvitations(invitations, me); return this.chatEntityService.packRoomInvitations(invitations, me);
}); });
} }

View File

@ -9,6 +9,7 @@ import { DI } from '@/di-symbols.js';
import { ChatService } from '@/core/ChatService.js'; import { ChatService } from '@/core/ChatService.js';
import { ChatEntityService } from '@/core/entities/ChatEntityService.js'; import { ChatEntityService } from '@/core/entities/ChatEntityService.js';
import { ApiError } from '@/server/api/error.js'; import { ApiError } from '@/server/api/error.js';
import { IdService } from '@/core/IdService.js';
export const meta = { export const meta = {
tags: ['chat'], tags: ['chat'],
@ -37,6 +38,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
} as const; } as const;
@ -45,11 +48,15 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
constructor( constructor(
private chatService: ChatService, private chatService: ChatService,
private chatEntityService: ChatEntityService, private chatEntityService: ChatEntityService,
private idService: IdService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null);
const sinceId = ps.sinceId ?? (ps.sinceDate ? this.idService.gen(ps.sinceDate!) : null);
await this.chatService.checkChatAvailability(me.id, 'read'); await this.chatService.checkChatAvailability(me.id, 'read');
const memberships = await this.chatService.getMyMemberships(me.id, ps.limit, ps.sinceId, ps.untilId); const memberships = await this.chatService.getMyMemberships(me.id, ps.limit, sinceId, untilId);
return this.chatEntityService.packRoomMemberships(memberships, me, { return this.chatEntityService.packRoomMemberships(memberships, me, {
populateUser: false, populateUser: false,

View File

@ -9,6 +9,7 @@ import { DI } from '@/di-symbols.js';
import { ChatService } from '@/core/ChatService.js'; import { ChatService } from '@/core/ChatService.js';
import { ApiError } from '@/server/api/error.js'; import { ApiError } from '@/server/api/error.js';
import { ChatEntityService } from '@/core/entities/ChatEntityService.js'; import { ChatEntityService } from '@/core/entities/ChatEntityService.js';
import { IdService } from '@/core/IdService.js';
export const meta = { export const meta = {
tags: ['chat'], tags: ['chat'],
@ -43,6 +44,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: ['roomId'], required: ['roomId'],
} as const; } as const;
@ -52,8 +55,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
constructor( constructor(
private chatService: ChatService, private chatService: ChatService,
private chatEntityService: ChatEntityService, private chatEntityService: ChatEntityService,
private idService: IdService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null);
const sinceId = ps.sinceId ?? (ps.sinceDate ? this.idService.gen(ps.sinceDate!) : null);
await this.chatService.checkChatAvailability(me.id, 'read'); await this.chatService.checkChatAvailability(me.id, 'read');
const room = await this.chatService.findRoomById(ps.roomId); const room = await this.chatService.findRoomById(ps.roomId);
@ -65,7 +72,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
throw new ApiError(meta.errors.noSuchRoom); throw new ApiError(meta.errors.noSuchRoom);
} }
const memberships = await this.chatService.getRoomMembershipsWithPagination(room.id, ps.limit, ps.sinceId, ps.untilId); const memberships = await this.chatService.getRoomMembershipsWithPagination(room.id, ps.limit, sinceId, untilId);
return this.chatEntityService.packRoomMemberships(memberships, me, { return this.chatEntityService.packRoomMemberships(memberships, me, {
populateUser: true, populateUser: true,

View File

@ -9,6 +9,7 @@ import { DI } from '@/di-symbols.js';
import { ChatService } from '@/core/ChatService.js'; import { ChatService } from '@/core/ChatService.js';
import { ChatEntityService } from '@/core/entities/ChatEntityService.js'; import { ChatEntityService } from '@/core/entities/ChatEntityService.js';
import { ApiError } from '@/server/api/error.js'; import { ApiError } from '@/server/api/error.js';
import { IdService } from '@/core/IdService.js';
export const meta = { export const meta = {
tags: ['chat'], tags: ['chat'],
@ -37,6 +38,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
} as const; } as const;
@ -45,11 +48,15 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
constructor( constructor(
private chatEntityService: ChatEntityService, private chatEntityService: ChatEntityService,
private chatService: ChatService, private chatService: ChatService,
private idService: IdService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : null);
const sinceId = ps.sinceId ?? (ps.sinceDate ? this.idService.gen(ps.sinceDate!) : null);
await this.chatService.checkChatAvailability(me.id, 'read'); await this.chatService.checkChatAvailability(me.id, 'read');
const rooms = await this.chatService.getOwnedRoomsWithPagination(me.id, ps.limit, ps.sinceId, ps.untilId); const rooms = await this.chatService.getOwnedRoomsWithPagination(me.id, ps.limit, sinceId, untilId);
return this.chatEntityService.packRooms(rooms, me); return this.chatEntityService.packRooms(rooms, me);
}); });
} }

View File

@ -44,6 +44,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: ['clipId'], required: ['clipId'],
} as const; } as const;
@ -76,7 +78,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
throw new ApiError(meta.errors.noSuchClip); throw new ApiError(meta.errors.noSuchClip);
} }
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.innerJoin(this.clipNotesRepository.metadata.targetName, 'clipNote', 'clipNote.noteId = note.id') .innerJoin(this.clipNotesRepository.metadata.targetName, 'clipNote', 'clipNote.noteId = note.id')
.innerJoinAndSelect('note.user', 'user') .innerJoinAndSelect('note.user', 'user')
.leftJoinAndSelect('note.reply', 'reply') .leftJoinAndSelect('note.reply', 'reply')

View File

@ -34,6 +34,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
folderId: { type: 'string', format: 'misskey:id', nullable: true, default: null }, folderId: { type: 'string', format: 'misskey:id', nullable: true, default: null },
type: { type: 'string', nullable: true, pattern: /^[a-zA-Z\/\-*]+$/.toString().slice(1, -1) }, type: { type: 'string', nullable: true, pattern: /^[a-zA-Z\/\-*]+$/.toString().slice(1, -1) },
sort: { type: 'string', nullable: true, enum: ['+createdAt', '-createdAt', '+name', '-name', '+size', '-size', null] }, sort: { type: 'string', nullable: true, enum: ['+createdAt', '-createdAt', '+name', '-name', '+size', '-size', null] },
@ -51,7 +53,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.driveFilesRepository.createQueryBuilder('file'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.driveFilesRepository.createQueryBuilder('file'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('file.userId = :userId', { userId: me.id }); .andWhere('file.userId = :userId', { userId: me.id });
if (ps.folderId) { if (ps.folderId) {

View File

@ -9,8 +9,8 @@ import type { NotesRepository, DriveFilesRepository } from '@/models/_.js';
import { QueryService } from '@/core/QueryService.js'; import { QueryService } from '@/core/QueryService.js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
import { DI } from '@/di-symbols.js'; import { DI } from '@/di-symbols.js';
import { ApiError } from '../../../error.js';
import { RoleService } from '@/core/RoleService.js'; import { RoleService } from '@/core/RoleService.js';
import { ApiError } from '../../../error.js';
export const meta = { export const meta = {
tags: ['drive', 'notes'], tags: ['drive', 'notes'],
@ -45,6 +45,8 @@ export const paramDef = {
properties: { properties: {
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
fileId: { type: 'string', format: 'misskey:id' }, fileId: { type: 'string', format: 'misskey:id' },
}, },
@ -75,7 +77,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
throw new ApiError(meta.errors.noSuchFile); throw new ApiError(meta.errors.noSuchFile);
} }
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId); const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate);
query.andWhere(':file <@ note.fileIds', { file: [file.id] }); query.andWhere(':file <@ note.fileIds', { file: [file.id] });
const notes = await query.limit(ps.limit).getMany(); const notes = await query.limit(ps.limit).getMany();

View File

@ -34,6 +34,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
folderId: { type: 'string', format: 'misskey:id', nullable: true, default: null }, folderId: { type: 'string', format: 'misskey:id', nullable: true, default: null },
}, },
required: [], required: [],
@ -49,7 +51,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.driveFoldersRepository.createQueryBuilder('folder'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.driveFoldersRepository.createQueryBuilder('folder'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('folder.userId = :userId', { userId: me.id }); .andWhere('folder.userId = :userId', { userId: me.id });
if (ps.folderId) { if (ps.folderId) {

View File

@ -34,6 +34,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
type: { type: 'string', pattern: /^[a-zA-Z\/\-*]+$/.toString().slice(1, -1) }, type: { type: 'string', pattern: /^[a-zA-Z\/\-*]+$/.toString().slice(1, -1) },
}, },
required: [], required: [],
@ -49,7 +51,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.driveFilesRepository.createQueryBuilder('file'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.driveFilesRepository.createQueryBuilder('file'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('file.userId = :userId', { userId: me.id }); .andWhere('file.userId = :userId', { userId: me.id });
if (ps.type) { if (ps.type) {

View File

@ -32,6 +32,8 @@ export const paramDef = {
host: { type: 'string' }, host: { type: 'string' },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
}, },
required: ['host'], required: ['host'],
@ -47,7 +49,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.followingsRepository.createQueryBuilder('following'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.followingsRepository.createQueryBuilder('following'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('following.followeeHost = :host', { host: ps.host }); .andWhere('following.followeeHost = :host', { host: ps.host });
const followings = await query const followings = await query

View File

@ -32,6 +32,8 @@ export const paramDef = {
host: { type: 'string' }, host: { type: 'string' },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
}, },
required: ['host'], required: ['host'],
@ -47,7 +49,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.followingsRepository.createQueryBuilder('following'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.followingsRepository.createQueryBuilder('following'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('following.followerHost = :host', { host: ps.host }); .andWhere('following.followerHost = :host', { host: ps.host });
const followings = await query const followings = await query

View File

@ -32,6 +32,8 @@ export const paramDef = {
host: { type: 'string' }, host: { type: 'string' },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
}, },
required: ['host'], required: ['host'],
@ -47,7 +49,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.usersRepository.createQueryBuilder('user'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.usersRepository.createQueryBuilder('user'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('user.host = :host', { host: ps.host }); .andWhere('user.host = :host', { host: ps.host });
const users = await query const users = await query

View File

@ -44,6 +44,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: [], required: [],
} as const; } as const;
@ -58,7 +60,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.flashLikesRepository.createQueryBuilder('like'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.flashLikesRepository.createQueryBuilder('like'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('like.userId = :meId', { meId: me.id }) .andWhere('like.userId = :meId', { meId: me.id })
.leftJoinAndSelect('like.flash', 'flash'); .leftJoinAndSelect('like.flash', 'flash');

View File

@ -34,6 +34,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: [], required: [],
} as const; } as const;
@ -48,7 +50,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.flashsRepository.createQueryBuilder('flash'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.flashsRepository.createQueryBuilder('flash'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('flash.userId = :meId', { meId: me.id }); .andWhere('flash.userId = :meId', { meId: me.id });
const flashs = await query const flashs = await query

View File

@ -49,6 +49,8 @@ export const paramDef = {
properties: { properties: {
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
}, },
required: [], required: [],
@ -64,7 +66,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.followRequestsRepository.createQueryBuilder('request'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.followRequestsRepository.createQueryBuilder('request'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('request.followeeId = :meId', { meId: me.id }); .andWhere('request.followeeId = :meId', { meId: me.id });
const requests = await query const requests = await query

View File

@ -49,6 +49,8 @@ export const paramDef = {
properties: { properties: {
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
}, },
required: [], required: [],
@ -64,7 +66,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.followRequestsRepository.createQueryBuilder('request'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.followRequestsRepository.createQueryBuilder('request'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('request.followerId = :meId', { meId: me.id }); .andWhere('request.followerId = :meId', { meId: me.id });
const requests = await query const requests = await query

View File

@ -30,6 +30,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: [], required: [],
} as const; } as const;
@ -44,7 +46,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.galleryPostsRepository.createQueryBuilder('post'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.galleryPostsRepository.createQueryBuilder('post'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.innerJoinAndSelect('post.user', 'user'); .innerJoinAndSelect('post.user', 'user');
const posts = await query.limit(ps.limit).getMany(); const posts = await query.limit(ps.limit).getMany();

View File

@ -34,6 +34,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: [], required: [],
} as const; } as const;
@ -48,7 +50,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.noteFavoritesRepository.createQueryBuilder('favorite'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.noteFavoritesRepository.createQueryBuilder('favorite'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('favorite.userId = :meId', { meId: me.id }) .andWhere('favorite.userId = :meId', { meId: me.id })
.leftJoinAndSelect('favorite.note', 'note'); .leftJoinAndSelect('favorite.note', 'note');

View File

@ -45,6 +45,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: [], required: [],
} as const; } as const;
@ -59,7 +61,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.galleryLikesRepository.createQueryBuilder('like'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.galleryLikesRepository.createQueryBuilder('like'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('like.userId = :meId', { meId: me.id }) .andWhere('like.userId = :meId', { meId: me.id })
.leftJoinAndSelect('like.post', 'post'); .leftJoinAndSelect('like.post', 'post');

View File

@ -34,6 +34,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: [], required: [],
} as const; } as const;
@ -48,7 +50,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.galleryPostsRepository.createQueryBuilder('post'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.galleryPostsRepository.createQueryBuilder('post'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('post.userId = :meId', { meId: me.id }); .andWhere('post.userId = :meId', { meId: me.id });
const posts = await query const posts = await query

View File

@ -49,6 +49,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
markAsRead: { type: 'boolean', default: true }, markAsRead: { type: 'boolean', default: true },
// 後方互換のため、廃止された通知タイプも受け付ける // 後方互換のため、廃止された通知タイプも受け付ける
includeTypes: { type: 'array', items: { includeTypes: { type: 'array', items: {
@ -64,15 +66,14 @@ export const paramDef = {
@Injectable() @Injectable()
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
constructor( constructor(
@Inject(DI.redis)
private redisClient: Redis.Redis,
private idService: IdService, private idService: IdService,
private notificationEntityService: NotificationEntityService, private notificationEntityService: NotificationEntityService,
private notificationService: NotificationService, private notificationService: NotificationService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const EXTRA_LIMIT = 100; const EXTRA_LIMIT = 100;
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : undefined);
const sinceId = ps.sinceId ?? (ps.sinceDate ? this.idService.gen(ps.sinceDate!) : undefined);
// includeTypes が空の場合はクエリしない // includeTypes が空の場合はクエリしない
if (ps.includeTypes && ps.includeTypes.length === 0) { if (ps.includeTypes && ps.includeTypes.length === 0) {
@ -87,8 +88,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const excludeTypes = ps.excludeTypes && ps.excludeTypes.filter(type => !(obsoleteNotificationTypes).includes(type as any)) as typeof groupedNotificationTypes[number][]; const excludeTypes = ps.excludeTypes && ps.excludeTypes.filter(type => !(obsoleteNotificationTypes).includes(type as any)) as typeof groupedNotificationTypes[number][];
const notifications = await this.notificationService.getNotifications(me.id, { const notifications = await this.notificationService.getNotifications(me.id, {
sinceId: ps.sinceId, sinceId: sinceId,
untilId: ps.untilId, untilId: untilId,
limit: ps.limit, limit: ps.limit,
includeTypes, includeTypes,
excludeTypes, excludeTypes,

View File

@ -44,6 +44,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
markAsRead: { type: 'boolean', default: true }, markAsRead: { type: 'boolean', default: true },
// 後方互換のため、廃止された通知タイプも受け付ける // 後方互換のため、廃止された通知タイプも受け付ける
includeTypes: { type: 'array', items: { includeTypes: { type: 'array', items: {
@ -59,17 +61,14 @@ export const paramDef = {
@Injectable() @Injectable()
export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-disable-line import/no-default-export
constructor( constructor(
@Inject(DI.redis)
private redisClient: Redis.Redis,
@Inject(DI.notesRepository)
private notesRepository: NotesRepository,
private idService: IdService, private idService: IdService,
private notificationEntityService: NotificationEntityService, private notificationEntityService: NotificationEntityService,
private notificationService: NotificationService, private notificationService: NotificationService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : undefined);
const sinceId = ps.sinceId ?? (ps.sinceDate ? this.idService.gen(ps.sinceDate!) : undefined);
// includeTypes が空の場合はクエリしない // includeTypes が空の場合はクエリしない
if (ps.includeTypes && ps.includeTypes.length === 0) { if (ps.includeTypes && ps.includeTypes.length === 0) {
return []; return [];
@ -83,8 +82,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
const excludeTypes = ps.excludeTypes && ps.excludeTypes.filter(type => !(obsoleteNotificationTypes).includes(type as any)) as typeof notificationTypes[number][]; const excludeTypes = ps.excludeTypes && ps.excludeTypes.filter(type => !(obsoleteNotificationTypes).includes(type as any)) as typeof notificationTypes[number][];
const notifications = await this.notificationService.getNotifications(me.id, { const notifications = await this.notificationService.getNotifications(me.id, {
sinceId: ps.sinceId, sinceId: sinceId,
untilId: ps.untilId, untilId: untilId,
limit: ps.limit, limit: ps.limit,
includeTypes, includeTypes,
excludeTypes, excludeTypes,

View File

@ -44,6 +44,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: [], required: [],
} as const; } as const;
@ -58,7 +60,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.pageLikesRepository.createQueryBuilder('like'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.pageLikesRepository.createQueryBuilder('like'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('like.userId = :meId', { meId: me.id }) .andWhere('like.userId = :meId', { meId: me.id })
.leftJoinAndSelect('like.page', 'page'); .leftJoinAndSelect('like.page', 'page');

View File

@ -34,6 +34,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: [], required: [],
} as const; } as const;
@ -48,7 +50,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.pagesRepository.createQueryBuilder('page'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.pagesRepository.createQueryBuilder('page'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('page.userId = :meId', { meId: me.id }); .andWhere('page.userId = :meId', { meId: me.id });
const pages = await query const pages = await query

View File

@ -31,6 +31,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: [], required: [],
} as const; } as const;
@ -45,7 +47,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.signinsRepository.createQueryBuilder('signin'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.signinsRepository.createQueryBuilder('signin'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('signin.userId = :meId', { meId: me.id }); .andWhere('signin.userId = :meId', { meId: me.id });
const history = await query.limit(ps.limit).getMany(); const history = await query.limit(ps.limit).getMany();

View File

@ -34,6 +34,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: [], required: [],
} as const; } as const;
@ -48,7 +50,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.registrationTicketsRepository.createQueryBuilder('ticket'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.registrationTicketsRepository.createQueryBuilder('ticket'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('ticket.createdById = :meId', { meId: me.id }) .andWhere('ticket.createdById = :meId', { meId: me.id })
.leftJoinAndSelect('ticket.createdBy', 'createdBy') .leftJoinAndSelect('ticket.createdBy', 'createdBy')
.leftJoinAndSelect('ticket.usedBy', 'usedBy'); .leftJoinAndSelect('ticket.usedBy', 'usedBy');

View File

@ -34,6 +34,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: [], required: [],
} as const; } as const;
@ -48,7 +50,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.mutingsRepository.createQueryBuilder('muting'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.mutingsRepository.createQueryBuilder('muting'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('muting.muterId = :meId', { meId: me.id }); .andWhere('muting.muterId = :meId', { meId: me.id });
const mutings = await query const mutings = await query

View File

@ -35,6 +35,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: [], required: [],
} as const; } as const;
@ -49,7 +51,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('note.visibility = \'public\'') .andWhere('note.visibility = \'public\'')
.andWhere('note.localOnly = FALSE') .andWhere('note.localOnly = FALSE')
.innerJoinAndSelect('note.user', 'user') .innerJoinAndSelect('note.user', 'user')

View File

@ -34,6 +34,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: ['noteId'], required: ['noteId'],
} as const; } as const;
@ -48,7 +50,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere(new Brackets(qb => { .andWhere(new Brackets(qb => {
qb qb
.where('note.replyId = :noteId', { noteId: ps.noteId }) .where('note.replyId = :noteId', { noteId: ps.noteId })

View File

@ -39,6 +39,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: [], required: [],
} as const; } as const;
@ -53,7 +55,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private noteDraftEntityService: NoteDraftEntityService, private noteDraftEntityService: NoteDraftEntityService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery<MiNoteDraft>(this.noteDraftsRepository.createQueryBuilder('drafts'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery<MiNoteDraft>(this.noteDraftsRepository.createQueryBuilder('drafts'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('drafts.userId = :meId', { meId: me.id }); .andWhere('drafts.userId = :meId', { meId: me.id });
const drafts = await query const drafts = await query

View File

@ -35,6 +35,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
visibility: { type: 'string' }, visibility: { type: 'string' },
}, },
required: [], required: [],
@ -57,7 +59,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
.select('following.followeeId') .select('following.followeeId')
.where('following.followerId = :followerId', { followerId: me.id }); .where('following.followerId = :followerId', { followerId: me.id });
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere(new Brackets(qb => { .andWhere(new Brackets(qb => {
qb // このmeIdAsListパラメータはqueryServiceのgenerateVisibilityQueryでセットされる qb // このmeIdAsListパラメータはqueryServiceのgenerateVisibilityQueryでセットされる
.where(':meIdAsList <@ note.mentions') .where(':meIdAsList <@ note.mentions')

View File

@ -47,6 +47,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: ['noteId'], required: ['noteId'],
} as const; } as const;
@ -61,7 +63,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.noteReactionsRepository.createQueryBuilder('reaction'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.noteReactionsRepository.createQueryBuilder('reaction'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('reaction.noteId = :noteId', { noteId: ps.noteId }) .andWhere('reaction.noteId = :noteId', { noteId: ps.noteId })
.leftJoinAndSelect('reaction.user', 'user') .leftJoinAndSelect('reaction.user', 'user')
.leftJoinAndSelect('reaction.note', 'note'); .leftJoinAndSelect('reaction.note', 'note');

View File

@ -43,6 +43,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: ['noteId'], required: ['noteId'],
} as const; } as const;
@ -63,7 +65,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
throw err; throw err;
}); });
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('note.renoteId = :renoteId', { renoteId: note.id }) .andWhere('note.renoteId = :renoteId', { renoteId: note.id })
.innerJoinAndSelect('note.user', 'user') .innerJoinAndSelect('note.user', 'user')
.leftJoinAndSelect('note.reply', 'reply') .leftJoinAndSelect('note.reply', 'reply')

View File

@ -32,6 +32,8 @@ export const paramDef = {
noteId: { type: 'string', format: 'misskey:id' }, noteId: { type: 'string', format: 'misskey:id' },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
}, },
required: ['noteId'], required: ['noteId'],
@ -47,7 +49,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('note.replyId = :replyId', { replyId: ps.noteId }) .andWhere('note.replyId = :replyId', { replyId: ps.noteId })
.innerJoinAndSelect('note.user', 'user') .innerJoinAndSelect('note.user', 'user')
.leftJoinAndSelect('note.reply', 'reply') .leftJoinAndSelect('note.reply', 'reply')

View File

@ -72,6 +72,8 @@ export const paramDef = {
poll: { type: 'boolean', nullable: true, default: null }, poll: { type: 'boolean', nullable: true, default: null },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
}, },
}, },
@ -88,7 +90,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.innerJoinAndSelect('note.user', 'user') .innerJoinAndSelect('note.user', 'user')
.leftJoinAndSelect('note.reply', 'reply') .leftJoinAndSelect('note.reply', 'reply')
.leftJoinAndSelect('note.renote', 'renote') .leftJoinAndSelect('note.renote', 'renote')

View File

@ -8,6 +8,7 @@ import { Endpoint } from '@/server/api/endpoint-base.js';
import { SearchService } from '@/core/SearchService.js'; import { SearchService } from '@/core/SearchService.js';
import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; import { NoteEntityService } from '@/core/entities/NoteEntityService.js';
import { RoleService } from '@/core/RoleService.js'; import { RoleService } from '@/core/RoleService.js';
import { IdService } from '@/core/IdService.js';
import { ApiError } from '../../error.js'; import { ApiError } from '../../error.js';
export const meta = { export const meta = {
@ -40,6 +41,8 @@ export const paramDef = {
query: { type: 'string' }, query: { type: 'string' },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
offset: { type: 'integer', default: 0 }, offset: { type: 'integer', default: 0 },
host: { host: {
@ -60,8 +63,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private noteEntityService: NoteEntityService, private noteEntityService: NoteEntityService,
private searchService: SearchService, private searchService: SearchService,
private roleService: RoleService, private roleService: RoleService,
private idService: IdService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : undefined);
const sinceId = ps.sinceId ?? (ps.sinceDate ? this.idService.gen(ps.sinceDate!) : undefined);
const policies = await this.roleService.getUserPolicies(me ? me.id : null); const policies = await this.roleService.getUserPolicies(me ? me.id : null);
if (!policies.canSearchNotes) { if (!policies.canSearchNotes) {
throw new ApiError(meta.errors.unavailable); throw new ApiError(meta.errors.unavailable);
@ -72,8 +79,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
channelId: ps.channelId, channelId: ps.channelId,
host: ps.host, host: ps.host,
}, { }, {
untilId: ps.untilId, untilId: untilId,
sinceId: ps.sinceId, sinceId: sinceId,
limit: ps.limit, limit: ps.limit,
}); });

View File

@ -34,6 +34,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: [], required: [],
} as const; } as const;
@ -48,7 +50,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.renoteMutingsRepository.createQueryBuilder('muting'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.renoteMutingsRepository.createQueryBuilder('muting'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('muting.muterId = :meId', { meId: me.id }); .andWhere('muting.muterId = :meId', { meId: me.id });
const mutings = await query const mutings = await query

View File

@ -27,6 +27,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
my: { type: 'boolean', default: false }, my: { type: 'boolean', default: false },
}, },
required: [], required: [],
@ -42,7 +44,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.reversiGamesRepository.createQueryBuilder('game'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.reversiGamesRepository.createQueryBuilder('game'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.innerJoinAndSelect('game.user1', 'user1') .innerJoinAndSelect('game.user1', 'user1')
.innerJoinAndSelect('game.user2', 'user2'); .innerJoinAndSelect('game.user2', 'user2');

View File

@ -51,6 +51,8 @@ export const paramDef = {
roleId: { type: 'string', format: 'misskey:id' }, roleId: { type: 'string', format: 'misskey:id' },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
}, },
required: ['roleId'], required: ['roleId'],
@ -79,7 +81,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
throw new ApiError(meta.errors.noSuchRole); throw new ApiError(meta.errors.noSuchRole);
} }
const query = this.queryService.makePaginationQuery(this.roleAssignmentsRepository.createQueryBuilder('assign'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.roleAssignmentsRepository.createQueryBuilder('assign'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('assign.roleId = :roleId', { roleId: role.id }) .andWhere('assign.roleId = :roleId', { roleId: role.id })
.andWhere(new Brackets(qb => { .andWhere(new Brackets(qb => {
qb qb

View File

@ -33,6 +33,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: ['userId'], required: ['userId'],
} as const; } as const;
@ -47,7 +49,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.clipsRepository.createQueryBuilder('clip'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.clipsRepository.createQueryBuilder('clip'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('clip.userId = :userId', { userId: ps.userId }) .andWhere('clip.userId = :userId', { userId: ps.userId })
.andWhere('clip.isPublic = true'); .andWhere('clip.isPublic = true');

View File

@ -33,11 +33,12 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: ['userId'], required: ['userId'],
} as const; } as const;
// eslint-disable-next-line import/no-default-export
@Injectable() @Injectable()
export default class extends Endpoint<typeof meta, typeof paramDef> { export default class extends Endpoint<typeof meta, typeof paramDef> {
constructor( constructor(
@ -48,7 +49,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.flashsRepository.createQueryBuilder('flash'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.flashsRepository.createQueryBuilder('flash'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('flash.userId = :userId', { userId: ps.userId }) .andWhere('flash.userId = :userId', { userId: ps.userId })
.andWhere('flash.visibility = \'public\''); .andWhere('flash.visibility = \'public\'');

View File

@ -76,6 +76,8 @@ export const paramDef = {
properties: { properties: {
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
}, },
}, },
@ -132,7 +134,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
} }
} }
const query = this.queryService.makePaginationQuery(this.followingsRepository.createQueryBuilder('following'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.followingsRepository.createQueryBuilder('following'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('following.followeeId = :userId', { userId: user.id }) .andWhere('following.followeeId = :userId', { userId: user.id })
.innerJoinAndSelect('following.follower', 'follower'); .innerJoinAndSelect('following.follower', 'follower');

View File

@ -83,6 +83,8 @@ export const paramDef = {
properties: { properties: {
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
birthday: { ...birthdaySchema, nullable: true }, birthday: { ...birthdaySchema, nullable: true },
}, },
@ -140,7 +142,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
} }
} }
const query = this.queryService.makePaginationQuery(this.followingsRepository.createQueryBuilder('following'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.followingsRepository.createQueryBuilder('following'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('following.followerId = :userId', { userId: user.id }) .andWhere('following.followerId = :userId', { userId: user.id })
.innerJoinAndSelect('following.followee', 'followee'); .innerJoinAndSelect('following.followee', 'followee');

View File

@ -33,6 +33,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: ['userId'], required: ['userId'],
} as const; } as const;
@ -47,7 +49,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.galleryPostsRepository.createQueryBuilder('post'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.galleryPostsRepository.createQueryBuilder('post'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('post.userId = :userId', { userId: ps.userId }); .andWhere('post.userId = :userId', { userId: ps.userId });
const posts = await query const posts = await query

View File

@ -64,6 +64,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 30 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: ['listId'], required: ['listId'],
} as const; } as const;
@ -94,7 +96,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
throw new ApiError(meta.errors.noSuchList); throw new ApiError(meta.errors.noSuchList);
} }
const query = this.queryService.makePaginationQuery(this.userListMembershipsRepository.createQueryBuilder('membership'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.userListMembershipsRepository.createQueryBuilder('membership'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('membership.userListId = :userListId', { userListId: userList.id }) .andWhere('membership.userListId = :userListId', { userListId: userList.id })
.innerJoinAndSelect('membership.user', 'user'); .innerJoinAndSelect('membership.user', 'user');

View File

@ -33,6 +33,8 @@ export const paramDef = {
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
}, },
required: ['userId'], required: ['userId'],
} as const; } as const;
@ -47,7 +49,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
private queryService: QueryService, private queryService: QueryService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const query = this.queryService.makePaginationQuery(this.pagesRepository.createQueryBuilder('page'), ps.sinceId, ps.untilId) const query = this.queryService.makePaginationQuery(this.pagesRepository.createQueryBuilder('page'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('page.userId = :userId', { userId: ps.userId }) .andWhere('page.userId = :userId', { userId: ps.userId })
.andWhere('page.visibility = \'public\''); .andWhere('page.visibility = \'public\'');

View File

@ -7,6 +7,7 @@ import { Injectable } from '@nestjs/common';
import { Endpoint } from '@/server/api/endpoint-base.js'; import { Endpoint } from '@/server/api/endpoint-base.js';
import { EmojiEntityService } from '@/core/entities/EmojiEntityService.js'; import { EmojiEntityService } from '@/core/entities/EmojiEntityService.js';
import { CustomEmojiService, fetchEmojisHostTypes, fetchEmojisSortKeys } from '@/core/CustomEmojiService.js'; import { CustomEmojiService, fetchEmojisHostTypes, fetchEmojisSortKeys } from '@/core/CustomEmojiService.js';
import { IdService } from '@/core/IdService.js';
export const meta = { export const meta = {
tags: ['admin'], tags: ['admin'],
@ -65,6 +66,8 @@ export const paramDef = {
}, },
sinceId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' },
sinceDate: { type: 'integer' },
untilDate: { type: 'integer' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
page: { type: 'integer' }, page: { type: 'integer' },
sortKeys: { sortKeys: {
@ -84,8 +87,12 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
constructor( constructor(
private customEmojiService: CustomEmojiService, private customEmojiService: CustomEmojiService,
private emojiEntityService: EmojiEntityService, private emojiEntityService: EmojiEntityService,
private idService: IdService,
) { ) {
super(meta, paramDef, async (ps, me) => { super(meta, paramDef, async (ps, me) => {
const untilId = ps.untilId ?? (ps.untilDate ? this.idService.gen(ps.untilDate!) : undefined);
const sinceId = ps.sinceId ?? (ps.sinceDate ? this.idService.gen(ps.sinceDate!) : undefined);
const q = ps.query; const q = ps.query;
const result = await this.customEmojiService.fetchEmojis( const result = await this.customEmojiService.fetchEmojis(
{ {
@ -105,8 +112,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
hostType: q?.hostType, hostType: q?.hostType,
roleIds: q?.roleIds, roleIds: q?.roleIds,
}, },
sinceId: ps.sinceId, sinceId: sinceId,
untilId: ps.untilId, untilId: untilId,
}, },
{ {
limit: ps.limit, limit: ps.limit,

View File

@ -7,7 +7,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<button <button
v-if="!link" v-if="!link"
ref="el" class="_button" ref="el" class="_button"
:class="[$style.root, { [$style.inline]: inline, [$style.primary]: primary, [$style.gradate]: gradate, [$style.danger]: danger, [$style.rounded]: rounded, [$style.full]: full, [$style.small]: small, [$style.large]: large, [$style.transparent]: transparent, [$style.asLike]: asLike, [$style.iconOnly]: iconOnly, [$style.wait]: wait }]" :class="[$style.root, { [$style.inline]: inline, [$style.primary]: primary, [$style.gradate]: gradate, [$style.danger]: danger, [$style.rounded]: rounded, [$style.full]: full, [$style.small]: small, [$style.large]: large, [$style.transparent]: transparent, [$style.asLike]: asLike, [$style.iconOnly]: iconOnly, [$style.wait]: wait, [$style.active]: active }]"
:type="type" :type="type"
:name="name" :name="name"
:value="value" :value="value"
@ -22,7 +22,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</button> </button>
<MkA <MkA
v-else class="_button" v-else class="_button"
:class="[$style.root, { [$style.inline]: inline, [$style.primary]: primary, [$style.gradate]: gradate, [$style.danger]: danger, [$style.rounded]: rounded, [$style.full]: full, [$style.small]: small, [$style.large]: large, [$style.transparent]: transparent, [$style.asLike]: asLike, [$style.iconOnly]: iconOnly, [$style.wait]: wait }]" :class="[$style.root, { [$style.inline]: inline, [$style.primary]: primary, [$style.gradate]: gradate, [$style.danger]: danger, [$style.rounded]: rounded, [$style.full]: full, [$style.small]: small, [$style.large]: large, [$style.transparent]: transparent, [$style.asLike]: asLike, [$style.iconOnly]: iconOnly, [$style.wait]: wait, [$style.active]: active }]"
:to="to ?? '#'" :to="to ?? '#'"
:behavior="linkBehavior" :behavior="linkBehavior"
@mousedown="onMousedown" @mousedown="onMousedown"
@ -58,6 +58,7 @@ const props = defineProps<{
value?: string; value?: string;
disabled?: boolean; disabled?: boolean;
iconOnly?: boolean; iconOnly?: boolean;
active?: boolean;
}>(); }>();
const emit = defineEmits<{ const emit = defineEmits<{
@ -252,6 +253,10 @@ function onMousedown(evt: MouseEvent): void {
} }
} }
&.active {
color: var(--MI_THEME-accent) !important;
}
&:disabled { &:disabled {
opacity: 0.5; opacity: 0.5;
} }

View File

@ -6,10 +6,24 @@ SPDX-License-Identifier: AGPL-3.0-only
<template> <template>
<component :is="prefer.s.enablePullToRefresh && pullToRefresh ? MkPullToRefresh : 'div'" :refresher="() => paginator.reload()" @contextmenu.prevent.stop="onContextmenu"> <component :is="prefer.s.enablePullToRefresh && pullToRefresh ? MkPullToRefresh : 'div'" :refresher="() => paginator.reload()" @contextmenu.prevent.stop="onContextmenu">
<div> <div>
<div v-if="props.withControl" :class="$style.control"> <div v-if="props.withControl" :class="$style.controls">
<MkSelect v-model="order" :class="$style.order" :items="[{ label: i18n.ts._order.newest, value: 'newest' }, { label: i18n.ts._order.oldest, value: 'oldest' }]"> <div :class="$style.control">
</MkSelect> <MkSelect v-model="order" :class="$style.order" :items="[{ label: i18n.ts._order.newest, value: 'newest' }, { label: i18n.ts._order.oldest, value: 'oldest' }]">
<MkButton iconOnly @click="paginator.reload()"><i class="ti ti-refresh"></i></MkButton> <template #prefix><i class="ti ti-arrows-sort"></i></template>
</MkSelect>
<!-- TODO -->
<!-- <MkButton v-tooltip="i18n.ts.search" iconOnly transparent rounded @click="setSearchQuery"><i class="ti ti-search"></i></MkButton> -->
<MkButton v-tooltip="i18n.ts.dateAndTime" iconOnly transparent rounded :active="date != null" @click="date = date == null ? Date.now() : null"><i class="ti ti-calendar-clock"></i></MkButton>
<MkButton v-tooltip="i18n.ts.reload" iconOnly transparent rounded @click="paginator.reload()"><i class="ti ti-refresh"></i></MkButton>
</div>
<MkInput
v-if="date != null"
type="date"
:modelValue="formatDateTimeString(new Date(date), 'yyyy-MM-dd')"
@update:modelValue="date = new Date($event).getTime()"
>
</MkInput>
</div> </div>
<!-- :css="prefer.s.animation" にしたいけどバグる(おそらくvueのバグ) https://github.com/misskey-dev/misskey/issues/16078 --> <!-- :css="prefer.s.animation" にしたいけどバグる(おそらくvueのバグ) https://github.com/misskey-dev/misskey/issues/16078 -->
@ -59,7 +73,9 @@ import { prefer } from '@/preferences.js';
import { usePagination } from '@/composables/use-pagination.js'; import { usePagination } from '@/composables/use-pagination.js';
import MkPullToRefresh from '@/components/MkPullToRefresh.vue'; import MkPullToRefresh from '@/components/MkPullToRefresh.vue';
import MkSelect from '@/components/MkSelect.vue'; import MkSelect from '@/components/MkSelect.vue';
import MkInput from '@/components/MkInput.vue';
import * as os from '@/os.js'; import * as os from '@/os.js';
import { formatDateTimeString } from '@/utility/format-time-string.js';
type Paginator = ReturnType<typeof usePagination<T['endpoint']>>; type Paginator = ReturnType<typeof usePagination<T['endpoint']>>;
@ -76,16 +92,18 @@ const props = withDefaults(defineProps<{
}); });
const order = ref<'newest' | 'oldest'>(props.pagination.order ?? 'newest'); const order = ref<'newest' | 'oldest'>(props.pagination.order ?? 'newest');
const date = ref<number | null>(null);
const paginator: Paginator = usePagination({ const paginator: Paginator = usePagination({
ctx: props.pagination, ctx: props.pagination,
}); });
watch(order, (newOrder) => { watch([order, date], () => {
paginator.updateCtx({ paginator.updateCtx({
...props.pagination, ...props.pagination,
order: newOrder, order: order.value,
initialDirection: newOrder === 'oldest' ? 'newer' : 'older', initialDirection: order.value === 'oldest' ? 'newer' : 'older',
initialDate: date.value,
}); });
}, { immediate: false }); }, { immediate: false });
@ -123,15 +141,22 @@ defineExpose({
opacity: 0; opacity: 0;
} }
.controls {
display: flex;
flex-direction: column;
gap: 8px;
margin-bottom: 10px;
}
.control { .control {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 10px; gap: 4px;
} }
.order { .order {
flex: 1; flex: 1;
margin-right: 8px; margin-right: 6px;
} }
.more { .more {

View File

@ -34,6 +34,7 @@ export type PagingCtx<E extends keyof Misskey.Endpoints = keyof Misskey.Endpoint
offsetMode?: boolean; offsetMode?: boolean;
initialId?: MisskeyEntity['id']; initialId?: MisskeyEntity['id'];
initialDate?: number | null;
initialDirection?: 'newer' | 'older'; initialDirection?: 'newer' | 'older';
// 配列内の要素をどのような順序で並べるか // 配列内の要素をどのような順序で並べるか
@ -89,14 +90,18 @@ export function usePagination<Endpoint extends keyof Misskey.Endpoints, T extend
...params, ...params,
limit: props.ctx.limit ?? FIRST_FETCH_LIMIT, limit: props.ctx.limit ?? FIRST_FETCH_LIMIT,
allowPartial: true, allowPartial: true,
...(props.ctx.initialDirection === 'newer' ? { ...((props.ctx.initialId == null && props.ctx.initialDate == null) && props.ctx.initialDirection === 'newer' ? {
sinceId: props.ctx.initialId ?? '0', sinceId: '0',
} : props.ctx.initialId && props.ctx.initialDirection === 'older' ? { } : props.ctx.initialDirection === 'newer' ? {
sinceId: props.ctx.initialId,
sinceDate: props.ctx.initialDate,
} : (props.ctx.initialId || props.ctx.initialDate) && props.ctx.initialDirection === 'older' ? {
untilId: props.ctx.initialId, untilId: props.ctx.initialId,
untilDate: props.ctx.initialDate,
} : {}), } : {}),
}).then(res => { }).then(res => {
// 逆順で返ってくるので // 逆順で返ってくるので
if (props.ctx.initialId && props.ctx.initialDirection === 'newer') { if ((props.ctx.initialId || props.ctx.initialDate) && props.ctx.initialDirection === 'newer') {
res.reverse(); res.reverse();
} }

View File

@ -5873,6 +5873,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default null */ /** @default null */
state?: string | null; state?: string | null;
/** /**
@ -6310,6 +6312,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default null */ /** @default null */
publishing?: boolean | null; publishing?: boolean | null;
}; };
@ -6618,6 +6622,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** Format: misskey:id */ /** Format: misskey:id */
userId?: string | null; userId?: string | null;
/** /**
@ -6925,6 +6931,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** Format: misskey:id */ /** Format: misskey:id */
userId?: string | null; userId?: string | null;
}; };
@ -7459,6 +7467,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** Format: misskey:id */ /** Format: misskey:id */
userId?: string | null; userId?: string | null;
type?: string | null; type?: string | null;
@ -8060,6 +8070,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -8146,6 +8158,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -11080,6 +11094,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default 10 */ /** @default 10 */
limit?: number; limit?: number;
}; };
@ -11306,6 +11322,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
type?: string | null; type?: string | null;
/** Format: misskey:id */ /** Format: misskey:id */
userId?: string | null; userId?: string | null;
@ -12755,6 +12773,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default true */ /** @default true */
isActive?: boolean; isActive?: boolean;
}; };
@ -14022,6 +14042,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -14499,6 +14521,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default 5 */ /** @default 5 */
limit?: number; limit?: number;
}; };
@ -14627,6 +14651,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default 5 */ /** @default 5 */
limit?: number; limit?: number;
}; };
@ -14703,6 +14729,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default 5 */ /** @default 5 */
limit?: number; limit?: number;
}; };
@ -16487,6 +16515,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** Format: misskey:id */ /** Format: misskey:id */
roomId: string; roomId: string;
}; };
@ -16760,6 +16790,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** Format: misskey:id */ /** Format: misskey:id */
userId: string; userId: string;
}; };
@ -17165,6 +17197,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -17237,6 +17271,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -17370,6 +17406,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -17505,6 +17543,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -17639,6 +17679,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -18229,6 +18271,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -18623,6 +18667,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** /**
* Format: misskey:id * Format: misskey:id
* @default null * @default null
@ -18699,6 +18745,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default 10 */ /** @default 10 */
limit?: number; limit?: number;
/** Format: misskey:id */ /** Format: misskey:id */
@ -19414,6 +19462,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** /**
* Format: misskey:id * Format: misskey:id
* @default null * @default null
@ -19834,6 +19884,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
type?: string; type?: string;
}; };
}; };
@ -20295,6 +20347,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default 10 */ /** @default 10 */
limit?: number; limit?: number;
}; };
@ -20366,6 +20420,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default 10 */ /** @default 10 */
limit?: number; limit?: number;
}; };
@ -20721,6 +20777,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default 10 */ /** @default 10 */
limit?: number; limit?: number;
}; };
@ -21260,6 +21318,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -21330,6 +21390,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -21964,6 +22026,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default 10 */ /** @default 10 */
limit?: number; limit?: number;
}; };
@ -22102,6 +22166,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default 10 */ /** @default 10 */
limit?: number; limit?: number;
}; };
@ -22456,6 +22522,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -24903,6 +24971,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -24973,6 +25043,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -25047,6 +25119,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -25552,6 +25626,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default true */ /** @default true */
markAsRead?: boolean; markAsRead?: boolean;
includeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'roleAssigned' | 'chatRoomInvitationReceived' | 'achievementEarned' | 'exportCompleted' | 'login' | 'createToken' | 'app' | 'test' | 'pollVote' | 'groupInvited')[]; includeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'roleAssigned' | 'chatRoomInvitationReceived' | 'achievementEarned' | 'exportCompleted' | 'login' | 'createToken' | 'app' | 'test' | 'pollVote' | 'groupInvited')[];
@ -25635,6 +25711,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default true */ /** @default true */
markAsRead?: boolean; markAsRead?: boolean;
includeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'roleAssigned' | 'chatRoomInvitationReceived' | 'achievementEarned' | 'exportCompleted' | 'login' | 'createToken' | 'app' | 'test' | 'pollVote' | 'groupInvited')[]; includeTypes?: ('note' | 'follow' | 'mention' | 'reply' | 'renote' | 'quote' | 'reaction' | 'pollEnded' | 'receiveFollowRequest' | 'followRequestAccepted' | 'roleAssigned' | 'chatRoomInvitationReceived' | 'achievementEarned' | 'exportCompleted' | 'login' | 'createToken' | 'app' | 'test' | 'pollVote' | 'groupInvited')[];
@ -25718,6 +25796,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -25792,6 +25872,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -26652,6 +26734,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -27749,6 +27833,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -28093,6 +28179,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -28237,6 +28325,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -28309,6 +28399,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -28922,6 +29014,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -29547,6 +29641,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
visibility?: string; visibility?: string;
}; };
}; };
@ -29755,6 +29851,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -29963,6 +30061,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -30033,6 +30133,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default 10 */ /** @default 10 */
limit?: number; limit?: number;
}; };
@ -30104,6 +30206,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default 10 */ /** @default 10 */
limit?: number; limit?: number;
/** @default 0 */ /** @default 0 */
@ -30204,6 +30308,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default 10 */ /** @default 10 */
limit?: number; limit?: number;
}; };
@ -32066,6 +32172,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -32454,6 +32562,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default false */ /** @default false */
my?: boolean; my?: boolean;
}; };
@ -33057,6 +33167,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default 10 */ /** @default 10 */
limit?: number; limit?: number;
}; };
@ -33853,6 +33965,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -33995,6 +34109,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -34070,6 +34186,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default 10 */ /** @default 10 */
limit?: number; limit?: number;
}; };
@ -34147,6 +34265,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default 10 */ /** @default 10 */
limit?: number; limit?: number;
birthday?: string | null; birthday?: string | null;
@ -34222,6 +34342,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -34625,6 +34747,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -35260,6 +35384,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
}; };
}; };
}; };
@ -35928,6 +36054,8 @@ export interface operations {
sinceId?: string; sinceId?: string;
/** Format: misskey:id */ /** Format: misskey:id */
untilId?: string; untilId?: string;
sinceDate?: number;
untilDate?: number;
/** @default 10 */ /** @default 10 */
limit?: number; limit?: number;
page?: number; page?: number;