egirlskey/packages/sw/src/types.ts
Shun Sakai c2370a1be6
chore: 著作権とライセンスについての情報を各ファイルに追加する (#11348)
* chore: Add the SPDX information to each file

Add copyright and licensing information as defined in version 3.0 of
the REUSE Specification.

* tweak format

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2023-07-27 14:31:52 +09:00

53 lines
1.1 KiB
TypeScript

/*
* SPDX-FileCopyrightText: syuilo and other misskey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
import type * as Misskey from 'misskey-js';
export type SwMessageOrderType = 'post' | 'push';
export type SwMessage = {
type: 'order';
order: SwMessageOrderType;
loginId?: string;
url: string;
[x: string]: unknown;
};
// Defined also @/core/PushNotificationService.ts#L12
type PushNotificationDataSourceMap = {
notification: Misskey.entities.Notification;
unreadAntennaNote: {
antenna: { id: string; name: string };
note: Misskey.entities.Note;
};
readAllNotifications: undefined;
};
export type PushNotificationData<K extends keyof PushNotificationDataSourceMap> = {
type: K;
body: PushNotificationDataSourceMap[K];
userId: string;
dateTime: number;
};
export type PushNotificationDataMap = {
[K in keyof PushNotificationDataSourceMap]: PushNotificationData<K>;
};
export type BadgeNames =
| 'null'
| 'antenna'
| 'arrow-back-up'
| 'at'
| 'chart-arrows'
| 'circle-check'
| 'medal'
| 'messages'
| 'plus'
| 'quote'
| 'repeat'
| 'user-plus'
| 'users';