@alicloud/bailian20231229 1.0.0
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/LICENSE +13 -0
- package/README.md +25 -0
- package/dist/client.d.ts +251 -0
- package/dist/client.js +453 -0
- package/dist/client.js.map +1 -0
- package/package.json +32 -0
- package/src/client.ts +515 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Copyright (c) 2009-present, Alibaba Cloud All rights reserved.
|
|
2
|
+
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License.
|
|
5
|
+
You may obtain a copy of the License at
|
|
6
|
+
|
|
7
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
|
|
9
|
+
Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
See the License for the specific language governing permissions and
|
|
13
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
English | [简体中文](README-CN.md)
|
|
2
|
+

|
|
3
|
+
|
|
4
|
+
# Alibaba Cloud bailian SDK for NodeJS
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
If you use `npm` to manage your dependence, you can use the following command:
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install @alicloud/bailian20231229 -S
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Issues
|
|
14
|
+
[Opening an Issue](https://github.com/aliyun/alibabacloud-typescript-sdk/issues/new), Issues not conforming to the guidelines may be closed immediately.
|
|
15
|
+
|
|
16
|
+
## Usage
|
|
17
|
+
[Usage Document](https://github.com/aliyun/alibabacloud-typescript-sdk/blob/master/docs/Usage-EN.md#quick-examples)
|
|
18
|
+
|
|
19
|
+
## References
|
|
20
|
+
* [Latest Release](https://github.com/aliyun/alibabacloud-typescript-sdk/)
|
|
21
|
+
|
|
22
|
+
## License
|
|
23
|
+
[Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
|
24
|
+
|
|
25
|
+
Copyright (c) 2009-present, Alibaba Cloud All rights reserved.
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
*/
|
|
4
|
+
import * as $Util from '@alicloud/tea-util';
|
|
5
|
+
import OpenApi, * as $OpenApi from '@alicloud/openapi-client';
|
|
6
|
+
import * as $tea from '@alicloud/tea-typescript';
|
|
7
|
+
export declare class AddFileRequest extends $tea.Model {
|
|
8
|
+
categoryId?: string;
|
|
9
|
+
leaseId?: string;
|
|
10
|
+
parser?: string;
|
|
11
|
+
static names(): {
|
|
12
|
+
[key: string]: string;
|
|
13
|
+
};
|
|
14
|
+
static types(): {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
constructor(map?: {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
export declare class AddFileResponseBody extends $tea.Model {
|
|
22
|
+
code?: string;
|
|
23
|
+
data?: AddFileResponseBodyData;
|
|
24
|
+
message?: string;
|
|
25
|
+
requestId?: string;
|
|
26
|
+
status?: string;
|
|
27
|
+
success?: string;
|
|
28
|
+
static names(): {
|
|
29
|
+
[key: string]: string;
|
|
30
|
+
};
|
|
31
|
+
static types(): {
|
|
32
|
+
[key: string]: any;
|
|
33
|
+
};
|
|
34
|
+
constructor(map?: {
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
export declare class AddFileResponse extends $tea.Model {
|
|
39
|
+
headers?: {
|
|
40
|
+
[key: string]: string;
|
|
41
|
+
};
|
|
42
|
+
statusCode?: number;
|
|
43
|
+
body?: AddFileResponseBody;
|
|
44
|
+
static names(): {
|
|
45
|
+
[key: string]: string;
|
|
46
|
+
};
|
|
47
|
+
static types(): {
|
|
48
|
+
[key: string]: any;
|
|
49
|
+
};
|
|
50
|
+
constructor(map?: {
|
|
51
|
+
[key: string]: any;
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
export declare class ApplyFileUploadLeaseRequest extends $tea.Model {
|
|
55
|
+
fileName?: string;
|
|
56
|
+
md5?: string;
|
|
57
|
+
sizeInBytes?: string;
|
|
58
|
+
static names(): {
|
|
59
|
+
[key: string]: string;
|
|
60
|
+
};
|
|
61
|
+
static types(): {
|
|
62
|
+
[key: string]: any;
|
|
63
|
+
};
|
|
64
|
+
constructor(map?: {
|
|
65
|
+
[key: string]: any;
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
export declare class ApplyFileUploadLeaseResponseBody extends $tea.Model {
|
|
69
|
+
code?: string;
|
|
70
|
+
data?: ApplyFileUploadLeaseResponseBodyData;
|
|
71
|
+
message?: string;
|
|
72
|
+
requestId?: string;
|
|
73
|
+
status?: string;
|
|
74
|
+
success?: boolean;
|
|
75
|
+
static names(): {
|
|
76
|
+
[key: string]: string;
|
|
77
|
+
};
|
|
78
|
+
static types(): {
|
|
79
|
+
[key: string]: any;
|
|
80
|
+
};
|
|
81
|
+
constructor(map?: {
|
|
82
|
+
[key: string]: any;
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
export declare class ApplyFileUploadLeaseResponse extends $tea.Model {
|
|
86
|
+
headers?: {
|
|
87
|
+
[key: string]: string;
|
|
88
|
+
};
|
|
89
|
+
statusCode?: number;
|
|
90
|
+
body?: ApplyFileUploadLeaseResponseBody;
|
|
91
|
+
static names(): {
|
|
92
|
+
[key: string]: string;
|
|
93
|
+
};
|
|
94
|
+
static types(): {
|
|
95
|
+
[key: string]: any;
|
|
96
|
+
};
|
|
97
|
+
constructor(map?: {
|
|
98
|
+
[key: string]: any;
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
export declare class DescribeFileResponseBody extends $tea.Model {
|
|
102
|
+
code?: string;
|
|
103
|
+
data?: DescribeFileResponseBodyData;
|
|
104
|
+
message?: string;
|
|
105
|
+
requestId?: string;
|
|
106
|
+
status?: string;
|
|
107
|
+
success?: boolean;
|
|
108
|
+
static names(): {
|
|
109
|
+
[key: string]: string;
|
|
110
|
+
};
|
|
111
|
+
static types(): {
|
|
112
|
+
[key: string]: any;
|
|
113
|
+
};
|
|
114
|
+
constructor(map?: {
|
|
115
|
+
[key: string]: any;
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
export declare class DescribeFileResponse extends $tea.Model {
|
|
119
|
+
headers?: {
|
|
120
|
+
[key: string]: string;
|
|
121
|
+
};
|
|
122
|
+
statusCode?: number;
|
|
123
|
+
body?: DescribeFileResponseBody;
|
|
124
|
+
static names(): {
|
|
125
|
+
[key: string]: string;
|
|
126
|
+
};
|
|
127
|
+
static types(): {
|
|
128
|
+
[key: string]: any;
|
|
129
|
+
};
|
|
130
|
+
constructor(map?: {
|
|
131
|
+
[key: string]: any;
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
export declare class AddFileResponseBodyData extends $tea.Model {
|
|
135
|
+
fileId?: string;
|
|
136
|
+
parser?: string;
|
|
137
|
+
static names(): {
|
|
138
|
+
[key: string]: string;
|
|
139
|
+
};
|
|
140
|
+
static types(): {
|
|
141
|
+
[key: string]: any;
|
|
142
|
+
};
|
|
143
|
+
constructor(map?: {
|
|
144
|
+
[key: string]: any;
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
export declare class ApplyFileUploadLeaseResponseBodyDataParam extends $tea.Model {
|
|
148
|
+
headers?: any;
|
|
149
|
+
method?: string;
|
|
150
|
+
url?: string;
|
|
151
|
+
static names(): {
|
|
152
|
+
[key: string]: string;
|
|
153
|
+
};
|
|
154
|
+
static types(): {
|
|
155
|
+
[key: string]: any;
|
|
156
|
+
};
|
|
157
|
+
constructor(map?: {
|
|
158
|
+
[key: string]: any;
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
export declare class ApplyFileUploadLeaseResponseBodyData extends $tea.Model {
|
|
162
|
+
fileUploadLeaseId?: string;
|
|
163
|
+
param?: ApplyFileUploadLeaseResponseBodyDataParam;
|
|
164
|
+
type?: string;
|
|
165
|
+
static names(): {
|
|
166
|
+
[key: string]: string;
|
|
167
|
+
};
|
|
168
|
+
static types(): {
|
|
169
|
+
[key: string]: any;
|
|
170
|
+
};
|
|
171
|
+
constructor(map?: {
|
|
172
|
+
[key: string]: any;
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
export declare class DescribeFileResponseBodyData extends $tea.Model {
|
|
176
|
+
categoryId?: string;
|
|
177
|
+
createTime?: string;
|
|
178
|
+
fileId?: string;
|
|
179
|
+
fileName?: string;
|
|
180
|
+
fileType?: string;
|
|
181
|
+
parser?: string;
|
|
182
|
+
sizeInBytes?: number;
|
|
183
|
+
status?: string;
|
|
184
|
+
static names(): {
|
|
185
|
+
[key: string]: string;
|
|
186
|
+
};
|
|
187
|
+
static types(): {
|
|
188
|
+
[key: string]: any;
|
|
189
|
+
};
|
|
190
|
+
constructor(map?: {
|
|
191
|
+
[key: string]: any;
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
export default class Client extends OpenApi {
|
|
195
|
+
constructor(config: $OpenApi.Config);
|
|
196
|
+
getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: {
|
|
197
|
+
[key: string]: string;
|
|
198
|
+
}, endpoint: string): string;
|
|
199
|
+
/**
|
|
200
|
+
* @summary 将临时上传的文档导入百炼数据中心,导入成功之后会自动触发文档解析。
|
|
201
|
+
*
|
|
202
|
+
* @param request AddFileRequest
|
|
203
|
+
* @param headers map
|
|
204
|
+
* @param runtime runtime options for this request RuntimeOptions
|
|
205
|
+
* @return AddFileResponse
|
|
206
|
+
*/
|
|
207
|
+
addFileWithOptions(WorkspaceId: string, request: AddFileRequest, headers: {
|
|
208
|
+
[key: string]: string;
|
|
209
|
+
}, runtime: $Util.RuntimeOptions): Promise<AddFileResponse>;
|
|
210
|
+
/**
|
|
211
|
+
* @summary 将临时上传的文档导入百炼数据中心,导入成功之后会自动触发文档解析。
|
|
212
|
+
*
|
|
213
|
+
* @param request AddFileRequest
|
|
214
|
+
* @return AddFileResponse
|
|
215
|
+
*/
|
|
216
|
+
addFile(WorkspaceId: string, request: AddFileRequest): Promise<AddFileResponse>;
|
|
217
|
+
/**
|
|
218
|
+
* @summary 请求文档上传租约,进行文档上传。
|
|
219
|
+
*
|
|
220
|
+
* @param request ApplyFileUploadLeaseRequest
|
|
221
|
+
* @param headers map
|
|
222
|
+
* @param runtime runtime options for this request RuntimeOptions
|
|
223
|
+
* @return ApplyFileUploadLeaseResponse
|
|
224
|
+
*/
|
|
225
|
+
applyFileUploadLeaseWithOptions(CategoryId: string, WorkspaceId: string, request: ApplyFileUploadLeaseRequest, headers: {
|
|
226
|
+
[key: string]: string;
|
|
227
|
+
}, runtime: $Util.RuntimeOptions): Promise<ApplyFileUploadLeaseResponse>;
|
|
228
|
+
/**
|
|
229
|
+
* @summary 请求文档上传租约,进行文档上传。
|
|
230
|
+
*
|
|
231
|
+
* @param request ApplyFileUploadLeaseRequest
|
|
232
|
+
* @return ApplyFileUploadLeaseResponse
|
|
233
|
+
*/
|
|
234
|
+
applyFileUploadLease(CategoryId: string, WorkspaceId: string, request: ApplyFileUploadLeaseRequest): Promise<ApplyFileUploadLeaseResponse>;
|
|
235
|
+
/**
|
|
236
|
+
* @summary 获取文档基本信息,包括文档名称、类型、状态等。
|
|
237
|
+
*
|
|
238
|
+
* @param headers map
|
|
239
|
+
* @param runtime runtime options for this request RuntimeOptions
|
|
240
|
+
* @return DescribeFileResponse
|
|
241
|
+
*/
|
|
242
|
+
describeFileWithOptions(WorkspaceId: string, FileId: string, headers: {
|
|
243
|
+
[key: string]: string;
|
|
244
|
+
}, runtime: $Util.RuntimeOptions): Promise<DescribeFileResponse>;
|
|
245
|
+
/**
|
|
246
|
+
* @summary 获取文档基本信息,包括文档名称、类型、状态等。
|
|
247
|
+
*
|
|
248
|
+
* @return DescribeFileResponse
|
|
249
|
+
*/
|
|
250
|
+
describeFile(WorkspaceId: string, FileId: string): Promise<DescribeFileResponse>;
|
|
251
|
+
}
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.DescribeFileResponseBodyData = exports.ApplyFileUploadLeaseResponseBodyData = exports.ApplyFileUploadLeaseResponseBodyDataParam = exports.AddFileResponseBodyData = exports.DescribeFileResponse = exports.DescribeFileResponseBody = exports.ApplyFileUploadLeaseResponse = exports.ApplyFileUploadLeaseResponseBody = exports.ApplyFileUploadLeaseRequest = exports.AddFileResponse = exports.AddFileResponseBody = exports.AddFileRequest = void 0;
|
|
30
|
+
// This file is auto-generated, don't edit it
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
const tea_util_1 = __importStar(require("@alicloud/tea-util")), $Util = tea_util_1;
|
|
35
|
+
const openapi_client_1 = __importStar(require("@alicloud/openapi-client")), $OpenApi = openapi_client_1;
|
|
36
|
+
const openapi_util_1 = __importDefault(require("@alicloud/openapi-util"));
|
|
37
|
+
const endpoint_util_1 = __importDefault(require("@alicloud/endpoint-util"));
|
|
38
|
+
const $tea = __importStar(require("@alicloud/tea-typescript"));
|
|
39
|
+
class AddFileRequest extends $tea.Model {
|
|
40
|
+
static names() {
|
|
41
|
+
return {
|
|
42
|
+
categoryId: 'CategoryId',
|
|
43
|
+
leaseId: 'LeaseId',
|
|
44
|
+
parser: 'Parser',
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
static types() {
|
|
48
|
+
return {
|
|
49
|
+
categoryId: 'string',
|
|
50
|
+
leaseId: 'string',
|
|
51
|
+
parser: 'string',
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
constructor(map) {
|
|
55
|
+
super(map);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.AddFileRequest = AddFileRequest;
|
|
59
|
+
class AddFileResponseBody extends $tea.Model {
|
|
60
|
+
static names() {
|
|
61
|
+
return {
|
|
62
|
+
code: 'Code',
|
|
63
|
+
data: 'Data',
|
|
64
|
+
message: 'Message',
|
|
65
|
+
requestId: 'RequestId',
|
|
66
|
+
status: 'Status',
|
|
67
|
+
success: 'Success',
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
static types() {
|
|
71
|
+
return {
|
|
72
|
+
code: 'string',
|
|
73
|
+
data: AddFileResponseBodyData,
|
|
74
|
+
message: 'string',
|
|
75
|
+
requestId: 'string',
|
|
76
|
+
status: 'string',
|
|
77
|
+
success: 'string',
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
constructor(map) {
|
|
81
|
+
super(map);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
exports.AddFileResponseBody = AddFileResponseBody;
|
|
85
|
+
class AddFileResponse extends $tea.Model {
|
|
86
|
+
static names() {
|
|
87
|
+
return {
|
|
88
|
+
headers: 'headers',
|
|
89
|
+
statusCode: 'statusCode',
|
|
90
|
+
body: 'body',
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
static types() {
|
|
94
|
+
return {
|
|
95
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
96
|
+
statusCode: 'number',
|
|
97
|
+
body: AddFileResponseBody,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
constructor(map) {
|
|
101
|
+
super(map);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
exports.AddFileResponse = AddFileResponse;
|
|
105
|
+
class ApplyFileUploadLeaseRequest extends $tea.Model {
|
|
106
|
+
static names() {
|
|
107
|
+
return {
|
|
108
|
+
fileName: 'FileName',
|
|
109
|
+
md5: 'Md5',
|
|
110
|
+
sizeInBytes: 'SizeInBytes',
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
static types() {
|
|
114
|
+
return {
|
|
115
|
+
fileName: 'string',
|
|
116
|
+
md5: 'string',
|
|
117
|
+
sizeInBytes: 'string',
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
constructor(map) {
|
|
121
|
+
super(map);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
exports.ApplyFileUploadLeaseRequest = ApplyFileUploadLeaseRequest;
|
|
125
|
+
class ApplyFileUploadLeaseResponseBody extends $tea.Model {
|
|
126
|
+
static names() {
|
|
127
|
+
return {
|
|
128
|
+
code: 'Code',
|
|
129
|
+
data: 'Data',
|
|
130
|
+
message: 'Message',
|
|
131
|
+
requestId: 'RequestId',
|
|
132
|
+
status: 'Status',
|
|
133
|
+
success: 'Success',
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
static types() {
|
|
137
|
+
return {
|
|
138
|
+
code: 'string',
|
|
139
|
+
data: ApplyFileUploadLeaseResponseBodyData,
|
|
140
|
+
message: 'string',
|
|
141
|
+
requestId: 'string',
|
|
142
|
+
status: 'string',
|
|
143
|
+
success: 'boolean',
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
constructor(map) {
|
|
147
|
+
super(map);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
exports.ApplyFileUploadLeaseResponseBody = ApplyFileUploadLeaseResponseBody;
|
|
151
|
+
class ApplyFileUploadLeaseResponse extends $tea.Model {
|
|
152
|
+
static names() {
|
|
153
|
+
return {
|
|
154
|
+
headers: 'headers',
|
|
155
|
+
statusCode: 'statusCode',
|
|
156
|
+
body: 'body',
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
static types() {
|
|
160
|
+
return {
|
|
161
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
162
|
+
statusCode: 'number',
|
|
163
|
+
body: ApplyFileUploadLeaseResponseBody,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
constructor(map) {
|
|
167
|
+
super(map);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
exports.ApplyFileUploadLeaseResponse = ApplyFileUploadLeaseResponse;
|
|
171
|
+
class DescribeFileResponseBody extends $tea.Model {
|
|
172
|
+
static names() {
|
|
173
|
+
return {
|
|
174
|
+
code: 'Code',
|
|
175
|
+
data: 'Data',
|
|
176
|
+
message: 'Message',
|
|
177
|
+
requestId: 'RequestId',
|
|
178
|
+
status: 'Status',
|
|
179
|
+
success: 'Success',
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
static types() {
|
|
183
|
+
return {
|
|
184
|
+
code: 'string',
|
|
185
|
+
data: DescribeFileResponseBodyData,
|
|
186
|
+
message: 'string',
|
|
187
|
+
requestId: 'string',
|
|
188
|
+
status: 'string',
|
|
189
|
+
success: 'boolean',
|
|
190
|
+
};
|
|
191
|
+
}
|
|
192
|
+
constructor(map) {
|
|
193
|
+
super(map);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
exports.DescribeFileResponseBody = DescribeFileResponseBody;
|
|
197
|
+
class DescribeFileResponse extends $tea.Model {
|
|
198
|
+
static names() {
|
|
199
|
+
return {
|
|
200
|
+
headers: 'headers',
|
|
201
|
+
statusCode: 'statusCode',
|
|
202
|
+
body: 'body',
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
static types() {
|
|
206
|
+
return {
|
|
207
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
208
|
+
statusCode: 'number',
|
|
209
|
+
body: DescribeFileResponseBody,
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
constructor(map) {
|
|
213
|
+
super(map);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
exports.DescribeFileResponse = DescribeFileResponse;
|
|
217
|
+
class AddFileResponseBodyData extends $tea.Model {
|
|
218
|
+
static names() {
|
|
219
|
+
return {
|
|
220
|
+
fileId: 'FileId',
|
|
221
|
+
parser: 'Parser',
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
static types() {
|
|
225
|
+
return {
|
|
226
|
+
fileId: 'string',
|
|
227
|
+
parser: 'string',
|
|
228
|
+
};
|
|
229
|
+
}
|
|
230
|
+
constructor(map) {
|
|
231
|
+
super(map);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
exports.AddFileResponseBodyData = AddFileResponseBodyData;
|
|
235
|
+
class ApplyFileUploadLeaseResponseBodyDataParam extends $tea.Model {
|
|
236
|
+
static names() {
|
|
237
|
+
return {
|
|
238
|
+
headers: 'Headers',
|
|
239
|
+
method: 'Method',
|
|
240
|
+
url: 'Url',
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
static types() {
|
|
244
|
+
return {
|
|
245
|
+
headers: 'any',
|
|
246
|
+
method: 'string',
|
|
247
|
+
url: 'string',
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
constructor(map) {
|
|
251
|
+
super(map);
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
exports.ApplyFileUploadLeaseResponseBodyDataParam = ApplyFileUploadLeaseResponseBodyDataParam;
|
|
255
|
+
class ApplyFileUploadLeaseResponseBodyData extends $tea.Model {
|
|
256
|
+
static names() {
|
|
257
|
+
return {
|
|
258
|
+
fileUploadLeaseId: 'FileUploadLeaseId',
|
|
259
|
+
param: 'Param',
|
|
260
|
+
type: 'Type',
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
static types() {
|
|
264
|
+
return {
|
|
265
|
+
fileUploadLeaseId: 'string',
|
|
266
|
+
param: ApplyFileUploadLeaseResponseBodyDataParam,
|
|
267
|
+
type: 'string',
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
constructor(map) {
|
|
271
|
+
super(map);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
exports.ApplyFileUploadLeaseResponseBodyData = ApplyFileUploadLeaseResponseBodyData;
|
|
275
|
+
class DescribeFileResponseBodyData extends $tea.Model {
|
|
276
|
+
static names() {
|
|
277
|
+
return {
|
|
278
|
+
categoryId: 'CategoryId',
|
|
279
|
+
createTime: 'CreateTime',
|
|
280
|
+
fileId: 'FileId',
|
|
281
|
+
fileName: 'FileName',
|
|
282
|
+
fileType: 'FileType',
|
|
283
|
+
parser: 'Parser',
|
|
284
|
+
sizeInBytes: 'SizeInBytes',
|
|
285
|
+
status: 'Status',
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
static types() {
|
|
289
|
+
return {
|
|
290
|
+
categoryId: 'string',
|
|
291
|
+
createTime: 'string',
|
|
292
|
+
fileId: 'string',
|
|
293
|
+
fileName: 'string',
|
|
294
|
+
fileType: 'string',
|
|
295
|
+
parser: 'string',
|
|
296
|
+
sizeInBytes: 'number',
|
|
297
|
+
status: 'string',
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
constructor(map) {
|
|
301
|
+
super(map);
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
exports.DescribeFileResponseBodyData = DescribeFileResponseBodyData;
|
|
305
|
+
class Client extends openapi_client_1.default {
|
|
306
|
+
constructor(config) {
|
|
307
|
+
super(config);
|
|
308
|
+
this._endpointRule = "";
|
|
309
|
+
this.checkConfig(config);
|
|
310
|
+
this._endpoint = this.getEndpoint("bailian", this._regionId, this._endpointRule, this._network, this._suffix, this._endpointMap, this._endpoint);
|
|
311
|
+
}
|
|
312
|
+
getEndpoint(productId, regionId, endpointRule, network, suffix, endpointMap, endpoint) {
|
|
313
|
+
if (!tea_util_1.default.empty(endpoint)) {
|
|
314
|
+
return endpoint;
|
|
315
|
+
}
|
|
316
|
+
if (!tea_util_1.default.isUnset(endpointMap) && !tea_util_1.default.empty(endpointMap[regionId])) {
|
|
317
|
+
return endpointMap[regionId];
|
|
318
|
+
}
|
|
319
|
+
return endpoint_util_1.default.getEndpointRules(productId, regionId, endpointRule, network, suffix);
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* @summary 将临时上传的文档导入百炼数据中心,导入成功之后会自动触发文档解析。
|
|
323
|
+
*
|
|
324
|
+
* @param request AddFileRequest
|
|
325
|
+
* @param headers map
|
|
326
|
+
* @param runtime runtime options for this request RuntimeOptions
|
|
327
|
+
* @return AddFileResponse
|
|
328
|
+
*/
|
|
329
|
+
async addFileWithOptions(WorkspaceId, request, headers, runtime) {
|
|
330
|
+
tea_util_1.default.validateModel(request);
|
|
331
|
+
let body = {};
|
|
332
|
+
if (!tea_util_1.default.isUnset(request.categoryId)) {
|
|
333
|
+
body["CategoryId"] = request.categoryId;
|
|
334
|
+
}
|
|
335
|
+
if (!tea_util_1.default.isUnset(request.leaseId)) {
|
|
336
|
+
body["LeaseId"] = request.leaseId;
|
|
337
|
+
}
|
|
338
|
+
if (!tea_util_1.default.isUnset(request.parser)) {
|
|
339
|
+
body["Parser"] = request.parser;
|
|
340
|
+
}
|
|
341
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
342
|
+
headers: headers,
|
|
343
|
+
body: openapi_util_1.default.parseToMap(body),
|
|
344
|
+
});
|
|
345
|
+
let params = new $OpenApi.Params({
|
|
346
|
+
action: "AddFile",
|
|
347
|
+
version: "2023-12-29",
|
|
348
|
+
protocol: "HTTPS",
|
|
349
|
+
pathname: `/${openapi_util_1.default.getEncodeParam(WorkspaceId)}/datacenter/file`,
|
|
350
|
+
method: "PUT",
|
|
351
|
+
authType: "AK",
|
|
352
|
+
style: "ROA",
|
|
353
|
+
reqBodyType: "formData",
|
|
354
|
+
bodyType: "json",
|
|
355
|
+
});
|
|
356
|
+
return $tea.cast(await this.callApi(params, req, runtime), new AddFileResponse({}));
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* @summary 将临时上传的文档导入百炼数据中心,导入成功之后会自动触发文档解析。
|
|
360
|
+
*
|
|
361
|
+
* @param request AddFileRequest
|
|
362
|
+
* @return AddFileResponse
|
|
363
|
+
*/
|
|
364
|
+
async addFile(WorkspaceId, request) {
|
|
365
|
+
let runtime = new $Util.RuntimeOptions({});
|
|
366
|
+
let headers = {};
|
|
367
|
+
return await this.addFileWithOptions(WorkspaceId, request, headers, runtime);
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* @summary 请求文档上传租约,进行文档上传。
|
|
371
|
+
*
|
|
372
|
+
* @param request ApplyFileUploadLeaseRequest
|
|
373
|
+
* @param headers map
|
|
374
|
+
* @param runtime runtime options for this request RuntimeOptions
|
|
375
|
+
* @return ApplyFileUploadLeaseResponse
|
|
376
|
+
*/
|
|
377
|
+
async applyFileUploadLeaseWithOptions(CategoryId, WorkspaceId, request, headers, runtime) {
|
|
378
|
+
tea_util_1.default.validateModel(request);
|
|
379
|
+
let body = {};
|
|
380
|
+
if (!tea_util_1.default.isUnset(request.fileName)) {
|
|
381
|
+
body["FileName"] = request.fileName;
|
|
382
|
+
}
|
|
383
|
+
if (!tea_util_1.default.isUnset(request.md5)) {
|
|
384
|
+
body["Md5"] = request.md5;
|
|
385
|
+
}
|
|
386
|
+
if (!tea_util_1.default.isUnset(request.sizeInBytes)) {
|
|
387
|
+
body["SizeInBytes"] = request.sizeInBytes;
|
|
388
|
+
}
|
|
389
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
390
|
+
headers: headers,
|
|
391
|
+
body: openapi_util_1.default.parseToMap(body),
|
|
392
|
+
});
|
|
393
|
+
let params = new $OpenApi.Params({
|
|
394
|
+
action: "ApplyFileUploadLease",
|
|
395
|
+
version: "2023-12-29",
|
|
396
|
+
protocol: "HTTPS",
|
|
397
|
+
pathname: `/${openapi_util_1.default.getEncodeParam(WorkspaceId)}/datacenter/category/${openapi_util_1.default.getEncodeParam(CategoryId)}`,
|
|
398
|
+
method: "POST",
|
|
399
|
+
authType: "AK",
|
|
400
|
+
style: "ROA",
|
|
401
|
+
reqBodyType: "formData",
|
|
402
|
+
bodyType: "json",
|
|
403
|
+
});
|
|
404
|
+
return $tea.cast(await this.callApi(params, req, runtime), new ApplyFileUploadLeaseResponse({}));
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* @summary 请求文档上传租约,进行文档上传。
|
|
408
|
+
*
|
|
409
|
+
* @param request ApplyFileUploadLeaseRequest
|
|
410
|
+
* @return ApplyFileUploadLeaseResponse
|
|
411
|
+
*/
|
|
412
|
+
async applyFileUploadLease(CategoryId, WorkspaceId, request) {
|
|
413
|
+
let runtime = new $Util.RuntimeOptions({});
|
|
414
|
+
let headers = {};
|
|
415
|
+
return await this.applyFileUploadLeaseWithOptions(CategoryId, WorkspaceId, request, headers, runtime);
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* @summary 获取文档基本信息,包括文档名称、类型、状态等。
|
|
419
|
+
*
|
|
420
|
+
* @param headers map
|
|
421
|
+
* @param runtime runtime options for this request RuntimeOptions
|
|
422
|
+
* @return DescribeFileResponse
|
|
423
|
+
*/
|
|
424
|
+
async describeFileWithOptions(WorkspaceId, FileId, headers, runtime) {
|
|
425
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
426
|
+
headers: headers,
|
|
427
|
+
});
|
|
428
|
+
let params = new $OpenApi.Params({
|
|
429
|
+
action: "DescribeFile",
|
|
430
|
+
version: "2023-12-29",
|
|
431
|
+
protocol: "HTTPS",
|
|
432
|
+
pathname: `/${openapi_util_1.default.getEncodeParam(WorkspaceId)}/datacenter/file/${openapi_util_1.default.getEncodeParam(FileId)}/`,
|
|
433
|
+
method: "GET",
|
|
434
|
+
authType: "AK",
|
|
435
|
+
style: "ROA",
|
|
436
|
+
reqBodyType: "json",
|
|
437
|
+
bodyType: "json",
|
|
438
|
+
});
|
|
439
|
+
return $tea.cast(await this.callApi(params, req, runtime), new DescribeFileResponse({}));
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* @summary 获取文档基本信息,包括文档名称、类型、状态等。
|
|
443
|
+
*
|
|
444
|
+
* @return DescribeFileResponse
|
|
445
|
+
*/
|
|
446
|
+
async describeFile(WorkspaceId, FileId) {
|
|
447
|
+
let runtime = new $Util.RuntimeOptions({});
|
|
448
|
+
let headers = {};
|
|
449
|
+
return await this.describeFileWithOptions(WorkspaceId, FileId, headers, runtime);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
exports.default = Client;
|
|
453
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA6C;AAC7C;;GAEG;AACH,mFAAkD;AAClD,wGAA8D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AK,CAAC,uBAAuB,CAAC,WAAmB,EAAE,MAAc,EAAE,OAAiC,EAAE,OAA6B;QACjI,IAAI,GAAG,GAAG,IAAI,QAAQ,CAAC,cAAc,CAAC;YACpC,OAAO,EAAE,OAAO;SACjB,CAAC,CAAC;QACH,IAAI,MAAM,GAAG,IAAI,QAAQ,CAAC,MAAM,CAAC;YAC/B,MAAM,EAAE,cAAc;YACtB,OAAO,EAAE,YAAY;YACrB,QAAQ,EAAE,OAAO;YACjB,QAAQ,EAAE,IAAI,sBAAW,CAAC,cAAc,CAAC,WAAW,CAAC,oBAAoB,sBAAW,CAAC,cAAc,CAAC,MAAM,CAAC,GAAG;YAC9G,MAAM,EAAE,KAAK;YACb,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,KAAK;YACZ,WAAW,EAAE,MAAM;YACnB,QAAQ,EAAE,MAAM;SACjB,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,IAAI,CAAuB,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,CAAC,EAAE,IAAI,oBAAoB,CAAC,EAAE,CAAC,CAAC,CAAC;IACjH,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,YAAY,CAAC,WAAmB,EAAE,MAAc;QACpD,IAAI,OAAO,GAAG,IAAI,KAAK,CAAC,cAAc,CAAC,EAAG,CAAC,CAAC;QAC5C,IAAI,OAAO,GAA8B,EAAG,CAAC;QAC7C,OAAO,MAAM,IAAI,CAAC,uBAAuB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IACnF,CAAC;CAEF;AApKD,yBAoKC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@alicloud/bailian20231229",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "dist/client.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "mocha --reporter spec --timeout 3000 test/*.test.js",
|
|
8
|
+
"test-cov": "nyc -e .ts -r=html -r=text -r=lcov npm run test",
|
|
9
|
+
"build": "tsc",
|
|
10
|
+
"prepublishOnly": "tsc"
|
|
11
|
+
},
|
|
12
|
+
"author": "Alibaba Cloud SDK",
|
|
13
|
+
"license": "Apache-2.0",
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@types/node": "^16.0.0",
|
|
16
|
+
"nyc": "^15.0.0",
|
|
17
|
+
"source-map-support": "^0.5.16",
|
|
18
|
+
"ts-node": "^10.0.0",
|
|
19
|
+
"typescript": "^5"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@alicloud/tea-typescript": "^1.7.1",
|
|
23
|
+
"@alicloud/tea-util": "^1.4.8",
|
|
24
|
+
"@alicloud/openapi-client": "^0.4.10",
|
|
25
|
+
"@alicloud/openapi-util": "^0.3.2",
|
|
26
|
+
"@alicloud/endpoint-util": "^0.0.1"
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist",
|
|
30
|
+
"src"
|
|
31
|
+
]
|
|
32
|
+
}
|
package/src/client.ts
ADDED
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
// This file is auto-generated, don't edit it
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
import Util, * as $Util from '@alicloud/tea-util';
|
|
6
|
+
import OpenApi, * as $OpenApi from '@alicloud/openapi-client';
|
|
7
|
+
import OpenApiUtil from '@alicloud/openapi-util';
|
|
8
|
+
import EndpointUtil from '@alicloud/endpoint-util';
|
|
9
|
+
import * as $tea from '@alicloud/tea-typescript';
|
|
10
|
+
|
|
11
|
+
export class AddFileRequest extends $tea.Model {
|
|
12
|
+
categoryId?: string;
|
|
13
|
+
leaseId?: string;
|
|
14
|
+
parser?: string;
|
|
15
|
+
static names(): { [key: string]: string } {
|
|
16
|
+
return {
|
|
17
|
+
categoryId: 'CategoryId',
|
|
18
|
+
leaseId: 'LeaseId',
|
|
19
|
+
parser: 'Parser',
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
static types(): { [key: string]: any } {
|
|
24
|
+
return {
|
|
25
|
+
categoryId: 'string',
|
|
26
|
+
leaseId: 'string',
|
|
27
|
+
parser: 'string',
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
constructor(map?: { [key: string]: any }) {
|
|
32
|
+
super(map);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class AddFileResponseBody extends $tea.Model {
|
|
37
|
+
code?: string;
|
|
38
|
+
data?: AddFileResponseBodyData;
|
|
39
|
+
message?: string;
|
|
40
|
+
requestId?: string;
|
|
41
|
+
status?: string;
|
|
42
|
+
success?: string;
|
|
43
|
+
static names(): { [key: string]: string } {
|
|
44
|
+
return {
|
|
45
|
+
code: 'Code',
|
|
46
|
+
data: 'Data',
|
|
47
|
+
message: 'Message',
|
|
48
|
+
requestId: 'RequestId',
|
|
49
|
+
status: 'Status',
|
|
50
|
+
success: 'Success',
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
static types(): { [key: string]: any } {
|
|
55
|
+
return {
|
|
56
|
+
code: 'string',
|
|
57
|
+
data: AddFileResponseBodyData,
|
|
58
|
+
message: 'string',
|
|
59
|
+
requestId: 'string',
|
|
60
|
+
status: 'string',
|
|
61
|
+
success: 'string',
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
constructor(map?: { [key: string]: any }) {
|
|
66
|
+
super(map);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export class AddFileResponse extends $tea.Model {
|
|
71
|
+
headers?: { [key: string]: string };
|
|
72
|
+
statusCode?: number;
|
|
73
|
+
body?: AddFileResponseBody;
|
|
74
|
+
static names(): { [key: string]: string } {
|
|
75
|
+
return {
|
|
76
|
+
headers: 'headers',
|
|
77
|
+
statusCode: 'statusCode',
|
|
78
|
+
body: 'body',
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
static types(): { [key: string]: any } {
|
|
83
|
+
return {
|
|
84
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
85
|
+
statusCode: 'number',
|
|
86
|
+
body: AddFileResponseBody,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
constructor(map?: { [key: string]: any }) {
|
|
91
|
+
super(map);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export class ApplyFileUploadLeaseRequest extends $tea.Model {
|
|
96
|
+
fileName?: string;
|
|
97
|
+
md5?: string;
|
|
98
|
+
sizeInBytes?: string;
|
|
99
|
+
static names(): { [key: string]: string } {
|
|
100
|
+
return {
|
|
101
|
+
fileName: 'FileName',
|
|
102
|
+
md5: 'Md5',
|
|
103
|
+
sizeInBytes: 'SizeInBytes',
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
static types(): { [key: string]: any } {
|
|
108
|
+
return {
|
|
109
|
+
fileName: 'string',
|
|
110
|
+
md5: 'string',
|
|
111
|
+
sizeInBytes: 'string',
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
constructor(map?: { [key: string]: any }) {
|
|
116
|
+
super(map);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export class ApplyFileUploadLeaseResponseBody extends $tea.Model {
|
|
121
|
+
code?: string;
|
|
122
|
+
data?: ApplyFileUploadLeaseResponseBodyData;
|
|
123
|
+
message?: string;
|
|
124
|
+
requestId?: string;
|
|
125
|
+
status?: string;
|
|
126
|
+
success?: boolean;
|
|
127
|
+
static names(): { [key: string]: string } {
|
|
128
|
+
return {
|
|
129
|
+
code: 'Code',
|
|
130
|
+
data: 'Data',
|
|
131
|
+
message: 'Message',
|
|
132
|
+
requestId: 'RequestId',
|
|
133
|
+
status: 'Status',
|
|
134
|
+
success: 'Success',
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
static types(): { [key: string]: any } {
|
|
139
|
+
return {
|
|
140
|
+
code: 'string',
|
|
141
|
+
data: ApplyFileUploadLeaseResponseBodyData,
|
|
142
|
+
message: 'string',
|
|
143
|
+
requestId: 'string',
|
|
144
|
+
status: 'string',
|
|
145
|
+
success: 'boolean',
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
constructor(map?: { [key: string]: any }) {
|
|
150
|
+
super(map);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export class ApplyFileUploadLeaseResponse extends $tea.Model {
|
|
155
|
+
headers?: { [key: string]: string };
|
|
156
|
+
statusCode?: number;
|
|
157
|
+
body?: ApplyFileUploadLeaseResponseBody;
|
|
158
|
+
static names(): { [key: string]: string } {
|
|
159
|
+
return {
|
|
160
|
+
headers: 'headers',
|
|
161
|
+
statusCode: 'statusCode',
|
|
162
|
+
body: 'body',
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
static types(): { [key: string]: any } {
|
|
167
|
+
return {
|
|
168
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
169
|
+
statusCode: 'number',
|
|
170
|
+
body: ApplyFileUploadLeaseResponseBody,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
constructor(map?: { [key: string]: any }) {
|
|
175
|
+
super(map);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export class DescribeFileResponseBody extends $tea.Model {
|
|
180
|
+
code?: string;
|
|
181
|
+
data?: DescribeFileResponseBodyData;
|
|
182
|
+
message?: string;
|
|
183
|
+
requestId?: string;
|
|
184
|
+
status?: string;
|
|
185
|
+
success?: boolean;
|
|
186
|
+
static names(): { [key: string]: string } {
|
|
187
|
+
return {
|
|
188
|
+
code: 'Code',
|
|
189
|
+
data: 'Data',
|
|
190
|
+
message: 'Message',
|
|
191
|
+
requestId: 'RequestId',
|
|
192
|
+
status: 'Status',
|
|
193
|
+
success: 'Success',
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
static types(): { [key: string]: any } {
|
|
198
|
+
return {
|
|
199
|
+
code: 'string',
|
|
200
|
+
data: DescribeFileResponseBodyData,
|
|
201
|
+
message: 'string',
|
|
202
|
+
requestId: 'string',
|
|
203
|
+
status: 'string',
|
|
204
|
+
success: 'boolean',
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
constructor(map?: { [key: string]: any }) {
|
|
209
|
+
super(map);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export class DescribeFileResponse extends $tea.Model {
|
|
214
|
+
headers?: { [key: string]: string };
|
|
215
|
+
statusCode?: number;
|
|
216
|
+
body?: DescribeFileResponseBody;
|
|
217
|
+
static names(): { [key: string]: string } {
|
|
218
|
+
return {
|
|
219
|
+
headers: 'headers',
|
|
220
|
+
statusCode: 'statusCode',
|
|
221
|
+
body: 'body',
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
static types(): { [key: string]: any } {
|
|
226
|
+
return {
|
|
227
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
228
|
+
statusCode: 'number',
|
|
229
|
+
body: DescribeFileResponseBody,
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
constructor(map?: { [key: string]: any }) {
|
|
234
|
+
super(map);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export class AddFileResponseBodyData extends $tea.Model {
|
|
239
|
+
fileId?: string;
|
|
240
|
+
parser?: string;
|
|
241
|
+
static names(): { [key: string]: string } {
|
|
242
|
+
return {
|
|
243
|
+
fileId: 'FileId',
|
|
244
|
+
parser: 'Parser',
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
static types(): { [key: string]: any } {
|
|
249
|
+
return {
|
|
250
|
+
fileId: 'string',
|
|
251
|
+
parser: 'string',
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
constructor(map?: { [key: string]: any }) {
|
|
256
|
+
super(map);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export class ApplyFileUploadLeaseResponseBodyDataParam extends $tea.Model {
|
|
261
|
+
headers?: any;
|
|
262
|
+
method?: string;
|
|
263
|
+
url?: string;
|
|
264
|
+
static names(): { [key: string]: string } {
|
|
265
|
+
return {
|
|
266
|
+
headers: 'Headers',
|
|
267
|
+
method: 'Method',
|
|
268
|
+
url: 'Url',
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
static types(): { [key: string]: any } {
|
|
273
|
+
return {
|
|
274
|
+
headers: 'any',
|
|
275
|
+
method: 'string',
|
|
276
|
+
url: 'string',
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
constructor(map?: { [key: string]: any }) {
|
|
281
|
+
super(map);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
export class ApplyFileUploadLeaseResponseBodyData extends $tea.Model {
|
|
286
|
+
fileUploadLeaseId?: string;
|
|
287
|
+
param?: ApplyFileUploadLeaseResponseBodyDataParam;
|
|
288
|
+
type?: string;
|
|
289
|
+
static names(): { [key: string]: string } {
|
|
290
|
+
return {
|
|
291
|
+
fileUploadLeaseId: 'FileUploadLeaseId',
|
|
292
|
+
param: 'Param',
|
|
293
|
+
type: 'Type',
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
static types(): { [key: string]: any } {
|
|
298
|
+
return {
|
|
299
|
+
fileUploadLeaseId: 'string',
|
|
300
|
+
param: ApplyFileUploadLeaseResponseBodyDataParam,
|
|
301
|
+
type: 'string',
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
constructor(map?: { [key: string]: any }) {
|
|
306
|
+
super(map);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export class DescribeFileResponseBodyData extends $tea.Model {
|
|
311
|
+
categoryId?: string;
|
|
312
|
+
createTime?: string;
|
|
313
|
+
fileId?: string;
|
|
314
|
+
fileName?: string;
|
|
315
|
+
fileType?: string;
|
|
316
|
+
parser?: string;
|
|
317
|
+
sizeInBytes?: number;
|
|
318
|
+
status?: string;
|
|
319
|
+
static names(): { [key: string]: string } {
|
|
320
|
+
return {
|
|
321
|
+
categoryId: 'CategoryId',
|
|
322
|
+
createTime: 'CreateTime',
|
|
323
|
+
fileId: 'FileId',
|
|
324
|
+
fileName: 'FileName',
|
|
325
|
+
fileType: 'FileType',
|
|
326
|
+
parser: 'Parser',
|
|
327
|
+
sizeInBytes: 'SizeInBytes',
|
|
328
|
+
status: 'Status',
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
static types(): { [key: string]: any } {
|
|
333
|
+
return {
|
|
334
|
+
categoryId: 'string',
|
|
335
|
+
createTime: 'string',
|
|
336
|
+
fileId: 'string',
|
|
337
|
+
fileName: 'string',
|
|
338
|
+
fileType: 'string',
|
|
339
|
+
parser: 'string',
|
|
340
|
+
sizeInBytes: 'number',
|
|
341
|
+
status: 'string',
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
constructor(map?: { [key: string]: any }) {
|
|
346
|
+
super(map);
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
export default class Client extends OpenApi {
|
|
352
|
+
|
|
353
|
+
constructor(config: $OpenApi.Config) {
|
|
354
|
+
super(config);
|
|
355
|
+
this._endpointRule = "";
|
|
356
|
+
this.checkConfig(config);
|
|
357
|
+
this._endpoint = this.getEndpoint("bailian", this._regionId, this._endpointRule, this._network, this._suffix, this._endpointMap, this._endpoint);
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: {[key: string ]: string}, endpoint: string): string {
|
|
362
|
+
if (!Util.empty(endpoint)) {
|
|
363
|
+
return endpoint;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
|
|
367
|
+
return endpointMap[regionId];
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* @summary 将临时上传的文档导入百炼数据中心,导入成功之后会自动触发文档解析。
|
|
375
|
+
*
|
|
376
|
+
* @param request AddFileRequest
|
|
377
|
+
* @param headers map
|
|
378
|
+
* @param runtime runtime options for this request RuntimeOptions
|
|
379
|
+
* @return AddFileResponse
|
|
380
|
+
*/
|
|
381
|
+
async addFileWithOptions(WorkspaceId: string, request: AddFileRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<AddFileResponse> {
|
|
382
|
+
Util.validateModel(request);
|
|
383
|
+
let body : {[key: string ]: any} = { };
|
|
384
|
+
if (!Util.isUnset(request.categoryId)) {
|
|
385
|
+
body["CategoryId"] = request.categoryId;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
if (!Util.isUnset(request.leaseId)) {
|
|
389
|
+
body["LeaseId"] = request.leaseId;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
if (!Util.isUnset(request.parser)) {
|
|
393
|
+
body["Parser"] = request.parser;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
397
|
+
headers: headers,
|
|
398
|
+
body: OpenApiUtil.parseToMap(body),
|
|
399
|
+
});
|
|
400
|
+
let params = new $OpenApi.Params({
|
|
401
|
+
action: "AddFile",
|
|
402
|
+
version: "2023-12-29",
|
|
403
|
+
protocol: "HTTPS",
|
|
404
|
+
pathname: `/${OpenApiUtil.getEncodeParam(WorkspaceId)}/datacenter/file`,
|
|
405
|
+
method: "PUT",
|
|
406
|
+
authType: "AK",
|
|
407
|
+
style: "ROA",
|
|
408
|
+
reqBodyType: "formData",
|
|
409
|
+
bodyType: "json",
|
|
410
|
+
});
|
|
411
|
+
return $tea.cast<AddFileResponse>(await this.callApi(params, req, runtime), new AddFileResponse({}));
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* @summary 将临时上传的文档导入百炼数据中心,导入成功之后会自动触发文档解析。
|
|
416
|
+
*
|
|
417
|
+
* @param request AddFileRequest
|
|
418
|
+
* @return AddFileResponse
|
|
419
|
+
*/
|
|
420
|
+
async addFile(WorkspaceId: string, request: AddFileRequest): Promise<AddFileResponse> {
|
|
421
|
+
let runtime = new $Util.RuntimeOptions({ });
|
|
422
|
+
let headers : {[key: string ]: string} = { };
|
|
423
|
+
return await this.addFileWithOptions(WorkspaceId, request, headers, runtime);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
/**
|
|
427
|
+
* @summary 请求文档上传租约,进行文档上传。
|
|
428
|
+
*
|
|
429
|
+
* @param request ApplyFileUploadLeaseRequest
|
|
430
|
+
* @param headers map
|
|
431
|
+
* @param runtime runtime options for this request RuntimeOptions
|
|
432
|
+
* @return ApplyFileUploadLeaseResponse
|
|
433
|
+
*/
|
|
434
|
+
async applyFileUploadLeaseWithOptions(CategoryId: string, WorkspaceId: string, request: ApplyFileUploadLeaseRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<ApplyFileUploadLeaseResponse> {
|
|
435
|
+
Util.validateModel(request);
|
|
436
|
+
let body : {[key: string ]: any} = { };
|
|
437
|
+
if (!Util.isUnset(request.fileName)) {
|
|
438
|
+
body["FileName"] = request.fileName;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
if (!Util.isUnset(request.md5)) {
|
|
442
|
+
body["Md5"] = request.md5;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
if (!Util.isUnset(request.sizeInBytes)) {
|
|
446
|
+
body["SizeInBytes"] = request.sizeInBytes;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
450
|
+
headers: headers,
|
|
451
|
+
body: OpenApiUtil.parseToMap(body),
|
|
452
|
+
});
|
|
453
|
+
let params = new $OpenApi.Params({
|
|
454
|
+
action: "ApplyFileUploadLease",
|
|
455
|
+
version: "2023-12-29",
|
|
456
|
+
protocol: "HTTPS",
|
|
457
|
+
pathname: `/${OpenApiUtil.getEncodeParam(WorkspaceId)}/datacenter/category/${OpenApiUtil.getEncodeParam(CategoryId)}`,
|
|
458
|
+
method: "POST",
|
|
459
|
+
authType: "AK",
|
|
460
|
+
style: "ROA",
|
|
461
|
+
reqBodyType: "formData",
|
|
462
|
+
bodyType: "json",
|
|
463
|
+
});
|
|
464
|
+
return $tea.cast<ApplyFileUploadLeaseResponse>(await this.callApi(params, req, runtime), new ApplyFileUploadLeaseResponse({}));
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* @summary 请求文档上传租约,进行文档上传。
|
|
469
|
+
*
|
|
470
|
+
* @param request ApplyFileUploadLeaseRequest
|
|
471
|
+
* @return ApplyFileUploadLeaseResponse
|
|
472
|
+
*/
|
|
473
|
+
async applyFileUploadLease(CategoryId: string, WorkspaceId: string, request: ApplyFileUploadLeaseRequest): Promise<ApplyFileUploadLeaseResponse> {
|
|
474
|
+
let runtime = new $Util.RuntimeOptions({ });
|
|
475
|
+
let headers : {[key: string ]: string} = { };
|
|
476
|
+
return await this.applyFileUploadLeaseWithOptions(CategoryId, WorkspaceId, request, headers, runtime);
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* @summary 获取文档基本信息,包括文档名称、类型、状态等。
|
|
481
|
+
*
|
|
482
|
+
* @param headers map
|
|
483
|
+
* @param runtime runtime options for this request RuntimeOptions
|
|
484
|
+
* @return DescribeFileResponse
|
|
485
|
+
*/
|
|
486
|
+
async describeFileWithOptions(WorkspaceId: string, FileId: string, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<DescribeFileResponse> {
|
|
487
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
488
|
+
headers: headers,
|
|
489
|
+
});
|
|
490
|
+
let params = new $OpenApi.Params({
|
|
491
|
+
action: "DescribeFile",
|
|
492
|
+
version: "2023-12-29",
|
|
493
|
+
protocol: "HTTPS",
|
|
494
|
+
pathname: `/${OpenApiUtil.getEncodeParam(WorkspaceId)}/datacenter/file/${OpenApiUtil.getEncodeParam(FileId)}/`,
|
|
495
|
+
method: "GET",
|
|
496
|
+
authType: "AK",
|
|
497
|
+
style: "ROA",
|
|
498
|
+
reqBodyType: "json",
|
|
499
|
+
bodyType: "json",
|
|
500
|
+
});
|
|
501
|
+
return $tea.cast<DescribeFileResponse>(await this.callApi(params, req, runtime), new DescribeFileResponse({}));
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/**
|
|
505
|
+
* @summary 获取文档基本信息,包括文档名称、类型、状态等。
|
|
506
|
+
*
|
|
507
|
+
* @return DescribeFileResponse
|
|
508
|
+
*/
|
|
509
|
+
async describeFile(WorkspaceId: string, FileId: string): Promise<DescribeFileResponse> {
|
|
510
|
+
let runtime = new $Util.RuntimeOptions({ });
|
|
511
|
+
let headers : {[key: string ]: string} = { };
|
|
512
|
+
return await this.describeFileWithOptions(WorkspaceId, FileId, headers, runtime);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
}
|