feat(shipping, admin, workspace, docs): 迭代货代模块、补充文档并处理合并冲突问题
This commit is contained in:
1 parent
4587b56900
commit
3c0e08377c
94 files changed
+29222
-1218
No files matched your search
@@ -9,6 +9,7 @@ import { requestJson } from '@/shared/api/client';
|
||||
import type { AdminUserRow } from '../types/admin.types';
|
||||
import type { AdminDashboardBadges, AdminDashboardSummary } from '../types/dashboard.types';
|
||||
import type { PaginatedResult } from '@/shared/types/pagination.types';
|
||||
import type { AdminLinkedServiceRow } from '../types/linked-service.types';
|
||||
import type {
|
||||
ApplicationReport,
|
||||
ApplicationSortKey,
|
||||
@@ -21,24 +22,6 @@ import type {
|
||||
const auth = () => ({ headers: getAuthHeaders() });
|
||||
const jsonAuth = () => ({ headers: { 'Content-Type': 'application/json', ...getAuthHeaders() } });
|
||||
|
||||
export type LinkedServicePayload = {
|
||||
name: string;
|
||||
url: string;
|
||||
description?: string;
|
||||
icon?: string;
|
||||
sort_order?: number;
|
||||
enabled?: boolean;
|
||||
is_enabled?: boolean;
|
||||
};
|
||||
|
||||
export const listLinkedServices = () => requestJson<any[]>('/api/admin/linked-services', auth());
|
||||
export const createLinkedService = (payload: LinkedServicePayload) =>
|
||||
requestJson<any>('/api/admin/linked-services', { method: 'POST', ...jsonAuth(), body: JSON.stringify(payload) });
|
||||
export const updateLinkedService = (id: number, payload: LinkedServicePayload) =>
|
||||
requestJson<any>(`/api/admin/linked-services/${id}`, { method: 'PUT', ...jsonAuth(), body: JSON.stringify(payload) });
|
||||
export const deleteLinkedService = (id: number) =>
|
||||
requestJson<void>(`/api/admin/linked-services/${id}`, { method: 'DELETE', ...auth() });
|
||||
|
||||
export type ShippingInventoryReadinessCheck = {
|
||||
code: string;
|
||||
status: 'passed' | 'pending' | 'failed' | 'stale' | 'empty';
|
||||
@@ -791,6 +774,16 @@ export const updateAnnouncement = (id: number, payload: Record<string, unknown>)
|
||||
export const deleteAnnouncement = (id: number) =>
|
||||
requestJson(`/api/admin/announcements/${id}`, { method: 'DELETE', ...auth() });
|
||||
|
||||
// Linked services(关联服务:侧栏跳转入口)
|
||||
export const listLinkedServices = () =>
|
||||
requestJson<AdminLinkedServiceRow[]>('/api/admin/linked-services', auth());
|
||||
export const createLinkedService = (payload: Record<string, unknown>) =>
|
||||
requestJson('/api/admin/linked-services', { method: 'POST', ...jsonAuth(), body: JSON.stringify(payload) });
|
||||
export const updateLinkedService = (id: number, payload: Record<string, unknown>) =>
|
||||
requestJson(`/api/admin/linked-services/${id}`, { method: 'PUT', ...jsonAuth(), body: JSON.stringify(payload) });
|
||||
export const deleteLinkedService = (id: number) =>
|
||||
requestJson(`/api/admin/linked-services/${id}`, { method: 'DELETE', ...auth() });
|
||||
|
||||
// Quick questions
|
||||
export const listAdminQuickQuestions = () => requestJson<any[]>('/api/admin/quick-questions', auth());
|
||||
export const saveAdminQuickQuestion = (url: string, method: string, payload: Record<string, unknown>) =>
|
||||
|
||||
Reference in new issue
Block a user