Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run pnpm build-misskey-js-with-types #12972

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import { DI } from '@/di-symbols.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';

export const meta = {
tags: [],

allowGet: true,
cacheSec: 60,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import { DI } from '@/di-symbols.js';
import { ApiError } from '../../error.js';

export const meta = {
tags: [],

requireCredential: true,

kind: 'write:account',
Expand Down
16 changes: 16 additions & 0 deletions packages/misskey-js/etc/misskey-js.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,18 @@ type BlockingListRequest = operations['blocking/list']['requestBody']['content']
// @public (undocumented)
type BlockingListResponse = operations['blocking/list']['responses']['200']['content']['application/json'];

// @public (undocumented)
type BubbleGameRankingRequest = operations['bubble-game/ranking']['requestBody']['content']['application/json'];

// @public (undocumented)
type BubbleGameRankingResponse = operations['bubble-game/ranking']['responses']['200']['content']['application/json'];

// @public (undocumented)
type BubbleGameRegisterRequest = operations['bubble-game/register']['requestBody']['content']['application/json'];

// @public (undocumented)
type BubbleGameRegisterResponse = operations['bubble-game/register']['responses']['200']['content']['application/json'];

// @public (undocumented)
type Channel = components['schemas']['Channel'];

Expand Down Expand Up @@ -1607,6 +1619,10 @@ declare namespace entities {
FetchExternalResourcesRequest,
FetchExternalResourcesResponse,
RetentionResponse,
BubbleGameRegisterRequest,
BubbleGameRegisterResponse,
BubbleGameRankingRequest,
BubbleGameRankingResponse,
Error_2 as Error,
UserLite,
UserDetailedNotMeOnly,
Expand Down
24 changes: 23 additions & 1 deletion packages/misskey-js/src/autogen/apiClientJSDoc.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* version: 2023.12.2
* generatedAt: 2024-01-07T15:22:15.630Z
* generatedAt: 2024-01-11T14:29:04.817Z
*/

import type { SwitchCaseResponseType } from '../api.js';
Expand Down Expand Up @@ -3985,5 +3985,27 @@ declare module '../api.js' {
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;

/**
* No description provided.
*
* **Credential required**: *Yes* / **Permission**: *write:account*
*/
request<E extends 'bubble-game/register', P extends Endpoints[E]['req']>(
endpoint: E,
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;

/**
* No description provided.
*
* **Credential required**: *No*
*/
request<E extends 'bubble-game/ranking', P extends Endpoints[E]['req']>(
endpoint: E,
params: P,
credential?: string | null,
): Promise<SwitchCaseResponseType<E, P>>;
}
}
8 changes: 7 additions & 1 deletion packages/misskey-js/src/autogen/endpoint.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* version: 2023.12.2
* generatedAt: 2024-01-07T15:22:15.626Z
* generatedAt: 2024-01-11T14:29:04.814Z
*/

import type {
Expand Down Expand Up @@ -540,6 +540,10 @@ import type {
FetchExternalResourcesRequest,
FetchExternalResourcesResponse,
RetentionResponse,
BubbleGameRegisterRequest,
BubbleGameRegisterResponse,
BubbleGameRankingRequest,
BubbleGameRankingResponse,
} from './entities.js';

export type Endpoints = {
Expand Down Expand Up @@ -901,4 +905,6 @@ export type Endpoints = {
'fetch-rss': { req: FetchRssRequest; res: FetchRssResponse };
'fetch-external-resources': { req: FetchExternalResourcesRequest; res: FetchExternalResourcesResponse };
'retention': { req: EmptyRequest; res: RetentionResponse };
'bubble-game/register': { req: BubbleGameRegisterRequest; res: BubbleGameRegisterResponse };
'bubble-game/ranking': { req: BubbleGameRankingRequest; res: BubbleGameRankingResponse };
}
6 changes: 5 additions & 1 deletion packages/misskey-js/src/autogen/entities.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* version: 2023.12.2
* generatedAt: 2024-01-07T15:22:15.624Z
* generatedAt: 2024-01-11T14:29:04.811Z
*/

import { operations } from './types.js';
Expand Down Expand Up @@ -542,3 +542,7 @@ export type FetchRssResponse = operations['fetch-rss']['responses']['200']['cont
export type FetchExternalResourcesRequest = operations['fetch-external-resources']['requestBody']['content']['application/json'];
export type FetchExternalResourcesResponse = operations['fetch-external-resources']['responses']['200']['content']['application/json'];
export type RetentionResponse = operations['retention']['responses']['200']['content']['application/json'];
export type BubbleGameRegisterRequest = operations['bubble-game/register']['requestBody']['content']['application/json'];
export type BubbleGameRegisterResponse = operations['bubble-game/register']['responses']['200']['content']['application/json'];
export type BubbleGameRankingRequest = operations['bubble-game/ranking']['requestBody']['content']['application/json'];
export type BubbleGameRankingResponse = operations['bubble-game/ranking']['responses']['200']['content']['application/json'];
2 changes: 1 addition & 1 deletion packages/misskey-js/src/autogen/models.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* version: 2023.12.2
* generatedAt: 2024-01-07T15:22:15.623Z
* generatedAt: 2024-01-11T14:29:04.810Z
*/

import { components } from './types.js';
Expand Down
148 changes: 147 additions & 1 deletion packages/misskey-js/src/autogen/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

/*
* version: 2023.12.2
* generatedAt: 2024-01-07T15:22:15.494Z
* generatedAt: 2024-01-11T14:29:04.681Z
*/

/**
Expand Down Expand Up @@ -3447,6 +3447,31 @@ export type paths = {
*/
post: operations['retention'];
};
'/bubble-game/register': {
/**
* bubble-game/register
* @description No description provided.
*
* **Credential required**: *Yes* / **Permission**: *write:account*
*/
post: operations['bubble-game/register'];
};
'/bubble-game/ranking': {
/**
* bubble-game/ranking
* @description No description provided.
*
* **Credential required**: *No*
*/
get: operations['bubble-game/ranking'];
/**
* bubble-game/ranking
* @description No description provided.
*
* **Credential required**: *No*
*/
post: operations['bubble-game/ranking'];
};
};

export type webhooks = Record<string, never>;
Expand Down Expand Up @@ -25396,5 +25421,126 @@ export type operations = {
};
};
};
/**
* bubble-game/register
* @description No description provided.
*
* **Credential required**: *Yes* / **Permission**: *write:account*
*/
'bubble-game/register': {
requestBody: {
content: {
'application/json': {
score: number;
seed: string;
logs: unknown[];
gameMode: string;
gameVersion: number;
};
};
};
responses: {
/** @description OK (with results) */
200: {
content: {
'application/json': unknown;
};
};
/** @description Client error */
400: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Authentication error */
401: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Forbidden error */
403: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description I'm Ai */
418: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description To many requests */
429: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Internal server error */
500: {
content: {
'application/json': components['schemas']['Error'];
};
};
};
};
/**
* bubble-game/ranking
* @description No description provided.
*
* **Credential required**: *No*
*/
'bubble-game/ranking': {
requestBody: {
content: {
'application/json': {
gameMode: string;
};
};
};
responses: {
/** @description OK (with results) */
200: {
content: {
'application/json': {
/** Format: misskey:id */
id: string;
score: number;
user: components['schemas']['UserLite'];
}[];
};
};
/** @description Client error */
400: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Authentication error */
401: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Forbidden error */
403: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description I'm Ai */
418: {
content: {
'application/json': components['schemas']['Error'];
};
};
/** @description Internal server error */
500: {
content: {
'application/json': components['schemas']['Error'];
};
};
};
};
};

Loading