add: json-schemaのnoteにpollの型定義を追加
This commit is contained in:
parent
a5c3ec3ad5
commit
c81934563a
|
@ -164,7 +164,7 @@ export class NoteEntityService implements OnModuleInit {
|
||||||
|
|
||||||
return {
|
return {
|
||||||
multiple: poll.multiple,
|
multiple: poll.multiple,
|
||||||
expiresAt: poll.expiresAt,
|
expiresAt: poll.expiresAt?.toISOString() ?? null,
|
||||||
choices,
|
choices,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,6 +117,39 @@ export const packedNoteSchema = {
|
||||||
poll: {
|
poll: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
optional: true, nullable: true,
|
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: {
|
emojis: {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* version: 2023.12.2
|
* version: 2023.12.2
|
||||||
* generatedAt: 2024-01-08T06:48:05.059Z
|
* generatedAt: 2024-01-08T13:32:03.180Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type { SwitchCaseResponseType } from '../api.js';
|
import type { SwitchCaseResponseType } from '../api.js';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* version: 2023.12.2
|
* version: 2023.12.2
|
||||||
* generatedAt: 2024-01-08T06:48:05.055Z
|
* generatedAt: 2024-01-08T13:32:03.177Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import type {
|
import type {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* version: 2023.12.2
|
* version: 2023.12.2
|
||||||
* generatedAt: 2024-01-08T06:48:05.053Z
|
* generatedAt: 2024-01-08T13:32:03.174Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { operations } from './types.js';
|
import { operations } from './types.js';
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* version: 2023.12.2
|
* version: 2023.12.2
|
||||||
* generatedAt: 2024-01-08T06:48:05.052Z
|
* generatedAt: 2024-01-08T13:32:03.173Z
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { components } from './types.js';
|
import { components } from './types.js';
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* version: 2023.12.2
|
* 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[];
|
fileIds?: string[];
|
||||||
files?: components['schemas']['DriveFile'][];
|
files?: components['schemas']['DriveFile'][];
|
||||||
tags?: string[];
|
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>;
|
emojis?: Record<string, never>;
|
||||||
/**
|
/**
|
||||||
* Format: id
|
* Format: id
|
||||||
|
|
Loading…
Reference in New Issue