@glodon-aiot/apis 2.4.7

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.
Files changed (64) hide show
  1. package/README.git.md +73 -0
  2. package/README.lib.md +135 -0
  3. package/dist/es/aecpilot/cosntant.mjs +5 -0
  4. package/dist/es/aecpilot/index.mjs +510 -0
  5. package/dist/es/aecpilot/model.mjs +9 -0
  6. package/dist/es/aecpilotui/index.mjs +607 -0
  7. package/dist/es/agentcliui/index.mjs +418 -0
  8. package/dist/es/aishop/index.mjs +97 -0
  9. package/dist/es/aishop/model.mjs +5 -0
  10. package/dist/es/auth/index.mjs +52 -0
  11. package/dist/es/base/index.mjs +158 -0
  12. package/dist/es/contralyze/index.mjs +91 -0
  13. package/dist/es/cvforce/index.mjs +431 -0
  14. package/dist/es/cvforce/model.mjs +12 -0
  15. package/dist/es/cvforce-datahub/index.mjs +435 -0
  16. package/dist/es/cvforce-datahub/model.mjs +8 -0
  17. package/dist/es/cvforce-modelservice/index.mjs +114 -0
  18. package/dist/es/cvforce-modelservice/model.mjs +4 -0
  19. package/dist/es/index.mjs +62 -0
  20. package/dist/es/node_modules/uuid/dist/esm-browser/native.mjs +6 -0
  21. package/dist/es/node_modules/uuid/dist/esm-browser/rng.mjs +10 -0
  22. package/dist/es/node_modules/uuid/dist/esm-browser/stringify.mjs +9 -0
  23. package/dist/es/node_modules/uuid/dist/esm-browser/v4.mjs +19 -0
  24. package/dist/es/panorama/index.mjs +136 -0
  25. package/dist/es/panorama/model.mjs +5 -0
  26. package/dist/es/pluginmgr/index.mjs +85 -0
  27. package/dist/es/user/index.mjs +193 -0
  28. package/dist/es/utils/fetchEventSource/fetch.mjs +112 -0
  29. package/dist/es/utils/fetchEventSource/parse.mjs +97 -0
  30. package/dist/es/utils/index.mjs +9 -0
  31. package/dist/lib/index.js +3 -0
  32. package/dist/src/aecpilot/cosntant.d.ts +8 -0
  33. package/dist/src/aecpilot/index.d.ts +79 -0
  34. package/dist/src/aecpilot/model.d.ts +350 -0
  35. package/dist/src/aecpilotui/index.d.ts +72 -0
  36. package/dist/src/aecpilotui/model.d.ts +63 -0
  37. package/dist/src/agentcliui/index.d.ts +72 -0
  38. package/dist/src/agentcliui/model.d.ts +39 -0
  39. package/dist/src/aishop/index.d.ts +26 -0
  40. package/dist/src/aishop/model.d.ts +111 -0
  41. package/dist/src/auth/index.d.ts +17 -0
  42. package/dist/src/auth/model.d.ts +24 -0
  43. package/dist/src/base/index.d.ts +41 -0
  44. package/dist/src/base/model.d.ts +20 -0
  45. package/dist/src/contralyze/index.d.ts +24 -0
  46. package/dist/src/contralyze/model.d.ts +75 -0
  47. package/dist/src/cvforce/index.d.ts +130 -0
  48. package/dist/src/cvforce/model.d.ts +519 -0
  49. package/dist/src/cvforce-datahub/index.d.ts +186 -0
  50. package/dist/src/cvforce-datahub/model.d.ts +438 -0
  51. package/dist/src/cvforce-modelservice/index.d.ts +23 -0
  52. package/dist/src/cvforce-modelservice/model.d.ts +156 -0
  53. package/dist/src/index.d.ts +19 -0
  54. package/dist/src/panorama/index.d.ts +42 -0
  55. package/dist/src/panorama/model.d.ts +263 -0
  56. package/dist/src/pluginmgr/index.d.ts +28 -0
  57. package/dist/src/pluginmgr/model.d.ts +48 -0
  58. package/dist/src/user/index.d.ts +42 -0
  59. package/dist/src/user/model.d.ts +247 -0
  60. package/dist/src/utils/fetchEventSource/fetch.d.ts +44 -0
  61. package/dist/src/utils/fetchEventSource/index.d.ts +1 -0
  62. package/dist/src/utils/fetchEventSource/parse.d.ts +36 -0
  63. package/dist/src/utils/index.d.ts +1 -0
  64. package/package.json +88 -0
