feat: refresh shared chat and server workflows

This commit is contained in:
2026-05-26 12:26:33 +09:00
parent 51e0099bea
commit c1d0f4c1db
82 changed files with 18604 additions and 12461 deletions

View File

@@ -72,6 +72,20 @@ export type WebPushSubscriptionPayload = {
};
};
export type WebPushSubscriptionItem = {
id: number;
endpoint: string;
deviceId: string;
clientId: string;
userAgent: string;
appOrigin: string;
appDomain: string;
enabled: boolean;
lastRegisteredAt: string | null;
createdAt: string;
updatedAt: string;
};
export type ClientNotificationPayload = {
title: string;
body: string;
@@ -97,6 +111,14 @@ export type ClientNotificationSendResult = {
reason?: string;
sentCount: number;
failedCount: number;
matchedCount?: number;
matchedSubscriptions?: Array<{
endpoint: string;
deviceId: string;
clientId: string;
appOrigin: string;
appDomain: string;
}>;
};
};
@@ -539,6 +561,11 @@ export async function fetchWebPushConfig() {
}
}
export async function fetchWebPushSubscriptions() {
const response = await request<{ items: WebPushSubscriptionItem[] }>('/notifications/subscriptions/web');
return Array.isArray(response.items) ? response.items : [];
}
export async function fetchNotificationMessages(params?: {
status?: NotificationMessageListStatus;
limit?: number;