tencentcloud-sdk-nodejs 4.0.457 → 4.0.458
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.
- package/CHANGELOG.md +143 -0
- package/SERVICE_CHANGELOG.md +171 -84
- package/package.json +1 -1
- package/products.md +8 -8
- package/src/common/abstract_client.ts +11 -1
- package/src/common/http/fetch.ts +12 -5
- package/src/common/http/http_connection.ts +23 -19
- package/src/common/interface.ts +11 -0
- package/src/common/sdk_version.ts +1 -1
- package/src/services/bma/v20210624/bma_client.ts +12 -11
- package/src/services/bma/v20210624/bma_models.ts +149 -149
- package/src/services/cvm/v20170312/cvm_client.ts +1 -1
- package/src/services/cvm/v20170312/cvm_models.ts +4 -4
- package/src/services/cwp/v20180228/cwp_client.ts +70 -19
- package/src/services/cwp/v20180228/cwp_models.ts +627 -215
- package/src/services/mariadb/v20170312/mariadb_client.ts +22 -60
- package/src/services/mariadb/v20170312/mariadb_models.ts +51 -358
- package/src/services/tse/v20201207/tse_client.ts +12 -0
- package/src/services/tse/v20201207/tse_models.ts +30 -0
- package/src/services/vod/v20180717/vod_models.ts +16 -0
- package/src/services/wav/v20210129/wav_models.ts +6 -0
- package/src/services/wedata/v20210820/wedata_client.ts +15 -3
- package/src/services/wedata/v20210820/wedata_models.ts +101 -44
- package/tencentcloud/common/abstract_client.d.ts +5 -1
- package/tencentcloud/common/abstract_client.js +6 -0
- package/tencentcloud/common/http/fetch.d.ts +6 -1
- package/tencentcloud/common/http/fetch.js +3 -2
- package/tencentcloud/common/http/http_connection.d.ts +10 -2
- package/tencentcloud/common/http/http_connection.js +8 -2
- package/tencentcloud/common/interface.d.ts +12 -0
- package/tencentcloud/common/sdk_version.d.ts +1 -1
- package/tencentcloud/common/sdk_version.js +1 -1
- package/tencentcloud/services/bma/v20210624/bma_client.d.ts +11 -10
- package/tencentcloud/services/bma/v20210624/bma_client.js +11 -10
- package/tencentcloud/services/bma/v20210624/bma_models.d.ts +148 -148
- package/tencentcloud/services/cvm/v20170312/cvm_client.d.ts +1 -1
- package/tencentcloud/services/cvm/v20170312/cvm_client.js +1 -1
- package/tencentcloud/services/cvm/v20170312/cvm_models.d.ts +4 -4
- package/tencentcloud/services/cwp/v20180228/cwp_client.d.ts +21 -5
- package/tencentcloud/services/cwp/v20180228/cwp_client.js +30 -6
- package/tencentcloud/services/cwp/v20180228/cwp_models.d.ts +526 -178
- package/tencentcloud/services/mariadb/v20170312/mariadb_client.d.ts +7 -19
- package/tencentcloud/services/mariadb/v20170312/mariadb_client.js +9 -27
- package/tencentcloud/services/mariadb/v20170312/mariadb_models.d.ts +45 -299
- package/tencentcloud/services/tse/v20201207/tse_client.d.ts +5 -1
- package/tencentcloud/services/tse/v20201207/tse_client.js +6 -0
- package/tencentcloud/services/tse/v20201207/tse_models.d.ts +26 -0
- package/tencentcloud/services/vod/v20180717/vod_models.d.ts +14 -0
- package/tencentcloud/services/wav/v20210129/wav_models.d.ts +5 -0
- package/tencentcloud/services/wedata/v20210820/wedata_client.d.ts +5 -1
- package/tencentcloud/services/wedata/v20210820/wedata_client.js +6 -0
- package/tencentcloud/services/wedata/v20210820/wedata_models.d.ts +86 -38
- package/test/cwp.v20180228.test.js +44 -4
- package/test/mariadb.v20170312.test.js +6 -36
- package/test/tse.v20201207.test.js +10 -0
- package/test/wedata.v20210820.test.js +10 -0
|
@@ -73,6 +73,26 @@ export interface DescribeNacosReplicasRequest {
|
|
|
73
73
|
Offset?: number
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
/**
|
|
77
|
+
* UpdateEngineInternetAccess请求参数结构体
|
|
78
|
+
*/
|
|
79
|
+
export interface UpdateEngineInternetAccessRequest {
|
|
80
|
+
/**
|
|
81
|
+
* 引擎ID
|
|
82
|
+
*/
|
|
83
|
+
InstanceId: string
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* 引擎类型
|
|
87
|
+
*/
|
|
88
|
+
EngineType: string
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* 是否开启客户端公网访问,true开 false关
|
|
92
|
+
*/
|
|
93
|
+
EnableClientInternetAccess?: boolean
|
|
94
|
+
}
|
|
95
|
+
|
|
76
96
|
/**
|
|
77
97
|
* Apollo 环境配置参数
|
|
78
98
|
*/
|
|
@@ -108,6 +128,16 @@ export interface ApolloEnvParam {
|
|
|
108
128
|
SubnetId: string
|
|
109
129
|
}
|
|
110
130
|
|
|
131
|
+
/**
|
|
132
|
+
* UpdateEngineInternetAccess返回参数结构体
|
|
133
|
+
*/
|
|
134
|
+
export interface UpdateEngineInternetAccessResponse {
|
|
135
|
+
/**
|
|
136
|
+
* 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
|
137
|
+
*/
|
|
138
|
+
RequestId?: string
|
|
139
|
+
}
|
|
140
|
+
|
|
111
141
|
/**
|
|
112
142
|
* 键值对
|
|
113
143
|
*/
|
|
@@ -5944,6 +5944,14 @@ export interface VideoTemplateInfo {
|
|
|
5944
5944
|
默认值:OFF。
|
|
5945
5945
|
*/
|
|
5946
5946
|
PreserveHDRSwitch?: string
|
|
5947
|
+
|
|
5948
|
+
/**
|
|
5949
|
+
* 编码标签,仅当视频流的编码格式为 H.265 编码时有效,可选值:
|
|
5950
|
+
<li>hvc1 表示 hvc1 标签;</li>
|
|
5951
|
+
<li>hev1 表示 hev1 标签。 </li>
|
|
5952
|
+
默认值:hvc1。
|
|
5953
|
+
*/
|
|
5954
|
+
CodecTag?: string
|
|
5947
5955
|
}
|
|
5948
5956
|
|
|
5949
5957
|
/**
|
|
@@ -13175,6 +13183,14 @@ export interface VideoTemplateInfoForUpdate {
|
|
|
13175
13183
|
<li>OFF: 无论原始文件是 HDR 还是 SDR,转码输出均为 SDR。</li>
|
|
13176
13184
|
*/
|
|
13177
13185
|
PreserveHDRSwitch?: string
|
|
13186
|
+
|
|
13187
|
+
/**
|
|
13188
|
+
* 编码标签,仅当视频流的编码格式为 H.265 编码时有效,可选值:
|
|
13189
|
+
<li>hvc1 表示 hvc1 标签;</li>
|
|
13190
|
+
<li>hev1 表示 hev1 标签。 </li>
|
|
13191
|
+
默认值:hvc1。
|
|
13192
|
+
*/
|
|
13193
|
+
CodecTag?: string
|
|
13178
13194
|
}
|
|
13179
13195
|
|
|
13180
13196
|
/**
|
|
@@ -39,8 +39,9 @@ import {
|
|
|
39
39
|
TaskInnerInfo,
|
|
40
40
|
BatchDeleteTasksNewResponse,
|
|
41
41
|
ModifyTaskLinksResponse,
|
|
42
|
+
DescribeDatasourceResponse,
|
|
43
|
+
DescribeDatasourceRequest,
|
|
42
44
|
IntegrationNodeMapping,
|
|
43
|
-
IntegrationNodeSchema,
|
|
44
45
|
KillInstancesResponse,
|
|
45
46
|
SetTaskAlarmNewRequest,
|
|
46
47
|
CommonContent,
|
|
@@ -88,7 +89,7 @@ import {
|
|
|
88
89
|
BatchModifyOwnersNewResponse,
|
|
89
90
|
DescribeDataSourceWithoutInfoRequest,
|
|
90
91
|
CanvasInfo,
|
|
91
|
-
|
|
92
|
+
IntegrationNodeSchema,
|
|
92
93
|
DeleteWorkflowNewRequest,
|
|
93
94
|
FreezeTasksByMultiWorkflowRequest,
|
|
94
95
|
InstanceInfo,
|
|
@@ -121,13 +122,14 @@ import {
|
|
|
121
122
|
CreateTaskResponse,
|
|
122
123
|
BatchResult,
|
|
123
124
|
ModifyDataSourceRequest,
|
|
125
|
+
CreateCustomFunctionResponse,
|
|
124
126
|
DescribeTaskInstancesResponse,
|
|
125
127
|
ModifyTaskInfoRequest,
|
|
126
128
|
DataSourceInfo,
|
|
127
129
|
DescribeTaskDetailRequest,
|
|
128
130
|
SetTaskAlarmNewResponse,
|
|
129
131
|
CreateWorkflowResponse,
|
|
130
|
-
|
|
132
|
+
CreateCustomFunctionRequest,
|
|
131
133
|
DeleteDataSourcesResponse,
|
|
132
134
|
RegisterEventListenerRequest,
|
|
133
135
|
ModifyTaskLinksRequest,
|
|
@@ -475,6 +477,16 @@ export class Client extends AbstractClient {
|
|
|
475
477
|
return this.request("ModifyTaskLinks", req, cb)
|
|
476
478
|
}
|
|
477
479
|
|
|
480
|
+
/**
|
|
481
|
+
* 创建用户自定义函数
|
|
482
|
+
*/
|
|
483
|
+
async CreateCustomFunction(
|
|
484
|
+
req: CreateCustomFunctionRequest,
|
|
485
|
+
cb?: (error: string, rep: CreateCustomFunctionResponse) => void
|
|
486
|
+
): Promise<CreateCustomFunctionResponse> {
|
|
487
|
+
return this.request("CreateCustomFunction", req, cb)
|
|
488
|
+
}
|
|
489
|
+
|
|
478
490
|
/**
|
|
479
491
|
* <p style="color:red;">[注意:该Beta版本只满足广州区部分白名单客户使用]</p>
|
|
480
492
|
文件夹更新
|
|
@@ -856,6 +856,32 @@ export interface ModifyTaskLinksResponse {
|
|
|
856
856
|
RequestId?: string
|
|
857
857
|
}
|
|
858
858
|
|
|
859
|
+
/**
|
|
860
|
+
* DescribeDatasource返回参数结构体
|
|
861
|
+
*/
|
|
862
|
+
export interface DescribeDatasourceResponse {
|
|
863
|
+
/**
|
|
864
|
+
* 数据源对象
|
|
865
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
866
|
+
*/
|
|
867
|
+
Data: DataSourceInfo
|
|
868
|
+
|
|
869
|
+
/**
|
|
870
|
+
* 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
|
871
|
+
*/
|
|
872
|
+
RequestId?: string
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
/**
|
|
876
|
+
* DescribeDatasource请求参数结构体
|
|
877
|
+
*/
|
|
878
|
+
export interface DescribeDatasourceRequest {
|
|
879
|
+
/**
|
|
880
|
+
* 对象唯一ID
|
|
881
|
+
*/
|
|
882
|
+
Id: number
|
|
883
|
+
}
|
|
884
|
+
|
|
859
885
|
/**
|
|
860
886
|
* 集成节点映射
|
|
861
887
|
*/
|
|
@@ -889,38 +915,6 @@ export interface IntegrationNodeMapping {
|
|
|
889
915
|
ExtConfig?: Array<RecordField>
|
|
890
916
|
}
|
|
891
917
|
|
|
892
|
-
/**
|
|
893
|
-
* 集成节点schema
|
|
894
|
-
*/
|
|
895
|
-
export interface IntegrationNodeSchema {
|
|
896
|
-
/**
|
|
897
|
-
* schema id
|
|
898
|
-
*/
|
|
899
|
-
Id: string
|
|
900
|
-
|
|
901
|
-
/**
|
|
902
|
-
* schema名称
|
|
903
|
-
*/
|
|
904
|
-
Name: string
|
|
905
|
-
|
|
906
|
-
/**
|
|
907
|
-
* schema类型
|
|
908
|
-
*/
|
|
909
|
-
Type: string
|
|
910
|
-
|
|
911
|
-
/**
|
|
912
|
-
* schema值
|
|
913
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
914
|
-
*/
|
|
915
|
-
Value?: string
|
|
916
|
-
|
|
917
|
-
/**
|
|
918
|
-
* schema拓展属性
|
|
919
|
-
注意:此字段可能返回 null,表示取不到有效值。
|
|
920
|
-
*/
|
|
921
|
-
Properties?: Array<RecordField>
|
|
922
|
-
}
|
|
923
|
-
|
|
924
918
|
/**
|
|
925
919
|
* KillInstances返回参数结构体
|
|
926
920
|
*/
|
|
@@ -2092,13 +2086,35 @@ export interface CanvasInfo {
|
|
|
2092
2086
|
}
|
|
2093
2087
|
|
|
2094
2088
|
/**
|
|
2095
|
-
*
|
|
2089
|
+
* 集成节点schema
|
|
2096
2090
|
*/
|
|
2097
|
-
export interface
|
|
2091
|
+
export interface IntegrationNodeSchema {
|
|
2098
2092
|
/**
|
|
2099
|
-
*
|
|
2093
|
+
* schema id
|
|
2100
2094
|
*/
|
|
2101
|
-
Id:
|
|
2095
|
+
Id: string
|
|
2096
|
+
|
|
2097
|
+
/**
|
|
2098
|
+
* schema名称
|
|
2099
|
+
*/
|
|
2100
|
+
Name: string
|
|
2101
|
+
|
|
2102
|
+
/**
|
|
2103
|
+
* schema类型
|
|
2104
|
+
*/
|
|
2105
|
+
Type: string
|
|
2106
|
+
|
|
2107
|
+
/**
|
|
2108
|
+
* schema值
|
|
2109
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
2110
|
+
*/
|
|
2111
|
+
Value?: string
|
|
2112
|
+
|
|
2113
|
+
/**
|
|
2114
|
+
* schema拓展属性
|
|
2115
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
2116
|
+
*/
|
|
2117
|
+
Properties?: Array<RecordField>
|
|
2102
2118
|
}
|
|
2103
2119
|
|
|
2104
2120
|
/**
|
|
@@ -3139,6 +3155,28 @@ export interface ModifyDataSourceRequest {
|
|
|
3139
3155
|
COSRegion?: string
|
|
3140
3156
|
}
|
|
3141
3157
|
|
|
3158
|
+
/**
|
|
3159
|
+
* CreateCustomFunction返回参数结构体
|
|
3160
|
+
*/
|
|
3161
|
+
export interface CreateCustomFunctionResponse {
|
|
3162
|
+
/**
|
|
3163
|
+
* 函数唯一标识
|
|
3164
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
3165
|
+
*/
|
|
3166
|
+
FunctionId: string
|
|
3167
|
+
|
|
3168
|
+
/**
|
|
3169
|
+
* 无
|
|
3170
|
+
注意:此字段可能返回 null,表示取不到有效值。
|
|
3171
|
+
*/
|
|
3172
|
+
ErrorMessage: string
|
|
3173
|
+
|
|
3174
|
+
/**
|
|
3175
|
+
* 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
|
3176
|
+
*/
|
|
3177
|
+
RequestId?: string
|
|
3178
|
+
}
|
|
3179
|
+
|
|
3142
3180
|
/**
|
|
3143
3181
|
* DescribeTaskInstances返回参数结构体
|
|
3144
3182
|
*/
|
|
@@ -3535,19 +3573,38 @@ export interface CreateWorkflowResponse {
|
|
|
3535
3573
|
}
|
|
3536
3574
|
|
|
3537
3575
|
/**
|
|
3538
|
-
*
|
|
3576
|
+
* CreateCustomFunction请求参数结构体
|
|
3539
3577
|
*/
|
|
3540
|
-
export interface
|
|
3578
|
+
export interface CreateCustomFunctionRequest {
|
|
3541
3579
|
/**
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
Data: DataSourceInfo
|
|
3580
|
+
* 类型:HIVE、SPARK
|
|
3581
|
+
*/
|
|
3582
|
+
Type: string
|
|
3546
3583
|
|
|
3547
3584
|
/**
|
|
3548
|
-
*
|
|
3585
|
+
* 分类:窗口函数、聚合函数、日期函数......
|
|
3549
3586
|
*/
|
|
3550
|
-
|
|
3587
|
+
Kind: string
|
|
3588
|
+
|
|
3589
|
+
/**
|
|
3590
|
+
* 函数名称
|
|
3591
|
+
*/
|
|
3592
|
+
Name: string
|
|
3593
|
+
|
|
3594
|
+
/**
|
|
3595
|
+
* 集群实例引擎 ID
|
|
3596
|
+
*/
|
|
3597
|
+
ClusterIdentifier: string
|
|
3598
|
+
|
|
3599
|
+
/**
|
|
3600
|
+
* 数据库名称
|
|
3601
|
+
*/
|
|
3602
|
+
DbName?: string
|
|
3603
|
+
|
|
3604
|
+
/**
|
|
3605
|
+
* 项目ID
|
|
3606
|
+
*/
|
|
3607
|
+
ProjectId?: string
|
|
3551
3608
|
}
|
|
3552
3609
|
|
|
3553
3610
|
/**
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { ClientProfile, Credential, ClientConfig } from "./interface";
|
|
2
2
|
export declare type ResponseCallback<TReuslt = any> = (error: string, rep: TReuslt) => void;
|
|
3
|
-
export interface RequestOptions extends Pick<ClientProfile["httpProfile"], "headers"
|
|
3
|
+
export interface RequestOptions extends Partial<Pick<ClientProfile["httpProfile"], "headers">> {
|
|
4
4
|
multipart?: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* 中止请求信号
|
|
7
|
+
*/
|
|
8
|
+
signal?: AbortSignal;
|
|
5
9
|
}
|
|
6
10
|
declare type ResponseData = any;
|
|
7
11
|
/**
|
|
@@ -88,6 +88,9 @@ class AbstractClient {
|
|
|
88
88
|
data: params,
|
|
89
89
|
timeout: this.profile.httpProfile.reqTimeout * 1000,
|
|
90
90
|
headers: Object.assign({}, this.profile.httpProfile.headers, options.headers),
|
|
91
|
+
agent: this.profile.httpProfile.agent,
|
|
92
|
+
proxy: this.profile.httpProfile.proxy,
|
|
93
|
+
signal: options.signal
|
|
91
94
|
});
|
|
92
95
|
}
|
|
93
96
|
catch (error) {
|
|
@@ -117,6 +120,9 @@ class AbstractClient {
|
|
|
117
120
|
requestClient: this.sdkVersion,
|
|
118
121
|
language: this.profile.language,
|
|
119
122
|
headers: Object.assign({}, this.profile.httpProfile.headers, options.headers),
|
|
123
|
+
agent: this.profile.httpProfile.agent,
|
|
124
|
+
proxy: this.profile.httpProfile.proxy,
|
|
125
|
+
signal: options.signal
|
|
120
126
|
});
|
|
121
127
|
}
|
|
122
128
|
catch (e) {
|
|
@@ -1,2 +1,7 @@
|
|
|
1
1
|
import { RequestInit, Response } from "node-fetch";
|
|
2
|
-
export
|
|
2
|
+
export interface FetchOptions extends Omit<RequestInit, 'signal'> {
|
|
3
|
+
proxy?: string;
|
|
4
|
+
headers: Record<string, string>;
|
|
5
|
+
signal: AbortSignal;
|
|
6
|
+
}
|
|
7
|
+
export default function (url: string, options: FetchOptions): Promise<Response>;
|
|
@@ -4,8 +4,9 @@ const node_fetch_1 = require("node-fetch");
|
|
|
4
4
|
const HttpsProxyAgent = require("https-proxy-agent");
|
|
5
5
|
function default_1(url, options) {
|
|
6
6
|
const instanceOptions = options || {};
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
const proxy = options.proxy || process.env.http_proxy;
|
|
8
|
+
if (!options.agent && proxy) {
|
|
9
|
+
instanceOptions.agent = new HttpsProxyAgent(proxy);
|
|
9
10
|
}
|
|
10
11
|
return node_fetch_1.default(url, instanceOptions);
|
|
11
12
|
}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import { Response } from "node-fetch";
|
|
3
|
+
import { Agent } from "http";
|
|
2
4
|
/**
|
|
3
5
|
* @inner
|
|
4
6
|
*/
|
|
5
7
|
export declare class HttpConnection {
|
|
6
|
-
static doRequest({ method, url, data, timeout, headers, }: {
|
|
8
|
+
static doRequest({ method, url, data, timeout, headers, agent, proxy, signal }: {
|
|
7
9
|
method: string;
|
|
8
10
|
url: string;
|
|
9
11
|
data: any;
|
|
10
12
|
timeout: number;
|
|
11
13
|
headers?: Record<string, string>;
|
|
14
|
+
agent?: Agent;
|
|
15
|
+
proxy?: string;
|
|
16
|
+
signal?: AbortSignal;
|
|
12
17
|
}): Promise<Response>;
|
|
13
|
-
static doRequestWithSign3({ method, url, data, service, action, region, version, secretId, secretKey, multipart, timeout, token, requestClient, language, headers, }: {
|
|
18
|
+
static doRequestWithSign3({ method, url, data, service, action, region, version, secretId, secretKey, multipart, timeout, token, requestClient, language, headers, agent, proxy, signal }: {
|
|
14
19
|
method: string;
|
|
15
20
|
url: string;
|
|
16
21
|
data: any;
|
|
@@ -26,5 +31,8 @@ export declare class HttpConnection {
|
|
|
26
31
|
requestClient: string;
|
|
27
32
|
language: string;
|
|
28
33
|
headers?: Record<string, string>;
|
|
34
|
+
agent?: Agent;
|
|
35
|
+
proxy?: string;
|
|
36
|
+
signal?: AbortSignal;
|
|
29
37
|
}): Promise<Response>;
|
|
30
38
|
}
|
|
@@ -12,11 +12,14 @@ const fetch_1 = require("./fetch");
|
|
|
12
12
|
* @inner
|
|
13
13
|
*/
|
|
14
14
|
class HttpConnection {
|
|
15
|
-
static async doRequest({ method, url, data, timeout, headers = {}, }) {
|
|
15
|
+
static async doRequest({ method, url, data, timeout, headers = {}, agent, proxy, signal }) {
|
|
16
16
|
const config = {
|
|
17
17
|
method: method,
|
|
18
18
|
headers: Object.assign({}, headers),
|
|
19
19
|
timeout,
|
|
20
|
+
agent,
|
|
21
|
+
proxy,
|
|
22
|
+
signal
|
|
20
23
|
};
|
|
21
24
|
if (method === "GET") {
|
|
22
25
|
url += "?" + QueryString.stringify(data);
|
|
@@ -27,7 +30,7 @@ class HttpConnection {
|
|
|
27
30
|
}
|
|
28
31
|
return await fetch_1.default(url, config);
|
|
29
32
|
}
|
|
30
|
-
static async doRequestWithSign3({ method, url, data, service, action, region, version, secretId, secretKey, multipart = false, timeout = 60000, token, requestClient, language, headers = {}, }) {
|
|
33
|
+
static async doRequestWithSign3({ method, url, data, service, action, region, version, secretId, secretKey, multipart = false, timeout = 60000, token, requestClient, language, headers = {}, agent, proxy, signal }) {
|
|
31
34
|
// data 中可能带有 readStream,由于需要计算整个 body 的 hash,
|
|
32
35
|
// 所以这里把 readStream 转为 Buffer
|
|
33
36
|
// eslint-disable-next-line @typescript-eslint/no-use-before-define
|
|
@@ -57,6 +60,9 @@ class HttpConnection {
|
|
|
57
60
|
"X-TC-Token": token,
|
|
58
61
|
"X-TC-RequestClient": requestClient,
|
|
59
62
|
}),
|
|
63
|
+
agent,
|
|
64
|
+
proxy,
|
|
65
|
+
signal
|
|
60
66
|
};
|
|
61
67
|
if (token === null) {
|
|
62
68
|
delete config.headers["X-TC-Token"];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { Agent } from 'http';
|
|
1
3
|
/**
|
|
2
4
|
* 初始化client对象参数类型
|
|
3
5
|
*/
|
|
@@ -64,6 +66,16 @@ export interface ClientProfile {
|
|
|
64
66
|
* 非必选
|
|
65
67
|
*/
|
|
66
68
|
headers?: Record<string, string>;
|
|
69
|
+
/**
|
|
70
|
+
* 高级请求代理,例如 new HttpsProxyAgent("http://127.0.0.1:8899")
|
|
71
|
+
*
|
|
72
|
+
* 优先级高于 proxy 配置
|
|
73
|
+
*/
|
|
74
|
+
agent?: Agent;
|
|
75
|
+
/**
|
|
76
|
+
* http请求代理,例如 "http://127.0.0.1:8899"
|
|
77
|
+
*/
|
|
78
|
+
proxy?: string;
|
|
67
79
|
};
|
|
68
80
|
/**
|
|
69
81
|
* api请求时附带的 language 字段
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const sdkVersion = "4.0.
|
|
1
|
+
export declare const sdkVersion = "4.0.458";
|
|
@@ -16,11 +16,11 @@ export declare class Client extends AbstractClient {
|
|
|
16
16
|
*/
|
|
17
17
|
DescribeBPCompanyInfo(req?: DescribeBPCompanyInfoRequest, cb?: (error: string, rep: DescribeBPCompanyInfoResponse) => void): Promise<DescribeBPCompanyInfoResponse>;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* 本接口用于个人认证,新接入用户必须认证后才可以进行后续操作(个人认证和企业认证二选一),只需认证一次即可
|
|
20
20
|
*/
|
|
21
21
|
CreateCRUserVerify(req: CreateCRUserVerifyRequest, cb?: (error: string, rep: CreateCRUserVerifyResponse) => void): Promise<CreateCRUserVerifyResponse>;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* 新建作品
|
|
24
24
|
*/
|
|
25
25
|
CreateCRWork(req: CreateCRWorkRequest, cb?: (error: string, rep: CreateCRWorkResponse) => void): Promise<CreateCRWorkResponse>;
|
|
26
26
|
/**
|
|
@@ -28,11 +28,12 @@ export declare class Client extends AbstractClient {
|
|
|
28
28
|
*/
|
|
29
29
|
CreateBPOfflineTicket(req: CreateBPOfflineTicketRequest, cb?: (error: string, rep: CreateBPOfflineTicketResponse) => void): Promise<CreateBPOfflineTicketResponse>;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* 新建拦截
|
|
32
|
+
|
|
32
33
|
*/
|
|
33
34
|
CreateCRBlock(req: CreateCRBlockRequest, cb?: (error: string, rep: CreateCRBlockResponse) => void): Promise<CreateCRBlockResponse>;
|
|
34
35
|
/**
|
|
35
|
-
*
|
|
36
|
+
* 取证申请
|
|
36
37
|
*/
|
|
37
38
|
ModifyCRObtainStatus(req: ModifyCRObtainStatusRequest, cb?: (error: string, rep: ModifyCRObtainStatusResponse) => void): Promise<ModifyCRObtainStatusResponse>;
|
|
38
39
|
/**
|
|
@@ -44,7 +45,7 @@ export declare class Client extends AbstractClient {
|
|
|
44
45
|
*/
|
|
45
46
|
ModifyBPOfflineAttachment(req: ModifyBPOfflineAttachmentRequest, cb?: (error: string, rep: ModifyBPOfflineAttachmentResponse) => void): Promise<ModifyBPOfflineAttachmentResponse>;
|
|
46
47
|
/**
|
|
47
|
-
*
|
|
48
|
+
* 开启/关闭监测
|
|
48
49
|
*/
|
|
49
50
|
ModifyCRMonitor(req: ModifyCRMonitorRequest, cb?: (error: string, rep: ModifyCRMonitorResponse) => void): Promise<ModifyCRMonitorResponse>;
|
|
50
51
|
/**
|
|
@@ -56,15 +57,15 @@ export declare class Client extends AbstractClient {
|
|
|
56
57
|
*/
|
|
57
58
|
CreateBPFakeURL(req: CreateBPFakeURLRequest, cb?: (error: string, rep: CreateBPFakeURLResponse) => void): Promise<CreateBPFakeURLResponse>;
|
|
58
59
|
/**
|
|
59
|
-
*
|
|
60
|
+
* 权属文件添加
|
|
60
61
|
*/
|
|
61
62
|
CreateCRRightFile(req: CreateCRRightFileRequest, cb?: (error: string, rep: CreateCRRightFileResponse) => void): Promise<CreateCRRightFileResponse>;
|
|
62
63
|
/**
|
|
63
|
-
*
|
|
64
|
+
* 修改白名单列表
|
|
64
65
|
*/
|
|
65
66
|
ModifyCRWhiteList(req: ModifyCRWhiteListRequest, cb?: (error: string, rep: ModifyCRWhiteListResponse) => void): Promise<ModifyCRWhiteListResponse>;
|
|
66
67
|
/**
|
|
67
|
-
*
|
|
68
|
+
* 拦截申请
|
|
68
69
|
*/
|
|
69
70
|
ModifyCRBlockStatus(req: ModifyCRBlockStatusRequest, cb?: (error: string, rep: ModifyCRBlockStatusResponse) => void): Promise<ModifyCRBlockStatusResponse>;
|
|
70
71
|
/**
|
|
@@ -92,7 +93,7 @@ export declare class Client extends AbstractClient {
|
|
|
92
93
|
*/
|
|
93
94
|
DescribeCRMonitors(req: DescribeCRMonitorsRequest, cb?: (error: string, rep: DescribeCRMonitorsResponse) => void): Promise<DescribeCRMonitorsResponse>;
|
|
94
95
|
/**
|
|
95
|
-
*
|
|
96
|
+
* 发函申请
|
|
96
97
|
*/
|
|
97
98
|
ModifyCRRightStatus(req: ModifyCRRightStatusRequest, cb?: (error: string, rep: ModifyCRRightStatusResponse) => void): Promise<ModifyCRRightStatusResponse>;
|
|
98
99
|
/**
|
|
@@ -108,7 +109,7 @@ export declare class Client extends AbstractClient {
|
|
|
108
109
|
*/
|
|
109
110
|
CreateCRTort(req: CreateCRTortRequest, cb?: (error: string, rep: CreateCRTortResponse) => void): Promise<CreateCRTortResponse>;
|
|
110
111
|
/**
|
|
111
|
-
*
|
|
112
|
+
* 本接口用于企业认证,新接入用户必须认证后才可以进行后续操作(个人认证和企业认证二选一),只需认证一次即可
|
|
112
113
|
*/
|
|
113
114
|
CreateCRCompanyVerify(req: CreateCRCompanyVerifyRequest, cb?: (error: string, rep: CreateCRCompanyVerifyResponse) => void): Promise<CreateCRCompanyVerifyResponse>;
|
|
114
115
|
}
|
|
@@ -40,13 +40,13 @@ class Client extends abstract_client_1.AbstractClient {
|
|
|
40
40
|
return this.request("DescribeBPCompanyInfo", req, cb);
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* 本接口用于个人认证,新接入用户必须认证后才可以进行后续操作(个人认证和企业认证二选一),只需认证一次即可
|
|
44
44
|
*/
|
|
45
45
|
async CreateCRUserVerify(req, cb) {
|
|
46
46
|
return this.request("CreateCRUserVerify", req, cb);
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* 新建作品
|
|
50
50
|
*/
|
|
51
51
|
async CreateCRWork(req, cb) {
|
|
52
52
|
return this.request("CreateCRWork", req, cb);
|
|
@@ -58,13 +58,14 @@ class Client extends abstract_client_1.AbstractClient {
|
|
|
58
58
|
return this.request("CreateBPOfflineTicket", req, cb);
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
61
|
+
* 新建拦截
|
|
62
|
+
|
|
62
63
|
*/
|
|
63
64
|
async CreateCRBlock(req, cb) {
|
|
64
65
|
return this.request("CreateCRBlock", req, cb);
|
|
65
66
|
}
|
|
66
67
|
/**
|
|
67
|
-
*
|
|
68
|
+
* 取证申请
|
|
68
69
|
*/
|
|
69
70
|
async ModifyCRObtainStatus(req, cb) {
|
|
70
71
|
return this.request("ModifyCRObtainStatus", req, cb);
|
|
@@ -82,7 +83,7 @@ class Client extends abstract_client_1.AbstractClient {
|
|
|
82
83
|
return this.request("ModifyBPOfflineAttachment", req, cb);
|
|
83
84
|
}
|
|
84
85
|
/**
|
|
85
|
-
*
|
|
86
|
+
* 开启/关闭监测
|
|
86
87
|
*/
|
|
87
88
|
async ModifyCRMonitor(req, cb) {
|
|
88
89
|
return this.request("ModifyCRMonitor", req, cb);
|
|
@@ -100,19 +101,19 @@ class Client extends abstract_client_1.AbstractClient {
|
|
|
100
101
|
return this.request("CreateBPFakeURL", req, cb);
|
|
101
102
|
}
|
|
102
103
|
/**
|
|
103
|
-
*
|
|
104
|
+
* 权属文件添加
|
|
104
105
|
*/
|
|
105
106
|
async CreateCRRightFile(req, cb) {
|
|
106
107
|
return this.request("CreateCRRightFile", req, cb);
|
|
107
108
|
}
|
|
108
109
|
/**
|
|
109
|
-
*
|
|
110
|
+
* 修改白名单列表
|
|
110
111
|
*/
|
|
111
112
|
async ModifyCRWhiteList(req, cb) {
|
|
112
113
|
return this.request("ModifyCRWhiteList", req, cb);
|
|
113
114
|
}
|
|
114
115
|
/**
|
|
115
|
-
*
|
|
116
|
+
* 拦截申请
|
|
116
117
|
*/
|
|
117
118
|
async ModifyCRBlockStatus(req, cb) {
|
|
118
119
|
return this.request("ModifyCRBlockStatus", req, cb);
|
|
@@ -154,7 +155,7 @@ class Client extends abstract_client_1.AbstractClient {
|
|
|
154
155
|
return this.request("DescribeCRMonitors", req, cb);
|
|
155
156
|
}
|
|
156
157
|
/**
|
|
157
|
-
*
|
|
158
|
+
* 发函申请
|
|
158
159
|
*/
|
|
159
160
|
async ModifyCRRightStatus(req, cb) {
|
|
160
161
|
return this.request("ModifyCRRightStatus", req, cb);
|
|
@@ -178,7 +179,7 @@ class Client extends abstract_client_1.AbstractClient {
|
|
|
178
179
|
return this.request("CreateCRTort", req, cb);
|
|
179
180
|
}
|
|
180
181
|
/**
|
|
181
|
-
*
|
|
182
|
+
* 本接口用于企业认证,新接入用户必须认证后才可以进行后续操作(个人认证和企业认证二选一),只需认证一次即可
|
|
182
183
|
*/
|
|
183
184
|
async CreateCRCompanyVerify(req, cb) {
|
|
184
185
|
return this.request("CreateCRCompanyVerify", req, cb);
|