import request from '@/utils/request.js';

export const assetApi = {
	getInfo(identifier) {
		return request({
			url: '/api/c/v1/asset/info',
			method: 'GET',
			data: { identifier }
		});
	},

	getPackageHistory(identifier, page, page_size, params = {}) {
		return request({
			url: '/api/c/v1/asset/package-history',
			method: 'GET',
			data: { identifier, page, page_size, ...params }
		});
	},

	getPackages(identifier) {
		return request({
			url: '/api/c/v1/asset/packages',
			method: 'GET',
			data: { identifier }
		});
	},

	refresh(identifier) {
		return request({
			url: '/api/c/v1/asset/refresh',
			method: 'POST',
			data: { identifier }
		});
	}
};