2471 lines
58 KiB
TypeScript
2471 lines
58 KiB
TypeScript
import request from "./request";
|
|
import type { AdminSessionInfo } from "../utils/auth";
|
|
|
|
export interface DashboardCard {
|
|
title: string;
|
|
value: number;
|
|
desc: string;
|
|
}
|
|
|
|
export interface AdminLoginResponse {
|
|
token: string;
|
|
admin_info: AdminSessionInfo;
|
|
}
|
|
|
|
export interface AdminFileAsset {
|
|
file_id: string;
|
|
file_url: string;
|
|
thumbnail_url: string;
|
|
name?: string;
|
|
file_type?: string;
|
|
mime_type?: string;
|
|
}
|
|
|
|
export interface AdminTransferFlowSummary {
|
|
id: number;
|
|
internal_tag_no: string;
|
|
flow_status: string;
|
|
current_stage: string;
|
|
current_stage_text: string;
|
|
current_location: string;
|
|
current_location_text: string;
|
|
inbound_by_name: string;
|
|
inbound_at: string;
|
|
zhongjian_outbound_by_name: string;
|
|
zhongjian_outbound_at: string;
|
|
zhongjian_inbound_by_name: string;
|
|
zhongjian_inbound_at: string;
|
|
appraisal_started_by_name: string;
|
|
appraisal_started_at: string;
|
|
report_published_by_name: string;
|
|
report_published_at: string;
|
|
return_confirmed_by_name: string;
|
|
return_confirmed_at: string;
|
|
return_shipped_by_name: string;
|
|
return_shipped_at: string;
|
|
}
|
|
|
|
export interface AdminWarehouseWorkbenchContext {
|
|
order_info: {
|
|
id: number;
|
|
order_no: string;
|
|
appraisal_no: string;
|
|
service_provider: string;
|
|
service_provider_text: string;
|
|
source_channel: string;
|
|
source_channel_text: string;
|
|
source_customer_id: string;
|
|
order_status: string;
|
|
display_status: string;
|
|
};
|
|
product_info: {
|
|
product_name: string;
|
|
category_name: string;
|
|
brand_name: string;
|
|
color: string;
|
|
size_spec: string;
|
|
serial_no: string;
|
|
};
|
|
logistics_info: null | {
|
|
express_company: string;
|
|
tracking_no: string;
|
|
tracking_status: string;
|
|
};
|
|
return_address: null | {
|
|
consignee: string;
|
|
mobile: string;
|
|
full_address: string;
|
|
};
|
|
return_logistics: null | {
|
|
express_company: string;
|
|
tracking_no: string;
|
|
tracking_status: string;
|
|
};
|
|
transfer_flow: null | AdminTransferFlowSummary;
|
|
report_info: null | {
|
|
id: number;
|
|
report_no: string;
|
|
report_title: string;
|
|
report_status: string;
|
|
publish_time: string;
|
|
zhongjian_report_no: string;
|
|
report_entry_admin_name: string;
|
|
report_entered_at: string;
|
|
zhongjian_report_files: AdminFileAsset[];
|
|
};
|
|
flow_logs?: Array<{
|
|
id: number;
|
|
action_code: string;
|
|
action_text: string;
|
|
before_stage: string;
|
|
before_location: string;
|
|
after_stage: string;
|
|
after_location: string;
|
|
operator_name: string;
|
|
remark: string;
|
|
created_at: string;
|
|
inbound_attachments?: AdminFileAsset[];
|
|
packing_attachments?: AdminFileAsset[];
|
|
}>;
|
|
return_verification?: {
|
|
verified: boolean;
|
|
report_id: number;
|
|
report_no: string;
|
|
};
|
|
next_action?: string;
|
|
next_action_text?: string;
|
|
}
|
|
|
|
export interface AdminOrderListItem {
|
|
id: number;
|
|
order_no: string;
|
|
appraisal_no: string;
|
|
product_name: string;
|
|
category_name: string;
|
|
brand_name: string;
|
|
service_provider: string;
|
|
service_provider_text: string;
|
|
source_channel: string;
|
|
source_channel_text: string;
|
|
source_customer_id: string;
|
|
order_status: string;
|
|
display_status: string;
|
|
estimated_finish_time: string;
|
|
pay_amount: number;
|
|
created_at: string;
|
|
}
|
|
|
|
export interface AdminOrderDetail {
|
|
order_info: {
|
|
id: number;
|
|
order_no: string;
|
|
appraisal_no: string;
|
|
service_provider: string;
|
|
service_provider_text: string;
|
|
source_channel: string;
|
|
source_channel_text: string;
|
|
source_customer_id: string;
|
|
order_status: string;
|
|
display_status: string;
|
|
pay_amount: number;
|
|
estimated_finish_time: string;
|
|
created_at: string;
|
|
can_reassign_warehouse: boolean;
|
|
can_mark_received: boolean;
|
|
can_submit_return_logistics: boolean;
|
|
return_logistics_block_reason: string;
|
|
can_mark_return_received: boolean;
|
|
};
|
|
product_info: {
|
|
product_name: string;
|
|
category_id: number;
|
|
category_name: string;
|
|
brand_id: number;
|
|
brand_name: string;
|
|
color: string;
|
|
size_spec: string;
|
|
serial_no: string;
|
|
};
|
|
extra_info: {
|
|
purchase_channel: string;
|
|
purchase_price: number;
|
|
usage_status: string;
|
|
condition_desc: string;
|
|
remark: string;
|
|
};
|
|
shipping_target: null | {
|
|
warehouse_id?: number;
|
|
warehouse_name: string;
|
|
warehouse_code: string;
|
|
receiver_name: string;
|
|
receiver_mobile: string;
|
|
full_address: string;
|
|
service_time: string;
|
|
notice: string;
|
|
};
|
|
return_address: null | {
|
|
user_address_id: number;
|
|
consignee: string;
|
|
mobile: string;
|
|
full_address: string;
|
|
};
|
|
timeline: Array<{
|
|
node_text: string;
|
|
node_desc: string;
|
|
occurred_at: string;
|
|
}>;
|
|
logistics_info: null | {
|
|
express_company: string;
|
|
tracking_no: string;
|
|
tracking_status: string;
|
|
tracking_status_text: string;
|
|
latest_desc: string;
|
|
latest_time: string;
|
|
nodes: Array<{
|
|
node_time: string;
|
|
node_desc: string;
|
|
node_location: string;
|
|
}>;
|
|
};
|
|
return_logistics: null | {
|
|
express_company: string;
|
|
tracking_no: string;
|
|
tracking_status: string;
|
|
tracking_status_text: string;
|
|
latest_desc: string;
|
|
latest_time: string;
|
|
nodes: Array<{
|
|
node_time: string;
|
|
node_desc: string;
|
|
node_location: string;
|
|
}>;
|
|
};
|
|
supplement_task: null | {
|
|
reason: string;
|
|
deadline: string;
|
|
status: string;
|
|
items: Array<{
|
|
item_name: string;
|
|
guide_text: string;
|
|
}>;
|
|
};
|
|
report_summary: null | {
|
|
report_no: string;
|
|
report_title: string;
|
|
report_status: string;
|
|
publish_time: string;
|
|
};
|
|
}
|
|
|
|
export interface AdminOrderWarehouseOption {
|
|
id: number;
|
|
warehouse_name: string;
|
|
warehouse_code: string;
|
|
service_provider: string;
|
|
service_provider_text: string;
|
|
full_address: string;
|
|
receiver_name: string;
|
|
receiver_mobile: string;
|
|
service_time: string;
|
|
is_default: boolean;
|
|
supported_category_names: string[];
|
|
}
|
|
|
|
export interface AdminManualOrderMaterialItem {
|
|
item_code: string;
|
|
item_name: string;
|
|
is_required: boolean;
|
|
files: AdminFileAsset[];
|
|
}
|
|
|
|
export interface AdminManualOrderCreatePayload {
|
|
service_provider: string;
|
|
product_info: {
|
|
category_id: number;
|
|
brand_id: number;
|
|
brand_name: string;
|
|
product_name: string;
|
|
color: string;
|
|
size_spec: string;
|
|
serial_no: string;
|
|
};
|
|
extra_info: {
|
|
purchase_channel: string;
|
|
purchase_price: number;
|
|
usage_status: string;
|
|
condition_desc: string;
|
|
remark: string;
|
|
};
|
|
return_address: {
|
|
consignee: string;
|
|
mobile: string;
|
|
province: string;
|
|
city: string;
|
|
district: string;
|
|
detail_address: string;
|
|
};
|
|
materials: AdminManualOrderMaterialItem[];
|
|
}
|
|
|
|
export interface AdminManualOrderCreateResponse {
|
|
order_id: number;
|
|
order_no: string;
|
|
appraisal_no: string;
|
|
user_id: number;
|
|
next_status: "pending_shipping";
|
|
}
|
|
|
|
export interface AdminManualOrderMeta {
|
|
categories: Array<{
|
|
id: number;
|
|
name: string;
|
|
code: string;
|
|
supported_service_types: string[];
|
|
}>;
|
|
brands: Array<{
|
|
id: number;
|
|
name: string;
|
|
en_name: string;
|
|
code: string;
|
|
category_ids: number[];
|
|
supported_service_types: string[];
|
|
}>;
|
|
}
|
|
|
|
export interface CatalogOverviewCard {
|
|
title: string;
|
|
value: number;
|
|
desc: string;
|
|
}
|
|
|
|
export interface AdminCategoryItem {
|
|
id: number;
|
|
name: string;
|
|
code: string;
|
|
image_url: string;
|
|
sort_order: number;
|
|
is_enabled: boolean;
|
|
need_shipping: boolean;
|
|
supported_service_types: string[];
|
|
upload_template_count: number;
|
|
upload_template_item_count: number;
|
|
upload_template_summary: string;
|
|
appraisal_template_count: number;
|
|
appraisal_template_point_count: number;
|
|
appraisal_template_summary: string;
|
|
}
|
|
|
|
export interface AdminCategoryPayload {
|
|
id?: number;
|
|
name: string;
|
|
code: string;
|
|
image_url: string;
|
|
sort_order: number;
|
|
is_enabled: boolean;
|
|
need_shipping: boolean;
|
|
supported_service_types: string[];
|
|
}
|
|
|
|
export interface AdminUploadTemplateItem {
|
|
id?: number | null;
|
|
item_code: string;
|
|
item_name: string;
|
|
is_required: boolean;
|
|
guide_text: string;
|
|
sample_image_url: string;
|
|
max_upload_count: number;
|
|
sort_order: number;
|
|
is_enabled: boolean;
|
|
}
|
|
|
|
export interface AdminCatalogTemplateSampleImageAsset {
|
|
file_id: string;
|
|
file_url: string;
|
|
thumbnail_url: string;
|
|
name?: string;
|
|
}
|
|
|
|
export interface AdminCategoryUploadTemplate {
|
|
id: number | null;
|
|
category_id: number;
|
|
category_name: string;
|
|
service_provider: string;
|
|
service_provider_text: string;
|
|
name: string;
|
|
code: string;
|
|
is_enabled: boolean;
|
|
is_default: boolean;
|
|
items: AdminUploadTemplateItem[];
|
|
}
|
|
|
|
export interface AdminAppraisalTemplateKeyPoint {
|
|
id?: number | null;
|
|
point_code: string;
|
|
point_name: string;
|
|
point_type: "text" | "textarea" | "select" | "boolean";
|
|
options: string[];
|
|
sort_order: number;
|
|
is_required: boolean;
|
|
}
|
|
|
|
export interface AdminCategoryAppraisalTemplate {
|
|
id: number | null;
|
|
category_id: number;
|
|
category_name: string;
|
|
service_provider: string;
|
|
service_provider_text: string;
|
|
name: string;
|
|
code: string;
|
|
is_enabled: boolean;
|
|
is_default: boolean;
|
|
result_options: string[];
|
|
condition_options: string[];
|
|
valuation_hint: string;
|
|
key_points: AdminAppraisalTemplateKeyPoint[];
|
|
}
|
|
|
|
export interface AdminBrandItem {
|
|
id: number;
|
|
name: string;
|
|
en_name: string;
|
|
code: string;
|
|
sort_order: number;
|
|
is_enabled: boolean;
|
|
category_names: string;
|
|
category_ids?: number[];
|
|
supported_service_types: string[];
|
|
}
|
|
|
|
export interface AdminBrandPayload {
|
|
id?: number;
|
|
name: string;
|
|
en_name: string;
|
|
code: string;
|
|
sort_order: number;
|
|
is_enabled: boolean;
|
|
category_ids: number[];
|
|
supported_service_types: string[];
|
|
}
|
|
|
|
export interface AdminReportListItem {
|
|
id: number;
|
|
order_id: number;
|
|
order_no: string;
|
|
appraisal_no: string;
|
|
report_no: string;
|
|
report_type: string;
|
|
report_type_text: string;
|
|
report_title: string;
|
|
report_status: string;
|
|
report_status_text: string;
|
|
service_provider: string;
|
|
service_provider_text: string;
|
|
institution_name: string;
|
|
publish_time: string;
|
|
zhongjian_report_no: string;
|
|
report_entry_admin_name: string;
|
|
report_entered_at: string;
|
|
product_name: string;
|
|
category_name: string;
|
|
brand_name: string;
|
|
material_tag_bound: boolean;
|
|
material_tag_verify_code: string;
|
|
material_tag_bind_status: string;
|
|
}
|
|
|
|
export interface AdminReportDetail {
|
|
report_header: {
|
|
id: number;
|
|
order_id: number;
|
|
report_no: string;
|
|
report_type: string;
|
|
report_type_text: string;
|
|
report_title: string;
|
|
report_status: string;
|
|
report_status_text: string;
|
|
service_provider: string;
|
|
service_provider_text: string;
|
|
institution_name: string;
|
|
publish_time: string;
|
|
zhongjian_report_no: string;
|
|
report_entry_admin_id: number;
|
|
report_entry_admin_name: string;
|
|
report_entered_at: string;
|
|
};
|
|
product_info: Record<string, any>;
|
|
result_info: Record<string, any>;
|
|
appraisal_info: Record<string, any>;
|
|
valuation_info: Record<string, any>;
|
|
evidence_attachments: Array<{
|
|
file_id: string;
|
|
file_url: string;
|
|
thumbnail_url: string;
|
|
name?: string;
|
|
file_type?: string;
|
|
mime_type?: string;
|
|
}>;
|
|
zhongjian_report_files: AdminFileAsset[];
|
|
material_tag: null | AdminMaterialTagCode;
|
|
risk_notice_text: string;
|
|
verify_info: {
|
|
verify_status: string;
|
|
verify_url: string;
|
|
verify_qrcode_url: string;
|
|
report_page_url: string;
|
|
verify_count: number;
|
|
};
|
|
}
|
|
|
|
export interface AdminPublishReportResponse {
|
|
id: number;
|
|
report_status: string;
|
|
publish_time: string;
|
|
verify_url: string;
|
|
report_page_url: string;
|
|
}
|
|
|
|
export interface AdminManualInspectionPayload {
|
|
id?: number;
|
|
report_header: {
|
|
report_no: string;
|
|
report_title: string;
|
|
report_status: string;
|
|
service_provider: string;
|
|
institution_name: string;
|
|
publish_time: string;
|
|
};
|
|
product_info: {
|
|
product_name: string;
|
|
category_name: string;
|
|
brand_name: string;
|
|
color: string;
|
|
size_spec: string;
|
|
serial_no: string;
|
|
};
|
|
result_info: {
|
|
result_status: string;
|
|
result_text: string;
|
|
result_desc: string;
|
|
};
|
|
appraisal_info: {
|
|
appraiser_name: string;
|
|
reviewer_name: string;
|
|
appraisal_time: string;
|
|
};
|
|
valuation_info: {
|
|
condition_grade: string;
|
|
condition_desc: string;
|
|
valuation_min: number | string;
|
|
valuation_max: number | string;
|
|
valuation_desc: string;
|
|
};
|
|
risk_notice_text: string;
|
|
}
|
|
|
|
export interface AdminAppraisalTaskListItem {
|
|
id: number;
|
|
order_id: number;
|
|
order_no: string;
|
|
appraisal_no: string;
|
|
external_order_no: string;
|
|
service_provider: string;
|
|
service_provider_text: string;
|
|
task_stage: string;
|
|
task_stage_text: string;
|
|
status: string;
|
|
status_text: string;
|
|
assignee_id: number;
|
|
product_name: string;
|
|
category_name: string;
|
|
brand_name: string;
|
|
assignee_name: string;
|
|
result_text: string;
|
|
started_at: string;
|
|
submitted_at: string;
|
|
sla_deadline: string;
|
|
is_overtime: boolean;
|
|
display_status: string;
|
|
stage_tasks: Array<{
|
|
id: number;
|
|
task_stage: string;
|
|
task_stage_text: string;
|
|
status: string;
|
|
status_text: string;
|
|
assignee_id: number;
|
|
assignee_name: string;
|
|
result_text: string;
|
|
submitted_at: string;
|
|
is_current: boolean;
|
|
}>;
|
|
}
|
|
|
|
export interface AdminAppraisalTaskDetail {
|
|
task_info: {
|
|
id: number;
|
|
order_id: number;
|
|
order_no: string;
|
|
appraisal_no: string;
|
|
external_order_no: string;
|
|
service_provider: string;
|
|
service_provider_text: string;
|
|
task_stage: string;
|
|
task_stage_text: string;
|
|
status: string;
|
|
status_text: string;
|
|
assignee_id: number;
|
|
assignee_name: string;
|
|
started_at: string;
|
|
submitted_at: string;
|
|
sla_deadline: string;
|
|
is_overtime: boolean;
|
|
};
|
|
report_summary: null | {
|
|
id: number;
|
|
report_no: string;
|
|
report_status: string;
|
|
report_status_text: string;
|
|
};
|
|
product_info: {
|
|
product_name: string;
|
|
category_id: number;
|
|
category_name: string;
|
|
brand_id: number;
|
|
brand_name: string;
|
|
color: string;
|
|
size_spec: string;
|
|
serial_no: string;
|
|
};
|
|
extra_info: {
|
|
purchase_channel: string;
|
|
purchase_price: number;
|
|
usage_status: string;
|
|
condition_desc: string;
|
|
remark: string;
|
|
};
|
|
result_info: {
|
|
result_text: string;
|
|
result_desc: string;
|
|
condition_grade: string;
|
|
condition_desc?: string;
|
|
valuation_min: number;
|
|
valuation_max: number;
|
|
valuation_desc?: string;
|
|
attachments: Array<{
|
|
file_id: string;
|
|
file_url: string;
|
|
thumbnail_url: string;
|
|
name?: string;
|
|
file_type?: string;
|
|
mime_type?: string;
|
|
}>;
|
|
external_remark: string;
|
|
internal_remark: string;
|
|
key_points: Array<{
|
|
point_code: string;
|
|
point_name: string;
|
|
point_value: string;
|
|
point_remark: string;
|
|
}>;
|
|
};
|
|
prefill_result_info: null | {
|
|
result_text: string;
|
|
result_desc: string;
|
|
condition_grade: string;
|
|
condition_desc?: string;
|
|
valuation_min: number;
|
|
valuation_max: number;
|
|
valuation_desc?: string;
|
|
attachments: Array<{
|
|
file_id: string;
|
|
file_url: string;
|
|
thumbnail_url: string;
|
|
name?: string;
|
|
file_type?: string;
|
|
mime_type?: string;
|
|
}>;
|
|
external_remark: string;
|
|
internal_remark: string;
|
|
key_points: Array<{
|
|
point_code: string;
|
|
point_name: string;
|
|
point_value: string;
|
|
point_remark: string;
|
|
}>;
|
|
source_task_id: number;
|
|
source_stage: string;
|
|
source_stage_text: string;
|
|
};
|
|
appraisal_template: null | {
|
|
id: number;
|
|
name: string;
|
|
code: string;
|
|
service_provider: string;
|
|
service_provider_text: string;
|
|
result_options: string[];
|
|
condition_options: string[];
|
|
valuation_hint: string;
|
|
key_points: Array<{
|
|
point_code: string;
|
|
point_name: string;
|
|
point_type: "text" | "textarea" | "select" | "boolean";
|
|
options: string[];
|
|
sort_order: number;
|
|
is_required: boolean;
|
|
point_value: string;
|
|
point_remark: string;
|
|
}>;
|
|
};
|
|
timeline: Array<{
|
|
node_text: string;
|
|
node_desc: string;
|
|
occurred_at: string;
|
|
}>;
|
|
stage_tasks: Array<{
|
|
id: number;
|
|
task_stage: string;
|
|
task_stage_text: string;
|
|
status: string;
|
|
status_text: string;
|
|
assignee_name: string;
|
|
result_text: string;
|
|
submitted_at: string;
|
|
is_current: boolean;
|
|
}>;
|
|
materials: Array<{
|
|
item_name: string;
|
|
status: string;
|
|
source_type: string;
|
|
files: Array<{
|
|
file_id: string;
|
|
file_url: string;
|
|
thumbnail_url: string;
|
|
}>;
|
|
}>;
|
|
supplement_task: null | {
|
|
id: number;
|
|
reason: string;
|
|
deadline: string;
|
|
status: string;
|
|
items: Array<{
|
|
item_name: string;
|
|
guide_text: string;
|
|
is_required: boolean;
|
|
}>;
|
|
};
|
|
material_tag: null | AdminMaterialTagCode;
|
|
zhongjian_report: {
|
|
report_no: string;
|
|
report_entry_admin_id: number;
|
|
report_entry_admin_name: string;
|
|
report_entered_at: string;
|
|
files: AdminFileAsset[];
|
|
};
|
|
}
|
|
|
|
export interface AdminAppraisalTaskResultPayload {
|
|
id: number;
|
|
action: "save" | "submit";
|
|
product_info?: {
|
|
category_id?: number;
|
|
product_name: string;
|
|
category_name: string;
|
|
brand_name: string;
|
|
color: string;
|
|
size_spec: string;
|
|
serial_no: string;
|
|
};
|
|
result_text: string;
|
|
result_desc: string;
|
|
condition_grade: string;
|
|
condition_desc: string;
|
|
valuation_min: number;
|
|
valuation_max: number;
|
|
valuation_desc: string;
|
|
attachments: Array<{
|
|
file_id: string;
|
|
file_url: string;
|
|
thumbnail_url: string;
|
|
name?: string;
|
|
file_type?: string;
|
|
mime_type?: string;
|
|
}>;
|
|
key_points: Array<{
|
|
point_code: string;
|
|
point_name: string;
|
|
point_value: string;
|
|
point_remark: string;
|
|
}>;
|
|
external_remark: string;
|
|
internal_remark: string;
|
|
qr_input?: string;
|
|
}
|
|
|
|
export interface AdminAppraisalTaskSupplementPayload {
|
|
id: number;
|
|
reason: string;
|
|
deadline: string;
|
|
items: Array<{
|
|
item_name: string;
|
|
guide_text: string;
|
|
is_required: boolean;
|
|
}>;
|
|
}
|
|
|
|
export interface AdminAssignableAppraiserItem {
|
|
id: number;
|
|
name: string;
|
|
mobile: string;
|
|
role_names: string[];
|
|
role_codes: string[];
|
|
}
|
|
|
|
export interface AdminMessageOverviewCard {
|
|
title: string;
|
|
value: number;
|
|
desc: string;
|
|
}
|
|
|
|
export interface AdminMessageTemplateItem {
|
|
id: number;
|
|
template_name: string;
|
|
template_code: string;
|
|
channel: string;
|
|
channel_text: string;
|
|
event_code: string;
|
|
title: string;
|
|
content: string;
|
|
is_enabled: boolean;
|
|
}
|
|
|
|
export interface AdminMessageTemplatePayload {
|
|
id?: number;
|
|
template_name: string;
|
|
template_code: string;
|
|
channel: string;
|
|
event_code: string;
|
|
title: string;
|
|
content: string;
|
|
is_enabled: boolean;
|
|
}
|
|
|
|
export interface AdminMessageLogItem {
|
|
id: number;
|
|
user_id: number;
|
|
template_name: string;
|
|
biz_type: string;
|
|
biz_id: number;
|
|
channel: string;
|
|
channel_text: string;
|
|
status: string;
|
|
status_text: string;
|
|
fail_reason: string;
|
|
sent_at: string;
|
|
created_at: string;
|
|
}
|
|
|
|
export interface AdminTicketOverviewCard {
|
|
title: string;
|
|
value: number;
|
|
desc: string;
|
|
}
|
|
|
|
export interface AdminTicketItem {
|
|
id: number;
|
|
ticket_no: string;
|
|
ticket_type: string;
|
|
ticket_type_text: string;
|
|
biz_type: string;
|
|
biz_id: number;
|
|
order_id: number;
|
|
user_id: number;
|
|
status: string;
|
|
status_text: string;
|
|
priority: string;
|
|
priority_text: string;
|
|
title: string;
|
|
created_at: string;
|
|
updated_at: string;
|
|
}
|
|
|
|
export interface AdminTicketDetail {
|
|
ticket_info: {
|
|
id: number;
|
|
ticket_no: string;
|
|
ticket_type: string;
|
|
ticket_type_text: string;
|
|
biz_type: string;
|
|
biz_id: number;
|
|
order_id: number;
|
|
user_id: number;
|
|
status: string;
|
|
status_text: string;
|
|
priority: string;
|
|
priority_text: string;
|
|
title: string;
|
|
content: string;
|
|
created_at: string;
|
|
updated_at: string;
|
|
};
|
|
messages: Array<{
|
|
sender_type: string;
|
|
sender_type_text: string;
|
|
content: string;
|
|
attachments: Array<{
|
|
file_id: string;
|
|
file_url: string;
|
|
thumbnail_url: string;
|
|
name?: string;
|
|
}>;
|
|
created_at: string;
|
|
}>;
|
|
}
|
|
|
|
export interface AdminTicketPayload {
|
|
id: number;
|
|
status: string;
|
|
priority: string;
|
|
}
|
|
|
|
export interface AdminUserOverviewCard {
|
|
title: string;
|
|
value: number;
|
|
desc: string;
|
|
}
|
|
|
|
export interface AdminUserItem {
|
|
id: number;
|
|
nickname: string;
|
|
mobile: string;
|
|
status: string;
|
|
status_text: string;
|
|
password_set: boolean;
|
|
default_address: string;
|
|
order_count: number;
|
|
message_count: number;
|
|
ticket_count: number;
|
|
created_at: string;
|
|
updated_at: string;
|
|
}
|
|
|
|
export interface AdminUserDetail {
|
|
user_info: {
|
|
id: number;
|
|
nickname: string;
|
|
mobile: string;
|
|
status: string;
|
|
status_text: string;
|
|
password_set: boolean;
|
|
created_at: string;
|
|
updated_at: string;
|
|
};
|
|
addresses: Array<{
|
|
consignee: string;
|
|
mobile: string;
|
|
full_address: string;
|
|
is_default: boolean;
|
|
}>;
|
|
recent_orders: Array<{
|
|
order_no: string;
|
|
display_status: string;
|
|
pay_amount: number;
|
|
created_at: string;
|
|
}>;
|
|
recent_messages: Array<{
|
|
title: string;
|
|
content: string;
|
|
is_read: boolean;
|
|
created_at: string;
|
|
}>;
|
|
}
|
|
|
|
export interface AdminUserPayload {
|
|
id?: number;
|
|
nickname: string;
|
|
mobile: string;
|
|
status: string;
|
|
password?: string;
|
|
}
|
|
|
|
export interface EnterpriseCustomer {
|
|
id: number;
|
|
customer_code: string;
|
|
customer_name: string;
|
|
contact_name: string;
|
|
contact_mobile: string;
|
|
contact_email: string;
|
|
settlement_type: string;
|
|
settlement_type_text: string;
|
|
user_id: number;
|
|
webhook_url: string;
|
|
webhook_enabled: boolean;
|
|
status: string;
|
|
status_text: string;
|
|
remark: string;
|
|
app_count?: number;
|
|
order_count?: number;
|
|
event_count?: number;
|
|
created_at: string;
|
|
updated_at: string;
|
|
}
|
|
|
|
export interface EnterpriseCustomerPayload {
|
|
id?: number;
|
|
customer_name: string;
|
|
contact_name: string;
|
|
contact_mobile: string;
|
|
contact_email: string;
|
|
webhook_url: string;
|
|
webhook_enabled: boolean;
|
|
status: string;
|
|
remark: string;
|
|
}
|
|
|
|
export interface EnterpriseCustomerApp {
|
|
id: number;
|
|
customer_id: number;
|
|
app_name: string;
|
|
app_key: string;
|
|
secret_last4: string;
|
|
status: string;
|
|
status_text: string;
|
|
last_used_at: string;
|
|
created_at: string;
|
|
}
|
|
|
|
export interface EnterpriseCustomerOrderRef {
|
|
id: number;
|
|
customer_id: number;
|
|
external_order_no: string;
|
|
order_id: number;
|
|
order_no: string;
|
|
appraisal_no: string;
|
|
product_name: string;
|
|
order_status: string;
|
|
display_status: string;
|
|
pay_amount: number;
|
|
created_at: string;
|
|
}
|
|
|
|
export interface EnterpriseOrderEvent {
|
|
id: number;
|
|
customer_id: number;
|
|
order_id: number;
|
|
external_order_no: string;
|
|
event_code: string;
|
|
event_text: string;
|
|
status_code: string;
|
|
status_text: string;
|
|
occurred_at: string;
|
|
created_at: string;
|
|
}
|
|
|
|
export interface EnterpriseWebhookDelivery {
|
|
id: number;
|
|
event_id: number;
|
|
customer_id: number;
|
|
webhook_url: string;
|
|
app_key: string;
|
|
attempt_no: number;
|
|
delivery_status: string;
|
|
delivery_status_text: string;
|
|
http_status: number;
|
|
response_body: string;
|
|
error_message: string;
|
|
is_manual: boolean;
|
|
sent_at: string;
|
|
created_at: string;
|
|
}
|
|
|
|
export interface AdminWarehouseOverviewCard {
|
|
title: string;
|
|
value: number;
|
|
desc: string;
|
|
}
|
|
|
|
export interface AdminWarehouseItem {
|
|
id: number;
|
|
warehouse_name: string;
|
|
warehouse_code: string;
|
|
warehouse_type: string;
|
|
warehouse_type_text: string;
|
|
service_provider: string;
|
|
service_provider_text: string;
|
|
receiver_name: string;
|
|
receiver_mobile: string;
|
|
province: string;
|
|
city: string;
|
|
district: string;
|
|
detail_address: string;
|
|
full_address: string;
|
|
service_time: string;
|
|
notice: string;
|
|
supported_category_ids: number[];
|
|
supported_category_names: string[];
|
|
service_area_provinces: string[];
|
|
service_area_cities: string[];
|
|
status: string;
|
|
status_text: string;
|
|
is_default: boolean;
|
|
sort_order: number;
|
|
remark: string;
|
|
created_at: string;
|
|
updated_at: string;
|
|
}
|
|
|
|
export interface AdminWarehousePayload {
|
|
id?: number;
|
|
warehouse_name: string;
|
|
warehouse_code: string;
|
|
service_provider: string;
|
|
receiver_name: string;
|
|
receiver_mobile: string;
|
|
province: string;
|
|
city: string;
|
|
district: string;
|
|
detail_address: string;
|
|
service_time: string;
|
|
notice: string;
|
|
supported_category_ids: number[];
|
|
service_area_provinces: string[];
|
|
service_area_cities: string[];
|
|
status: string;
|
|
is_default: boolean;
|
|
sort_order: number;
|
|
remark: string;
|
|
}
|
|
|
|
export interface AdminMaterialTagCode {
|
|
id: number;
|
|
batch_id: number;
|
|
qr_token: string;
|
|
qr_url: string;
|
|
qr_image_url: string;
|
|
qr_image_path: string;
|
|
qr_image_status: string;
|
|
qr_image_status_text: string;
|
|
qr_image_error: string;
|
|
qr_image_generated_at: string;
|
|
verify_code: string;
|
|
status: string;
|
|
status_text: string;
|
|
invalidated_at: string;
|
|
invalidated_by_name: string;
|
|
invalid_reason: string;
|
|
bind_status: string;
|
|
bind_status_text: string;
|
|
report_id: number;
|
|
report_no: string;
|
|
report_status: string;
|
|
scan_count: number;
|
|
verify_count: number;
|
|
bound_at: string;
|
|
bound_by_name: string;
|
|
created_at: string;
|
|
}
|
|
|
|
export interface AdminMaterialBatchItem {
|
|
id: number;
|
|
batch_no: string;
|
|
total_count: number;
|
|
status: string;
|
|
status_text: string;
|
|
invalidated_at: string;
|
|
invalidated_by_name: string;
|
|
invalid_reason: string;
|
|
package_status: string;
|
|
package_status_text: string;
|
|
package_url: string;
|
|
package_error: string;
|
|
package_generated_at: string;
|
|
package_purged_at: string;
|
|
bound_count: number;
|
|
qr_image_generated_count: number;
|
|
qr_image_failed_count: number;
|
|
qr_image_pending_count: number;
|
|
download_count: number;
|
|
remark: string;
|
|
created_by_name: string;
|
|
last_downloaded_at: string;
|
|
created_at: string;
|
|
matched_codes: AdminMaterialTagCode[];
|
|
}
|
|
|
|
export interface AdminMaterialBatchDetail {
|
|
batch: {
|
|
id: number;
|
|
batch_no: string;
|
|
total_count: number;
|
|
status: string;
|
|
status_text: string;
|
|
invalidated_at: string;
|
|
invalidated_by_name: string;
|
|
invalid_reason: string;
|
|
package_status: string;
|
|
package_status_text: string;
|
|
package_url: string;
|
|
package_error: string;
|
|
package_generated_at: string;
|
|
package_purged_at: string;
|
|
qr_image_generated_count: number;
|
|
qr_image_failed_count: number;
|
|
qr_image_pending_count: number;
|
|
download_count: number;
|
|
remark: string;
|
|
created_by_name: string;
|
|
last_downloaded_at: string;
|
|
created_at: string;
|
|
};
|
|
codes: AdminMaterialTagCode[];
|
|
}
|
|
|
|
export interface AdminAccessOverviewCard {
|
|
title: string;
|
|
value: number;
|
|
desc: string;
|
|
}
|
|
|
|
export interface AdminManagerItem {
|
|
id: number;
|
|
name: string;
|
|
mobile: string;
|
|
email: string;
|
|
status: string;
|
|
status_text: string;
|
|
role_ids: number[];
|
|
role_names: string[];
|
|
last_login_at: string;
|
|
created_at: string;
|
|
}
|
|
|
|
export interface AdminRoleItem {
|
|
id: number;
|
|
name: string;
|
|
code: string;
|
|
status: string;
|
|
status_text: string;
|
|
permission_ids: number[];
|
|
permission_names: string[];
|
|
admin_count: number;
|
|
created_at: string;
|
|
}
|
|
|
|
export interface AdminPermissionItem {
|
|
id: number;
|
|
name: string;
|
|
code: string;
|
|
module: string;
|
|
action: string;
|
|
module_text: string;
|
|
}
|
|
|
|
export interface AdminManagerPayload {
|
|
id?: number;
|
|
name: string;
|
|
mobile: string;
|
|
email: string;
|
|
password?: string;
|
|
status: string;
|
|
role_ids: number[];
|
|
}
|
|
|
|
export interface AdminRolePayload {
|
|
id?: number;
|
|
name: string;
|
|
code: string;
|
|
status: string;
|
|
permission_ids: number[];
|
|
}
|
|
|
|
export interface AdminSystemConfigGroupItem {
|
|
group_code: string;
|
|
group_name: string;
|
|
group_desc: string;
|
|
items: Array<{
|
|
config_key: string;
|
|
title: string;
|
|
field_type: string;
|
|
placeholder: string;
|
|
remark: string;
|
|
is_secret: boolean;
|
|
value: string;
|
|
options?: Array<{
|
|
label: string;
|
|
value: string;
|
|
}>;
|
|
visible_when?: {
|
|
config_key: string;
|
|
equals: string;
|
|
} | null;
|
|
}>;
|
|
}
|
|
|
|
export interface AdminSystemConfigUploadResult {
|
|
config_group: string;
|
|
config_key: string;
|
|
config_value: string;
|
|
file_name: string;
|
|
original_name: string;
|
|
}
|
|
|
|
export interface AdminPageVisualsConfig {
|
|
order_background_image_url: string;
|
|
report_background_image_url: string;
|
|
}
|
|
|
|
export interface AdminContentHomeConfig {
|
|
banners: Array<{
|
|
title: string;
|
|
subtitle: string;
|
|
description: string;
|
|
background_image_url: string;
|
|
}>;
|
|
page_visuals: AdminPageVisualsConfig;
|
|
service_entries: Array<{
|
|
service_provider: string;
|
|
title: string;
|
|
tag: string;
|
|
description: string;
|
|
meta: string;
|
|
}>;
|
|
category_visuals: Array<{
|
|
category_name: string;
|
|
category_code: string;
|
|
image_url: string;
|
|
}>;
|
|
quick_entries: Array<{
|
|
code: string;
|
|
title: string;
|
|
desc: string;
|
|
}>;
|
|
trust_metrics: Array<{
|
|
value: string;
|
|
label: string;
|
|
}>;
|
|
trust_points: Array<{
|
|
title: string;
|
|
desc: string;
|
|
}>;
|
|
faqs: string[];
|
|
}
|
|
|
|
export type AdminContentHomePayload = Omit<AdminContentHomeConfig, "category_visuals"> & {
|
|
category_visuals?: AdminContentHomeConfig["category_visuals"];
|
|
};
|
|
|
|
export interface AdminContentImageAsset {
|
|
file_id: string;
|
|
file_url: string;
|
|
thumbnail_url: string;
|
|
name?: string;
|
|
}
|
|
|
|
export interface AdminContentPolicyItem {
|
|
code: string;
|
|
title: string;
|
|
desc: string;
|
|
target_url: string;
|
|
article_id: number;
|
|
}
|
|
|
|
export interface AdminContentPolicyConfig {
|
|
legal_entries: AdminContentPolicyItem[];
|
|
appraisal_agreements: AdminContentPolicyItem[];
|
|
}
|
|
|
|
export interface AdminContentMetaConfig {
|
|
help_categories: Array<{
|
|
code: string;
|
|
title: string;
|
|
desc: string;
|
|
}>;
|
|
report_risk_defaults: Array<{
|
|
report_type: string;
|
|
title: string;
|
|
text: string;
|
|
}>;
|
|
ticket_types: Array<{
|
|
code: string;
|
|
title: string;
|
|
hint: string;
|
|
quick_desc: string;
|
|
}>;
|
|
ticket_statuses: Array<{
|
|
code: string;
|
|
title: string;
|
|
desc: string;
|
|
}>;
|
|
message_events: Array<{
|
|
event_code: string;
|
|
title: string;
|
|
desc: string;
|
|
}>;
|
|
message_page_copy: {
|
|
title: string;
|
|
desc: string;
|
|
};
|
|
}
|
|
|
|
export interface AdminHelpArticleItem {
|
|
id: number;
|
|
category: "service" | "report" | "shipping" | "support";
|
|
category_text: string;
|
|
title: string;
|
|
summary: string;
|
|
keywords: string[];
|
|
content_blocks: string[];
|
|
is_recommended: boolean;
|
|
is_enabled: boolean;
|
|
sort_order: number;
|
|
updated_at: string;
|
|
}
|
|
|
|
export interface AdminHelpArticlePayload {
|
|
id?: number;
|
|
category: "service" | "report" | "shipping" | "support";
|
|
title: string;
|
|
summary: string;
|
|
keywords: string[];
|
|
content_blocks: string[];
|
|
is_recommended: boolean;
|
|
is_enabled: boolean;
|
|
sort_order: number;
|
|
}
|
|
|
|
export const adminApi = {
|
|
login(mobile: string, password: string) {
|
|
return request.post("/api/admin/auth/login", {
|
|
mobile,
|
|
password,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminLoginResponse;
|
|
}>;
|
|
},
|
|
getAuthMe() {
|
|
return request.get("/api/admin/auth/me") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
admin_info: AdminSessionInfo;
|
|
};
|
|
}>;
|
|
},
|
|
logout() {
|
|
return request.post("/api/admin/auth/logout") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: Record<string, never>;
|
|
}>;
|
|
},
|
|
getDashboard() {
|
|
return request.get("/api/admin/dashboard") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
cards: DashboardCard[];
|
|
};
|
|
}>;
|
|
},
|
|
getOrders(params?: Record<string, string>) {
|
|
return request.get("/api/admin/orders", { params }) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: AdminOrderListItem[];
|
|
};
|
|
}>;
|
|
},
|
|
getOrderDetail(id: number) {
|
|
return request.get("/api/admin/order/detail", {
|
|
params: { id },
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminOrderDetail;
|
|
}>;
|
|
},
|
|
receiveOrderLogistics(id: number) {
|
|
return request.post("/api/admin/order/logistics/receive", {
|
|
id,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: { id: number };
|
|
}>;
|
|
},
|
|
saveOrderReturnLogistics(payload: {
|
|
id: number;
|
|
express_company: string;
|
|
tracking_no: string;
|
|
}) {
|
|
return request.post("/api/admin/order/return-logistics/save", payload) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
id: number;
|
|
express_company: string;
|
|
tracking_no: string;
|
|
};
|
|
}>;
|
|
},
|
|
receiveOrderReturnLogistics(id: number) {
|
|
return request.post("/api/admin/order/return-logistics/receive", {
|
|
id,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: { id: number };
|
|
}>;
|
|
},
|
|
getOrderWarehouseOptions(id: number) {
|
|
return request.get("/api/admin/order/warehouse/options", {
|
|
params: { id },
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: AdminOrderWarehouseOption[];
|
|
};
|
|
}>;
|
|
},
|
|
reassignOrderWarehouse(id: number, warehouseId: number) {
|
|
return request.post("/api/admin/order/warehouse/reassign", {
|
|
id,
|
|
warehouse_id: warehouseId,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
id: number;
|
|
warehouse_id: number;
|
|
warehouse_name: string;
|
|
};
|
|
}>;
|
|
},
|
|
createManualOrder(data: AdminManualOrderCreatePayload) {
|
|
return request.post("/api/admin/manual-order/create", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminManualOrderCreateResponse;
|
|
}>;
|
|
},
|
|
getManualOrderMeta() {
|
|
return request.get("/api/admin/manual-order/meta") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminManualOrderMeta;
|
|
}>;
|
|
},
|
|
uploadManualOrderFile(file: File) {
|
|
const formData = new FormData();
|
|
formData.append("file", file);
|
|
return request.post("/api/admin/manual-order/file/upload", formData, {
|
|
headers: {
|
|
"Content-Type": "multipart/form-data",
|
|
},
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminFileAsset;
|
|
}>;
|
|
},
|
|
getCatalogOverview() {
|
|
return request.get("/api/admin/catalog/overview") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
cards: CatalogOverviewCard[];
|
|
};
|
|
}>;
|
|
},
|
|
getCategories() {
|
|
return request.get("/api/admin/catalog/categories") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: AdminCategoryItem[];
|
|
};
|
|
}>;
|
|
},
|
|
getBrands() {
|
|
return request.get("/api/admin/catalog/brands") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: AdminBrandItem[];
|
|
};
|
|
}>;
|
|
},
|
|
getCategoryUploadTemplates(categoryId: number) {
|
|
return request.get("/api/admin/catalog/upload-templates", {
|
|
params: { category_id: categoryId },
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
category: {
|
|
id: number;
|
|
name: string;
|
|
code: string;
|
|
};
|
|
list: AdminCategoryUploadTemplate[];
|
|
};
|
|
}>;
|
|
},
|
|
getCategoryAppraisalTemplates(categoryId: number) {
|
|
return request.get("/api/admin/catalog/appraisal-templates", {
|
|
params: { category_id: categoryId },
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
category: {
|
|
id: number;
|
|
name: string;
|
|
code: string;
|
|
};
|
|
template: AdminCategoryAppraisalTemplate;
|
|
list: AdminCategoryAppraisalTemplate[];
|
|
};
|
|
}>;
|
|
},
|
|
saveCategory(data: AdminCategoryPayload) {
|
|
return request.post("/api/admin/catalog/category/save", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: { id: number };
|
|
}>;
|
|
},
|
|
saveCategoryUploadTemplates(categoryId: number, templates: AdminCategoryUploadTemplate[]) {
|
|
return request.post("/api/admin/catalog/upload-templates/save", {
|
|
category_id: categoryId,
|
|
templates,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
category_id: number;
|
|
};
|
|
}>;
|
|
},
|
|
saveCategoryAppraisalTemplates(categoryId: number, template: AdminCategoryAppraisalTemplate) {
|
|
return request.post("/api/admin/catalog/appraisal-templates/save", {
|
|
category_id: categoryId,
|
|
template,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
category_id: number;
|
|
};
|
|
}>;
|
|
},
|
|
uploadCatalogTemplateSampleImage(file: File) {
|
|
const formData = new FormData();
|
|
formData.append("file", file);
|
|
return request.post("/api/admin/catalog/upload-template/sample-image/upload", formData, {
|
|
headers: {
|
|
"Content-Type": "multipart/form-data",
|
|
},
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminCatalogTemplateSampleImageAsset;
|
|
}>;
|
|
},
|
|
deleteCatalogTemplateSampleImage(fileUrl: string) {
|
|
return request.post("/api/admin/catalog/upload-template/sample-image/delete", {
|
|
file_url: fileUrl,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: { file_url: string };
|
|
}>;
|
|
},
|
|
saveBrand(data: AdminBrandPayload) {
|
|
return request.post("/api/admin/catalog/brand/save", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: { id: number };
|
|
}>;
|
|
},
|
|
getReports(params?: Record<string, string>) {
|
|
return request.get("/api/admin/reports", { params }) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: AdminReportListItem[];
|
|
};
|
|
}>;
|
|
},
|
|
getReportDetail(id: number) {
|
|
return request.get("/api/admin/report/detail", {
|
|
params: { id },
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminReportDetail;
|
|
}>;
|
|
},
|
|
publishReport(id: number, qrInput = "") {
|
|
return request.post("/api/admin/report/publish", {
|
|
id,
|
|
qr_input: qrInput,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminPublishReportResponse & { material_tag?: AdminMaterialTagCode | null };
|
|
}>;
|
|
},
|
|
saveInspectionReport(data: AdminManualInspectionPayload) {
|
|
return request.post("/api/admin/report/inspection/save", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminPublishReportResponse;
|
|
}>;
|
|
},
|
|
getAppraisalTasks(params?: Record<string, string>) {
|
|
return request.get("/api/admin/appraisal-tasks", { params }) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: AdminAppraisalTaskListItem[];
|
|
};
|
|
}>;
|
|
},
|
|
getAppraisalTaskDetail(id: number) {
|
|
return request.get("/api/admin/appraisal-task/detail", {
|
|
params: { id },
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminAppraisalTaskDetail;
|
|
}>;
|
|
},
|
|
getAppraisalTaskAssignableAdmins(id: number) {
|
|
return request.get("/api/admin/appraisal-task/assignable-admins", {
|
|
params: { id },
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: AdminAssignableAppraiserItem[];
|
|
};
|
|
}>;
|
|
},
|
|
assignAppraisalTask(data: {
|
|
id: number;
|
|
assignee_id: number;
|
|
}) {
|
|
return request.post("/api/admin/appraisal-task/assign", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
id: number;
|
|
assignee_id: number;
|
|
assignee_name: string;
|
|
};
|
|
}>;
|
|
},
|
|
saveAppraisalTaskResult(data: AdminAppraisalTaskResultPayload) {
|
|
return request.post("/api/admin/appraisal-task/save-result", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: { id: number };
|
|
}>;
|
|
},
|
|
bindAppraisalTaskMaterialTag(data: { id: number; qr_input: string }) {
|
|
return request.post("/api/admin/appraisal-task/material-tag/bind", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
id: number;
|
|
material_tag: AdminMaterialTagCode;
|
|
};
|
|
}>;
|
|
},
|
|
publishAppraisalTaskWithMaterialTag(data: { id: number; qr_input: string }) {
|
|
return request.post("/api/admin/appraisal-task/material-tag/publish", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
id: number;
|
|
material_tag: AdminMaterialTagCode;
|
|
report: AdminPublishReportResponse;
|
|
};
|
|
}>;
|
|
},
|
|
scanAppraisalTransferTag(internalTagNo: string) {
|
|
return request.post("/api/admin/appraisal-task/transfer-tag/scan", {
|
|
internal_tag_no: internalTagNo,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
task_id: number;
|
|
order_id: number;
|
|
service_provider: string;
|
|
service_provider_text: string;
|
|
};
|
|
}>;
|
|
},
|
|
saveZhongjianAppraisalReport(data: Record<string, unknown>) {
|
|
return request.post("/api/admin/appraisal-task/zhongjian-report/save", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
id: number;
|
|
report: AdminPublishReportResponse;
|
|
};
|
|
}>;
|
|
},
|
|
uploadAppraisalEvidenceFile(file: File) {
|
|
const formData = new FormData();
|
|
formData.append("file", file);
|
|
return request.post("/api/admin/appraisal-task/evidence/upload", formData, {
|
|
headers: {
|
|
"Content-Type": "multipart/form-data",
|
|
},
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
file_id: string;
|
|
file_url: string;
|
|
thumbnail_url: string;
|
|
name?: string;
|
|
file_type?: string;
|
|
mime_type?: string;
|
|
};
|
|
}>;
|
|
},
|
|
deleteAppraisalEvidenceFile(fileUrl: string) {
|
|
return request.post("/api/admin/appraisal-task/evidence/delete", {
|
|
file_url: fileUrl,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: { file_url: string };
|
|
}>;
|
|
},
|
|
lookupWarehouseInbound(inboundNo: string) {
|
|
return request.get("/api/admin/warehouse-workbench/inbound/lookup", {
|
|
params: { inbound_no: inboundNo },
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminWarehouseWorkbenchContext;
|
|
}>;
|
|
},
|
|
receiveWarehouseInbound(data: { inbound_no?: string; tracking_no?: string; internal_tag_no: string; inbound_attachments?: AdminFileAsset[] }) {
|
|
return request.post("/api/admin/warehouse-workbench/inbound/receive", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminWarehouseWorkbenchContext;
|
|
}>;
|
|
},
|
|
lookupZhongjianWarehouseTransfer(internalTagNo: string) {
|
|
return request.get("/api/admin/warehouse-workbench/zhongjian/lookup", {
|
|
params: { internal_tag_no: internalTagNo },
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminWarehouseWorkbenchContext;
|
|
}>;
|
|
},
|
|
zhongjianWarehouseOutbound(internalTagNo: string) {
|
|
return request.post("/api/admin/warehouse-workbench/zhongjian/outbound", {
|
|
internal_tag_no: internalTagNo,
|
|
}) as Promise<{ code: number; message: string; data: AdminWarehouseWorkbenchContext }>;
|
|
},
|
|
zhongjianWarehouseInbound(internalTagNo: string) {
|
|
return request.post("/api/admin/warehouse-workbench/zhongjian/inbound", {
|
|
internal_tag_no: internalTagNo,
|
|
}) as Promise<{ code: number; message: string; data: AdminWarehouseWorkbenchContext }>;
|
|
},
|
|
lookupWarehouseReturn(internalTagNo: string) {
|
|
return request.get("/api/admin/warehouse-workbench/return/lookup", {
|
|
params: { internal_tag_no: internalTagNo },
|
|
}) as Promise<{ code: number; message: string; data: AdminWarehouseWorkbenchContext }>;
|
|
},
|
|
verifyWarehouseReturnMaterialTag(data: { internal_tag_no: string; qr_input: string }) {
|
|
return request.post("/api/admin/warehouse-workbench/return/material-tag/verify", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminWarehouseWorkbenchContext;
|
|
}>;
|
|
},
|
|
confirmWarehouseReturnReport(data: { internal_tag_no: string; report_id: number }) {
|
|
return request.post("/api/admin/warehouse-workbench/return/report/confirm", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminWarehouseWorkbenchContext;
|
|
}>;
|
|
},
|
|
confirmWarehouseReturnZhongjian(internalTagNo: string) {
|
|
return request.post("/api/admin/warehouse-workbench/return/zhongjian/confirm", {
|
|
internal_tag_no: internalTagNo,
|
|
}) as Promise<{ code: number; message: string; data: AdminWarehouseWorkbenchContext }>;
|
|
},
|
|
uploadWarehouseReturnPackingFile(file: File) {
|
|
const formData = new FormData();
|
|
formData.append("file", file);
|
|
return request.post("/api/admin/warehouse-workbench/return/packing/upload", formData, {
|
|
headers: {
|
|
"Content-Type": "multipart/form-data",
|
|
},
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminFileAsset;
|
|
}>;
|
|
},
|
|
shipWarehouseReturn(data: { internal_tag_no: string; express_company: string; tracking_no: string; packing_attachments?: AdminFileAsset[] }) {
|
|
return request.post("/api/admin/warehouse-workbench/return/ship", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminWarehouseWorkbenchContext;
|
|
}>;
|
|
},
|
|
requestAppraisalTaskSupplement(data: AdminAppraisalTaskSupplementPayload) {
|
|
return request.post("/api/admin/appraisal-task/request-supplement", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: { id: number; supplement_task_id: number };
|
|
}>;
|
|
},
|
|
getMessageOverview() {
|
|
return request.get("/api/admin/messages/overview") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
cards: AdminMessageOverviewCard[];
|
|
};
|
|
}>;
|
|
},
|
|
getMessageTemplates() {
|
|
return request.get("/api/admin/messages/templates") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: AdminMessageTemplateItem[];
|
|
};
|
|
}>;
|
|
},
|
|
getMessageLogs() {
|
|
return request.get("/api/admin/messages/logs") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: AdminMessageLogItem[];
|
|
};
|
|
}>;
|
|
},
|
|
saveMessageTemplate(data: AdminMessageTemplatePayload) {
|
|
return request.post("/api/admin/messages/template/save", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: { id: number };
|
|
}>;
|
|
},
|
|
getTicketOverview() {
|
|
return request.get("/api/admin/tickets/overview") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
cards: AdminTicketOverviewCard[];
|
|
};
|
|
}>;
|
|
},
|
|
getTickets(params?: Record<string, string>) {
|
|
return request.get("/api/admin/tickets", { params }) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: AdminTicketItem[];
|
|
};
|
|
}>;
|
|
},
|
|
getTicketDetail(id: number) {
|
|
return request.get("/api/admin/ticket/detail", {
|
|
params: { id },
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminTicketDetail;
|
|
}>;
|
|
},
|
|
saveTicket(data: AdminTicketPayload) {
|
|
return request.post("/api/admin/ticket/save", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: { id: number };
|
|
}>;
|
|
},
|
|
replyTicket(
|
|
ticketId: number,
|
|
content: string,
|
|
attachments: Array<{
|
|
file_id: string;
|
|
file_url: string;
|
|
thumbnail_url: string;
|
|
name?: string;
|
|
}> = [],
|
|
) {
|
|
return request.post("/api/admin/ticket/reply", {
|
|
ticket_id: ticketId,
|
|
content,
|
|
attachments,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: { ticket_id: number };
|
|
}>;
|
|
},
|
|
uploadTicketFile(file: File) {
|
|
const formData = new FormData();
|
|
formData.append("file", file);
|
|
return request.post("/api/admin/ticket/file/upload", formData, {
|
|
headers: {
|
|
"Content-Type": "multipart/form-data",
|
|
},
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
file_id: string;
|
|
file_url: string;
|
|
thumbnail_url: string;
|
|
name?: string;
|
|
};
|
|
}>;
|
|
},
|
|
deleteTicketFile(fileUrl: string) {
|
|
return request.post("/api/admin/ticket/file/delete", {
|
|
file_url: fileUrl,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: { file_url: string };
|
|
}>;
|
|
},
|
|
getUserOverview() {
|
|
return request.get("/api/admin/users/overview") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
cards: AdminUserOverviewCard[];
|
|
};
|
|
}>;
|
|
},
|
|
getUsers(params?: Record<string, string>) {
|
|
return request.get("/api/admin/users", { params }) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: AdminUserItem[];
|
|
};
|
|
}>;
|
|
},
|
|
getUserDetail(id: number) {
|
|
return request.get("/api/admin/user/detail", {
|
|
params: { id },
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminUserDetail;
|
|
}>;
|
|
},
|
|
saveUser(data: AdminUserPayload) {
|
|
return request.post("/api/admin/user/save", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: { id: number };
|
|
}>;
|
|
},
|
|
getCustomers(params?: Record<string, string>) {
|
|
return request.get("/api/admin/customers", { params }) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: EnterpriseCustomer[];
|
|
};
|
|
}>;
|
|
},
|
|
getCustomerDetail(id: number) {
|
|
return request.get("/api/admin/customer/detail", {
|
|
params: { id },
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
customer: EnterpriseCustomer;
|
|
apps: EnterpriseCustomerApp[];
|
|
};
|
|
}>;
|
|
},
|
|
saveCustomer(data: EnterpriseCustomerPayload) {
|
|
return request.post("/api/admin/customer/save", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: { id: number };
|
|
}>;
|
|
},
|
|
createCustomerApp(customerId: number, appName: string) {
|
|
return request.post("/api/admin/customer/app/create", {
|
|
customer_id: customerId,
|
|
app_name: appName,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
app: EnterpriseCustomerApp;
|
|
app_secret: string;
|
|
};
|
|
}>;
|
|
},
|
|
updateCustomerAppStatus(id: number, status: string) {
|
|
return request.post("/api/admin/customer/app/status", {
|
|
id,
|
|
status,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: { id: number; status: string };
|
|
}>;
|
|
},
|
|
resetCustomerAppSecret(id: number) {
|
|
return request.post("/api/admin/customer/app/reset-secret", {
|
|
id,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
app: EnterpriseCustomerApp;
|
|
app_secret: string;
|
|
};
|
|
}>;
|
|
},
|
|
getCustomerOrders(customerId: number) {
|
|
return request.get("/api/admin/customer/orders", {
|
|
params: { customer_id: customerId },
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: EnterpriseCustomerOrderRef[];
|
|
};
|
|
}>;
|
|
},
|
|
getCustomerEvents(customerId: number) {
|
|
return request.get("/api/admin/customer/events", {
|
|
params: { customer_id: customerId },
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: EnterpriseOrderEvent[];
|
|
};
|
|
}>;
|
|
},
|
|
getCustomerDeliveries(params: { customer_id?: number; event_id?: number }) {
|
|
return request.get("/api/admin/customer/deliveries", { params }) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: EnterpriseWebhookDelivery[];
|
|
};
|
|
}>;
|
|
},
|
|
resendCustomerEvent(eventId: number) {
|
|
return request.post("/api/admin/customer/event/resend", {
|
|
event_id: eventId,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
delivery: EnterpriseWebhookDelivery;
|
|
sent: boolean;
|
|
};
|
|
}>;
|
|
},
|
|
getWarehouseOverview() {
|
|
return request.get("/api/admin/warehouses/overview") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
cards: AdminWarehouseOverviewCard[];
|
|
};
|
|
}>;
|
|
},
|
|
getWarehouses() {
|
|
return request.get("/api/admin/warehouses") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: AdminWarehouseItem[];
|
|
category_options: Array<{
|
|
id: number;
|
|
name: string;
|
|
}>;
|
|
};
|
|
}>;
|
|
},
|
|
saveWarehouse(data: AdminWarehousePayload) {
|
|
return request.post("/api/admin/warehouse/save", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: { id: number };
|
|
}>;
|
|
},
|
|
getMaterialBatches(params?: Record<string, string>) {
|
|
return request.get("/api/admin/material/batches", { params }) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: AdminMaterialBatchItem[];
|
|
};
|
|
}>;
|
|
},
|
|
getMaterialBatchDetail(id: number, keyword = "") {
|
|
return request.get("/api/admin/material/batch/detail", {
|
|
params: { id, keyword },
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminMaterialBatchDetail;
|
|
}>;
|
|
},
|
|
createMaterialBatch(data: { count: number; remark: string }) {
|
|
return request.post("/api/admin/material/batch/create", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
id: number;
|
|
batch_no: string;
|
|
total_count: number;
|
|
remark: string;
|
|
};
|
|
}>;
|
|
},
|
|
prepareMaterialBatchDownload(id: number) {
|
|
return request.get("/api/admin/material/batch/download-link", {
|
|
params: { id },
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
filename: string;
|
|
url: string;
|
|
size: number;
|
|
};
|
|
}>;
|
|
},
|
|
invalidateMaterialBatch(data: { id: number; reason: string }) {
|
|
return request.post("/api/admin/material/batch/invalidate", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
id: number;
|
|
status: string;
|
|
status_text: string;
|
|
invalidated_at: string;
|
|
};
|
|
}>;
|
|
},
|
|
invalidateMaterialTag(data: { id: number; reason: string }) {
|
|
return request.post("/api/admin/material/tag/invalidate", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
id: number;
|
|
batch_id: number;
|
|
status: string;
|
|
status_text: string;
|
|
invalidated_at: string;
|
|
};
|
|
}>;
|
|
},
|
|
getAccessOverview() {
|
|
return request.get("/api/admin/access/overview") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
cards: AdminAccessOverviewCard[];
|
|
};
|
|
}>;
|
|
},
|
|
getAdmins() {
|
|
return request.get("/api/admin/access/admins") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: AdminManagerItem[];
|
|
};
|
|
}>;
|
|
},
|
|
getRoles() {
|
|
return request.get("/api/admin/access/roles") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: AdminRoleItem[];
|
|
};
|
|
}>;
|
|
},
|
|
getPermissions() {
|
|
return request.get("/api/admin/access/permissions") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: AdminPermissionItem[];
|
|
};
|
|
}>;
|
|
},
|
|
saveAdmin(data: AdminManagerPayload) {
|
|
return request.post("/api/admin/access/admin/save", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: { id: number };
|
|
}>;
|
|
},
|
|
saveRole(data: AdminRolePayload) {
|
|
return request.post("/api/admin/access/role/save", data) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: { id: number };
|
|
}>;
|
|
},
|
|
getSystemConfigs() {
|
|
return request.get("/api/admin/system-configs") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
groups: AdminSystemConfigGroupItem[];
|
|
};
|
|
}>;
|
|
},
|
|
saveSystemConfigs(items: Array<{
|
|
config_group: string;
|
|
config_key: string;
|
|
config_value: string;
|
|
}>) {
|
|
return request.post("/api/admin/system-configs/save", {
|
|
items,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: Record<string, never>;
|
|
}>;
|
|
},
|
|
uploadSystemConfigFile(configGroup: string, configKey: string, file: File) {
|
|
const formData = new FormData();
|
|
formData.append("config_group", configGroup);
|
|
formData.append("config_key", configKey);
|
|
formData.append("file", file);
|
|
|
|
return request.post("/api/admin/system-configs/upload-file", formData, {
|
|
headers: {
|
|
"Content-Type": "multipart/form-data",
|
|
},
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminSystemConfigUploadResult;
|
|
}>;
|
|
},
|
|
getContentHome() {
|
|
return request.get("/api/admin/content/home") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
home_config: AdminContentHomeConfig;
|
|
};
|
|
}>;
|
|
},
|
|
getContentBootstrap() {
|
|
return request.get("/api/admin/content/bootstrap") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
home_config: AdminContentHomeConfig;
|
|
policy_config: AdminContentPolicyConfig;
|
|
meta_config: AdminContentMetaConfig;
|
|
help_articles: AdminHelpArticleItem[];
|
|
};
|
|
}>;
|
|
},
|
|
getContentPolicy() {
|
|
return request.get("/api/admin/content/policy") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
policy_config: AdminContentPolicyConfig;
|
|
};
|
|
}>;
|
|
},
|
|
getContentMeta() {
|
|
return request.get("/api/admin/content/meta") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
meta_config: AdminContentMetaConfig;
|
|
};
|
|
}>;
|
|
},
|
|
saveContentHome(homeConfig: AdminContentHomePayload) {
|
|
return request.post("/api/admin/content/home/save", {
|
|
home_config: homeConfig,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
home_config: AdminContentHomeConfig;
|
|
};
|
|
}>;
|
|
},
|
|
uploadContentImage(file: File) {
|
|
const formData = new FormData();
|
|
formData.append("file", file);
|
|
return request.post("/api/admin/content/image/upload", formData, {
|
|
headers: {
|
|
"Content-Type": "multipart/form-data",
|
|
},
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: AdminContentImageAsset;
|
|
}>;
|
|
},
|
|
saveContentPolicy(policyConfig: AdminContentPolicyConfig) {
|
|
return request.post("/api/admin/content/policy/save", {
|
|
policy_config: policyConfig,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
policy_config: AdminContentPolicyConfig;
|
|
};
|
|
}>;
|
|
},
|
|
saveContentMeta(metaConfig: AdminContentMetaConfig) {
|
|
return request.post("/api/admin/content/meta/save", {
|
|
meta_config: metaConfig,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
meta_config: AdminContentMetaConfig;
|
|
};
|
|
}>;
|
|
},
|
|
getHelpArticles() {
|
|
return request.get("/api/admin/content/help/articles") as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
list: AdminHelpArticleItem[];
|
|
};
|
|
}>;
|
|
},
|
|
saveHelpArticle(payload: AdminHelpArticlePayload) {
|
|
return request.post("/api/admin/content/help/article/save", payload) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: {
|
|
id: number;
|
|
};
|
|
}>;
|
|
},
|
|
deleteHelpArticle(id: number) {
|
|
return request.post("/api/admin/content/help/article/delete", {
|
|
id,
|
|
}) as Promise<{
|
|
code: number;
|
|
message: string;
|
|
data: Record<string, never>;
|
|
}>;
|
|
},
|
|
};
|