refactor(adminui): remove tenant admin flows and fix build
This commit is contained in:
@@ -1,99 +0,0 @@
|
||||
import request from '@/utils/http'
|
||||
|
||||
/**
|
||||
* 自助注册租户
|
||||
* @param data 自助注册参数
|
||||
*/
|
||||
export function fetchSelfRegisterTenant(data: Api.Tenant.SelfRegisterTenantCommand) {
|
||||
return request.post<Api.Tenant.SelfRegisterResult>({
|
||||
url: '/api/public/v1/tenants/self-register',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询租户入驻进度
|
||||
* @param tenantId 租户ID
|
||||
*/
|
||||
export function fetchTenantProgress(tenantId: string) {
|
||||
return request.get<Api.Tenant.TenantProgress>({
|
||||
url: `/api/public/v1/tenants/${tenantId}/status`
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交或更新租户实名信息
|
||||
* @param tenantId 租户ID
|
||||
* @param data 实名资料
|
||||
*/
|
||||
export function submitTenantVerification(
|
||||
tenantId: string,
|
||||
data: Api.Tenant.SubmitTenantVerificationCommand
|
||||
) {
|
||||
return request.post<Api.Tenant.TenantVerificationDto>({
|
||||
url: `/api/public/v1/tenants/${tenantId}/verification`,
|
||||
data: { ...data, tenantId }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交或更新租户实名信息(管理端)
|
||||
* @param tenantId 租户ID
|
||||
* @param data 实名资料
|
||||
*/
|
||||
export function submitTenantVerificationAdmin(
|
||||
tenantId: string,
|
||||
data: Api.Tenant.SubmitTenantVerificationCommand
|
||||
) {
|
||||
return request.post<Api.Tenant.TenantVerificationDto>({
|
||||
url: `/api/admin/v1/tenants/${tenantId}/verification`,
|
||||
data: { ...data, tenantId }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建租户订阅
|
||||
* @param tenantId 租户ID
|
||||
* @param data 订阅参数
|
||||
*/
|
||||
export function createTenantSubscription(
|
||||
tenantId: string,
|
||||
data: Api.Tenant.CreateTenantSubscriptionCommand
|
||||
) {
|
||||
return request.post<Api.Tenant.TenantSubscriptionDto>({
|
||||
url: `/api/admin/v1/tenants/${tenantId}/subscriptions`,
|
||||
data: { ...data, tenantId }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 初次绑定租户订阅(自助入驻)
|
||||
* @param tenantId 租户ID
|
||||
* @param data 初次绑定参数
|
||||
*/
|
||||
export function bindInitialTenantSubscription(
|
||||
tenantId: string,
|
||||
data: Api.Tenant.BindInitialTenantSubscriptionCommand
|
||||
) {
|
||||
return request.post<Api.Tenant.TenantSubscriptionDto>({
|
||||
url: `/api/public/v1/tenants/${tenantId}/subscriptions/initial`,
|
||||
data: { ...data, tenantId }
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 升降配租户套餐
|
||||
* @param tenantId 租户ID
|
||||
* @param subscriptionId 订阅ID
|
||||
* @param data 升降配参数
|
||||
*/
|
||||
export function changeTenantSubscriptionPlan(
|
||||
tenantId: string,
|
||||
subscriptionId: string,
|
||||
data: Api.Tenant.ChangeTenantSubscriptionPlanCommand
|
||||
) {
|
||||
return request.put<Api.Tenant.TenantSubscriptionDto>({
|
||||
url: `/api/admin/v1/tenants/${tenantId}/subscriptions/${subscriptionId}/plan`,
|
||||
data: { ...data, tenantId, tenantSubscriptionId: subscriptionId }
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user