@alicloud/dianjin20240628 1.4.0 → 1.6.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/dist/client.d.ts +264 -0
- package/dist/client.js +264 -4
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +429 -0
package/package.json
CHANGED
package/src/client.ts
CHANGED
|
@@ -12,6 +12,153 @@ import EndpointUtil from '@alicloud/endpoint-util';
|
|
|
12
12
|
import { Readable } from 'stream';
|
|
13
13
|
import * as $tea from '@alicloud/tea-typescript';
|
|
14
14
|
|
|
15
|
+
export class CreateAnnualDocSummaryTaskRequest extends $tea.Model {
|
|
16
|
+
/**
|
|
17
|
+
* @remarks
|
|
18
|
+
* This parameter is required.
|
|
19
|
+
*/
|
|
20
|
+
anaYears?: number[];
|
|
21
|
+
/**
|
|
22
|
+
* @remarks
|
|
23
|
+
* This parameter is required.
|
|
24
|
+
*/
|
|
25
|
+
docInfos?: CreateAnnualDocSummaryTaskRequestDocInfos[];
|
|
26
|
+
/**
|
|
27
|
+
* @example
|
|
28
|
+
* true
|
|
29
|
+
*/
|
|
30
|
+
enableTable?: boolean;
|
|
31
|
+
instruction?: string;
|
|
32
|
+
/**
|
|
33
|
+
* @remarks
|
|
34
|
+
* This parameter is required.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* qwen-plus
|
|
38
|
+
*/
|
|
39
|
+
modelId?: string;
|
|
40
|
+
static names(): { [key: string]: string } {
|
|
41
|
+
return {
|
|
42
|
+
anaYears: 'anaYears',
|
|
43
|
+
docInfos: 'docInfos',
|
|
44
|
+
enableTable: 'enableTable',
|
|
45
|
+
instruction: 'instruction',
|
|
46
|
+
modelId: 'modelId',
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
static types(): { [key: string]: any } {
|
|
51
|
+
return {
|
|
52
|
+
anaYears: { 'type': 'array', 'itemType': 'number' },
|
|
53
|
+
docInfos: { 'type': 'array', 'itemType': CreateAnnualDocSummaryTaskRequestDocInfos },
|
|
54
|
+
enableTable: 'boolean',
|
|
55
|
+
instruction: 'string',
|
|
56
|
+
modelId: 'string',
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
constructor(map?: { [key: string]: any }) {
|
|
61
|
+
super(map);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export class CreateAnnualDocSummaryTaskResponseBody extends $tea.Model {
|
|
66
|
+
/**
|
|
67
|
+
* @example
|
|
68
|
+
* null
|
|
69
|
+
*/
|
|
70
|
+
cost?: number;
|
|
71
|
+
/**
|
|
72
|
+
* @example
|
|
73
|
+
* 3284627354
|
|
74
|
+
*/
|
|
75
|
+
data?: string;
|
|
76
|
+
/**
|
|
77
|
+
* @example
|
|
78
|
+
* null
|
|
79
|
+
*/
|
|
80
|
+
dataType?: string;
|
|
81
|
+
/**
|
|
82
|
+
* @example
|
|
83
|
+
* 0
|
|
84
|
+
*/
|
|
85
|
+
errCode?: string;
|
|
86
|
+
/**
|
|
87
|
+
* @example
|
|
88
|
+
* ok
|
|
89
|
+
*/
|
|
90
|
+
message?: string;
|
|
91
|
+
/**
|
|
92
|
+
* @example
|
|
93
|
+
* 32FFC91D-0A9F-585A-B84F-8A54C5187035
|
|
94
|
+
*/
|
|
95
|
+
requestId?: string;
|
|
96
|
+
/**
|
|
97
|
+
* @example
|
|
98
|
+
* true
|
|
99
|
+
*/
|
|
100
|
+
success?: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* @example
|
|
103
|
+
* 2024-01-01 00:00:00
|
|
104
|
+
*/
|
|
105
|
+
time?: string;
|
|
106
|
+
static names(): { [key: string]: string } {
|
|
107
|
+
return {
|
|
108
|
+
cost: 'cost',
|
|
109
|
+
data: 'data',
|
|
110
|
+
dataType: 'dataType',
|
|
111
|
+
errCode: 'errCode',
|
|
112
|
+
message: 'message',
|
|
113
|
+
requestId: 'requestId',
|
|
114
|
+
success: 'success',
|
|
115
|
+
time: 'time',
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
static types(): { [key: string]: any } {
|
|
120
|
+
return {
|
|
121
|
+
cost: 'number',
|
|
122
|
+
data: 'string',
|
|
123
|
+
dataType: 'string',
|
|
124
|
+
errCode: 'string',
|
|
125
|
+
message: 'string',
|
|
126
|
+
requestId: 'string',
|
|
127
|
+
success: 'boolean',
|
|
128
|
+
time: 'string',
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
constructor(map?: { [key: string]: any }) {
|
|
133
|
+
super(map);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export class CreateAnnualDocSummaryTaskResponse extends $tea.Model {
|
|
138
|
+
headers?: { [key: string]: string };
|
|
139
|
+
statusCode?: number;
|
|
140
|
+
body?: CreateAnnualDocSummaryTaskResponseBody;
|
|
141
|
+
static names(): { [key: string]: string } {
|
|
142
|
+
return {
|
|
143
|
+
headers: 'headers',
|
|
144
|
+
statusCode: 'statusCode',
|
|
145
|
+
body: 'body',
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
static types(): { [key: string]: any } {
|
|
150
|
+
return {
|
|
151
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
152
|
+
statusCode: 'number',
|
|
153
|
+
body: CreateAnnualDocSummaryTaskResponseBody,
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
constructor(map?: { [key: string]: any }) {
|
|
158
|
+
super(map);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
15
162
|
export class CreateDocsSummaryTaskRequest extends $tea.Model {
|
|
16
163
|
/**
|
|
17
164
|
* @remarks
|
|
@@ -3238,6 +3385,122 @@ export class ReIndexResponse extends $tea.Model {
|
|
|
3238
3385
|
}
|
|
3239
3386
|
}
|
|
3240
3387
|
|
|
3388
|
+
export class RebuildTaskRequest extends $tea.Model {
|
|
3389
|
+
/**
|
|
3390
|
+
* @remarks
|
|
3391
|
+
* This parameter is required.
|
|
3392
|
+
*/
|
|
3393
|
+
taskIds?: string[];
|
|
3394
|
+
static names(): { [key: string]: string } {
|
|
3395
|
+
return {
|
|
3396
|
+
taskIds: 'taskIds',
|
|
3397
|
+
};
|
|
3398
|
+
}
|
|
3399
|
+
|
|
3400
|
+
static types(): { [key: string]: any } {
|
|
3401
|
+
return {
|
|
3402
|
+
taskIds: { 'type': 'array', 'itemType': 'string' },
|
|
3403
|
+
};
|
|
3404
|
+
}
|
|
3405
|
+
|
|
3406
|
+
constructor(map?: { [key: string]: any }) {
|
|
3407
|
+
super(map);
|
|
3408
|
+
}
|
|
3409
|
+
}
|
|
3410
|
+
|
|
3411
|
+
export class RebuildTaskResponseBody extends $tea.Model {
|
|
3412
|
+
/**
|
|
3413
|
+
* @example
|
|
3414
|
+
* null
|
|
3415
|
+
*/
|
|
3416
|
+
cost?: number;
|
|
3417
|
+
data?: { [key: string]: any }[];
|
|
3418
|
+
/**
|
|
3419
|
+
* @example
|
|
3420
|
+
* null
|
|
3421
|
+
*/
|
|
3422
|
+
dataType?: string;
|
|
3423
|
+
/**
|
|
3424
|
+
* @example
|
|
3425
|
+
* 0
|
|
3426
|
+
*/
|
|
3427
|
+
errCode?: string;
|
|
3428
|
+
/**
|
|
3429
|
+
* @example
|
|
3430
|
+
* ok
|
|
3431
|
+
*/
|
|
3432
|
+
message?: string;
|
|
3433
|
+
/**
|
|
3434
|
+
* @example
|
|
3435
|
+
* EF4B5C9B-3BC8-5171-A47B-4C5CF3DC3258
|
|
3436
|
+
*/
|
|
3437
|
+
requestId?: string;
|
|
3438
|
+
/**
|
|
3439
|
+
* @example
|
|
3440
|
+
* true
|
|
3441
|
+
*/
|
|
3442
|
+
success?: boolean;
|
|
3443
|
+
/**
|
|
3444
|
+
* @example
|
|
3445
|
+
* 2024-04-24 11:54:34
|
|
3446
|
+
*/
|
|
3447
|
+
time?: string;
|
|
3448
|
+
static names(): { [key: string]: string } {
|
|
3449
|
+
return {
|
|
3450
|
+
cost: 'cost',
|
|
3451
|
+
data: 'data',
|
|
3452
|
+
dataType: 'dataType',
|
|
3453
|
+
errCode: 'errCode',
|
|
3454
|
+
message: 'message',
|
|
3455
|
+
requestId: 'requestId',
|
|
3456
|
+
success: 'success',
|
|
3457
|
+
time: 'time',
|
|
3458
|
+
};
|
|
3459
|
+
}
|
|
3460
|
+
|
|
3461
|
+
static types(): { [key: string]: any } {
|
|
3462
|
+
return {
|
|
3463
|
+
cost: 'number',
|
|
3464
|
+
data: { 'type': 'array', 'itemType': { 'type': 'map', 'keyType': 'string', 'valueType': 'any' } },
|
|
3465
|
+
dataType: 'string',
|
|
3466
|
+
errCode: 'string',
|
|
3467
|
+
message: 'string',
|
|
3468
|
+
requestId: 'string',
|
|
3469
|
+
success: 'boolean',
|
|
3470
|
+
time: 'string',
|
|
3471
|
+
};
|
|
3472
|
+
}
|
|
3473
|
+
|
|
3474
|
+
constructor(map?: { [key: string]: any }) {
|
|
3475
|
+
super(map);
|
|
3476
|
+
}
|
|
3477
|
+
}
|
|
3478
|
+
|
|
3479
|
+
export class RebuildTaskResponse extends $tea.Model {
|
|
3480
|
+
headers?: { [key: string]: string };
|
|
3481
|
+
statusCode?: number;
|
|
3482
|
+
body?: RebuildTaskResponseBody;
|
|
3483
|
+
static names(): { [key: string]: string } {
|
|
3484
|
+
return {
|
|
3485
|
+
headers: 'headers',
|
|
3486
|
+
statusCode: 'statusCode',
|
|
3487
|
+
body: 'body',
|
|
3488
|
+
};
|
|
3489
|
+
}
|
|
3490
|
+
|
|
3491
|
+
static types(): { [key: string]: any } {
|
|
3492
|
+
return {
|
|
3493
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
3494
|
+
statusCode: 'number',
|
|
3495
|
+
body: RebuildTaskResponseBody,
|
|
3496
|
+
};
|
|
3497
|
+
}
|
|
3498
|
+
|
|
3499
|
+
constructor(map?: { [key: string]: any }) {
|
|
3500
|
+
super(map);
|
|
3501
|
+
}
|
|
3502
|
+
}
|
|
3503
|
+
|
|
3241
3504
|
export class RecallDocumentRequest extends $tea.Model {
|
|
3242
3505
|
filters?: RecallDocumentRequestFilters[];
|
|
3243
3506
|
/**
|
|
@@ -4373,6 +4636,66 @@ export class UploadDocumentResponse extends $tea.Model {
|
|
|
4373
4636
|
}
|
|
4374
4637
|
}
|
|
4375
4638
|
|
|
4639
|
+
export class CreateAnnualDocSummaryTaskRequestDocInfos extends $tea.Model {
|
|
4640
|
+
/**
|
|
4641
|
+
* @remarks
|
|
4642
|
+
* This parameter is required.
|
|
4643
|
+
*
|
|
4644
|
+
* @example
|
|
4645
|
+
* 198386463432
|
|
4646
|
+
*/
|
|
4647
|
+
docId?: string;
|
|
4648
|
+
/**
|
|
4649
|
+
* @remarks
|
|
4650
|
+
* This parameter is required.
|
|
4651
|
+
*
|
|
4652
|
+
* @example
|
|
4653
|
+
* 2023
|
|
4654
|
+
*/
|
|
4655
|
+
docYear?: number;
|
|
4656
|
+
/**
|
|
4657
|
+
* @example
|
|
4658
|
+
* 2
|
|
4659
|
+
*/
|
|
4660
|
+
endPage?: number;
|
|
4661
|
+
/**
|
|
4662
|
+
* @remarks
|
|
4663
|
+
* This parameter is required.
|
|
4664
|
+
*
|
|
4665
|
+
* @example
|
|
4666
|
+
* rdxrmo6amk
|
|
4667
|
+
*/
|
|
4668
|
+
libraryId?: string;
|
|
4669
|
+
/**
|
|
4670
|
+
* @example
|
|
4671
|
+
* 1
|
|
4672
|
+
*/
|
|
4673
|
+
startPage?: number;
|
|
4674
|
+
static names(): { [key: string]: string } {
|
|
4675
|
+
return {
|
|
4676
|
+
docId: 'docId',
|
|
4677
|
+
docYear: 'docYear',
|
|
4678
|
+
endPage: 'endPage',
|
|
4679
|
+
libraryId: 'libraryId',
|
|
4680
|
+
startPage: 'startPage',
|
|
4681
|
+
};
|
|
4682
|
+
}
|
|
4683
|
+
|
|
4684
|
+
static types(): { [key: string]: any } {
|
|
4685
|
+
return {
|
|
4686
|
+
docId: 'string',
|
|
4687
|
+
docYear: 'number',
|
|
4688
|
+
endPage: 'number',
|
|
4689
|
+
libraryId: 'string',
|
|
4690
|
+
startPage: 'number',
|
|
4691
|
+
};
|
|
4692
|
+
}
|
|
4693
|
+
|
|
4694
|
+
constructor(map?: { [key: string]: any }) {
|
|
4695
|
+
super(map);
|
|
4696
|
+
}
|
|
4697
|
+
}
|
|
4698
|
+
|
|
4376
4699
|
export class CreateDocsSummaryTaskRequestDocInfos extends $tea.Model {
|
|
4377
4700
|
/**
|
|
4378
4701
|
* @remarks
|
|
@@ -8804,6 +9127,67 @@ export default class Client extends OpenApi {
|
|
|
8804
9127
|
return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
|
|
8805
9128
|
}
|
|
8806
9129
|
|
|
9130
|
+
/**
|
|
9131
|
+
* 创建按年文档总结任务
|
|
9132
|
+
*
|
|
9133
|
+
* @param request - CreateAnnualDocSummaryTaskRequest
|
|
9134
|
+
* @param headers - map
|
|
9135
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
9136
|
+
* @returns CreateAnnualDocSummaryTaskResponse
|
|
9137
|
+
*/
|
|
9138
|
+
async createAnnualDocSummaryTaskWithOptions(workspaceId: string, request: CreateAnnualDocSummaryTaskRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<CreateAnnualDocSummaryTaskResponse> {
|
|
9139
|
+
Util.validateModel(request);
|
|
9140
|
+
let body : {[key: string ]: any} = { };
|
|
9141
|
+
if (!Util.isUnset(request.anaYears)) {
|
|
9142
|
+
body["anaYears"] = request.anaYears;
|
|
9143
|
+
}
|
|
9144
|
+
|
|
9145
|
+
if (!Util.isUnset(request.docInfos)) {
|
|
9146
|
+
body["docInfos"] = request.docInfos;
|
|
9147
|
+
}
|
|
9148
|
+
|
|
9149
|
+
if (!Util.isUnset(request.enableTable)) {
|
|
9150
|
+
body["enableTable"] = request.enableTable;
|
|
9151
|
+
}
|
|
9152
|
+
|
|
9153
|
+
if (!Util.isUnset(request.instruction)) {
|
|
9154
|
+
body["instruction"] = request.instruction;
|
|
9155
|
+
}
|
|
9156
|
+
|
|
9157
|
+
if (!Util.isUnset(request.modelId)) {
|
|
9158
|
+
body["modelId"] = request.modelId;
|
|
9159
|
+
}
|
|
9160
|
+
|
|
9161
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
9162
|
+
headers: headers,
|
|
9163
|
+
body: OpenApiUtil.parseToMap(body),
|
|
9164
|
+
});
|
|
9165
|
+
let params = new $OpenApi.Params({
|
|
9166
|
+
action: "CreateAnnualDocSummaryTask",
|
|
9167
|
+
version: "2024-06-28",
|
|
9168
|
+
protocol: "HTTPS",
|
|
9169
|
+
pathname: `/${OpenApiUtil.getEncodeParam(workspaceId)}/api/task/summary/doc/annual`,
|
|
9170
|
+
method: "POST",
|
|
9171
|
+
authType: "AK",
|
|
9172
|
+
style: "ROA",
|
|
9173
|
+
reqBodyType: "json",
|
|
9174
|
+
bodyType: "json",
|
|
9175
|
+
});
|
|
9176
|
+
return $tea.cast<CreateAnnualDocSummaryTaskResponse>(await this.callApi(params, req, runtime), new CreateAnnualDocSummaryTaskResponse({}));
|
|
9177
|
+
}
|
|
9178
|
+
|
|
9179
|
+
/**
|
|
9180
|
+
* 创建按年文档总结任务
|
|
9181
|
+
*
|
|
9182
|
+
* @param request - CreateAnnualDocSummaryTaskRequest
|
|
9183
|
+
* @returns CreateAnnualDocSummaryTaskResponse
|
|
9184
|
+
*/
|
|
9185
|
+
async createAnnualDocSummaryTask(workspaceId: string, request: CreateAnnualDocSummaryTaskRequest): Promise<CreateAnnualDocSummaryTaskResponse> {
|
|
9186
|
+
let runtime = new $Util.RuntimeOptions({ });
|
|
9187
|
+
let headers : {[key: string ]: string} = { };
|
|
9188
|
+
return await this.createAnnualDocSummaryTaskWithOptions(workspaceId, request, headers, runtime);
|
|
9189
|
+
}
|
|
9190
|
+
|
|
8807
9191
|
/**
|
|
8808
9192
|
* 创建财报总结任务
|
|
8809
9193
|
*
|
|
@@ -10111,6 +10495,51 @@ export default class Client extends OpenApi {
|
|
|
10111
10495
|
return await this.reIndexWithOptions(workspaceId, request, headers, runtime);
|
|
10112
10496
|
}
|
|
10113
10497
|
|
|
10498
|
+
/**
|
|
10499
|
+
* 重建任务
|
|
10500
|
+
*
|
|
10501
|
+
* @param request - RebuildTaskRequest
|
|
10502
|
+
* @param headers - map
|
|
10503
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
10504
|
+
* @returns RebuildTaskResponse
|
|
10505
|
+
*/
|
|
10506
|
+
async rebuildTaskWithOptions(workspaceId: string, request: RebuildTaskRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<RebuildTaskResponse> {
|
|
10507
|
+
Util.validateModel(request);
|
|
10508
|
+
let body : {[key: string ]: any} = { };
|
|
10509
|
+
if (!Util.isUnset(request.taskIds)) {
|
|
10510
|
+
body["taskIds"] = request.taskIds;
|
|
10511
|
+
}
|
|
10512
|
+
|
|
10513
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
10514
|
+
headers: headers,
|
|
10515
|
+
body: OpenApiUtil.parseToMap(body),
|
|
10516
|
+
});
|
|
10517
|
+
let params = new $OpenApi.Params({
|
|
10518
|
+
action: "RebuildTask",
|
|
10519
|
+
version: "2024-06-28",
|
|
10520
|
+
protocol: "HTTPS",
|
|
10521
|
+
pathname: `/${OpenApiUtil.getEncodeParam(workspaceId)}/api/task/rebuild`,
|
|
10522
|
+
method: "POST",
|
|
10523
|
+
authType: "AK",
|
|
10524
|
+
style: "ROA",
|
|
10525
|
+
reqBodyType: "json",
|
|
10526
|
+
bodyType: "json",
|
|
10527
|
+
});
|
|
10528
|
+
return $tea.cast<RebuildTaskResponse>(await this.callApi(params, req, runtime), new RebuildTaskResponse({}));
|
|
10529
|
+
}
|
|
10530
|
+
|
|
10531
|
+
/**
|
|
10532
|
+
* 重建任务
|
|
10533
|
+
*
|
|
10534
|
+
* @param request - RebuildTaskRequest
|
|
10535
|
+
* @returns RebuildTaskResponse
|
|
10536
|
+
*/
|
|
10537
|
+
async rebuildTask(workspaceId: string, request: RebuildTaskRequest): Promise<RebuildTaskResponse> {
|
|
10538
|
+
let runtime = new $Util.RuntimeOptions({ });
|
|
10539
|
+
let headers : {[key: string ]: string} = { };
|
|
10540
|
+
return await this.rebuildTaskWithOptions(workspaceId, request, headers, runtime);
|
|
10541
|
+
}
|
|
10542
|
+
|
|
10114
10543
|
/**
|
|
10115
10544
|
* 文档召回。
|
|
10116
10545
|
*
|