@alicloud/dms20250414 1.24.0 → 1.25.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 +17 -2
- package/dist/client.js +62 -2
- package/dist/client.js.map +1 -1
- package/dist/models/CreateDataAgentFeedbackRequest.d.ts +53 -0
- package/dist/models/CreateDataAgentFeedbackRequest.js +72 -0
- package/dist/models/CreateDataAgentFeedbackRequest.js.map +1 -0
- package/dist/models/CreateDataAgentFeedbackResponse.d.ts +19 -0
- package/dist/models/CreateDataAgentFeedbackResponse.js +69 -0
- package/dist/models/CreateDataAgentFeedbackResponse.js.map +1 -0
- package/dist/models/CreateDataAgentFeedbackResponseBody.d.ts +91 -0
- package/dist/models/CreateDataAgentFeedbackResponseBody.js +104 -0
- package/dist/models/CreateDataAgentFeedbackResponseBody.js.map +1 -0
- package/dist/models/SendChatMessageRequest.d.ts +52 -26
- package/dist/models/SendChatMessageRequest.js +35 -1
- package/dist/models/SendChatMessageRequest.js.map +1 -1
- package/dist/models/SendChatMessageShrinkRequest.d.ts +14 -14
- package/dist/models/model.d.ts +5 -0
- package/dist/models/model.js +28 -18
- package/dist/models/model.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +72 -2
- package/src/models/CreateDataAgentFeedbackRequest.ts +80 -0
- package/src/models/CreateDataAgentFeedbackResponse.ts +40 -0
- package/src/models/CreateDataAgentFeedbackResponseBody.ts +141 -0
- package/src/models/SendChatMessageRequest.ts +77 -26
- package/src/models/SendChatMessageShrinkRequest.ts +14 -14
- package/src/models/model.ts +5 -0
package/src/client.ts
CHANGED
|
@@ -921,6 +921,76 @@ export default class Client extends OpenApi {
|
|
|
921
921
|
return await this.createDataAgentAccuracyTestWithOptions(request, runtime);
|
|
922
922
|
}
|
|
923
923
|
|
|
924
|
+
/**
|
|
925
|
+
* Data Agent点赞点踩功能
|
|
926
|
+
*
|
|
927
|
+
* @param request - CreateDataAgentFeedbackRequest
|
|
928
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
929
|
+
* @returns CreateDataAgentFeedbackResponse
|
|
930
|
+
*/
|
|
931
|
+
async createDataAgentFeedbackWithOptions(request: $_model.CreateDataAgentFeedbackRequest, runtime: $dara.RuntimeOptions): Promise<$_model.CreateDataAgentFeedbackResponse> {
|
|
932
|
+
request.validate();
|
|
933
|
+
let query = { };
|
|
934
|
+
if (!$dara.isNull(request.DMSUnit)) {
|
|
935
|
+
query["DMSUnit"] = request.DMSUnit;
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
if (!$dara.isNull(request.feedbackContent)) {
|
|
939
|
+
query["FeedbackContent"] = request.feedbackContent;
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
if (!$dara.isNull(request.feedbackType)) {
|
|
943
|
+
query["FeedbackType"] = request.feedbackType;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
if (!$dara.isNull(request.likeValue)) {
|
|
947
|
+
query["LikeValue"] = request.likeValue;
|
|
948
|
+
}
|
|
949
|
+
|
|
950
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
951
|
+
query["SessionId"] = request.sessionId;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
if (!$dara.isNull(request.targetId)) {
|
|
955
|
+
query["TargetId"] = request.targetId;
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
if (!$dara.isNull(request.targetType)) {
|
|
959
|
+
query["TargetType"] = request.targetType;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
if (!$dara.isNull(request.workspaceId)) {
|
|
963
|
+
query["WorkspaceId"] = request.workspaceId;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
967
|
+
query: OpenApiUtil.query(query),
|
|
968
|
+
});
|
|
969
|
+
let params = new $OpenApiUtil.Params({
|
|
970
|
+
action: "CreateDataAgentFeedback",
|
|
971
|
+
version: "2025-04-14",
|
|
972
|
+
protocol: "HTTPS",
|
|
973
|
+
pathname: "/",
|
|
974
|
+
method: "POST",
|
|
975
|
+
authType: "AK",
|
|
976
|
+
style: "RPC",
|
|
977
|
+
reqBodyType: "formData",
|
|
978
|
+
bodyType: "json",
|
|
979
|
+
});
|
|
980
|
+
return $dara.cast<$_model.CreateDataAgentFeedbackResponse>(await this.callApi(params, req, runtime), new $_model.CreateDataAgentFeedbackResponse({}));
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
/**
|
|
984
|
+
* Data Agent点赞点踩功能
|
|
985
|
+
*
|
|
986
|
+
* @param request - CreateDataAgentFeedbackRequest
|
|
987
|
+
* @returns CreateDataAgentFeedbackResponse
|
|
988
|
+
*/
|
|
989
|
+
async createDataAgentFeedback(request: $_model.CreateDataAgentFeedbackRequest): Promise<$_model.CreateDataAgentFeedbackResponse> {
|
|
990
|
+
let runtime = new $dara.RuntimeOptions({ });
|
|
991
|
+
return await this.createDataAgentFeedbackWithOptions(request, runtime);
|
|
992
|
+
}
|
|
993
|
+
|
|
924
994
|
/**
|
|
925
995
|
* Creates a DataAgent knowledge base. The knowledge base creator has read and write permissions. Other workspace members have permission to use it.
|
|
926
996
|
*
|
|
@@ -7241,7 +7311,7 @@ export default class Client extends OpenApi {
|
|
|
7241
7311
|
* @remarks
|
|
7242
7312
|
* ## Request description
|
|
7243
7313
|
* - `message_type` defaults to `primary`. Set it to `additional` or `cancel` when you need to append information or cancel a session.
|
|
7244
|
-
* - The `reply_to` field indicates which Agent message this message is
|
|
7314
|
+
* - The `reply_to` field indicates which Agent message this message is a response to. The default value is `0`.
|
|
7245
7315
|
* - When `message_type` is `additional`, the `question` field is required.
|
|
7246
7316
|
* - `quoted_message` can be used to quote the content of a previous user message.
|
|
7247
7317
|
*
|
|
@@ -7353,7 +7423,7 @@ export default class Client extends OpenApi {
|
|
|
7353
7423
|
* @remarks
|
|
7354
7424
|
* ## Request description
|
|
7355
7425
|
* - `message_type` defaults to `primary`. Set it to `additional` or `cancel` when you need to append information or cancel a session.
|
|
7356
|
-
* - The `reply_to` field indicates which Agent message this message is
|
|
7426
|
+
* - The `reply_to` field indicates which Agent message this message is a response to. The default value is `0`.
|
|
7357
7427
|
* - When `message_type` is `additional`, the `question` field is required.
|
|
7358
7428
|
* - `quoted_message` can be used to quote the content of a previous user message.
|
|
7359
7429
|
*
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// This file is auto-generated, don't edit it
|
|
2
|
+
import * as $dara from '@darabonba/typescript';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export class CreateDataAgentFeedbackRequest extends $dara.Model {
|
|
6
|
+
/**
|
|
7
|
+
* @example
|
|
8
|
+
* cn-hangzhou
|
|
9
|
+
*/
|
|
10
|
+
DMSUnit?: string;
|
|
11
|
+
/**
|
|
12
|
+
* @example
|
|
13
|
+
* {"feedback_type":"PRODUCT_SUGGESTION","user_feedback": "test","email":"yourname@example.com","is_authorized":"Y"}
|
|
14
|
+
*/
|
|
15
|
+
feedbackContent?: string;
|
|
16
|
+
/**
|
|
17
|
+
* @example
|
|
18
|
+
* ISSUE_REPORT
|
|
19
|
+
*/
|
|
20
|
+
feedbackType?: string;
|
|
21
|
+
/**
|
|
22
|
+
* @example
|
|
23
|
+
* 1
|
|
24
|
+
*/
|
|
25
|
+
likeValue?: number;
|
|
26
|
+
/**
|
|
27
|
+
* @example
|
|
28
|
+
* h8r********4fch
|
|
29
|
+
*/
|
|
30
|
+
sessionId?: string;
|
|
31
|
+
/**
|
|
32
|
+
* @example
|
|
33
|
+
* h8r********4fch_sdesfews
|
|
34
|
+
*/
|
|
35
|
+
targetId?: string;
|
|
36
|
+
/**
|
|
37
|
+
* @example
|
|
38
|
+
* SESSION
|
|
39
|
+
*/
|
|
40
|
+
targetType?: string;
|
|
41
|
+
/**
|
|
42
|
+
* @example
|
|
43
|
+
* 56kv1pvl9uvt9**********bb
|
|
44
|
+
*/
|
|
45
|
+
workspaceId?: string;
|
|
46
|
+
static names(): { [key: string]: string } {
|
|
47
|
+
return {
|
|
48
|
+
DMSUnit: 'DMSUnit',
|
|
49
|
+
feedbackContent: 'FeedbackContent',
|
|
50
|
+
feedbackType: 'FeedbackType',
|
|
51
|
+
likeValue: 'LikeValue',
|
|
52
|
+
sessionId: 'SessionId',
|
|
53
|
+
targetId: 'TargetId',
|
|
54
|
+
targetType: 'TargetType',
|
|
55
|
+
workspaceId: 'WorkspaceId',
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
static types(): { [key: string]: any } {
|
|
60
|
+
return {
|
|
61
|
+
DMSUnit: 'string',
|
|
62
|
+
feedbackContent: 'string',
|
|
63
|
+
feedbackType: 'string',
|
|
64
|
+
likeValue: 'number',
|
|
65
|
+
sessionId: 'string',
|
|
66
|
+
targetId: 'string',
|
|
67
|
+
targetType: 'string',
|
|
68
|
+
workspaceId: 'string',
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
validate() {
|
|
73
|
+
super.validate();
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
constructor(map?: { [key: string]: any }) {
|
|
77
|
+
super(map);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// This file is auto-generated, don't edit it
|
|
2
|
+
import * as $dara from '@darabonba/typescript';
|
|
3
|
+
import { CreateDataAgentFeedbackResponseBody } from "./CreateDataAgentFeedbackResponseBody";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
export class CreateDataAgentFeedbackResponse extends $dara.Model {
|
|
7
|
+
headers?: { [key: string]: string };
|
|
8
|
+
statusCode?: number;
|
|
9
|
+
body?: CreateDataAgentFeedbackResponseBody;
|
|
10
|
+
static names(): { [key: string]: string } {
|
|
11
|
+
return {
|
|
12
|
+
headers: 'headers',
|
|
13
|
+
statusCode: 'statusCode',
|
|
14
|
+
body: 'body',
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
static types(): { [key: string]: any } {
|
|
19
|
+
return {
|
|
20
|
+
headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
|
|
21
|
+
statusCode: 'number',
|
|
22
|
+
body: CreateDataAgentFeedbackResponseBody,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
validate() {
|
|
27
|
+
if(this.headers) {
|
|
28
|
+
$dara.Model.validateMap(this.headers);
|
|
29
|
+
}
|
|
30
|
+
if(this.body && typeof (this.body as any).validate === 'function') {
|
|
31
|
+
(this.body as any).validate();
|
|
32
|
+
}
|
|
33
|
+
super.validate();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
constructor(map?: { [key: string]: any }) {
|
|
37
|
+
super(map);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
// This file is auto-generated, don't edit it
|
|
2
|
+
import * as $dara from '@darabonba/typescript';
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export class CreateDataAgentFeedbackResponseBodyData extends $dara.Model {
|
|
6
|
+
/**
|
|
7
|
+
* @example
|
|
8
|
+
* {"feedback_type":"PRODUCT_SUGGESTION","user_feedback": "test","email":"yourname@example.com","is_authorized":"Y"}
|
|
9
|
+
*/
|
|
10
|
+
feedbackContent?: string;
|
|
11
|
+
/**
|
|
12
|
+
* @example
|
|
13
|
+
* ISSUE_REPORT
|
|
14
|
+
*/
|
|
15
|
+
feedbackType?: string;
|
|
16
|
+
/**
|
|
17
|
+
* @example
|
|
18
|
+
* 1
|
|
19
|
+
*/
|
|
20
|
+
likeValue?: number;
|
|
21
|
+
/**
|
|
22
|
+
* @example
|
|
23
|
+
* cn-hangzhou
|
|
24
|
+
*/
|
|
25
|
+
regionId?: string;
|
|
26
|
+
/**
|
|
27
|
+
* @example
|
|
28
|
+
* h8r********4fch
|
|
29
|
+
*/
|
|
30
|
+
sessionId?: string;
|
|
31
|
+
/**
|
|
32
|
+
* @example
|
|
33
|
+
* h8r********4fch_sdesfews
|
|
34
|
+
*/
|
|
35
|
+
targetId?: string;
|
|
36
|
+
/**
|
|
37
|
+
* @example
|
|
38
|
+
* SESSION
|
|
39
|
+
*/
|
|
40
|
+
targetType?: string;
|
|
41
|
+
static names(): { [key: string]: string } {
|
|
42
|
+
return {
|
|
43
|
+
feedbackContent: 'FeedbackContent',
|
|
44
|
+
feedbackType: 'FeedbackType',
|
|
45
|
+
likeValue: 'LikeValue',
|
|
46
|
+
regionId: 'RegionId',
|
|
47
|
+
sessionId: 'SessionId',
|
|
48
|
+
targetId: 'TargetId',
|
|
49
|
+
targetType: 'TargetType',
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
static types(): { [key: string]: any } {
|
|
54
|
+
return {
|
|
55
|
+
feedbackContent: 'string',
|
|
56
|
+
feedbackType: 'string',
|
|
57
|
+
likeValue: 'number',
|
|
58
|
+
regionId: 'string',
|
|
59
|
+
sessionId: 'string',
|
|
60
|
+
targetId: 'string',
|
|
61
|
+
targetType: 'string',
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
validate() {
|
|
66
|
+
super.validate();
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
constructor(map?: { [key: string]: any }) {
|
|
70
|
+
super(map);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export class CreateDataAgentFeedbackResponseBody extends $dara.Model {
|
|
75
|
+
/**
|
|
76
|
+
* @example
|
|
77
|
+
* 200
|
|
78
|
+
*/
|
|
79
|
+
code?: string;
|
|
80
|
+
data?: CreateDataAgentFeedbackResponseBodyData;
|
|
81
|
+
/**
|
|
82
|
+
* @example
|
|
83
|
+
* success
|
|
84
|
+
*/
|
|
85
|
+
errorCode?: string;
|
|
86
|
+
/**
|
|
87
|
+
* @example
|
|
88
|
+
* 200
|
|
89
|
+
*/
|
|
90
|
+
httpStatusCode?: number;
|
|
91
|
+
/**
|
|
92
|
+
* @example
|
|
93
|
+
* Specified parameter Tid is not valid.
|
|
94
|
+
*/
|
|
95
|
+
message?: string;
|
|
96
|
+
/**
|
|
97
|
+
* @example
|
|
98
|
+
* 89a07eac-96ff-48be-983b-f22c55*****
|
|
99
|
+
*/
|
|
100
|
+
requestId?: string;
|
|
101
|
+
/**
|
|
102
|
+
* @example
|
|
103
|
+
* true
|
|
104
|
+
*/
|
|
105
|
+
success?: boolean;
|
|
106
|
+
static names(): { [key: string]: string } {
|
|
107
|
+
return {
|
|
108
|
+
code: 'Code',
|
|
109
|
+
data: 'Data',
|
|
110
|
+
errorCode: 'ErrorCode',
|
|
111
|
+
httpStatusCode: 'HttpStatusCode',
|
|
112
|
+
message: 'Message',
|
|
113
|
+
requestId: 'RequestId',
|
|
114
|
+
success: 'Success',
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
static types(): { [key: string]: any } {
|
|
119
|
+
return {
|
|
120
|
+
code: 'string',
|
|
121
|
+
data: CreateDataAgentFeedbackResponseBodyData,
|
|
122
|
+
errorCode: 'string',
|
|
123
|
+
httpStatusCode: 'number',
|
|
124
|
+
message: 'string',
|
|
125
|
+
requestId: 'string',
|
|
126
|
+
success: 'boolean',
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
validate() {
|
|
131
|
+
if(this.data && typeof (this.data as any).validate === 'function') {
|
|
132
|
+
(this.data as any).validate();
|
|
133
|
+
}
|
|
134
|
+
super.validate();
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
constructor(map?: { [key: string]: any }) {
|
|
138
|
+
super(map);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
@@ -5,12 +5,13 @@ import * as $dara from '@darabonba/typescript';
|
|
|
5
5
|
export class SendChatMessageRequestDataSourcePermissionTables extends $dara.Model {
|
|
6
6
|
/**
|
|
7
7
|
* @remarks
|
|
8
|
-
* The list of columns that are allowed to be queried in the current table. If this field is left empty, all columns can be queried. If specified, SQL statements that exceed the allowed scope are blocked. For example, syntax such as SELECT * is blocked. To ensure DataAgent analysis
|
|
8
|
+
* The list of columns that are allowed to be queried in the current table. If this field is left empty, all columns can be queried. If this field is specified, SQL statements that exceed the allowed scope are blocked. For example, syntax such as SELECT * is blocked. To ensure the effectiveness of DataAgent analysis, avoid specifying columns that exceed the allowed scope in the prompts, knowledge, or instructions modules of DataAgent. Otherwise, SQL statements without the required permissions are generated and blocked, which reduces the analysis speed and effectiveness of DataAgent.
|
|
9
9
|
*/
|
|
10
10
|
allowedColumns?: string[];
|
|
11
|
+
disallowedColumns?: string[];
|
|
11
12
|
/**
|
|
12
13
|
* @remarks
|
|
13
|
-
* The required row filter condition for the current table. If this field is left empty, it is ignored. If specified, all SQL statements involving this table are validated to check whether they
|
|
14
|
+
* The required row filter condition for the current table. If this field is left empty, it is ignored. If this field is specified, all SQL statements involving this table are validated to check whether they carry the filter field and whether the WHERE condition meets the constraints. SQL statements that do not meet the constraints are rejected. Ensure the format of the validation conditions is correct.
|
|
14
15
|
*
|
|
15
16
|
* @example
|
|
16
17
|
* region = \\"east\\"
|
|
@@ -18,7 +19,7 @@ export class SendChatMessageRequestDataSourcePermissionTables extends $dara.Mode
|
|
|
18
19
|
requiredRowFilter?: string;
|
|
19
20
|
/**
|
|
20
21
|
* @remarks
|
|
21
|
-
* The table
|
|
22
|
+
* The name of the table to which the permission constraint rule applies.
|
|
22
23
|
*
|
|
23
24
|
* @example
|
|
24
25
|
* sample_table
|
|
@@ -27,6 +28,7 @@ export class SendChatMessageRequestDataSourcePermissionTables extends $dara.Mode
|
|
|
27
28
|
static names(): { [key: string]: string } {
|
|
28
29
|
return {
|
|
29
30
|
allowedColumns: 'AllowedColumns',
|
|
31
|
+
disallowedColumns: 'DisallowedColumns',
|
|
30
32
|
requiredRowFilter: 'RequiredRowFilter',
|
|
31
33
|
tableName: 'TableName',
|
|
32
34
|
};
|
|
@@ -35,6 +37,7 @@ export class SendChatMessageRequestDataSourcePermissionTables extends $dara.Mode
|
|
|
35
37
|
static types(): { [key: string]: any } {
|
|
36
38
|
return {
|
|
37
39
|
allowedColumns: { 'type': 'array', 'itemType': 'string' },
|
|
40
|
+
disallowedColumns: { 'type': 'array', 'itemType': 'string' },
|
|
38
41
|
requiredRowFilter: 'string',
|
|
39
42
|
tableName: 'string',
|
|
40
43
|
};
|
|
@@ -44,6 +47,9 @@ export class SendChatMessageRequestDataSourcePermissionTables extends $dara.Mode
|
|
|
44
47
|
if(Array.isArray(this.allowedColumns)) {
|
|
45
48
|
$dara.Model.validateArray(this.allowedColumns);
|
|
46
49
|
}
|
|
50
|
+
if(Array.isArray(this.disallowedColumns)) {
|
|
51
|
+
$dara.Model.validateArray(this.disallowedColumns);
|
|
52
|
+
}
|
|
47
53
|
super.validate();
|
|
48
54
|
}
|
|
49
55
|
|
|
@@ -93,7 +99,7 @@ export class SendChatMessageRequestDataSource extends $dara.Model {
|
|
|
93
99
|
dataSourceId?: string;
|
|
94
100
|
/**
|
|
95
101
|
* @remarks
|
|
96
|
-
* The data source type. Valid values: `[remote_data_center, database]`,
|
|
102
|
+
* The data source type. Valid values: `[remote_data_center, database]`, which indicate that the analysis is performed on a file or a database.
|
|
97
103
|
*
|
|
98
104
|
* @example
|
|
99
105
|
* remote_data_center
|
|
@@ -225,12 +231,13 @@ export class SendChatMessageRequestDataSource extends $dara.Model {
|
|
|
225
231
|
export class SendChatMessageRequestDataSourcesPermissionTables extends $dara.Model {
|
|
226
232
|
/**
|
|
227
233
|
* @remarks
|
|
228
|
-
* The list of columns that are allowed to be queried in the current table. If this field is left empty, all columns can be queried. If specified, SQL statements that exceed the allowed scope are blocked. For example, syntax such as SELECT * is blocked. To ensure DataAgent analysis
|
|
234
|
+
* The list of columns that are allowed to be queried in the current table. If this field is left empty, all columns can be queried. If this field is specified, SQL statements that exceed the allowed scope are blocked. For example, syntax such as SELECT * is blocked. To ensure the effectiveness of DataAgent analysis, avoid specifying columns that exceed the allowed scope in the prompts, knowledge, or instructions modules of DataAgent. Otherwise, SQL statements without the required permissions are generated and blocked, which reduces the analysis speed and effectiveness of DataAgent.
|
|
229
235
|
*/
|
|
230
236
|
allowedColumns?: string[];
|
|
237
|
+
disallowedColumns?: string[];
|
|
231
238
|
/**
|
|
232
239
|
* @remarks
|
|
233
|
-
* The required row filter condition for the current table. If this field is left empty, it is ignored. If specified, all SQL statements involving this table are validated to check whether they
|
|
240
|
+
* The required row filter condition for the current table. If this field is left empty, it is ignored. If this field is specified, all SQL statements involving this table are validated to check whether they carry the filter field and whether the WHERE condition meets the constraints. SQL statements that do not meet the constraints are rejected. Ensure the format of the validation conditions is correct.
|
|
234
241
|
*
|
|
235
242
|
* @example
|
|
236
243
|
* region = \\"east\\"
|
|
@@ -238,7 +245,7 @@ export class SendChatMessageRequestDataSourcesPermissionTables extends $dara.Mod
|
|
|
238
245
|
requiredRowFilter?: string;
|
|
239
246
|
/**
|
|
240
247
|
* @remarks
|
|
241
|
-
* The table
|
|
248
|
+
* The name of the table to which the permission constraint rule applies.
|
|
242
249
|
*
|
|
243
250
|
* @example
|
|
244
251
|
* sample_table
|
|
@@ -247,6 +254,7 @@ export class SendChatMessageRequestDataSourcesPermissionTables extends $dara.Mod
|
|
|
247
254
|
static names(): { [key: string]: string } {
|
|
248
255
|
return {
|
|
249
256
|
allowedColumns: 'AllowedColumns',
|
|
257
|
+
disallowedColumns: 'DisallowedColumns',
|
|
250
258
|
requiredRowFilter: 'RequiredRowFilter',
|
|
251
259
|
tableName: 'TableName',
|
|
252
260
|
};
|
|
@@ -255,6 +263,7 @@ export class SendChatMessageRequestDataSourcesPermissionTables extends $dara.Mod
|
|
|
255
263
|
static types(): { [key: string]: any } {
|
|
256
264
|
return {
|
|
257
265
|
allowedColumns: { 'type': 'array', 'itemType': 'string' },
|
|
266
|
+
disallowedColumns: { 'type': 'array', 'itemType': 'string' },
|
|
258
267
|
requiredRowFilter: 'string',
|
|
259
268
|
tableName: 'string',
|
|
260
269
|
};
|
|
@@ -264,6 +273,9 @@ export class SendChatMessageRequestDataSourcesPermissionTables extends $dara.Mod
|
|
|
264
273
|
if(Array.isArray(this.allowedColumns)) {
|
|
265
274
|
$dara.Model.validateArray(this.allowedColumns);
|
|
266
275
|
}
|
|
276
|
+
if(Array.isArray(this.disallowedColumns)) {
|
|
277
|
+
$dara.Model.validateArray(this.disallowedColumns);
|
|
278
|
+
}
|
|
267
279
|
super.validate();
|
|
268
280
|
}
|
|
269
281
|
|
|
@@ -313,7 +325,7 @@ export class SendChatMessageRequestDataSources extends $dara.Model {
|
|
|
313
325
|
dataSourceId?: string;
|
|
314
326
|
/**
|
|
315
327
|
* @remarks
|
|
316
|
-
* The data source type. Valid values: remote_data_center
|
|
328
|
+
* The data source type. Valid values: remote_data_center and database, which indicate that the analysis is performed on a file or a database.
|
|
317
329
|
*
|
|
318
330
|
* @example
|
|
319
331
|
* remote_data_center
|
|
@@ -442,6 +454,35 @@ export class SendChatMessageRequestDataSources extends $dara.Model {
|
|
|
442
454
|
}
|
|
443
455
|
}
|
|
444
456
|
|
|
457
|
+
export class SendChatMessageRequestSessionConfigPermissionConfig extends $dara.Model {
|
|
458
|
+
/**
|
|
459
|
+
* @remarks
|
|
460
|
+
* The default behavior for unconfigured tables. Valid values:
|
|
461
|
+
* - allow: Allow. This is the default value.
|
|
462
|
+
* - deny: Deny.
|
|
463
|
+
*/
|
|
464
|
+
defaultAction?: string;
|
|
465
|
+
static names(): { [key: string]: string } {
|
|
466
|
+
return {
|
|
467
|
+
defaultAction: 'DefaultAction',
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
static types(): { [key: string]: any } {
|
|
472
|
+
return {
|
|
473
|
+
defaultAction: 'string',
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
validate() {
|
|
478
|
+
super.validate();
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
constructor(map?: { [key: string]: any }) {
|
|
482
|
+
super(map);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
|
|
445
486
|
export class SendChatMessageRequestSessionConfig extends $dara.Model {
|
|
446
487
|
/**
|
|
447
488
|
* @remarks
|
|
@@ -504,7 +545,12 @@ export class SendChatMessageRequestSessionConfig extends $dara.Model {
|
|
|
504
545
|
mode?: string;
|
|
505
546
|
/**
|
|
506
547
|
* @remarks
|
|
507
|
-
*
|
|
548
|
+
* The session-level permission configuration. This parameter specifies only the default behavior for unconfigured tables.
|
|
549
|
+
*/
|
|
550
|
+
permissionConfig?: SendChatMessageRequestSessionConfigPermissionConfig;
|
|
551
|
+
/**
|
|
552
|
+
* @remarks
|
|
553
|
+
* Specifies whether to enable the plan. Valid values: disable, enable, and force. Default value: enable.
|
|
508
554
|
*
|
|
509
555
|
* @example
|
|
510
556
|
* disable
|
|
@@ -512,7 +558,7 @@ export class SendChatMessageRequestSessionConfig extends $dara.Model {
|
|
|
512
558
|
planMode?: string;
|
|
513
559
|
/**
|
|
514
560
|
* @remarks
|
|
515
|
-
* The text
|
|
561
|
+
* The text of up to 64 characters that is used as a watermark in the generated PDF report.
|
|
516
562
|
*
|
|
517
563
|
* @example
|
|
518
564
|
* sample-watermark
|
|
@@ -560,6 +606,7 @@ export class SendChatMessageRequestSessionConfig extends $dara.Model {
|
|
|
560
606
|
language: 'Language',
|
|
561
607
|
mcpServerIds: 'McpServerIds',
|
|
562
608
|
mode: 'Mode',
|
|
609
|
+
permissionConfig: 'PermissionConfig',
|
|
563
610
|
planMode: 'PlanMode',
|
|
564
611
|
reportWaterMark: 'ReportWaterMark',
|
|
565
612
|
skipAskHuman: 'SkipAskHuman',
|
|
@@ -579,6 +626,7 @@ export class SendChatMessageRequestSessionConfig extends $dara.Model {
|
|
|
579
626
|
language: 'string',
|
|
580
627
|
mcpServerIds: 'string',
|
|
581
628
|
mode: 'string',
|
|
629
|
+
permissionConfig: SendChatMessageRequestSessionConfigPermissionConfig,
|
|
582
630
|
planMode: 'string',
|
|
583
631
|
reportWaterMark: 'string',
|
|
584
632
|
skipAskHuman: 'boolean',
|
|
@@ -590,6 +638,9 @@ export class SendChatMessageRequestSessionConfig extends $dara.Model {
|
|
|
590
638
|
}
|
|
591
639
|
|
|
592
640
|
validate() {
|
|
641
|
+
if(this.permissionConfig && typeof (this.permissionConfig as any).validate === 'function') {
|
|
642
|
+
(this.permissionConfig as any).validate();
|
|
643
|
+
}
|
|
593
644
|
if(Array.isArray(this.userSpecifiedSkillList)) {
|
|
594
645
|
$dara.Model.validateArray(this.userSpecifiedSkillList);
|
|
595
646
|
}
|
|
@@ -612,7 +663,7 @@ export class SendChatMessageRequestTaskConfigReportConfig extends $dara.Model {
|
|
|
612
663
|
reportPrompt?: string;
|
|
613
664
|
/**
|
|
614
665
|
* @remarks
|
|
615
|
-
* The report theme. Valid values: default, journal, legacy, neobrutalism.
|
|
666
|
+
* The report theme. Valid values: default, journal, legacy, and neobrutalism.
|
|
616
667
|
*
|
|
617
668
|
* @example
|
|
618
669
|
* default
|
|
@@ -620,7 +671,7 @@ export class SendChatMessageRequestTaskConfigReportConfig extends $dara.Model {
|
|
|
620
671
|
reportTheme?: string;
|
|
621
672
|
/**
|
|
622
673
|
* @remarks
|
|
623
|
-
* The service type. Valid values: TextReport
|
|
674
|
+
* The service type. Valid values: TextReport and WebReport, which indicate that the task generates a text report or a web report. Currently only WebReport is supported.
|
|
624
675
|
*
|
|
625
676
|
* @example
|
|
626
677
|
* WebReport
|
|
@@ -684,7 +735,7 @@ export class SendChatMessageRequestTaskConfig extends $dara.Model {
|
|
|
684
735
|
export class SendChatMessageRequest extends $dara.Model {
|
|
685
736
|
/**
|
|
686
737
|
* @remarks
|
|
687
|
-
* **[
|
|
738
|
+
* **[Deprecated]** This field is now automatically obtained by the backend. You do not need to specify this field.
|
|
688
739
|
*
|
|
689
740
|
* @example
|
|
690
741
|
* agent_***
|
|
@@ -692,7 +743,7 @@ export class SendChatMessageRequest extends $dara.Model {
|
|
|
692
743
|
agentId?: string;
|
|
693
744
|
/**
|
|
694
745
|
* @remarks
|
|
695
|
-
* **[
|
|
746
|
+
* **[Deprecated]** This field is now automatically obtained by the backend. You do not need to specify this field when calling the API.
|
|
696
747
|
*
|
|
697
748
|
* @example
|
|
698
749
|
* cn-hangzhou
|
|
@@ -713,7 +764,7 @@ export class SendChatMessageRequest extends $dara.Model {
|
|
|
713
764
|
dataSources?: SendChatMessageRequestDataSources[];
|
|
714
765
|
/**
|
|
715
766
|
* @remarks
|
|
716
|
-
* The message
|
|
767
|
+
* The content of the message to send to the Agent.
|
|
717
768
|
*
|
|
718
769
|
* This parameter is required.
|
|
719
770
|
*
|
|
@@ -725,13 +776,13 @@ export class SendChatMessageRequest extends $dara.Model {
|
|
|
725
776
|
* @remarks
|
|
726
777
|
* The message type. Default value: `[primary]`.
|
|
727
778
|
*
|
|
728
|
-
* - For regular interactions with the Agent, the message type
|
|
779
|
+
* - For regular interactions with the Agent, set the message type to `[primary]`.
|
|
729
780
|
*
|
|
730
|
-
* - When the message is a response to the Agent\\"s
|
|
781
|
+
* - When the message is a response to the Agent\\"s human-in-the-loop question, set the type to `[additional]`.
|
|
731
782
|
*
|
|
732
|
-
* - When the message
|
|
783
|
+
* - When the message triggers a report generation, set the type to `[report]`.
|
|
733
784
|
*
|
|
734
|
-
* - When the message
|
|
785
|
+
* - When the message cancels the current session, set the type to `[cancel]`.
|
|
735
786
|
*
|
|
736
787
|
* @example
|
|
737
788
|
* primary
|
|
@@ -747,10 +798,10 @@ export class SendChatMessageRequest extends $dara.Model {
|
|
|
747
798
|
parentSessionId?: string;
|
|
748
799
|
/**
|
|
749
800
|
* @remarks
|
|
750
|
-
* This field is required when the message type is `additional`. Specify the specific question that the Agent asks the user through
|
|
801
|
+
* This field is required when the message type is `additional`. Specify the specific question that the Agent asks the user through the human-in-the-loop mechanism.
|
|
751
802
|
*
|
|
752
803
|
* @example
|
|
753
|
-
*
|
|
804
|
+
* Provide the criteria for calculating GMV
|
|
754
805
|
*/
|
|
755
806
|
question?: string;
|
|
756
807
|
/**
|
|
@@ -765,9 +816,9 @@ export class SendChatMessageRequest extends $dara.Model {
|
|
|
765
816
|
* @remarks
|
|
766
817
|
* **Important**
|
|
767
818
|
*
|
|
768
|
-
* When this message is a reply to an Agent message (for example, the Agent asks a
|
|
819
|
+
* When this message is a reply to an Agent message (for example, the Agent asks a clarifying question through ASK_HUMAN), set reply_to to the exact Checkpoint sequence number carried in that Agent message. If this message is not a targeted reply, such as requesting the Agent to perform further in-depth analysis after the analysis is complete, leave reply_to empty or set it to "0".
|
|
769
820
|
*
|
|
770
|
-
* This field affects how the Agent decides to process the message. Passing an incorrect value may
|
|
821
|
+
* This field affects how the Agent decides to process the message. Passing an incorrect value may cause the analysis results to be less effective than expected.
|
|
771
822
|
*
|
|
772
823
|
* @example
|
|
773
824
|
* 0
|
|
@@ -784,8 +835,8 @@ export class SendChatMessageRequest extends $dara.Model {
|
|
|
784
835
|
/**
|
|
785
836
|
* @remarks
|
|
786
837
|
* The session ID. This is an optional field used for multi-turn conversations.
|
|
787
|
-
* - You can start a
|
|
788
|
-
* - You can also manually create a session ID by calling the CreateDataAgentSession operation and include the ID when initiating a
|
|
838
|
+
* - You can start a session without specifying this field. The response includes the SessionID for the current session.
|
|
839
|
+
* - You can also manually create a session ID by calling the CreateDataAgentSession operation and include the ID when initiating a session.
|
|
789
840
|
* - If you need multi-turn conversations (such as follow-up questions or confirming execution plans), include the SessionID returned by the previous SendChatMessage call.
|
|
790
841
|
*
|
|
791
842
|
* @example
|
|
@@ -799,7 +850,7 @@ export class SendChatMessageRequest extends $dara.Model {
|
|
|
799
850
|
taskConfig?: SendChatMessageRequestTaskConfig;
|
|
800
851
|
/**
|
|
801
852
|
* @remarks
|
|
802
|
-
* The
|
|
853
|
+
* The OSS bucket of the user. If this field is left empty, the analysis data is securely stored in the built-in storage.
|
|
803
854
|
*
|
|
804
855
|
* @example
|
|
805
856
|
* my-bucket
|