UNPKG

t-comm

Version:

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

36 lines (33 loc) 1.02 kB
import { b as __awaiter, c as __generator } from '../../tslib.es6-096fffdd.js'; import { fetchCloudData } from '../base/base.mjs'; import 'axios'; function createPurgeTask(_a) { var secretId = _a.secretId, secretKey = _a.secretKey, targets = _a.targets, zoneId = _a.zoneId, _b = _a.method, method = _b === void 0 ? 'invalidate' : _b, _c = _a.type, type = _c === void 0 ? 'purge_url' : _c; return __awaiter(this, void 0, void 0, function () { return __generator(this, function (_d) { // https://cloud.tencent.com/document/api/1552/80703 return [2 /*return*/, fetchCloudData({ secretId: secretId, secretKey: secretKey, action: 'CreatePurgeTask', version: '2022-09-01', endpoint: 'teo.tencentcloudapi.com', service: 'teo', payload: JSON.stringify({ ZoneId: zoneId, Type: type, Targets: targets, Method: method }) })]; }); }); } export { createPurgeTask };