tencentcloud-sdk-nodejs-teo 4.0.332

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Client = void 0;
4
+ /* eslint-disable @typescript-eslint/no-unused-vars */
5
+ /*
6
+ * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
7
+ *
8
+ * Licensed under the Apache License, Version 2.0 (the "License");
9
+ * you may not use this file except in compliance with the License.
10
+ * You may obtain a copy of the License at
11
+ *
12
+ * http://www.apache.org/licenses/LICENSE-2.0
13
+ *
14
+ * Unless required by applicable law or agreed to in writing,
15
+ * software distributed under the License is distributed on an
16
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17
+ * KIND, either express or implied. See the License for the
18
+ * specific language governing permissions and limitations
19
+ * under the License.
20
+ */
21
+ const TencentCloudCommon = require("tencentcloud-sdk-nodejs-common");
22
+ /**
23
+ * teo client
24
+ * @class
25
+ */
26
+ class Client extends TencentCloudCommon.AbstractClient {
27
+ constructor(clientConfig) {
28
+ super("teo.tencentcloudapi.com", "2022-01-06", clientConfig);
29
+ }
30
+ /**
31
+ * 创建清除缓存任务
32
+ */
33
+ async CreatePurgeTask(req, cb) {
34
+ return this.request("CreatePurgeTask", req, cb);
35
+ }
36
+ /**
37
+ * 查询清除缓存历史记录
38
+ */
39
+ async DescribePurgeTasks(req, cb) {
40
+ return this.request("DescribePurgeTasks", req, cb);
41
+ }
42
+ }
43
+ exports.Client = Client;
@@ -0,0 +1,149 @@
1
+ /**
2
+ * CreatePurgeTask返回参数结构体
3
+ */
4
+ export interface CreatePurgeTaskResponse {
5
+ /**
6
+ * 任务ID
7
+ */
8
+ JobId: string;
9
+ /**
10
+ * 失败的任务列表及原因
11
+ 注意:此字段可能返回 null,表示取不到有效值。
12
+ */
13
+ FailedList: Array<FailReason>;
14
+ /**
15
+ * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
16
+ */
17
+ RequestId?: string;
18
+ }
19
+ /**
20
+ * 内容管理任务结果
21
+ */
22
+ export interface Task {
23
+ /**
24
+ * 任务ID
25
+ */
26
+ JobId: string;
27
+ /**
28
+ * 状态
29
+ */
30
+ Status: string;
31
+ /**
32
+ * 资源
33
+ */
34
+ Target: string;
35
+ /**
36
+ * 任务类型
37
+ */
38
+ Type: string;
39
+ /**
40
+ * 任务创建时间
41
+ */
42
+ CreateTime: string;
43
+ /**
44
+ * 任务完成时间
45
+ */
46
+ UpdateTime: string;
47
+ }
48
+ /**
49
+ * DescribePurgeTasks请求参数结构体
50
+ */
51
+ export interface DescribePurgeTasksRequest {
52
+ /**
53
+ * 任务ID
54
+ */
55
+ JobId?: string;
56
+ /**
57
+ * 类型
58
+ */
59
+ Type?: string;
60
+ /**
61
+ * 查询起始时间
62
+ */
63
+ StartTime?: string;
64
+ /**
65
+ * 查询结束时间
66
+ */
67
+ EndTime?: string;
68
+ /**
69
+ * 查询起始偏移量
70
+ */
71
+ Offset?: number;
72
+ /**
73
+ * 查询最大返回的结果条数
74
+ */
75
+ Limit?: number;
76
+ /**
77
+ * 查询的状态
78
+ 允许的值为:processing、success、failed、timeout、invalid
79
+ */
80
+ Statuses?: Array<string>;
81
+ /**
82
+ * zone id
83
+ */
84
+ ZoneId?: string;
85
+ /**
86
+ * 查询的域名列表
87
+ */
88
+ Domains?: Array<string>;
89
+ /**
90
+ * 查询内容
91
+ */
92
+ Target?: string;
93
+ }
94
+ /**
95
+ * 失败原因
96
+ */
97
+ export interface FailReason {
98
+ /**
99
+ * 失败原因
100
+ */
101
+ Reason: string;
102
+ /**
103
+ * 失败列表
104
+ */
105
+ Targets: Array<string>;
106
+ }
107
+ /**
108
+ * CreatePurgeTask请求参数结构体
109
+ */
110
+ export interface CreatePurgeTaskRequest {
111
+ /**
112
+ * Zone ID
113
+ */
114
+ ZoneId: string;
115
+ /**
116
+ * 类型,当前支持的类型:
117
+ - purge_url:URL
118
+ - purge_prefix:前缀
119
+ - purge_host:Hostname
120
+ - purge_all:全部缓存
121
+ */
122
+ Type: string;
123
+ /**
124
+ * 内容,一行一个
125
+ */
126
+ Targets?: Array<string>;
127
+ /**
128
+ * 若有编码转换,仅清除编码转换后匹配的资源
129
+ 若内容含有非 ASCII 字符集的字符,请打开 URL Encode 开关,编码转换(编码规则遵循 RFC3986)
130
+ */
131
+ EncodeUrl?: boolean;
132
+ }
133
+ /**
134
+ * DescribePurgeTasks返回参数结构体
135
+ */
136
+ export interface DescribePurgeTasksResponse {
137
+ /**
138
+ * 该查询条件总共条目数
139
+ */
140
+ TotalCount: number;
141
+ /**
142
+ * 任务结果列表
143
+ */
144
+ Tasks: Array<Task>;
145
+ /**
146
+ * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
147
+ */
148
+ RequestId?: string;
149
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing,
12
+ * software distributed under the License is distributed on an
13
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ * KIND, either express or implied. See the License for the
15
+ * specific language governing permissions and limitations
16
+ * under the License.
17
+ */
18
+ Object.defineProperty(exports, "__esModule", { value: true });
package/tsconfig.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "compilerOptions": {
3
+ // "incremental": true, /* 增量编译 提高编译速度*/
4
+ "target": "ES2019" /* 编译目标ES版本*/,
5
+ "module": "commonjs" /* 编译目标模块系统*/,
6
+ // "lib": [], /* 编译过程中需要引入的库文件列表*/
7
+ "declaration": true /* 编译时创建声明文件 */,
8
+ "outDir": "tencentcloud" /* ts编译输出目录 */,
9
+ "rootDir": "src" /* ts编译根目录. */,
10
+ "importHelpers": true /* 从tslib导入辅助工具函数(如__importDefault)*/,
11
+ "strict": true /* 严格模式开关 等价于noImplicitAny、strictNullChecks、strictFunctionTypes、strictBindCallApply等设置true */,
12
+ "strictNullChecks": false,
13
+ "noUnusedLocals": false /* 未使用局部变量报错*/,
14
+ "noUnusedParameters": false /* 未使用参数报错*/,
15
+ "noImplicitReturns": true /* 有代码路径没有返回值时报错*/,
16
+ "noFallthroughCasesInSwitch": true /* 不允许switch的case语句贯穿*/,
17
+ "moduleResolution": "node" /* 模块解析策略 */,
18
+ "typeRoots": [
19
+ /* 要包含的类型声明文件路径列表*/
20
+ "./typings",
21
+ "./node_modules/@types"
22
+ ],
23
+ "allowSyntheticDefaultImports": true /* 允许从没有设置默认导出的模块中默认导入,仅用于提示,不影响编译结果*/,
24
+ "esModuleInterop": false /* 允许编译生成文件时,在代码中注入工具类(__importDefault、__importStar)对ESM与commonjs混用情况做兼容处理*/,
25
+ "sourceMap": false
26
+ },
27
+ "include": [
28
+ /* 需要编译的文件 */
29
+ "src/**/*.ts",
30
+ "typings/**/*.ts"
31
+ ],
32
+ "exclude": []
33
+ }
@@ -0,0 +1,2 @@
1
+ declare module "get-stream"
2
+ declare module "is-stream"