@alicloud/dianjin20240628 1.4.0 → 1.5.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 +165 -0
- package/dist/client.js +156 -4
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +268 -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
|
|
@@ -4373,6 +4520,66 @@ export class UploadDocumentResponse extends $tea.Model {
|
|
|
4373
4520
|
}
|
|
4374
4521
|
}
|
|
4375
4522
|
|
|
4523
|
+
export class CreateAnnualDocSummaryTaskRequestDocInfos extends $tea.Model {
|
|
4524
|
+
/**
|
|
4525
|
+
* @remarks
|
|
4526
|
+
* This parameter is required.
|
|
4527
|
+
*
|
|
4528
|
+
* @example
|
|
4529
|
+
* 198386463432
|
|
4530
|
+
*/
|
|
4531
|
+
docId?: string;
|
|
4532
|
+
/**
|
|
4533
|
+
* @remarks
|
|
4534
|
+
* This parameter is required.
|
|
4535
|
+
*
|
|
4536
|
+
* @example
|
|
4537
|
+
* 2023
|
|
4538
|
+
*/
|
|
4539
|
+
docYear?: number;
|
|
4540
|
+
/**
|
|
4541
|
+
* @example
|
|
4542
|
+
* 2
|
|
4543
|
+
*/
|
|
4544
|
+
endPage?: number;
|
|
4545
|
+
/**
|
|
4546
|
+
* @remarks
|
|
4547
|
+
* This parameter is required.
|
|
4548
|
+
*
|
|
4549
|
+
* @example
|
|
4550
|
+
* rdxrmo6amk
|
|
4551
|
+
*/
|
|
4552
|
+
libraryId?: string;
|
|
4553
|
+
/**
|
|
4554
|
+
* @example
|
|
4555
|
+
* 1
|
|
4556
|
+
*/
|
|
4557
|
+
startPage?: number;
|
|
4558
|
+
static names(): { [key: string]: string } {
|
|
4559
|
+
return {
|
|
4560
|
+
docId: 'docId',
|
|
4561
|
+
docYear: 'docYear',
|
|
4562
|
+
endPage: 'endPage',
|
|
4563
|
+
libraryId: 'libraryId',
|
|
4564
|
+
startPage: 'startPage',
|
|
4565
|
+
};
|
|
4566
|
+
}
|
|
4567
|
+
|
|
4568
|
+
static types(): { [key: string]: any } {
|
|
4569
|
+
return {
|
|
4570
|
+
docId: 'string',
|
|
4571
|
+
docYear: 'number',
|
|
4572
|
+
endPage: 'number',
|
|
4573
|
+
libraryId: 'string',
|
|
4574
|
+
startPage: 'number',
|
|
4575
|
+
};
|
|
4576
|
+
}
|
|
4577
|
+
|
|
4578
|
+
constructor(map?: { [key: string]: any }) {
|
|
4579
|
+
super(map);
|
|
4580
|
+
}
|
|
4581
|
+
}
|
|
4582
|
+
|
|
4376
4583
|
export class CreateDocsSummaryTaskRequestDocInfos extends $tea.Model {
|
|
4377
4584
|
/**
|
|
4378
4585
|
* @remarks
|
|
@@ -8804,6 +9011,67 @@ export default class Client extends OpenApi {
|
|
|
8804
9011
|
return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
|
|
8805
9012
|
}
|
|
8806
9013
|
|
|
9014
|
+
/**
|
|
9015
|
+
* 创建按年文档总结任务
|
|
9016
|
+
*
|
|
9017
|
+
* @param request - CreateAnnualDocSummaryTaskRequest
|
|
9018
|
+
* @param headers - map
|
|
9019
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
9020
|
+
* @returns CreateAnnualDocSummaryTaskResponse
|
|
9021
|
+
*/
|
|
9022
|
+
async createAnnualDocSummaryTaskWithOptions(workspaceId: string, request: CreateAnnualDocSummaryTaskRequest, headers: {[key: string ]: string}, runtime: $Util.RuntimeOptions): Promise<CreateAnnualDocSummaryTaskResponse> {
|
|
9023
|
+
Util.validateModel(request);
|
|
9024
|
+
let body : {[key: string ]: any} = { };
|
|
9025
|
+
if (!Util.isUnset(request.anaYears)) {
|
|
9026
|
+
body["anaYears"] = request.anaYears;
|
|
9027
|
+
}
|
|
9028
|
+
|
|
9029
|
+
if (!Util.isUnset(request.docInfos)) {
|
|
9030
|
+
body["docInfos"] = request.docInfos;
|
|
9031
|
+
}
|
|
9032
|
+
|
|
9033
|
+
if (!Util.isUnset(request.enableTable)) {
|
|
9034
|
+
body["enableTable"] = request.enableTable;
|
|
9035
|
+
}
|
|
9036
|
+
|
|
9037
|
+
if (!Util.isUnset(request.instruction)) {
|
|
9038
|
+
body["instruction"] = request.instruction;
|
|
9039
|
+
}
|
|
9040
|
+
|
|
9041
|
+
if (!Util.isUnset(request.modelId)) {
|
|
9042
|
+
body["modelId"] = request.modelId;
|
|
9043
|
+
}
|
|
9044
|
+
|
|
9045
|
+
let req = new $OpenApi.OpenApiRequest({
|
|
9046
|
+
headers: headers,
|
|
9047
|
+
body: OpenApiUtil.parseToMap(body),
|
|
9048
|
+
});
|
|
9049
|
+
let params = new $OpenApi.Params({
|
|
9050
|
+
action: "CreateAnnualDocSummaryTask",
|
|
9051
|
+
version: "2024-06-28",
|
|
9052
|
+
protocol: "HTTPS",
|
|
9053
|
+
pathname: `/${OpenApiUtil.getEncodeParam(workspaceId)}/api/task/summary/doc/annual`,
|
|
9054
|
+
method: "POST",
|
|
9055
|
+
authType: "AK",
|
|
9056
|
+
style: "ROA",
|
|
9057
|
+
reqBodyType: "json",
|
|
9058
|
+
bodyType: "json",
|
|
9059
|
+
});
|
|
9060
|
+
return $tea.cast<CreateAnnualDocSummaryTaskResponse>(await this.callApi(params, req, runtime), new CreateAnnualDocSummaryTaskResponse({}));
|
|
9061
|
+
}
|
|
9062
|
+
|
|
9063
|
+
/**
|
|
9064
|
+
* 创建按年文档总结任务
|
|
9065
|
+
*
|
|
9066
|
+
* @param request - CreateAnnualDocSummaryTaskRequest
|
|
9067
|
+
* @returns CreateAnnualDocSummaryTaskResponse
|
|
9068
|
+
*/
|
|
9069
|
+
async createAnnualDocSummaryTask(workspaceId: string, request: CreateAnnualDocSummaryTaskRequest): Promise<CreateAnnualDocSummaryTaskResponse> {
|
|
9070
|
+
let runtime = new $Util.RuntimeOptions({ });
|
|
9071
|
+
let headers : {[key: string ]: string} = { };
|
|
9072
|
+
return await this.createAnnualDocSummaryTaskWithOptions(workspaceId, request, headers, runtime);
|
|
9073
|
+
}
|
|
9074
|
+
|
|
8807
9075
|
/**
|
|
8808
9076
|
* 创建财报总结任务
|
|
8809
9077
|
*
|