forked from mirrors/misskey
deps(misskey-js): Update openapi-typescript to v7 (#15491)
* deps(misskey-js): Update openapi-typescript to v7 * update openapi-typescript to v7.7.3 * generate misskey-js types * bump openapi-typescript * enhance: 生成物からnever型を除去するように * regenerate api types * refactor: 処理共通化 --------- Co-authored-by: zyoshoka <107108195+zyoshoka@users.noreply.github.com>
This commit is contained in:
@@ -77,7 +77,7 @@ export class APIClient {
|
||||
|
||||
if (mediaType === 'application/json') {
|
||||
payload = JSON.stringify({
|
||||
...params,
|
||||
...(this.assertIsRecord(params) ? params : {}),
|
||||
i: credential !== undefined ? credential : this.credential,
|
||||
});
|
||||
} else if (mediaType === 'multipart/form-data') {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -24,10 +24,14 @@ type NonNullableRecord<T> = {
|
||||
type AllNullRecord<T> = {
|
||||
[P in keyof T]: null;
|
||||
};
|
||||
type AllNullOrOptionalRecord<T> = {
|
||||
[P in keyof T]: never;
|
||||
};
|
||||
|
||||
export type PureRenote =
|
||||
Omit<Note, 'renote' | 'renoteId' | 'reply' | 'replyId' | 'text' | 'cw' | 'files' | 'fileIds' | 'poll'>
|
||||
& AllNullRecord<Pick<Note, 'reply' | 'replyId' | 'text' | 'cw' | 'poll'>>
|
||||
& AllNullRecord<Pick<Note, 'text'>>
|
||||
& AllNullOrOptionalRecord<Pick<Note, 'reply' | 'replyId' | 'cw' | 'poll'>>
|
||||
& { files: []; fileIds: []; }
|
||||
& NonNullableRecord<Pick<Note, 'renote' | 'renoteId'>>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user