@@ -0,0 +1,158 @@
1
+ var g = Object.defineProperty;
2
+ var d = Object.getOwnPropertySymbols;
3
+ var x = Object.prototype.hasOwnProperty, y = Object.prototype.propertyIsEnumerable;
4
+ var u = (o, s, e) => s in o ? g(o, s, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[s] = e, c = (o, s) => {
5
+ for (var e in s || (s = {}))
6
+ x.call(s, e) && u(o, e, s[e]);
7
+ if (d)
8
+ for (var e of d(s))
9
+ y.call(s, e) && u(o, e, s[e]);
10
+ return o;
11
+ };
12
+ var n = (o, s, e) => new Promise((t, r) => {
13
+ var p = (a) => {
14
+ try {
15
+ h(e.next(a));
16
+ } catch (l) {
17
+ r(l);
18
+ }
19
+ }, i = (a) => {
20
+ try {
21
+ h(e.throw(a));
22
+ } catch (l) {
23
+ r(l);
24
+ }
25
+ }, h = (a) => a.done ? t(a.value) : Promise.resolve(a.value).then(p, i);
26
+ h((e = e.apply(o, s)).next());
27
+ });
28
+ class R {
29
+ constructor(s, e) {
30
+ this.axios = s, this.errorHandler = e;
31
+ }
32
+ get(s, e, t) {
33
+ return n(this, null, function* () {
34
+ const r = this.axios.get(s, {
35
+ params: e
36
+ });
37
+ return this.handleResponse(r, t);
38
+ });
39
+ }
40
+ listPaged(s, e) {
41
+ return n(this, null, function* () {
42
+ const t = this.axios.get(s, {
43
+ params: e
44
+ });
45
+ return this.handleResponse(t);
46
+ });
47
+ }
48
+ list(s, e) {
49
+ return n(this, null, function* () {
50
+ const t = this.axios.get(s, {
51
+ params: e
52
+ });
53
+ return this.handleResponse(t);
54
+ });
55
+ }
56
+ delete(s, e) {
57
+ return n(this, null, function* () {
58
+ const t = this.axios.delete(s, {
59
+ params: e
60
+ });
61
+ return this.handleResponse(t);
62
+ });
63
+ }
64
+ post(s, e, t, r) {
65
+ return n(this, null, function* () {
66
+ const p = this.axios.post(s, e, c({
67
+ params: t
68
+ }, r));
69
+ return this.handleResponse(p);
70
+ });
71
+ }
72
+ postForm(s, e, t) {
73
+ return n(this, null, function* () {
74
+ const r = this.axios.post(s, e, {
75
+ params: t,
76
+ headers: {
77
+ "Content-Type": "multipart/form-data"
78
+ }
79
+ });
80
+ return this.handleResponse(r);
81
+ });
82
+ }
83
+ patch(s, e, t) {
84
+ return n(this, null, function* () {
85
+ const r = this.axios.patch(s, e, {
86
+ params: t
87
+ });
88
+ return this.handleResponse(r);
89
+ });
90
+ }
91
+ put(s, e) {
92
+ return n(this, null, function* () {
93
+ const t = this.axios.put(s, e);
94
+ return this.handleResponse(t);
95
+ });
96
+ }
97
+ upload(s, e, t) {
98
+ return n(this, null, function* () {
99
+ const r = this.axios.post(s, e, c({}, t));
100
+ return this.handleResponse(r);
101
+ });
102
+ }
103
+ getNonStandard(s, e) {
104
+ return n(this, null, function* () {
105
+ const t = this.axios.get(s, e);
106
+ try {
107
+ const r = yield t;
108
+ if (r.status === 200)
109
+ return r;
110
+ } catch (r) {
111
+ throw this.handleError(r);
112
+ }
113
+ });
114
+ }
115
+ postNonStandard(s, e, t, r) {
116
+ return n(this, null, function* () {
117
+ var h, a;
118
+ const i = yield this.axios.post(s, e, c({
119
+ params: t
120
+ }, r));
121
+ if (i.status === 200)
122
+ if ((h = i.data) != null && h.code)
123
+ (a = this.errorHandler) != null && a.onAppStatusError && this.errorHandler.onAppStatusError(i.data.code, i.data.message);
124
+ else
125
+ return i.data;
126
+ });
127
+ }
128
+ handleResponse(s, e) {
129
+ return n(this, null, function* () {
130
+ try {
131
+ const t = yield s;
132
+ return this.handleAppError(t.data, e).data;
133
+ } catch (t) {
134
+ throw this.handleError(t);
135
+ }
136
+ });
137
+ }
138
+ handleAppError(s, e) {
139
+ var t;
140
+ if (s.code < 200 || s.code >= 300)
141
+ throw (t = this.errorHandler) != null && t.onAppStatusError ? this.errorHandler.onAppStatusError(s.code, E(s.code, s.message), e) : console.error("未处理应用错误:", s), {
142
+ isAxiosError: !1,
143
+ message: s.message
144
+ };
145
+ return s;
146
+ }
147
+ // https://github.com/axios/axios#handling-errors
148
+ handleError(s) {
149
+ var e, t;
150
+ return s.response ? (console.log(s.response.data), console.log(s.response.status), console.log(s.response.headers), (e = this.errorHandler) != null && e.onHttpStatusError && (console.log("HTTP 错误", this.errorHandler), this.errorHandler.onHttpStatusError(s.response.status, "", s.response))) : s.request ? (console.log(s.request), (t = this.errorHandler) != null && t.onNetworkError && this.errorHandler.onNetworkError()) : console.error("axios request config error:", s), new Error(s.message);
151
+ }
152
+ }
153
+ const f = (o) => o >= 10002 && o <= 10012, E = (o, s) => f(o) ? "数据操作错误" : s || "未知接口错误";
154
+ export {
155
+ R as BaseApi,
156
+ f as needPrettifyMsg,
157
+ E as prettifyMsg
158
+ };
@@ -0,0 +1,91 @@
1
+ var s = (i, t, e) => new Promise((c, n) => {
2
+ var u = (r) => {
3
+ try {
4
+ o(e.next(r));
5
+ } catch (a) {
6
+ n(a);
7
+ }
8
+ }, k = (r) => {
9
+ try {
10
+ o(e.throw(r));
11
+ } catch (a) {
12
+ n(a);
13
+ }
14
+ }, o = (r) => r.done ? c(r.value) : Promise.resolve(r.value).then(u, k);
15
+ o((e = e.apply(i, t)).next());
16
+ });
17
+ import l from "axios";
18
+ import { BaseApi as p } from "../base/index.mjs";
19
+ class y extends p {
20
+ constructor(t, e) {
21
+ super(t != null ? t : l.create(), e);
22
+ }
23
+ listTasks(t) {
24
+ return s(this, null, function* () {
25
+ return this.get("/tasks", t);
26
+ });
27
+ }
28
+ createTask(t) {
29
+ return s(this, null, function* () {
30
+ return this.post("/tasks", t);
31
+ });
32
+ }
33
+ getTask(t) {
34
+ return s(this, null, function* () {
35
+ return this.get(`/tasks/${t}`);
36
+ });
37
+ }
38
+ updateTask(t, e) {
39
+ return s(this, null, function* () {
40
+ return this.patch(`/tasks/${t}`, e);
41
+ });
42
+ }
43
+ deleteTask(t) {
44
+ return s(this, null, function* () {
45
+ return this.delete(`/tasks/${t}`);
46
+ });
47
+ }
48
+ listTaskFiles(t) {
49
+ return s(this, null, function* () {
50
+ return this.get(`/tasks/${t}/files`);
51
+ });
52
+ }
53
+ uploadTaskFile(t, e) {
54
+ return s(this, null, function* () {
55
+ return this.post(`/tasks/${t}/files`, e);
56
+ });
57
+ }
58
+ listWorkflowExecutions(t) {
59
+ return s(this, null, function* () {
60
+ return this.get("/workflows/executions", t);
61
+ });
62
+ }
63
+ getWorkflowExecution(t) {
64
+ return s(this, null, function* () {
65
+ return this.get(`/workflows/executions/${t}`);
66
+ });
67
+ }
68
+ startWorkflowExecution(t) {
69
+ return s(this, null, function* () {
70
+ return this.post("/workflows/executions", t);
71
+ });
72
+ }
73
+ updateWorkflowExecution(t, e) {
74
+ return s(this, null, function* () {
75
+ return this.patch(`/workflows/executions/${t}`, e);
76
+ });
77
+ }
78
+ cancelWorkflowExecution(t) {
79
+ return s(this, null, function* () {
80
+ return this.post(`/workflows/executions/${t}/cancel`, {});
81
+ });
82
+ }
83
+ getUploadTicket(t) {
84
+ return s(this, null, function* () {
85
+ return this.get("/upload/ticket", t);
86
+ });
87
+ }
88
+ }
89
+ export {
90
+ y as ContralyzeApi
91
+ };
@@ -0,0 +1,431 @@
1
+ var s = (l, e, t) => new Promise((n, i) => {
2
+ var r = (o) => {
3
+ try {
4
+ p(t.next(o));
5
+ } catch (a) {
6
+ i(a);
7
+ }
8
+ }, c = (o) => {
9
+ try {
10
+ p(t.throw(o));
11
+ } catch (a) {
12
+ i(a);
13
+ }
14
+ }, p = (o) => o.done ? n(o.value) : Promise.resolve(o.value).then(r, c);
15
+ p((t = t.apply(l, e)).next());
16
+ });
17
+ import d from "axios";
18
+ import { BaseApi as g } from "../base/index.mjs";
19
+ import { initMinio as h, putObjectBuffer as u } from "@glodon-aiot/minio";
20
+ class m extends g {
21
+ constructor(e, t) {
22
+ super(e != null ? e : d.create(), t);
23
+ }
24
+ getKnowledge(e, t) {
25
+ return s(this, null, function* () {
26
+ return this.get("/knowledge", {
27
+ docId: e,
28
+ name: t
29
+ });
30
+ });
31
+ }
32
+ postKnowledge(e) {
33
+ return s(this, null, function* () {
34
+ return this.post("/knowledge", e);
35
+ });
36
+ }
37
+ getKnowledgeId(e) {
38
+ return s(this, null, function* () {
39
+ return this.get(`/knowledge/${e}`);
40
+ });
41
+ }
42
+ patchKnowledgeId(e, t) {
43
+ return s(this, null, function* () {
44
+ return this.patch(`/knowledge/${e}`, t);
45
+ });
46
+ }
47
+ delKnowledgeId(e) {
48
+ return s(this, null, function* () {
49
+ return this.delete(`/knowledge/${e}`);
50
+ });
51
+ }
52
+ getKnowledgeIdFile(e) {
53
+ return s(this, null, function* () {
54
+ return this.get(`/knowledge/${e}/file`);
55
+ });
56
+ }
57
+ getKnowledgeIdFileList(e, t) {
58
+ return s(this, null, function* () {
59
+ return this.listPaged(`/knowledge/${e}/file`, t);
60
+ });
61
+ }
62
+ postKnowledgeIdFile(e, t) {
63
+ return s(this, null, function* () {
64
+ return this.post(`/knowledge/${e}/file`, t);
65
+ });
66
+ }
67
+ getUploadTicket(e) {
68
+ return s(this, null, function* () {
69
+ return this.get("/upload/ticket", e);
70
+ });
71
+ }
72
+ delKnowledgeIdFileFid(e, t) {
73
+ return s(this, null, function* () {
74
+ return this.delete(`/knowledge/${e}/file/${t}`);
75
+ });
76
+ }
77
+ patchKnowledgeIdFileFid(e, t, n) {
78
+ return s(this, null, function* () {
79
+ return this.patch(`/knowledge/${e}/file/${t}`, n);
80
+ });
81
+ }
82
+ listSessions(e, t) {
83
+ return s(this, null, function* () {
84
+ return this.get(`/application/${e}/sessionsa`, t);
85
+ });
86
+ }
87
+ postSession(e, t) {
88
+ return s(this, null, function* () {
89
+ return this.post(`/application/${e}/sessions`, t);
90
+ });
91
+ }
92
+ getSession(e, t) {
93
+ return s(this, null, function* () {
94
+ return this.get(`/application/${e}/sessions/${t}`);
95
+ });
96
+ }
97
+ patchSessionsId(e, t, n) {
98
+ return s(this, null, function* () {
99
+ return this.patch(`/application/${e}/sessions/${t}`, n);
100
+ });
101
+ }
102
+ delSessionsId(e, t) {
103
+ return s(this, null, function* () {
104
+ return this.delete(`/application/${e}/sessions/${t}`);
105
+ });
106
+ }
107
+ getSessionKnowledgeFile(e, t, n) {
108
+ return s(this, null, function* () {
109
+ return this.get(`/application/${e}session/${t}/file/${n}`);
110
+ });
111
+ }
112
+ postSessionKnowledgeFile(e, t, n) {
113
+ return s(this, null, function* () {
114
+ return this.post(`/application/${e}session/${t}/file`, n);
115
+ });
116
+ }
117
+ postComments(e) {
118
+ return s(this, null, function* () {
119
+ return this.post("/comments", e);
120
+ });
121
+ }
122
+ /**
123
+ * 查询会话记录
124
+ * 规则:
125
+ * 1. startTime + pageSize:向后查询
126
+ * 2. startTime + pageSize:向前查询
127
+ * 3. startTIme + endTime :查询区间(忽略pageSize)
128
+ * 4. pageSize 必须是偶数,问答必须一同查询。不严谨,但前端没有办法😭
129
+ * 5. 这里的time对应的是对话记录里的messageTime字段,该字段只精确到秒,并不严谨,导致规则4的出现
130
+ **/
131
+ getChatHistorySessionId(e, t, n) {
132
+ return s(this, null, function* () {
133
+ return this.get(`application/${e}/chatHistory/${t}`, n);
134
+ });
135
+ }
136
+ postChatHistorySessionId(e, t) {
137
+ return s(this, null, function* () {
138
+ return this.post(`/chatHistory/${e}`, t);
139
+ });
140
+ }
141
+ getApplications(e) {
142
+ return s(this, null, function* () {
143
+ return this.get("/applications", e);
144
+ });
145
+ }
146
+ postApplication(e) {
147
+ return s(this, null, function* () {
148
+ return this.post("/applications", e);
149
+ });
150
+ }
151
+ getApplicationId(e) {
152
+ return s(this, null, function* () {
153
+ return this.get(`/applications/${e}`);
154
+ });
155
+ }
156
+ patchApplicationId(e, t) {
157
+ return s(this, null, function* () {
158
+ return this.patch(`/applications/${e}`, t);
159
+ });
160
+ }
161
+ delApplicationId(e) {
162
+ return s(this, null, function* () {
163
+ return this.delete(`/applications/${e}`);
164
+ });
165
+ }
166
+ getApplicationIdSessions(e) {
167
+ return s(this, null, function* () {
168
+ return this.get(`/applications/${e}/session`);
169
+ });
170
+ }
171
+ patchFileId(e, t) {
172
+ return s(this, null, function* () {
173
+ return this.patch(`/file/${e}`, t);
174
+ });
175
+ }
176
+ getCvforceResource(e) {
177
+ return s(this, null, function* () {
178
+ return this.get("/cvforce/resource", e);
179
+ });
180
+ }
181
+ postKnowledgeIdComposedFiles(e, t) {
182
+ return s(this, null, function* () {
183
+ return this.post(`/knowledge/${e}/composedFiles`, t);
184
+ });
185
+ }
186
+ getTokensApplicationId(e, t) {
187
+ return s(this, null, function* () {
188
+ return this.get(`/tokens/${e}`, t);
189
+ });
190
+ }
191
+ getTokens(e) {
192
+ return s(this, null, function* () {
193
+ return this.get("/tokens", e);
194
+ });
195
+ }
196
+ uploadMinioFile(e, t) {
197
+ return s(this, null, function* () {
198
+ return new Promise((n, i) => {
199
+ const r = new FileReader();
200
+ r.readAsArrayBuffer(t), r.onload = (c) => {
201
+ h({
202
+ endPoint: e.endpoints[0],
203
+ useSSL: e.useSSL,
204
+ accessKey: e.accessKey,
205
+ secretKey: e.secretKey
206
+ });
207
+ const p = Buffer.from(c.target.result), o = {
208
+ "Content-Type": "application/octet-stream"
209
+ };
210
+ u(e.bucket, e.fileKeys[0], p, o, (a) => {
211
+ if (a)
212
+ throw console.error(a), Error(a);
213
+ n(e.fileKeys[0]);
214
+ });
215
+ };
216
+ });
217
+ });
218
+ }
219
+ uploadFile(e, t) {
220
+ return s(this, null, function* () {
221
+ const n = {
222
+ files: [t.name],
223
+ isv: "minio",
224
+ knowledgeId: e
225
+ };
226
+ return this.getUploadTicket(n).then((i) => this.uploadMinioFile(i.minio, t)).catch((i) => {
227
+ throw Error(i);
228
+ });
229
+ });
230
+ }
231
+ uploadFiles(e, t) {
232
+ return s(this, null, function* () {
233
+ const n = {
234
+ files: t.map((i) => i.name),
235
+ isv: "minio",
236
+ knowledgeId: e
237
+ };
238
+ return this.getUploadTicket(n).then((i) => Promise.all(t.map((r) => this.uploadMinioFile(i.minio, r)))).catch((i) => {
239
+ throw Error(i);
240
+ });
241
+ });
242
+ }
243
+ getAecModels() {
244
+ return s(this, null, function* () {
245
+ return this.get("/aecModels");
246
+ });
247
+ }
248
+ postTextFilter(e) {
249
+ return s(this, null, function* () {
250
+ return this.post("/textFilter", e);
251
+ });
252
+ }
253
+ getTenantModel() {
254
+ return s(this, null, function* () {
255
+ return this.get("/tenantModel");
256
+ });
257
+ }
258
+ // 获取prompt变量列表
259
+ getPrompts(e, t) {
260
+ return s(this, null, function* () {
261
+ return this.get(`application/${e}/promptVariables`, t);
262
+ });
263
+ }
264
+ // 新增prompt
265
+ postPrompt(e, t) {
266
+ return s(this, null, function* () {
267
+ return this.post(`application/${e}/promptVariables`, t);
268
+ });
269
+ }
270
+ // 修改单个prompt
271
+ patchPromptId(e, t, n) {
272
+ return s(this, null, function* () {
273
+ return this.patch(`application/${e}/promptVariables/${t}`, n);
274
+ });
275
+ }
276
+ // 删除单个prompt
277
+ delPromptId(e, t) {
278
+ return s(this, null, function* () {
279
+ return this.delete(`application/${e}/promptVariables/${t}`);
280
+ });
281
+ }
282
+ // 获取session下的prompt变量列表
283
+ getSessionPrompts(e) {
284
+ return s(this, null, function* () {
285
+ return this.get(`session/${e}/promptVariables`);
286
+ });
287
+ }
288
+ // 修改session单个prompt
289
+ patchSessionPromptId(e, t, n) {
290
+ return s(this, null, function* () {
291
+ return this.patch(`session/${t}/promptVariables/${e}`, n);
292
+ });
293
+ }
294
+ getApplicationIdSessionIdPromptVariables(e, t) {
295
+ return s(this, null, function* () {
296
+ return this.get(`/application/${e}/session/${t}/promptVariables`);
297
+ });
298
+ }
299
+ patchApplicationIdSessionpromptVariablesId(e, t, n, i) {
300
+ return s(this, null, function* () {
301
+ return this.patch(`/application/${e}/session/${t}/promptVariables/${n}`, i);
302
+ });
303
+ }
304
+ // 查询预置应用
305
+ getPresetApplication(e) {
306
+ return s(this, null, function* () {
307
+ return this.get("presetApplication", e);
308
+ });
309
+ }
310
+ // 新建知识库配置
311
+ postKnowledgeConfig(e) {
312
+ return s(this, null, function* () {
313
+ return this.post("/knowledgeConfig", e);
314
+ });
315
+ }
316
+ // 获取知识库配置
317
+ getKnowledgeConfig(e) {
318
+ return s(this, null, function* () {
319
+ return this.get(`/knowledgeConfig/${e}`);
320
+ });
321
+ }
322
+ // 编辑知识库配置
323
+ patchKnowledgeConfig(e, t) {
324
+ return s(this, null, function* () {
325
+ return this.patch(`/knowledgeConfig/${e}`, t);
326
+ });
327
+ }
328
+ getKnowledgeIdFileId(e, t) {
329
+ return s(this, null, function* () {
330
+ return this.get(`/knowledge/${e}/file/${t}`);
331
+ });
332
+ }
333
+ getKnowledgeIdFileIdData(e, t, n) {
334
+ return s(this, null, function* () {
335
+ return this.listPaged(`/knowledge/${e}/file/${t}/data`, n);
336
+ });
337
+ }
338
+ postKnowledgeIdFileIdData(e, t, n) {
339
+ return s(this, null, function* () {
340
+ return this.post(`/knowledge/${e}/file/${t}/data`, {
341
+ data: n
342
+ });
343
+ });
344
+ }
345
+ patchKnowledgeIdFileIdData(e, t, n, i) {
346
+ return s(this, null, function* () {
347
+ return this.patch(`/knowledge/${e}/file/${t}/data/${n}`, {
348
+ data: i
349
+ });
350
+ });
351
+ }
352
+ delKnowledgeIdFileIdDataDid(e, t, n) {
353
+ return s(this, null, function* () {
354
+ return this.delete(`/knowledge/${e}/file/${t}/data/${n}`);
355
+ });
356
+ }
357
+ // 获取预置知识库
358
+ getPresetKnowledge(e) {
359
+ return s(this, null, function* () {
360
+ return this.get("/presetKnowledge", e);
361
+ });
362
+ }
363
+ patchSessionsIdContext(e) {
364
+ return s(this, null, function* () {
365
+ return this.patch(`/sessions/${e}/context`, {});
366
+ });
367
+ }
368
+ postResourceToken(e) {
369
+ return s(this, null, function* () {
370
+ return this.post("/resourceToken", e);
371
+ });
372
+ }
373
+ // 应用嵌入接口
374
+ getApplicationIdSession(e) {
375
+ return s(this, null, function* () {
376
+ return this.get(`/application/${e}/session`);
377
+ });
378
+ }
379
+ patchApplicationIdSessionsIdContext(e, t) {
380
+ return s(this, null, function* () {
381
+ return this.patch(`/application/${e}/sessions/${t}/context`, {});
382
+ });
383
+ }
384
+ postApplicationIdSessions(e, t) {
385
+ return s(this, null, function* () {
386
+ return this.post(`/application/${e}/sessions`, t);
387
+ });
388
+ }
389
+ getApplicationIdChatHistorySessionId(e, t) {
390
+ return s(this, null, function* () {
391
+ return this.get(`/application/${e}/chatHistory/${t}`);
392
+ });
393
+ }
394
+ postApplicationIdChatHistorySessionIdComments(e, t, n) {
395
+ return s(this, null, function* () {
396
+ return this.post(`/application/${e}/sessions/${t}/comments`, n);
397
+ });
398
+ }
399
+ getApplicationIdPrompts(e, t) {
400
+ return s(this, null, function* () {
401
+ return this.get(`/application/${e}/promptVariables`, t);
402
+ });
403
+ }
404
+ // 上传知识库内文件的知识引用源文件
405
+ postKnowledgeSourceFile(e, t, n) {
406
+ return s(this, null, function* () {
407
+ return this.post(`/knowledge/${e}/sourceFile/${t}`, n);
408
+ });
409
+ }
410
+ //元数据接口
411
+ getMetadata(e) {
412
+ return s(this, null, function* () {
413
+ return this.get("/metadata", e);
414
+ });
415
+ }
416
+ postGeneques(e) {
417
+ return s(this, null, function* () {
418
+ return this.post("/geneques", e);
419
+ });
420
+ }
421
+ getBaseModel(e) {
422
+ return s(this, null, function* () {
423
+ return this.get("/baseModelInfo", {
424
+ serviceId: e
425
+ });
426
+ });
427
+ }
428
+ }
429
+ export {
430
+ m as CVForceApi
431
+ };
@@ -0,0 +1,12 @@
1
+ var v = /* @__PURE__ */ ((r) => (r[r.Dialog = 0] = "Dialog", r[r.TextGenerate = 1] = "TextGenerate", r[r.FileSummery = 2] = "FileSummery", r))(v || {}), n = /* @__PURE__ */ ((r) => (r[r.Robot = 1] = "Robot", r[r.User = 2] = "User", r[r.System = 3] = "System", r))(n || {}), D = /* @__PURE__ */ ((r) => (r[r.Processing = 1] = "Processing", r[r.Done = 2] = "Done", r[r.Failed = 3] = "Failed", r))(D || {}), m = /* @__PURE__ */ ((r) => (r[r.File = 0] = "File", r[r.WebLink = 1] = "WebLink", r))(m || {}), x = /* @__PURE__ */ ((r) => (r[r.Processing = 1] = "Processing", r[r.Success = 2] = "Success", r[r.Failed = 3] = "Failed", r))(x || {}), b = /* @__PURE__ */ ((r) => (r.InputFile = "ui.input.file", r.LLMModel = "ui.llm.model", r))(b || {}), L = /* @__PURE__ */ ((r) => (r[r.Idle = 0] = "Idle", r[r.Quoted = 1] = "Quoted", r))(L || {}), u = /* @__PURE__ */ ((r) => (r[r.Basic = 0] = "Basic", r[r.Pro = 1] = "Pro", r))(u || {}), k = /* @__PURE__ */ ((r) => (r[r.Dialog = 0] = "Dialog", r[r.Text = 1] = "Text", r[r.Agent = 2] = "Agent", r[r.All = 3] = "All", r))(k || {});
2
+ export {
3
+ k as ApplicationTypes,
4
+ b as ArchiGptUIKeys,
5
+ n as ChatMessageRole,
6
+ v as ChatMode,
7
+ D as FileProccessStatus,
8
+ x as KnowledgeFileStatus,
9
+ u as KnowledgeType,
10
+ L as PromptStatus,
11
+ m as SourceType
12
+ };