From b3fb7c9271f88d8e7ddbadaa575fa06004f16fff Mon Sep 17 00:00:00 2001 From: ssmucny Date: Sun, 23 Apr 2023 15:55:22 -0400 Subject: [PATCH] Update API types --- .../api/endpoints/notes/events/search.ts | 5 ----- packages/misskey-js/src/api.types.ts | 18 +++++++++++++++++- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/notes/events/search.ts b/packages/backend/src/server/api/endpoints/notes/events/search.ts index 70a1df6475..55689b4e18 100644 --- a/packages/backend/src/server/api/endpoints/notes/events/search.ts +++ b/packages/backend/src/server/api/endpoints/notes/events/search.ts @@ -47,11 +47,6 @@ export const paramDef = { sinceId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, - host: { - type: 'string', - nullable: true, - description: 'The local host is represented with `null`.', - }, users: { type: 'array', nullable: true, items: { type: 'string', format: 'misskey:id' } }, sinceDate: { type: 'integer', nullable: true }, untilDate: { type: 'integer', nullable: true }, diff --git a/packages/misskey-js/src/api.types.ts b/packages/misskey-js/src/api.types.ts index 3ca1f3d36d..ad40528cf7 100644 --- a/packages/misskey-js/src/api.types.ts +++ b/packages/misskey-js/src/api.types.ts @@ -488,6 +488,12 @@ export type Endpoints = { expiresAt?: null | number; expiredAfter?: null | number; }; + event?: null | { + title: string; + start: number; + end?: null | number; + metadata: Record; + } }; res: { createdNote: Note }; }; 'notes/delete': { req: { noteId: Note['id']; }; res: null; }; 'notes/favorites/create': { req: { noteId: Note['id']; }; res: null; }; @@ -499,7 +505,17 @@ export type Endpoints = { 'notes/mentions': { req: { following?: boolean; limit?: number; sinceId?: Note['id']; untilId?: Note['id']; }; res: Note[]; }; 'notes/polls/recommendation': { req: TODO; res: TODO; }; 'notes/polls/vote': { req: { noteId: Note['id']; choice: number; }; res: null; }; - 'notes/events/search': { req: TODO; res: Note[]; }; + 'notes/events/search': { req: { + query?: string; + sinceId?: Note['id']; + untilId?: Note['id']; + limit?: number; + users?: User['id'][]; + sinceDate?: number; + untilDate?: number; + sortBy?: 'startDate' | 'craetedAt'; + filters?: Record; + }; res: Note[]; }; 'notes/reactions': { req: { noteId: Note['id']; type?: string | null; limit?: number; }; res: NoteReaction[]; }; 'notes/reactions/create': { req: { noteId: Note['id']; reaction: string; }; res: null; }; 'notes/reactions/delete': { req: { noteId: Note['id']; }; res: null; };