add: json-schemaのnoteにpollの型定義を追加
This commit is contained in:
parent
a5c3ec3ad5
commit
c81934563a
packages
backend/src
misskey-js/src/autogen
|
@ -164,7 +164,7 @@ export class NoteEntityService implements OnModuleInit {
|
|||
|
||||
return {
|
||||
multiple: poll.multiple,
|
||||
expiresAt: poll.expiresAt,
|
||||
expiresAt: poll.expiresAt?.toISOString() ?? null,
|
||||
choices,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -117,6 +117,39 @@ export const packedNoteSchema = {
|
|||
poll: {
|
||||
type: 'object',
|
||||
optional: true, nullable: true,
|
||||
properties: {
|
||||
expiresAt: {
|
||||
type: 'string',
|
||||
optional: true, nullable: true,
|
||||
format: 'date-time',
|
||||
},
|
||||
multiple: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
choices: {
|
||||
type: 'array',
|
||||
optional: false, nullable: false,
|
||||
items: {
|
||||
type: 'object',
|
||||
optional: false, nullable: false,
|
||||
properties: {
|
||||
isVoted: {
|
||||
type: 'boolean',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
text: {
|
||||
type: 'string',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
votes: {
|
||||
type: 'number',
|
||||
optional: false, nullable: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
emojis: {
|
||||
type: 'object',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* version: 2023.12.2
|
||||
* generatedAt: 2024-01-08T06:48:05.059Z
|
||||
* generatedAt: 2024-01-08T13:32:03.180Z
|
||||
*/
|
||||
|
||||
import type { SwitchCaseResponseType } from '../api.js';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* version: 2023.12.2
|
||||
* generatedAt: 2024-01-08T06:48:05.055Z
|
||||
* generatedAt: 2024-01-08T13:32:03.177Z
|
||||
*/
|
||||
|
||||
import type {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* version: 2023.12.2
|
||||
* generatedAt: 2024-01-08T06:48:05.053Z
|
||||
* generatedAt: 2024-01-08T13:32:03.174Z
|
||||
*/
|
||||
|
||||
import { operations } from './types.js';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
* version: 2023.12.2
|
||||
* generatedAt: 2024-01-08T06:48:05.052Z
|
||||
* generatedAt: 2024-01-08T13:32:03.173Z
|
||||
*/
|
||||
|
||||
import { components } from './types.js';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
/*
|
||||
* version: 2023.12.2
|
||||
* generatedAt: 2024-01-08T06:48:04.940Z
|
||||
* generatedAt: 2024-01-08T13:32:03.048Z
|
||||
*/
|
||||
|
||||
/**
|
||||
|
@ -3791,7 +3791,16 @@ export type components = {
|
|||
fileIds?: string[];
|
||||
files?: components['schemas']['DriveFile'][];
|
||||
tags?: string[];
|
||||
poll?: Record<string, unknown> | null;
|
||||
poll?: ({
|
||||
/** Format: date-time */
|
||||
expiresAt?: string | null;
|
||||
multiple: boolean;
|
||||
choices: {
|
||||
isVoted: boolean;
|
||||
text: string;
|
||||
votes: number;
|
||||
}[];
|
||||
}) | null;
|
||||
emojis?: Record<string, never>;
|
||||
/**
|
||||
* Format: id
|
||||
|
|
Loading…
Reference in a new issue