@metad/contracts 3.6.7 → 3.7.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.
Files changed (291) hide show
  1. package/README.md +2 -2
  2. package/index.cjs.d.ts +1 -0
  3. package/index.cjs.js +4029 -5
  4. package/index.esm.d.ts +1 -0
  5. package/index.esm.js +3909 -0
  6. package/package.json +1 -1
  7. package/src/agent/{ai-model.ts → ai-model.d.ts} +2 -2
  8. package/src/agent/graph.d.ts +151 -0
  9. package/src/agent/index.d.ts +5 -0
  10. package/src/agent/token.d.ts +21 -0
  11. package/src/agent/utils.d.ts +19 -0
  12. package/src/agent/variables.d.ts +16 -0
  13. package/src/ai/ai-model.model.d.ts +198 -0
  14. package/src/ai/ai-provider.model.d.ts +43 -0
  15. package/src/ai/ai.model.d.ts +82 -0
  16. package/src/ai/chat-message-feedback.model.d.ts +24 -0
  17. package/src/ai/chat-message.model.d.ts +222 -0
  18. package/src/ai/chat.model.d.ts +189 -0
  19. package/src/ai/copilot-checkpoint.model.d.ts +23 -0
  20. package/src/ai/copilot-example.model.d.ts +19 -0
  21. package/src/ai/copilot-model.model.d.ts +26 -0
  22. package/src/ai/copilot-organization.model.d.ts +17 -0
  23. package/src/ai/copilot-provider.model.d.ts +31 -0
  24. package/src/ai/copilot-role.model.d.ts +43 -0
  25. package/src/ai/copilot-store.model.d.ts +29 -0
  26. package/src/ai/copilot-user.model.d.ts +20 -0
  27. package/src/ai/copilot.model.d.ts +36 -0
  28. package/src/ai/{environment.model.ts → environment.model.d.ts} +10 -12
  29. package/src/ai/feature.model.d.ts +6 -0
  30. package/src/ai/index.d.ts +42 -0
  31. package/src/ai/knowledge-doc-chunk.model.d.ts +61 -0
  32. package/src/ai/knowledge-doc-page.model.d.ts +15 -0
  33. package/src/ai/knowledge-doc.model.d.ts +222 -0
  34. package/src/ai/knowledge-pipeline.d.ts +107 -0
  35. package/src/ai/knowledge-retrieval-log.model.d.ts +10 -0
  36. package/src/ai/knowledgebase-task.model.d.ts +39 -0
  37. package/src/ai/knowledgebase.model.d.ts +174 -0
  38. package/src/ai/middleware.model.d.ts +18 -0
  39. package/src/ai/rag-web.d.ts +26 -0
  40. package/src/ai/rag.d.ts +24 -0
  41. package/src/ai/role-permissions.d.ts +13 -0
  42. package/src/ai/skill.model.d.ts +181 -0
  43. package/src/ai/types.d.ts +71 -0
  44. package/src/ai/xpert-agent-execution.model.d.ts +96 -0
  45. package/src/ai/xpert-agent.model.d.ts +204 -0
  46. package/src/ai/xpert-project.model.d.ts +86 -0
  47. package/src/ai/xpert-table.model.d.ts +84 -0
  48. package/src/ai/xpert-task.model.d.ts +26 -0
  49. package/src/ai/xpert-template.model.d.ts +47 -0
  50. package/src/ai/xpert-tool-mcp.model.d.ts +72 -0
  51. package/src/ai/xpert-tool.model.d.ts +154 -0
  52. package/src/ai/xpert-toolset.model.d.ts +200 -0
  53. package/src/ai/xpert-workflow-task.prompt.d.ts +2 -0
  54. package/src/ai/xpert-workflow.model.d.ts +401 -0
  55. package/src/ai/xpert-workspace.model.d.ts +32 -0
  56. package/src/ai/xpert.model.d.ts +551 -0
  57. package/src/ai/xpert.utils.d.ts +77 -0
  58. package/src/analytics/ai.d.ts +73 -0
  59. package/src/analytics/approval-policy.model.d.ts +30 -0
  60. package/src/analytics/business-area-user.model.d.ts +35 -0
  61. package/src/analytics/business-area.d.ts +17 -0
  62. package/src/analytics/certification.model.d.ts +11 -0
  63. package/src/analytics/chatbi-conversation.model.d.ts +15 -0
  64. package/src/analytics/chatbi-model.model.d.ts +18 -0
  65. package/src/analytics/collection.model.d.ts +6 -0
  66. package/src/analytics/comment.model.d.ts +10 -0
  67. package/src/analytics/data-source-type.d.ts +16 -0
  68. package/src/analytics/data-source.d.ts +62 -0
  69. package/src/analytics/favorite.d.ts +14 -0
  70. package/src/analytics/features.d.ts +19 -0
  71. package/src/analytics/feed-model.d.ts +13 -0
  72. package/src/analytics/gateway.d.ts +28 -0
  73. package/src/analytics/index.d.ts +38 -0
  74. package/src/analytics/indicator-app.d.ts +44 -0
  75. package/src/analytics/{indicator-market.ts → indicator-market.d.ts} +2 -6
  76. package/src/analytics/indicator.d.ts +105 -0
  77. package/src/analytics/model-query-log.model.d.ts +41 -0
  78. package/src/analytics/model-query.d.ts +21 -0
  79. package/src/analytics/{notification-destination.ts → notification-destination.d.ts} +5 -9
  80. package/src/analytics/{permission-approval-user.model.ts → permission-approval-user.model.d.ts} +8 -10
  81. package/src/analytics/permission-approval.model.d.ts +47 -0
  82. package/src/analytics/project.model.d.ts +50 -0
  83. package/src/analytics/role-permissions.d.ts +25 -0
  84. package/src/analytics/schema.d.ts +262 -0
  85. package/src/analytics/screenshot.model.d.ts +25 -0
  86. package/src/analytics/semantic-model-entity.d.ts +38 -0
  87. package/src/analytics/semantic-model-member.d.ts +27 -0
  88. package/src/analytics/semantic-model.d.ts +183 -0
  89. package/src/analytics/{story-point.ts → story-point.d.ts} +6 -11
  90. package/src/analytics/story-template.model.d.ts +28 -0
  91. package/src/analytics/story-widget.d.ts +12 -0
  92. package/src/analytics/story.d.ts +93 -0
  93. package/src/analytics/subscription.d.ts +38 -0
  94. package/src/analytics/visit.model.d.ts +34 -0
  95. package/src/analytics/webSocket.d.ts +48 -0
  96. package/src/api-key.model.d.ts +10 -0
  97. package/src/base-entity.model.d.ts +27 -0
  98. package/src/contact.model.d.ts +41 -0
  99. package/src/core.model.d.ts +97 -0
  100. package/src/{country.model.ts → country.model.d.ts} +2 -3
  101. package/src/currency.model.d.ts +579 -0
  102. package/src/{custom-smtp.model.ts → custom-smtp.model.d.ts} +17 -21
  103. package/src/date-picker.model.d.ts +5 -0
  104. package/src/email-template.model.d.ts +39 -0
  105. package/src/email.model.d.ts +36 -0
  106. package/src/employee.model.d.ts +128 -0
  107. package/src/entity-with-members.model.d.ts +13 -0
  108. package/src/feature.model.d.ts +93 -0
  109. package/src/file-provider.d.ts +33 -0
  110. package/src/help-center-article.model.d.ts +0 -0
  111. package/src/help-center.model.d.ts +0 -0
  112. package/src/http-status.enum.d.ts +57 -0
  113. package/src/import-export.model.d.ts +36 -0
  114. package/src/index.d.ts +48 -0
  115. package/src/integration/dify.d.ts +0 -0
  116. package/src/integration/dingtalk.d.ts +2 -0
  117. package/src/integration/fastgpt.d.ts +0 -0
  118. package/src/integration/firecrawl.d.ts +2 -0
  119. package/src/integration/github.d.ts +69 -0
  120. package/src/integration/index.d.ts +4 -0
  121. package/src/integration/lark.d.ts +11 -0
  122. package/src/integration/wecom.d.ts +2 -0
  123. package/src/integration.model.d.ts +90 -0
  124. package/src/invite.model.d.ts +123 -0
  125. package/src/language.model.d.ts +19 -0
  126. package/src/organization-contact.model.d.ts +73 -0
  127. package/src/{organization-department.model.ts → organization-department.model.d.ts} +10 -16
  128. package/src/organization-language.model.d.ts +18 -0
  129. package/src/organization-projects.model.d.ts +80 -0
  130. package/src/organization-team-employee-model.d.ts +12 -0
  131. package/src/organization-team-model.d.ts +19 -0
  132. package/src/organization.model.d.ts +239 -0
  133. package/src/{password-reset.model.ts → password-reset.model.d.ts} +10 -14
  134. package/src/{plain-object.model.ts → plain-object.model.d.ts} +1 -1
  135. package/src/plugin.d.ts +13 -0
  136. package/src/role-permission.model.d.ts +61 -0
  137. package/src/role.model.d.ts +26 -0
  138. package/src/schedule.d.ts +27 -0
  139. package/src/secret-token.model.d.ts +11 -0
  140. package/src/seed.model.d.ts +37 -0
  141. package/src/storage-file.model.d.ts +40 -0
  142. package/src/tag-entity.model.d.ts +20 -0
  143. package/src/tenant.model.d.ts +40 -0
  144. package/src/tools/index.d.ts +1 -0
  145. package/src/tools/sandbox.d.ts +5 -0
  146. package/src/translation.model.d.ts +26 -0
  147. package/src/types.d.ts +245 -0
  148. package/src/user-organization.model.d.ts +24 -0
  149. package/src/user.model.d.ts +131 -0
  150. package/src/visibility.model.d.ts +6 -0
  151. package/.babelrc +0 -5
  152. package/.eslintrc.json +0 -18
  153. package/babel.config.json +0 -1
  154. package/jest.config.ts +0 -16
  155. package/project.json +0 -53
  156. package/src/agent/graph.ts +0 -275
  157. package/src/agent/index.ts +0 -5
  158. package/src/agent/token.ts +0 -23
  159. package/src/agent/utils.spec.ts +0 -283
  160. package/src/agent/utils.ts +0 -122
  161. package/src/agent/variables.ts +0 -66
  162. package/src/ai/ai-model.model.ts +0 -232
  163. package/src/ai/ai-provider.model.ts +0 -53
  164. package/src/ai/ai.model.ts +0 -87
  165. package/src/ai/chat-message-feedback.model.ts +0 -31
  166. package/src/ai/chat-message.model.ts +0 -277
  167. package/src/ai/chat.model.ts +0 -207
  168. package/src/ai/copilot-checkpoint.model.ts +0 -25
  169. package/src/ai/copilot-example.model.ts +0 -23
  170. package/src/ai/copilot-model.model.ts +0 -31
  171. package/src/ai/copilot-organization.model.ts +0 -21
  172. package/src/ai/copilot-provider.model.ts +0 -46
  173. package/src/ai/copilot-role.model.ts +0 -48
  174. package/src/ai/copilot-store.model.ts +0 -34
  175. package/src/ai/copilot-user.model.ts +0 -24
  176. package/src/ai/copilot.model.ts +0 -47
  177. package/src/ai/feature.model.ts +0 -6
  178. package/src/ai/index.ts +0 -40
  179. package/src/ai/knowledge-doc-chunk.model.ts +0 -123
  180. package/src/ai/knowledge-doc-chunk.spec.ts +0 -47
  181. package/src/ai/knowledge-doc-page.model.ts +0 -20
  182. package/src/ai/knowledge-doc.model.ts +0 -364
  183. package/src/ai/knowledge-pipeline.ts +0 -138
  184. package/src/ai/knowledge-retrieval-log.model.ts +0 -19
  185. package/src/ai/knowledgebase-task.model.ts +0 -46
  186. package/src/ai/knowledgebase.model.ts +0 -205
  187. package/src/ai/rag-web.ts +0 -54
  188. package/src/ai/rag.ts +0 -24
  189. package/src/ai/role-permissions.ts +0 -13
  190. package/src/ai/types.ts +0 -83
  191. package/src/ai/xpert-agent-execution.model.ts +0 -115
  192. package/src/ai/xpert-agent.model.ts +0 -264
  193. package/src/ai/xpert-project.model.ts +0 -103
  194. package/src/ai/xpert-table.model.ts +0 -100
  195. package/src/ai/xpert-task.model.ts +0 -32
  196. package/src/ai/xpert-template.model.ts +0 -53
  197. package/src/ai/xpert-tool-mcp.model.ts +0 -77
  198. package/src/ai/xpert-tool.model.ts +0 -216
  199. package/src/ai/xpert-toolset.model.ts +0 -220
  200. package/src/ai/xpert-workflow-task.prompt.ts +0 -71
  201. package/src/ai/xpert-workflow.model.ts +0 -502
  202. package/src/ai/xpert-workspace.model.ts +0 -42
  203. package/src/ai/xpert.model.ts +0 -637
  204. package/src/ai/xpert.utils.ts +0 -214
  205. package/src/analytics/ai.ts +0 -79
  206. package/src/analytics/approval-policy.model.ts +0 -40
  207. package/src/analytics/business-area-user.model.ts +0 -43
  208. package/src/analytics/business-area.ts +0 -20
  209. package/src/analytics/certification.model.ts +0 -12
  210. package/src/analytics/chatbi-conversation.model.ts +0 -16
  211. package/src/analytics/chatbi-model.model.ts +0 -22
  212. package/src/analytics/collection.model.ts +0 -8
  213. package/src/analytics/comment.model.ts +0 -14
  214. package/src/analytics/data-source-type.ts +0 -19
  215. package/src/analytics/data-source.ts +0 -72
  216. package/src/analytics/favorite.ts +0 -18
  217. package/src/analytics/features.ts +0 -19
  218. package/src/analytics/feed-model.ts +0 -15
  219. package/src/analytics/gateway.ts +0 -31
  220. package/src/analytics/index.ts +0 -39
  221. package/src/analytics/indicator-app.ts +0 -49
  222. package/src/analytics/indicator.ts +0 -143
  223. package/src/analytics/model-query-log.model.ts +0 -45
  224. package/src/analytics/model-query.ts +0 -22
  225. package/src/analytics/permission-approval.model.ts +0 -58
  226. package/src/analytics/project.model.ts +0 -56
  227. package/src/analytics/role-permissions.ts +0 -36
  228. package/src/analytics/schema.ts +0 -300
  229. package/src/analytics/screenshot.model.ts +0 -28
  230. package/src/analytics/semantic-model-entity.ts +0 -50
  231. package/src/analytics/semantic-model-member.ts +0 -49
  232. package/src/analytics/semantic-model.ts +0 -237
  233. package/src/analytics/story-template.model.ts +0 -34
  234. package/src/analytics/story-widget.ts +0 -15
  235. package/src/analytics/story.ts +0 -109
  236. package/src/analytics/subscription.ts +0 -43
  237. package/src/analytics/visit.model.ts +0 -39
  238. package/src/analytics/webSocket.ts +0 -53
  239. package/src/api-key.model.ts +0 -11
  240. package/src/base-entity.model.ts +0 -34
  241. package/src/contact.model.ts +0 -45
  242. package/src/core.model.ts +0 -103
  243. package/src/currency.model.ts +0 -582
  244. package/src/date-picker.model.ts +0 -5
  245. package/src/email-template.model.ts +0 -50
  246. package/src/email.model.ts +0 -46
  247. package/src/employee.model.ts +0 -199
  248. package/src/entity-with-members.model.ts +0 -16
  249. package/src/feature.model.ts +0 -108
  250. package/src/file-provider.ts +0 -37
  251. package/src/help-center-article.model.ts +0 -35
  252. package/src/help-center.model.ts +0 -33
  253. package/src/http-status.enum.ts +0 -58
  254. package/src/import-export.model.ts +0 -42
  255. package/src/index.ts +0 -60
  256. package/src/integration/dify.ts +0 -31
  257. package/src/integration/dingtalk.ts +0 -16
  258. package/src/integration/fastgpt.ts +0 -32
  259. package/src/integration/firecrawl.ts +0 -46
  260. package/src/integration/github.ts +0 -149
  261. package/src/integration/index.ts +0 -15
  262. package/src/integration/lark.ts +0 -79
  263. package/src/integration/wecom.ts +0 -16
  264. package/src/integration.model.ts +0 -119
  265. package/src/invite.model.ts +0 -144
  266. package/src/language.model.ts +0 -22
  267. package/src/organization-contact.model.ts +0 -84
  268. package/src/organization-language.model.ts +0 -24
  269. package/src/organization-projects.model.ts +0 -99
  270. package/src/organization-team-employee-model.ts +0 -14
  271. package/src/organization-team-model.ts +0 -25
  272. package/src/organization.model.ts +0 -266
  273. package/src/plugin.ts +0 -15
  274. package/src/role-permission.model.ts +0 -123
  275. package/src/role.model.ts +0 -31
  276. package/src/schedule.ts +0 -71
  277. package/src/secret-token.model.ts +0 -15
  278. package/src/seed.model.ts +0 -50
  279. package/src/storage-file.model.ts +0 -46
  280. package/src/tag-entity.model.ts +0 -23
  281. package/src/tenant.model.ts +0 -52
  282. package/src/tools/index.ts +0 -1
  283. package/src/tools/sandbox.ts +0 -5
  284. package/src/translation.model.ts +0 -37
  285. package/src/types.ts +0 -277
  286. package/src/user-organization.model.ts +0 -31
  287. package/src/user.model.ts +0 -151
  288. package/src/visibility.model.ts +0 -6
  289. package/tsconfig.json +0 -22
  290. package/tsconfig.lib.json +0 -10
  291. package/tsconfig.spec.json +0 -9
