2023-08-13 13:12:29 +02:00
|
|
|
/*
|
2024-02-13 16:59:27 +01:00
|
|
|
* SPDX-FileCopyrightText: syuilo and misskey-project
|
2023-08-13 13:12:29 +02:00
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
*/
|
|
|
|
|
|
|
|
export const packedAnnouncementSchema = {
|
|
|
|
type: 'object',
|
|
|
|
properties: {
|
|
|
|
id: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
format: 'id',
|
|
|
|
example: 'xxxxxxxxxx',
|
|
|
|
},
|
|
|
|
createdAt: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
format: 'date-time',
|
|
|
|
},
|
|
|
|
updatedAt: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
format: 'date-time',
|
|
|
|
},
|
|
|
|
text: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
title: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
imageUrl: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: true,
|
|
|
|
},
|
|
|
|
icon: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
2024-01-30 11:53:53 +01:00
|
|
|
enum: ['info', 'warning', 'error', 'success'],
|
2023-08-13 13:12:29 +02:00
|
|
|
},
|
|
|
|
display: {
|
|
|
|
type: 'string',
|
|
|
|
optional: false, nullable: false,
|
2024-01-30 11:53:53 +01:00
|
|
|
enum: ['dialog', 'normal', 'banner'],
|
2023-08-13 13:12:29 +02:00
|
|
|
},
|
2023-11-21 03:13:56 +01:00
|
|
|
needConfirmationToRead: {
|
2023-08-13 13:12:29 +02:00
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
2023-11-21 03:13:56 +01:00
|
|
|
silence: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
forYou: {
|
2023-08-13 13:12:29 +02:00
|
|
|
type: 'boolean',
|
|
|
|
optional: false, nullable: false,
|
|
|
|
},
|
|
|
|
isRead: {
|
|
|
|
type: 'boolean',
|
|
|
|
optional: true, nullable: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
} as const;
|