UNPKG

t-comm

Version:

专业、稳定、纯粹的工具库

34 lines (31 loc) 953 B
import { b as __awaiter, c as __generator } from '../../tslib.es6-096fffdd.js'; import { fetchCloudData } from '../base/base.mjs'; import { AREA_MAP } from './config.mjs'; import 'axios'; function purgePathCache(_a) { var secretId = _a.secretId, secretKey = _a.secretKey, _b = _a.area, area = _b === void 0 ? AREA_MAP.MAINLAND : _b, _c = _a.flushType, flushType = _c === void 0 ? 'flush' : _c, paths = _a.paths; return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_d) { return [2 /*return*/, fetchCloudData({ secretId: secretId, secretKey: secretKey, action: 'PurgePathCache', version: '2018-06-06', endpoint: 'cdn.tencentcloudapi.com', service: 'cdn', payload: JSON.stringify({ Paths: paths, Area: area, FlushType: flushType }) })]; }); }); } export { purgePathCache };