mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-26 22:23:07 +02:00
feat: Roleに関するSchemaを追加 (#12572)
* feat: Roleに関連するschemaを追加 * feat: 新しいRoleSchemaを使うように * chore: misskey.jsのデータを更新 * chore: misskey-js.api.mdを更新
This commit is contained in:
parent
00b11b1f75
commit
e42c91dee7
13 changed files with 429 additions and 71 deletions
|
@ -37,6 +37,7 @@ import { packedEmojiDetailedSchema, packedEmojiSimpleSchema } from '@/models/jso
|
||||||
import { packedFlashSchema } from '@/models/json-schema/flash.js';
|
import { packedFlashSchema } from '@/models/json-schema/flash.js';
|
||||||
import { packedAnnouncementSchema } from '@/models/json-schema/announcement.js';
|
import { packedAnnouncementSchema } from '@/models/json-schema/announcement.js';
|
||||||
import { packedSigninSchema } from '@/models/json-schema/signin.js';
|
import { packedSigninSchema } from '@/models/json-schema/signin.js';
|
||||||
|
import { packedRoleLiteSchema, packedRoleSchema } from '@/models/json-schema/role.js';
|
||||||
|
|
||||||
export const refs = {
|
export const refs = {
|
||||||
UserLite: packedUserLiteSchema,
|
UserLite: packedUserLiteSchema,
|
||||||
|
@ -73,6 +74,8 @@ export const refs = {
|
||||||
EmojiDetailed: packedEmojiDetailedSchema,
|
EmojiDetailed: packedEmojiDetailedSchema,
|
||||||
Flash: packedFlashSchema,
|
Flash: packedFlashSchema,
|
||||||
Signin: packedSigninSchema,
|
Signin: packedSigninSchema,
|
||||||
|
RoleLite: packedRoleLiteSchema,
|
||||||
|
Role: packedRoleSchema,
|
||||||
};
|
};
|
||||||
|
|
||||||
export type Packed<x extends keyof typeof refs> = SchemaType<typeof refs[x]>;
|
export type Packed<x extends keyof typeof refs> = SchemaType<typeof refs[x]>;
|
||||||
|
|
157
packages/backend/src/models/json-schema/role.ts
Normal file
157
packages/backend/src/models/json-schema/role.ts
Normal file
|
@ -0,0 +1,157 @@
|
||||||
|
const rolePolicyValue = {
|
||||||
|
type: 'object',
|
||||||
|
properties: {
|
||||||
|
value: {
|
||||||
|
oneOf: [
|
||||||
|
{
|
||||||
|
type: 'integer',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'boolean',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
priority: {
|
||||||
|
type: 'integer',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
},
|
||||||
|
useDefault: {
|
||||||
|
type: 'boolean',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
export const packedRoleLiteSchema = {
|
||||||
|
type: 'object',
|
||||||
|
properties: {
|
||||||
|
id: {
|
||||||
|
type: 'string',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
format: 'id',
|
||||||
|
example: 'xxxxxxxxxx',
|
||||||
|
},
|
||||||
|
name: {
|
||||||
|
type: 'string',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
example: 'New Role',
|
||||||
|
},
|
||||||
|
color: {
|
||||||
|
type: 'string',
|
||||||
|
optional: false, nullable: true,
|
||||||
|
example: '#000000',
|
||||||
|
},
|
||||||
|
iconUrl: {
|
||||||
|
type: 'string',
|
||||||
|
optional: false, nullable: true,
|
||||||
|
},
|
||||||
|
description: {
|
||||||
|
type: 'string',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
},
|
||||||
|
isModerator: {
|
||||||
|
type: 'boolean',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
example: false,
|
||||||
|
},
|
||||||
|
isAdministrator: {
|
||||||
|
type: 'boolean',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
example: false,
|
||||||
|
},
|
||||||
|
displayOrder: {
|
||||||
|
type: 'integer',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
example: 0,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
export const packedRoleSchema = {
|
||||||
|
type: 'object',
|
||||||
|
allOf: [
|
||||||
|
{
|
||||||
|
type: 'object',
|
||||||
|
ref: 'RoleLite',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'object',
|
||||||
|
properties: {
|
||||||
|
createdAt: {
|
||||||
|
type: 'string',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
format: 'date-time',
|
||||||
|
},
|
||||||
|
updatedAt: {
|
||||||
|
type: 'string',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
format: 'date-time',
|
||||||
|
},
|
||||||
|
target: {
|
||||||
|
type: 'string',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
enum: ['manual', 'conditional'],
|
||||||
|
},
|
||||||
|
condFormula: {
|
||||||
|
type: 'object',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
},
|
||||||
|
isPublic: {
|
||||||
|
type: 'boolean',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
example: false,
|
||||||
|
},
|
||||||
|
isExplorable: {
|
||||||
|
type: 'boolean',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
example: false,
|
||||||
|
},
|
||||||
|
asBadge: {
|
||||||
|
type: 'boolean',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
example: false,
|
||||||
|
},
|
||||||
|
canEditMembersByModerator: {
|
||||||
|
type: 'boolean',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
example: false,
|
||||||
|
},
|
||||||
|
policies: {
|
||||||
|
type: 'object',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
properties: {
|
||||||
|
pinLimit: rolePolicyValue,
|
||||||
|
canInvite: rolePolicyValue,
|
||||||
|
clipLimit: rolePolicyValue,
|
||||||
|
canHideAds: rolePolicyValue,
|
||||||
|
inviteLimit: rolePolicyValue,
|
||||||
|
antennaLimit: rolePolicyValue,
|
||||||
|
gtlAvailable: rolePolicyValue,
|
||||||
|
ltlAvailable: rolePolicyValue,
|
||||||
|
webhookLimit: rolePolicyValue,
|
||||||
|
canPublicNote: rolePolicyValue,
|
||||||
|
userListLimit: rolePolicyValue,
|
||||||
|
wordMuteLimit: rolePolicyValue,
|
||||||
|
alwaysMarkNsfw: rolePolicyValue,
|
||||||
|
canSearchNotes: rolePolicyValue,
|
||||||
|
driveCapacityMb: rolePolicyValue,
|
||||||
|
rateLimitFactor: rolePolicyValue,
|
||||||
|
inviteLimitCycle: rolePolicyValue,
|
||||||
|
noteEachClipsLimit: rolePolicyValue,
|
||||||
|
inviteExpirationTime: rolePolicyValue,
|
||||||
|
canManageCustomEmojis: rolePolicyValue,
|
||||||
|
userEachUserListsLimit: rolePolicyValue,
|
||||||
|
canManageAvatarDecorations: rolePolicyValue,
|
||||||
|
canUseTranslator: rolePolicyValue,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
usersCount: {
|
||||||
|
type: 'integer',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
} as const;
|
|
@ -329,41 +329,7 @@ export const packedUserDetailedNotMeOnlySchema = {
|
||||||
items: {
|
items: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
nullable: false, optional: false,
|
nullable: false, optional: false,
|
||||||
properties: {
|
ref: 'RoleLite',
|
||||||
id: {
|
|
||||||
type: 'string',
|
|
||||||
nullable: false, optional: false,
|
|
||||||
format: 'id',
|
|
||||||
},
|
|
||||||
name: {
|
|
||||||
type: 'string',
|
|
||||||
nullable: false, optional: false,
|
|
||||||
},
|
|
||||||
color: {
|
|
||||||
type: 'string',
|
|
||||||
nullable: true, optional: false,
|
|
||||||
},
|
|
||||||
iconUrl: {
|
|
||||||
type: 'string',
|
|
||||||
nullable: true, optional: false,
|
|
||||||
},
|
|
||||||
description: {
|
|
||||||
type: 'string',
|
|
||||||
nullable: false, optional: false,
|
|
||||||
},
|
|
||||||
isModerator: {
|
|
||||||
type: 'boolean',
|
|
||||||
nullable: false, optional: false,
|
|
||||||
},
|
|
||||||
isAdministrator: {
|
|
||||||
type: 'boolean',
|
|
||||||
nullable: false, optional: false,
|
|
||||||
},
|
|
||||||
displayOrder: {
|
|
||||||
type: 'number',
|
|
||||||
nullable: false, optional: false,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
memo: {
|
memo: {
|
||||||
|
|
|
@ -13,6 +13,12 @@ export const meta = {
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
requireAdmin: true,
|
requireAdmin: true,
|
||||||
|
|
||||||
|
res: {
|
||||||
|
type: 'object',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
ref: 'Role',
|
||||||
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const paramDef = {
|
export const paramDef = {
|
||||||
|
|
|
@ -14,6 +14,16 @@ export const meta = {
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
requireModerator: true,
|
requireModerator: true,
|
||||||
|
|
||||||
|
res: {
|
||||||
|
type: 'array',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
items: {
|
||||||
|
type: 'object',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
ref: 'Role',
|
||||||
|
},
|
||||||
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const paramDef = {
|
export const paramDef = {
|
||||||
|
|
|
@ -23,6 +23,12 @@ export const meta = {
|
||||||
id: '07dc7d34-c0d8-49b7-96c6-db3ce64ee0b3',
|
id: '07dc7d34-c0d8-49b7-96c6-db3ce64ee0b3',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
res: {
|
||||||
|
type: 'object',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
ref: 'Role',
|
||||||
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const paramDef = {
|
export const paramDef = {
|
||||||
|
|
|
@ -13,6 +13,16 @@ export const meta = {
|
||||||
tags: ['role'],
|
tags: ['role'],
|
||||||
|
|
||||||
requireCredential: true,
|
requireCredential: true,
|
||||||
|
|
||||||
|
res: {
|
||||||
|
type: 'array',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
items: {
|
||||||
|
type: 'object',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
ref: 'Role',
|
||||||
|
},
|
||||||
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const paramDef = {
|
export const paramDef = {
|
||||||
|
|
|
@ -22,6 +22,12 @@ export const meta = {
|
||||||
id: 'de5502bf-009a-4639-86c1-fec349e46dcb',
|
id: 'de5502bf-009a-4639-86c1-fec349e46dcb',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
res: {
|
||||||
|
type: 'object',
|
||||||
|
optional: false, nullable: false,
|
||||||
|
ref: 'Role',
|
||||||
|
},
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
export const paramDef = {
|
export const paramDef = {
|
||||||
|
|
|
@ -227,12 +227,21 @@ type AdminRolesAssignRequest = operations['admin/roles/assign']['requestBody']['
|
||||||
// @public (undocumented)
|
// @public (undocumented)
|
||||||
type AdminRolesCreateRequest = operations['admin/roles/create']['requestBody']['content']['application/json'];
|
type AdminRolesCreateRequest = operations['admin/roles/create']['requestBody']['content']['application/json'];
|
||||||
|
|
||||||
|
// @public (undocumented)
|
||||||
|
type AdminRolesCreateResponse = operations['admin/roles/create']['responses']['200']['content']['application/json'];
|
||||||
|
|
||||||
// @public (undocumented)
|
// @public (undocumented)
|
||||||
type AdminRolesDeleteRequest = operations['admin/roles/delete']['requestBody']['content']['application/json'];
|
type AdminRolesDeleteRequest = operations['admin/roles/delete']['requestBody']['content']['application/json'];
|
||||||
|
|
||||||
|
// @public (undocumented)
|
||||||
|
type AdminRolesListResponse = operations['admin/roles/list']['responses']['200']['content']['application/json'];
|
||||||
|
|
||||||
// @public (undocumented)
|
// @public (undocumented)
|
||||||
type AdminRolesShowRequest = operations['admin/roles/show']['requestBody']['content']['application/json'];
|
type AdminRolesShowRequest = operations['admin/roles/show']['requestBody']['content']['application/json'];
|
||||||
|
|
||||||
|
// @public (undocumented)
|
||||||
|
type AdminRolesShowResponse = operations['admin/roles/show']['responses']['200']['content']['application/json'];
|
||||||
|
|
||||||
// @public (undocumented)
|
// @public (undocumented)
|
||||||
type AdminRolesUnassignRequest = operations['admin/roles/unassign']['requestBody']['content']['application/json'];
|
type AdminRolesUnassignRequest = operations['admin/roles/unassign']['requestBody']['content']['application/json'];
|
||||||
|
|
||||||
|
@ -1099,8 +1108,11 @@ declare namespace entities {
|
||||||
AdminDeleteAccountResponse,
|
AdminDeleteAccountResponse,
|
||||||
AdminUpdateUserNoteRequest,
|
AdminUpdateUserNoteRequest,
|
||||||
AdminRolesCreateRequest,
|
AdminRolesCreateRequest,
|
||||||
|
AdminRolesCreateResponse,
|
||||||
AdminRolesDeleteRequest,
|
AdminRolesDeleteRequest,
|
||||||
|
AdminRolesListResponse,
|
||||||
AdminRolesShowRequest,
|
AdminRolesShowRequest,
|
||||||
|
AdminRolesShowResponse,
|
||||||
AdminRolesUpdateRequest,
|
AdminRolesUpdateRequest,
|
||||||
AdminRolesAssignRequest,
|
AdminRolesAssignRequest,
|
||||||
AdminRolesUnassignRequest,
|
AdminRolesUnassignRequest,
|
||||||
|
@ -1414,7 +1426,9 @@ declare namespace entities {
|
||||||
PingResponse,
|
PingResponse,
|
||||||
PinnedUsersResponse,
|
PinnedUsersResponse,
|
||||||
PromoReadRequest,
|
PromoReadRequest,
|
||||||
|
RolesListResponse,
|
||||||
RolesShowRequest,
|
RolesShowRequest,
|
||||||
|
RolesShowResponse,
|
||||||
RolesUsersRequest,
|
RolesUsersRequest,
|
||||||
RolesNotesRequest,
|
RolesNotesRequest,
|
||||||
RolesNotesResponse,
|
RolesNotesResponse,
|
||||||
|
@ -1519,7 +1533,9 @@ declare namespace entities {
|
||||||
EmojiSimple,
|
EmojiSimple,
|
||||||
EmojiDetailed,
|
EmojiDetailed,
|
||||||
Flash,
|
Flash,
|
||||||
Signin
|
Signin,
|
||||||
|
RoleLite,
|
||||||
|
Role
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export { entities }
|
export { entities }
|
||||||
|
@ -2312,6 +2328,15 @@ type ResetPasswordRequest = operations['reset-password']['requestBody']['content
|
||||||
// @public (undocumented)
|
// @public (undocumented)
|
||||||
type RetentionResponse = operations['retention']['responses']['200']['content']['application/json'];
|
type RetentionResponse = operations['retention']['responses']['200']['content']['application/json'];
|
||||||
|
|
||||||
|
// @public (undocumented)
|
||||||
|
type Role = components['schemas']['Role'];
|
||||||
|
|
||||||
|
// @public (undocumented)
|
||||||
|
type RoleLite = components['schemas']['RoleLite'];
|
||||||
|
|
||||||
|
// @public (undocumented)
|
||||||
|
type RolesListResponse = operations['roles/list']['responses']['200']['content']['application/json'];
|
||||||
|
|
||||||
// @public (undocumented)
|
// @public (undocumented)
|
||||||
type RolesNotesRequest = operations['roles/notes']['requestBody']['content']['application/json'];
|
type RolesNotesRequest = operations['roles/notes']['requestBody']['content']['application/json'];
|
||||||
|
|
||||||
|
@ -2321,6 +2346,9 @@ type RolesNotesResponse = operations['roles/notes']['responses']['200']['content
|
||||||
// @public (undocumented)
|
// @public (undocumented)
|
||||||
type RolesShowRequest = operations['roles/show']['requestBody']['content']['application/json'];
|
type RolesShowRequest = operations['roles/show']['requestBody']['content']['application/json'];
|
||||||
|
|
||||||
|
// @public (undocumented)
|
||||||
|
type RolesShowResponse = operations['roles/show']['responses']['200']['content']['application/json'];
|
||||||
|
|
||||||
// @public (undocumented)
|
// @public (undocumented)
|
||||||
type RolesUsersRequest = operations['roles/users']['requestBody']['content']['application/json'];
|
type RolesUsersRequest = operations['roles/users']['requestBody']['content']['application/json'];
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* version: 2023.12.0-beta.1
|
* version: 2023.12.0-beta.1
|
||||||
* generatedAt: 2023-12-04T07:13:58.541Z
|
* generatedAt: 2023-12-04T11:17:52.156Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
|
@ -87,8 +87,11 @@ import type {
|
||||||
AdminDeleteAccountResponse,
|
AdminDeleteAccountResponse,
|
||||||
AdminUpdateUserNoteRequest,
|
AdminUpdateUserNoteRequest,
|
||||||
AdminRolesCreateRequest,
|
AdminRolesCreateRequest,
|
||||||
|
AdminRolesCreateResponse,
|
||||||
AdminRolesDeleteRequest,
|
AdminRolesDeleteRequest,
|
||||||
|
AdminRolesListResponse,
|
||||||
AdminRolesShowRequest,
|
AdminRolesShowRequest,
|
||||||
|
AdminRolesShowResponse,
|
||||||
AdminRolesUpdateRequest,
|
AdminRolesUpdateRequest,
|
||||||
AdminRolesAssignRequest,
|
AdminRolesAssignRequest,
|
||||||
AdminRolesUnassignRequest,
|
AdminRolesUnassignRequest,
|
||||||
|
@ -402,7 +405,9 @@ import type {
|
||||||
PingResponse,
|
PingResponse,
|
||||||
PinnedUsersResponse,
|
PinnedUsersResponse,
|
||||||
PromoReadRequest,
|
PromoReadRequest,
|
||||||
|
RolesListResponse,
|
||||||
RolesShowRequest,
|
RolesShowRequest,
|
||||||
|
RolesShowResponse,
|
||||||
RolesUsersRequest,
|
RolesUsersRequest,
|
||||||
RolesNotesRequest,
|
RolesNotesRequest,
|
||||||
RolesNotesResponse,
|
RolesNotesResponse,
|
||||||
|
@ -543,10 +548,10 @@ export type Endpoints = {
|
||||||
'admin/update-meta': { req: AdminUpdateMetaRequest; res: EmptyResponse };
|
'admin/update-meta': { req: AdminUpdateMetaRequest; res: EmptyResponse };
|
||||||
'admin/delete-account': { req: AdminDeleteAccountRequest; res: AdminDeleteAccountResponse };
|
'admin/delete-account': { req: AdminDeleteAccountRequest; res: AdminDeleteAccountResponse };
|
||||||
'admin/update-user-note': { req: AdminUpdateUserNoteRequest; res: EmptyResponse };
|
'admin/update-user-note': { req: AdminUpdateUserNoteRequest; res: EmptyResponse };
|
||||||
'admin/roles/create': { req: AdminRolesCreateRequest; res: EmptyResponse };
|
'admin/roles/create': { req: AdminRolesCreateRequest; res: AdminRolesCreateResponse };
|
||||||
'admin/roles/delete': { req: AdminRolesDeleteRequest; res: EmptyResponse };
|
'admin/roles/delete': { req: AdminRolesDeleteRequest; res: EmptyResponse };
|
||||||
'admin/roles/list': { req: EmptyRequest; res: EmptyResponse };
|
'admin/roles/list': { req: EmptyRequest; res: AdminRolesListResponse };
|
||||||
'admin/roles/show': { req: AdminRolesShowRequest; res: EmptyResponse };
|
'admin/roles/show': { req: AdminRolesShowRequest; res: AdminRolesShowResponse };
|
||||||
'admin/roles/update': { req: AdminRolesUpdateRequest; res: EmptyResponse };
|
'admin/roles/update': { req: AdminRolesUpdateRequest; res: EmptyResponse };
|
||||||
'admin/roles/assign': { req: AdminRolesAssignRequest; res: EmptyResponse };
|
'admin/roles/assign': { req: AdminRolesAssignRequest; res: EmptyResponse };
|
||||||
'admin/roles/unassign': { req: AdminRolesUnassignRequest; res: EmptyResponse };
|
'admin/roles/unassign': { req: AdminRolesUnassignRequest; res: EmptyResponse };
|
||||||
|
@ -750,8 +755,8 @@ export type Endpoints = {
|
||||||
'ping': { req: EmptyRequest; res: PingResponse };
|
'ping': { req: EmptyRequest; res: PingResponse };
|
||||||
'pinned-users': { req: EmptyRequest; res: PinnedUsersResponse };
|
'pinned-users': { req: EmptyRequest; res: PinnedUsersResponse };
|
||||||
'promo/read': { req: PromoReadRequest; res: EmptyResponse };
|
'promo/read': { req: PromoReadRequest; res: EmptyResponse };
|
||||||
'roles/list': { req: EmptyRequest; res: EmptyResponse };
|
'roles/list': { req: EmptyRequest; res: RolesListResponse };
|
||||||
'roles/show': { req: RolesShowRequest; res: EmptyResponse };
|
'roles/show': { req: RolesShowRequest; res: RolesShowResponse };
|
||||||
'roles/users': { req: RolesUsersRequest; res: EmptyResponse };
|
'roles/users': { req: RolesUsersRequest; res: EmptyResponse };
|
||||||
'roles/notes': { req: RolesNotesRequest; res: RolesNotesResponse };
|
'roles/notes': { req: RolesNotesRequest; res: RolesNotesResponse };
|
||||||
'request-reset-password': { req: RequestResetPasswordRequest; res: EmptyResponse };
|
'request-reset-password': { req: RequestResetPasswordRequest; res: EmptyResponse };
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* version: 2023.12.0-beta.1
|
* version: 2023.12.0-beta.1
|
||||||
* generatedAt: 2023-12-04T07:13:58.538Z
|
* generatedAt: 2023-12-04T11:17:52.154Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { operations } from './types.js';
|
import { operations } from './types.js';
|
||||||
|
@ -89,8 +89,11 @@ export type AdminDeleteAccountRequest = operations['admin/delete-account']['requ
|
||||||
export type AdminDeleteAccountResponse = operations['admin/delete-account']['responses']['200']['content']['application/json'];
|
export type AdminDeleteAccountResponse = operations['admin/delete-account']['responses']['200']['content']['application/json'];
|
||||||
export type AdminUpdateUserNoteRequest = operations['admin/update-user-note']['requestBody']['content']['application/json'];
|
export type AdminUpdateUserNoteRequest = operations['admin/update-user-note']['requestBody']['content']['application/json'];
|
||||||
export type AdminRolesCreateRequest = operations['admin/roles/create']['requestBody']['content']['application/json'];
|
export type AdminRolesCreateRequest = operations['admin/roles/create']['requestBody']['content']['application/json'];
|
||||||
|
export type AdminRolesCreateResponse = operations['admin/roles/create']['responses']['200']['content']['application/json'];
|
||||||
export type AdminRolesDeleteRequest = operations['admin/roles/delete']['requestBody']['content']['application/json'];
|
export type AdminRolesDeleteRequest = operations['admin/roles/delete']['requestBody']['content']['application/json'];
|
||||||
|
export type AdminRolesListResponse = operations['admin/roles/list']['responses']['200']['content']['application/json'];
|
||||||
export type AdminRolesShowRequest = operations['admin/roles/show']['requestBody']['content']['application/json'];
|
export type AdminRolesShowRequest = operations['admin/roles/show']['requestBody']['content']['application/json'];
|
||||||
|
export type AdminRolesShowResponse = operations['admin/roles/show']['responses']['200']['content']['application/json'];
|
||||||
export type AdminRolesUpdateRequest = operations['admin/roles/update']['requestBody']['content']['application/json'];
|
export type AdminRolesUpdateRequest = operations['admin/roles/update']['requestBody']['content']['application/json'];
|
||||||
export type AdminRolesAssignRequest = operations['admin/roles/assign']['requestBody']['content']['application/json'];
|
export type AdminRolesAssignRequest = operations['admin/roles/assign']['requestBody']['content']['application/json'];
|
||||||
export type AdminRolesUnassignRequest = operations['admin/roles/unassign']['requestBody']['content']['application/json'];
|
export type AdminRolesUnassignRequest = operations['admin/roles/unassign']['requestBody']['content']['application/json'];
|
||||||
|
@ -404,7 +407,9 @@ export type FlashMyLikesResponse = operations['flash/my-likes']['responses']['20
|
||||||
export type PingResponse = operations['ping']['responses']['200']['content']['application/json'];
|
export type PingResponse = operations['ping']['responses']['200']['content']['application/json'];
|
||||||
export type PinnedUsersResponse = operations['pinned-users']['responses']['200']['content']['application/json'];
|
export type PinnedUsersResponse = operations['pinned-users']['responses']['200']['content']['application/json'];
|
||||||
export type PromoReadRequest = operations['promo/read']['requestBody']['content']['application/json'];
|
export type PromoReadRequest = operations['promo/read']['requestBody']['content']['application/json'];
|
||||||
|
export type RolesListResponse = operations['roles/list']['responses']['200']['content']['application/json'];
|
||||||
export type RolesShowRequest = operations['roles/show']['requestBody']['content']['application/json'];
|
export type RolesShowRequest = operations['roles/show']['requestBody']['content']['application/json'];
|
||||||
|
export type RolesShowResponse = operations['roles/show']['responses']['200']['content']['application/json'];
|
||||||
export type RolesUsersRequest = operations['roles/users']['requestBody']['content']['application/json'];
|
export type RolesUsersRequest = operations['roles/users']['requestBody']['content']['application/json'];
|
||||||
export type RolesNotesRequest = operations['roles/notes']['requestBody']['content']['application/json'];
|
export type RolesNotesRequest = operations['roles/notes']['requestBody']['content']['application/json'];
|
||||||
export type RolesNotesResponse = operations['roles/notes']['responses']['200']['content']['application/json'];
|
export type RolesNotesResponse = operations['roles/notes']['responses']['200']['content']['application/json'];
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* version: 2023.12.0-beta.1
|
* version: 2023.12.0-beta.1
|
||||||
* generatedAt: 2023-12-04T07:13:58.535Z
|
* generatedAt: 2023-12-04T11:17:52.151Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { components } from './types.js';
|
import { components } from './types.js';
|
||||||
|
@ -38,3 +38,5 @@ export type EmojiSimple = components['schemas']['EmojiSimple'];
|
||||||
export type EmojiDetailed = components['schemas']['EmojiDetailed'];
|
export type EmojiDetailed = components['schemas']['EmojiDetailed'];
|
||||||
export type Flash = components['schemas']['Flash'];
|
export type Flash = components['schemas']['Flash'];
|
||||||
export type Signin = components['schemas']['Signin'];
|
export type Signin = components['schemas']['Signin'];
|
||||||
|
export type RoleLite = components['schemas']['RoleLite'];
|
||||||
|
export type Role = components['schemas']['Role'];
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* version: 2023.12.0-beta.1
|
* version: 2023.12.0-beta.1
|
||||||
* generatedAt: 2023-12-04T07:13:58.362Z
|
* generatedAt: 2023-12-04T11:17:51.997Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -3197,17 +3197,7 @@ export type components = {
|
||||||
usePasswordLessLogin: boolean;
|
usePasswordLessLogin: boolean;
|
||||||
/** @default false */
|
/** @default false */
|
||||||
securityKeys: boolean;
|
securityKeys: boolean;
|
||||||
roles: ({
|
roles: components['schemas']['RoleLite'][];
|
||||||
/** Format: id */
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
color: string | null;
|
|
||||||
iconUrl: string | null;
|
|
||||||
description: string;
|
|
||||||
isModerator: boolean;
|
|
||||||
isAdministrator: boolean;
|
|
||||||
displayOrder: number;
|
|
||||||
})[];
|
|
||||||
memo: string | null;
|
memo: string | null;
|
||||||
moderationNote?: string;
|
moderationNote?: string;
|
||||||
isFollowing?: boolean;
|
isFollowing?: boolean;
|
||||||
|
@ -3850,6 +3840,160 @@ export type components = {
|
||||||
headers: Record<string, never>;
|
headers: Record<string, never>;
|
||||||
success: boolean;
|
success: boolean;
|
||||||
};
|
};
|
||||||
|
RoleLite: {
|
||||||
|
/**
|
||||||
|
* Format: id
|
||||||
|
* @example xxxxxxxxxx
|
||||||
|
*/
|
||||||
|
id: string;
|
||||||
|
/** @example New Role */
|
||||||
|
name: string;
|
||||||
|
/** @example #000000 */
|
||||||
|
color: string | null;
|
||||||
|
iconUrl: string | null;
|
||||||
|
description: string;
|
||||||
|
/** @example false */
|
||||||
|
isModerator: boolean;
|
||||||
|
/** @example false */
|
||||||
|
isAdministrator: boolean;
|
||||||
|
/** @example 0 */
|
||||||
|
displayOrder: number;
|
||||||
|
};
|
||||||
|
Role: components['schemas']['RoleLite'] & ({
|
||||||
|
/** Format: date-time */
|
||||||
|
createdAt: string;
|
||||||
|
/** Format: date-time */
|
||||||
|
updatedAt: string;
|
||||||
|
/** @enum {string} */
|
||||||
|
target: 'manual' | 'conditional';
|
||||||
|
condFormula: Record<string, never>;
|
||||||
|
/** @example false */
|
||||||
|
isPublic: boolean;
|
||||||
|
/** @example false */
|
||||||
|
isExplorable: boolean;
|
||||||
|
/** @example false */
|
||||||
|
asBadge: boolean;
|
||||||
|
/** @example false */
|
||||||
|
canEditMembersByModerator: boolean;
|
||||||
|
policies: {
|
||||||
|
pinLimit: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
canInvite: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
clipLimit: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
canHideAds: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
inviteLimit: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
antennaLimit: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
gtlAvailable: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
ltlAvailable: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
webhookLimit: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
canPublicNote: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
userListLimit: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
wordMuteLimit: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
alwaysMarkNsfw: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
canSearchNotes: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
driveCapacityMb: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
rateLimitFactor: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
inviteLimitCycle: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
noteEachClipsLimit: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
inviteExpirationTime: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
canManageCustomEmojis: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
userEachUserListsLimit: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
canManageAvatarDecorations: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
canUseTranslator: {
|
||||||
|
value: number | boolean;
|
||||||
|
priority: number;
|
||||||
|
useDefault: boolean;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
usersCount: number;
|
||||||
|
});
|
||||||
};
|
};
|
||||||
responses: never;
|
responses: never;
|
||||||
parameters: never;
|
parameters: never;
|
||||||
|
@ -7847,9 +7991,11 @@ export type operations = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
responses: {
|
responses: {
|
||||||
/** @description OK (without any results) */
|
/** @description OK (with results) */
|
||||||
204: {
|
200: {
|
||||||
content: never;
|
content: {
|
||||||
|
'application/json': components['schemas']['Role'];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
/** @description Client error */
|
/** @description Client error */
|
||||||
400: {
|
400: {
|
||||||
|
@ -7943,9 +8089,11 @@ export type operations = {
|
||||||
*/
|
*/
|
||||||
'admin/roles/list': {
|
'admin/roles/list': {
|
||||||
responses: {
|
responses: {
|
||||||
/** @description OK (without any results) */
|
/** @description OK (with results) */
|
||||||
204: {
|
200: {
|
||||||
content: never;
|
content: {
|
||||||
|
'application/json': components['schemas']['Role'][];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
/** @description Client error */
|
/** @description Client error */
|
||||||
400: {
|
400: {
|
||||||
|
@ -7995,9 +8143,11 @@ export type operations = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
responses: {
|
responses: {
|
||||||
/** @description OK (without any results) */
|
/** @description OK (with results) */
|
||||||
204: {
|
200: {
|
||||||
content: never;
|
content: {
|
||||||
|
'application/json': components['schemas']['Role'];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
/** @description Client error */
|
/** @description Client error */
|
||||||
400: {
|
400: {
|
||||||
|
@ -19841,9 +19991,11 @@ export type operations = {
|
||||||
*/
|
*/
|
||||||
'roles/list': {
|
'roles/list': {
|
||||||
responses: {
|
responses: {
|
||||||
/** @description OK (without any results) */
|
/** @description OK (with results) */
|
||||||
204: {
|
200: {
|
||||||
content: never;
|
content: {
|
||||||
|
'application/json': components['schemas']['Role'][];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
/** @description Client error */
|
/** @description Client error */
|
||||||
400: {
|
400: {
|
||||||
|
@ -19893,9 +20045,11 @@ export type operations = {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
responses: {
|
responses: {
|
||||||
/** @description OK (without any results) */
|
/** @description OK (with results) */
|
||||||
204: {
|
200: {
|
||||||
content: never;
|
content: {
|
||||||
|
'application/json': components['schemas']['Role'];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
/** @description Client error */
|
/** @description Client error */
|
||||||
400: {
|
400: {
|
||||||
|
|
Loading…
Reference in a new issue