@huaweicloud/huaweicloud-sdk-cdn 3.1.34 → 3.1.35
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +2 -2
- package/v1/model/CacheRules.d.ts +31 -0
- package/v1/model/CacheRules.js +107 -0
- package/v1/model/Configs.d.ts +17 -0
- package/v1/model/Configs.js +46 -0
- package/v1/model/ConfigsGetBody.d.ts +17 -0
- package/v1/model/ConfigsGetBody.js +46 -0
- package/v1/model/ForceRedirectConfig.d.ts +4 -0
- package/v1/model/ForceRedirectConfig.js +14 -0
- package/v1/model/IpFilter.d.ts +7 -0
- package/v1/model/IpFilter.js +18 -0
- package/v1/model/RefererConfig.d.ts +11 -0
- package/v1/model/RefererConfig.js +32 -0
- package/v1/public-api.d.ts +3 -0
- package/v1/public-api.js +3 -0
- package/v2/CdnClient.d.ts +57 -0
- package/v2/CdnClient.js +122 -0
- package/v2/model/CacheRules.d.ts +31 -0
- package/v2/model/CacheRules.js +107 -0
- package/v2/model/CacheUrlParameterFilter.d.ts +7 -0
- package/v2/model/CacheUrlParameterFilter.js +17 -0
- package/v2/model/Compress.d.ts +7 -0
- package/v2/model/Compress.js +18 -0
- package/v2/model/Configs.d.ts +86 -0
- package/v2/model/Configs.js +235 -0
- package/v2/model/ConfigsGetBody.d.ts +78 -0
- package/v2/model/ConfigsGetBody.js +207 -0
- package/v2/model/ErrorCodeCache.d.ts +23 -0
- package/v2/model/ErrorCodeCache.js +34 -0
- package/v2/model/ErrorCodeRedirectRules.d.ts +15 -0
- package/v2/model/ErrorCodeRedirectRules.js +54 -0
- package/v2/model/ForceRedirectConfig.d.ts +11 -0
- package/v2/model/ForceRedirectConfig.js +32 -0
- package/v2/model/HttpGetBody.d.ts +27 -0
- package/v2/model/HttpGetBody.js +93 -0
- package/v2/model/HttpPutBody.d.ts +31 -0
- package/v2/model/HttpPutBody.js +107 -0
- package/v2/model/HttpResponseHeader.d.ts +9 -0
- package/v2/model/HttpResponseHeader.js +23 -0
- package/v2/model/IpFilter.d.ts +7 -0
- package/v2/model/IpFilter.js +18 -0
- package/v2/model/ModifyDomainConfigRequestBody.d.ts +6 -0
- package/v2/model/ModifyDomainConfigRequestBody.js +13 -0
- package/v2/model/OriginRequestHeader.d.ts +9 -0
- package/v2/model/OriginRequestHeader.js +23 -0
- package/v2/model/OriginRequestUrlRewrite.d.ts +17 -0
- package/v2/model/OriginRequestUrlRewrite.js +58 -0
- package/v2/model/RefererConfig.d.ts +11 -0
- package/v2/model/RefererConfig.js +32 -0
- package/v2/model/ShowDomainFullConfigRequest.d.ts +11 -0
- package/v2/model/ShowDomainFullConfigRequest.js +38 -0
- package/v2/model/ShowDomainFullConfigResponse.d.ts +7 -0
- package/v2/model/ShowDomainFullConfigResponse.js +31 -0
- package/v2/model/UpdateDomainFullConfigRequest.d.ts +14 -0
- package/v2/model/UpdateDomainFullConfigRequest.js +42 -0
- package/v2/model/UpdateDomainFullConfigResponse.d.ts +4 -0
- package/v2/model/UpdateDomainFullConfigResponse.js +27 -0
- package/v2/model/UrlAuth.d.ts +17 -0
- package/v2/model/UrlAuth.js +50 -0
- package/v2/model/UrlAuthGetBody.d.ts +15 -0
- package/v2/model/UrlAuthGetBody.js +46 -0
- package/v2/model/UserAgentFilter.d.ts +7 -0
- package/v2/model/UserAgentFilter.js +18 -0
- package/v2/public-api.d.ts +23 -0
- package/v2/public-api.js +23 -0
package/v2/CdnClient.js
CHANGED
@@ -25,10 +25,12 @@ var SetChargeModesRequest_1 = require("./model/SetChargeModesRequest");
|
|
25
25
|
var ShowBandwidthCalcRequest_1 = require("./model/ShowBandwidthCalcRequest");
|
26
26
|
var ShowChargeModesRequest_1 = require("./model/ShowChargeModesRequest");
|
27
27
|
var ShowDomainDetailByNameRequest_1 = require("./model/ShowDomainDetailByNameRequest");
|
28
|
+
var ShowDomainFullConfigRequest_1 = require("./model/ShowDomainFullConfigRequest");
|
28
29
|
var ShowDomainLocationStatsRequest_1 = require("./model/ShowDomainLocationStatsRequest");
|
29
30
|
var ShowDomainStatsRequest_1 = require("./model/ShowDomainStatsRequest");
|
30
31
|
var ShowTopDomainNamesRequest_1 = require("./model/ShowTopDomainNamesRequest");
|
31
32
|
var ShowTopUrlRequest_1 = require("./model/ShowTopUrlRequest");
|
33
|
+
var UpdateDomainFullConfigRequest_1 = require("./model/UpdateDomainFullConfigRequest");
|
32
34
|
var CdnClient = /** @class */ (function () {
|
33
35
|
function CdnClient(client) {
|
34
36
|
this.hcClient = client;
|
@@ -247,6 +249,23 @@ var CdnClient = /** @class */ (function () {
|
|
247
249
|
options['responseHeaders'] = [''];
|
248
250
|
return this.hcClient.sendRequest(options);
|
249
251
|
};
|
252
|
+
/**
|
253
|
+
* 查询域名配置接口,支持查询回源请求头、HTTP header配置、URL鉴权、证书、源站、回源协议、强制重定向、智能压缩、缓存URL参数、IPv6开关、状态码缓存时间、Range回源、User-Agent黑白名单、改写回源URL、自定义错误页面
|
254
|
+
*
|
255
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
256
|
+
*
|
257
|
+
* @summary 查询域名配置接口
|
258
|
+
* @param {string} domainName 加速域名
|
259
|
+
* @param {string} [enterpriseProjectId] 当用户开启企业项目功能时,该参数生效,表示查询资源所属项目,\"all\"表示所有项目。注意:当使用子帐号调用接口时,该参数必传。 您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目id。
|
260
|
+
* @param {*} [options] Override http request option.
|
261
|
+
* @throws {RequiredError}
|
262
|
+
*/
|
263
|
+
CdnClient.prototype.showDomainFullConfig = function (showDomainFullConfigRequest) {
|
264
|
+
var options = (0, exports.ParamCreater)().showDomainFullConfig(showDomainFullConfigRequest);
|
265
|
+
// @ts-ignore
|
266
|
+
options['responseHeaders'] = [''];
|
267
|
+
return this.hcClient.sendRequest(options);
|
268
|
+
};
|
250
269
|
/**
|
251
270
|
* - 支持查询90天内的数据。
|
252
271
|
*
|
@@ -387,6 +406,24 @@ var CdnClient = /** @class */ (function () {
|
|
387
406
|
options['responseHeaders'] = [''];
|
388
407
|
return this.hcClient.sendRequest(options);
|
389
408
|
};
|
409
|
+
/**
|
410
|
+
* 修改域名全量配置接口,支持配置回源请求头、HTTP header配置、URL鉴权、证书、源站、回源协议、强制重定向、智能压缩、缓存URL参数、IPv6、状态码缓存时间、Range回源、User-Agent黑白名单、改写回源URL、自定义错误页面
|
411
|
+
*
|
412
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
413
|
+
*
|
414
|
+
* @summary 修改域名全量配置接口
|
415
|
+
* @param {string} domainName 加速域名
|
416
|
+
* @param {string} [enterpriseProjectId] 当用户开启企业项目功能时,该参数生效,表示修改当前企业项目下加速域名的配置,\"all\"代表所有项目。注意:当使用子帐号调用接口时,该参数必传。 您可以通过调用企业项目管理服务(EPS)的查询企业项目列表接口(ListEnterpriseProject)查询企业项目id。
|
417
|
+
* @param {ModifyDomainConfigRequestBody} [modifyDomainConfigRequestBody] 域名配置
|
418
|
+
* @param {*} [options] Override http request option.
|
419
|
+
* @throws {RequiredError}
|
420
|
+
*/
|
421
|
+
CdnClient.prototype.updateDomainFullConfig = function (updateDomainFullConfigRequest) {
|
422
|
+
var options = (0, exports.ParamCreater)().updateDomainFullConfig(updateDomainFullConfigRequest);
|
423
|
+
// @ts-ignore
|
424
|
+
options['responseHeaders'] = [''];
|
425
|
+
return this.hcClient.sendRequest(options);
|
426
|
+
};
|
390
427
|
return CdnClient;
|
391
428
|
}());
|
392
429
|
exports.CdnClient = CdnClient;
|
@@ -936,6 +973,46 @@ var ParamCreater = function () {
|
|
936
973
|
options.headers = localVarHeaderParameter;
|
937
974
|
return options;
|
938
975
|
},
|
976
|
+
/**
|
977
|
+
* 查询域名配置接口,支持查询回源请求头、HTTP header配置、URL鉴权、证书、源站、回源协议、强制重定向、智能压缩、缓存URL参数、IPv6开关、状态码缓存时间、Range回源、User-Agent黑白名单、改写回源URL、自定义错误页面
|
978
|
+
*
|
979
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
980
|
+
*/
|
981
|
+
showDomainFullConfig: function (showDomainFullConfigRequest) {
|
982
|
+
var options = {
|
983
|
+
method: "GET",
|
984
|
+
url: "/v1.1/cdn/configuration/domains/{domain_name}/configs",
|
985
|
+
contentType: "application/json",
|
986
|
+
queryParams: {},
|
987
|
+
pathParams: {},
|
988
|
+
headers: {},
|
989
|
+
data: {}
|
990
|
+
};
|
991
|
+
var localVarHeaderParameter = {};
|
992
|
+
var localVarQueryParameter = {};
|
993
|
+
var domainName;
|
994
|
+
var enterpriseProjectId;
|
995
|
+
if (showDomainFullConfigRequest !== null && showDomainFullConfigRequest !== undefined) {
|
996
|
+
if (showDomainFullConfigRequest instanceof ShowDomainFullConfigRequest_1.ShowDomainFullConfigRequest) {
|
997
|
+
domainName = showDomainFullConfigRequest.domainName;
|
998
|
+
enterpriseProjectId = showDomainFullConfigRequest.enterpriseProjectId;
|
999
|
+
}
|
1000
|
+
else {
|
1001
|
+
domainName = showDomainFullConfigRequest['domain_name'];
|
1002
|
+
enterpriseProjectId = showDomainFullConfigRequest['enterprise_project_id'];
|
1003
|
+
}
|
1004
|
+
}
|
1005
|
+
if (domainName === null || domainName === undefined) {
|
1006
|
+
throw new RequiredError('domainName', 'Required parameter domainName was null or undefined when calling showDomainFullConfig.');
|
1007
|
+
}
|
1008
|
+
if (enterpriseProjectId !== null && enterpriseProjectId !== undefined) {
|
1009
|
+
localVarQueryParameter['enterprise_project_id'] = enterpriseProjectId;
|
1010
|
+
}
|
1011
|
+
options.queryParams = localVarQueryParameter;
|
1012
|
+
options.pathParams = { 'domain_name': domainName, };
|
1013
|
+
options.headers = localVarHeaderParameter;
|
1014
|
+
return options;
|
1015
|
+
},
|
939
1016
|
/**
|
940
1017
|
* - 支持查询90天内的数据。
|
941
1018
|
*
|
@@ -1335,6 +1412,51 @@ var ParamCreater = function () {
|
|
1335
1412
|
options.headers = localVarHeaderParameter;
|
1336
1413
|
return options;
|
1337
1414
|
},
|
1415
|
+
/**
|
1416
|
+
* 修改域名全量配置接口,支持配置回源请求头、HTTP header配置、URL鉴权、证书、源站、回源协议、强制重定向、智能压缩、缓存URL参数、IPv6、状态码缓存时间、Range回源、User-Agent黑白名单、改写回源URL、自定义错误页面
|
1417
|
+
*
|
1418
|
+
* Please refer to HUAWEI cloud API Explorer for details.
|
1419
|
+
*/
|
1420
|
+
updateDomainFullConfig: function (updateDomainFullConfigRequest) {
|
1421
|
+
var options = {
|
1422
|
+
method: "PUT",
|
1423
|
+
url: "/v1.1/cdn/configuration/domains/{domain_name}/configs",
|
1424
|
+
contentType: "application/json",
|
1425
|
+
queryParams: {},
|
1426
|
+
pathParams: {},
|
1427
|
+
headers: {},
|
1428
|
+
data: {}
|
1429
|
+
};
|
1430
|
+
var localVarHeaderParameter = {};
|
1431
|
+
var localVarQueryParameter = {};
|
1432
|
+
var body;
|
1433
|
+
var domainName;
|
1434
|
+
var enterpriseProjectId;
|
1435
|
+
if (updateDomainFullConfigRequest !== null && updateDomainFullConfigRequest !== undefined) {
|
1436
|
+
if (updateDomainFullConfigRequest instanceof UpdateDomainFullConfigRequest_1.UpdateDomainFullConfigRequest) {
|
1437
|
+
domainName = updateDomainFullConfigRequest.domainName;
|
1438
|
+
enterpriseProjectId = updateDomainFullConfigRequest.enterpriseProjectId;
|
1439
|
+
body = updateDomainFullConfigRequest.body;
|
1440
|
+
}
|
1441
|
+
else {
|
1442
|
+
domainName = updateDomainFullConfigRequest['domain_name'];
|
1443
|
+
enterpriseProjectId = updateDomainFullConfigRequest['enterprise_project_id'];
|
1444
|
+
body = updateDomainFullConfigRequest['body'];
|
1445
|
+
}
|
1446
|
+
}
|
1447
|
+
if (domainName === null || domainName === undefined) {
|
1448
|
+
throw new RequiredError('domainName', 'Required parameter domainName was null or undefined when calling updateDomainFullConfig.');
|
1449
|
+
}
|
1450
|
+
if (enterpriseProjectId !== null && enterpriseProjectId !== undefined) {
|
1451
|
+
localVarQueryParameter['enterprise_project_id'] = enterpriseProjectId;
|
1452
|
+
}
|
1453
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
1454
|
+
options.data = body !== undefined ? body : {};
|
1455
|
+
options.queryParams = localVarQueryParameter;
|
1456
|
+
options.pathParams = { 'domain_name': domainName, };
|
1457
|
+
options.headers = localVarHeaderParameter;
|
1458
|
+
return options;
|
1459
|
+
},
|
1338
1460
|
};
|
1339
1461
|
};
|
1340
1462
|
exports.ParamCreater = ParamCreater;
|
@@ -0,0 +1,31 @@
|
|
1
|
+
export declare class CacheRules {
|
2
|
+
private 'match_type';
|
3
|
+
private 'match_value'?;
|
4
|
+
ttl: number;
|
5
|
+
private 'ttl_unit';
|
6
|
+
priority: number;
|
7
|
+
private 'follow_origin';
|
8
|
+
private 'url_parameter_type';
|
9
|
+
private 'url_parameter_value'?;
|
10
|
+
constructor(matchType?: any, ttl?: any, ttlUnit?: any, priority?: any, followOrigin?: any, urlParameterType?: any);
|
11
|
+
withMatchType(matchType: string): CacheRules;
|
12
|
+
set matchType(matchType: string | undefined);
|
13
|
+
get matchType(): string | undefined;
|
14
|
+
withMatchValue(matchValue: string): CacheRules;
|
15
|
+
set matchValue(matchValue: string | undefined);
|
16
|
+
get matchValue(): string | undefined;
|
17
|
+
withTtl(ttl: number): CacheRules;
|
18
|
+
withTtlUnit(ttlUnit: string): CacheRules;
|
19
|
+
set ttlUnit(ttlUnit: string | undefined);
|
20
|
+
get ttlUnit(): string | undefined;
|
21
|
+
withPriority(priority: number): CacheRules;
|
22
|
+
withFollowOrigin(followOrigin: string): CacheRules;
|
23
|
+
set followOrigin(followOrigin: string | undefined);
|
24
|
+
get followOrigin(): string | undefined;
|
25
|
+
withUrlParameterType(urlParameterType: string): CacheRules;
|
26
|
+
set urlParameterType(urlParameterType: string | undefined);
|
27
|
+
get urlParameterType(): string | undefined;
|
28
|
+
withUrlParameterValue(urlParameterValue: string): CacheRules;
|
29
|
+
set urlParameterValue(urlParameterValue: string | undefined);
|
30
|
+
get urlParameterValue(): string | undefined;
|
31
|
+
}
|
@@ -0,0 +1,107 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CacheRules = void 0;
|
4
|
+
var CacheRules = /** @class */ (function () {
|
5
|
+
function CacheRules(matchType, ttl, ttlUnit, priority, followOrigin, urlParameterType) {
|
6
|
+
this['match_type'] = matchType;
|
7
|
+
this['ttl'] = ttl;
|
8
|
+
this['ttl_unit'] = ttlUnit;
|
9
|
+
this['priority'] = priority;
|
10
|
+
this['follow_origin'] = followOrigin;
|
11
|
+
this['url_parameter_type'] = urlParameterType;
|
12
|
+
}
|
13
|
+
CacheRules.prototype.withMatchType = function (matchType) {
|
14
|
+
this['match_type'] = matchType;
|
15
|
+
return this;
|
16
|
+
};
|
17
|
+
Object.defineProperty(CacheRules.prototype, "matchType", {
|
18
|
+
get: function () {
|
19
|
+
return this['match_type'];
|
20
|
+
},
|
21
|
+
set: function (matchType) {
|
22
|
+
this['match_type'] = matchType;
|
23
|
+
},
|
24
|
+
enumerable: false,
|
25
|
+
configurable: true
|
26
|
+
});
|
27
|
+
CacheRules.prototype.withMatchValue = function (matchValue) {
|
28
|
+
this['match_value'] = matchValue;
|
29
|
+
return this;
|
30
|
+
};
|
31
|
+
Object.defineProperty(CacheRules.prototype, "matchValue", {
|
32
|
+
get: function () {
|
33
|
+
return this['match_value'];
|
34
|
+
},
|
35
|
+
set: function (matchValue) {
|
36
|
+
this['match_value'] = matchValue;
|
37
|
+
},
|
38
|
+
enumerable: false,
|
39
|
+
configurable: true
|
40
|
+
});
|
41
|
+
CacheRules.prototype.withTtl = function (ttl) {
|
42
|
+
this['ttl'] = ttl;
|
43
|
+
return this;
|
44
|
+
};
|
45
|
+
CacheRules.prototype.withTtlUnit = function (ttlUnit) {
|
46
|
+
this['ttl_unit'] = ttlUnit;
|
47
|
+
return this;
|
48
|
+
};
|
49
|
+
Object.defineProperty(CacheRules.prototype, "ttlUnit", {
|
50
|
+
get: function () {
|
51
|
+
return this['ttl_unit'];
|
52
|
+
},
|
53
|
+
set: function (ttlUnit) {
|
54
|
+
this['ttl_unit'] = ttlUnit;
|
55
|
+
},
|
56
|
+
enumerable: false,
|
57
|
+
configurable: true
|
58
|
+
});
|
59
|
+
CacheRules.prototype.withPriority = function (priority) {
|
60
|
+
this['priority'] = priority;
|
61
|
+
return this;
|
62
|
+
};
|
63
|
+
CacheRules.prototype.withFollowOrigin = function (followOrigin) {
|
64
|
+
this['follow_origin'] = followOrigin;
|
65
|
+
return this;
|
66
|
+
};
|
67
|
+
Object.defineProperty(CacheRules.prototype, "followOrigin", {
|
68
|
+
get: function () {
|
69
|
+
return this['follow_origin'];
|
70
|
+
},
|
71
|
+
set: function (followOrigin) {
|
72
|
+
this['follow_origin'] = followOrigin;
|
73
|
+
},
|
74
|
+
enumerable: false,
|
75
|
+
configurable: true
|
76
|
+
});
|
77
|
+
CacheRules.prototype.withUrlParameterType = function (urlParameterType) {
|
78
|
+
this['url_parameter_type'] = urlParameterType;
|
79
|
+
return this;
|
80
|
+
};
|
81
|
+
Object.defineProperty(CacheRules.prototype, "urlParameterType", {
|
82
|
+
get: function () {
|
83
|
+
return this['url_parameter_type'];
|
84
|
+
},
|
85
|
+
set: function (urlParameterType) {
|
86
|
+
this['url_parameter_type'] = urlParameterType;
|
87
|
+
},
|
88
|
+
enumerable: false,
|
89
|
+
configurable: true
|
90
|
+
});
|
91
|
+
CacheRules.prototype.withUrlParameterValue = function (urlParameterValue) {
|
92
|
+
this['url_parameter_value'] = urlParameterValue;
|
93
|
+
return this;
|
94
|
+
};
|
95
|
+
Object.defineProperty(CacheRules.prototype, "urlParameterValue", {
|
96
|
+
get: function () {
|
97
|
+
return this['url_parameter_value'];
|
98
|
+
},
|
99
|
+
set: function (urlParameterValue) {
|
100
|
+
this['url_parameter_value'] = urlParameterValue;
|
101
|
+
},
|
102
|
+
enumerable: false,
|
103
|
+
configurable: true
|
104
|
+
});
|
105
|
+
return CacheRules;
|
106
|
+
}());
|
107
|
+
exports.CacheRules = CacheRules;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.CacheUrlParameterFilter = void 0;
|
4
|
+
var CacheUrlParameterFilter = /** @class */ (function () {
|
5
|
+
function CacheUrlParameterFilter() {
|
6
|
+
}
|
7
|
+
CacheUrlParameterFilter.prototype.withType = function (type) {
|
8
|
+
this['type'] = type;
|
9
|
+
return this;
|
10
|
+
};
|
11
|
+
CacheUrlParameterFilter.prototype.withValue = function (value) {
|
12
|
+
this['value'] = value;
|
13
|
+
return this;
|
14
|
+
};
|
15
|
+
return CacheUrlParameterFilter;
|
16
|
+
}());
|
17
|
+
exports.CacheUrlParameterFilter = CacheUrlParameterFilter;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Compress = void 0;
|
4
|
+
var Compress = /** @class */ (function () {
|
5
|
+
function Compress(status) {
|
6
|
+
this['status'] = status;
|
7
|
+
}
|
8
|
+
Compress.prototype.withStatus = function (status) {
|
9
|
+
this['status'] = status;
|
10
|
+
return this;
|
11
|
+
};
|
12
|
+
Compress.prototype.withType = function (type) {
|
13
|
+
this['type'] = type;
|
14
|
+
return this;
|
15
|
+
};
|
16
|
+
return Compress;
|
17
|
+
}());
|
18
|
+
exports.Compress = Compress;
|
@@ -0,0 +1,86 @@
|
|
1
|
+
import { CacheRules } from './CacheRules';
|
2
|
+
import { CacheUrlParameterFilter } from './CacheUrlParameterFilter';
|
3
|
+
import { Compress } from './Compress';
|
4
|
+
import { ErrorCodeCache } from './ErrorCodeCache';
|
5
|
+
import { ErrorCodeRedirectRules } from './ErrorCodeRedirectRules';
|
6
|
+
import { ForceRedirectConfig } from './ForceRedirectConfig';
|
7
|
+
import { HttpPutBody } from './HttpPutBody';
|
8
|
+
import { HttpResponseHeader } from './HttpResponseHeader';
|
9
|
+
import { IpFilter } from './IpFilter';
|
10
|
+
import { OriginRequestHeader } from './OriginRequestHeader';
|
11
|
+
import { OriginRequestUrlRewrite } from './OriginRequestUrlRewrite';
|
12
|
+
import { RefererConfig } from './RefererConfig';
|
13
|
+
import { SourcesConfig } from './SourcesConfig';
|
14
|
+
import { UrlAuth } from './UrlAuth';
|
15
|
+
import { UserAgentFilter } from './UserAgentFilter';
|
16
|
+
export declare class Configs {
|
17
|
+
private 'origin_request_header'?;
|
18
|
+
private 'http_response_header'?;
|
19
|
+
private 'url_auth'?;
|
20
|
+
https?: HttpPutBody;
|
21
|
+
sources?: Array<SourcesConfig>;
|
22
|
+
private 'origin_protocol'?;
|
23
|
+
private 'origin_follow302_status'?;
|
24
|
+
private 'cache_rules'?;
|
25
|
+
private 'ip_filter'?;
|
26
|
+
referer?: RefererConfig;
|
27
|
+
private 'force_redirect'?;
|
28
|
+
compress?: Compress;
|
29
|
+
private 'cache_url_parameter_filter'?;
|
30
|
+
private 'ipv6_accelerate'?;
|
31
|
+
private 'error_code_cache'?;
|
32
|
+
private 'origin_range_status'?;
|
33
|
+
private 'user_agent_filter'?;
|
34
|
+
private 'origin_request_url_rewrite'?;
|
35
|
+
private 'error_code_redirect_rules'?;
|
36
|
+
constructor();
|
37
|
+
withOriginRequestHeader(originRequestHeader: Array<OriginRequestHeader>): Configs;
|
38
|
+
set originRequestHeader(originRequestHeader: Array<OriginRequestHeader> | undefined);
|
39
|
+
get originRequestHeader(): Array<OriginRequestHeader> | undefined;
|
40
|
+
withHttpResponseHeader(httpResponseHeader: Array<HttpResponseHeader>): Configs;
|
41
|
+
set httpResponseHeader(httpResponseHeader: Array<HttpResponseHeader> | undefined);
|
42
|
+
get httpResponseHeader(): Array<HttpResponseHeader> | undefined;
|
43
|
+
withUrlAuth(urlAuth: UrlAuth): Configs;
|
44
|
+
set urlAuth(urlAuth: UrlAuth | undefined);
|
45
|
+
get urlAuth(): UrlAuth | undefined;
|
46
|
+
withHttps(https: HttpPutBody): Configs;
|
47
|
+
withSources(sources: Array<SourcesConfig>): Configs;
|
48
|
+
withOriginProtocol(originProtocol: string): Configs;
|
49
|
+
set originProtocol(originProtocol: string | undefined);
|
50
|
+
get originProtocol(): string | undefined;
|
51
|
+
withOriginFollow302Status(originFollow302Status: string): Configs;
|
52
|
+
set originFollow302Status(originFollow302Status: string | undefined);
|
53
|
+
get originFollow302Status(): string | undefined;
|
54
|
+
withCacheRules(cacheRules: Array<CacheRules>): Configs;
|
55
|
+
set cacheRules(cacheRules: Array<CacheRules> | undefined);
|
56
|
+
get cacheRules(): Array<CacheRules> | undefined;
|
57
|
+
withIpFilter(ipFilter: IpFilter): Configs;
|
58
|
+
set ipFilter(ipFilter: IpFilter | undefined);
|
59
|
+
get ipFilter(): IpFilter | undefined;
|
60
|
+
withReferer(referer: RefererConfig): Configs;
|
61
|
+
withForceRedirect(forceRedirect: ForceRedirectConfig): Configs;
|
62
|
+
set forceRedirect(forceRedirect: ForceRedirectConfig | undefined);
|
63
|
+
get forceRedirect(): ForceRedirectConfig | undefined;
|
64
|
+
withCompress(compress: Compress): Configs;
|
65
|
+
withCacheUrlParameterFilter(cacheUrlParameterFilter: CacheUrlParameterFilter): Configs;
|
66
|
+
set cacheUrlParameterFilter(cacheUrlParameterFilter: CacheUrlParameterFilter | undefined);
|
67
|
+
get cacheUrlParameterFilter(): CacheUrlParameterFilter | undefined;
|
68
|
+
withIpv6Accelerate(ipv6Accelerate: number): Configs;
|
69
|
+
set ipv6Accelerate(ipv6Accelerate: number | undefined);
|
70
|
+
get ipv6Accelerate(): number | undefined;
|
71
|
+
withErrorCodeCache(errorCodeCache: Array<ErrorCodeCache>): Configs;
|
72
|
+
set errorCodeCache(errorCodeCache: Array<ErrorCodeCache> | undefined);
|
73
|
+
get errorCodeCache(): Array<ErrorCodeCache> | undefined;
|
74
|
+
withOriginRangeStatus(originRangeStatus: string): Configs;
|
75
|
+
set originRangeStatus(originRangeStatus: string | undefined);
|
76
|
+
get originRangeStatus(): string | undefined;
|
77
|
+
withUserAgentFilter(userAgentFilter: UserAgentFilter): Configs;
|
78
|
+
set userAgentFilter(userAgentFilter: UserAgentFilter | undefined);
|
79
|
+
get userAgentFilter(): UserAgentFilter | undefined;
|
80
|
+
withOriginRequestUrlRewrite(originRequestUrlRewrite: Array<OriginRequestUrlRewrite>): Configs;
|
81
|
+
set originRequestUrlRewrite(originRequestUrlRewrite: Array<OriginRequestUrlRewrite> | undefined);
|
82
|
+
get originRequestUrlRewrite(): Array<OriginRequestUrlRewrite> | undefined;
|
83
|
+
withErrorCodeRedirectRules(errorCodeRedirectRules: Array<ErrorCodeRedirectRules>): Configs;
|
84
|
+
set errorCodeRedirectRules(errorCodeRedirectRules: Array<ErrorCodeRedirectRules> | undefined);
|
85
|
+
get errorCodeRedirectRules(): Array<ErrorCodeRedirectRules> | undefined;
|
86
|
+
}
|
@@ -0,0 +1,235 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.Configs = void 0;
|
4
|
+
var Configs = /** @class */ (function () {
|
5
|
+
function Configs() {
|
6
|
+
}
|
7
|
+
Configs.prototype.withOriginRequestHeader = function (originRequestHeader) {
|
8
|
+
this['origin_request_header'] = originRequestHeader;
|
9
|
+
return this;
|
10
|
+
};
|
11
|
+
Object.defineProperty(Configs.prototype, "originRequestHeader", {
|
12
|
+
get: function () {
|
13
|
+
return this['origin_request_header'];
|
14
|
+
},
|
15
|
+
set: function (originRequestHeader) {
|
16
|
+
this['origin_request_header'] = originRequestHeader;
|
17
|
+
},
|
18
|
+
enumerable: false,
|
19
|
+
configurable: true
|
20
|
+
});
|
21
|
+
Configs.prototype.withHttpResponseHeader = function (httpResponseHeader) {
|
22
|
+
this['http_response_header'] = httpResponseHeader;
|
23
|
+
return this;
|
24
|
+
};
|
25
|
+
Object.defineProperty(Configs.prototype, "httpResponseHeader", {
|
26
|
+
get: function () {
|
27
|
+
return this['http_response_header'];
|
28
|
+
},
|
29
|
+
set: function (httpResponseHeader) {
|
30
|
+
this['http_response_header'] = httpResponseHeader;
|
31
|
+
},
|
32
|
+
enumerable: false,
|
33
|
+
configurable: true
|
34
|
+
});
|
35
|
+
Configs.prototype.withUrlAuth = function (urlAuth) {
|
36
|
+
this['url_auth'] = urlAuth;
|
37
|
+
return this;
|
38
|
+
};
|
39
|
+
Object.defineProperty(Configs.prototype, "urlAuth", {
|
40
|
+
get: function () {
|
41
|
+
return this['url_auth'];
|
42
|
+
},
|
43
|
+
set: function (urlAuth) {
|
44
|
+
this['url_auth'] = urlAuth;
|
45
|
+
},
|
46
|
+
enumerable: false,
|
47
|
+
configurable: true
|
48
|
+
});
|
49
|
+
Configs.prototype.withHttps = function (https) {
|
50
|
+
this['https'] = https;
|
51
|
+
return this;
|
52
|
+
};
|
53
|
+
Configs.prototype.withSources = function (sources) {
|
54
|
+
this['sources'] = sources;
|
55
|
+
return this;
|
56
|
+
};
|
57
|
+
Configs.prototype.withOriginProtocol = function (originProtocol) {
|
58
|
+
this['origin_protocol'] = originProtocol;
|
59
|
+
return this;
|
60
|
+
};
|
61
|
+
Object.defineProperty(Configs.prototype, "originProtocol", {
|
62
|
+
get: function () {
|
63
|
+
return this['origin_protocol'];
|
64
|
+
},
|
65
|
+
set: function (originProtocol) {
|
66
|
+
this['origin_protocol'] = originProtocol;
|
67
|
+
},
|
68
|
+
enumerable: false,
|
69
|
+
configurable: true
|
70
|
+
});
|
71
|
+
Configs.prototype.withOriginFollow302Status = function (originFollow302Status) {
|
72
|
+
this['origin_follow302_status'] = originFollow302Status;
|
73
|
+
return this;
|
74
|
+
};
|
75
|
+
Object.defineProperty(Configs.prototype, "originFollow302Status", {
|
76
|
+
get: function () {
|
77
|
+
return this['origin_follow302_status'];
|
78
|
+
},
|
79
|
+
set: function (originFollow302Status) {
|
80
|
+
this['origin_follow302_status'] = originFollow302Status;
|
81
|
+
},
|
82
|
+
enumerable: false,
|
83
|
+
configurable: true
|
84
|
+
});
|
85
|
+
Configs.prototype.withCacheRules = function (cacheRules) {
|
86
|
+
this['cache_rules'] = cacheRules;
|
87
|
+
return this;
|
88
|
+
};
|
89
|
+
Object.defineProperty(Configs.prototype, "cacheRules", {
|
90
|
+
get: function () {
|
91
|
+
return this['cache_rules'];
|
92
|
+
},
|
93
|
+
set: function (cacheRules) {
|
94
|
+
this['cache_rules'] = cacheRules;
|
95
|
+
},
|
96
|
+
enumerable: false,
|
97
|
+
configurable: true
|
98
|
+
});
|
99
|
+
Configs.prototype.withIpFilter = function (ipFilter) {
|
100
|
+
this['ip_filter'] = ipFilter;
|
101
|
+
return this;
|
102
|
+
};
|
103
|
+
Object.defineProperty(Configs.prototype, "ipFilter", {
|
104
|
+
get: function () {
|
105
|
+
return this['ip_filter'];
|
106
|
+
},
|
107
|
+
set: function (ipFilter) {
|
108
|
+
this['ip_filter'] = ipFilter;
|
109
|
+
},
|
110
|
+
enumerable: false,
|
111
|
+
configurable: true
|
112
|
+
});
|
113
|
+
Configs.prototype.withReferer = function (referer) {
|
114
|
+
this['referer'] = referer;
|
115
|
+
return this;
|
116
|
+
};
|
117
|
+
Configs.prototype.withForceRedirect = function (forceRedirect) {
|
118
|
+
this['force_redirect'] = forceRedirect;
|
119
|
+
return this;
|
120
|
+
};
|
121
|
+
Object.defineProperty(Configs.prototype, "forceRedirect", {
|
122
|
+
get: function () {
|
123
|
+
return this['force_redirect'];
|
124
|
+
},
|
125
|
+
set: function (forceRedirect) {
|
126
|
+
this['force_redirect'] = forceRedirect;
|
127
|
+
},
|
128
|
+
enumerable: false,
|
129
|
+
configurable: true
|
130
|
+
});
|
131
|
+
Configs.prototype.withCompress = function (compress) {
|
132
|
+
this['compress'] = compress;
|
133
|
+
return this;
|
134
|
+
};
|
135
|
+
Configs.prototype.withCacheUrlParameterFilter = function (cacheUrlParameterFilter) {
|
136
|
+
this['cache_url_parameter_filter'] = cacheUrlParameterFilter;
|
137
|
+
return this;
|
138
|
+
};
|
139
|
+
Object.defineProperty(Configs.prototype, "cacheUrlParameterFilter", {
|
140
|
+
get: function () {
|
141
|
+
return this['cache_url_parameter_filter'];
|
142
|
+
},
|
143
|
+
set: function (cacheUrlParameterFilter) {
|
144
|
+
this['cache_url_parameter_filter'] = cacheUrlParameterFilter;
|
145
|
+
},
|
146
|
+
enumerable: false,
|
147
|
+
configurable: true
|
148
|
+
});
|
149
|
+
Configs.prototype.withIpv6Accelerate = function (ipv6Accelerate) {
|
150
|
+
this['ipv6_accelerate'] = ipv6Accelerate;
|
151
|
+
return this;
|
152
|
+
};
|
153
|
+
Object.defineProperty(Configs.prototype, "ipv6Accelerate", {
|
154
|
+
get: function () {
|
155
|
+
return this['ipv6_accelerate'];
|
156
|
+
},
|
157
|
+
set: function (ipv6Accelerate) {
|
158
|
+
this['ipv6_accelerate'] = ipv6Accelerate;
|
159
|
+
},
|
160
|
+
enumerable: false,
|
161
|
+
configurable: true
|
162
|
+
});
|
163
|
+
Configs.prototype.withErrorCodeCache = function (errorCodeCache) {
|
164
|
+
this['error_code_cache'] = errorCodeCache;
|
165
|
+
return this;
|
166
|
+
};
|
167
|
+
Object.defineProperty(Configs.prototype, "errorCodeCache", {
|
168
|
+
get: function () {
|
169
|
+
return this['error_code_cache'];
|
170
|
+
},
|
171
|
+
set: function (errorCodeCache) {
|
172
|
+
this['error_code_cache'] = errorCodeCache;
|
173
|
+
},
|
174
|
+
enumerable: false,
|
175
|
+
configurable: true
|
176
|
+
});
|
177
|
+
Configs.prototype.withOriginRangeStatus = function (originRangeStatus) {
|
178
|
+
this['origin_range_status'] = originRangeStatus;
|
179
|
+
return this;
|
180
|
+
};
|
181
|
+
Object.defineProperty(Configs.prototype, "originRangeStatus", {
|
182
|
+
get: function () {
|
183
|
+
return this['origin_range_status'];
|
184
|
+
},
|
185
|
+
set: function (originRangeStatus) {
|
186
|
+
this['origin_range_status'] = originRangeStatus;
|
187
|
+
},
|
188
|
+
enumerable: false,
|
189
|
+
configurable: true
|
190
|
+
});
|
191
|
+
Configs.prototype.withUserAgentFilter = function (userAgentFilter) {
|
192
|
+
this['user_agent_filter'] = userAgentFilter;
|
193
|
+
return this;
|
194
|
+
};
|
195
|
+
Object.defineProperty(Configs.prototype, "userAgentFilter", {
|
196
|
+
get: function () {
|
197
|
+
return this['user_agent_filter'];
|
198
|
+
},
|
199
|
+
set: function (userAgentFilter) {
|
200
|
+
this['user_agent_filter'] = userAgentFilter;
|
201
|
+
},
|
202
|
+
enumerable: false,
|
203
|
+
configurable: true
|
204
|
+
});
|
205
|
+
Configs.prototype.withOriginRequestUrlRewrite = function (originRequestUrlRewrite) {
|
206
|
+
this['origin_request_url_rewrite'] = originRequestUrlRewrite;
|
207
|
+
return this;
|
208
|
+
};
|
209
|
+
Object.defineProperty(Configs.prototype, "originRequestUrlRewrite", {
|
210
|
+
get: function () {
|
211
|
+
return this['origin_request_url_rewrite'];
|
212
|
+
},
|
213
|
+
set: function (originRequestUrlRewrite) {
|
214
|
+
this['origin_request_url_rewrite'] = originRequestUrlRewrite;
|
215
|
+
},
|
216
|
+
enumerable: false,
|
217
|
+
configurable: true
|
218
|
+
});
|
219
|
+
Configs.prototype.withErrorCodeRedirectRules = function (errorCodeRedirectRules) {
|
220
|
+
this['error_code_redirect_rules'] = errorCodeRedirectRules;
|
221
|
+
return this;
|
222
|
+
};
|
223
|
+
Object.defineProperty(Configs.prototype, "errorCodeRedirectRules", {
|
224
|
+
get: function () {
|
225
|
+
return this['error_code_redirect_rules'];
|
226
|
+
},
|
227
|
+
set: function (errorCodeRedirectRules) {
|
228
|
+
this['error_code_redirect_rules'] = errorCodeRedirectRules;
|
229
|
+
},
|
230
|
+
enumerable: false,
|
231
|
+
configurable: true
|
232
|
+
});
|
233
|
+
return Configs;
|
234
|
+
}());
|
235
|
+
exports.Configs = Configs;
|