typesを戻した
This commit is contained in:
parent
4646b535fc
commit
3695197202
5 changed files with 4 additions and 4 deletions
|
|
@ -5,7 +5,7 @@ declare var self: ServiceWorkerGlobalScope;
|
|||
|
||||
import { swLang } from '@/scripts/lang';
|
||||
import { cli } from '@/scripts/operations';
|
||||
import { pushNotificationDataMap } from '@/scripts/types';
|
||||
import { pushNotificationDataMap } from '@/types';
|
||||
import { getNoteSummary } from '@/scripts/get-note-summary';
|
||||
import getUserName from '@/scripts/get-user-name';
|
||||
import { I18n } from '@/scripts/i18n';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
declare var self: ServiceWorkerGlobalScope;
|
||||
|
||||
import { get } from 'idb-keyval';
|
||||
import { pushNotificationDataMap } from '@/scripts/types';
|
||||
import { pushNotificationDataMap } from '@/types';
|
||||
import { api } from '@/scripts/operations';
|
||||
|
||||
type Accounts = {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
declare var self: ServiceWorkerGlobalScope;
|
||||
|
||||
import * as Misskey from 'misskey-js';
|
||||
import { SwMessage, swMessageOrderType } from '@/scripts/types';
|
||||
import { SwMessage, swMessageOrderType } from '@/types';
|
||||
import { acct as getAcct } from '@/filters/user';
|
||||
import { getAccountFromId } from '@/scripts/get-account-from-id';
|
||||
import { getUrlWithLoginId } from '@/scripts/login-id';
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
import * as Misskey from 'misskey-js';
|
||||
|
||||
export type swMessageOrderType = 'post' | 'push';
|
||||
|
||||
export type SwMessage = {
|
||||
type: 'order';
|
||||
order: swMessageOrderType;
|
||||
loginId: string;
|
||||
url: string;
|
||||
[x: string]: any;
|
||||
};
|
||||
|
||||
// Defined also @/services/push-notification.ts#L7-L14
|
||||
type pushNotificationDataSourceMap = {
|
||||
notification: Misskey.entities.Notification;
|
||||
unreadMessagingMessage: Misskey.entities.MessagingMessage;
|
||||
readNotifications: { notificationIds: string[] };
|
||||
readAllNotifications: undefined;
|
||||
readAllMessagingMessages: undefined;
|
||||
readAllMessagingMessagesOfARoom: { userId: string } | { groupId: string };
|
||||
};
|
||||
|
||||
export type pushNotificationData<K extends keyof pushNotificationDataSourceMap> = {
|
||||
type: K;
|
||||
body: pushNotificationDataSourceMap[K];
|
||||
userId: string;
|
||||
};
|
||||
|
||||
export type pushNotificationDataMap = {
|
||||
[K in keyof pushNotificationDataSourceMap]: pushNotificationData<K>;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue