merge: all upstream changes

This commit is contained in:
Mar0xy 2023-10-13 19:01:17 +02:00
commit f8f128b347
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
170 changed files with 4490 additions and 2218 deletions

View file

@ -2409,6 +2409,8 @@ type LiteInstanceMetadata = {
tosUrl: string | null;
repositoryUrl: string;
feedbackUrl: string;
impressumUrl: string | null;
privacyPolicyUrl: string | null;
disableRegistration: boolean;
disableLocalTimeline: boolean;
disableGlobalTimeline: boolean;
@ -2447,6 +2449,7 @@ type LiteInstanceMetadata = {
url: string;
imageUrl: string;
}[];
notesPerOneAd: number;
translatorAvailable: boolean;
serverRules: string[];
};
@ -2640,7 +2643,6 @@ export const mutedNoteReasons: readonly ["word", "manual", "spam", "other"];
type Note = {
id: ID;
createdAt: DateString;
updatedAt?: DateString | null;
text: string | null;
cw: string | null;
user: User;
@ -2754,6 +2756,9 @@ type Notification_2 = {
invitation: UserGroup;
user: User;
userId: User['id'];
} | {
type: 'achievementEarned';
achievement: string;
} | {
type: 'app';
header?: string | null;
@ -2764,7 +2769,7 @@ type Notification_2 = {
});
// @public (undocumented)
export const notificationTypes: readonly ["note", "follow", "mention", "reply", "renote", "quote", "reaction", "pollVote", "pollEnded", "receiveFollowRequest", "followRequestAccepted", "groupInvited", "app"];
export const notificationTypes: readonly ["note", "follow", "mention", "reply", "renote", "quote", "reaction", "pollVote", "pollEnded", "receiveFollowRequest", "followRequestAccepted", "groupInvited", "app", "achievementEarned"];
// @public (undocumented)
type OriginType = 'combined' | 'local' | 'remote';
@ -2981,7 +2986,7 @@ type UserSorting = '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+u
// src/api.types.ts:18:25 - (ae-forgotten-export) The symbol "NoParams" needs to be exported by the entry point index.d.ts
// src/api.types.ts:630:18 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts
// src/entities.ts:107:2 - (ae-forgotten-export) The symbol "notificationTypes_2" needs to be exported by the entry point index.d.ts
// src/entities.ts:595:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts
// src/entities.ts:600:2 - (ae-forgotten-export) The symbol "ModerationLogPayloads" needs to be exported by the entry point index.d.ts
// src/streaming.types.ts:33:4 - (ae-forgotten-export) The symbol "FIXME" needs to be exported by the entry point index.d.ts
// (No @packageDocumentation comment for this package)

View file

@ -20,13 +20,13 @@
"url": "git+https://github.com/misskey-dev/misskey.js.git"
},
"devDependencies": {
"@microsoft/api-extractor": "7.37.2",
"@microsoft/api-extractor": "7.38.0",
"@swc/jest": "0.2.29",
"@types/jest": "29.5.5",
"@types/node": "20.7.1",
"@typescript-eslint/eslint-plugin": "6.7.3",
"@typescript-eslint/parser": "6.7.3",
"eslint": "8.50.0",
"@types/node": "20.8.4",
"@typescript-eslint/eslint-plugin": "6.7.5",
"@typescript-eslint/parser": "6.7.5",
"eslint": "8.51.0",
"jest": "29.7.0",
"jest-fetch-mock": "3.0.3",
"jest-websocket-mock": "2.5.0",
@ -39,7 +39,7 @@
],
"dependencies": {
"@swc/cli": "0.1.62",
"@swc/core": "1.3.90",
"@swc/core": "1.3.92",
"eventemitter3": "5.0.1",
"reconnecting-websocket": "4.4.0"
}

View file

@ -67,8 +67,7 @@ export class APIClient {
IsCaseMatched<E, P, 8> extends true ? GetCaseResult<E, P, 8> :
IsCaseMatched<E, P, 9> extends true ? GetCaseResult<E, P, 9> :
Endpoints[E]['res']['$switch']['$default']
: Endpoints[E]['res']>
{
: Endpoints[E]['res']> {
const promise = new Promise((resolve, reject) => {
this.fetch(`${this.origin}/api/${endpoint}`, {
method: 'POST',

View file

@ -1,4 +1,4 @@
export const notificationTypes = ['note', 'follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app'] as const;
export const notificationTypes = ['note', 'follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollVote', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'groupInvited', 'app', 'achievementEarned'] as const;
export const noteVisibilities = ['public', 'home', 'followers', 'specified'] as const;
@ -186,6 +186,9 @@ export type ModerationLogPayloads = {
deleteUserAnnouncement: {
announcementId: string;
announcement: any;
userId: string;
userUsername: string;
userHost: string | null;
};
resetPassword: {
userId: string;

View file

@ -292,6 +292,9 @@ export type Notification = {
invitation: UserGroup;
user: User;
userId: User['id'];
} | {
type: 'achievementEarned';
achievement: string;
} | {
type: 'app';
header?: string | null;
@ -337,6 +340,8 @@ export type LiteInstanceMetadata = {
tosUrl: string | null;
repositoryUrl: string;
feedbackUrl: string;
impressumUrl: string | null;
privacyPolicyUrl: string | null;
disableRegistration: boolean;
disableLocalTimeline: boolean;
disableGlobalTimeline: boolean;
@ -376,6 +381,7 @@ export type LiteInstanceMetadata = {
url: string;
imageUrl: string;
}[];
notesPerOneAd: number;
translatorAvailable: boolean;
serverRules: string[];
};

View file

@ -127,12 +127,6 @@ export type NoteUpdatedEvent = {
reaction: string;
userId: User['id'];
};
} | {
id: Note['id'];
type: 'deleted';
body: {
deletedAt: string;
};
} | {
id: Note['id'];
type: 'updated';
@ -140,6 +134,12 @@ export type NoteUpdatedEvent = {
cw: string | null;
text: string;
};
} | {
id: Note['id'];
type: 'deleted';
body: {
deletedAt: string;
};
} | {
id: Note['id'];
type: 'pollVoted';