feat(misskey-js): POST admin/roles/createの型を具象化 (#14167)

* feat(misskey-js): `POST admin/roles/create`の型を具象化

* fix

* docs: CHANGELOG.md

* test(misskey-js): admin/roles/createの型が合うことを表明

* test(misskey-js): single quote

* test(misskey-js): 無を読もうとして爆発するのを修正

* test(misskey-js): fix comment
This commit is contained in:
Kisaragi
2024-07-10 20:40:04 +09:00
committed by GitHub
parent 02e0a86b12
commit 52d8a54fc7
5 changed files with 76 additions and 3 deletions

View File

@@ -1,5 +1,14 @@
import { ModerationLogPayloads } from './consts.js';
import { Announcement, EmojiDetailed, MeDetailed, Page, User, UserDetailedNotMe } from './autogen/models.js';
import {
Announcement,
EmojiDetailed,
MeDetailed,
Page,
Role,
RolePolicies,
User,
UserDetailedNotMe
} from './autogen/models.js';
export * from './autogen/entities.js';
export * from './autogen/models.js';
@@ -236,3 +245,7 @@ export type SigninResponse = {
id: User['id'],
i: string,
};
type Values<T extends Record<PropertyKey, unknown>> = T[keyof T];
export type PartialRolePolicyOverride = Partial<{[k in keyof RolePolicies]: Omit<Values<Role['policies']>, 'value'> & { value: RolePolicies[k] }}>;