summaryrefslogtreecommitdiff
path: root/packages/misskey-js
diff options
context:
space:
mode:
Diffstat (limited to 'packages/misskey-js')
-rw-r--r--packages/misskey-js/LICENSE2
-rw-r--r--packages/misskey-js/build.js2
-rw-r--r--packages/misskey-js/etc/misskey-js.api.md23
-rw-r--r--packages/misskey-js/generator/package.json13
-rw-r--r--packages/misskey-js/package.json23
-rw-r--r--packages/misskey-js/src/autogen/apiClientJSDoc.ts11
-rw-r--r--packages/misskey-js/src/autogen/endpoint.ts3
-rw-r--r--packages/misskey-js/src/autogen/entities.ts2
-rw-r--r--packages/misskey-js/src/autogen/models.ts1
-rw-r--r--packages/misskey-js/src/autogen/types.ts176
-rw-r--r--packages/misskey-js/src/consts.ts1
-rw-r--r--packages/misskey-js/src/streaming.types.ts12
12 files changed, 216 insertions, 53 deletions
diff --git a/packages/misskey-js/LICENSE b/packages/misskey-js/LICENSE
index 16352625db..d666d5ef7f 100644
--- a/packages/misskey-js/LICENSE
+++ b/packages/misskey-js/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2021-2025 syuilo and other contributors
+Copyright (c) 2021-2026 syuilo and other contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/packages/misskey-js/build.js b/packages/misskey-js/build.js
index 68535556d3..befc605a08 100644
--- a/packages/misskey-js/build.js
+++ b/packages/misskey-js/build.js
@@ -59,7 +59,7 @@ async function buildSrc() {
function buildDts() {
return execa(
- 'tsc',
+ 'tsgo',
[
'--project', 'tsconfig.json',
'--outDir', 'built',
diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md
index fe19c00a80..760d5c319b 100644
--- a/packages/misskey-js/etc/misskey-js.api.md
+++ b/packages/misskey-js/etc/misskey-js.api.md
@@ -854,7 +854,14 @@ export type Channels = {
key: K;
value: ReversiGameDetailed[K];
}) => void;
- log: (payload: Record<string, unknown>) => void;
+ log: (payload: {
+ time: number;
+ player: boolean;
+ operation: 'put';
+ pos: number;
+ } & {
+ id: string | null;
+ }) => void;
};
receives: {
putStone: {
@@ -2121,6 +2128,8 @@ declare namespace entities {
UsersFollowingResponse,
UsersGalleryPostsRequest,
UsersGalleryPostsResponse,
+ UsersGetFollowingUsersByBirthdayRequest,
+ UsersGetFollowingUsersByBirthdayResponse,
UsersGetFrequentlyRepliedUsersRequest,
UsersGetFrequentlyRepliedUsersResponse,
UsersListsCreateRequest,
@@ -2221,6 +2230,7 @@ declare namespace entities {
MetaLite,
MetaDetailedOnly,
MetaDetailed,
+ MetaClientOptions,
UserWebhook,
SystemWebhook,
AbuseReportNotificationRecipient,
@@ -2812,6 +2822,9 @@ type MeDetailed = components['schemas']['MeDetailed'];
type MeDetailedOnly = components['schemas']['MeDetailedOnly'];
// @public (undocumented)
+type MetaClientOptions = components['schemas']['MetaClientOptions'];
+
+// @public (undocumented)
type MetaDetailed = components['schemas']['MetaDetailed'];
// @public (undocumented)
@@ -3728,6 +3741,12 @@ type UsersGalleryPostsRequest = operations['users___gallery___posts']['requestBo
type UsersGalleryPostsResponse = operations['users___gallery___posts']['responses']['200']['content']['application/json'];
// @public (undocumented)
+type UsersGetFollowingUsersByBirthdayRequest = operations['users___get-following-users-by-birthday']['requestBody']['content']['application/json'];
+
+// @public (undocumented)
+type UsersGetFollowingUsersByBirthdayResponse = operations['users___get-following-users-by-birthday']['responses']['200']['content']['application/json'];
+
+// @public (undocumented)
type UsersGetFrequentlyRepliedUsersRequest = operations['users___get-frequently-replied-users']['requestBody']['content']['application/json'];
// @public (undocumented)
@@ -3864,7 +3883,7 @@ type VerifyEmailRequest = operations['verify-email']['requestBody']['content']['
// src/entities.ts:55:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts
// src/streaming.ts:57:3 - (ae-forgotten-export) The symbol "ReconnectingWebSocket" needs to be exported by the entry point index.d.ts
// src/streaming.types.ts:226:4 - (ae-forgotten-export) The symbol "ReversiUpdateKey" needs to be exported by the entry point index.d.ts
-// src/streaming.types.ts:236:4 - (ae-forgotten-export) The symbol "ReversiUpdateSettings" needs to be exported by the entry point index.d.ts
+// src/streaming.types.ts:241:4 - (ae-forgotten-export) The symbol "ReversiUpdateSettings" needs to be exported by the entry point index.d.ts
// (No @packageDocumentation comment for this package)
diff --git a/packages/misskey-js/generator/package.json b/packages/misskey-js/generator/package.json
index e9721911cc..bdce22942f 100644
--- a/packages/misskey-js/generator/package.json
+++ b/packages/misskey-js/generator/package.json
@@ -7,16 +7,15 @@
"generate": "tsx src/generator.ts && eslint ./built/**/*.ts --fix"
},
"devDependencies": {
- "@readme/openapi-parser": "5.2.1",
- "@types/node": "24.10.2",
- "@typescript-eslint/eslint-plugin": "8.49.0",
- "@typescript-eslint/parser": "8.49.0",
+ "@readme/openapi-parser": "5.5.0",
+ "@types/node": "24.10.13",
+ "@typescript-eslint/eslint-plugin": "8.56.0",
+ "@typescript-eslint/parser": "8.56.0",
"openapi-types": "12.1.3",
- "openapi-typescript": "7.10.1",
+ "openapi-typescript": "7.13.0",
"ts-case-convert": "2.1.0",
"tsx": "4.21.0",
- "typescript": "5.9.3",
- "eslint": "9.39.1"
+ "eslint": "9.39.3"
},
"files": [
"built"
diff --git a/packages/misskey-js/package.json b/packages/misskey-js/package.json
index 226428af13..b031e2ef61 100644
--- a/packages/misskey-js/package.json
+++ b/packages/misskey-js/package.json
@@ -1,7 +1,7 @@
{
"type": "module",
"name": "misskey-js",
- "version": "2025.12.2",
+ "version": "2026.3.0",
"description": "Misskey SDK for JavaScript",
"license": "MIT",
"main": "./built/index.js",
@@ -25,7 +25,7 @@
"api": "pnpm api-extractor run --local --verbose",
"api-prod": "pnpm api-extractor run --verbose",
"eslint": "eslint './**/*.{js,jsx,ts,tsx}'",
- "typecheck": "tsc --noEmit",
+ "typecheck": "tsgo --noEmit",
"lint": "pnpm typecheck && pnpm eslint",
"vitest": "vitest run --coverage",
"test": "pnpm vitest && pnpm tsd",
@@ -37,18 +37,17 @@
"directory": "packages/misskey-js"
},
"devDependencies": {
- "@microsoft/api-extractor": "7.55.2",
- "@types/node": "24.10.2",
- "@typescript-eslint/eslint-plugin": "8.49.0",
- "@typescript-eslint/parser": "8.49.0",
- "@vitest/coverage-v8": "4.0.15",
- "esbuild": "0.27.1",
+ "@microsoft/api-extractor": "7.57.2",
+ "@types/node": "24.10.13",
+ "@typescript-eslint/eslint-plugin": "8.56.0",
+ "@typescript-eslint/parser": "8.56.0",
+ "@vitest/coverage-v8": "4.0.18",
+ "esbuild": "0.27.3",
"execa": "9.6.1",
"ncp": "2.0.0",
- "nodemon": "3.1.11",
+ "nodemon": "3.1.14",
"tsd": "0.33.0",
- "typescript": "5.9.3",
- "vitest": "4.0.15",
+ "vitest": "4.0.18",
"vitest-websocket-mock": "0.5.0"
},
"files": [
@@ -56,7 +55,7 @@
],
"dependencies": {
"@simplewebauthn/types": "12.0.0",
- "eventemitter3": "5.0.1",
+ "eventemitter3": "5.0.4",
"reconnecting-websocket": "4.4.0"
}
}
diff --git a/packages/misskey-js/src/autogen/apiClientJSDoc.ts b/packages/misskey-js/src/autogen/apiClientJSDoc.ts
index af3a09a16e..c9cb9147f1 100644
--- a/packages/misskey-js/src/autogen/apiClientJSDoc.ts
+++ b/packages/misskey-js/src/autogen/apiClientJSDoc.ts
@@ -4533,6 +4533,17 @@ declare module '../api.js' {
): Promise<SwitchCaseResponseType<E, P>>;
/**
+ * Retrieve users who have a birthday on the specified range.
+ *
+ * **Credential required**: *Yes* / **Permission**: *read:account*
+ */
+ request<E extends 'users/get-following-users-by-birthday', P extends Endpoints[E]['req']>(
+ endpoint: E,
+ params: P,
+ credential?: string | null,
+ ): Promise<SwitchCaseResponseType<E, P>>;
+
+ /**
* Get a list of other users that the specified user frequently replies to.
*
* **Credential required**: *No*
diff --git a/packages/misskey-js/src/autogen/endpoint.ts b/packages/misskey-js/src/autogen/endpoint.ts
index c3ef3de4e6..2d4e0fe35e 100644
--- a/packages/misskey-js/src/autogen/endpoint.ts
+++ b/packages/misskey-js/src/autogen/endpoint.ts
@@ -616,6 +616,8 @@ import type {
UsersFollowingResponse,
UsersGalleryPostsRequest,
UsersGalleryPostsResponse,
+ UsersGetFollowingUsersByBirthdayRequest,
+ UsersGetFollowingUsersByBirthdayResponse,
UsersGetFrequentlyRepliedUsersRequest,
UsersGetFrequentlyRepliedUsersResponse,
UsersListsCreateRequest,
@@ -1067,6 +1069,7 @@ export type Endpoints = {
'users/followers': { req: UsersFollowersRequest; res: UsersFollowersResponse };
'users/following': { req: UsersFollowingRequest; res: UsersFollowingResponse };
'users/gallery/posts': { req: UsersGalleryPostsRequest; res: UsersGalleryPostsResponse };
+ 'users/get-following-users-by-birthday': { req: UsersGetFollowingUsersByBirthdayRequest; res: UsersGetFollowingUsersByBirthdayResponse };
'users/get-frequently-replied-users': { req: UsersGetFrequentlyRepliedUsersRequest; res: UsersGetFrequentlyRepliedUsersResponse };
'users/lists/create': { req: UsersListsCreateRequest; res: UsersListsCreateResponse };
'users/lists/create-from-public': { req: UsersListsCreateFromPublicRequest; res: UsersListsCreateFromPublicResponse };
diff --git a/packages/misskey-js/src/autogen/entities.ts b/packages/misskey-js/src/autogen/entities.ts
index 0d57b065dc..a49dd729e6 100644
--- a/packages/misskey-js/src/autogen/entities.ts
+++ b/packages/misskey-js/src/autogen/entities.ts
@@ -619,6 +619,8 @@ export type UsersFollowingRequest = operations['users___following']['requestBody
export type UsersFollowingResponse = operations['users___following']['responses']['200']['content']['application/json'];
export type UsersGalleryPostsRequest = operations['users___gallery___posts']['requestBody']['content']['application/json'];
export type UsersGalleryPostsResponse = operations['users___gallery___posts']['responses']['200']['content']['application/json'];
+export type UsersGetFollowingUsersByBirthdayRequest = operations['users___get-following-users-by-birthday']['requestBody']['content']['application/json'];
+export type UsersGetFollowingUsersByBirthdayResponse = operations['users___get-following-users-by-birthday']['responses']['200']['content']['application/json'];
export type UsersGetFrequentlyRepliedUsersRequest = operations['users___get-frequently-replied-users']['requestBody']['content']['application/json'];
export type UsersGetFrequentlyRepliedUsersResponse = operations['users___get-frequently-replied-users']['responses']['200']['content']['application/json'];
export type UsersListsCreateRequest = operations['users___lists___create']['requestBody']['content']['application/json'];
diff --git a/packages/misskey-js/src/autogen/models.ts b/packages/misskey-js/src/autogen/models.ts
index 01b48442d6..f45ae39da4 100644
--- a/packages/misskey-js/src/autogen/models.ts
+++ b/packages/misskey-js/src/autogen/models.ts
@@ -58,6 +58,7 @@ export type ReversiGameDetailed = components['schemas']['ReversiGameDetailed'];
export type MetaLite = components['schemas']['MetaLite'];
export type MetaDetailedOnly = components['schemas']['MetaDetailedOnly'];
export type MetaDetailed = components['schemas']['MetaDetailed'];
+export type MetaClientOptions = components['schemas']['MetaClientOptions'];
export type UserWebhook = components['schemas']['UserWebhook'];
export type SystemWebhook = components['schemas']['SystemWebhook'];
export type AbuseReportNotificationRecipient = components['schemas']['AbuseReportNotificationRecipient'];
diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts
index 2650869590..46d04ac2dc 100644
--- a/packages/misskey-js/src/autogen/types.ts
+++ b/packages/misskey-js/src/autogen/types.ts
@@ -3717,6 +3717,15 @@ export type paths = {
*/
post: operations['users___gallery___posts'];
};
+ '/users/get-following-users-by-birthday': {
+ /**
+ * users/get-following-users-by-birthday
+ * @description Retrieve users who have a birthday on the specified range.
+ *
+ * **Credential required**: *Yes* / **Permission**: *read:account*
+ */
+ post: operations['users___get-following-users-by-birthday'];
+ };
'/users/get-frequently-replied-users': {
/**
* users/get-frequently-replied-users
@@ -4267,6 +4276,33 @@ export type components = {
/** Format: misskey:id */
userListId: string;
};
+ login?: {
+ /** @enum {string} */
+ type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'followingOrFollower' | 'never';
+ } | {
+ /** @enum {string} */
+ type: 'list';
+ /** Format: misskey:id */
+ userListId: string;
+ };
+ createToken?: {
+ /** @enum {string} */
+ type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'followingOrFollower' | 'never';
+ } | {
+ /** @enum {string} */
+ type: 'list';
+ /** Format: misskey:id */
+ userListId: string;
+ };
+ exportCompleted?: {
+ /** @enum {string} */
+ type: 'all' | 'following' | 'follower' | 'mutualFollow' | 'followingOrFollower' | 'never';
+ } | {
+ /** @enum {string} */
+ type: 'list';
+ /** Format: misskey:id */
+ userListId: string;
+ };
};
emailNotificationTypes: string[];
achievements: components['schemas']['Achievement'][];
@@ -5337,7 +5373,8 @@ export type components = {
/** Format: id */
timeoutUserId: string | null;
black: number | null;
- bw: string;
+ /** @enum {string} */
+ bw: 'random' | '1' | '2';
noIrregularRules: boolean;
isLlotheo: boolean;
canPutEverywhere: boolean;
@@ -5373,7 +5410,8 @@ export type components = {
/** Format: id */
timeoutUserId: string | null;
black: number | null;
- bw: string;
+ /** @enum {string} */
+ bw: 'random' | '1' | '2';
noIrregularRules: boolean;
isLlotheo: boolean;
canPutEverywhere: boolean;
@@ -5403,7 +5441,7 @@ export type components = {
feedbackUrl: string | null;
defaultDarkTheme: string | null;
defaultLightTheme: string | null;
- clientOptions: Record<string, never>;
+ clientOptions: components['schemas']['MetaClientOptions'];
disableRegistration: boolean;
emailRequiredForSignup: boolean;
enableHcaptcha: boolean;
@@ -5502,6 +5540,12 @@ export type components = {
cacheRemoteSensitiveFiles: boolean;
};
MetaDetailed: components['schemas']['MetaLite'] & components['schemas']['MetaDetailedOnly'];
+ MetaClientOptions: {
+ /** @enum {string} */
+ entrancePageStyle: 'classic' | 'simple';
+ showTimelineForVisitor: boolean;
+ showActivitiesForVisitor: boolean;
+ };
UserWebhook: {
/** Format: id */
id: string;
@@ -6777,8 +6821,10 @@ export interface operations {
updatedAt: string | null;
text: string;
title: string;
- icon: string | null;
- display: string;
+ /** @enum {string} */
+ icon: 'info' | 'warning' | 'error' | 'success';
+ /** @enum {string} */
+ display: 'normal' | 'banner' | 'dialog';
isActive: boolean;
forExistingUsers: boolean;
silence: boolean;
@@ -8217,16 +8263,7 @@ export interface operations {
[name: string]: unknown;
};
content: {
- 'application/json': {
- /** Format: id */
- id: string;
- aliases: string[];
- name: string;
- category: string | null;
- /** @description The local host is represented with `null`. The field exists for compatibility with other API endpoints that return files. */
- host: string | null;
- url: string;
- }[];
+ 'application/json': components['schemas']['EmojiDetailed'][];
};
};
/** @description Client error */
@@ -8305,16 +8342,7 @@ export interface operations {
[name: string]: unknown;
};
content: {
- 'application/json': {
- /** Format: id */
- id: string;
- aliases: string[];
- name: string;
- category: string | null;
- /** @description The local host is represented with `null`. */
- host: string | null;
- url: string;
- }[];
+ 'application/json': components['schemas']['EmojiDetailed'][];
};
};
/** @description Client error */
@@ -9446,7 +9474,7 @@ export interface operations {
deeplIsPro: boolean;
defaultDarkTheme: string | null;
defaultLightTheme: string | null;
- clientOptions: Record<string, never>;
+ clientOptions: components['schemas']['MetaClientOptions'];
description: string | null;
disableRegistration: boolean;
impressumUrl: string | null;
@@ -12702,7 +12730,12 @@ export interface operations {
description?: string | null;
defaultLightTheme?: string | null;
defaultDarkTheme?: string | null;
- clientOptions?: Record<string, never>;
+ clientOptions?: {
+ /** @enum {string} */
+ entrancePageStyle?: 'classic' | 'simple';
+ showTimelineForVisitor?: boolean;
+ showActivitiesForVisitor?: boolean;
+ };
cacheRemoteFiles?: boolean;
cacheRemoteSensitiveFiles?: boolean;
emailRequiredForSignup?: boolean;
@@ -23987,6 +24020,8 @@ export interface operations {
tag: string;
/** @default 10 */
limit?: number;
+ /** @default 0 */
+ offset?: number;
/** @enum {string} */
sort: '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+updatedAt' | '-updatedAt';
/**
@@ -34847,6 +34882,7 @@ export interface operations {
untilDate?: number;
/** @default 10 */
limit?: number;
+ /** @description @deprecated use get-following-users-by-birthday instead. */
birthday?: string | null;
};
};
@@ -34982,6 +35018,92 @@ export interface operations {
};
};
};
+ 'users___get-following-users-by-birthday': {
+ requestBody: {
+ content: {
+ 'application/json': {
+ /** @default 10 */
+ limit?: number;
+ /** @default 0 */
+ offset?: number;
+ birthday: {
+ month: number;
+ day: number;
+ } | {
+ begin: {
+ month: number;
+ day: number;
+ };
+ end: {
+ month: number;
+ day: number;
+ };
+ };
+ };
+ };
+ };
+ responses: {
+ /** @description OK (with results) */
+ 200: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ 'application/json': {
+ /** Format: misskey:id */
+ id: string;
+ birthday: string;
+ user: components['schemas']['UserLite'];
+ }[];
+ };
+ };
+ /** @description Client error */
+ 400: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ 'application/json': components['schemas']['Error'];
+ };
+ };
+ /** @description Authentication error */
+ 401: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ 'application/json': components['schemas']['Error'];
+ };
+ };
+ /** @description Forbidden error */
+ 403: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ 'application/json': components['schemas']['Error'];
+ };
+ };
+ /** @description I'm Ai */
+ 418: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ 'application/json': components['schemas']['Error'];
+ };
+ };
+ /** @description Internal server error */
+ 500: {
+ headers: {
+ [name: string]: unknown;
+ };
+ content: {
+ 'application/json': components['schemas']['Error'];
+ };
+ };
+ };
+ };
'users___get-frequently-replied-users': {
requestBody: {
content: {
diff --git a/packages/misskey-js/src/consts.ts b/packages/misskey-js/src/consts.ts
index eb6c5cd1b0..8789ee056d 100644
--- a/packages/misskey-js/src/consts.ts
+++ b/packages/misskey-js/src/consts.ts
@@ -13,7 +13,6 @@ import type {
Role,
ReversiGameDetailed,
SystemWebhook,
- UserLite,
ChatRoom,
} from './autogen/models.js';
diff --git a/packages/misskey-js/src/streaming.types.ts b/packages/misskey-js/src/streaming.types.ts
index 93838ceed5..63e1f947a5 100644
--- a/packages/misskey-js/src/streaming.types.ts
+++ b/packages/misskey-js/src/streaming.types.ts
@@ -224,7 +224,12 @@ export type Channels = {
canceled: (payload: { userId: User['id']; }) => void;
changeReadyStates: (payload: { user1: boolean; user2: boolean; }) => void;
updateSettings: <K extends ReversiUpdateKey>(payload: { userId: User['id']; key: K; value: ReversiGameDetailed[K]; }) => void;
- log: (payload: Record<string, unknown>) => void;
+ log: (payload: {
+ time: number;
+ player: boolean;
+ operation: 'put';
+ pos: number;
+ } & { id: string | null }) => void;
};
receives: {
putStone: {
@@ -291,7 +296,10 @@ export type NoteUpdatedEvent = { id: Note['id'] } & ({
type: 'reacted';
body: {
reaction: string;
- emoji: string | null;
+ emoji?: {
+ name: string;
+ url: string;
+ } | null;
userId: User['id'];
};
} | {