@quec-wx-mp/api-ai 0.1.4

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.
@@ -0,0 +1,298 @@
1
+ /**
2
+ * @module 记忆体
3
+ */
4
+ /**
5
+ * 查询 SAAS 设备列表
6
+ *
7
+ * @example
8
+ * ```
9
+ * const plugin = requirePlugin('quecPlugin')
10
+ * plugin.ai.findListV2({
11
+ * success (res) {},
12
+ * fail (res) {},
13
+ * complete (res) { }
14
+ * })
15
+ * ```
16
+ */
17
+ export declare function findListV2(options: {
18
+ /** 接口调用成功的回调函数 */
19
+ success?: (res: ResponseData) => void;
20
+ /** 接口调用失败的回调函数 */
21
+ fail?: (res: Error) => void;
22
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
23
+ complete?: () => void;
24
+ },
25
+ /** @ignore */
26
+ requestMethod: RequestFunction): void;
27
+ /**
28
+ * 获取设备的当前角色和音色
29
+ * @desc 获取设备的当前角色与音色。(deviceInfoId 与 (productKey、deviceKey、endUserId) 二选一)
30
+ *
31
+ * @example
32
+ *
33
+ * ```js
34
+ * const plugin = requirePlugin('quecPlugin')
35
+ * plugin.ai.findDeviceRoleVoiceRelV2({
36
+ * productKey: '',
37
+ * deviceKey: '',
38
+ * endUserId: '',
39
+ * success (res) {},
40
+ * fail (res) {},
41
+ * complete (res) { }
42
+ * })
43
+ * ```
44
+ */
45
+ export declare function findDeviceRoleVoiceRelV2(options: {
46
+ /** 设备信息ID(优先以deviceInfoId为主,没有的话处理pk、dk、endUserId) */
47
+ deviceInfoId?: number;
48
+ /** 设备PK */
49
+ productKey?: string;
50
+ /** 设备DK */
51
+ deviceKey?: string;
52
+ /** 终端用户ID */
53
+ endUserId?: string;
54
+ /** 接口调用成功的回调函数 */
55
+ success: (res: ResponseData) => void;
56
+ /** 接口调用失败的回调函数 */
57
+ fail: (res: Error) => void;
58
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
59
+ complete: () => void;
60
+ },
61
+ /** @ignore */
62
+ requestMethod: RequestFunction): void;
63
+ /**
64
+ * 切换角色/音色
65
+ *
66
+ * @desc 切换角色/音色步骤:
67
+ * 1、调用 plugin.ai.editDeviceRoleVoiceV2 API设置
68
+ * 2、确保websocket已连接(如未连接调用plugin.socket.connect连接),调用plugin.socket.send 向设备下发 重新进房指令
69
+ *
70
+ * @example
71
+ * ```
72
+ * const plugin = requirePlugin('quecPlugin')
73
+ * plugin.ai.editDeviceRoleVoiceV2({
74
+ * productKey: '',
75
+ * deviceKey: '',
76
+ * endUserId: '',
77
+ * roleId: '',
78
+ * voiceId: '',
79
+ * success (res) {
80
+ * //连接websocket(plugin.socket.connect)后,调用plugin.socket.send 向设备下发 重新进房指令
81
+ * },
82
+ * fail (res) {},
83
+ * complete (res) { }
84
+ * })
85
+ * ```
86
+ */
87
+ export declare function editDeviceRoleVoiceV2(options: {
88
+ /** 角色ID */
89
+ roleId: number;
90
+ /** 音色ID */
91
+ voiceId: number;
92
+ /** 设备信息ID */
93
+ deviceInfoId?: number;
94
+ /** 设备PK */
95
+ productKey?: string;
96
+ /** 设备DK */
97
+ deviceKey?: string;
98
+ /** 终端用户ID */
99
+ endUserId?: string;
100
+ /** 接口调用成功的回调函数 */
101
+ success: (res: ResponseData) => void;
102
+ /** 接口调用失败的回调函数 */
103
+ fail: (res: Error) => void;
104
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
105
+ complete: () => void;
106
+ },
107
+ /** @ignore */
108
+ requestMethod: RequestFunction): void;
109
+ /**
110
+ * 获取设备历史聊天消息列表
111
+ *
112
+ * @example
113
+ * ```js
114
+ * const plugin = requirePlugin('quecPlugin')
115
+ * plugin.ai.deviceMessageV2({
116
+ * roleId: '',
117
+ * status: 0,
118
+ * productKey: '',
119
+ * deviceKey: '',
120
+ * endUserId: '',
121
+ * limit: 10,
122
+ * success (res) {},
123
+ * fail (res) {},
124
+ * complete (res) { }
125
+ * })
126
+ * ```
127
+ */
128
+ export declare function deviceMessageV2(options: {
129
+ /** 角色ID */
130
+ roleId: number;
131
+ /** 刷新:0,加载:1 */
132
+ status: number;
133
+ /** 设备信息ID(优先以deviceInfoId为主,没有的话处理pk、dk、endUserId) */
134
+ deviceInfoId?: number;
135
+ /** 设备PK */
136
+ productKey?: string;
137
+ /** 设备DK */
138
+ deviceKey?: string;
139
+ /** 终端用户ID */
140
+ endUserId?: string;
141
+ /** status=0:指定为返回结果中的 lastId;status=1:指定为返回结果中的 firstId */
142
+ afterId?: string;
143
+ /** 每页条数 */
144
+ limit?: number;
145
+ /** 接口调用成功的回调函数 */
146
+ success: (res: ResponseData) => void;
147
+ /** 接口调用失败的回调函数 */
148
+ fail: (res: Error) => void;
149
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
150
+ complete: () => void;
151
+ },
152
+ /** @ignore */
153
+ requestMethod: RequestFunction): void;
154
+ /**
155
+ * 查询聊天总结
156
+ *
157
+ * @example
158
+ * ```
159
+ * const plugin = requirePlugin('quecPlugin')
160
+ * plugin.ai.getSummaryV2({
161
+ * day: '',
162
+ * productKey: '',
163
+ * deviceKey: '',
164
+ * deviceInfoId: '',
165
+ * endUserId: '',
166
+ * success (res) {},
167
+ * fail (res) {},
168
+ * complete (res) { }
169
+ * })
170
+ * ```
171
+ */
172
+ export declare function getSummaryV2(options: {
173
+ /** 时间格式:(YYYYMMDD)如:20250606 */
174
+ day: string;
175
+ /** 设备信息ID */
176
+ deviceInfoId?: number;
177
+ /** 设备PK */
178
+ productKey?: string;
179
+ /** 设备DK */
180
+ deviceKey?: string;
181
+ /** 终端用户ID */
182
+ endUserId?: string;
183
+ /** 接口调用成功的回调函数 */
184
+ success: (res: ResponseData) => void;
185
+ /** 接口调用失败的回调函数 */
186
+ fail: (res: Error) => void;
187
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
188
+ complete: () => void;
189
+ },
190
+ /** @ignore */
191
+ requestMethod: RequestFunction): void;
192
+ /**
193
+ * 恢复出厂设置
194
+ *
195
+ * @example
196
+ * ```
197
+ * const plugin = requirePlugin('quecPlugin')
198
+ * plugin.ai.deviceResetV2({
199
+ * productKey: '',
200
+ * deviceKey: '',
201
+ * deviceInfoId: '',
202
+ * endUserId: '',
203
+ * success (res) {},
204
+ * fail (res) {},
205
+ * complete (res) { }
206
+ * })
207
+ * ```
208
+ */
209
+ export declare function deviceResetV2(options: {
210
+ /** 设备信息ID */
211
+ deviceInfoId?: number;
212
+ /** 设备PK */
213
+ productKey?: string;
214
+ /** 设备DK */
215
+ deviceKey?: string;
216
+ /** 终端用户ID */
217
+ endUserId?: string;
218
+ /** 接口调用成功的回调函数 */
219
+ success?: (res: ResponseData) => void;
220
+ /** 接口调用失败的回调函数 */
221
+ fail?: (res: Error) => void;
222
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
223
+ complete?: () => void;
224
+ },
225
+ /** @ignore */
226
+ requestMethod: RequestFunction): void;
227
+ /**
228
+ * 设备迁移接口
229
+ *
230
+ * @example
231
+ * ```
232
+ * const plugin = requirePlugin('quecPlugin')
233
+ * plugin.ai.deviceShiftV2({
234
+ * deviceInfoIdOld: '',
235
+ * deviceInfoIdNew: '',
236
+ * productKeyNew: '',
237
+ * deviceKeyNew: '',
238
+ * endUserIdNew: '',
239
+ * success (res) {},
240
+ * fail (res) {},
241
+ * complete (res) { }
242
+ * })
243
+ * ```
244
+ */
245
+ export declare function deviceShiftV2(options: {
246
+ /** 旧设备信息ID */
247
+ deviceInfoIdOld: number;
248
+ /** 新设备信息ID */
249
+ deviceInfoIdNew: number;
250
+ /** 新设备PK */
251
+ productKeyNew?: string;
252
+ /** 新设备DK */
253
+ deviceKeyNew?: string;
254
+ /** 新终端用户ID */
255
+ endUserIdNew?: string;
256
+ /** 接口调用成功的回调函数 */
257
+ success: (res: ResponseData) => void;
258
+ /** 接口调用失败的回调函数 */
259
+ fail: (res: Error) => void;
260
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
261
+ complete: () => void;
262
+ },
263
+ /** @ignore */
264
+ requestMethod: RequestFunction): void;
265
+ /**
266
+ * 长记忆删除接口
267
+ *
268
+ * @example
269
+ * ```
270
+ * const plugin = requirePlugin('quecPlugin')
271
+ * plugin.ai.deleteMemoryV2({
272
+ * roleIds:[1],
273
+ * success (res) {},
274
+ * fail (res) {},
275
+ * complete (res) { }
276
+ * })
277
+ * ```
278
+ */
279
+ export declare function deleteMemoryV2(options: {
280
+ /** 角色ID列表 */
281
+ roleIds: number[];
282
+ /** 设备信息ID(优先以 deviceInfoId 为主,没有的话处理 pk、dk、endUserId) */
283
+ deviceInfoId?: number;
284
+ /** 设备PK */
285
+ productKey?: string;
286
+ /** 设备DK */
287
+ deviceKey?: string;
288
+ /** 终端用户ID */
289
+ endUserId?: string;
290
+ /** 接口调用成功的回调函数 */
291
+ success: (res: ResponseData) => void;
292
+ /** 接口调用失败的回调函数 */
293
+ fail: (res: Error) => void;
294
+ /** 接口调用结束的回调函数(调用成功、失败都会执行) */
295
+ complete: () => void;
296
+ },
297
+ /** @ignore */
298
+ requestMethod: RequestFunction): void;