新增支付配置备份导入
This commit is contained in:
@@ -35,6 +35,12 @@ export interface PaymentConfigListResponse {
|
||||
page_size: number
|
||||
}
|
||||
|
||||
export interface PaymentConfigImportResult {
|
||||
total: number
|
||||
created: number
|
||||
updated: number
|
||||
}
|
||||
|
||||
export interface CreatePaymentConfigRequest {
|
||||
name: string
|
||||
provider: string
|
||||
@@ -102,6 +108,11 @@ export async function exportPaymentConfigBackup() {
|
||||
}
|
||||
}
|
||||
|
||||
export async function importPaymentConfigBackup(payload: unknown) {
|
||||
const { data } = await apiClient.post<ApiResponse<PaymentConfigImportResult>>('/admin/payment-configs/import', payload)
|
||||
return data.data
|
||||
}
|
||||
|
||||
export async function createPaymentConfig(payload: CreatePaymentConfigRequest) {
|
||||
const { data } = await apiClient.post<ApiResponse<PaymentConfig>>('/admin/payment-configs', payload)
|
||||
return data.data
|
||||
|
||||
Reference in New Issue
Block a user