package/index.cjs.js CHANGED
@@ -1,6 +1,4030 @@
1
+ 'use strict';
2
+
3
+ var ShortUniqueId = require('short-unique-id');
4
+
5
+ function _array_like_to_array$5(arr, len) {
6
+ if (len == null || len > arr.length) len = arr.length;
7
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
8
+ return arr2;
9
+ }
10
+ function _array_without_holes$1(arr) {
11
+ if (Array.isArray(arr)) return _array_like_to_array$5(arr);
12
+ }
13
+ function _iterable_to_array$2(iter) {
14
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
15
+ }
16
+ function _non_iterable_spread$1() {
17
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
18
+ }
19
+ function _to_consumable_array$1(arr) {
20
+ return _array_without_holes$1(arr) || _iterable_to_array$2(arr) || _unsupported_iterable_to_array$5(arr) || _non_iterable_spread$1();
21
+ }
22
+ function _unsupported_iterable_to_array$5(o, minLen) {
23
+ if (!o) return;
24
+ if (typeof o === "string") return _array_like_to_array$5(o, minLen);
25
+ var n = Object.prototype.toString.call(o).slice(8, -1);
26
+ if (n === "Object" && o.constructor) n = o.constructor.name;
27
+ if (n === "Map" || n === "Set") return Array.from(n);
28
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$5(o, minLen);
29
+ }
30
+ var _uuidGenerator;
31
+ var uuidGenerator = new ShortUniqueId({
32
+ length: 10
33
+ });
34
+ var uuid = function() {
35
+ for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
36
+ args[_key] = arguments[_key];
37
+ }
38
+ return (_uuidGenerator = uuidGenerator).randomUUID.apply(_uuidGenerator, _to_consumable_array$1(args));
39
+ };
40
+ exports.ParameterTypeEnum = void 0;
41
+ (function(ParameterTypeEnum) {
42
+ ParameterTypeEnum["STRING"] = "string";
43
+ ParameterTypeEnum["NUMBER"] = "number";
44
+ ParameterTypeEnum["BOOLEAN"] = "boolean";
45
+ ParameterTypeEnum["ARRAY"] = "array";
46
+ ParameterTypeEnum["SELECT"] = "select";
47
+ ParameterTypeEnum["SECRET_INPUT"] = "secret-input";
48
+ ParameterTypeEnum["FILE"] = "file";
49
+ })(exports.ParameterTypeEnum || (exports.ParameterTypeEnum = {}));
50
+ function letterStartSUID(start) {
51
+ return start + uuid();
52
+ }
53
+
54
+ exports.OrderTypeEnum = void 0;
55
+ (function(OrderTypeEnum) {
56
+ OrderTypeEnum["DESC"] = "DESC";
57
+ OrderTypeEnum["ASC"] = "ASC";
58
+ })(exports.OrderTypeEnum || (exports.OrderTypeEnum = {}));
59
+
60
+ var DEFAULT_CURRENCIES = {
61
+ AFN: "Afghan Afghani",
62
+ AFA: "Afghan Afghani (1927–2002)",
63
+ ALL: "Albanian Lek",
64
+ ALK: "Albanian Lek (1946–1965)",
65
+ DZD: "Algerian Dinar",
66
+ ADP: "Andorran Peseta",
67
+ AOA: "Angolan Kwanza",
68
+ AOK: "Angolan Kwanza (1977–1991)",
69
+ AON: "Angolan New Kwanza (1990–2000)",
70
+ AOR: "Angolan Readjusted Kwanza (1995–1999)",
71
+ ARA: "Argentine Austral",
72
+ ARS: "Argentine Peso",
73
+ ARM: "Argentine Peso (1881–1970)",
74
+ ARP: "Argentine Peso (1983–1985)",
75
+ ARL: "Argentine Peso Ley (1970–1983)",
76
+ AMD: "Armenian Dram",
77
+ AWG: "Aruban Florin",
78
+ AUD: "Australian Dollar",
79
+ ATS: "Austrian Schilling",
80
+ AZN: "Azerbaijani Manat",
81
+ AZM: "Azerbaijani Manat (1993–2006)",
82
+ BSD: "Bahamian Dollar",
83
+ BHD: "Bahraini Dinar",
84
+ BDT: "Bangladeshi Taka",
85
+ BBD: "Barbadian Dollar",
86
+ BYN: "Belarusian Ruble",
87
+ BYB: "Belarusian Ruble (1994–1999)",
88
+ BYR: "Belarusian Ruble (2000–2016)",
89
+ BEF: "Belgian Franc",
90
+ BEC: "Belgian Franc (convertible)",
91
+ BEL: "Belgian Franc (financial)",
92
+ BZD: "Belize Dollar",
93
+ BMD: "Bermudan Dollar",
94
+ BTN: "Bhutanese Ngultrum",
95
+ BOB: "Bolivian Boliviano",
96
+ BOL: "Bolivian Boliviano (1863–1963)",
97
+ BOV: "Bolivian Mvdol",
98
+ BOP: "Bolivian Peso",
99
+ BAM: "Bosnia-Herzegovina Convertible Mark",
100
+ BAD: "Bosnia-Herzegovina Dinar (1992–1994)",
101
+ BAN: "Bosnia-Herzegovina New Dinar (1994–1997)",
102
+ BWP: "Botswanan Pula",
103
+ BRC: "Brazilian Cruzado (1986–1989)",
104
+ BRZ: "Brazilian Cruzeiro (1942–1967)",
105
+ BRE: "Brazilian Cruzeiro (1990–1993)",
106
+ BRR: "Brazilian Cruzeiro (1993–1994)",
107
+ BRN: "Brazilian New Cruzado (1989–1990)",
108
+ BRB: "Brazilian New Cruzeiro (1967–1986)",
109
+ BRL: "Brazilian Real",
110
+ GBP: "British Pound",
111
+ BND: "Brunei Dollar",
112
+ BGL: "Bulgarian Hard Lev",
113
+ BGN: "Bulgarian Lev",
114
+ BGO: "Bulgarian Lev (1879–1952)",
115
+ BGM: "Bulgarian Socialist Lev",
116
+ BUK: "Burmese Kyat",
117
+ BIF: "Burundian Franc",
118
+ XPF: "CFP Franc",
119
+ KHR: "Cambodian Riel",
120
+ CAD: "Canadian Dollar",
121
+ CVE: "Cape Verdean Escudo",
122
+ KYD: "Cayman Islands Dollar",
123
+ XAF: "Central African CFA Franc",
124
+ CLE: "Chilean Escudo",
125
+ CLP: "Chilean Peso",
126
+ CLF: "Chilean Unit of Account (UF)",
127
+ CNX: "Chinese People’s Bank Dollar",
128
+ CNY: "Chinese Yuan",
129
+ COP: "Colombian Peso",
130
+ COU: "Colombian Real Value Unit",
131
+ KMF: "Comorian Franc",
132
+ CDF: "Congolese Franc",
133
+ CRC: "Costa Rican Col\xf3n",
134
+ HRD: "Croatian Dinar",
135
+ HRK: "Croatian Kuna",
136
+ CUC: "Cuban Convertible Peso",
137
+ CUP: "Cuban Peso",
138
+ CYP: "Cypriot Pound",
139
+ CZK: "Czech Koruna",
140
+ CSK: "Czechoslovak Hard Koruna",
141
+ DKK: "Danish Krone",
142
+ DJF: "Djiboutian Franc",
143
+ DOP: "Dominican Peso",
144
+ NLG: "Dutch Guilder",
145
+ XCD: "East Caribbean Dollar",
146
+ DDM: "East German Mark",
147
+ ECS: "Ecuadorian Sucre",
148
+ ECV: "Ecuadorian Unit of Constant Value",
149
+ EGP: "Egyptian Pound",
150
+ GQE: "Equatorial Guinean Ekwele",
151
+ ERN: "Eritrean Nakfa",
152
+ EEK: "Estonian Kroon",
153
+ ETB: "Ethiopian Birr",
154
+ EUR: "Euro",
155
+ XEU: "European Currency Unit",
156
+ FKP: "Falkland Islands Pound",
157
+ FJD: "Fijian Dollar",
158
+ FIM: "Finnish Markka",
159
+ FRF: "French Franc",
160
+ XFO: "French Gold Franc",
161
+ XFU: "French UIC-Franc",
162
+ GMD: "Gambian Dalasi",
163
+ GEK: "Georgian Kupon Larit",
164
+ GEL: "Georgian Lari",
165
+ DEM: "German Mark",
166
+ GHS: "Ghanaian Cedi",
167
+ GHC: "Ghanaian Cedi (1979–2007)",
168
+ GIP: "Gibraltar Pound",
169
+ GRD: "Greek Drachma",
170
+ GTQ: "Guatemalan Quetzal",
171
+ GWP: "Guinea-Bissau Peso",
172
+ GNF: "Guinean Franc",
173
+ GNS: "Guinean Syli",
174
+ GYD: "Guyanaese Dollar",
175
+ HTG: "Haitian Gourde",
176
+ HNL: "Honduran Lempira",
177
+ HKD: "Hong Kong Dollar",
178
+ HUF: "Hungarian Forint",
179
+ ISK: "Icelandic Kr\xf3na",
180
+ ISJ: "Icelandic Kr\xf3na (1918–1981)",
181
+ INR: "Indian Rupee",
182
+ IDR: "Indonesian Rupiah",
183
+ IRR: "Iranian Rial",
184
+ IQD: "Iraqi Dinar",
185
+ IEP: "Irish Pound",
186
+ ILS: "Israeli New Shekel",
187
+ ILP: "Israeli Pound",
188
+ ILR: "Israeli Shekel (1980–1985)",
189
+ ITL: "Italian Lira",
190
+ JMD: "Jamaican Dollar",
191
+ JPY: "Japanese Yen",
192
+ JOD: "Jordanian Dinar",
193
+ KZT: "Kazakhstani Tenge",
194
+ KES: "Kenyan Shilling",
195
+ KWD: "Kuwaiti Dinar",
196
+ KGS: "Kyrgystani Som",
197
+ LAK: "Laotian Kip",
198
+ LVL: "Latvian Lats",
199
+ LVR: "Latvian Ruble",
200
+ LBP: "Lebanese Pound",
201
+ LSL: "Lesotho Loti",
202
+ LRD: "Liberian Dollar",
203
+ LYD: "Libyan Dinar",
204
+ LTL: "Lithuanian Litas",
205
+ LTT: "Lithuanian Talonas",
206
+ LUL: "Luxembourg Financial Franc",
207
+ LUC: "Luxembourgian Convertible Franc",
208
+ LUF: "Luxembourgian Franc",
209
+ MOP: "Macanese Pataca",
210
+ MKD: "Macedonian Denar",
211
+ MKN: "Macedonian Denar (1992–1993)",
212
+ MGA: "Malagasy Ariary",
213
+ MGF: "Malagasy Franc",
214
+ MWK: "Malawian Kwacha",
215
+ MYR: "Malaysian Ringgit",
216
+ MVR: "Maldivian Rufiyaa",
217
+ MVP: "Maldivian Rupee (1947–1981)",
218
+ MLF: "Malian Franc",
219
+ MTL: "Maltese Lira",
220
+ MTP: "Maltese Pound",
221
+ MRO: "Mauritanian Ouguiya",
222
+ MUR: "Mauritian Rupee",
223
+ MXV: "Mexican Investment Unit",
224
+ MXN: "Mexican Peso",
225
+ MXP: "Mexican Silver Peso (1861–1992)",
226
+ MDC: "Moldovan Cupon",
227
+ MDL: "Moldovan Leu",
228
+ MCF: "Monegasque Franc",
229
+ MNT: "Mongolian Tugrik",
230
+ MAD: "Moroccan Dirham",
231
+ MAF: "Moroccan Franc",
232
+ MZE: "Mozambican Escudo",
233
+ MZN: "Mozambican Metical",
234
+ MZM: "Mozambican Metical (1980–2006)",
235
+ MMK: "Myanmar Kyat",
236
+ NAD: "Namibian Dollar",
237
+ NPR: "Nepalese Rupee",
238
+ ANG: "Netherlands Antillean Guilder",
239
+ TWD: "New Taiwan Dollar",
240
+ NZD: "New Zealand Dollar",
241
+ NIO: "Nicaraguan C\xf3rdoba",
242
+ NIC: "Nicaraguan C\xf3rdoba (1988–1991)",
243
+ NGN: "Nigerian Naira",
244
+ KPW: "North Korean Won",
245
+ NOK: "Norwegian Krone",
246
+ OMR: "Omani Rial",
247
+ PKR: "Pakistani Rupee",
248
+ PAB: "Panamanian Balboa",
249
+ PGK: "Papua New Guinean Kina",
250
+ PYG: "Paraguayan Guarani",
251
+ PEI: "Peruvian Inti",
252
+ PEN: "Peruvian Sol",
253
+ PES: "Peruvian Sol (1863–1965)",
254
+ PHP: "Philippine Peso",
255
+ PLN: "Polish Zloty",
256
+ PLZ: "Polish Zloty (1950–1995)",
257
+ PTE: "Portuguese Escudo",
258
+ GWE: "Portuguese Guinea Escudo",
259
+ QAR: "Qatari Rial",
260
+ XRE: "RINET Funds",
261
+ RHD: "Rhodesian Dollar",
262
+ RON: "Romanian Leu",
263
+ ROL: "Romanian Leu (1952–2006)",
264
+ RUB: "Russian Ruble",
265
+ RUR: "Russian Ruble (1991–1998)",
266
+ RWF: "Rwandan Franc",
267
+ SVC: "Salvadoran Col\xf3n",
268
+ WST: "Samoan Tala",
269
+ SAR: "Saudi Riyal",
270
+ RSD: "Serbian Dinar",
271
+ CSD: "Serbian Dinar (2002–2006)",
272
+ SCR: "Seychellois Rupee",
273
+ SLL: "Sierra Leonean Leone",
274
+ SGD: "Singapore Dollar",
275
+ SKK: "Slovak Koruna",
276
+ SIT: "Slovenian Tolar",
277
+ SBD: "Solomon Islands Dollar",
278
+ SOS: "Somali Shilling",
279
+ ZAR: "South African Rand",
280
+ ZAL: "South African Rand (financial)",
281
+ KRH: "South Korean Hwan (1953–1962)",
282
+ KRW: "South Korean Won",
283
+ KRO: "South Korean Won (1945–1953)",
284
+ SSP: "South Sudanese Pound",
285
+ SUR: "Soviet Rouble",
286
+ ESP: "Spanish Peseta",
287
+ ESA: "Spanish Peseta (A account)",
288
+ ESB: "Spanish Peseta (convertible account)",
289
+ LKR: "Sri Lankan Rupee",
290
+ SHP: "St. Helena Pound",
291
+ SDD: "Sudanese Dinar (1992–2007)",
292
+ SDG: "Sudanese Pound",
293
+ SDP: "Sudanese Pound (1957–1998)",
294
+ SRD: "Surinamese Dollar",
295
+ SRG: "Surinamese Guilder",
296
+ SZL: "Swazi Lilangeni",
297
+ SEK: "Swedish Krona",
298
+ CHF: "Swiss Franc",
299
+ SYP: "Syrian Pound",
300
+ STD: "S\xe3o Tom\xe9 & Pr\xedncipe Dobra",
301
+ TJR: "Tajikistani Ruble",
302
+ TJS: "Tajikistani Somoni",
303
+ TZS: "Tanzanian Shilling",
304
+ THB: "Thai Baht",
305
+ TPE: "Timorese Escudo",
306
+ TOP: "Tongan Paʻanga",
307
+ TTD: "Trinidad & Tobago Dollar",
308
+ TND: "Tunisian Dinar",
309
+ TRY: "Turkish Lira",
310
+ TRL: "Turkish Lira (1922–2005)",
311
+ TMT: "Turkmenistani Manat",
312
+ TMM: "Turkmenistani Manat (1993–2009)",
313
+ USD: "US Dollar",
314
+ USN: "US Dollar (Next day)",
315
+ USS: "US Dollar (Same day)",
316
+ UGX: "Ugandan Shilling",
317
+ UGS: "Ugandan Shilling (1966–1987)",
318
+ UAH: "Ukrainian Hryvnia",
319
+ UAK: "Ukrainian Karbovanets",
320
+ AED: "United Arab Emirates Dirham",
321
+ UYU: "Uruguayan Peso",
322
+ UYP: "Uruguayan Peso (1975–1993)",
323
+ UYI: "Uruguayan Peso (Indexed Units)",
324
+ UZS: "Uzbekistani Som",
325
+ VUV: "Vanuatu Vatu",
326
+ VEF: "Venezuelan Bol\xedvar",
327
+ VEB: "Venezuelan Bol\xedvar (1871–2008)",
328
+ VND: "Vietnamese Dong",
329
+ VNN: "Vietnamese Dong (1978–1985)",
330
+ CHE: "WIR Euro",
331
+ CHW: "WIR Franc",
332
+ XOF: "West African CFA Franc",
333
+ YDD: "Yemeni Dinar",
334
+ YER: "Yemeni Rial",
335
+ YUN: "Yugoslavian Convertible Dinar (1990–1992)",
336
+ YUD: "Yugoslavian Hard Dinar (1966–1990)",
337
+ YUM: "Yugoslavian New Dinar (1994–2002)",
338
+ YUR: "Yugoslavian Reformed Dinar (1992–1993)",
339
+ ZRN: "Zairean New Zaire (1993–1998)",
340
+ ZRZ: "Zairean Zaire (1971–1993)",
341
+ ZMW: "Zambian Kwacha",
342
+ ZMK: "Zambian Kwacha (1968–2012)",
343
+ ZWD: "Zimbabwean Dollar (1980–2008)",
344
+ ZWR: "Zimbabwean Dollar (2008)",
345
+ ZWL: "Zimbabwean Dollar (2009)"
346
+ };
347
+ exports.CurrenciesEnum = void 0;
348
+ (function(CurrenciesEnum) {
349
+ CurrenciesEnum["AFN"] = "AFN";
350
+ CurrenciesEnum["AFA"] = "AFA";
351
+ CurrenciesEnum["ALL"] = "ALL";
352
+ CurrenciesEnum["ALK"] = "ALK";
353
+ CurrenciesEnum["DZD"] = "DZD";
354
+ CurrenciesEnum["ADP"] = "ADP";
355
+ CurrenciesEnum["AOA"] = "AOA";
356
+ CurrenciesEnum["AOK"] = "AOK";
357
+ CurrenciesEnum["AON"] = "AON";
358
+ CurrenciesEnum["AOR"] = "AOR";
359
+ CurrenciesEnum["ARA"] = "ARA";
360
+ CurrenciesEnum["ARS"] = "ARS";
361
+ CurrenciesEnum["ARM"] = "ARM";
362
+ CurrenciesEnum["ARP"] = "ARP";
363
+ CurrenciesEnum["ARL"] = "ARL";
364
+ CurrenciesEnum["AMD"] = "AMD";
365
+ CurrenciesEnum["AWG"] = "AWG";
366
+ CurrenciesEnum["AUD"] = "AUD";
367
+ CurrenciesEnum["ATS"] = "ATS";
368
+ CurrenciesEnum["AZN"] = "AZN";
369
+ CurrenciesEnum["AZM"] = "AZM";
370
+ CurrenciesEnum["BSD"] = "BSD";
371
+ CurrenciesEnum["BHD"] = "BHD";
372
+ CurrenciesEnum["BDT"] = "BDT";
373
+ CurrenciesEnum["BBD"] = "BBD";
374
+ CurrenciesEnum["BYN"] = "BYN";
375
+ CurrenciesEnum["BYB"] = "BYB";
376
+ CurrenciesEnum["BYR"] = "BYR";
377
+ CurrenciesEnum["BEF"] = "BEF";
378
+ CurrenciesEnum["BEC"] = "BEC";
379
+ CurrenciesEnum["BEL"] = "BEL";
380
+ CurrenciesEnum["BZD"] = "BZD";
381
+ CurrenciesEnum["BMD"] = "BMD";
382
+ CurrenciesEnum["BTN"] = "BTN";
383
+ CurrenciesEnum["BOB"] = "BOB";
384
+ CurrenciesEnum["BOL"] = "BOL";
385
+ CurrenciesEnum["BOV"] = "BOV";
386
+ CurrenciesEnum["BOP"] = "BOP";
387
+ CurrenciesEnum["BAM"] = "BAM";
388
+ CurrenciesEnum["BAD"] = "BAD";
389
+ CurrenciesEnum["BAN"] = "BAN";
390
+ CurrenciesEnum["BWP"] = "BWP";
391
+ CurrenciesEnum["BRC"] = "BRC";
392
+ CurrenciesEnum["BRZ"] = "BRZ";
393
+ CurrenciesEnum["BRE"] = "BRE";
394
+ CurrenciesEnum["BRR"] = "BRR";
395
+ CurrenciesEnum["BRN"] = "BRN";
396
+ CurrenciesEnum["BRB"] = "BRB";
397
+ CurrenciesEnum["BRL"] = "BRL";
398
+ CurrenciesEnum["GBP"] = "GBP";
399
+ CurrenciesEnum["BND"] = "BND";
400
+ CurrenciesEnum["BGL"] = "BGL";
401
+ CurrenciesEnum["BGN"] = "BGN";
402
+ CurrenciesEnum["BGO"] = "BGO";
403
+ CurrenciesEnum["BGM"] = "BGM";
404
+ CurrenciesEnum["BUK"] = "BUK";
405
+ CurrenciesEnum["BIF"] = "BIF";
406
+ CurrenciesEnum["XPF"] = "XPF";
407
+ CurrenciesEnum["KHR"] = "KHR";
408
+ CurrenciesEnum["CAD"] = "CAD";
409
+ CurrenciesEnum["CVE"] = "CVE";
410
+ CurrenciesEnum["KYD"] = "KYD";
411
+ CurrenciesEnum["XAF"] = "XAF";
412
+ CurrenciesEnum["CLE"] = "CLE";
413
+ CurrenciesEnum["CLP"] = "CLP";
414
+ CurrenciesEnum["CLF"] = "CLF";
415
+ CurrenciesEnum["CNX"] = "CNX";
416
+ CurrenciesEnum["CNY"] = "CNY";
417
+ CurrenciesEnum["COP"] = "COP";
418
+ CurrenciesEnum["COU"] = "COU";
419
+ CurrenciesEnum["KMF"] = "KMF";
420
+ CurrenciesEnum["CDF"] = "CDF";
421
+ CurrenciesEnum["CRC"] = "CRC";
422
+ CurrenciesEnum["HRD"] = "HRD";
423
+ CurrenciesEnum["HRK"] = "HRK";
424
+ CurrenciesEnum["CUC"] = "CUC";
425
+ CurrenciesEnum["CUP"] = "CUP";
426
+ CurrenciesEnum["CYP"] = "CYP";
427
+ CurrenciesEnum["CZK"] = "CZK";
428
+ CurrenciesEnum["CSK"] = "CSK";
429
+ CurrenciesEnum["DKK"] = "DKK";
430
+ CurrenciesEnum["DJF"] = "DJF";
431
+ CurrenciesEnum["DOP"] = "DOP";
432
+ CurrenciesEnum["NLG"] = "NLG";
433
+ CurrenciesEnum["XCD"] = "XCD";
434
+ CurrenciesEnum["DDM"] = "DDM";
435
+ CurrenciesEnum["ECS"] = "ECS";
436
+ CurrenciesEnum["ECV"] = "ECV";
437
+ CurrenciesEnum["EGP"] = "EGP";
438
+ CurrenciesEnum["GQE"] = "GQE";
439
+ CurrenciesEnum["ERN"] = "ERN";
440
+ CurrenciesEnum["EEK"] = "EEK";
441
+ CurrenciesEnum["ETB"] = "ETB";
442
+ CurrenciesEnum["EUR"] = "EUR";
443
+ CurrenciesEnum["XEU"] = "XEU";
444
+ CurrenciesEnum["FKP"] = "FKP";
445
+ CurrenciesEnum["FJD"] = "FJD";
446
+ CurrenciesEnum["FIM"] = "FIM";
447
+ CurrenciesEnum["FRF"] = "FRF";
448
+ CurrenciesEnum["XFO"] = "XFO";
449
+ CurrenciesEnum["XFU"] = "XFU";
450
+ CurrenciesEnum["GMD"] = "GMD";
451
+ CurrenciesEnum["GEK"] = "GEK";
452
+ CurrenciesEnum["GEL"] = "GEL";
453
+ CurrenciesEnum["DEM"] = "DEM";
454
+ CurrenciesEnum["GHS"] = "GHS";
455
+ CurrenciesEnum["GHC"] = "GHC";
456
+ CurrenciesEnum["GIP"] = "GIP";
457
+ CurrenciesEnum["GRD"] = "GRD";
458
+ CurrenciesEnum["GTQ"] = "GTQ";
459
+ CurrenciesEnum["GWP"] = "GWP";
460
+ CurrenciesEnum["GNF"] = "GNF";
461
+ CurrenciesEnum["GNS"] = "GNS";
462
+ CurrenciesEnum["GYD"] = "GYD";
463
+ CurrenciesEnum["HTG"] = "HTG";
464
+ CurrenciesEnum["HNL"] = "HNL";
465
+ CurrenciesEnum["HKD"] = "HKD";
466
+ CurrenciesEnum["HUF"] = "HUF";
467
+ CurrenciesEnum["ISK"] = "ISK";
468
+ CurrenciesEnum["ISJ"] = "ISJ";
469
+ CurrenciesEnum["INR"] = "INR";
470
+ CurrenciesEnum["IDR"] = "IDR";
471
+ CurrenciesEnum["IRR"] = "IRR";
472
+ CurrenciesEnum["IQD"] = "IQD";
473
+ CurrenciesEnum["IEP"] = "IEP";
474
+ CurrenciesEnum["ILS"] = "ILS";
475
+ CurrenciesEnum["ILP"] = "ILP";
476
+ CurrenciesEnum["ILR"] = "ILR";
477
+ CurrenciesEnum["ITL"] = "ITL";
478
+ CurrenciesEnum["JMD"] = "JMD";
479
+ CurrenciesEnum["JPY"] = "JPY";
480
+ CurrenciesEnum["JOD"] = "JOD";
481
+ CurrenciesEnum["KZT"] = "KZT";
482
+ CurrenciesEnum["KES"] = "KES";
483
+ CurrenciesEnum["KWD"] = "KWD";
484
+ CurrenciesEnum["KGS"] = "KGS";
485
+ CurrenciesEnum["LAK"] = "LAK";
486
+ CurrenciesEnum["LVL"] = "LVL";
487
+ CurrenciesEnum["LVR"] = "LVR";
488
+ CurrenciesEnum["LBP"] = "LBP";
489
+ CurrenciesEnum["LSL"] = "LSL";
490
+ CurrenciesEnum["LRD"] = "LRD";
491
+ CurrenciesEnum["LYD"] = "LYD";
492
+ CurrenciesEnum["LTL"] = "LTL";
493
+ CurrenciesEnum["LTT"] = "LTT";
494
+ CurrenciesEnum["LUL"] = "LUL";
495
+ CurrenciesEnum["LUC"] = "LUC";
496
+ CurrenciesEnum["LUF"] = "LUF";
497
+ CurrenciesEnum["MOP"] = "MOP";
498
+ CurrenciesEnum["MKD"] = "MKD";
499
+ CurrenciesEnum["MKN"] = "MKN";
500
+ CurrenciesEnum["MGA"] = "MGA";
501
+ CurrenciesEnum["MGF"] = "MGF";
502
+ CurrenciesEnum["MWK"] = "MWK";
503
+ CurrenciesEnum["MYR"] = "MYR";
504
+ CurrenciesEnum["MVR"] = "MVR";
505
+ CurrenciesEnum["MVP"] = "MVP";
506
+ CurrenciesEnum["MLF"] = "MLF";
507
+ CurrenciesEnum["MTL"] = "MTL";
508
+ CurrenciesEnum["MTP"] = "MTP";
509
+ CurrenciesEnum["MRO"] = "MRO";
510
+ CurrenciesEnum["MUR"] = "MUR";
511
+ CurrenciesEnum["MXV"] = "MXV";
512
+ CurrenciesEnum["MXN"] = "MXN";
513
+ CurrenciesEnum["MXP"] = "MXP";
514
+ CurrenciesEnum["MDC"] = "MDC";
515
+ CurrenciesEnum["MDL"] = "MDL";
516
+ CurrenciesEnum["MCF"] = "MCF";
517
+ CurrenciesEnum["MNT"] = "MNT";
518
+ CurrenciesEnum["MAD"] = "MAD";
519
+ CurrenciesEnum["MAF"] = "MAF";
520
+ CurrenciesEnum["MZE"] = "MZE";
521
+ CurrenciesEnum["MZN"] = "MZN";
522
+ CurrenciesEnum["MZM"] = "MZM";
523
+ CurrenciesEnum["MMK"] = "MMK";
524
+ CurrenciesEnum["NAD"] = "NAD";
525
+ CurrenciesEnum["NPR"] = "NPR";
526
+ CurrenciesEnum["ANG"] = "ANG";
527
+ CurrenciesEnum["TWD"] = "TWD";
528
+ CurrenciesEnum["NZD"] = "NZD";
529
+ CurrenciesEnum["NIO"] = "NIO";
530
+ CurrenciesEnum["NIC"] = "NIC";
531
+ CurrenciesEnum["NGN"] = "NGN";
532
+ CurrenciesEnum["KPW"] = "KPW";
533
+ CurrenciesEnum["NOK"] = "NOK";
534
+ CurrenciesEnum["OMR"] = "OMR";
535
+ CurrenciesEnum["PKR"] = "PKR";
536
+ CurrenciesEnum["PAB"] = "PAB";
537
+ CurrenciesEnum["PGK"] = "PGK";
538
+ CurrenciesEnum["PYG"] = "PYG";
539
+ CurrenciesEnum["PEI"] = "PEI";
540
+ CurrenciesEnum["PEN"] = "PEN";
541
+ CurrenciesEnum["PES"] = "PES";
542
+ CurrenciesEnum["PHP"] = "PHP";
543
+ CurrenciesEnum["PLN"] = "PLN";
544
+ CurrenciesEnum["PLZ"] = "PLZ";
545
+ CurrenciesEnum["PTE"] = "PTE";
546
+ CurrenciesEnum["GWE"] = "GWE";
547
+ CurrenciesEnum["QAR"] = "QAR";
548
+ CurrenciesEnum["XRE"] = "XRE";
549
+ CurrenciesEnum["RHD"] = "RHD";
550
+ CurrenciesEnum["RON"] = "RON";
551
+ CurrenciesEnum["ROL"] = "ROL";
552
+ CurrenciesEnum["RUB"] = "RUB";
553
+ CurrenciesEnum["RUR"] = "RUR";
554
+ CurrenciesEnum["RWF"] = "RWF";
555
+ CurrenciesEnum["SVC"] = "SVC";
556
+ CurrenciesEnum["WST"] = "WST";
557
+ CurrenciesEnum["SAR"] = "SAR";
558
+ CurrenciesEnum["RSD"] = "RSD";
559
+ CurrenciesEnum["CSD"] = "CSD";
560
+ CurrenciesEnum["SCR"] = "SCR";
561
+ CurrenciesEnum["SLL"] = "SLL";
562
+ CurrenciesEnum["SGD"] = "SGD";
563
+ CurrenciesEnum["SKK"] = "SKK";
564
+ CurrenciesEnum["SIT"] = "SIT";
565
+ CurrenciesEnum["SBD"] = "SBD";
566
+ CurrenciesEnum["SOS"] = "SOS";
567
+ CurrenciesEnum["ZAR"] = "ZAR";
568
+ CurrenciesEnum["ZAL"] = "ZAL";
569
+ CurrenciesEnum["KRH"] = "KRH";
570
+ CurrenciesEnum["KRW"] = "KRW";
571
+ CurrenciesEnum["KRO"] = "KRO";
572
+ CurrenciesEnum["SSP"] = "SSP";
573
+ CurrenciesEnum["SUR"] = "SUR";
574
+ CurrenciesEnum["ESP"] = "ESP";
575
+ CurrenciesEnum["ESA"] = "ESA";
576
+ CurrenciesEnum["ESB"] = "ESB";
577
+ CurrenciesEnum["LKR"] = "LKR";
578
+ CurrenciesEnum["SHP"] = "SHP";
579
+ CurrenciesEnum["SDD"] = "SDD";
580
+ CurrenciesEnum["SDG"] = "SDG";
581
+ CurrenciesEnum["SDP"] = "SDP";
582
+ CurrenciesEnum["SRD"] = "SRD";
583
+ CurrenciesEnum["SRG"] = "SRG";
584
+ CurrenciesEnum["SZL"] = "SZL";
585
+ CurrenciesEnum["SEK"] = "SEK";
586
+ CurrenciesEnum["CHF"] = "CHF";
587
+ CurrenciesEnum["SYP"] = "SYP";
588
+ CurrenciesEnum["STD"] = "STD";
589
+ CurrenciesEnum["TJR"] = "TJR";
590
+ CurrenciesEnum["TJS"] = "TJS";
591
+ CurrenciesEnum["TZS"] = "TZS";
592
+ CurrenciesEnum["THB"] = "THB";
593
+ CurrenciesEnum["TPE"] = "TPE";
594
+ CurrenciesEnum["TOP"] = "TOP";
595
+ CurrenciesEnum["TTD"] = "TTD";
596
+ CurrenciesEnum["TND"] = "TND";
597
+ CurrenciesEnum["TRY"] = "TRY";
598
+ CurrenciesEnum["TRL"] = "TRL";
599
+ CurrenciesEnum["TMT"] = "TMT";
600
+ CurrenciesEnum["TMM"] = "TMM";
601
+ CurrenciesEnum["USD"] = "USD";
602
+ CurrenciesEnum["USN"] = "USN";
603
+ CurrenciesEnum["USS"] = "USS";
604
+ CurrenciesEnum["UGX"] = "UGX";
605
+ CurrenciesEnum["UGS"] = "UGS";
606
+ CurrenciesEnum["UAH"] = "UAH";
607
+ CurrenciesEnum["UAK"] = "UAK";
608
+ CurrenciesEnum["AED"] = "AED";
609
+ CurrenciesEnum["UYU"] = "UYU";
610
+ CurrenciesEnum["UYP"] = "UYP";
611
+ CurrenciesEnum["UYI"] = "UYI";
612
+ CurrenciesEnum["UZS"] = "UZS";
613
+ CurrenciesEnum["VUV"] = "VUV";
614
+ CurrenciesEnum["VEF"] = "VEF";
615
+ CurrenciesEnum["VEB"] = "VEB";
616
+ CurrenciesEnum["VND"] = "VND";
617
+ CurrenciesEnum["VNN"] = "VNN";
618
+ CurrenciesEnum["CHE"] = "CHE";
619
+ CurrenciesEnum["CHW"] = "CHW";
620
+ CurrenciesEnum["XOF"] = "XOF";
621
+ CurrenciesEnum["YDD"] = "YDD";
622
+ CurrenciesEnum["YER"] = "YER";
623
+ CurrenciesEnum["YUN"] = "YUN";
624
+ CurrenciesEnum["YUD"] = "YUD";
625
+ CurrenciesEnum["YUM"] = "YUM";
626
+ CurrenciesEnum["YUR"] = "YUR";
627
+ CurrenciesEnum["ZRN"] = "ZRN";
628
+ CurrenciesEnum["ZRZ"] = "ZRZ";
629
+ CurrenciesEnum["ZMW"] = "ZMW";
630
+ CurrenciesEnum["ZMK"] = "ZMK";
631
+ CurrenciesEnum["ZWD"] = "ZWD";
632
+ CurrenciesEnum["ZWR"] = "ZWR";
633
+ CurrenciesEnum["ZWL"] = "ZWL";
634
+ })(exports.CurrenciesEnum || (exports.CurrenciesEnum = {}));
635
+
636
+ exports.EmailTemplateNameEnum = void 0;
637
+ (function(EmailTemplateNameEnum) {
638
+ EmailTemplateNameEnum["PASSWORD_RESET"] = "password";
639
+ EmailTemplateNameEnum["WELCOME_USER"] = "welcome-user";
640
+ EmailTemplateNameEnum["INVITE_USER"] = "invite-user";
641
+ EmailTemplateNameEnum["EMAIL_VERIFICATION"] = "email-verification";
642
+ })(exports.EmailTemplateNameEnum || (exports.EmailTemplateNameEnum = {}));
643
+ exports.EmailTemplateEnum = void 0;
644
+ (function(EmailTemplateEnum) {
645
+ EmailTemplateEnum["PASSWORD_RESET"] = "password";
646
+ EmailTemplateEnum["MULTI_TENANT_PASSWORD_RESET"] = "multi-tenant-password";
647
+ EmailTemplateEnum["PASSWORD_LESS_AUTHENTICATION"] = "password-less-authentication";
648
+ EmailTemplateEnum["WELCOME_USER"] = "welcome-user";
649
+ EmailTemplateEnum["EMAIL_VERIFICATION"] = "email-verification";
650
+ EmailTemplateEnum["INVITE_USER"] = "invite-user";
651
+ })(exports.EmailTemplateEnum || (exports.EmailTemplateEnum = {}));
652
+
653
+ exports.DEFAULT_TYPE = void 0;
654
+ (function(DEFAULT_TYPE) {
655
+ DEFAULT_TYPE["ALL_EMPLOYEE"] = "ALL_EMPLOYEE";
656
+ DEFAULT_TYPE["NO_EMPLOYEE"] = "NO_EMPLOYEE";
657
+ })(exports.DEFAULT_TYPE || (exports.DEFAULT_TYPE = {}));
658
+ exports.PayPeriodEnum = void 0;
659
+ (function(PayPeriodEnum) {
660
+ PayPeriodEnum["NONE"] = "NONE";
661
+ PayPeriodEnum["BI_WEEKLY"] = "BI_WEEKLY";
662
+ PayPeriodEnum["WEEKLY"] = "WEEKLY";
663
+ PayPeriodEnum["TWICE_PER_MONTH"] = "TWICE_PER_MONTH";
664
+ PayPeriodEnum["MONTHLY"] = "MONTHLY";
665
+ })(exports.PayPeriodEnum || (exports.PayPeriodEnum = {}));
666
+
667
+ exports.FeatureStatusEnum = void 0;
668
+ (function(FeatureStatusEnum) {
669
+ FeatureStatusEnum["INFO"] = "info";
670
+ FeatureStatusEnum["PRIMARY"] = "primary";
671
+ FeatureStatusEnum["SUCCESS"] = "success";
672
+ FeatureStatusEnum["WARNING"] = "warning";
673
+ })(exports.FeatureStatusEnum || (exports.FeatureStatusEnum = {}));
674
+ exports.IFeatureToggleTypeEnum = void 0;
675
+ (function(IFeatureToggleTypeEnum) {
676
+ IFeatureToggleTypeEnum["RELEASE"] = "release";
677
+ IFeatureToggleTypeEnum["KILL_SWITCH"] = "kill-switch";
678
+ IFeatureToggleTypeEnum["EXPERIMENT"] = "experiment";
679
+ IFeatureToggleTypeEnum["OPERATIONAL"] = "operational";
680
+ IFeatureToggleTypeEnum["PERMISSION"] = "permission";
681
+ })(exports.IFeatureToggleTypeEnum || (exports.IFeatureToggleTypeEnum = {}));
682
+ exports.FeatureEnum = void 0;
683
+ (function(FeatureEnum) {
684
+ FeatureEnum["FEATURE_HOME"] = "FEATURE_HOME";
685
+ FeatureEnum["FEATURE_DASHBOARD"] = "FEATURE_DASHBOARD";
686
+ FeatureEnum["FEATURE_JOB"] = "FEATURE_JOB";
687
+ FeatureEnum["FEATURE_EMPLOYEES"] = "FEATURE_EMPLOYEES";
688
+ FeatureEnum["FEATURE_MANAGE_INVITE"] = "FEATURE_MANAGE_INVITE";
689
+ FeatureEnum["FEATURE_ORGANIZATION"] = "FEATURE_ORGANIZATION";
690
+ FeatureEnum["FEATURE_ORGANIZATION_TAG"] = "FEATURE_ORGANIZATION_TAG";
691
+ FeatureEnum["FEATURE_ORGANIZATION_PROJECT"] = "FEATURE_ORGANIZATION_PROJECT";
692
+ FeatureEnum["FEATURE_CONTACT"] = "FEATURE_CONTACT";
693
+ FeatureEnum["FEATURE_USER"] = "FEATURE_USER";
694
+ FeatureEnum["FEATURE_ORGANIZATIONS"] = "FEATURE_ORGANIZATIONS";
695
+ // FEATURE_APP_INTEGRATION = 'FEATURE_APP_INTEGRATION',
696
+ FeatureEnum["FEATURE_SETTING"] = "FEATURE_SETTING";
697
+ FeatureEnum["FEATURE_EMAIL_HISTORY"] = "FEATURE_EMAIL_HISTORY";
698
+ FeatureEnum["FEATURE_EMAIL_TEMPLATE"] = "FEATURE_EMAIL_TEMPLATE";
699
+ FeatureEnum["FEATURE_FILE_STORAGE"] = "FEATURE_FILE_STORAGE";
700
+ FeatureEnum["FEATURE_SMS_GATEWAY"] = "FEATURE_SMS_GATEWAY";
701
+ FeatureEnum["FEATURE_SMTP"] = "FEATURE_SMTP";
702
+ FeatureEnum["FEATURE_ROLES_PERMISSION"] = "FEATURE_ROLES_PERMISSION";
703
+ FeatureEnum["FEATURE_INTEGRATION"] = "FEATURE_INTEGRATION";
704
+ })(exports.FeatureEnum || (exports.FeatureEnum = {}));
705
+
706
+ exports.FileStorageProviderEnum = void 0;
707
+ (function(FileStorageProviderEnum) {
708
+ FileStorageProviderEnum["LOCAL"] = "LOCAL";
709
+ FileStorageProviderEnum["S3"] = "S3";
710
+ FileStorageProviderEnum["WASABI"] = "WASABI";
711
+ FileStorageProviderEnum["OSS"] = "OSS";
712
+ })(exports.FileStorageProviderEnum || (exports.FileStorageProviderEnum = {}));
713
+
714
+ exports.HttpStatus = void 0;
715
+ (function(HttpStatus) {
716
+ HttpStatus[HttpStatus["CONTINUE"] = 100] = "CONTINUE";
717
+ HttpStatus[HttpStatus["SWITCHING_PROTOCOLS"] = 101] = "SWITCHING_PROTOCOLS";
718
+ HttpStatus[HttpStatus["PROCESSING"] = 102] = "PROCESSING";
719
+ HttpStatus[HttpStatus["OK"] = 200] = "OK";
720
+ HttpStatus[HttpStatus["CREATED"] = 201] = "CREATED";
721
+ HttpStatus[HttpStatus["ACCEPTED"] = 202] = "ACCEPTED";
722
+ HttpStatus[HttpStatus["NON_AUTHORITATIVE_INFORMATION"] = 203] = "NON_AUTHORITATIVE_INFORMATION";
723
+ HttpStatus[HttpStatus["NO_CONTENT"] = 204] = "NO_CONTENT";
724
+ HttpStatus[HttpStatus["RESET_CONTENT"] = 205] = "RESET_CONTENT";
725
+ HttpStatus[HttpStatus["PARTIAL_CONTENT"] = 206] = "PARTIAL_CONTENT";
726
+ HttpStatus[HttpStatus["AMBIGUOUS"] = 300] = "AMBIGUOUS";
727
+ HttpStatus[HttpStatus["MOVED_PERMANENTLY"] = 301] = "MOVED_PERMANENTLY";
728
+ HttpStatus[HttpStatus["FOUND"] = 302] = "FOUND";
729
+ HttpStatus[HttpStatus["SEE_OTHER"] = 303] = "SEE_OTHER";
730
+ HttpStatus[HttpStatus["NOT_MODIFIED"] = 304] = "NOT_MODIFIED";
731
+ HttpStatus[HttpStatus["TEMPORARY_REDIRECT"] = 307] = "TEMPORARY_REDIRECT";
732
+ HttpStatus[HttpStatus["PERMANENT_REDIRECT"] = 308] = "PERMANENT_REDIRECT";
733
+ HttpStatus[HttpStatus["BAD_REQUEST"] = 400] = "BAD_REQUEST";
734
+ HttpStatus[HttpStatus["UNAUTHORIZED"] = 401] = "UNAUTHORIZED";
735
+ HttpStatus[HttpStatus["PAYMENT_REQUIRED"] = 402] = "PAYMENT_REQUIRED";
736
+ HttpStatus[HttpStatus["FORBIDDEN"] = 403] = "FORBIDDEN";
737
+ HttpStatus[HttpStatus["NOT_FOUND"] = 404] = "NOT_FOUND";
738
+ HttpStatus[HttpStatus["METHOD_NOT_ALLOWED"] = 405] = "METHOD_NOT_ALLOWED";
739
+ HttpStatus[HttpStatus["NOT_ACCEPTABLE"] = 406] = "NOT_ACCEPTABLE";
740
+ HttpStatus[HttpStatus["PROXY_AUTHENTICATION_REQUIRED"] = 407] = "PROXY_AUTHENTICATION_REQUIRED";
741
+ HttpStatus[HttpStatus["REQUEST_TIMEOUT"] = 408] = "REQUEST_TIMEOUT";
742
+ HttpStatus[HttpStatus["CONFLICT"] = 409] = "CONFLICT";
743
+ HttpStatus[HttpStatus["GONE"] = 410] = "GONE";
744
+ HttpStatus[HttpStatus["LENGTH_REQUIRED"] = 411] = "LENGTH_REQUIRED";
745
+ HttpStatus[HttpStatus["PRECONDITION_FAILED"] = 412] = "PRECONDITION_FAILED";
746
+ HttpStatus[HttpStatus["PAYLOAD_TOO_LARGE"] = 413] = "PAYLOAD_TOO_LARGE";
747
+ HttpStatus[HttpStatus["URI_TOO_LONG"] = 414] = "URI_TOO_LONG";
748
+ HttpStatus[HttpStatus["UNSUPPORTED_MEDIA_TYPE"] = 415] = "UNSUPPORTED_MEDIA_TYPE";
749
+ HttpStatus[HttpStatus["REQUESTED_RANGE_NOT_SATISFIABLE"] = 416] = "REQUESTED_RANGE_NOT_SATISFIABLE";
750
+ HttpStatus[HttpStatus["EXPECTATION_FAILED"] = 417] = "EXPECTATION_FAILED";
751
+ HttpStatus[HttpStatus["I_AM_A_TEAPOT"] = 418] = "I_AM_A_TEAPOT";
752
+ HttpStatus[HttpStatus["UNPROCESSABLE_ENTITY"] = 422] = "UNPROCESSABLE_ENTITY";
753
+ HttpStatus[HttpStatus["FAILED_DEPENDENCY"] = 424] = "FAILED_DEPENDENCY";
754
+ HttpStatus[HttpStatus["TOO_MANY_REQUESTS"] = 429] = "TOO_MANY_REQUESTS";
755
+ HttpStatus[HttpStatus["INTERNAL_SERVER_ERROR"] = 500] = "INTERNAL_SERVER_ERROR";
756
+ HttpStatus[HttpStatus["NOT_IMPLEMENTED"] = 501] = "NOT_IMPLEMENTED";
757
+ HttpStatus[HttpStatus["BAD_GATEWAY"] = 502] = "BAD_GATEWAY";
758
+ HttpStatus[HttpStatus["SERVICE_UNAVAILABLE"] = 503] = "SERVICE_UNAVAILABLE";
759
+ HttpStatus[HttpStatus["GATEWAY_TIMEOUT"] = 504] = "GATEWAY_TIMEOUT";
760
+ HttpStatus[HttpStatus["HTTP_VERSION_NOT_SUPPORTED"] = 505] = "HTTP_VERSION_NOT_SUPPORTED";
761
+ })(exports.HttpStatus || (exports.HttpStatus = {}));
762
+ exports.RequestMethodEnum = void 0;
763
+ (function(RequestMethodEnum) {
764
+ RequestMethodEnum["GET"] = "GET";
765
+ RequestMethodEnum["POST"] = "POST";
766
+ RequestMethodEnum["PUT"] = "PUT";
767
+ RequestMethodEnum["DELETE"] = "DELETE";
768
+ RequestMethodEnum["PATCH"] = "PATCH";
769
+ RequestMethodEnum["ALL"] = "ALL";
770
+ RequestMethodEnum["OPTIONS"] = "OPTIONS";
771
+ RequestMethodEnum["HEAD"] = "HEAD";
772
+ })(exports.RequestMethodEnum || (exports.RequestMethodEnum = {}));
773
+
774
+ exports.ImportTypeEnum = void 0;
775
+ (function(ImportTypeEnum) {
776
+ ImportTypeEnum["MERGE"] = "merge";
777
+ ImportTypeEnum["CLEAN"] = "clean";
778
+ })(exports.ImportTypeEnum || (exports.ImportTypeEnum = {}));
779
+ exports.ImportHistoryStatusEnum = void 0;
780
+ (function(ImportHistoryStatusEnum) {
781
+ ImportHistoryStatusEnum["SUCCESS"] = "Success";
782
+ ImportHistoryStatusEnum["FAILED"] = "Failed";
783
+ ImportHistoryStatusEnum["CANCELLED"] = "Cancelled";
784
+ })(exports.ImportHistoryStatusEnum || (exports.ImportHistoryStatusEnum = {}));
785
+
786
+ exports.OrganizationContactBudgetTypeEnum = void 0;
787
+ (function(OrganizationContactBudgetTypeEnum) {
788
+ OrganizationContactBudgetTypeEnum["HOURS"] = "hours";
789
+ OrganizationContactBudgetTypeEnum["COST"] = "cost";
790
+ })(exports.OrganizationContactBudgetTypeEnum || (exports.OrganizationContactBudgetTypeEnum = {}));
791
+ exports.ContactOrganizationInviteStatus = void 0;
792
+ (function(ContactOrganizationInviteStatus) {
793
+ ContactOrganizationInviteStatus["NOT_INVITED"] = "NOT_INVITED";
794
+ ContactOrganizationInviteStatus["INVITED"] = "INVITED";
795
+ ContactOrganizationInviteStatus["ACCEPTED"] = "ACCEPTED";
796
+ })(exports.ContactOrganizationInviteStatus || (exports.ContactOrganizationInviteStatus = {}));
797
+ exports.ContactType = void 0;
798
+ (function(ContactType) {
799
+ ContactType["CLIENT"] = "CLIENT";
800
+ ContactType["CUSTOMER"] = "CUSTOMER";
801
+ ContactType["LEAD"] = "LEAD";
802
+ })(exports.ContactType || (exports.ContactType = {}));
803
+
804
+ exports.OrganizationPermissionsEnum = void 0;
805
+ (function(OrganizationPermissionsEnum) {
806
+ OrganizationPermissionsEnum["ALLOW_MANUAL_TIME"] = "allowManualTime";
807
+ OrganizationPermissionsEnum["ALLOW_MODIFY_TIME"] = "allowModifyTime";
808
+ OrganizationPermissionsEnum["ALLOW_DELETE_TIME"] = "allowDeleteTime";
809
+ OrganizationPermissionsEnum["ALLOW_FUTURE_DATE"] = "futureDateAllowed";
810
+ })(exports.OrganizationPermissionsEnum || (exports.OrganizationPermissionsEnum = {}));
811
+ exports.ListsInputTypeEnum = void 0;
812
+ (function(ListsInputTypeEnum) {
813
+ ListsInputTypeEnum["DEPARTMENTS"] = "DEPARTMENTS";
814
+ ListsInputTypeEnum["POSITIONS"] = "POSITIONS";
815
+ ListsInputTypeEnum["VENDORS"] = "VENDORS";
816
+ })(exports.ListsInputTypeEnum || (exports.ListsInputTypeEnum = {}));
817
+ exports.OrganizationSelectInput = void 0;
818
+ (function(OrganizationSelectInput) {
819
+ OrganizationSelectInput["id"] = "id";
820
+ OrganizationSelectInput["name"] = "name";
821
+ OrganizationSelectInput["profile_link"] = "profile_link";
822
+ OrganizationSelectInput["valueDate"] = "valueDate";
823
+ OrganizationSelectInput["imageUrl"] = "imageUrl";
824
+ OrganizationSelectInput["currency"] = "currency";
825
+ OrganizationSelectInput["createdAt"] = "createdAt";
826
+ OrganizationSelectInput["updatedAt"] = "updatedAt";
827
+ OrganizationSelectInput["isActive"] = "isActive";
828
+ OrganizationSelectInput["tags"] = "tags";
829
+ })(exports.OrganizationSelectInput || (exports.OrganizationSelectInput = {}));
830
+ exports.RegionsEnum = void 0;
831
+ (function(RegionsEnum) {
832
+ RegionsEnum["EN"] = "English (United States)";
833
+ RegionsEnum["BG"] = "Bulgarian (Bulgaria)";
834
+ RegionsEnum["HE"] = "Hebrew (Israel)";
835
+ RegionsEnum["RU"] = "Rusian (Russia)";
836
+ })(exports.RegionsEnum || (exports.RegionsEnum = {}));
837
+ exports.DefaultValueDateTypeEnum = void 0;
838
+ (function(DefaultValueDateTypeEnum) {
839
+ DefaultValueDateTypeEnum["TODAY"] = "TODAY";
840
+ DefaultValueDateTypeEnum["END_OF_MONTH"] = "END_OF_MONTH";
841
+ DefaultValueDateTypeEnum["START_OF_MONTH"] = "START_OF_MONTH";
842
+ })(exports.DefaultValueDateTypeEnum || (exports.DefaultValueDateTypeEnum = {}));
843
+ exports.ProjectBillingEnum = void 0;
844
+ (function(ProjectBillingEnum) {
845
+ ProjectBillingEnum["RATE"] = "RATE";
846
+ ProjectBillingEnum["FLAT_FEE"] = "FLAT_FEE";
847
+ ProjectBillingEnum["MILESTONES"] = "MILESTONES";
848
+ })(exports.ProjectBillingEnum || (exports.ProjectBillingEnum = {}));
849
+ exports.AlignmentOptions = void 0;
850
+ (function(AlignmentOptions) {
851
+ AlignmentOptions["LEFT"] = "LEFT";
852
+ AlignmentOptions["RIGHT"] = "RIGHT";
853
+ AlignmentOptions["CENTER"] = "CENTER";
854
+ })(exports.AlignmentOptions || (exports.AlignmentOptions = {}));
855
+ exports.CurrencyPosition = void 0;
856
+ (function(CurrencyPosition) {
857
+ CurrencyPosition["LEFT"] = "LEFT";
858
+ CurrencyPosition["RIGHT"] = "RIGHT";
859
+ })(exports.CurrencyPosition || (exports.CurrencyPosition = {}));
860
+ exports.WeekDaysEnum = void 0;
861
+ (function(WeekDaysEnum) {
862
+ WeekDaysEnum["MONDAY"] = "MONDAY";
863
+ WeekDaysEnum["TUESDAY"] = "TUESDAY";
864
+ WeekDaysEnum["WEDNESDAY"] = "WEDNESDAY";
865
+ WeekDaysEnum["THURSDAY"] = "THURSDAY";
866
+ WeekDaysEnum["FRIDAY"] = "FRIDAY";
867
+ WeekDaysEnum["SATURDAY"] = "SATURDAY";
868
+ WeekDaysEnum["SUNDAY"] = "SUNDAY";
869
+ })(exports.WeekDaysEnum || (exports.WeekDaysEnum = {}));
870
+ exports.BonusTypeEnum = void 0;
871
+ (function(BonusTypeEnum) {
872
+ BonusTypeEnum["PROFIT_BASED_BONUS"] = "PROFIT_BASED_BONUS";
873
+ BonusTypeEnum["REVENUE_BASED_BONUS"] = "REVENUE_BASED_BONUS";
874
+ })(exports.BonusTypeEnum || (exports.BonusTypeEnum = {}));
875
+ exports.ClientFocusEnum = void 0;
876
+ (function(ClientFocusEnum) {
877
+ ClientFocusEnum["VERY_SMALL_BUSINESSES"] = "Very Small Businesses";
878
+ ClientFocusEnum["SMALL_BUSINESSES"] = "Small Businesses";
879
+ ClientFocusEnum["MEDIUM_BUSINESSES"] = "Medium Businesses";
880
+ ClientFocusEnum["LARGE_BUSINESSES"] = "Large Businesses";
881
+ })(exports.ClientFocusEnum || (exports.ClientFocusEnum = {}));
882
+ exports.ProjectOwnerEnum = void 0;
883
+ (function(ProjectOwnerEnum) {
884
+ ProjectOwnerEnum["CLIENT"] = "CLIENT";
885
+ ProjectOwnerEnum["INTERNAL"] = "INTERNAL";
886
+ })(exports.ProjectOwnerEnum || (exports.ProjectOwnerEnum = {}));
887
+ exports.MinimumProjectSizeEnum = void 0;
888
+ (function(MinimumProjectSizeEnum) {
889
+ MinimumProjectSizeEnum["ONE_THOUSAND"] = "1000+";
890
+ MinimumProjectSizeEnum["FIVE_THOUSAND"] = "5000+";
891
+ MinimumProjectSizeEnum["TEN_THOUSAND"] = "10000+";
892
+ MinimumProjectSizeEnum["TWENTY_FIVE_THOUSAND"] = "25000+";
893
+ MinimumProjectSizeEnum["FIFTY_THOUSAND"] = "50000+";
894
+ MinimumProjectSizeEnum["ONE_HUNDRED_THOUSAND"] = "100000+";
895
+ })(exports.MinimumProjectSizeEnum || (exports.MinimumProjectSizeEnum = {}));
896
+ var DEFAULT_PROFIT_BASED_BONUS = 75;
897
+ var DEFAULT_REVENUE_BASED_BONUS = 10;
898
+ var DEFAULT_INVITE_EXPIRY_PERIOD = 7;
899
+ exports.CrudActionEnum = void 0;
900
+ (function(CrudActionEnum) {
901
+ CrudActionEnum["CREATED"] = "CREATED";
902
+ CrudActionEnum["UPDATED"] = "UPDATED";
903
+ CrudActionEnum["DELETED"] = "DELETED";
904
+ })(exports.CrudActionEnum || (exports.CrudActionEnum = {}));
905
+ var DEFAULT_DATE_FORMATS = [
906
+ "L",
907
+ "LL",
908
+ "dddd, LL"
909
+ ];
910
+ var DEFAULT_TIME_FORMATS = [
911
+ 12,
912
+ 24
913
+ ];
914
+ exports.OrganizationDemoNetworkEnum = void 0;
915
+ (function(OrganizationDemoNetworkEnum) {
916
+ OrganizationDemoNetworkEnum["github"] = "github";
917
+ OrganizationDemoNetworkEnum["aliyun"] = "aliyun";
918
+ })(exports.OrganizationDemoNetworkEnum || (exports.OrganizationDemoNetworkEnum = {}));
919
+
1
920
  /**
2
- * In order to solve the problem that the `index.cjs.js` cannot be found during the development phase
3
- * when introducing external plugins (`@xpert-ai/plugin-xxx`) and it referencing `@metad/contracts`.
4
- * - Before using external plugins, you need to nx build this library.
5
- */
6
- module.exports = require('./dist/index.cjs.js')
921
+ * Here is the intermediate type definition converted from the actual schema type to the xmla file format.
922
+ * But the type definition here can also be referenced by the actual schema definition.
923
+ */ var DimensionType;
924
+ (function(DimensionType) {
925
+ DimensionType["StandardDimension"] = "StandardDimension";
926
+ DimensionType["TimeDimension"] = "TimeDimension";
927
+ DimensionType["MeasuresDimension"] = "MeasuresDimension";
928
+ })(DimensionType || (DimensionType = {}));
929
+ var Access;
930
+ (function(Access) {
931
+ /**
932
+ * No access to an object and its children.
933
+ */ Access["none"] = "none";
934
+ /**
935
+ * A grant that covers none of the children unless explicitly granted.
936
+ */ Access["custom"] = "custom";
937
+ /**
938
+ * Access to all shared dimensions (applies to schema grant).
939
+ */ Access["all_dimensions"] = "all_dimensions";
940
+ /**
941
+ * All access to an object and its children.
942
+ */ Access["all"] = "all";
943
+ })(Access || (Access = {}));
944
+ var RollupPolicy;
945
+ (function(RollupPolicy) {
946
+ RollupPolicy["full"] = "full";
947
+ RollupPolicy["partial"] = "partial";
948
+ RollupPolicy["hidden"] = "hidden";
949
+ })(RollupPolicy || (RollupPolicy = {}));
950
+
951
+ var schema = /*#__PURE__*/Object.freeze({
952
+ __proto__: null,
953
+ get Access () { return Access; },
954
+ get DimensionType () { return DimensionType; },
955
+ get RollupPolicy () { return RollupPolicy; }
956
+ });
957
+
958
+ exports.ChatDashboardMessageType = void 0;
959
+ (function(ChatDashboardMessageType) {
960
+ /**
961
+ * Display data preview using analytical card event
962
+ */ ChatDashboardMessageType["AnalyticalCard"] = "AnalyticalCard";
963
+ /**
964
+ * Create or edit a cube event
965
+ */ ChatDashboardMessageType["Cube"] = "Cube";
966
+ /**
967
+ * Edit a virtual cube event
968
+ */ ChatDashboardMessageType["VirtualCube"] = "VirtualCube";
969
+ /**
970
+ * Create or edit members (calculated members or dimension sets) event
971
+ */ ChatDashboardMessageType["Members"] = "Members";
972
+ /**
973
+ * List indicators event
974
+ */ ChatDashboardMessageType["ListIndicators"] = "ListIndicators";
975
+ /**
976
+ * Create or edit an indicator event
977
+ */ ChatDashboardMessageType["Indicator"] = "Indicator";
978
+ ChatDashboardMessageType["Indicators"] = "Indicators";
979
+ })(exports.ChatDashboardMessageType || (exports.ChatDashboardMessageType = {}));
980
+ exports.BIInterruptMessageType = void 0;
981
+ (function(BIInterruptMessageType) {
982
+ BIInterruptMessageType["SwitchProject"] = "switch_project";
983
+ BIInterruptMessageType["SwitchSemanticModel"] = "switch_semantic_model";
984
+ BIInterruptMessageType["DeleteArtifact"] = "delete_artifact";
985
+ })(exports.BIInterruptMessageType || (exports.BIInterruptMessageType = {}));
986
+
987
+ exports.BusinessType = void 0;
988
+ (function(BusinessType) {
989
+ BusinessType["SEMANTIC_MODEL"] = "SEMANTIC_MODEL";
990
+ BusinessType["STORY"] = "STORY";
991
+ BusinessType["INDICATOR"] = "INDICATOR";
992
+ })(exports.BusinessType || (exports.BusinessType = {}));
993
+
994
+ exports.BusinessAreaRole = void 0;
995
+ (function(BusinessAreaRole) {
996
+ BusinessAreaRole[BusinessAreaRole["Adminer"] = 0] = "Adminer";
997
+ BusinessAreaRole[BusinessAreaRole["Modeler"] = 1] = "Modeler";
998
+ BusinessAreaRole[BusinessAreaRole["Viewer"] = 2] = "Viewer";
999
+ })(exports.BusinessAreaRole || (exports.BusinessAreaRole = {}));
1000
+
1001
+ exports.AuthenticationEnum = void 0;
1002
+ (function(AuthenticationEnum) {
1003
+ AuthenticationEnum["NONE"] = "NONE";
1004
+ AuthenticationEnum["BASIC"] = "BASIC";
1005
+ })(exports.AuthenticationEnum || (exports.AuthenticationEnum = {}));
1006
+ exports.DataSourceTypeEnum = void 0;
1007
+ (function(DataSourceTypeEnum) {
1008
+ DataSourceTypeEnum["NONE"] = "NONE";
1009
+ })(exports.DataSourceTypeEnum || (exports.DataSourceTypeEnum = {}));
1010
+
1011
+ exports.DataSourceSyntaxEnum = void 0;
1012
+ (function(DataSourceSyntaxEnum) {
1013
+ DataSourceSyntaxEnum["SQL"] = "sql";
1014
+ DataSourceSyntaxEnum["MDX"] = "mdx";
1015
+ })(exports.DataSourceSyntaxEnum || (exports.DataSourceSyntaxEnum = {}));
1016
+ exports.DataSourceProtocolEnum = void 0;
1017
+ (function(DataSourceProtocolEnum) {
1018
+ DataSourceProtocolEnum["SQL"] = "sql";
1019
+ DataSourceProtocolEnum["XMLA"] = "xmla";
1020
+ })(exports.DataSourceProtocolEnum || (exports.DataSourceProtocolEnum = {}));
1021
+
1022
+ exports.AnalyticsFeatures = void 0;
1023
+ (function(AnalyticsFeatures) {
1024
+ AnalyticsFeatures["FEATURE_BUSINESS_AREA"] = "FEATURE_BUSINESS_AREA";
1025
+ AnalyticsFeatures["FEATURE_INDICATOR"] = "FEATURE_INDICATOR";
1026
+ AnalyticsFeatures["FEATURE_INDICATOR_MARKET"] = "FEATURE_INDICATOR_MARKET";
1027
+ AnalyticsFeatures["FEATURE_INDICATOR_REGISTER"] = "FEATURE_INDICATOR_REGISTER";
1028
+ AnalyticsFeatures["FEATURE_INDICATOR_APP"] = "FEATURE_INDICATOR_APP";
1029
+ AnalyticsFeatures["FEATURE_STORY"] = "FEATURE_STORY";
1030
+ AnalyticsFeatures["FEATURE_STORY_CREATION"] = "FEATURE_STORY_CREATION";
1031
+ AnalyticsFeatures["FEATURE_STORY_VIEWER"] = "FEATURE_STORY_VIEWER";
1032
+ AnalyticsFeatures["FEATURE_STORY_MARKET"] = "FEATURE_STORY_MARKET";
1033
+ AnalyticsFeatures["FEATURE_MODEL"] = "FEATURE_MODEL";
1034
+ AnalyticsFeatures["FEATURE_MODEL_CREATION"] = "FEATURE_MODEL_CREATION";
1035
+ AnalyticsFeatures["FEATURE_MODEL_VIEWER"] = "FEATURE_MODEL_VIEWER";
1036
+ AnalyticsFeatures["FEATURE_SUBSCRIPTION"] = "FEATURE_SUBSCRIPTION";
1037
+ AnalyticsFeatures["FEATURE_HOME_TREND"] = "FEATURE_HOME_TREND";
1038
+ AnalyticsFeatures["FEATURE_HOME_CATALOG"] = "FEATURE_HOME_CATALOG";
1039
+ AnalyticsFeatures["FEATURE_PROJECT"] = "FEATURE_PROJECT";
1040
+ AnalyticsFeatures["FEATURE_DATA_FACTORY"] = "FEATURE_DATA_FACTORY";
1041
+ })(exports.AnalyticsFeatures || (exports.AnalyticsFeatures = {}));
1042
+
1043
+ exports.FeedTypeEnum = void 0;
1044
+ (function(FeedTypeEnum) {
1045
+ FeedTypeEnum["StoryWidget"] = "StoryWidget";
1046
+ FeedTypeEnum["IndicatorWidget"] = "IndicatorWidget";
1047
+ FeedTypeEnum["Recents"] = "Recents";
1048
+ FeedTypeEnum["Ranking"] = "Ranking";
1049
+ })(exports.FeedTypeEnum || (exports.FeedTypeEnum = {}));
1050
+
1051
+ /**
1052
+ * Fields included in the draft of Indicator, please keep it in sync with TIndicator type
1053
+ */ var IndicatorDraftFields = [
1054
+ "code",
1055
+ "name",
1056
+ "type",
1057
+ "visible",
1058
+ "isApplication",
1059
+ "modelId",
1060
+ "entity",
1061
+ "unit",
1062
+ "principal",
1063
+ "authentication",
1064
+ "certificationId",
1065
+ "validity",
1066
+ "business",
1067
+ "options",
1068
+ "businessAreaId"
1069
+ ];
1070
+ var IndicatorOptionFields = [
1071
+ "dimensions",
1072
+ "filters",
1073
+ "formula",
1074
+ "measure",
1075
+ "aggregator",
1076
+ "calendar"
1077
+ ];
1078
+ exports.IndicatorType = void 0;
1079
+ (function(IndicatorType) {
1080
+ IndicatorType["BASIC"] = "BASIC";
1081
+ IndicatorType["DERIVE"] = "DERIVE";
1082
+ })(exports.IndicatorType || (exports.IndicatorType = {}));
1083
+ exports.IndicatorStatusEnum = void 0;
1084
+ (function(IndicatorStatusEnum) {
1085
+ /**
1086
+ * draft
1087
+ */ IndicatorStatusEnum["DRAFT"] = "DRAFT";
1088
+ /**
1089
+ * Published
1090
+ */ IndicatorStatusEnum["RELEASED"] = "RELEASED";
1091
+ /**
1092
+ * Offline Archive
1093
+ */ IndicatorStatusEnum["ARCHIVED"] = "ARCHIVED";
1094
+ })(exports.IndicatorStatusEnum || (exports.IndicatorStatusEnum = {}));
1095
+
1096
+ exports.TimeGranularity = void 0;
1097
+ (function(TimeGranularity) {
1098
+ TimeGranularity["Year"] = "Year";
1099
+ TimeGranularity["Quarter"] = "Quarter";
1100
+ TimeGranularity["Month"] = "Month";
1101
+ TimeGranularity["Week"] = "Week";
1102
+ TimeGranularity["Day"] = "Day";
1103
+ })(exports.TimeGranularity || (exports.TimeGranularity = {}));
1104
+ exports.IndicatorTagEnum = void 0;
1105
+ (function(IndicatorTagEnum) {
1106
+ IndicatorTagEnum[IndicatorTagEnum["UNIT"] = 0] = "UNIT";
1107
+ IndicatorTagEnum[IndicatorTagEnum["MOM"] = 1] = "MOM";
1108
+ IndicatorTagEnum[IndicatorTagEnum["YOY"] = 2] = "YOY";
1109
+ })(exports.IndicatorTagEnum || (exports.IndicatorTagEnum = {}));
1110
+
1111
+ exports.AnalyticsPermissionsEnum = void 0;
1112
+ (function(AnalyticsPermissionsEnum) {
1113
+ /**
1114
+ * Edit Certification
1115
+ */ AnalyticsPermissionsEnum["CERTIFICATION_EDIT"] = "CERTIFICATION_EDIT";
1116
+ // DataSource
1117
+ AnalyticsPermissionsEnum["DATA_SOURCE_VIEW"] = "DATA_SOURCE_VIEW";
1118
+ AnalyticsPermissionsEnum["DATA_SOURCE_EDIT"] = "DATA_SOURCE_EDIT";
1119
+ // Notification Destination
1120
+ AnalyticsPermissionsEnum["NOTIFICATION_DESTINATION_VIEW"] = "NOTIFICATION_DESTINATION_VIEW";
1121
+ AnalyticsPermissionsEnum["NOTIFICATION_DESTINATION_EDIT"] = "NOTIFICATION_DESTINATION_EDIT";
1122
+ // Subscription
1123
+ AnalyticsPermissionsEnum["SUBSCRIPTION_VIEW"] = "SUBSCRIPTION_VIEW";
1124
+ AnalyticsPermissionsEnum["SUBSCRIPTION_EDIT"] = "SUBSCRIPTION_EDIT";
1125
+ // Semantic Model
1126
+ AnalyticsPermissionsEnum["MODELS_VIEW"] = "MODELS_VIEW";
1127
+ AnalyticsPermissionsEnum["MODELS_EDIT"] = "MODELS_EDIT";
1128
+ // Story
1129
+ AnalyticsPermissionsEnum["STORIES_VIEW"] = "STORIES_VIEW";
1130
+ AnalyticsPermissionsEnum["STORIES_EDIT"] = "STORIES_EDIT";
1131
+ // BusinessGroup
1132
+ AnalyticsPermissionsEnum["BUSINESS_AREA_VIEW"] = "BUSINESS_AREA_VIEW";
1133
+ AnalyticsPermissionsEnum["BUSINESS_AREA_EDIT"] = "BUSINESS_AREA_EDIT";
1134
+ // Indicator
1135
+ AnalyticsPermissionsEnum["INDICATOR_VIEW"] = "INDICATOR_VIEW";
1136
+ AnalyticsPermissionsEnum["INDICATOR_MARTKET_VIEW"] = "INDICATOR_MARTKET_VIEW";
1137
+ AnalyticsPermissionsEnum["INDICATOR_EDIT"] = "INDICATOR_EDIT";
1138
+ // Data Factory
1139
+ AnalyticsPermissionsEnum["DATA_FACTORY_VIEW"] = "DATA_FACTORY_VIEW";
1140
+ AnalyticsPermissionsEnum["DATA_FACTORY_EDIT"] = "DATA_FACTORY_EDIT";
1141
+ // Permission application approval view, you can browse all permission applications
1142
+ AnalyticsPermissionsEnum["PERMISSION_APPROVAL_VIEW"] = "PERMISSION_APPROVAL_VIEW";
1143
+ // Permission application creation permission, cannot browse other applications
1144
+ AnalyticsPermissionsEnum["PERMISSION_APPROVAL_EDIT"] = "PERMISSION_APPROVAL_EDIT";
1145
+ })(exports.AnalyticsPermissionsEnum || (exports.AnalyticsPermissionsEnum = {}));
1146
+
1147
+ exports.AgentType = void 0;
1148
+ (function(AgentType) {
1149
+ AgentType["Local"] = "local";
1150
+ AgentType["Browser"] = "browser";
1151
+ AgentType["Server"] = "server";
1152
+ AgentType["Wasm"] = "wasm";
1153
+ })(exports.AgentType || (exports.AgentType = {}));
1154
+ exports.ModelTypeEnum = void 0;
1155
+ (function(ModelTypeEnum) {
1156
+ ModelTypeEnum["XMLA"] = "XMLA";
1157
+ ModelTypeEnum["SQL"] = "SQL";
1158
+ })(exports.ModelTypeEnum || (exports.ModelTypeEnum = {}));
1159
+ exports.RoleTypeEnum = void 0;
1160
+ (function(RoleTypeEnum) {
1161
+ RoleTypeEnum["single"] = "single";
1162
+ RoleTypeEnum["union"] = "union";
1163
+ })(exports.RoleTypeEnum || (exports.RoleTypeEnum = {}));
1164
+ exports.SemanticModelStatusEnum = void 0;
1165
+ (function(SemanticModelStatusEnum) {
1166
+ /**
1167
+ * Using
1168
+ */ SemanticModelStatusEnum["Progressing"] = "progressing";
1169
+ /**
1170
+ * Archived
1171
+ */ SemanticModelStatusEnum["Archived"] = "archived";
1172
+ })(exports.SemanticModelStatusEnum || (exports.SemanticModelStatusEnum = {}));
1173
+ function extractSemanticModelDraft(model) {
1174
+ var _model_options, _model_options1;
1175
+ return {
1176
+ key: model.key,
1177
+ name: model.name,
1178
+ description: model.description,
1179
+ type: model.type,
1180
+ agentType: model.agentType,
1181
+ dataSourceId: model.dataSourceId,
1182
+ businessAreaId: model.businessAreaId,
1183
+ catalog: model.catalog,
1184
+ cube: model.cube,
1185
+ schema: (_model_options = model.options) === null || _model_options === void 0 ? void 0 : _model_options.schema,
1186
+ settings: (_model_options1 = model.options) === null || _model_options1 === void 0 ? void 0 : _model_options1.settings,
1187
+ roles: model.roles
1188
+ };
1189
+ }
1190
+
1191
+ exports.ModelEntityType = void 0;
1192
+ (function(ModelEntityType) {
1193
+ ModelEntityType["Cube"] = "cube";
1194
+ ModelEntityType["Dimension"] = "dimension";
1195
+ })(exports.ModelEntityType || (exports.ModelEntityType = {}));
1196
+
1197
+ function embeddingCubeCollectionName(modelKey, cube, isDraft) {
1198
+ return "".concat(modelKey, ":").concat(cube).concat(isDraft ? ":draft" : "");
1199
+ }
1200
+
1201
+ exports.StoryStatusEnum = void 0;
1202
+ (function(StoryStatusEnum) {
1203
+ /**
1204
+ * 草稿
1205
+ */ StoryStatusEnum["DRAFT"] = "DRAFT";
1206
+ /**
1207
+ * 重新编辑
1208
+ */ StoryStatusEnum["CHANGING"] = "CHANGING";
1209
+ /**
1210
+ * 审阅中
1211
+ */ StoryStatusEnum["REVIEW"] = "REVIEW";
1212
+ /**
1213
+ * 通过
1214
+ */ StoryStatusEnum["APPROVED"] = "APPROVED";
1215
+ /**
1216
+ * 退回
1217
+ */ StoryStatusEnum["REJECTED"] = "REJECTED";
1218
+ /**
1219
+ * 已发布
1220
+ */ StoryStatusEnum["RELEASED"] = "RELEASED";
1221
+ /**
1222
+ * 下线存档
1223
+ */ StoryStatusEnum["ARCHIVED"] = "ARCHIVED";
1224
+ })(exports.StoryStatusEnum || (exports.StoryStatusEnum = {}));
1225
+ exports.AccessEnum = void 0;
1226
+ (function(AccessEnum) {
1227
+ /**
1228
+ * 可看到
1229
+ */ AccessEnum["View"] = "View";
1230
+ /**
1231
+ * 可读取详情
1232
+ */ AccessEnum["Read"] = "Read";
1233
+ /**
1234
+ * 可编辑
1235
+ */ AccessEnum["Write"] = "Write";
1236
+ })(exports.AccessEnum || (exports.AccessEnum = {}));
1237
+
1238
+ exports.SubscriptionType = void 0;
1239
+ (function(SubscriptionType) {
1240
+ SubscriptionType["CHART"] = "CHART";
1241
+ SubscriptionType["INDICATOR"] = "INDICATOR";
1242
+ })(exports.SubscriptionType || (exports.SubscriptionType = {}));
1243
+
1244
+ exports.VisitEntityEnum = void 0;
1245
+ (function(VisitEntityEnum) {
1246
+ VisitEntityEnum["DataSource"] = "DataSource";
1247
+ VisitEntityEnum["SemanticModel"] = "SemanticModel";
1248
+ VisitEntityEnum["Story"] = "Story";
1249
+ VisitEntityEnum["Widget"] = "Widget";
1250
+ VisitEntityEnum["Indicator"] = "Indicator";
1251
+ })(exports.VisitEntityEnum || (exports.VisitEntityEnum = {}));
1252
+ exports.VisitTypeEnum = void 0;
1253
+ (function(VisitTypeEnum) {
1254
+ VisitTypeEnum["View"] = "View";
1255
+ VisitTypeEnum["Data"] = "Data";
1256
+ })(exports.VisitTypeEnum || (exports.VisitTypeEnum = {}));
1257
+
1258
+ exports.AgentEventType = void 0;
1259
+ (function(AgentEventType) {
1260
+ AgentEventType["request"] = "request";
1261
+ AgentEventType["response"] = "response";
1262
+ AgentEventType["error"] = "error";
1263
+ })(exports.AgentEventType || (exports.AgentEventType = {}));
1264
+ exports.LocalAgentType = void 0;
1265
+ (function(LocalAgentType) {
1266
+ LocalAgentType[LocalAgentType["TENANT"] = 0] = "TENANT";
1267
+ LocalAgentType[LocalAgentType["USER"] = 1] = "USER";
1268
+ })(exports.LocalAgentType || (exports.LocalAgentType = {}));
1269
+ var TENANT_AGENT_LOCAL_URL = "agent-local-url";
1270
+
1271
+ exports.ApprovalPolicyTypesEnum = void 0;
1272
+ (function(ApprovalPolicyTypesEnum) {
1273
+ ApprovalPolicyTypesEnum[ApprovalPolicyTypesEnum["TIME_OFF"] = 1] = "TIME_OFF";
1274
+ ApprovalPolicyTypesEnum[ApprovalPolicyTypesEnum["EQUIPMENT_SHARING"] = 2] = "EQUIPMENT_SHARING";
1275
+ ApprovalPolicyTypesEnum[ApprovalPolicyTypesEnum["BUSINESS_TRIP"] = 3] = "BUSINESS_TRIP";
1276
+ })(exports.ApprovalPolicyTypesEnum || (exports.ApprovalPolicyTypesEnum = {}));
1277
+ exports.ApprovalPolicyTypesStringEnum = void 0;
1278
+ (function(ApprovalPolicyTypesStringEnum) {
1279
+ ApprovalPolicyTypesStringEnum["TIME_OFF"] = "TIME_OFF";
1280
+ ApprovalPolicyTypesStringEnum["EQUIPMENT_SHARING"] = "EQUIPMENT_SHARING";
1281
+ ApprovalPolicyTypesStringEnum["BUSINESS_TRIP"] = "BUSINESS_TRIP";
1282
+ ApprovalPolicyTypesStringEnum["INDICATOR"] = "INDICATOR";
1283
+ ApprovalPolicyTypesStringEnum["STORY"] = "STORY";
1284
+ ApprovalPolicyTypesStringEnum["BUSINESS_AREA"] = "BUSINESS_AREA";
1285
+ })(exports.ApprovalPolicyTypesStringEnum || (exports.ApprovalPolicyTypesStringEnum = {}));
1286
+
1287
+ exports.PermissionApprovalStatusTypesEnum = void 0;
1288
+ (function(PermissionApprovalStatusTypesEnum) {
1289
+ PermissionApprovalStatusTypesEnum[PermissionApprovalStatusTypesEnum["REQUESTED"] = 1] = "REQUESTED";
1290
+ PermissionApprovalStatusTypesEnum[PermissionApprovalStatusTypesEnum["APPROVED"] = 2] = "APPROVED";
1291
+ PermissionApprovalStatusTypesEnum[PermissionApprovalStatusTypesEnum["REFUSED"] = 3] = "REFUSED";
1292
+ })(exports.PermissionApprovalStatusTypesEnum || (exports.PermissionApprovalStatusTypesEnum = {}));
1293
+ var PermissionApprovalStatus = {
1294
+ REQUESTED: 1,
1295
+ APPROVED: 2,
1296
+ REFUSED: 3
1297
+ };
1298
+
1299
+ exports.ProjectStatusEnum = void 0;
1300
+ (function(ProjectStatusEnum) {
1301
+ /**
1302
+ * In use
1303
+ */ ProjectStatusEnum["Progressing"] = "Progressing";
1304
+ /**
1305
+ * Archived
1306
+ */ ProjectStatusEnum["Archived"] = "Archived";
1307
+ })(exports.ProjectStatusEnum || (exports.ProjectStatusEnum = {}));
1308
+
1309
+ exports.StoryTemplateType = void 0;
1310
+ (function(StoryTemplateType) {
1311
+ StoryTemplateType["Template"] = "Template";
1312
+ StoryTemplateType["Theme"] = "Theme";
1313
+ })(exports.StoryTemplateType || (exports.StoryTemplateType = {}));
1314
+
1315
+ exports.QueryStatusEnum = void 0;
1316
+ (function(QueryStatusEnum) {
1317
+ QueryStatusEnum["PENDING"] = "pending";
1318
+ QueryStatusEnum["RUNNING"] = "running";
1319
+ QueryStatusEnum["SUCCESS"] = "success";
1320
+ QueryStatusEnum["FAILED"] = "failed";
1321
+ })(exports.QueryStatusEnum || (exports.QueryStatusEnum = {}));
1322
+
1323
+ exports.ProviderType = void 0;
1324
+ (function(ProviderType) {
1325
+ ProviderType["CUSTOM"] = "custom";
1326
+ ProviderType["SYSTEM"] = "system";
1327
+ })(exports.ProviderType || (exports.ProviderType = {}));
1328
+ exports.CredentialFormTypeEnum = void 0;
1329
+ (function(CredentialFormTypeEnum) {
1330
+ CredentialFormTypeEnum["TEXT_INPUT"] = "text-input";
1331
+ CredentialFormTypeEnum["SECRET_INPUT"] = "secret-input";
1332
+ CredentialFormTypeEnum["SELECT"] = "select";
1333
+ CredentialFormTypeEnum["RADIO"] = "radio";
1334
+ })(exports.CredentialFormTypeEnum || (exports.CredentialFormTypeEnum = {}));
1335
+ exports.FetchFrom = void 0;
1336
+ (function(FetchFrom) {
1337
+ FetchFrom["PREDEFINED_MODEL"] = "predefined-model";
1338
+ FetchFrom["CUSTOMIZABLE_MODEL"] = "customizable-model";
1339
+ })(exports.FetchFrom || (exports.FetchFrom = {}));
1340
+ exports.ModelFeature = void 0;
1341
+ (function(ModelFeature) {
1342
+ ModelFeature["TOOL_CALL"] = "tool-call";
1343
+ ModelFeature["MULTI_TOOL_CALL"] = "multi-tool-call";
1344
+ ModelFeature["AGENT_THOUGHT"] = "agent-thought";
1345
+ ModelFeature["VISION"] = "vision";
1346
+ ModelFeature["STREAM_TOOL_CALL"] = "stream-tool-call";
1347
+ ModelFeature["VIDEO"] = "video";
1348
+ ModelFeature["STRUCTURED_OUTPUT"] = "structured-output";
1349
+ })(exports.ModelFeature || (exports.ModelFeature = {}));
1350
+ exports.ModelPropertyKey = void 0;
1351
+ (function(ModelPropertyKey) {
1352
+ ModelPropertyKey["MODE"] = "mode";
1353
+ ModelPropertyKey["CONTEXT_SIZE"] = "context_size";
1354
+ ModelPropertyKey["MAX_CHUNKS"] = "max_chunks";
1355
+ ModelPropertyKey["FILE_UPLOAD_LIMIT"] = "file_upload_limit";
1356
+ ModelPropertyKey["SUPPORTED_FILE_EXTENSIONS"] = "supported_file_extensions";
1357
+ ModelPropertyKey["MAX_CHARACTERS_PER_CHUNK"] = "max_characters_per_chunk";
1358
+ ModelPropertyKey["DEFAULT_VOICE"] = "default_voice";
1359
+ ModelPropertyKey["VOICES"] = "voices";
1360
+ ModelPropertyKey["WORD_LIMIT"] = "word_limit";
1361
+ ModelPropertyKey["AUDIO_TYPE"] = "audio_type";
1362
+ ModelPropertyKey["MAX_WORKERS"] = "max_workers";
1363
+ })(exports.ModelPropertyKey || (exports.ModelPropertyKey = {}));
1364
+ exports.ConfigurateMethod = void 0;
1365
+ (function(ConfigurateMethod) {
1366
+ ConfigurateMethod["PREDEFINED_MODEL"] = "predefined-model";
1367
+ ConfigurateMethod["CUSTOMIZABLE_MODEL"] = "customizable-model";
1368
+ })(exports.ConfigurateMethod || (exports.ConfigurateMethod = {}));
1369
+ exports.ParameterType = void 0;
1370
+ (function(ParameterType) {
1371
+ ParameterType["FLOAT"] = "float";
1372
+ ParameterType["INT"] = "int";
1373
+ ParameterType["STRING"] = "string";
1374
+ ParameterType["BOOLEAN"] = "boolean";
1375
+ ParameterType["TEXT"] = "text";
1376
+ })(exports.ParameterType || (exports.ParameterType = {}));
1377
+ var AI_MODEL_TYPE_VARIABLE = "__model_type";
1378
+ exports.PriceType = void 0;
1379
+ (function(PriceType) {
1380
+ PriceType["INPUT"] = "input";
1381
+ PriceType["OUTPUT"] = "output";
1382
+ })(exports.PriceType || (exports.PriceType = {}));
1383
+
1384
+ /**
1385
+ * Business roles for AI copilot (commands or contexts)
1386
+ */ exports.AiBusinessRole = void 0;
1387
+ (function(AiBusinessRole) {
1388
+ AiBusinessRole["FinanceBP"] = "finance_bp";
1389
+ AiBusinessRole["SupplyChainExpert"] = "supply_chain_expert";
1390
+ })(exports.AiBusinessRole || (exports.AiBusinessRole = {}));
1391
+ exports.AiProvider = void 0;
1392
+ (function(AiProvider) {
1393
+ /**
1394
+ * - https://js.langchain.com/docs/integrations/chat/openai/
1395
+ */ AiProvider["OpenAI"] = "openai";
1396
+ /**
1397
+ * - https://js.langchain.com/docs/integrations/chat/openai/
1398
+ */ AiProvider["Azure"] = "azure";
1399
+ // DashScope = 'dashscope',
1400
+ /**
1401
+ * - https://ollama.com/
1402
+ * - https://js.langchain.com/docs/integrations/chat/ollama/
1403
+ */ AiProvider["Ollama"] = "ollama";
1404
+ /**
1405
+ * - https://www.deepseek.com/zh
1406
+ * - https://js.langchain.com/docs/integrations/chat/openai/
1407
+ */ AiProvider["DeepSeek"] = "deepseek";
1408
+ /**
1409
+ * - https://docs.anthropic.com/en/home
1410
+ * - https://js.langchain.com/docs/integrations/chat/anthropic/
1411
+ */ AiProvider["Anthropic"] = "anthropic";
1412
+ /**
1413
+ * - https://www.aliyun.com/product/bailian
1414
+ * - https://js.langchain.com/docs/integrations/chat/alibaba_tongyi/
1415
+ */ AiProvider["AlibabaTongyi"] = "alibaba_tongyi";
1416
+ /**
1417
+ * - https://open.bigmodel.cn/
1418
+ * - https://js.langchain.com/docs/integrations/chat/openai/
1419
+ */ AiProvider["Zhipu"] = "zhipu";
1420
+ /**
1421
+ * - https://qianfan.cloud.baidu.com/
1422
+ * - https://js.langchain.com/docs/integrations/chat/baidu_qianfan/
1423
+ */ AiProvider["BaiduQianfan"] = "baidu_qianfan";
1424
+ /**
1425
+ * - https://www.together.ai/
1426
+ * - https://js.langchain.com/docs/integrations/chat/togetherai/
1427
+ */ AiProvider["Together"] = "together";
1428
+ /**
1429
+ * - https://platform.moonshot.cn/console
1430
+ * - https://js.langchain.com/docs/integrations/chat/openai/
1431
+ */ AiProvider["Moonshot"] = "moonshot";
1432
+ /**
1433
+ * - https://groq.com/
1434
+ * - https://js.langchain.com/docs/integrations/chat/openai/
1435
+ */ AiProvider["Groq"] = "groq";
1436
+ /**
1437
+ * - https://mistral.ai/
1438
+ *
1439
+ */ AiProvider["Mistral"] = "mistral";
1440
+ /**
1441
+ * - https://cohere.com/
1442
+ */ AiProvider["Cohere"] = "cohere";
1443
+ })(exports.AiProvider || (exports.AiProvider = {}));
1444
+ exports.AiProtocol = void 0;
1445
+ (function(AiProtocol) {
1446
+ AiProtocol["OpenAI"] = "openai";
1447
+ AiProtocol["Others"] = "others";
1448
+ })(exports.AiProtocol || (exports.AiProtocol = {}));
1449
+ var OpenAIEmbeddingsProviders = [
1450
+ "openai",
1451
+ "azure",
1452
+ "deepseek"
1453
+ ];
1454
+ var OllamaEmbeddingsProviders = [
1455
+ "ollama"
1456
+ ];
1457
+
1458
+ exports.ChatGatewayEvent = void 0;
1459
+ (function(ChatGatewayEvent) {
1460
+ ChatGatewayEvent["ACK"] = "ack";
1461
+ ChatGatewayEvent["ConversationCreated"] = "conversation_created";
1462
+ ChatGatewayEvent["Message"] = "message";
1463
+ ChatGatewayEvent["MessageStream"] = "message_stream";
1464
+ ChatGatewayEvent["StepStart"] = "step_start";
1465
+ ChatGatewayEvent["StepEnd"] = "step_end";
1466
+ ChatGatewayEvent["ToolStart"] = "tool_start";
1467
+ ChatGatewayEvent["ToolEnd"] = "tool_end";
1468
+ ChatGatewayEvent["ChainStart"] = "chain_start";
1469
+ ChatGatewayEvent["ChainEnd"] = "chain_end";
1470
+ ChatGatewayEvent["CancelChain"] = "cancel_chain";
1471
+ ChatGatewayEvent["ChainAborted"] = "chain_aborted";
1472
+ ChatGatewayEvent["Error"] = "error";
1473
+ ChatGatewayEvent["Agent"] = "agent";
1474
+ })(exports.ChatGatewayEvent || (exports.ChatGatewayEvent = {}));
1475
+
1476
+ exports.ChatMessageStepCategory = void 0;
1477
+ (function(ChatMessageStepCategory) {
1478
+ /**
1479
+ * List of items: urls, files, etc.
1480
+ */ ChatMessageStepCategory["List"] = "list";
1481
+ /**
1482
+ * Websearch results
1483
+ */ ChatMessageStepCategory["WebSearch"] = "web_search";
1484
+ /**
1485
+ * Files list
1486
+ */ ChatMessageStepCategory["Files"] = "files";
1487
+ /**
1488
+ * View a file
1489
+ */ ChatMessageStepCategory["File"] = "file";
1490
+ /**
1491
+ * Program Execution
1492
+ */ ChatMessageStepCategory["Program"] = "program";
1493
+ /**
1494
+ * Iframe
1495
+ */ ChatMessageStepCategory["Iframe"] = "iframe";
1496
+ ChatMessageStepCategory["Memory"] = "memory";
1497
+ ChatMessageStepCategory["Tasks"] = "tasks";
1498
+ /**
1499
+ * Knowledges (knowledge base retriever results)
1500
+ */ ChatMessageStepCategory["Knowledges"] = "knowledges";
1501
+ })(exports.ChatMessageStepCategory || (exports.ChatMessageStepCategory = {}));
1502
+ // Type guards
1503
+ /**
1504
+ * @deprecated use content in message
1505
+ */ function isMessageGroup(message) {
1506
+ return "messages" in message;
1507
+ }
1508
+
1509
+ exports.ChatMessageFeedbackRatingEnum = void 0;
1510
+ (function(ChatMessageFeedbackRatingEnum) {
1511
+ ChatMessageFeedbackRatingEnum["LIKE"] = "like";
1512
+ ChatMessageFeedbackRatingEnum["DISLIKE"] = "dislike";
1513
+ })(exports.ChatMessageFeedbackRatingEnum || (exports.ChatMessageFeedbackRatingEnum = {}));
1514
+
1515
+ var MEMORY_QA_PROMPT = "Summarize the experience of the above conversation and output a short question and answer.";
1516
+ var MEMORY_PROFILE_PROMPT = "Extract new user profile information from the above conversation in one short sentence. If no new information is available, return nothing.";
1517
+
1518
+ exports.AiProviderRole = void 0;
1519
+ (function(AiProviderRole) {
1520
+ AiProviderRole["Primary"] = "primary";
1521
+ AiProviderRole["Secondary"] = "secondary";
1522
+ AiProviderRole["Embedding"] = "embedding";
1523
+ AiProviderRole["Reasoning"] = "reasoning";
1524
+ })(exports.AiProviderRole || (exports.AiProviderRole = {}));
1525
+
1526
+ exports.AiFeatureEnum = void 0;
1527
+ (function(AiFeatureEnum) {
1528
+ AiFeatureEnum["FEATURE_COPILOT"] = "FEATURE_COPILOT";
1529
+ AiFeatureEnum["FEATURE_COPILOT_KNOWLEDGEBASE"] = "FEATURE_COPILOT_KNOWLEDGEBASE";
1530
+ AiFeatureEnum["FEATURE_COPILOT_CHAT"] = "FEATURE_COPILOT_CHAT";
1531
+ AiFeatureEnum["FEATURE_XPERT"] = "FEATURE_XPERT";
1532
+ })(exports.AiFeatureEnum || (exports.AiFeatureEnum = {}));
1533
+
1534
+ exports.VectorTypeEnum = void 0;
1535
+ (function(VectorTypeEnum) {
1536
+ VectorTypeEnum["ANALYTICDB"] = "analyticdb";
1537
+ VectorTypeEnum["CHROMA"] = "chroma";
1538
+ VectorTypeEnum["MILVUS"] = "milvus";
1539
+ VectorTypeEnum["MYSCALE"] = "myscale";
1540
+ VectorTypeEnum["PGVECTOR"] = "pgvector";
1541
+ VectorTypeEnum["PGVECTO_RS"] = "pgvecto-rs";
1542
+ VectorTypeEnum["QDRANT"] = "qdrant";
1543
+ VectorTypeEnum["RELYT"] = "relyt";
1544
+ VectorTypeEnum["TIDB_VECTOR"] = "tidb_vector";
1545
+ VectorTypeEnum["WEAVIATE"] = "weaviate";
1546
+ VectorTypeEnum["OPENSEARCH"] = "opensearch";
1547
+ VectorTypeEnum["TENCENT"] = "tencent";
1548
+ VectorTypeEnum["ORACLE"] = "oracle";
1549
+ VectorTypeEnum["ELASTICSEARCH"] = "elasticsearch";
1550
+ VectorTypeEnum["ELASTICSEARCH_JA"] = "elasticsearch-ja";
1551
+ VectorTypeEnum["LINDORM"] = "lindorm";
1552
+ VectorTypeEnum["COUCHBASE"] = "couchbase";
1553
+ VectorTypeEnum["BAIDU"] = "baidu";
1554
+ VectorTypeEnum["VIKINGDB"] = "vikingdb";
1555
+ VectorTypeEnum["UPSTASH"] = "upstash";
1556
+ VectorTypeEnum["TIDB_ON_QDRANT"] = "tidb_on_qdrant";
1557
+ VectorTypeEnum["OCEANBASE"] = "oceanbase";
1558
+ })(exports.VectorTypeEnum || (exports.VectorTypeEnum = {}));
1559
+
1560
+ exports.KDocumentWebTypeEnum = void 0;
1561
+ (function(KDocumentWebTypeEnum) {
1562
+ KDocumentWebTypeEnum["Playwright"] = "playwright";
1563
+ KDocumentWebTypeEnum["FireCrawl"] = "firecrawl";
1564
+ KDocumentWebTypeEnum["Notion"] = "notion";
1565
+ })(exports.KDocumentWebTypeEnum || (exports.KDocumentWebTypeEnum = {}));
1566
+ var KDocumentWebTypeOptions = [
1567
+ {
1568
+ value: "playwright",
1569
+ label: {
1570
+ en_US: "Playwright"
1571
+ },
1572
+ icon: '<svg width="100%" height="100%" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M136.444 221.556C123.558 225.213 115.104 231.625 109.535 238.032C114.869 233.364 122.014 229.08 131.652 226.348C141.51 223.554 149.92 223.574 156.869 224.915V219.481C150.941 218.939 144.145 219.371 136.444 221.556ZM108.946 175.876L61.0895 188.484C61.0895 188.484 61.9617 189.716 63.5767 191.36L104.153 180.668C104.153 180.668 103.578 188.077 98.5847 194.705C108.03 187.559 108.946 175.876 108.946 175.876ZM149.005 288.347C81.6582 306.486 46.0272 228.438 35.2396 187.928C30.2556 169.229 28.0799 155.067 27.5 145.928C27.4377 144.979 27.4665 144.179 27.5336 143.446C24.04 143.657 22.3674 145.473 22.7077 150.721C23.2876 159.855 25.4633 174.016 30.4473 192.721C41.2301 233.225 76.8659 311.273 144.213 293.134C158.872 289.185 169.885 281.992 178.152 272.81C170.532 279.692 160.995 285.112 149.005 288.347ZM161.661 128.11V132.903H188.077C187.535 131.206 186.989 129.677 186.447 128.11H161.661Z" fill="#2D4552"/>\n<path d="M193.981 167.584C205.861 170.958 212.144 179.287 215.465 186.658L228.711 190.42C228.711 190.42 226.904 164.623 203.57 157.995C181.741 151.793 168.308 170.124 166.674 172.496C173.024 167.972 182.297 164.268 193.981 167.584ZM299.422 186.777C277.573 180.547 264.145 198.916 262.535 201.255C268.89 196.736 278.158 193.031 289.837 196.362C301.698 199.741 307.976 208.06 311.307 215.436L324.572 219.212C324.572 219.212 322.736 193.41 299.422 186.777ZM286.262 254.795L176.072 223.99C176.072 223.99 177.265 230.038 181.842 237.869L274.617 263.805C282.255 259.386 286.262 254.795 286.262 254.795ZM209.867 321.102C122.618 297.71 133.166 186.543 147.284 133.865C153.097 112.156 159.073 96.0203 164.029 85.204C161.072 84.5953 158.623 86.1529 156.203 91.0746C150.941 101.747 144.212 119.124 137.7 143.45C123.586 196.127 113.038 307.29 200.283 330.682C241.406 341.699 273.442 324.955 297.323 298.659C274.655 319.19 245.714 330.701 209.867 321.102Z" fill="#2D4552"/>\n<path d="M161.661 262.296V239.863L99.3324 257.537C99.3324 257.537 103.938 230.777 136.444 221.556C146.302 218.762 154.713 218.781 161.661 220.123V128.11H192.869C189.471 117.61 186.184 109.526 183.423 103.909C178.856 94.612 174.174 100.775 163.545 109.665C156.059 115.919 137.139 129.261 108.668 136.933C80.1966 144.61 57.179 142.574 47.5752 140.911C33.9601 138.562 26.8387 135.572 27.5049 145.928C28.0847 155.062 30.2605 169.224 35.2445 187.928C46.0272 228.433 81.663 306.481 149.01 288.342C166.602 283.602 179.019 274.233 187.626 262.291H161.661V262.296ZM61.0848 188.484L108.946 175.876C108.946 175.876 107.551 194.288 89.6087 199.018C71.6614 203.743 61.0848 188.484 61.0848 188.484Z" fill="#E2574C"/>\n<path d="M341.786 129.174C329.345 131.355 299.498 134.072 262.612 124.185C225.716 114.304 201.236 97.0224 191.537 88.8994C177.788 77.3834 171.74 69.3802 165.788 81.4857C160.526 92.163 153.797 109.54 147.284 133.866C133.171 186.543 122.623 297.706 209.867 321.098C297.093 344.47 343.53 242.92 357.644 190.238C364.157 165.917 367.013 147.5 367.799 135.625C368.695 122.173 359.455 126.078 341.786 129.174ZM166.497 172.756C166.497 172.756 180.246 151.372 203.565 158C226.899 164.628 228.706 190.425 228.706 190.425L166.497 172.756ZM223.42 268.713C182.403 256.698 176.077 223.99 176.077 223.99L286.262 254.796C286.262 254.791 264.021 280.578 223.42 268.713ZM262.377 201.495C262.377 201.495 276.107 180.126 299.422 186.773C322.736 193.411 324.572 219.208 324.572 219.208L262.377 201.495Z" fill="#2EAD33"/>\n<path d="M139.88 246.04L99.3324 257.532C99.3324 257.532 103.737 232.44 133.607 222.496L110.647 136.33L108.663 136.933C80.1918 144.611 57.1742 142.574 47.5704 140.911C33.9554 138.563 26.834 135.572 27.5001 145.929C28.08 155.063 30.2557 169.224 35.2397 187.929C46.0225 228.433 81.6583 306.481 149.005 288.342L150.989 287.719L139.88 246.04ZM61.0848 188.485L108.946 175.876C108.946 175.876 107.551 194.288 89.6087 199.018C71.6615 203.743 61.0848 188.485 61.0848 188.485Z" fill="#D65348"/>\n<path d="M225.27 269.163L223.415 268.712C182.398 256.698 176.072 223.99 176.072 223.99L232.89 239.872L262.971 124.281L262.607 124.185C225.711 114.304 201.232 97.0224 191.532 88.8994C177.783 77.3834 171.735 69.3802 165.783 81.4857C160.526 92.163 153.797 109.54 147.284 133.866C133.171 186.543 122.623 297.706 209.867 321.097L211.655 321.5L225.27 269.163ZM166.497 172.756C166.497 172.756 180.246 151.372 203.565 158C226.899 164.628 228.706 190.425 228.706 190.425L166.497 172.756Z" fill="#1D8D22"/>\n<path d="M141.946 245.451L131.072 248.537C133.641 263.019 138.169 276.917 145.276 289.195C146.513 288.922 147.74 288.687 149 288.342C152.302 287.451 155.364 286.348 158.312 285.145C150.371 273.361 145.118 259.789 141.946 245.451ZM137.7 143.451C132.112 164.307 127.113 194.326 128.489 224.436C130.952 223.367 133.554 222.371 136.444 221.551L138.457 221.101C136.003 188.939 141.308 156.165 147.284 133.866C148.799 128.225 150.318 122.978 151.832 118.085C149.393 119.637 146.767 121.228 143.776 122.867C141.759 129.093 139.722 135.898 137.7 143.451Z" fill="#C04B41"/>\n</svg>'
1573
+ },
1574
+ {
1575
+ value: "firecrawl",
1576
+ label: {
1577
+ en_US: "FireCrawl"
1578
+ },
1579
+ icon: "\uD83D\uDD25"
1580
+ }
1581
+ ];
1582
+
1583
+ exports.WorkflowNodeTypeEnum = void 0;
1584
+ (function(WorkflowNodeTypeEnum) {
1585
+ /**
1586
+ * Trigger
1587
+ */ WorkflowNodeTypeEnum["TRIGGER"] = "trigger";
1588
+ /**
1589
+ * State Variable Assigner
1590
+ */ WorkflowNodeTypeEnum["ASSIGNER"] = "assigner";
1591
+ /**
1592
+ * Router
1593
+ */ WorkflowNodeTypeEnum["IF_ELSE"] = "if-else";
1594
+ WorkflowNodeTypeEnum["LIST_OPERATOR"] = "list-operator";
1595
+ WorkflowNodeTypeEnum["VARIABLE_AGGREGATOR"] = "variable-aggregator";
1596
+ WorkflowNodeTypeEnum["ITERATING"] = "iterating";
1597
+ WorkflowNodeTypeEnum["HTTP"] = "http";
1598
+ WorkflowNodeTypeEnum["SUBFLOW"] = "subflow";
1599
+ WorkflowNodeTypeEnum["TOOL"] = "tool";
1600
+ WorkflowNodeTypeEnum["AGENT_TOOL"] = "agent-tool";
1601
+ WorkflowNodeTypeEnum["NOTE"] = "note";
1602
+ /**
1603
+ * Task node, distribute tasks to sub-agents
1604
+ */ WorkflowNodeTypeEnum["TASK"] = "task";
1605
+ // Knowledge Pipeline nodes
1606
+ WorkflowNodeTypeEnum["SOURCE"] = "source";
1607
+ WorkflowNodeTypeEnum["PROCESSOR"] = "processor";
1608
+ WorkflowNodeTypeEnum["CHUNKER"] = "chunker";
1609
+ WorkflowNodeTypeEnum["UNDERSTANDING"] = "understanding";
1610
+ WorkflowNodeTypeEnum["KNOWLEDGE_BASE"] = "knowledgebase";
1611
+ // ===============================
1612
+ // 📦 Transform Nodes
1613
+ // ===============================
1614
+ WorkflowNodeTypeEnum["CLASSIFIER"] = "classifier";
1615
+ WorkflowNodeTypeEnum["KNOWLEDGE"] = "knowledge";
1616
+ WorkflowNodeTypeEnum["CODE"] = "code";
1617
+ WorkflowNodeTypeEnum["TEMPLATE"] = "template";
1618
+ WorkflowNodeTypeEnum["ANSWER"] = "answer";
1619
+ WorkflowNodeTypeEnum["JSON_STRINGIFY"] = "json-stringify";
1620
+ WorkflowNodeTypeEnum["JSON_PARSE"] = "json-parse";
1621
+ // ===============================
1622
+ // 📦 Database Operation Nodes
1623
+ // ===============================
1624
+ /**
1625
+ * Custom SQL
1626
+ */ WorkflowNodeTypeEnum["DB_SQL"] = "db-sql";
1627
+ /**
1628
+ * Insert data (INSERT)
1629
+ */ WorkflowNodeTypeEnum["DB_INSERT"] = "db-insert";
1630
+ /**
1631
+ * Update data (UPDATE)
1632
+ */ WorkflowNodeTypeEnum["DB_UPDATE"] = "db-update";
1633
+ /**
1634
+ * Delete data (DELETE)
1635
+ */ WorkflowNodeTypeEnum["DB_DELETE"] = "db-delete";
1636
+ /**
1637
+ * Query data (SELECT)
1638
+ */ WorkflowNodeTypeEnum["DB_QUERY"] = "db-query";
1639
+ // ===============================
1640
+ // 🏆 Pro Nodes
1641
+ // ===============================
1642
+ WorkflowNodeTypeEnum["MIDDLEWARE"] = "middleware";
1643
+ WorkflowNodeTypeEnum["SKILL"] = "skill";
1644
+ })(exports.WorkflowNodeTypeEnum || (exports.WorkflowNodeTypeEnum = {}));
1645
+ exports.VariableOperationEnum = void 0;
1646
+ (function(VariableOperationEnum) {
1647
+ VariableOperationEnum["APPEND"] = "append";
1648
+ VariableOperationEnum["EXTEND"] = "extend";
1649
+ VariableOperationEnum["OVERWRITE"] = "overwrite";
1650
+ VariableOperationEnum["CLEAR"] = "clear";
1651
+ })(exports.VariableOperationEnum || (exports.VariableOperationEnum = {}));
1652
+ /**
1653
+ * The parameter name that represents the entire current element in array
1654
+ */ var IteratingItemParameterName = "$item";
1655
+ var IteratingIndexParameterName = "$index";
1656
+ exports.WorkflowLogicalOperator = void 0;
1657
+ (function(WorkflowLogicalOperator) {
1658
+ WorkflowLogicalOperator["AND"] = "and";
1659
+ WorkflowLogicalOperator["OR"] = "or";
1660
+ })(exports.WorkflowLogicalOperator || (exports.WorkflowLogicalOperator = {}));
1661
+ exports.WorkflowComparisonOperator = void 0;
1662
+ (function(WorkflowComparisonOperator) {
1663
+ WorkflowComparisonOperator["CONTAINS"] = "contains";
1664
+ WorkflowComparisonOperator["NOT_CONTAINS"] = "not-contains";
1665
+ WorkflowComparisonOperator["EQUAL"] = "equal";
1666
+ WorkflowComparisonOperator["NOT_EQUAL"] = "not-equal";
1667
+ WorkflowComparisonOperator["GT"] = "gt";
1668
+ WorkflowComparisonOperator["LT"] = "lt";
1669
+ WorkflowComparisonOperator["GE"] = "ge";
1670
+ WorkflowComparisonOperator["LE"] = "le";
1671
+ WorkflowComparisonOperator["STARTS_WITH"] = "starts-with";
1672
+ WorkflowComparisonOperator["ENDS_WITH"] = "ends-with";
1673
+ WorkflowComparisonOperator["EMPTY"] = "empty";
1674
+ WorkflowComparisonOperator["NOT_EMPTY"] = "not-empty";
1675
+ WorkflowComparisonOperator["IS_TRUE"] = "is-true";
1676
+ WorkflowComparisonOperator["IS_FALSE"] = "is-false";
1677
+ WorkflowComparisonOperator["LIKE"] = "like";
1678
+ WorkflowComparisonOperator["NOT_LIKE"] = "not-like";
1679
+ })(exports.WorkflowComparisonOperator || (exports.WorkflowComparisonOperator = {}));
1680
+ function genXpertTriggerKey() {
1681
+ return letterStartSUID("Trigger_");
1682
+ }
1683
+ function genListOperatorKey() {
1684
+ return letterStartSUID("ListOperator_");
1685
+ }
1686
+ function genVariableAggregatorKey() {
1687
+ return letterStartSUID("VariableAggregator_");
1688
+ }
1689
+ function genJSONStringifyKey() {
1690
+ return letterStartSUID("JSONStringify_");
1691
+ }
1692
+ function genJSONParseKey() {
1693
+ return letterStartSUID("JSONParse_");
1694
+ }
1695
+ function isAgentKey(key) {
1696
+ return key === null || key === void 0 ? void 0 : key.toLowerCase().startsWith("agent_");
1697
+ }
1698
+ function isRouterKey(key) {
1699
+ return key === null || key === void 0 ? void 0 : key.toLowerCase().startsWith("router_");
1700
+ }
1701
+ function isIteratingKey(key) {
1702
+ return key === null || key === void 0 ? void 0 : key.toLowerCase().startsWith("iterating_");
1703
+ }
1704
+ function isWorkflowKey(key) {
1705
+ return isRouterKey(key) || isIteratingKey(key);
1706
+ }
1707
+ function workflowNodeIdentifier(node) {
1708
+ return node.title || node.key;
1709
+ }
1710
+
1711
+ exports.XpertTypeEnum = void 0;
1712
+ (function(XpertTypeEnum) {
1713
+ /**
1714
+ * Chat Agents
1715
+ */ XpertTypeEnum["Agent"] = "agent";
1716
+ /**
1717
+ * Copilot in UI
1718
+ */ XpertTypeEnum["Copilot"] = "copilot";
1719
+ /**
1720
+ * Knowledge Workflow
1721
+ */ XpertTypeEnum["Knowledge"] = "knowledge";
1722
+ })(exports.XpertTypeEnum || (exports.XpertTypeEnum = {}));
1723
+ exports.LongTermMemoryTypeEnum = void 0;
1724
+ (function(LongTermMemoryTypeEnum) {
1725
+ LongTermMemoryTypeEnum["PROFILE"] = "profile";
1726
+ LongTermMemoryTypeEnum["QA"] = "qa";
1727
+ })(exports.LongTermMemoryTypeEnum || (exports.LongTermMemoryTypeEnum = {}));
1728
+ exports.XpertParameterTypeEnum = void 0;
1729
+ (function(XpertParameterTypeEnum) {
1730
+ /**
1731
+ * @deprecated use string
1732
+ */ XpertParameterTypeEnum["TEXT"] = "text";
1733
+ /**
1734
+ * @deprecated use string
1735
+ */ XpertParameterTypeEnum["PARAGRAPH"] = "paragraph";
1736
+ XpertParameterTypeEnum["STRING"] = "string";
1737
+ XpertParameterTypeEnum["NUMBER"] = "number";
1738
+ XpertParameterTypeEnum["OBJECT"] = "object";
1739
+ XpertParameterTypeEnum["SELECT"] = "select";
1740
+ XpertParameterTypeEnum["FILE"] = "file";
1741
+ XpertParameterTypeEnum["ARRAY_STRING"] = "array[string]";
1742
+ XpertParameterTypeEnum["ARRAY_NUMBER"] = "array[number]";
1743
+ XpertParameterTypeEnum["ARRAY"] = "array[object]";
1744
+ XpertParameterTypeEnum["ARRAY_FILE"] = "array[file]";
1745
+ XpertParameterTypeEnum["ARRAY_DOCUMENT"] = "array[document]";
1746
+ XpertParameterTypeEnum["BOOLEAN"] = "boolean";
1747
+ XpertParameterTypeEnum["SECRET"] = "secret";
1748
+ })(exports.XpertParameterTypeEnum || (exports.XpertParameterTypeEnum = {}));
1749
+ exports.ChatMessageTypeEnum = void 0;
1750
+ (function(ChatMessageTypeEnum) {
1751
+ // LOG = 'log',
1752
+ ChatMessageTypeEnum["MESSAGE"] = "message";
1753
+ ChatMessageTypeEnum["EVENT"] = "event";
1754
+ })(exports.ChatMessageTypeEnum || (exports.ChatMessageTypeEnum = {}));
1755
+ exports.ChatMessageEventTypeEnum = void 0;
1756
+ (function(ChatMessageEventTypeEnum) {
1757
+ ChatMessageEventTypeEnum["ON_CONVERSATION_START"] = "on_conversation_start";
1758
+ ChatMessageEventTypeEnum["ON_CONVERSATION_END"] = "on_conversation_end";
1759
+ ChatMessageEventTypeEnum["ON_MESSAGE_START"] = "on_message_start";
1760
+ ChatMessageEventTypeEnum["ON_MESSAGE_END"] = "on_message_end";
1761
+ ChatMessageEventTypeEnum["ON_TOOL_START"] = "on_tool_start";
1762
+ ChatMessageEventTypeEnum["ON_TOOL_END"] = "on_tool_end";
1763
+ ChatMessageEventTypeEnum["ON_TOOL_ERROR"] = "on_tool_error";
1764
+ /**
1765
+ * Step message in tool call
1766
+ */ ChatMessageEventTypeEnum["ON_TOOL_MESSAGE"] = "on_tool_message";
1767
+ ChatMessageEventTypeEnum["ON_AGENT_START"] = "on_agent_start";
1768
+ ChatMessageEventTypeEnum["ON_AGENT_END"] = "on_agent_end";
1769
+ ChatMessageEventTypeEnum["ON_RETRIEVER_START"] = "on_retriever_start";
1770
+ ChatMessageEventTypeEnum["ON_RETRIEVER_END"] = "on_retriever_end";
1771
+ ChatMessageEventTypeEnum["ON_RETRIEVER_ERROR"] = "on_retriever_error";
1772
+ ChatMessageEventTypeEnum["ON_INTERRUPT"] = "on_interrupt";
1773
+ ChatMessageEventTypeEnum["ON_ERROR"] = "on_error";
1774
+ ChatMessageEventTypeEnum["ON_CHAT_EVENT"] = "on_chat_event";
1775
+ })(exports.ChatMessageEventTypeEnum || (exports.ChatMessageEventTypeEnum = {}));
1776
+
1777
+ function agentLabel(agent) {
1778
+ return agent.title || agent.name || agent.key;
1779
+ }
1780
+ function agentUniqueName(agent) {
1781
+ return agent ? convertToUrlPath(agent.name) || agent.key : null;
1782
+ }
1783
+ function convertToUrlPath(title) {
1784
+ return title === null || title === void 0 ? void 0 : title.toLowerCase() // Convert to lowercase
1785
+ .replace(/\s+/g, "-") // Replace spaces with -
1786
+ .replace(/[^a-z0-9-]/g, ""); // Remove non-alphanumeric characters
1787
+ }
1788
+ var VariableOperations = [
1789
+ {
1790
+ value: "append",
1791
+ label: {
1792
+ zh_Hans: "追加",
1793
+ en_US: "Append"
1794
+ }
1795
+ },
1796
+ {
1797
+ value: "extends",
1798
+ label: {
1799
+ zh_Hans: "扩展",
1800
+ en_US: "Extend"
1801
+ }
1802
+ },
1803
+ {
1804
+ value: "overwrite",
1805
+ label: {
1806
+ zh_Hans: "覆盖",
1807
+ en_US: "Overwrite"
1808
+ }
1809
+ },
1810
+ {
1811
+ value: "clear",
1812
+ label: {
1813
+ zh_Hans: "清除",
1814
+ en_US: "Clear"
1815
+ }
1816
+ }
1817
+ ];
1818
+
1819
+ function _array_like_to_array$4(arr, len) {
1820
+ if (len == null || len > arr.length) len = arr.length;
1821
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
1822
+ return arr2;
1823
+ }
1824
+ function _array_with_holes$3(arr) {
1825
+ if (Array.isArray(arr)) return arr;
1826
+ }
1827
+ function _define_property$3(obj, key, value) {
1828
+ if (key in obj) {
1829
+ Object.defineProperty(obj, key, {
1830
+ value: value,
1831
+ enumerable: true,
1832
+ configurable: true,
1833
+ writable: true
1834
+ });
1835
+ } else {
1836
+ obj[key] = value;
1837
+ }
1838
+ return obj;
1839
+ }
1840
+ function _iterable_to_array_limit$2(arr, i) {
1841
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1842
+ if (_i == null) return;
1843
+ var _arr = [];
1844
+ var _n = true;
1845
+ var _d = false;
1846
+ var _s, _e;
1847
+ try {
1848
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
1849
+ _arr.push(_s.value);
1850
+ if (i && _arr.length === i) break;
1851
+ }
1852
+ } catch (err) {
1853
+ _d = true;
1854
+ _e = err;
1855
+ } finally{
1856
+ try {
1857
+ if (!_n && _i["return"] != null) _i["return"]();
1858
+ } finally{
1859
+ if (_d) throw _e;
1860
+ }
1861
+ }
1862
+ return _arr;
1863
+ }
1864
+ function _non_iterable_rest$3() {
1865
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1866
+ }
1867
+ function _object_spread$2(target) {
1868
+ for(var i = 1; i < arguments.length; i++){
1869
+ var source = arguments[i] != null ? arguments[i] : {};
1870
+ var ownKeys = Object.keys(source);
1871
+ if (typeof Object.getOwnPropertySymbols === "function") {
1872
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
1873
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
1874
+ }));
1875
+ }
1876
+ ownKeys.forEach(function(key) {
1877
+ _define_property$3(target, key, source[key]);
1878
+ });
1879
+ }
1880
+ return target;
1881
+ }
1882
+ function ownKeys$1(object, enumerableOnly) {
1883
+ var keys = Object.keys(object);
1884
+ if (Object.getOwnPropertySymbols) {
1885
+ var symbols = Object.getOwnPropertySymbols(object);
1886
+ keys.push.apply(keys, symbols);
1887
+ }
1888
+ return keys;
1889
+ }
1890
+ function _object_spread_props$1(target, source) {
1891
+ source = source != null ? source : {};
1892
+ if (Object.getOwnPropertyDescriptors) {
1893
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1894
+ } else {
1895
+ ownKeys$1(Object(source)).forEach(function(key) {
1896
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1897
+ });
1898
+ }
1899
+ return target;
1900
+ }
1901
+ function _sliced_to_array$2(arr, i) {
1902
+ return _array_with_holes$3(arr) || _iterable_to_array_limit$2(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$3();
1903
+ }
1904
+ function _unsupported_iterable_to_array$4(o, minLen) {
1905
+ if (!o) return;
1906
+ if (typeof o === "string") return _array_like_to_array$4(o, minLen);
1907
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1908
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1909
+ if (n === "Map" || n === "Set") return Array.from(n);
1910
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
1911
+ }
1912
+ /**
1913
+ * @deprecated can use getCurrentTaskInput instead?
1914
+ */ var CONTEXT_VARIABLE_CURRENTSTATE = "currentState";
1915
+ var STATE_VARIABLE_SYS = "sys";
1916
+ var STATE_VARIABLE_HUMAN = "human";
1917
+ var GRAPH_NODE_SUMMARIZE_CONVERSATION = "summarize_conversation";
1918
+ var GRAPH_NODE_TITLE_CONVERSATION = "title_conversation";
1919
+ var STATE_VARIABLE_FILES = "files";
1920
+ var STATE_VARIABLE_INPUT = "input";
1921
+ var STATE_SYS_VOLUME = "volume";
1922
+ var STATE_SYS_WORKSPACE_PATH = "workspace_path";
1923
+ var STATE_SYS_WORKSPACE_URL = "workspace_url";
1924
+ var STATE_VARIABLE_TITLE_CHANNEL = channelName("title");
1925
+ // Helpers
1926
+ function channelName(name) {
1927
+ return name.toLowerCase() + "_channel";
1928
+ }
1929
+ function messageContentText(content) {
1930
+ return typeof content === "string" ? content : content.type === "text" ? content.text : "";
1931
+ }
1932
+ function getWorkspaceFromRunnable(configurable) {
1933
+ return (configurable === null || configurable === void 0 ? void 0 : configurable.projectId) ? {
1934
+ type: "project",
1935
+ id: ""
1936
+ } : (configurable === null || configurable === void 0 ? void 0 : configurable.thread_id) ? {
1937
+ type: "conversation",
1938
+ id: configurable.thread_id
1939
+ } : {};
1940
+ }
1941
+ function getToolCallFromConfig(config) {
1942
+ var _config_configurable;
1943
+ return (config === null || config === void 0 ? void 0 : config.toolCall) || (config === null || config === void 0 ? void 0 : (_config_configurable = config.configurable) === null || _config_configurable === void 0 ? void 0 : _config_configurable.toolCall);
1944
+ }
1945
+ function getToolCallIdFromConfig(config) {
1946
+ var _config_metadata, _config_configurable, _getToolCallFromConfig;
1947
+ return ((_config_metadata = config.metadata) === null || _config_metadata === void 0 ? void 0 : _config_metadata.tool_call_id) || (config === null || config === void 0 ? void 0 : (_config_configurable = config.configurable) === null || _config_configurable === void 0 ? void 0 : _config_configurable.tool_call_id) || ((_getToolCallFromConfig = getToolCallFromConfig(config)) === null || _getToolCallFromConfig === void 0 ? void 0 : _getToolCallFromConfig.id);
1948
+ }
1949
+ /**
1950
+ * Compute long-term memory namespace:
1951
+ * 1. When a user talks to a digital expert individually, use `ExpertId` + `UserId` to store memory
1952
+ * 2. When talking to a digital expert in a project, all users and digital experts share `ProjectId` to store memory
1953
+ *
1954
+ * @param config
1955
+ * @returns
1956
+ */ function getStoreNamespace(config) {
1957
+ var configurable = config.configurable;
1958
+ return configurableStoreNamespace(configurable);
1959
+ }
1960
+ function configurableStoreNamespace(configurable) {
1961
+ return (configurable === null || configurable === void 0 ? void 0 : configurable.projectId) ? [
1962
+ configurable === null || configurable === void 0 ? void 0 : configurable.projectId
1963
+ ] : (configurable === null || configurable === void 0 ? void 0 : configurable.userId) ? [
1964
+ configurable.xpertId,
1965
+ configurable.userId
1966
+ ] : [];
1967
+ }
1968
+ /**
1969
+ * Set value into variable of state.
1970
+ *
1971
+ * @param state
1972
+ * @param varName
1973
+ * @param value
1974
+ * @returns
1975
+ */ function setStateVariable(state, varName, value) {
1976
+ var _varName_split = _sliced_to_array$2(varName.split("."), 2), agentChannelName = _varName_split[0], variableName = _varName_split[1];
1977
+ if (variableName) {
1978
+ var _state_agentChannelName;
1979
+ state[agentChannelName] = _object_spread_props$1(_object_spread$2({}, (_state_agentChannelName = state[agentChannelName]) !== null && _state_agentChannelName !== void 0 ? _state_agentChannelName : {}), _define_property$3({}, variableName, value));
1980
+ } else {
1981
+ state[agentChannelName] = value;
1982
+ }
1983
+ return state;
1984
+ }
1985
+ /**
1986
+ * Get agent variable group from graph.
1987
+ *
1988
+ * @param key
1989
+ * @param graph
1990
+ * @returns
1991
+ */ function getAgentVarGroup(key, graph) {
1992
+ var _agent_options;
1993
+ var node = graph.nodes.find(function(_) {
1994
+ return _.type === "agent" && _.key === key;
1995
+ });
1996
+ var variables = [];
1997
+ var varGroup = {
1998
+ group: {
1999
+ name: channelName(node.key),
2000
+ description: {
2001
+ en_US: agentLabel(node.entity)
2002
+ }
2003
+ },
2004
+ variables: variables
2005
+ };
2006
+ variables.push({
2007
+ name: "messages",
2008
+ type: exports.XpertParameterTypeEnum.ARRAY,
2009
+ description: {
2010
+ zh_Hans: "消息列表",
2011
+ en_US: "Message List"
2012
+ }
2013
+ });
2014
+ variables.push({
2015
+ name: "output",
2016
+ type: exports.XpertParameterTypeEnum.STRING,
2017
+ description: {
2018
+ zh_Hans: "输出",
2019
+ en_US: "Output"
2020
+ }
2021
+ });
2022
+ variables.push({
2023
+ name: "error",
2024
+ type: exports.XpertParameterTypeEnum.STRING,
2025
+ description: {
2026
+ zh_Hans: "错误",
2027
+ en_US: "Error"
2028
+ }
2029
+ });
2030
+ var agent = node.entity;
2031
+ if (((_agent_options = agent.options) === null || _agent_options === void 0 ? void 0 : _agent_options.structuredOutputMethod) && agent.outputVariables) {
2032
+ agent.outputVariables.forEach(function(variable) {
2033
+ variables.push({
2034
+ name: variable.name || "",
2035
+ type: variable.type,
2036
+ description: variable.description,
2037
+ item: variable.item
2038
+ });
2039
+ });
2040
+ }
2041
+ return varGroup;
2042
+ }
2043
+ // Swarm
2044
+ /**
2045
+ * Get swarm partners of agent in team
2046
+ *
2047
+ * @param graph
2048
+ * @param agentKey
2049
+ */ function getSwarmPartners(graph, agentKey, partners, leaderKey) {
2050
+ var connections = graph.connections.filter(function(conn) {
2051
+ return conn.type === "agent" && conn.to === agentKey && (leaderKey ? conn.from !== leaderKey : true) && graph.connections.some(function(_) {
2052
+ return _.type === "agent" && _.to === conn.from && _.from === agentKey;
2053
+ });
2054
+ });
2055
+ connections.forEach(function(conn) {
2056
+ var key = conn.from;
2057
+ if (partners.indexOf(key) < 0) {
2058
+ partners.push(key);
2059
+ getSwarmPartners(graph, key, partners);
2060
+ }
2061
+ });
2062
+ return partners;
2063
+ }
2064
+ function getWorkflowTriggers(graph, from) {
2065
+ return graph.nodes.filter(function(node) {
2066
+ return node.type === "workflow" && node.entity.type === exports.WorkflowNodeTypeEnum.TRIGGER && node.entity.from === from;
2067
+ });
2068
+ }
2069
+
2070
+ exports.KnowledgeProviderEnum = void 0;
2071
+ (function(KnowledgeProviderEnum) {
2072
+ KnowledgeProviderEnum["Internal"] = "internal";
2073
+ })(exports.KnowledgeProviderEnum || (exports.KnowledgeProviderEnum = {}));
2074
+ exports.KnowledgebaseTypeEnum = void 0;
2075
+ (function(KnowledgebaseTypeEnum) {
2076
+ KnowledgebaseTypeEnum["Standard"] = "standard";
2077
+ KnowledgebaseTypeEnum["External"] = "external";
2078
+ })(exports.KnowledgebaseTypeEnum || (exports.KnowledgebaseTypeEnum = {}));
2079
+ exports.KnowledgeStructureEnum = void 0;
2080
+ (function(KnowledgeStructureEnum) {
2081
+ KnowledgeStructureEnum["General"] = "general";
2082
+ KnowledgeStructureEnum["ParentChild"] = "parent-child";
2083
+ KnowledgeStructureEnum["QA"] = "qa";
2084
+ })(exports.KnowledgeStructureEnum || (exports.KnowledgeStructureEnum = {}));
2085
+ exports.KnowledgebasePermission = void 0;
2086
+ (function(KnowledgebasePermission) {
2087
+ /**
2088
+ * Only visible to you
2089
+ * @default
2090
+ */ KnowledgebasePermission["Private"] = "private";
2091
+ /**
2092
+ * Visible to all members in the organization
2093
+ */ KnowledgebasePermission["Organization"] = "organization";
2094
+ /**
2095
+ * Visible to all members in the tenant
2096
+ */ KnowledgebasePermission["Public"] = "public";
2097
+ })(exports.KnowledgebasePermission || (exports.KnowledgebasePermission = {}));
2098
+ /**
2099
+ * Channel name for knowledgebase pipeline
2100
+ */ var KnowledgebaseChannel = channelName("knowledgebase");
2101
+ /**
2102
+ * Task ID of a knowledgebase run
2103
+ */ var KnowledgeTask = "task_id";
2104
+ /**
2105
+ * Specify the data source to run
2106
+ */ var KNOWLEDGE_SOURCES_NAME = "sources";
2107
+ var KNOWLEDGE_DOCUMENTS_NAME = "documents";
2108
+ var KNOWLEDGE_FOLDER_ID_NAME = "folder_id";
2109
+ var KNOWLEDGE_STAGE_NAME = "stage";
2110
+
2111
+ exports.DocumentSourceProviderCategoryEnum = void 0;
2112
+ (function(DocumentSourceProviderCategoryEnum) {
2113
+ /**
2114
+ * Local files uploaded directly to the system
2115
+ */ DocumentSourceProviderCategoryEnum["LocalFile"] = "local-file";
2116
+ /**
2117
+ * Remote file systems, e.g. S3, FTP, etc.
2118
+ */ DocumentSourceProviderCategoryEnum["FileSystem"] = "file-system";
2119
+ /**
2120
+ * Online documents, e.g. public URLs, Google Docs, etc.
2121
+ */ DocumentSourceProviderCategoryEnum["OnlineDocument"] = "online-document";
2122
+ /**
2123
+ * Web crawling from public websites
2124
+ */ DocumentSourceProviderCategoryEnum["WebCrawl"] = "web-crawl";
2125
+ /**
2126
+ * Database connections, e.g. MySQL, PostgreSQL, etc.
2127
+ * @deprecated Planning
2128
+ */ DocumentSourceProviderCategoryEnum["Database"] = "database";
2129
+ })(exports.DocumentSourceProviderCategoryEnum || (exports.DocumentSourceProviderCategoryEnum = {}));
2130
+ function genPipelineSourceKey() {
2131
+ return letterStartSUID("Source_");
2132
+ }
2133
+ function genPipelineProcessorKey() {
2134
+ return letterStartSUID("Processor_");
2135
+ }
2136
+ function genPipelineChunkerKey() {
2137
+ return letterStartSUID("Chunker_");
2138
+ }
2139
+ function genPipelineUnderstandingKey() {
2140
+ return letterStartSUID("Understanding_");
2141
+ }
2142
+ function genPipelineKnowledgeBaseKey() {
2143
+ return letterStartSUID("KnowledgeBase_");
2144
+ }
2145
+
2146
+ function _define_property$2(obj, key, value) {
2147
+ if (key in obj) {
2148
+ Object.defineProperty(obj, key, {
2149
+ value: value,
2150
+ enumerable: true,
2151
+ configurable: true,
2152
+ writable: true
2153
+ });
2154
+ } else {
2155
+ obj[key] = value;
2156
+ }
2157
+ return obj;
2158
+ }
2159
+ function _object_spread$1(target) {
2160
+ for(var i = 1; i < arguments.length; i++){
2161
+ var source = arguments[i] != null ? arguments[i] : {};
2162
+ var ownKeys = Object.keys(source);
2163
+ if (typeof Object.getOwnPropertySymbols === "function") {
2164
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
2165
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
2166
+ }));
2167
+ }
2168
+ ownKeys.forEach(function(key) {
2169
+ _define_property$2(target, key, source[key]);
2170
+ });
2171
+ }
2172
+ return target;
2173
+ }
2174
+ exports.DocumentTypeEnum = void 0;
2175
+ (function(DocumentTypeEnum) {
2176
+ /**
2177
+ * Folder, parent of other documents
2178
+ */ DocumentTypeEnum["FOLDER"] = "folder";
2179
+ /**
2180
+ * Local files
2181
+ * @deprecated use DocumentSourceProviderCategoryEnum local file type instead
2182
+ */ DocumentTypeEnum["FILE"] = "file";
2183
+ })(exports.DocumentTypeEnum || (exports.DocumentTypeEnum = {}));
2184
+ var KDocumentSourceType = _object_spread$1({}, exports.DocumentSourceProviderCategoryEnum, exports.DocumentTypeEnum);
2185
+ exports.KBDocumentCategoryEnum = void 0;
2186
+ (function(KBDocumentCategoryEnum) {
2187
+ KBDocumentCategoryEnum["Text"] = "text";
2188
+ KBDocumentCategoryEnum["Image"] = "image";
2189
+ KBDocumentCategoryEnum["Audio"] = "audio";
2190
+ KBDocumentCategoryEnum["Video"] = "video";
2191
+ KBDocumentCategoryEnum["Sheet"] = "sheet";
2192
+ KBDocumentCategoryEnum["Other"] = "other";
2193
+ })(exports.KBDocumentCategoryEnum || (exports.KBDocumentCategoryEnum = {}));
2194
+ exports.KBDocumentStatusEnum = void 0;
2195
+ (function(KBDocumentStatusEnum) {
2196
+ KBDocumentStatusEnum["WAITING"] = "waiting";
2197
+ KBDocumentStatusEnum["VALIDATE"] = "validate";
2198
+ KBDocumentStatusEnum["RUNNING"] = "running";
2199
+ KBDocumentStatusEnum["TRANSFORMED"] = "transformed";
2200
+ KBDocumentStatusEnum["SPLITTED"] = "splitted";
2201
+ KBDocumentStatusEnum["UNDERSTOOD"] = "understood";
2202
+ KBDocumentStatusEnum["EMBEDDING"] = "embedding";
2203
+ KBDocumentStatusEnum["CANCEL"] = "cancel";
2204
+ KBDocumentStatusEnum["FINISH"] = "finish";
2205
+ KBDocumentStatusEnum["ERROR"] = "error";
2206
+ })(exports.KBDocumentStatusEnum || (exports.KBDocumentStatusEnum = {}));
2207
+ function isDocumentSheet(type) {
2208
+ return [
2209
+ "csv",
2210
+ "xls",
2211
+ "xlsx",
2212
+ "ods",
2213
+ "vnd.openxmlformats-officedocument.spreadsheetml.sheet"
2214
+ ].includes(type);
2215
+ }
2216
+ function isImageType(type) {
2217
+ return [
2218
+ "jpg",
2219
+ "jpeg",
2220
+ "png",
2221
+ "gif",
2222
+ "bmp",
2223
+ "tiff",
2224
+ "svg",
2225
+ "webp"
2226
+ ].includes(type);
2227
+ }
2228
+ function isVideoType(type) {
2229
+ return [
2230
+ "mp4",
2231
+ "avi",
2232
+ "mov",
2233
+ "wmv",
2234
+ "flv",
2235
+ "mkv",
2236
+ "webm"
2237
+ ].includes(type);
2238
+ }
2239
+ function isAudioType(type) {
2240
+ return [
2241
+ "mp3",
2242
+ "wav",
2243
+ "aac",
2244
+ "flac",
2245
+ "ogg",
2246
+ "m4a"
2247
+ ].includes(type);
2248
+ }
2249
+ function classificateDocumentCategory(entity) {
2250
+ return isDocumentSheet(entity.type) ? "sheet" : isImageType(entity.type) ? "image" : isVideoType(entity.type) ? "video" : isAudioType(entity.type) ? "audio" : "text";
2251
+ }
2252
+ /**
2253
+ * System standard Metadata field definition constants
2254
+ * It can be used for rendering, validation, sorting, displaying descriptions, etc.
2255
+ */ var STANDARD_METADATA_FIELDS = [
2256
+ // Document Info
2257
+ {
2258
+ group: {
2259
+ en_US: "Document Info",
2260
+ zh_Hans: "文档信息"
2261
+ },
2262
+ fields: [
2263
+ {
2264
+ key: "title",
2265
+ label: {
2266
+ en_US: "Original File Name",
2267
+ zh_Hans: "原始文件名称"
2268
+ },
2269
+ type: "string"
2270
+ }
2271
+ ]
2272
+ },
2273
+ // Technical Parameters
2274
+ {
2275
+ group: {
2276
+ en_US: "Technical Parameters",
2277
+ zh_Hans: "技术参数"
2278
+ },
2279
+ fields: [
2280
+ {
2281
+ key: "tokens",
2282
+ label: {
2283
+ en_US: "Tokens",
2284
+ zh_Hans: "词元"
2285
+ },
2286
+ type: "number"
2287
+ }
2288
+ ]
2289
+ }
2290
+ ];
2291
+
2292
+ exports.AIPermissionsEnum = void 0;
2293
+ (function(AIPermissionsEnum) {
2294
+ /**
2295
+ * Create or edit Knowledgebase in organization.
2296
+ */ AIPermissionsEnum["KNOWLEDGEBASE_EDIT"] = "KNOWLEDGEBASE_EDIT";
2297
+ AIPermissionsEnum["COPILOT_VIEW"] = "COPILOT_VIEW";
2298
+ AIPermissionsEnum["COPILOT_EDIT"] = "COPILOT_EDIT";
2299
+ /**
2300
+ * Create or edit Xperts in organization.
2301
+ */ AIPermissionsEnum["XPERT_EDIT"] = "XPERT_EDIT";
2302
+ AIPermissionsEnum["CHAT_VIEW"] = "CHAT_VIEW";
2303
+ })(exports.AIPermissionsEnum || (exports.AIPermissionsEnum = {}));
2304
+
2305
+ exports.XpertAgentExecutionStatusEnum = void 0;
2306
+ (function(XpertAgentExecutionStatusEnum) {
2307
+ XpertAgentExecutionStatusEnum["RUNNING"] = "running";
2308
+ XpertAgentExecutionStatusEnum["SUCCESS"] = "success";
2309
+ XpertAgentExecutionStatusEnum["ERROR"] = "error";
2310
+ XpertAgentExecutionStatusEnum["PENDING"] = "pending";
2311
+ XpertAgentExecutionStatusEnum["TIMEOUT"] = "timeout";
2312
+ XpertAgentExecutionStatusEnum["INTERRUPTED"] = "interrupted";
2313
+ })(exports.XpertAgentExecutionStatusEnum || (exports.XpertAgentExecutionStatusEnum = {}));
2314
+
2315
+ exports.ToolParameterType = void 0;
2316
+ (function(ToolParameterType) {
2317
+ ToolParameterType["STRING"] = "string";
2318
+ ToolParameterType["NUMBER"] = "number";
2319
+ ToolParameterType["BOOLEAN"] = "boolean";
2320
+ ToolParameterType["ARRAY"] = "array";
2321
+ ToolParameterType["SELECT"] = "select";
2322
+ ToolParameterType["SECRET_INPUT"] = "secret-input";
2323
+ ToolParameterType["FILE"] = "file";
2324
+ })(exports.ToolParameterType || (exports.ToolParameterType = {}));
2325
+ exports.ToolParameterForm = void 0;
2326
+ (function(ToolParameterForm) {
2327
+ ToolParameterForm["SCHEMA"] = "schema";
2328
+ ToolParameterForm["FORM"] = "form";
2329
+ ToolParameterForm["LLM"] = "llm"; // will be set by LLM
2330
+ })(exports.ToolParameterForm || (exports.ToolParameterForm = {}));
2331
+ var TOOL_NAME_REGEX = /^[a-zA-Z0-9_-]+$/;
2332
+ // Helper functions for tools
2333
+ /**
2334
+ *
2335
+ * @param tool Tool
2336
+ * @param disableToolDefault Is default disable tools
2337
+ * @returns Tool is enabled?
2338
+ */ function isToolEnabled(tool) {
2339
+ var disableToolDefault = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
2340
+ var disabled = tool.disabled;
2341
+ if (disabled == null && tool.enabled != null) {
2342
+ disabled = !tool.enabled;
2343
+ }
2344
+ if (disabled == null) {
2345
+ disabled = disableToolDefault;
2346
+ }
2347
+ return !disabled;
2348
+ }
2349
+ /**
2350
+ * Tool is enabled?
2351
+ *
2352
+ * @deprecated use isToolEnabled
2353
+ */ function isEnableTool(tool, toolset) {
2354
+ var disabled = tool.disabled;
2355
+ if (disabled == null && tool.enabled != null) {
2356
+ disabled = !tool.enabled;
2357
+ }
2358
+ if (disabled == null) {
2359
+ var _toolset_options;
2360
+ disabled = (_toolset_options = toolset.options) === null || _toolset_options === void 0 ? void 0 : _toolset_options.disableToolDefault;
2361
+ }
2362
+ return !disabled;
2363
+ }
2364
+ function getEnabledTools(toolset) {
2365
+ var _toolset_options, _toolset_options1, _toolset_tools;
2366
+ if (!toolset) return null;
2367
+ var disableToolDefault = (_toolset_options = toolset.options) === null || _toolset_options === void 0 ? void 0 : _toolset_options.disableToolDefault;
2368
+ var positions = toolset === null || toolset === void 0 ? void 0 : (_toolset_options1 = toolset.options) === null || _toolset_options1 === void 0 ? void 0 : _toolset_options1.toolPositions;
2369
+ var tools = toolset === null || toolset === void 0 ? void 0 : (_toolset_tools = toolset.tools) === null || _toolset_tools === void 0 ? void 0 : _toolset_tools.filter(function(_) {
2370
+ return isToolEnabled(_, disableToolDefault);
2371
+ });
2372
+ return positions && tools ? tools.sort(function(a, b) {
2373
+ var _positions_a_name, _positions_b_name;
2374
+ return ((_positions_a_name = positions[a.name]) !== null && _positions_a_name !== void 0 ? _positions_a_name : Infinity) - ((_positions_b_name = positions[b.name]) !== null && _positions_b_name !== void 0 ? _positions_b_name : Infinity);
2375
+ }) : tools;
2376
+ }
2377
+ function getToolLabel(tool) {
2378
+ var _tool_schema;
2379
+ if (!tool) return "";
2380
+ if (tool.label) {
2381
+ return tool.label;
2382
+ }
2383
+ var identity = (_tool_schema = tool.schema) === null || _tool_schema === void 0 ? void 0 : _tool_schema.identity;
2384
+ if (identity) {
2385
+ return identity.label || tool.name || "";
2386
+ }
2387
+ return tool.name || "";
2388
+ }
2389
+
2390
+ exports.XpertToolsetCategoryEnum = void 0;
2391
+ (function(XpertToolsetCategoryEnum) {
2392
+ XpertToolsetCategoryEnum["BUILTIN"] = "builtin";
2393
+ XpertToolsetCategoryEnum["API"] = "api";
2394
+ /**
2395
+ * [Anthropic Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction)
2396
+ */ XpertToolsetCategoryEnum["MCP"] = "mcp";
2397
+ /**
2398
+ * @deprecated
2399
+ */ XpertToolsetCategoryEnum["WORKFLOW"] = "workflow";
2400
+ })(exports.XpertToolsetCategoryEnum || (exports.XpertToolsetCategoryEnum = {}));
2401
+ exports.CredentialsType = void 0;
2402
+ (function(CredentialsType) {
2403
+ CredentialsType["SECRET_INPUT"] = "secret-input";
2404
+ CredentialsType["TEXT_INPUT"] = "text-input";
2405
+ CredentialsType["SELECT"] = "select";
2406
+ CredentialsType["REMOTE_SELECT"] = "remote-select";
2407
+ CredentialsType["COPILOT_MODEL"] = "copilot-model";
2408
+ CredentialsType["BOOLEAN"] = "boolean";
2409
+ CredentialsType["INT"] = "int";
2410
+ CredentialsType["NUMBER"] = "number";
2411
+ })(exports.CredentialsType || (exports.CredentialsType = {}));
2412
+ exports.ApiProviderSchemaType = void 0;
2413
+ (function(ApiProviderSchemaType) {
2414
+ /**
2415
+ * Enum class for api provider schema type.
2416
+ */ ApiProviderSchemaType["OPENAPI"] = "openapi";
2417
+ ApiProviderSchemaType["SWAGGER"] = "swagger";
2418
+ ApiProviderSchemaType["OPENAI_PLUGIN"] = "openai_plugin";
2419
+ ApiProviderSchemaType["OPENAI_ACTIONS"] = "openai_actions";
2420
+ })(exports.ApiProviderSchemaType || (exports.ApiProviderSchemaType = {}));
2421
+ exports.ToolTagEnum = void 0;
2422
+ (function(ToolTagEnum) {
2423
+ ToolTagEnum["SEARCH"] = "search";
2424
+ ToolTagEnum["IMAGE"] = "image";
2425
+ ToolTagEnum["VIDEOS"] = "videos";
2426
+ ToolTagEnum["WEATHER"] = "weather";
2427
+ ToolTagEnum["FINANCE"] = "finance";
2428
+ ToolTagEnum["DESIGN"] = "design";
2429
+ ToolTagEnum["TRAVEL"] = "travel";
2430
+ ToolTagEnum["SOCIAL"] = "social";
2431
+ ToolTagEnum["NEWS"] = "news";
2432
+ ToolTagEnum["MEDICAL"] = "medical";
2433
+ ToolTagEnum["PRODUCTIVITY"] = "productivity";
2434
+ ToolTagEnum["EDUCATION"] = "education";
2435
+ ToolTagEnum["BUSINESS"] = "business";
2436
+ ToolTagEnum["ENTERTAINMENT"] = "entertainment";
2437
+ ToolTagEnum["UTILITIES"] = "utilities";
2438
+ ToolTagEnum["ANALYSIS"] = "analysis";
2439
+ ToolTagEnum["SANDBOX"] = "sandbox";
2440
+ ToolTagEnum["PROJECT"] = "project";
2441
+ ToolTagEnum["AGENT"] = "agent";
2442
+ ToolTagEnum["OTHER"] = "other";
2443
+ })(exports.ToolTagEnum || (exports.ToolTagEnum = {}));
2444
+
2445
+ exports.XpertTableStatus = void 0;
2446
+ (function(XpertTableStatus) {
2447
+ XpertTableStatus["DRAFT"] = "draft";
2448
+ XpertTableStatus["READY"] = "ready";
2449
+ XpertTableStatus["PENDING_ACTIVATION"] = "pendingActivation";
2450
+ XpertTableStatus["ACTIVE"] = "active";
2451
+ XpertTableStatus["NEEDS_MIGRATION"] = "needsMigration";
2452
+ XpertTableStatus["DEPRECATED"] = "deprecated";
2453
+ XpertTableStatus["ERROR"] = "error";
2454
+ })(exports.XpertTableStatus || (exports.XpertTableStatus = {}));
2455
+ function genXpertDBInsertKey() {
2456
+ return letterStartSUID("DBInsert_");
2457
+ }
2458
+ function genXpertDBUpdateKey() {
2459
+ return letterStartSUID("DBUpdate_");
2460
+ }
2461
+ function genXpertDBDeleteKey() {
2462
+ return letterStartSUID("DBDelete_");
2463
+ }
2464
+ function genXpertDBQueryKey() {
2465
+ return letterStartSUID("DBQuery_");
2466
+ }
2467
+ function genXpertDBSqlKey() {
2468
+ return letterStartSUID("DBSql_");
2469
+ }
2470
+
2471
+ function _array_like_to_array$3(arr, len) {
2472
+ if (len == null || len > arr.length) len = arr.length;
2473
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
2474
+ return arr2;
2475
+ }
2476
+ function _array_without_holes(arr) {
2477
+ if (Array.isArray(arr)) return _array_like_to_array$3(arr);
2478
+ }
2479
+ function _iterable_to_array$1(iter) {
2480
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
2481
+ }
2482
+ function _non_iterable_spread() {
2483
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2484
+ }
2485
+ function _object_without_properties(source, excluded) {
2486
+ if (source == null) return {};
2487
+ var target = _object_without_properties_loose(source, excluded);
2488
+ var key, i;
2489
+ if (Object.getOwnPropertySymbols) {
2490
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
2491
+ for(i = 0; i < sourceSymbolKeys.length; i++){
2492
+ key = sourceSymbolKeys[i];
2493
+ if (excluded.indexOf(key) >= 0) continue;
2494
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
2495
+ target[key] = source[key];
2496
+ }
2497
+ }
2498
+ return target;
2499
+ }
2500
+ function _object_without_properties_loose(source, excluded) {
2501
+ if (source == null) return {};
2502
+ var target = {};
2503
+ var sourceKeys = Object.keys(source);
2504
+ var key, i;
2505
+ for(i = 0; i < sourceKeys.length; i++){
2506
+ key = sourceKeys[i];
2507
+ if (excluded.indexOf(key) >= 0) continue;
2508
+ target[key] = source[key];
2509
+ }
2510
+ return target;
2511
+ }
2512
+ function _to_consumable_array(arr) {
2513
+ return _array_without_holes(arr) || _iterable_to_array$1(arr) || _unsupported_iterable_to_array$3(arr) || _non_iterable_spread();
2514
+ }
2515
+ function _unsupported_iterable_to_array$3(o, minLen) {
2516
+ if (!o) return;
2517
+ if (typeof o === "string") return _array_like_to_array$3(o, minLen);
2518
+ var n = Object.prototype.toString.call(o).slice(8, -1);
2519
+ if (n === "Object" && o.constructor) n = o.constructor.name;
2520
+ if (n === "Map" || n === "Set") return Array.from(n);
2521
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$3(o, minLen);
2522
+ }
2523
+ // Helpers
2524
+ function omitXpertRelations(xpert) {
2525
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2526
+ var _ref = xpert !== null && xpert !== void 0 ? xpert : {}; _ref.draft; _ref.agent; _ref.agents; _ref.executors; _ref.leaders; _ref.knowledgebases; _ref.knowledgebase; _ref.environment; _ref.integrations; _ref.toolsets; _ref.managers; var rest = _object_without_properties(_ref, [
2527
+ "draft",
2528
+ "agent",
2529
+ "agents",
2530
+ "executors",
2531
+ "leaders",
2532
+ "knowledgebases",
2533
+ "knowledgebase",
2534
+ "environment",
2535
+ "integrations",
2536
+ "toolsets",
2537
+ "managers"
2538
+ ]);
2539
+ return rest;
2540
+ }
2541
+ function figureOutXpert(xpert, isDraft) {
2542
+ var _xpert_draft;
2543
+ var _ref;
2544
+ return (_ref = isDraft ? (_xpert_draft = xpert.draft) === null || _xpert_draft === void 0 ? void 0 : _xpert_draft.team : xpert) !== null && _ref !== void 0 ? _ref : xpert;
2545
+ }
2546
+ function xpertLabel(agent) {
2547
+ return agent.title || agent.name;
2548
+ }
2549
+ function createXpertGraph(xpert, position) {
2550
+ var _xpert_graph;
2551
+ var graph = (_xpert_graph = xpert.graph) !== null && _xpert_graph !== void 0 ? _xpert_graph : xpert.draft;
2552
+ var _locateNodes = locateNodes(graph.nodes, position), nodes = _locateNodes.nodes, size = _locateNodes.size;
2553
+ return {
2554
+ nodes: nodes,
2555
+ size: size,
2556
+ connections: graph.connections
2557
+ };
2558
+ }
2559
+ function locateNodes(nodes, position) {
2560
+ var _Math, _Math1, _Math2, _Math3;
2561
+ // Extract the area by positions of all nodes
2562
+ var positions = nodes.map(function(node) {
2563
+ return node.position;
2564
+ });
2565
+ var x0Positions = positions.map(function(pos) {
2566
+ return pos.x;
2567
+ });
2568
+ var x1Positions = nodes.map(function(node) {
2569
+ var _node_size;
2570
+ var _node_size_width;
2571
+ return node.position.x + ((_node_size_width = (_node_size = node.size) === null || _node_size === void 0 ? void 0 : _node_size.width) !== null && _node_size_width !== void 0 ? _node_size_width : 240);
2572
+ }) // Node width min 240
2573
+ ;
2574
+ var y0Positions = positions.map(function(pos) {
2575
+ return pos.y;
2576
+ });
2577
+ var y1Positions = nodes.map(function(node) {
2578
+ var _node_size;
2579
+ var _node_size_height;
2580
+ return node.position.y + ((_node_size_height = (_node_size = node.size) === null || _node_size === void 0 ? void 0 : _node_size.height) !== null && _node_size_height !== void 0 ? _node_size_height : 70);
2581
+ }) // Node height min 70
2582
+ ;
2583
+ var xRange = {
2584
+ min: (_Math = Math).min.apply(_Math, _to_consumable_array(x0Positions)),
2585
+ max: (_Math1 = Math).max.apply(_Math1, _to_consumable_array(x1Positions))
2586
+ };
2587
+ var yRange = {
2588
+ min: (_Math2 = Math).min.apply(_Math2, _to_consumable_array(y0Positions)),
2589
+ max: (_Math3 = Math).max.apply(_Math3, _to_consumable_array(y1Positions))
2590
+ };
2591
+ var size = {
2592
+ width: xRange.max - xRange.min + 50,
2593
+ height: yRange.max - yRange.min + 80
2594
+ };
2595
+ nodes.forEach(function(node) {
2596
+ var _node_position, _node_position1;
2597
+ node.position = {
2598
+ x: position.x + (((_node_position = node.position) === null || _node_position === void 0 ? void 0 : _node_position.x) ? node.position.x - xRange.min : 0) + 10,
2599
+ y: position.y + (((_node_position1 = node.position) === null || _node_position1 === void 0 ? void 0 : _node_position1.y) ? node.position.y - yRange.min : 0) + 40
2600
+ };
2601
+ });
2602
+ return {
2603
+ size: size,
2604
+ nodes: nodes
2605
+ };
2606
+ }
2607
+ /**
2608
+ * Create all nodes of xpert and it's area size
2609
+ *
2610
+ * @param xpert
2611
+ * @returns
2612
+ */ function createXpertNodes(xpert, position) {
2613
+ var // Agents
2614
+ _nodes, // knowledgebases
2615
+ _nodes1, // Toolsets
2616
+ _nodes2, _Math, _Math1, _Math2, _Math3;
2617
+ var _xpert_agent_options, _xpert_agents, // External experts
2618
+ _xpert_executors;
2619
+ var nodes = [];
2620
+ var agents = [];
2621
+ if (!((_xpert_agent_options = xpert.agent.options) === null || _xpert_agent_options === void 0 ? void 0 : _xpert_agent_options.hidden)) {
2622
+ agents.push(xpert.agent);
2623
+ }
2624
+ if ((_xpert_agents = xpert.agents) === null || _xpert_agents === void 0 ? void 0 : _xpert_agents.length) {
2625
+ var _agents;
2626
+ (_agents = agents).push.apply(_agents, _to_consumable_array(xpert.agents));
2627
+ }
2628
+ (_nodes = nodes).push.apply(_nodes, _to_consumable_array(agents.map(function(_) {
2629
+ var _xpert_options_agent___key, _xpert_options_agent, _xpert_options, _xpert_options_agent___key1, _xpert_options_agent1, _xpert_options1;
2630
+ var _xpert_options_agent___key_position;
2631
+ return {
2632
+ type: "agent",
2633
+ key: _.key,
2634
+ position: (_xpert_options_agent___key_position = (_xpert_options = xpert.options) === null || _xpert_options === void 0 ? void 0 : (_xpert_options_agent = _xpert_options.agent) === null || _xpert_options_agent === void 0 ? void 0 : (_xpert_options_agent___key = _xpert_options_agent[_.key]) === null || _xpert_options_agent___key === void 0 ? void 0 : _xpert_options_agent___key.position) !== null && _xpert_options_agent___key_position !== void 0 ? _xpert_options_agent___key_position : {
2635
+ x: 0,
2636
+ y: 0
2637
+ },
2638
+ size: (_xpert_options1 = xpert.options) === null || _xpert_options1 === void 0 ? void 0 : (_xpert_options_agent1 = _xpert_options1.agent) === null || _xpert_options_agent1 === void 0 ? void 0 : (_xpert_options_agent___key1 = _xpert_options_agent1[_.key]) === null || _xpert_options_agent___key1 === void 0 ? void 0 : _xpert_options_agent___key1.size,
2639
+ entity: _
2640
+ };
2641
+ })));
2642
+ (_xpert_executors = xpert.executors) === null || _xpert_executors === void 0 ? void 0 : _xpert_executors.forEach(function(executor) {
2643
+ var _xpert_options_xpert_executor_id, _xpert_options_xpert, _xpert_options;
2644
+ var _xpert_options_xpert_executor_id_position;
2645
+ var position = (_xpert_options_xpert_executor_id_position = (_xpert_options = xpert.options) === null || _xpert_options === void 0 ? void 0 : (_xpert_options_xpert = _xpert_options.xpert) === null || _xpert_options_xpert === void 0 ? void 0 : (_xpert_options_xpert_executor_id = _xpert_options_xpert[executor.id]) === null || _xpert_options_xpert_executor_id === void 0 ? void 0 : _xpert_options_xpert_executor_id.position) !== null && _xpert_options_xpert_executor_id_position !== void 0 ? _xpert_options_xpert_executor_id_position : {
2646
+ x: 0,
2647
+ y: 0
2648
+ };
2649
+ var executorGraph = createXpertNodes(executor, position);
2650
+ nodes.push({
2651
+ type: "xpert",
2652
+ key: executor.id,
2653
+ position: position,
2654
+ size: executorGraph.size,
2655
+ entity: executor,
2656
+ nodes: executorGraph.nodes
2657
+ });
2658
+ });
2659
+ var _xpert_knowledgebases;
2660
+ (_nodes1 = nodes).push.apply(_nodes1, _to_consumable_array(((_xpert_knowledgebases = xpert.knowledgebases) !== null && _xpert_knowledgebases !== void 0 ? _xpert_knowledgebases : []).map(function(x) {
2661
+ var _xpert_options_knowledge_x_id, _xpert_options_knowledge, _xpert_options, _xpert_options_knowledge_x_id1, _xpert_options_knowledge1, _xpert_options1;
2662
+ var _xpert_options_knowledge_x_id_position;
2663
+ return {
2664
+ key: x.id,
2665
+ type: "knowledge",
2666
+ position: (_xpert_options_knowledge_x_id_position = (_xpert_options = xpert.options) === null || _xpert_options === void 0 ? void 0 : (_xpert_options_knowledge = _xpert_options.knowledge) === null || _xpert_options_knowledge === void 0 ? void 0 : (_xpert_options_knowledge_x_id = _xpert_options_knowledge[x.id]) === null || _xpert_options_knowledge_x_id === void 0 ? void 0 : _xpert_options_knowledge_x_id.position) !== null && _xpert_options_knowledge_x_id_position !== void 0 ? _xpert_options_knowledge_x_id_position : {
2667
+ x: 0,
2668
+ y: 0
2669
+ },
2670
+ size: (_xpert_options1 = xpert.options) === null || _xpert_options1 === void 0 ? void 0 : (_xpert_options_knowledge1 = _xpert_options1.knowledge) === null || _xpert_options_knowledge1 === void 0 ? void 0 : (_xpert_options_knowledge_x_id1 = _xpert_options_knowledge1[x.id]) === null || _xpert_options_knowledge_x_id1 === void 0 ? void 0 : _xpert_options_knowledge_x_id1.size,
2671
+ entity: x
2672
+ };
2673
+ })));
2674
+ var _xpert_toolsets;
2675
+ (_nodes2 = nodes).push.apply(_nodes2, _to_consumable_array(((_xpert_toolsets = xpert.toolsets) !== null && _xpert_toolsets !== void 0 ? _xpert_toolsets : []).map(function(x) {
2676
+ var _xpert_options_toolset_x_id, _xpert_options_toolset, _xpert_options, _xpert_options_toolset_x_id1, _xpert_options_toolset1, _xpert_options1;
2677
+ var _xpert_options_toolset_x_id_position;
2678
+ return {
2679
+ key: x.id,
2680
+ type: "toolset",
2681
+ position: (_xpert_options_toolset_x_id_position = (_xpert_options = xpert.options) === null || _xpert_options === void 0 ? void 0 : (_xpert_options_toolset = _xpert_options.toolset) === null || _xpert_options_toolset === void 0 ? void 0 : (_xpert_options_toolset_x_id = _xpert_options_toolset[x.id]) === null || _xpert_options_toolset_x_id === void 0 ? void 0 : _xpert_options_toolset_x_id.position) !== null && _xpert_options_toolset_x_id_position !== void 0 ? _xpert_options_toolset_x_id_position : {
2682
+ x: 0,
2683
+ y: 0
2684
+ },
2685
+ size: (_xpert_options1 = xpert.options) === null || _xpert_options1 === void 0 ? void 0 : (_xpert_options_toolset1 = _xpert_options1.toolset) === null || _xpert_options_toolset1 === void 0 ? void 0 : (_xpert_options_toolset_x_id1 = _xpert_options_toolset1[x.id]) === null || _xpert_options_toolset_x_id1 === void 0 ? void 0 : _xpert_options_toolset_x_id1.size,
2686
+ entity: x
2687
+ };
2688
+ })));
2689
+ // Extract the area by positions of all nodes
2690
+ var positions = nodes.map(function(node) {
2691
+ return node.position;
2692
+ });
2693
+ var x0Positions = positions.map(function(pos) {
2694
+ return pos.x;
2695
+ });
2696
+ var x1Positions = nodes.map(function(node) {
2697
+ var _node_size;
2698
+ var _node_size_width;
2699
+ return node.position.x + ((_node_size_width = (_node_size = node.size) === null || _node_size === void 0 ? void 0 : _node_size.width) !== null && _node_size_width !== void 0 ? _node_size_width : 240);
2700
+ }) // Node width min 240
2701
+ ;
2702
+ var y0Positions = positions.map(function(pos) {
2703
+ return pos.y;
2704
+ });
2705
+ var y1Positions = nodes.map(function(node) {
2706
+ var _node_size;
2707
+ var _node_size_height;
2708
+ return node.position.y + ((_node_size_height = (_node_size = node.size) === null || _node_size === void 0 ? void 0 : _node_size.height) !== null && _node_size_height !== void 0 ? _node_size_height : 70);
2709
+ }) // Node height min 70
2710
+ ;
2711
+ var xRange = {
2712
+ min: (_Math = Math).min.apply(_Math, _to_consumable_array(x0Positions)),
2713
+ max: (_Math1 = Math).max.apply(_Math1, _to_consumable_array(x1Positions))
2714
+ };
2715
+ var yRange = {
2716
+ min: (_Math2 = Math).min.apply(_Math2, _to_consumable_array(y0Positions)),
2717
+ max: (_Math3 = Math).max.apply(_Math3, _to_consumable_array(y1Positions))
2718
+ };
2719
+ var size = {
2720
+ width: xRange.max - xRange.min + 50,
2721
+ height: yRange.max - yRange.min + 80
2722
+ };
2723
+ nodes.forEach(function(node) {
2724
+ var _node_position, _node_position1;
2725
+ node.position = {
2726
+ x: position.x + (((_node_position = node.position) === null || _node_position === void 0 ? void 0 : _node_position.x) ? node.position.x - xRange.min : 0) + 10,
2727
+ y: position.y + (((_node_position1 = node.position) === null || _node_position1 === void 0 ? void 0 : _node_position1.y) ? node.position.y - yRange.min : 0) + 40
2728
+ };
2729
+ });
2730
+ return {
2731
+ nodes: nodes,
2732
+ size: size
2733
+ };
2734
+ }
2735
+ function createAgentConnections(agent, collaborators) {
2736
+ var // collaborators
2737
+ _agent_collaboratorNames, // knowledgebases
2738
+ _agent_knowledgebaseIds, // toolsets
2739
+ _agent_toolsetIds;
2740
+ var connections = [];
2741
+ var from = agent.leaderKey;
2742
+ var to = agent.key;
2743
+ if (from && to) {
2744
+ connections.push({
2745
+ type: "agent",
2746
+ key: from + "/" + to,
2747
+ from: from,
2748
+ to: to
2749
+ });
2750
+ }
2751
+ (_agent_collaboratorNames = agent.collaboratorNames) === null || _agent_collaboratorNames === void 0 ? void 0 : _agent_collaboratorNames.forEach(function(name) {
2752
+ var collaborator = collaborators.find(function(_) {
2753
+ return _.name === name;
2754
+ });
2755
+ if (collaborator) {
2756
+ var from = agent.key;
2757
+ var to = collaborator.id;
2758
+ connections.push({
2759
+ type: "xpert",
2760
+ key: from + "/" + to,
2761
+ from: from,
2762
+ to: to
2763
+ });
2764
+ }
2765
+ });
2766
+ (_agent_knowledgebaseIds = agent.knowledgebaseIds) === null || _agent_knowledgebaseIds === void 0 ? void 0 : _agent_knowledgebaseIds.forEach(function(knowledgebaseId) {
2767
+ var from = agent.key;
2768
+ var to = knowledgebaseId;
2769
+ connections.push({
2770
+ type: "knowledge",
2771
+ key: from + "/" + to,
2772
+ from: from,
2773
+ to: to
2774
+ });
2775
+ });
2776
+ (_agent_toolsetIds = agent.toolsetIds) === null || _agent_toolsetIds === void 0 ? void 0 : _agent_toolsetIds.forEach(function(toolsetId) {
2777
+ var from = agent.key;
2778
+ var to = toolsetId;
2779
+ connections.push({
2780
+ type: "toolset",
2781
+ key: from + "/" + to,
2782
+ from: from,
2783
+ to: to
2784
+ });
2785
+ });
2786
+ return connections;
2787
+ }
2788
+
2789
+ exports.ApiAuthType = void 0;
2790
+ (function(ApiAuthType) {
2791
+ /**
2792
+ * Enum class for api provider auth type.
2793
+ */ ApiAuthType["NONE"] = "none";
2794
+ ApiAuthType["API_KEY"] = "api_key";
2795
+ ApiAuthType["BASIC"] = "basic";
2796
+ })(exports.ApiAuthType || (exports.ApiAuthType = {}));
2797
+ exports.EmbeddingStatusEnum = void 0;
2798
+ (function(EmbeddingStatusEnum) {
2799
+ EmbeddingStatusEnum["PROCESSING"] = "processing";
2800
+ EmbeddingStatusEnum["SUCCESS"] = "success";
2801
+ EmbeddingStatusEnum["FAILED"] = "failed";
2802
+ EmbeddingStatusEnum["REQUIRED"] = "required";
2803
+ })(exports.EmbeddingStatusEnum || (exports.EmbeddingStatusEnum = {}));
2804
+ var Attachment_Type_Options = [
2805
+ {
2806
+ key: "document",
2807
+ value: "TXT, MD, MDX, MARKDOWN, PDF, HTML, XLSX, XLS, DOC, DOCX, CSV, EML, MSG, PPTX, PPT, XML, EPUB",
2808
+ label: {
2809
+ zh_Hans: "文档",
2810
+ en_US: "Document"
2811
+ }
2812
+ },
2813
+ {
2814
+ key: "image",
2815
+ value: "JPG, JPEG, PNG, GIF, WEBP, SVG",
2816
+ label: {
2817
+ zh_Hans: "图片",
2818
+ en_US: "Image"
2819
+ }
2820
+ },
2821
+ {
2822
+ key: "audio",
2823
+ value: "MP3, M4A, WAV, AMR, MPGA",
2824
+ label: {
2825
+ zh_Hans: "音频",
2826
+ en_US: "Audio"
2827
+ }
2828
+ },
2829
+ {
2830
+ key: "video",
2831
+ value: "MP4, MOV, MPEG, WEBM",
2832
+ label: {
2833
+ zh_Hans: "视频",
2834
+ en_US: "Video"
2835
+ }
2836
+ },
2837
+ {
2838
+ key: "others",
2839
+ value: "",
2840
+ label: {
2841
+ zh_Hans: "其他文件类型",
2842
+ en_US: "Other file types"
2843
+ }
2844
+ }
2845
+ ];
2846
+
2847
+ var TASK_DESCRIPTION_PREFIX = "Launch a new agent to handle complex, multi-step tasks autonomously. \n\nAvailable agent types and the tools they have access to:";
2848
+ var TASK_DESCRIPTION_SUFFIX = 'When using the Task tool, you must specify a subagent_type parameter to select which agent type to use.\n\nWhen to use the Agent tool:\n- When you are instructed to execute custom slash commands. Use the Agent tool with the slash command invocation as the entire prompt. The slash command can take arguments. For example: Task(description="Check the file")\n\nWhen NOT to use the Agent tool:\n- If you want to read a specific file path, use the Read or Glob tool instead of the Agent tool, to find the match more quickly\n- If you are searching for a specific term or definition within a known location, use the Glob tool instead, to find the match more quickly\n- If you are searching for content within a specific file or set of 2-3 files, use the Read tool instead of the Agent tool, to find the match more quickly\n- Other tasks that are not related to the agent descriptions above\n\n\nUsage notes:\n1. Launch multiple agents concurrently whenever possible, to maximize performance; to do that, use a single message with multiple tool uses\n2. When the agent is done, it will return a single message back to you. The result returned by the agent is not visible to the user. To show the user the result, you should send a text message back to the user with a concise summary of the result.\n3. Each agent invocation is stateless. You will not be able to send additional messages to the agent, nor will the agent be able to communicate with you outside of its final report. Therefore, your prompt should contain a highly detailed task description for the agent to perform autonomously and you should specify exactly what information the agent should return back to you in its final and only message to you.\n4. The agent\'s outputs should generally be trusted\n5. Clearly tell the agent whether you expect it to create content, perform analysis, or just do research (search, file reads, web fetches, etc.), since it is not aware of the user\'s intent\n6. If the agent description mentions that it should be used proactively, then you should try your best to use it without the user having to ask for it first. Use your judgement.\n\nExample usage:\n\n<example_agent_descriptions>\n"content-reviewer": use this agent after you are done creating significant content or documents\n"greeting-responder": use this agent when to respond to user greetings with a friendly joke\n"research-analyst": use this agent to conduct thorough research on complex topics\n</example_agent_description>\n\n<example>\nuser: "Please write a function that checks if a number is prime"\nassistant: Sure let me write a function that checks if a number is prime\nassistant: First let me use the Write tool to write a function that checks if a number is prime\nassistant: I\'m going to use the Write tool to write the following code:\n<code>\nfunction isPrime(n) {\n if (n <= 1) return false\n for (let i = 2; i * i <= n; i++) {\n if (n % i === 0) return false\n }\n return true\n}\n</code>\n<commentary>\nSince significant content was created and the task was completed, now use the content-reviewer agent to review the work\n</commentary>\nassistant: Now let me use the content-reviewer agent to review the code\nassistant: Uses the Task tool to launch with the content-reviewer agent \n</example>\n\n<example>\nuser: "Can you help me research the environmental impact of different renewable energy sources and create a comprehensive report?"\n<commentary>\nThis is a complex research task that would benefit from using the research-analyst agent to conduct thorough analysis\n</commentary>\nassistant: I\'ll help you research the environmental impact of renewable energy sources. Let me use the research-analyst agent to conduct comprehensive research on this topic.\nassistant: Uses the Task tool to launch with the research-analyst agent, providing detailed instructions about what research to conduct and what format the report should take\n</example>\n\n<example>\nuser: "Hello"\n<commentary>\nSince the user is greeting, use the greeting-responder agent to respond with a friendly joke\n</commentary>\nassistant: "I\'m going to use the Task tool to launch with the greeting-responder agent"\n</example>';
2849
+
2850
+ exports.MCPServerType = void 0;
2851
+ (function(MCPServerType) {
2852
+ MCPServerType["SSE"] = "sse";
2853
+ MCPServerType["STDIO"] = "stdio";
2854
+ MCPServerType["CODE"] = "code";
2855
+ })(exports.MCPServerType || (exports.MCPServerType = {}));
2856
+
2857
+ function _define_property$1(obj, key, value) {
2858
+ if (key in obj) {
2859
+ Object.defineProperty(obj, key, {
2860
+ value: value,
2861
+ enumerable: true,
2862
+ configurable: true,
2863
+ writable: true
2864
+ });
2865
+ } else {
2866
+ obj[key] = value;
2867
+ }
2868
+ return obj;
2869
+ }
2870
+ function _object_spread(target) {
2871
+ for(var i = 1; i < arguments.length; i++){
2872
+ var source = arguments[i] != null ? arguments[i] : {};
2873
+ var ownKeys = Object.keys(source);
2874
+ if (typeof Object.getOwnPropertySymbols === "function") {
2875
+ ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
2876
+ return Object.getOwnPropertyDescriptor(source, sym).enumerable;
2877
+ }));
2878
+ }
2879
+ ownKeys.forEach(function(key) {
2880
+ _define_property$1(target, key, source[key]);
2881
+ });
2882
+ }
2883
+ return target;
2884
+ }
2885
+ function ownKeys(object, enumerableOnly) {
2886
+ var keys = Object.keys(object);
2887
+ if (Object.getOwnPropertySymbols) {
2888
+ var symbols = Object.getOwnPropertySymbols(object);
2889
+ keys.push.apply(keys, symbols);
2890
+ }
2891
+ return keys;
2892
+ }
2893
+ function _object_spread_props(target, source) {
2894
+ source = source != null ? source : {};
2895
+ if (Object.getOwnPropertyDescriptors) {
2896
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
2897
+ } else {
2898
+ ownKeys(Object(source)).forEach(function(key) {
2899
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2900
+ });
2901
+ }
2902
+ return target;
2903
+ }
2904
+ /**
2905
+ * Build a hierarchical tree structure from a flat list of DocumentInterface objects,
2906
+ * and
2907
+ *
2908
+ * @template Metadata - Type of metadata, defaults to IDocChunkMetadata
2909
+ * @param documents - A flat array of DocumentInterface objects
2910
+ * @returns the hierarchical tree (root-level DocumentInterface[])
2911
+ */ function buildChunkTree(documents) {
2912
+ if (!documents || documents.length === 0) return [];
2913
+ // Step 1. Build a lookup map for quick access by chunkId
2914
+ var map = new Map();
2915
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
2916
+ try {
2917
+ for(var _iterator = documents[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
2918
+ var doc = _step.value;
2919
+ var _doc_metadata;
2920
+ if ((_doc_metadata = doc.metadata) === null || _doc_metadata === void 0 ? void 0 : _doc_metadata.chunkId) {
2921
+ map.set(doc.metadata.chunkId, _object_spread_props(_object_spread({}, doc), {
2922
+ metadata: _object_spread_props(_object_spread({}, doc.metadata), {
2923
+ children: []
2924
+ })
2925
+ }));
2926
+ }
2927
+ }
2928
+ } catch (err) {
2929
+ _didIteratorError = true;
2930
+ _iteratorError = err;
2931
+ } finally{
2932
+ try {
2933
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
2934
+ _iterator.return();
2935
+ }
2936
+ } finally{
2937
+ if (_didIteratorError) {
2938
+ throw _iteratorError;
2939
+ }
2940
+ }
2941
+ }
2942
+ // Step 2. Organize nodes into tree
2943
+ var roots = [];
2944
+ var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
2945
+ try {
2946
+ for(var _iterator1 = map.values()[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
2947
+ var doc1 = _step1.value;
2948
+ var parentId = doc1.metadata.parentId;
2949
+ if (parentId && map.has(parentId)) {
2950
+ var parent = map.get(parentId);
2951
+ parent.metadata.children = parent.metadata.children || [];
2952
+ parent.metadata.children.push(doc1);
2953
+ } else {
2954
+ roots.push(doc1);
2955
+ }
2956
+ }
2957
+ } catch (err) {
2958
+ _didIteratorError1 = true;
2959
+ _iteratorError1 = err;
2960
+ } finally{
2961
+ try {
2962
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
2963
+ _iterator1.return();
2964
+ }
2965
+ } finally{
2966
+ if (_didIteratorError1) {
2967
+ throw _iteratorError1;
2968
+ }
2969
+ }
2970
+ }
2971
+ return roots;
2972
+ }
2973
+ /**
2974
+ * Find all leaf nodes (nodes without children).
2975
+ *
2976
+ * @param roots
2977
+ * @returns
2978
+ */ function collectTreeLeaves(roots) {
2979
+ var leaves = [];
2980
+ var collectLeaves = function(node) {
2981
+ var children = node.metadata.children;
2982
+ if (!children || children.length === 0) {
2983
+ leaves.push(node);
2984
+ } else {
2985
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
2986
+ try {
2987
+ for(var _iterator = children[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
2988
+ var child = _step.value;
2989
+ collectLeaves(child);
2990
+ }
2991
+ } catch (err) {
2992
+ _didIteratorError = true;
2993
+ _iteratorError = err;
2994
+ } finally{
2995
+ try {
2996
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
2997
+ _iterator.return();
2998
+ }
2999
+ } finally{
3000
+ if (_didIteratorError) {
3001
+ throw _iteratorError;
3002
+ }
3003
+ }
3004
+ }
3005
+ }
3006
+ };
3007
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
3008
+ try {
3009
+ for(var _iterator = roots[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
3010
+ var root = _step.value;
3011
+ collectLeaves(root);
3012
+ }
3013
+ } catch (err) {
3014
+ _didIteratorError = true;
3015
+ _iteratorError = err;
3016
+ } finally{
3017
+ try {
3018
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
3019
+ _iterator.return();
3020
+ }
3021
+ } finally{
3022
+ if (_didIteratorError) {
3023
+ throw _iteratorError;
3024
+ }
3025
+ }
3026
+ }
3027
+ return leaves;
3028
+ }
3029
+
3030
+ // Skill types
3031
+ function genXpertSkillKey() {
3032
+ return letterStartSUID("Skill_");
3033
+ }
3034
+
3035
+ function genXpertMiddlewareKey() {
3036
+ return letterStartSUID("Middleware_");
3037
+ }
3038
+ var normalizeNodeKey = function(key) {
3039
+ var _key_split;
3040
+ return key === null || key === void 0 ? void 0 : (_key_split = key.split("/")) === null || _key_split === void 0 ? void 0 : _key_split[0];
3041
+ };
3042
+ function getAgentMiddlewareNodes(graph, agentKey) {
3043
+ var _graph_connections;
3044
+ var _graph_connections_filter_map_filter;
3045
+ var middlewares = (_graph_connections_filter_map_filter = (_graph_connections = graph.connections) === null || _graph_connections === void 0 ? void 0 : _graph_connections.filter(function(conn) {
3046
+ return conn.type === "workflow" && conn.from === agentKey;
3047
+ }).map(function(conn) {
3048
+ var _graph_nodes;
3049
+ var to = normalizeNodeKey(conn.to);
3050
+ return (_graph_nodes = graph.nodes) === null || _graph_nodes === void 0 ? void 0 : _graph_nodes.find(function(node) {
3051
+ return node.key === to;
3052
+ });
3053
+ }).filter(function(node) {
3054
+ return (node === null || node === void 0 ? void 0 : node.entity).type === exports.WorkflowNodeTypeEnum.MIDDLEWARE;
3055
+ })) !== null && _graph_connections_filter_map_filter !== void 0 ? _graph_connections_filter_map_filter : [];
3056
+ return middlewares;
3057
+ }
3058
+
3059
+ exports.PermissionsEnum = void 0;
3060
+ (function(PermissionsEnum) {
3061
+ PermissionsEnum["PROFILE_EDIT"] = "PROFILE_EDIT";
3062
+ PermissionsEnum["ADMIN_DASHBOARD_VIEW"] = "ADMIN_DASHBOARD_VIEW";
3063
+ PermissionsEnum["ORG_EMPLOYEES_VIEW"] = "ORG_EMPLOYEES_VIEW";
3064
+ PermissionsEnum["ORG_EMPLOYEES_EDIT"] = "ORG_EMPLOYEES_EDIT";
3065
+ PermissionsEnum["ORG_TAGS_EDIT"] = "ORG_TAGS_EDIT";
3066
+ PermissionsEnum["ORG_USERS_VIEW"] = "ORG_USERS_VIEW";
3067
+ PermissionsEnum["ORG_USERS_EDIT"] = "ORG_USERS_EDIT";
3068
+ PermissionsEnum["ORG_INVITE_VIEW"] = "ORG_INVITE_VIEW";
3069
+ PermissionsEnum["ORG_INVITE_EDIT"] = "ORG_INVITE_EDIT";
3070
+ PermissionsEnum["ALL_ORG_VIEW"] = "ALL_ORG_VIEW";
3071
+ PermissionsEnum["ALL_ORG_EDIT"] = "ALL_ORG_EDIT";
3072
+ PermissionsEnum["APPROVAL_POLICY_VIEW"] = "APPROVALS_POLICY_VIEW";
3073
+ PermissionsEnum["APPROVAL_POLICY_EDIT"] = "APPROVALS_POLICY_EDIT";
3074
+ PermissionsEnum["CHANGE_SELECTED_ORGANIZATION"] = "CHANGE_SELECTED_ORGANIZATION";
3075
+ PermissionsEnum["CHANGE_ROLES_PERMISSIONS"] = "CHANGE_ROLES_PERMISSIONS";
3076
+ PermissionsEnum["SUPER_ADMIN_EDIT"] = "SUPER_ADMIN_EDIT";
3077
+ PermissionsEnum["PUBLIC_PAGE_EDIT"] = "PUBLIC_PAGE_EDIT";
3078
+ PermissionsEnum["VIEW_ALL_EMAILS"] = "VIEW_ALL_EMAILS";
3079
+ PermissionsEnum["VIEW_ALL_EMAIL_TEMPLATES"] = "VIEW_ALL_EMAIL_TEMPLATES";
3080
+ PermissionsEnum["ORG_HELP_CENTER_EDIT"] = "ORG_HELP_CENTER_EDIT";
3081
+ PermissionsEnum["ORG_CONTACT_EDIT"] = "ORG_CONTACT_EDIT";
3082
+ PermissionsEnum["ORG_CONTACT_VIEW"] = "ORG_CONTACT_VIEW";
3083
+ PermissionsEnum["ORG_DEMO_EDIT"] = "ORG_DEMO_EDIT";
3084
+ PermissionsEnum["INTEGRATION_EDIT"] = "INTEGRATION_EDIT";
3085
+ PermissionsEnum["INTEGRATION_VIEW"] = "INTEGRATION_VIEW";
3086
+ PermissionsEnum["FILE_STORAGE_VIEW"] = "FILE_STORAGE_VIEW";
3087
+ PermissionsEnum["SMS_GATEWAY_VIEW"] = "SMS_GATEWAY_VIEW";
3088
+ PermissionsEnum["CUSTOM_SMTP_VIEW"] = "CUSTOM_SMTP_VIEW";
3089
+ PermissionsEnum["VIEW_ALL_ACCOUNTING_TEMPLATES"] = "VIEW_ALL_ACCOUNTING_TEMPLATES";
3090
+ PermissionsEnum["ACCESS_DELETE_ACCOUNT"] = "ACCESS_DELETE_ACCOUNT";
3091
+ PermissionsEnum["ACCESS_DELETE_ALL_DATA"] = "ACCESS_DELETE_ALL_DATA";
3092
+ })(exports.PermissionsEnum || (exports.PermissionsEnum = {}));
3093
+ var PermissionGroups = {
3094
+ //Permissions which can be given to any role
3095
+ GENERAL: [
3096
+ "PROFILE_EDIT",
3097
+ "ADMIN_DASHBOARD_VIEW",
3098
+ "ORG_INVITE_VIEW",
3099
+ "ORG_INVITE_EDIT",
3100
+ "VIEW_ALL_EMAILS",
3101
+ "VIEW_ALL_EMAIL_TEMPLATES",
3102
+ "INTEGRATION_EDIT",
3103
+ "ORG_DEMO_EDIT",
3104
+ // PermissionsEnum.VIEW_ALL_ACCOUNTING_TEMPLATES,
3105
+ // AI
3106
+ exports.AIPermissionsEnum.KNOWLEDGEBASE_EDIT,
3107
+ exports.AIPermissionsEnum.COPILOT_VIEW,
3108
+ exports.AIPermissionsEnum.COPILOT_EDIT,
3109
+ exports.AIPermissionsEnum.XPERT_EDIT,
3110
+ exports.AIPermissionsEnum.CHAT_VIEW,
3111
+ // DataSource
3112
+ exports.AnalyticsPermissionsEnum.DATA_SOURCE_VIEW,
3113
+ exports.AnalyticsPermissionsEnum.DATA_SOURCE_EDIT,
3114
+ // Semantic Model
3115
+ exports.AnalyticsPermissionsEnum.MODELS_VIEW,
3116
+ exports.AnalyticsPermissionsEnum.MODELS_EDIT,
3117
+ // Story
3118
+ exports.AnalyticsPermissionsEnum.STORIES_VIEW,
3119
+ exports.AnalyticsPermissionsEnum.STORIES_EDIT,
3120
+ // Business Area
3121
+ exports.AnalyticsPermissionsEnum.BUSINESS_AREA_VIEW,
3122
+ exports.AnalyticsPermissionsEnum.BUSINESS_AREA_EDIT,
3123
+ // Certification
3124
+ exports.AnalyticsPermissionsEnum.CERTIFICATION_EDIT,
3125
+ // Indicator
3126
+ exports.AnalyticsPermissionsEnum.INDICATOR_VIEW,
3127
+ exports.AnalyticsPermissionsEnum.INDICATOR_MARTKET_VIEW,
3128
+ exports.AnalyticsPermissionsEnum.INDICATOR_EDIT,
3129
+ // Data Factory
3130
+ exports.AnalyticsPermissionsEnum.DATA_FACTORY_VIEW,
3131
+ exports.AnalyticsPermissionsEnum.DATA_FACTORY_EDIT
3132
+ ],
3133
+ //Readonly permissions, are only enabled for admin role
3134
+ ADMINISTRATION: [
3135
+ "ORG_USERS_VIEW",
3136
+ "ORG_USERS_EDIT",
3137
+ "ALL_ORG_VIEW",
3138
+ "ALL_ORG_EDIT",
3139
+ "CHANGE_SELECTED_ORGANIZATION",
3140
+ "CHANGE_ROLES_PERMISSIONS",
3141
+ "SUPER_ADMIN_EDIT",
3142
+ "INTEGRATION_VIEW",
3143
+ "ACCESS_DELETE_ACCOUNT",
3144
+ "ACCESS_DELETE_ALL_DATA"
3145
+ ]
3146
+ };
3147
+
3148
+ exports.TagCategoryEnum = void 0;
3149
+ (function(TagCategoryEnum) {
3150
+ TagCategoryEnum["INDICATOR"] = "indicator";
3151
+ TagCategoryEnum["STORY"] = "story";
3152
+ TagCategoryEnum["TOOLSET"] = "toolset";
3153
+ TagCategoryEnum["XPERT"] = "xpert";
3154
+ })(exports.TagCategoryEnum || (exports.TagCategoryEnum = {}));
3155
+
3156
+ var DEFAULT_TENANT = "Default Tenant";
3157
+
3158
+ var TranslationLanguageMap = {
3159
+ "zh-CN": "zh",
3160
+ "zh-Hans": "zh"
3161
+ };
3162
+ function mapTranslationLanguage(languageCode) {
3163
+ return TranslationLanguageMap[languageCode] || languageCode;
3164
+ }
3165
+
3166
+ exports.RolesEnum = void 0;
3167
+ (function(RolesEnum) {
3168
+ RolesEnum["SUPER_ADMIN"] = "SUPER_ADMIN";
3169
+ RolesEnum["ADMIN"] = "ADMIN";
3170
+ RolesEnum["DATA_ENTRY"] = "DATA_ENTRY";
3171
+ RolesEnum["EMPLOYEE"] = "EMPLOYEE";
3172
+ RolesEnum["CANDIDATE"] = "CANDIDATE";
3173
+ RolesEnum["MANAGER"] = "MANAGER";
3174
+ RolesEnum["VIEWER"] = "VIEWER";
3175
+ // 有所免费用户
3176
+ RolesEnum["TRIAL"] = "TRIAL";
3177
+ })(exports.RolesEnum || (exports.RolesEnum = {}));
3178
+
3179
+ exports.UserType = void 0;
3180
+ (function(UserType) {
3181
+ UserType["USER"] = "user";
3182
+ UserType["COMMUNICATION"] = "communication";
3183
+ })(exports.UserType || (exports.UserType = {}));
3184
+ exports.LanguagesEnum = void 0;
3185
+ (function(LanguagesEnum) {
3186
+ LanguagesEnum["Chinese"] = "zh-CN";
3187
+ LanguagesEnum["SimplifiedChinese"] = "zh-Hans";
3188
+ LanguagesEnum["TraditionalChinese"] = "zh-Hant";
3189
+ LanguagesEnum["English"] = "en";
3190
+ })(exports.LanguagesEnum || (exports.LanguagesEnum = {}));
3191
+ var LanguagesMap = {
3192
+ "zh-CN": "zh-Hans",
3193
+ "zh-Hans": "zh-Hans",
3194
+ "zh": "zh-Hans"
3195
+ };
3196
+ exports.ProviderEnum = void 0;
3197
+ (function(ProviderEnum) {
3198
+ ProviderEnum["GOOGLE"] = "google";
3199
+ ProviderEnum["FACEBOOK"] = "facebook";
3200
+ })(exports.ProviderEnum || (exports.ProviderEnum = {}));
3201
+
3202
+ /* eslint-disable @typescript-eslint/no-empty-interface */ exports.SMTPSecureEnum = void 0;
3203
+ (function(SMTPSecureEnum) {
3204
+ SMTPSecureEnum["TRUE"] = "True";
3205
+ SMTPSecureEnum["FALSE"] = "False";
3206
+ })(exports.SMTPSecureEnum || (exports.SMTPSecureEnum = {}));
3207
+
3208
+ exports.IntegrationEnum = void 0;
3209
+ (function(IntegrationEnum) {
3210
+ IntegrationEnum["UPWORK"] = "Upwork";
3211
+ IntegrationEnum["HUBSTAFF"] = "Hubstaff";
3212
+ IntegrationEnum["LARK"] = "Lark";
3213
+ IntegrationEnum["DINGTALK"] = "DingTalk";
3214
+ IntegrationEnum["WECOM"] = "WeCom";
3215
+ IntegrationEnum["FIRECRAWL"] = "firecrawl";
3216
+ IntegrationEnum["KNOWLEDGEBASE"] = "knowledgebase";
3217
+ IntegrationEnum["GITHUB"] = "github";
3218
+ IntegrationEnum["RAGFlow"] = "ragflow";
3219
+ IntegrationEnum["Dify"] = "dify";
3220
+ IntegrationEnum["FastGPT"] = "fastgpt";
3221
+ })(exports.IntegrationEnum || (exports.IntegrationEnum = {}));
3222
+ exports.IntegrationFeatureEnum = void 0;
3223
+ (function(IntegrationFeatureEnum) {
3224
+ IntegrationFeatureEnum["KNOWLEDGE"] = "knowledge";
3225
+ IntegrationFeatureEnum["AGENT"] = "agent";
3226
+ IntegrationFeatureEnum["SSO"] = "sso";
3227
+ })(exports.IntegrationFeatureEnum || (exports.IntegrationFeatureEnum = {}));
3228
+ exports.IntegrationFilterEnum = void 0;
3229
+ (function(IntegrationFilterEnum) {
3230
+ IntegrationFilterEnum["ALL"] = "All";
3231
+ IntegrationFilterEnum["FREE"] = "Free";
3232
+ IntegrationFilterEnum["PAID"] = "Paid";
3233
+ })(exports.IntegrationFilterEnum || (exports.IntegrationFilterEnum = {}));
3234
+ var DEFAULT_INTEGRATION_PAID_FILTERS = [
3235
+ {
3236
+ label: "All",
3237
+ value: "all"
3238
+ },
3239
+ {
3240
+ label: "Free",
3241
+ value: "false"
3242
+ },
3243
+ {
3244
+ label: "Paid",
3245
+ value: "true"
3246
+ }
3247
+ ];
3248
+
3249
+ exports.InviteStatusEnum = void 0;
3250
+ (function(InviteStatusEnum) {
3251
+ InviteStatusEnum["INVITED"] = "INVITED";
3252
+ InviteStatusEnum["ACCEPTED"] = "ACCEPTED";
3253
+ })(exports.InviteStatusEnum || (exports.InviteStatusEnum = {}));
3254
+ exports.InvitationTypeEnum = void 0;
3255
+ (function(InvitationTypeEnum) {
3256
+ InvitationTypeEnum["USER"] = "USER";
3257
+ InvitationTypeEnum["EMPLOYEE"] = "EMPLOYEE";
3258
+ InvitationTypeEnum["CANDIDATE"] = "CANDIDATE";
3259
+ })(exports.InvitationTypeEnum || (exports.InvitationTypeEnum = {}));
3260
+ exports.InvitationExpirationEnum = void 0;
3261
+ (function(InvitationExpirationEnum) {
3262
+ InvitationExpirationEnum[InvitationExpirationEnum["DAY"] = 1] = "DAY";
3263
+ InvitationExpirationEnum[InvitationExpirationEnum["WEEK"] = 7] = "WEEK";
3264
+ InvitationExpirationEnum[InvitationExpirationEnum["TWO_WEEK"] = 14] = "TWO_WEEK";
3265
+ InvitationExpirationEnum[InvitationExpirationEnum["MONTH"] = 30] = "MONTH";
3266
+ InvitationExpirationEnum["NEVER"] = "Never";
3267
+ })(exports.InvitationExpirationEnum || (exports.InvitationExpirationEnum = {}));
3268
+
3269
+ exports.TaskListTypeEnum = void 0;
3270
+ (function(TaskListTypeEnum) {
3271
+ TaskListTypeEnum["GRID"] = "GRID";
3272
+ TaskListTypeEnum["SPRINT"] = "SPRINT";
3273
+ })(exports.TaskListTypeEnum || (exports.TaskListTypeEnum = {}));
3274
+ exports.OrganizationProjectBudgetTypeEnum = void 0;
3275
+ (function(OrganizationProjectBudgetTypeEnum) {
3276
+ OrganizationProjectBudgetTypeEnum["HOURS"] = "hours";
3277
+ OrganizationProjectBudgetTypeEnum["COST"] = "cost";
3278
+ })(exports.OrganizationProjectBudgetTypeEnum || (exports.OrganizationProjectBudgetTypeEnum = {}));
3279
+
3280
+ exports.Visibility = void 0;
3281
+ (function(Visibility) {
3282
+ Visibility["Public"] = "public";
3283
+ Visibility["Internal"] = "internal";
3284
+ Visibility["Secret"] = "secret";
3285
+ Visibility["Private"] = "private";
3286
+ })(exports.Visibility || (exports.Visibility = {}));
3287
+
3288
+ var IntegrationDingTalkProvider = {
3289
+ name: exports.IntegrationEnum.DINGTALK,
3290
+ label: {
3291
+ en_US: "DingTalk",
3292
+ zh_Hans: "钉钉"
3293
+ },
3294
+ avatar: "dingtalk.svg",
3295
+ webhook: true,
3296
+ schema: {
3297
+ type: "object",
3298
+ properties: {}
3299
+ },
3300
+ pro: true
3301
+ };
3302
+
3303
+ var IntegrationGitHubProvider = {
3304
+ name: exports.IntegrationEnum.GITHUB,
3305
+ label: {
3306
+ en_US: "GitHub",
3307
+ zh_Hans: "GitHub"
3308
+ },
3309
+ description: {
3310
+ en_US: "GitHub is a proprietary developer platform that allows developers to create, store, manage, and share their code. It uses Git to provide distributed version control and GitHub itself provides access control, bug tracking, software feature requests, task management, continuous integration, and wikis for every project.",
3311
+ zh_Hans: "GitHub 是一个专有的开发者平台,允许开发者创建、存储、管理和分享他们的代码。它使用 Git 提供分布式版本控制,GitHub 本身为每个项目提供访问控制、错误跟踪、软件功能请求、任务管理、持续集成和知识。"
3312
+ },
3313
+ avatar: "github.svg",
3314
+ webhook: true,
3315
+ schema: {
3316
+ type: "object",
3317
+ properties: {
3318
+ appName: {
3319
+ type: "string",
3320
+ description: "The App Name of the GitHub App"
3321
+ },
3322
+ appId: {
3323
+ type: "string",
3324
+ description: "The App ID of the GitHub App"
3325
+ },
3326
+ clientId: {
3327
+ type: "string",
3328
+ description: "The Client ID of the GitHub App"
3329
+ },
3330
+ clientSecret: {
3331
+ type: "string",
3332
+ description: "The Client Secret of the GitHub App"
3333
+ },
3334
+ privateKey: {
3335
+ type: "textarea",
3336
+ description: "The private key of the GitHub App"
3337
+ },
3338
+ webhookSecret: {
3339
+ type: "string",
3340
+ description: "The webhook secret of the GitHub App"
3341
+ }
3342
+ }
3343
+ }
3344
+ };
3345
+ /**
3346
+ * Transform GitHub API installation data to our simplified format
3347
+ */ var transformInstallation = function(installation) {
3348
+ if (!installation.account) {
3349
+ throw new Error("Installation account is null");
3350
+ }
3351
+ // Handle both User and Organization account types
3352
+ var accountName;
3353
+ if ("login" in installation.account && installation.account.login) {
3354
+ accountName = installation.account.login;
3355
+ } else if ("slug" in installation.account && installation.account.slug) {
3356
+ accountName = installation.account.slug;
3357
+ } else if ("name" in installation.account && installation.account.name) {
3358
+ accountName = installation.account.name;
3359
+ } else {
3360
+ accountName = "Unknown";
3361
+ }
3362
+ var accountType = installation.target_type;
3363
+ return {
3364
+ id: installation.id,
3365
+ accountName: accountName,
3366
+ accountType: accountType,
3367
+ avatarUrl: installation.account.avatar_url
3368
+ };
3369
+ };
3370
+
3371
+ var IntegrationLarkProvider = {
3372
+ name: exports.IntegrationEnum.LARK,
3373
+ label: {
3374
+ en_US: "Lark",
3375
+ zh_Hans: "飞书"
3376
+ },
3377
+ avatar: "lark.png",
3378
+ webhook: true,
3379
+ schema: {
3380
+ type: "object",
3381
+ properties: {
3382
+ isLark: {
3383
+ type: "boolean",
3384
+ title: {
3385
+ en_US: "Is Lark",
3386
+ zh_Hans: "国际版"
3387
+ }
3388
+ },
3389
+ appId: {
3390
+ type: "string",
3391
+ title: "App ID"
3392
+ },
3393
+ appSecret: {
3394
+ type: "string",
3395
+ title: "App Secret"
3396
+ },
3397
+ verificationToken: {
3398
+ type: "string",
3399
+ title: "Verification Token"
3400
+ },
3401
+ encryptKey: {
3402
+ type: "string",
3403
+ title: {
3404
+ en_US: "Encrypt Key"
3405
+ }
3406
+ },
3407
+ xpertId: {
3408
+ type: "remote-select",
3409
+ title: {
3410
+ en_US: "Xpert",
3411
+ zh_Hans: "数字专家"
3412
+ },
3413
+ placeholder: {
3414
+ en_US: "Choose a corresponding digital expert",
3415
+ zh_Hans: "选择一个对应的数字专家"
3416
+ },
3417
+ selectUrl: "/api/xpert/select-options"
3418
+ },
3419
+ preferLanguage: {
3420
+ type: "select",
3421
+ title: {
3422
+ en_US: "Preferred Language",
3423
+ zh_Hans: "首选语言"
3424
+ },
3425
+ options: [
3426
+ {
3427
+ value: "en",
3428
+ label: {
3429
+ en_US: "English",
3430
+ zh_Hans: "英语"
3431
+ }
3432
+ },
3433
+ {
3434
+ value: "zh",
3435
+ label: {
3436
+ en_US: "Chinese",
3437
+ zh_Hans: "中文"
3438
+ }
3439
+ }
3440
+ ]
3441
+ }
3442
+ },
3443
+ required: [
3444
+ "appId",
3445
+ "appSecret"
3446
+ ],
3447
+ secret: [
3448
+ "appSecret",
3449
+ "verificationToken",
3450
+ "encryptKey"
3451
+ ]
3452
+ }
3453
+ };
3454
+
3455
+ function _define_property(obj, key, value) {
3456
+ if (key in obj) {
3457
+ Object.defineProperty(obj, key, {
3458
+ value: value,
3459
+ enumerable: true,
3460
+ configurable: true,
3461
+ writable: true
3462
+ });
3463
+ } else {
3464
+ obj[key] = value;
3465
+ }
3466
+ return obj;
3467
+ }
3468
+ var _obj;
3469
+ var INTEGRATION_PROVIDERS = (_obj = {}, // [IntegrationEnum.LARK]: IntegrationLarkProvider,
3470
+ _define_property(_obj, exports.IntegrationEnum.DINGTALK, IntegrationDingTalkProvider), // [IntegrationEnum.WECOM]: IntegrationWeComProvider,
3471
+ _define_property(_obj, exports.IntegrationEnum.GITHUB, IntegrationGitHubProvider), _obj);
3472
+
3473
+ exports.AiModelTypeEnum = void 0;
3474
+ (function(AiModelTypeEnum) {
3475
+ AiModelTypeEnum["LLM"] = "llm";
3476
+ AiModelTypeEnum["TEXT_EMBEDDING"] = "text-embedding";
3477
+ AiModelTypeEnum["RERANK"] = "rerank";
3478
+ AiModelTypeEnum["SPEECH2TEXT"] = "speech2text";
3479
+ AiModelTypeEnum["MODERATION"] = "moderation";
3480
+ AiModelTypeEnum["TTS"] = "tts";
3481
+ AiModelTypeEnum["TEXT2IMG"] = "text2img";
3482
+ })(exports.AiModelTypeEnum || (exports.AiModelTypeEnum = {}));
3483
+
3484
+ function _array_like_to_array$2(arr, len) {
3485
+ if (len == null || len > arr.length) len = arr.length;
3486
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3487
+ return arr2;
3488
+ }
3489
+ function _array_with_holes$2(arr) {
3490
+ if (Array.isArray(arr)) return arr;
3491
+ }
3492
+ function _iterable_to_array_limit$1(arr, i) {
3493
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
3494
+ if (_i == null) return;
3495
+ var _arr = [];
3496
+ var _n = true;
3497
+ var _d = false;
3498
+ var _s, _e;
3499
+ try {
3500
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
3501
+ _arr.push(_s.value);
3502
+ if (i && _arr.length === i) break;
3503
+ }
3504
+ } catch (err) {
3505
+ _d = true;
3506
+ _e = err;
3507
+ } finally{
3508
+ try {
3509
+ if (!_n && _i["return"] != null) _i["return"]();
3510
+ } finally{
3511
+ if (_d) throw _e;
3512
+ }
3513
+ }
3514
+ return _arr;
3515
+ }
3516
+ function _non_iterable_rest$2() {
3517
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3518
+ }
3519
+ function _sliced_to_array$1(arr, i) {
3520
+ return _array_with_holes$2(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$2(arr, i) || _non_iterable_rest$2();
3521
+ }
3522
+ function _unsupported_iterable_to_array$2(o, minLen) {
3523
+ if (!o) return;
3524
+ if (typeof o === "string") return _array_like_to_array$2(o, minLen);
3525
+ var n = Object.prototype.toString.call(o).slice(8, -1);
3526
+ if (n === "Object" && o.constructor) n = o.constructor.name;
3527
+ if (n === "Map" || n === "Set") return Array.from(n);
3528
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$2(o, minLen);
3529
+ }
3530
+ /**
3531
+ * Channels of all upstream and downstream nodes relative to the starting point startKey.
3532
+ *
3533
+ * @param graph
3534
+ * @param startKey
3535
+ */ function allChannels(graph, startKey) {
3536
+ graph = getCurrentGraph(graph, startKey);
3537
+ return graph.nodes.filter(function(node) {
3538
+ return !(node.type === "workflow" && isRouterKey(node.key));
3539
+ }).map(function(node) {
3540
+ return node.key;
3541
+ });
3542
+ }
3543
+ function findStartNodes(graph, key) {
3544
+ var toMap = new Map();
3545
+ // Consider only horizontal processes
3546
+ var connections = graph.connections.filter(function(_) {
3547
+ return _.type === "edge";
3548
+ });
3549
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
3550
+ try {
3551
+ // Construct toMap: record all upstream nodes of each node
3552
+ for(var _iterator = connections[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
3553
+ var conn = _step.value;
3554
+ if (!toMap.has(conn.to)) toMap.set(conn.to, []);
3555
+ var _conn_from_split = _sliced_to_array$1(conn.from.split("/"), 1), fromKey = _conn_from_split[0];
3556
+ if (conn.type === "edge") {
3557
+ toMap.get(conn.to).push(fromKey);
3558
+ }
3559
+ }
3560
+ } catch (err) {
3561
+ _didIteratorError = true;
3562
+ _iteratorError = err;
3563
+ } finally{
3564
+ try {
3565
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
3566
+ _iterator.return();
3567
+ }
3568
+ } finally{
3569
+ if (_didIteratorError) {
3570
+ throw _iteratorError;
3571
+ }
3572
+ }
3573
+ }
3574
+ var result = new Set();
3575
+ var checked = [];
3576
+ // Recursively search upstream until you reach the starting point
3577
+ function dfsUp(nodeKey) {
3578
+ checked.push(nodeKey);
3579
+ var parents = toMap.get(nodeKey);
3580
+ // There is no upstream, this is the starting point
3581
+ if (!parents || parents.length === 0) {
3582
+ result.add(nodeKey);
3583
+ return;
3584
+ }
3585
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
3586
+ try {
3587
+ for(var _iterator = parents[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
3588
+ var parent = _step.value;
3589
+ // There is a cycle
3590
+ if (checked.includes(parent)) {
3591
+ return;
3592
+ }
3593
+ dfsUp(parent);
3594
+ }
3595
+ } catch (err) {
3596
+ _didIteratorError = true;
3597
+ _iteratorError = err;
3598
+ } finally{
3599
+ try {
3600
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
3601
+ _iterator.return();
3602
+ }
3603
+ } finally{
3604
+ if (_didIteratorError) {
3605
+ throw _iteratorError;
3606
+ }
3607
+ }
3608
+ }
3609
+ }
3610
+ dfsUp(key);
3611
+ return Array.from(result);
3612
+ }
3613
+ /**
3614
+ * Keep the content in the same graph as the key node (including the node, its connected nodes, and the 'edge' type connections between them)
3615
+ *
3616
+ * @param graph
3617
+ * @param key
3618
+ * @returns
3619
+ */ function getCurrentGraph(graph, key) {
3620
+ var validConnections = graph.connections.filter(function(conn) {
3621
+ return conn.type === "edge";
3622
+ });
3623
+ // Extract the primary key (remove the / suffix)
3624
+ var normalize = function(k) {
3625
+ return k.split("/")[0];
3626
+ };
3627
+ // Adjacency list: bidirectional (because you want to traverse the current graph)
3628
+ var adjacency = new Map();
3629
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
3630
+ try {
3631
+ for(var _iterator = validConnections[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
3632
+ var conn = _step.value;
3633
+ var from = normalize(conn.from);
3634
+ var to = normalize(conn.to);
3635
+ if (!adjacency.has(from)) adjacency.set(from, new Set());
3636
+ if (!adjacency.has(to)) adjacency.set(to, new Set());
3637
+ adjacency.get(from).add(to);
3638
+ adjacency.get(to).add(from);
3639
+ }
3640
+ } catch (err) {
3641
+ _didIteratorError = true;
3642
+ _iteratorError = err;
3643
+ } finally{
3644
+ try {
3645
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
3646
+ _iterator.return();
3647
+ }
3648
+ } finally{
3649
+ if (_didIteratorError) {
3650
+ throw _iteratorError;
3651
+ }
3652
+ }
3653
+ }
3654
+ var visited = new Set();
3655
+ var queue = key ? [
3656
+ normalize(key)
3657
+ ] : [];
3658
+ // BFS/DFS collects all nodes in the same graph
3659
+ while(queue.length > 0){
3660
+ var current = queue.pop();
3661
+ if (visited.has(current)) continue;
3662
+ visited.add(current);
3663
+ var neighbors = adjacency.get(current) || new Set();
3664
+ var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
3665
+ try {
3666
+ for(var _iterator1 = neighbors[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
3667
+ var neighbor = _step1.value;
3668
+ if (!visited.has(neighbor)) {
3669
+ queue.push(neighbor);
3670
+ }
3671
+ }
3672
+ } catch (err) {
3673
+ _didIteratorError1 = true;
3674
+ _iteratorError1 = err;
3675
+ } finally{
3676
+ try {
3677
+ if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
3678
+ _iterator1.return();
3679
+ }
3680
+ } finally{
3681
+ if (_didIteratorError1) {
3682
+ throw _iteratorError1;
3683
+ }
3684
+ }
3685
+ }
3686
+ }
3687
+ new Set(graph.nodes.map(function(n) {
3688
+ return n.key;
3689
+ }));
3690
+ var keptNodes = graph.nodes.filter(function(n) {
3691
+ return visited.has(normalize(n.key));
3692
+ });
3693
+ new Set(keptNodes.map(function(n) {
3694
+ return n.key;
3695
+ }));
3696
+ var keptConnections = validConnections.filter(function(conn) {
3697
+ var from = normalize(conn.from);
3698
+ var to = normalize(conn.to);
3699
+ return visited.has(from) && visited.has(to);
3700
+ });
3701
+ return {
3702
+ nodes: keptNodes,
3703
+ connections: keptConnections
3704
+ };
3705
+ }
3706
+ function shortTitle(input) {
3707
+ if (input) {
3708
+ return input.length <= 50 ? input : input.slice(0, 50) + "...";
3709
+ }
3710
+ return null;
3711
+ }
3712
+
3713
+ function _array_like_to_array$1(arr, len) {
3714
+ if (len == null || len > arr.length) len = arr.length;
3715
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3716
+ return arr2;
3717
+ }
3718
+ function _array_with_holes$1(arr) {
3719
+ if (Array.isArray(arr)) return arr;
3720
+ }
3721
+ function _iterable_to_array(iter) {
3722
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
3723
+ }
3724
+ function _non_iterable_rest$1() {
3725
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3726
+ }
3727
+ function _to_array(arr) {
3728
+ return _array_with_holes$1(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array$1(arr) || _non_iterable_rest$1();
3729
+ }
3730
+ function _unsupported_iterable_to_array$1(o, minLen) {
3731
+ if (!o) return;
3732
+ if (typeof o === "string") return _array_like_to_array$1(o, minLen);
3733
+ var n = Object.prototype.toString.call(o).slice(8, -1);
3734
+ if (n === "Object" && o.constructor) n = o.constructor.name;
3735
+ if (n === "Map" || n === "Set") return Array.from(n);
3736
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
3737
+ }
3738
+ /**
3739
+ *
3740
+ * Returns the variable schema for a given variable name.
3741
+ * The variable name can be in the format of 'groupName.variableName' or just 'variableName'.
3742
+ *
3743
+ * @param variables
3744
+ * @param variable
3745
+ * @returns
3746
+ */ function getVariableSchema(variables, variable) {
3747
+ var _variable_split;
3748
+ var _ref = _to_array((_variable_split = variable === null || variable === void 0 ? void 0 : variable.split(".")) !== null && _variable_split !== void 0 ? _variable_split : []), groupName = _ref[0], rest = _ref.slice(1);
3749
+ var group = variables === null || variables === void 0 ? void 0 : variables.find(function(_) {
3750
+ var __group, __group1;
3751
+ return rest.length ? ((__group = _.group) === null || __group === void 0 ? void 0 : __group.name) === groupName : !((__group1 = _.group) === null || __group1 === void 0 ? void 0 : __group1.name);
3752
+ });
3753
+ return {
3754
+ group: group,
3755
+ variable: group === null || group === void 0 ? void 0 : group.variables.find(function(_) {
3756
+ return _.name === (rest.join(".") || groupName);
3757
+ })
3758
+ };
3759
+ }
3760
+ var FILE_VARIABLES = [
3761
+ {
3762
+ name: "filePath",
3763
+ type: exports.XpertParameterTypeEnum.STRING,
3764
+ description: {
3765
+ en_US: "The path to the file",
3766
+ zh_Hans: "文件的路径"
3767
+ }
3768
+ },
3769
+ {
3770
+ name: "fileName",
3771
+ type: exports.XpertParameterTypeEnum.STRING,
3772
+ description: {
3773
+ en_US: "The name of the file",
3774
+ zh_Hans: "文件的名称"
3775
+ }
3776
+ },
3777
+ {
3778
+ name: "fileUrl",
3779
+ type: exports.XpertParameterTypeEnum.STRING,
3780
+ description: {
3781
+ en_US: "The URL of the file",
3782
+ zh_Hans: "文件的URL地址"
3783
+ }
3784
+ },
3785
+ {
3786
+ name: "fileSize",
3787
+ type: exports.XpertParameterTypeEnum.NUMBER,
3788
+ description: {
3789
+ en_US: "The size of the file in bytes",
3790
+ zh_Hans: "文件的大小,单位为字节"
3791
+ }
3792
+ },
3793
+ {
3794
+ name: "mimeType",
3795
+ type: exports.XpertParameterTypeEnum.STRING,
3796
+ description: {
3797
+ en_US: "The MIME type of the file",
3798
+ zh_Hans: "文件的MIME类型"
3799
+ }
3800
+ }
3801
+ ];
3802
+
3803
+ function _array_like_to_array(arr, len) {
3804
+ if (len == null || len > arr.length) len = arr.length;
3805
+ for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
3806
+ return arr2;
3807
+ }
3808
+ function _array_with_holes(arr) {
3809
+ if (Array.isArray(arr)) return arr;
3810
+ }
3811
+ function _iterable_to_array_limit(arr, i) {
3812
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
3813
+ if (_i == null) return;
3814
+ var _arr = [];
3815
+ var _n = true;
3816
+ var _d = false;
3817
+ var _s, _e;
3818
+ try {
3819
+ for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
3820
+ _arr.push(_s.value);
3821
+ if (i && _arr.length === i) break;
3822
+ }
3823
+ } catch (err) {
3824
+ _d = true;
3825
+ _e = err;
3826
+ } finally{
3827
+ try {
3828
+ if (!_n && _i["return"] != null) _i["return"]();
3829
+ } finally{
3830
+ if (_d) throw _e;
3831
+ }
3832
+ }
3833
+ return _arr;
3834
+ }
3835
+ function _non_iterable_rest() {
3836
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
3837
+ }
3838
+ function _sliced_to_array(arr, i) {
3839
+ return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
3840
+ }
3841
+ function _unsupported_iterable_to_array(o, minLen) {
3842
+ if (!o) return;
3843
+ if (typeof o === "string") return _array_like_to_array(o, minLen);
3844
+ var n = Object.prototype.toString.call(o).slice(8, -1);
3845
+ if (n === "Object" && o.constructor) n = o.constructor.name;
3846
+ if (n === "Map" || n === "Set") return Array.from(n);
3847
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
3848
+ }
3849
+ exports.ScheduleTaskStatus = void 0;
3850
+ (function(ScheduleTaskStatus) {
3851
+ ScheduleTaskStatus["PAUSED"] = "paused";
3852
+ ScheduleTaskStatus["ARCHIVED"] = "archived";
3853
+ ScheduleTaskStatus["SCHEDULED"] = "scheduled";
3854
+ })(exports.ScheduleTaskStatus || (exports.ScheduleTaskStatus = {}));
3855
+ exports.TaskFrequency = void 0;
3856
+ (function(TaskFrequency) {
3857
+ TaskFrequency["Once"] = "Once";
3858
+ TaskFrequency["Daily"] = "Daily";
3859
+ TaskFrequency["Weekly"] = "Weekly";
3860
+ TaskFrequency["Monthly"] = "Monthly";
3861
+ TaskFrequency["Yearly"] = "Yearly";
3862
+ })(exports.TaskFrequency || (exports.TaskFrequency = {}));
3863
+ /**
3864
+ * Generate cron expression: Minutes Hour Day Month Week
3865
+ *
3866
+ * @param schedule
3867
+ * @returns
3868
+ */ function generateCronExpression(schedule) {
3869
+ if (!schedule.time) throw new Error("Time is required for scheduling");
3870
+ var _schedule_time_split = _sliced_to_array(schedule.time.split(":"), 2), hourStr = _schedule_time_split[0], minuteStr = _schedule_time_split[1];
3871
+ var hour = parseInt(hourStr, 10);
3872
+ var minute = parseInt(minuteStr, 10);
3873
+ if (isNaN(hour) || isNaN(minute) || hour < 0 || hour > 23 || minute < 0 || minute > 59) {
3874
+ throw new Error("Invalid time format. Expected HH:mm with valid hour and minute.");
3875
+ }
3876
+ switch(schedule.frequency){
3877
+ case "Once":
3878
+ {
3879
+ if (!schedule.date) throw new Error("Date is required for Once schedule");
3880
+ var date = new Date(schedule.date);
3881
+ // if (isNaN(date.getTime())) throw new Error('Invalid date format for Once schedule');
3882
+ return "".concat(minute, " ").concat(hour, " ").concat(date.getDate(), " ").concat(date.getMonth() + 1, " *");
3883
+ }
3884
+ case "Daily":
3885
+ return "".concat(minute, " ").concat(hour, " * * *");
3886
+ case "Weekly":
3887
+ if (schedule.dayOfWeek === undefined || schedule.dayOfWeek < 0 || schedule.dayOfWeek > 6) throw new Error("Valid dayOfWeek (0-6) is required for Weekly schedule");
3888
+ return "".concat(minute, " ").concat(hour, " * * ").concat(schedule.dayOfWeek);
3889
+ case "Monthly":
3890
+ if (!schedule.dayOfMonth || schedule.dayOfMonth < 1 || schedule.dayOfMonth > 31) throw new Error("Valid dayOfMonth (1-31) is required for Monthly schedule");
3891
+ return "".concat(minute, " ").concat(hour, " ").concat(schedule.dayOfMonth, " * *");
3892
+ case "Yearly":
3893
+ {
3894
+ if (!schedule.date) throw new Error("Date is required for Yearly schedule");
3895
+ var date1 = new Date(schedule.date);
3896
+ // if (isNaN(date.getTime())) throw new Error('Invalid date format for Yearly schedule');
3897
+ return "".concat(minute, " ").concat(hour, " ").concat(date1.getDate(), " ").concat(date1.getMonth() + 1, " *");
3898
+ }
3899
+ default:
3900
+ throw new Error("Unsupported frequency: ".concat(schedule.frequency));
3901
+ }
3902
+ }
3903
+
3904
+ exports.InterruptMessageType = void 0;
3905
+ (function(InterruptMessageType) {
3906
+ InterruptMessageType["SlidesTemplate"] = "slides_template";
3907
+ InterruptMessageType["SwitchGitHubRepository"] = "switch_github_repository";
3908
+ InterruptMessageType["Select"] = "select";
3909
+ })(exports.InterruptMessageType || (exports.InterruptMessageType = {}));
3910
+
3911
+ exports.AI_MODEL_TYPE_VARIABLE = AI_MODEL_TYPE_VARIABLE;
3912
+ exports.Attachment_Type_Options = Attachment_Type_Options;
3913
+ exports.CONTEXT_VARIABLE_CURRENTSTATE = CONTEXT_VARIABLE_CURRENTSTATE;
3914
+ exports.DEFAULT_CURRENCIES = DEFAULT_CURRENCIES;
3915
+ exports.DEFAULT_DATE_FORMATS = DEFAULT_DATE_FORMATS;
3916
+ exports.DEFAULT_INTEGRATION_PAID_FILTERS = DEFAULT_INTEGRATION_PAID_FILTERS;
3917
+ exports.DEFAULT_INVITE_EXPIRY_PERIOD = DEFAULT_INVITE_EXPIRY_PERIOD;
3918
+ exports.DEFAULT_PROFIT_BASED_BONUS = DEFAULT_PROFIT_BASED_BONUS;
3919
+ exports.DEFAULT_REVENUE_BASED_BONUS = DEFAULT_REVENUE_BASED_BONUS;
3920
+ exports.DEFAULT_TENANT = DEFAULT_TENANT;
3921
+ exports.DEFAULT_TIME_FORMATS = DEFAULT_TIME_FORMATS;
3922
+ exports.FILE_VARIABLES = FILE_VARIABLES;
3923
+ exports.GRAPH_NODE_SUMMARIZE_CONVERSATION = GRAPH_NODE_SUMMARIZE_CONVERSATION;
3924
+ exports.GRAPH_NODE_TITLE_CONVERSATION = GRAPH_NODE_TITLE_CONVERSATION;
3925
+ exports.INTEGRATION_PROVIDERS = INTEGRATION_PROVIDERS;
3926
+ exports.IndicatorDraftFields = IndicatorDraftFields;
3927
+ exports.IndicatorOptionFields = IndicatorOptionFields;
3928
+ exports.IntegrationGitHubProvider = IntegrationGitHubProvider;
3929
+ exports.IntegrationLarkProvider = IntegrationLarkProvider;
3930
+ exports.IteratingIndexParameterName = IteratingIndexParameterName;
3931
+ exports.IteratingItemParameterName = IteratingItemParameterName;
3932
+ exports.KDocumentSourceType = KDocumentSourceType;
3933
+ exports.KDocumentWebTypeOptions = KDocumentWebTypeOptions;
3934
+ exports.KNOWLEDGE_DOCUMENTS_NAME = KNOWLEDGE_DOCUMENTS_NAME;
3935
+ exports.KNOWLEDGE_FOLDER_ID_NAME = KNOWLEDGE_FOLDER_ID_NAME;
3936
+ exports.KNOWLEDGE_SOURCES_NAME = KNOWLEDGE_SOURCES_NAME;
3937
+ exports.KNOWLEDGE_STAGE_NAME = KNOWLEDGE_STAGE_NAME;
3938
+ exports.KnowledgeTask = KnowledgeTask;
3939
+ exports.KnowledgebaseChannel = KnowledgebaseChannel;
3940
+ exports.LanguagesMap = LanguagesMap;
3941
+ exports.MDX = schema;
3942
+ exports.MEMORY_PROFILE_PROMPT = MEMORY_PROFILE_PROMPT;
3943
+ exports.MEMORY_QA_PROMPT = MEMORY_QA_PROMPT;
3944
+ exports.OllamaEmbeddingsProviders = OllamaEmbeddingsProviders;
3945
+ exports.OpenAIEmbeddingsProviders = OpenAIEmbeddingsProviders;
3946
+ exports.PermissionApprovalStatus = PermissionApprovalStatus;
3947
+ exports.PermissionGroups = PermissionGroups;
3948
+ exports.STANDARD_METADATA_FIELDS = STANDARD_METADATA_FIELDS;
3949
+ exports.STATE_SYS_VOLUME = STATE_SYS_VOLUME;
3950
+ exports.STATE_SYS_WORKSPACE_PATH = STATE_SYS_WORKSPACE_PATH;
3951
+ exports.STATE_SYS_WORKSPACE_URL = STATE_SYS_WORKSPACE_URL;
3952
+ exports.STATE_VARIABLE_FILES = STATE_VARIABLE_FILES;
3953
+ exports.STATE_VARIABLE_HUMAN = STATE_VARIABLE_HUMAN;
3954
+ exports.STATE_VARIABLE_INPUT = STATE_VARIABLE_INPUT;
3955
+ exports.STATE_VARIABLE_SYS = STATE_VARIABLE_SYS;
3956
+ exports.STATE_VARIABLE_TITLE_CHANNEL = STATE_VARIABLE_TITLE_CHANNEL;
3957
+ exports.TASK_DESCRIPTION_PREFIX = TASK_DESCRIPTION_PREFIX;
3958
+ exports.TASK_DESCRIPTION_SUFFIX = TASK_DESCRIPTION_SUFFIX;
3959
+ exports.TENANT_AGENT_LOCAL_URL = TENANT_AGENT_LOCAL_URL;
3960
+ exports.TOOL_NAME_REGEX = TOOL_NAME_REGEX;
3961
+ exports.TranslationLanguageMap = TranslationLanguageMap;
3962
+ exports.VariableOperations = VariableOperations;
3963
+ exports.agentLabel = agentLabel;
3964
+ exports.agentUniqueName = agentUniqueName;
3965
+ exports.allChannels = allChannels;
3966
+ exports.buildChunkTree = buildChunkTree;
3967
+ exports.channelName = channelName;
3968
+ exports.classificateDocumentCategory = classificateDocumentCategory;
3969
+ exports.collectTreeLeaves = collectTreeLeaves;
3970
+ exports.configurableStoreNamespace = configurableStoreNamespace;
3971
+ exports.convertToUrlPath = convertToUrlPath;
3972
+ exports.createAgentConnections = createAgentConnections;
3973
+ exports.createXpertGraph = createXpertGraph;
3974
+ exports.createXpertNodes = createXpertNodes;
3975
+ exports.embeddingCubeCollectionName = embeddingCubeCollectionName;
3976
+ exports.extractSemanticModelDraft = extractSemanticModelDraft;
3977
+ exports.figureOutXpert = figureOutXpert;
3978
+ exports.findStartNodes = findStartNodes;
3979
+ exports.genJSONParseKey = genJSONParseKey;
3980
+ exports.genJSONStringifyKey = genJSONStringifyKey;
3981
+ exports.genListOperatorKey = genListOperatorKey;
3982
+ exports.genPipelineChunkerKey = genPipelineChunkerKey;
3983
+ exports.genPipelineKnowledgeBaseKey = genPipelineKnowledgeBaseKey;
3984
+ exports.genPipelineProcessorKey = genPipelineProcessorKey;
3985
+ exports.genPipelineSourceKey = genPipelineSourceKey;
3986
+ exports.genPipelineUnderstandingKey = genPipelineUnderstandingKey;
3987
+ exports.genVariableAggregatorKey = genVariableAggregatorKey;
3988
+ exports.genXpertDBDeleteKey = genXpertDBDeleteKey;
3989
+ exports.genXpertDBInsertKey = genXpertDBInsertKey;
3990
+ exports.genXpertDBQueryKey = genXpertDBQueryKey;
3991
+ exports.genXpertDBSqlKey = genXpertDBSqlKey;
3992
+ exports.genXpertDBUpdateKey = genXpertDBUpdateKey;
3993
+ exports.genXpertMiddlewareKey = genXpertMiddlewareKey;
3994
+ exports.genXpertSkillKey = genXpertSkillKey;
3995
+ exports.genXpertTriggerKey = genXpertTriggerKey;
3996
+ exports.generateCronExpression = generateCronExpression;
3997
+ exports.getAgentMiddlewareNodes = getAgentMiddlewareNodes;
3998
+ exports.getAgentVarGroup = getAgentVarGroup;
3999
+ exports.getCurrentGraph = getCurrentGraph;
4000
+ exports.getEnabledTools = getEnabledTools;
4001
+ exports.getStoreNamespace = getStoreNamespace;
4002
+ exports.getSwarmPartners = getSwarmPartners;
4003
+ exports.getToolCallFromConfig = getToolCallFromConfig;
4004
+ exports.getToolCallIdFromConfig = getToolCallIdFromConfig;
4005
+ exports.getToolLabel = getToolLabel;
4006
+ exports.getVariableSchema = getVariableSchema;
4007
+ exports.getWorkflowTriggers = getWorkflowTriggers;
4008
+ exports.getWorkspaceFromRunnable = getWorkspaceFromRunnable;
4009
+ exports.isAgentKey = isAgentKey;
4010
+ exports.isAudioType = isAudioType;
4011
+ exports.isDocumentSheet = isDocumentSheet;
4012
+ exports.isEnableTool = isEnableTool;
4013
+ exports.isImageType = isImageType;
4014
+ exports.isIteratingKey = isIteratingKey;
4015
+ exports.isMessageGroup = isMessageGroup;
4016
+ exports.isRouterKey = isRouterKey;
4017
+ exports.isToolEnabled = isToolEnabled;
4018
+ exports.isVideoType = isVideoType;
4019
+ exports.isWorkflowKey = isWorkflowKey;
4020
+ exports.letterStartSUID = letterStartSUID;
4021
+ exports.locateNodes = locateNodes;
4022
+ exports.mapTranslationLanguage = mapTranslationLanguage;
4023
+ exports.messageContentText = messageContentText;
4024
+ exports.omitXpertRelations = omitXpertRelations;
4025
+ exports.setStateVariable = setStateVariable;
4026
+ exports.shortTitle = shortTitle;
4027
+ exports.transformInstallation = transformInstallation;
4028
+ exports.uuid = uuid;
4029
+ exports.workflowNodeIdentifier = workflowNodeIdentifier;
4030
+ exports.xpertLabel = xpertLabel;