This commit is contained in:
@@ -32,7 +32,7 @@ import type {
|
||||
AssetPackageUsageRecord,
|
||||
UpdateAssetPackageUsedDataRequest,
|
||||
UpdateAssetPackageExpiresAtRequest,
|
||||
ExpiringAssetItem,
|
||||
ExpiringAssetListResponse,
|
||||
ExpiringAssetQueryParams
|
||||
} from '@/types/api'
|
||||
|
||||
@@ -53,12 +53,8 @@ export class AssetService extends BaseService {
|
||||
*/
|
||||
static getExpiringAssets(
|
||||
params?: ExpiringAssetQueryParams
|
||||
): Promise<
|
||||
BaseResponse<{ items: ExpiringAssetItem[]; total: number; page: number; size: number }>
|
||||
> {
|
||||
return this.get<
|
||||
BaseResponse<{ items: ExpiringAssetItem[]; total: number; page: number; size: number }>
|
||||
>('/api/admin/expiring-assets', params)
|
||||
): Promise<BaseResponse<ExpiringAssetListResponse>> {
|
||||
return this.get<BaseResponse<ExpiringAssetListResponse>>('/api/admin/expiring-assets', params)
|
||||
}
|
||||
/**
|
||||
* 通过任意标识符查询设备或卡的完整详情
|
||||
|
||||
@@ -66,7 +66,8 @@ export class CardService extends BaseService {
|
||||
): Promise<BaseResponse<SetSpeedTierResponse>> {
|
||||
return this.put<BaseResponse<SetSpeedTierResponse>>(
|
||||
`/api/admin/iot-cards/${encodeURIComponent(iccid)}/speed-tier`,
|
||||
{ code }
|
||||
{ code },
|
||||
{ requestOptions: { errorMessageMode: 'none' } }
|
||||
)
|
||||
}
|
||||
// ========== 号卡商品管理 ==========
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import { BaseService } from '../BaseService'
|
||||
import type {
|
||||
CancelExportTaskApiResponse,
|
||||
CreateExportTaskApiResponse,
|
||||
CreateExportTaskRequest,
|
||||
ExportTaskDetail,
|
||||
ExportTaskDetailApiResponse,
|
||||
ExportTaskListApiResponse,
|
||||
ExportTaskQueryParams
|
||||
@@ -21,9 +19,4 @@ export class ExportTaskService extends BaseService {
|
||||
static getExportTaskDetail(id: number): Promise<ExportTaskDetailApiResponse> {
|
||||
return this.get<ExportTaskDetailApiResponse>(`/api/admin/export-tasks/${id}`)
|
||||
}
|
||||
|
||||
/** 保留旧页面的取消入口,后端支持时由页面权限控制显示。 */
|
||||
static cancelExportTask(id: number): Promise<CancelExportTaskApiResponse> {
|
||||
return this.post<CancelExportTaskApiResponse>(`/api/admin/export-tasks/${id}/cancel`, {})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import type {
|
||||
BaseResponse,
|
||||
NotificationListResponse,
|
||||
NotificationQueryParams,
|
||||
NotificationReadRequest,
|
||||
NotificationReadAllRequest,
|
||||
NotificationReadAllResponse,
|
||||
NotificationReadResponse,
|
||||
@@ -29,10 +30,9 @@ export class NotificationService extends BaseService {
|
||||
}
|
||||
|
||||
static markRead(id: number): Promise<BaseResponse<NotificationReadResponse>> {
|
||||
return this.put<BaseResponse<NotificationReadResponse>>(
|
||||
`/api/admin/notifications/${id}/read`,
|
||||
{}
|
||||
)
|
||||
return this.put<BaseResponse<NotificationReadResponse>>(`/api/admin/notifications/${id}/read`, {
|
||||
id
|
||||
} satisfies NotificationReadRequest)
|
||||
}
|
||||
|
||||
static markAllRead(
|
||||
|
||||
@@ -7,6 +7,7 @@ import type {
|
||||
WecomApplicationQueryParams,
|
||||
WecomApplicationRequest,
|
||||
WecomApplicationResponse,
|
||||
WecomBusinessFieldListResponse,
|
||||
WecomBusinessType,
|
||||
WecomMemberListResponse,
|
||||
WecomMemberQueryParams,
|
||||
@@ -14,7 +15,9 @@ import type {
|
||||
WecomSceneQueryParams,
|
||||
WecomSceneRequest,
|
||||
WecomSceneResponse,
|
||||
WecomSyncMembersApiResponse
|
||||
WecomSyncMembersApiResponse,
|
||||
WecomTemplateDetailResponse,
|
||||
WecomTemplateInspectRequest
|
||||
} from '@/types/api'
|
||||
|
||||
export class WecomService extends BaseService {
|
||||
@@ -38,14 +41,8 @@ export class WecomService extends BaseService {
|
||||
)
|
||||
}
|
||||
|
||||
static getMembers(
|
||||
id: number,
|
||||
params?: WecomMemberQueryParams
|
||||
): Promise<WecomMemberListResponse> {
|
||||
return this.get<WecomMemberListResponse>(
|
||||
`/api/admin/wecom/applications/${id}/members`,
|
||||
params
|
||||
)
|
||||
static getMembers(id: number, params?: WecomMemberQueryParams): Promise<WecomMemberListResponse> {
|
||||
return this.get<WecomMemberListResponse>(`/api/admin/wecom/applications/${id}/members`, params)
|
||||
}
|
||||
|
||||
static setDefaultCreator(id: number, userid: string): Promise<WecomApplicationResponse> {
|
||||
@@ -66,6 +63,24 @@ export class WecomService extends BaseService {
|
||||
return this.put<WecomSceneResponse>(`/api/admin/wecom/scenes/${businessType}`, data)
|
||||
}
|
||||
|
||||
static inspectTemplate(
|
||||
applicationId: number,
|
||||
data: WecomTemplateInspectRequest
|
||||
): Promise<WecomTemplateDetailResponse> {
|
||||
return this.post<WecomTemplateDetailResponse>(
|
||||
`/api/admin/wecom/applications/${applicationId}/templates/inspect`,
|
||||
data
|
||||
)
|
||||
}
|
||||
|
||||
static getBusinessFields(
|
||||
businessType: WecomBusinessType
|
||||
): Promise<WecomBusinessFieldListResponse> {
|
||||
return this.get<WecomBusinessFieldListResponse>(
|
||||
`/api/admin/wecom/scenes/${businessType}/fields`
|
||||
)
|
||||
}
|
||||
|
||||
static bindAccount(
|
||||
accountId: number,
|
||||
data: WecomAccountBindingRequest
|
||||
|
||||
Reference in New Issue
Block a user