完善接单平台通知配置
This commit is contained in:
@@ -7,4 +7,5 @@ export * from './kuaishou-industry'
|
||||
export * from './orders'
|
||||
export * from './tasks'
|
||||
export * from './dev-mock'
|
||||
export * from './notifications'
|
||||
export * from './worker-platform'
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import { apiGet } from '@/lib/http'
|
||||
|
||||
export type AdminNotification = {
|
||||
notificationId: number
|
||||
notificationType: string
|
||||
priority: 'normal' | 'high' | 'urgent' | string
|
||||
entityType: string
|
||||
entityId: number
|
||||
title: string
|
||||
body: string
|
||||
actionPath: string
|
||||
reminderCount: number
|
||||
soundEnabled: boolean
|
||||
lastRemindedAt: string | null
|
||||
createdAt: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
export function fetchAdminNotifications() {
|
||||
return apiGet<{ pendingCount: number; items: AdminNotification[] }>('/api/v1/admin/notifications')
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import type {
|
||||
WorkProductRule,
|
||||
WorkerFinanceConfig,
|
||||
WorkerFinanceRequest,
|
||||
WorkerPlatformNotificationConfig,
|
||||
WorkerLevel,
|
||||
WorkerListResponse,
|
||||
WorkerUser,
|
||||
@@ -203,6 +204,21 @@ export function saveAdminWorkerFinanceConfig(payload: {
|
||||
return apiPost<WorkerFinanceConfig>('/api/v1/admin/worker-platform/finance-config', payload)
|
||||
}
|
||||
|
||||
export function fetchAdminWorkerPlatformNotificationConfig() {
|
||||
return apiGet<WorkerPlatformNotificationConfig>(
|
||||
'/api/v1/admin/worker-platform/notification-config',
|
||||
)
|
||||
}
|
||||
|
||||
export function saveAdminWorkerPlatformNotificationConfig(
|
||||
payload: WorkerPlatformNotificationConfig,
|
||||
) {
|
||||
return apiPost<WorkerPlatformNotificationConfig>(
|
||||
'/api/v1/admin/worker-platform/notification-config',
|
||||
payload,
|
||||
)
|
||||
}
|
||||
|
||||
export function fetchAdminWorkerFinanceRequests(params?: Record<string, unknown>) {
|
||||
return apiGet<WorkerListResponse<WorkerFinanceRequest>>(
|
||||
'/api/v1/admin/worker-platform/finance-requests',
|
||||
|
||||
Reference in New Issue
Block a user