UNPKG

t-comm

Version:

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

38 lines (33 loc) 1.11 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var tslib_es6 = require('../../tslib.es6-01322ba9.js'); var tencentCloud_base_base = require('../base/base.js'); var tencentCloud_cdn_config = require('./config.js'); require('axios'); function purgePathCache(_a) { var secretId = _a.secretId, secretKey = _a.secretKey, _b = _a.area, area = _b === void 0 ? tencentCloud_cdn_config.AREA_MAP.MAINLAND : _b, _c = _a.flushType, flushType = _c === void 0 ? 'flush' : _c, paths = _a.paths; return tslib_es6.__awaiter(this, void 0, void 0, function () { return tslib_es6.__generator(this, function (_d) { return [2 /*return*/, tencentCloud_base_base.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 }) })]; }); }); } exports.purgePathCache = purgePathCache;