merge: Add more "detail" flags to API endpoints (!1186)

View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/1186

Approved-by: dakkar <dakkar@thenautilus.net>
Approved-by: Marie <github@yuugi.dev>
This commit is contained in:
Hazelnoot 2025-07-27 14:22:11 +00:00
commit b6c8f4f876
16 changed files with 128 additions and 50 deletions

View file

@ -2067,6 +2067,7 @@ declare namespace entities {
PagesUnlikeRequest,
PagesUpdateRequest,
PingResponse,
PinnedUsersRequest,
PinnedUsersResponse,
PromoReadRequest,
RenoteMuteCreateRequest,
@ -3411,6 +3412,9 @@ export const permissions: readonly ["read:account", "write:account", "read:block
// @public (undocumented)
type PingResponse = operations['ping']['responses']['200']['content']['application/json'];
// @public (undocumented)
type PinnedUsersRequest = operations['pinned-users']['requestBody']['content']['application/json'];
// @public (undocumented)
type PinnedUsersResponse = operations['pinned-users']['responses']['200']['content']['application/json'];

View file

@ -563,6 +563,7 @@ import type {
PagesUnlikeRequest,
PagesUpdateRequest,
PingResponse,
PinnedUsersRequest,
PinnedUsersResponse,
PromoReadRequest,
RenoteMuteCreateRequest,
@ -1044,7 +1045,7 @@ export type Endpoints = {
'pages/unlike': { req: PagesUnlikeRequest; res: EmptyResponse };
'pages/update': { req: PagesUpdateRequest; res: EmptyResponse };
'ping': { req: EmptyRequest; res: PingResponse };
'pinned-users': { req: EmptyRequest; res: PinnedUsersResponse };
'pinned-users': { req: PinnedUsersRequest; res: PinnedUsersResponse };
'promo/read': { req: PromoReadRequest; res: EmptyResponse };
'renote-mute/create': { req: RenoteMuteCreateRequest; res: EmptyResponse };
'renote-mute/delete': { req: RenoteMuteDeleteRequest; res: EmptyResponse };

View file

@ -566,6 +566,7 @@ export type PagesShowResponse = operations['pages___show']['responses']['200']['
export type PagesUnlikeRequest = operations['pages___unlike']['requestBody']['content']['application/json'];
export type PagesUpdateRequest = operations['pages___update']['requestBody']['content']['application/json'];
export type PingResponse = operations['ping']['responses']['200']['content']['application/json'];
export type PinnedUsersRequest = operations['pinned-users']['requestBody']['content']['application/json'];
export type PinnedUsersResponse = operations['pinned-users']['responses']['200']['content']['application/json'];
export type PromoReadRequest = operations['promo___read']['requestBody']['content']['application/json'];
export type RenoteMuteCreateRequest = operations['renote-mute___create']['requestBody']['content']['application/json'];

View file

@ -4254,6 +4254,10 @@ export type components = {
host: string | null;
/** Format: date-time */
createdAt: string;
/** Format: date-time */
updatedAt: string | null;
/** Format: date-time */
lastFetchedAt: string | null;
approved: boolean;
/** @example Hi masters, I am Ai! */
description: string | null;
@ -4320,10 +4324,6 @@ export type components = {
/** Format: uri */
movedTo: string | null;
alsoKnownAs: string[] | null;
/** Format: date-time */
updatedAt: string | null;
/** Format: date-time */
lastFetchedAt: string | null;
/** Format: url */
bannerUrl: string | null;
bannerBlurhash: string | null;
@ -10902,6 +10902,8 @@ export type operations = {
untilId?: string;
/** @default 10 */
limit?: number;
/** @default true */
detail?: boolean;
};
};
};
@ -10914,7 +10916,7 @@ export type operations = {
id: string;
/** Format: date-time */
createdAt: string;
user: components['schemas']['UserDetailed'];
user: components['schemas']['User'];
/** Format: date-time */
expiresAt: string | null;
})[];
@ -11410,6 +11412,8 @@ export type operations = {
* @default null
*/
hostname?: string | null;
/** @default true */
detail?: boolean;
};
};
};
@ -11417,7 +11421,7 @@ export type operations = {
/** @description OK (with results) */
200: {
content: {
'application/json': components['schemas']['UserDetailed'][];
'application/json': components['schemas']['User'][];
};
};
/** @description Client error */
@ -21857,6 +21861,8 @@ export type operations = {
origin?: 'combined' | 'local' | 'remote';
/** @default false */
trending?: boolean;
/** @default true */
detail?: boolean;
};
};
};
@ -21864,7 +21870,7 @@ export type operations = {
/** @description OK (with results) */
200: {
content: {
'application/json': components['schemas']['UserDetailed'][];
'application/json': components['schemas']['User'][];
};
};
/** @description Client error */
@ -29834,11 +29840,19 @@ export type operations = {
* **Credential required**: *No*
*/
'pinned-users': {
requestBody: {
content: {
'application/json': {
/** @default true */
detail?: boolean;
};
};
};
responses: {
/** @description OK (with results) */
200: {
content: {
'application/json': components['schemas']['UserDetailed'][];
'application/json': components['schemas']['User'][];
};
};
/** @description Client error */
@ -30966,6 +30980,8 @@ export type operations = {
untilId?: string;
/** @default 10 */
limit?: number;
/** @default true */
detail?: boolean;
};
};
};
@ -30976,7 +30992,7 @@ export type operations = {
'application/json': {
/** Format: misskey:id */
id: string;
user: components['schemas']['UserDetailed'];
user: components['schemas']['User'];
}[];
};
};
@ -31639,6 +31655,8 @@ export type operations = {
* @default null
*/
hostname?: string | null;
/** @default true */
detail?: boolean;
};
};
};
@ -31646,7 +31664,7 @@ export type operations = {
/** @description OK (with results) */
200: {
content: {
'application/json': components['schemas']['UserDetailed'][];
'application/json': components['schemas']['User'][];
};
};
/** @description Client error */
@ -32162,6 +32180,8 @@ export type operations = {
userId: string;
/** @default 10 */
limit?: number;
/** @default true */
detail?: boolean;
};
};
};
@ -32170,7 +32190,7 @@ export type operations = {
200: {
content: {
'application/json': {
user: components['schemas']['UserDetailed'];
user: components['schemas']['User'];
weight: number;
}[];
};
@ -33183,6 +33203,8 @@ export type operations = {
limit?: number;
/** @default 0 */
offset?: number;
/** @default true */
detail?: boolean;
};
};
};
@ -33190,7 +33212,7 @@ export type operations = {
/** @description OK (with results) */
200: {
content: {
'application/json': components['schemas']['UserDetailed'][];
'application/json': components['schemas']['User'][];
};
};
/** @description Client error */
@ -33525,6 +33547,8 @@ export type operations = {
username?: string;
/** @description The local host is represented with `null`. */
host?: string | null;
/** @default true */
detail?: boolean;
};
};
};
@ -33532,7 +33556,7 @@ export type operations = {
/** @description OK (with results) */
200: {
content: {
'application/json': components['schemas']['UserDetailed'] | components['schemas']['UserDetailed'][];
'application/json': components['schemas']['User'] | components['schemas']['User'][];
};
};
/** @description Client error */