@sinequa/atomic 0.0.61

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 (298) hide show
  1. package/README.md +18 -0
  2. package/dist/atomic.js +860 -0
  3. package/dist/atomic.umd.cjs +1 -0
  4. package/dist/auth/auth.d.ts +39 -0
  5. package/dist/auth/auth.d.ts.map +1 -0
  6. package/dist/auth/index.d.ts +2 -0
  7. package/dist/auth/index.d.ts.map +1 -0
  8. package/dist/configurations/global.config.d.ts +35 -0
  9. package/dist/configurations/global.config.d.ts.map +1 -0
  10. package/dist/configurations/index.d.ts +2 -0
  11. package/dist/configurations/index.d.ts.map +1 -0
  12. package/dist/helpers/column-resolver.d.ts +10 -0
  13. package/dist/helpers/column-resolver.d.ts.map +1 -0
  14. package/dist/helpers/column-resolver.test.d.ts +2 -0
  15. package/dist/helpers/column-resolver.test.d.ts.map +1 -0
  16. package/dist/helpers/index.d.ts +5 -0
  17. package/dist/helpers/index.d.ts.map +1 -0
  18. package/dist/helpers/metadata.d.ts +13 -0
  19. package/dist/helpers/metadata.d.ts.map +1 -0
  20. package/dist/helpers/ts-helper.d.ts +8 -0
  21. package/dist/helpers/ts-helper.d.ts.map +1 -0
  22. package/dist/helpers/utils.d.ts +21 -0
  23. package/dist/helpers/utils.d.ts.map +1 -0
  24. package/dist/helpers/utils.test.d.ts +2 -0
  25. package/dist/helpers/utils.test.d.ts.map +1 -0
  26. package/dist/index.d.ts +7 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/types/aggregations/Aggregation.d.ts +38 -0
  29. package/dist/types/aggregations/Aggregation.d.ts.map +1 -0
  30. package/dist/types/aggregations/AggregationItem.d.ts +30 -0
  31. package/dist/types/aggregations/AggregationItem.d.ts.map +1 -0
  32. package/dist/types/aggregations/AggregationOptions.d.ts +14 -0
  33. package/dist/types/aggregations/AggregationOptions.d.ts.map +1 -0
  34. package/dist/types/aggregations/ListAggregation.d.ts +6 -0
  35. package/dist/types/aggregations/ListAggregation.d.ts.map +1 -0
  36. package/dist/types/aggregations/TreeAggregation.d.ts +13 -0
  37. package/dist/types/aggregations/TreeAggregation.d.ts.map +1 -0
  38. package/dist/types/aggregations/TreeAggregationNode.d.ts +27 -0
  39. package/dist/types/aggregations/TreeAggregationNode.d.ts.map +1 -0
  40. package/dist/types/aggregations/index.d.ts +7 -0
  41. package/dist/types/aggregations/index.d.ts.map +1 -0
  42. package/dist/types/api-endpoints.d.ts +4 -0
  43. package/dist/types/api-endpoints.d.ts.map +1 -0
  44. package/dist/types/audit/AuditEvent.d.ts +15 -0
  45. package/dist/types/audit/AuditEvent.d.ts.map +1 -0
  46. package/dist/types/audit/AuditEventType.d.ts +114 -0
  47. package/dist/types/audit/AuditEventType.d.ts.map +1 -0
  48. package/dist/types/audit/AuditRecord.d.ts +9 -0
  49. package/dist/types/audit/AuditRecord.d.ts.map +1 -0
  50. package/dist/types/audit/index.d.ts +5 -0
  51. package/dist/types/audit/index.d.ts.map +1 -0
  52. package/dist/types/chunks/index.d.ts +3 -0
  53. package/dist/types/chunks/index.d.ts.map +1 -0
  54. package/dist/types/chunks/text-chunk.d.ts +11 -0
  55. package/dist/types/chunks/text-chunk.d.ts.map +1 -0
  56. package/dist/types/chunks/text-location.d.ts +7 -0
  57. package/dist/types/chunks/text-location.d.ts.map +1 -0
  58. package/dist/types/config/CCAggregation.d.ts +47 -0
  59. package/dist/types/config/CCAggregation.d.ts.map +1 -0
  60. package/dist/types/config/CCApp.d.ts +87 -0
  61. package/dist/types/config/CCApp.d.ts.map +1 -0
  62. package/dist/types/config/CCAppPreLogin.d.ts +9 -0
  63. package/dist/types/config/CCAppPreLogin.d.ts.map +1 -0
  64. package/dist/types/config/CCAppRefresh.d.ts +10 -0
  65. package/dist/types/config/CCAppRefresh.d.ts.map +1 -0
  66. package/dist/types/config/CCAutocomplete.d.ts +32 -0
  67. package/dist/types/config/CCAutocomplete.d.ts.map +1 -0
  68. package/dist/types/config/CCColumn.d.ts +15 -0
  69. package/dist/types/config/CCColumn.d.ts.map +1 -0
  70. package/dist/types/config/CCColumnInfo.d.ts +38 -0
  71. package/dist/types/config/CCColumnInfo.d.ts.map +1 -0
  72. package/dist/types/config/CCColumnsInfo.d.ts +8 -0
  73. package/dist/types/config/CCColumnsInfo.d.ts.map +1 -0
  74. package/dist/types/config/CCConfig.d.ts +15 -0
  75. package/dist/types/config/CCConfig.d.ts.map +1 -0
  76. package/dist/types/config/CCIndex.d.ts +16 -0
  77. package/dist/types/config/CCIndex.d.ts.map +1 -0
  78. package/dist/types/config/CCLabels.d.ts +43 -0
  79. package/dist/types/config/CCLabels.d.ts.map +1 -0
  80. package/dist/types/config/CCList.d.ts +16 -0
  81. package/dist/types/config/CCList.d.ts.map +1 -0
  82. package/dist/types/config/CCListItem.d.ts +14 -0
  83. package/dist/types/config/CCListItem.d.ts.map +1 -0
  84. package/dist/types/config/CCQuery.d.ts +34 -0
  85. package/dist/types/config/CCQuery.d.ts.map +1 -0
  86. package/dist/types/config/CCRFM.d.ts +11 -0
  87. package/dist/types/config/CCRFM.d.ts.map +1 -0
  88. package/dist/types/config/CCRFMAction.d.ts +12 -0
  89. package/dist/types/config/CCRFMAction.d.ts.map +1 -0
  90. package/dist/types/config/CCScope.d.ts +28 -0
  91. package/dist/types/config/CCScope.d.ts.map +1 -0
  92. package/dist/types/config/CCSortingChoice.d.ts +32 -0
  93. package/dist/types/config/CCSortingChoice.d.ts.map +1 -0
  94. package/dist/types/config/CCTab.d.ts +35 -0
  95. package/dist/types/config/CCTab.d.ts.map +1 -0
  96. package/dist/types/config/CCTabSearch.d.ts +46 -0
  97. package/dist/types/config/CCTabSearch.d.ts.map +1 -0
  98. package/dist/types/config/CCWebService.d.ts +10 -0
  99. package/dist/types/config/CCWebService.d.ts.map +1 -0
  100. package/dist/types/config/EngineType.d.ts +22 -0
  101. package/dist/types/config/EngineType.d.ts.map +1 -0
  102. package/dist/types/config/EngineTypeModifier.d.ts +24 -0
  103. package/dist/types/config/EngineTypeModifier.d.ts.map +1 -0
  104. package/dist/types/config/ExportDialogModel.d.ts +13 -0
  105. package/dist/types/config/ExportDialogModel.d.ts.map +1 -0
  106. package/dist/types/config/ExportOutputFormat.d.ts +10 -0
  107. package/dist/types/config/ExportOutputFormat.d.ts.map +1 -0
  108. package/dist/types/config/ExportSourceType.d.ts +10 -0
  109. package/dist/types/config/ExportSourceType.d.ts.map +1 -0
  110. package/dist/types/config/QueryPrecision.d.ts +14 -0
  111. package/dist/types/config/QueryPrecision.d.ts.map +1 -0
  112. package/dist/types/config/QueryStrategy.d.ts +18 -0
  113. package/dist/types/config/QueryStrategy.d.ts.map +1 -0
  114. package/dist/types/config/SpellingCorrectionMode.d.ts +28 -0
  115. package/dist/types/config/SpellingCorrectionMode.d.ts.map +1 -0
  116. package/dist/types/config/index.d.ts +34 -0
  117. package/dist/types/config/index.d.ts.map +1 -0
  118. package/dist/types/credentials.d.ts +5 -0
  119. package/dist/types/credentials.d.ts.map +1 -0
  120. package/dist/types/filters/BetweenFilter.d.ts +7 -0
  121. package/dist/types/filters/BetweenFilter.d.ts.map +1 -0
  122. package/dist/types/filters/ExprFilter.d.ts +6 -0
  123. package/dist/types/filters/ExprFilter.d.ts.map +1 -0
  124. package/dist/types/filters/Filter.d.ts +10 -0
  125. package/dist/types/filters/Filter.d.ts.map +1 -0
  126. package/dist/types/filters/InFilter.d.ts +6 -0
  127. package/dist/types/filters/InFilter.d.ts.map +1 -0
  128. package/dist/types/filters/NotNullFilter.d.ts +5 -0
  129. package/dist/types/filters/NotNullFilter.d.ts.map +1 -0
  130. package/dist/types/filters/NullFilter.d.ts +5 -0
  131. package/dist/types/filters/NullFilter.d.ts.map +1 -0
  132. package/dist/types/filters/SimpleFilter.d.ts +5 -0
  133. package/dist/types/filters/SimpleFilter.d.ts.map +1 -0
  134. package/dist/types/filters/index.d.ts +9 -0
  135. package/dist/types/filters/index.d.ts.map +1 -0
  136. package/dist/types/filters/legacy-filters.d.ts +13 -0
  137. package/dist/types/filters/legacy-filters.d.ts.map +1 -0
  138. package/dist/types/index.d.ts +16 -0
  139. package/dist/types/index.d.ts.map +1 -0
  140. package/dist/types/interfaces/Open.d.ts +14 -0
  141. package/dist/types/interfaces/Open.d.ts.map +1 -0
  142. package/dist/types/interfaces/Query.d.ts +136 -0
  143. package/dist/types/interfaces/Query.d.ts.map +1 -0
  144. package/dist/types/interfaces/Select.d.ts +15 -0
  145. package/dist/types/interfaces/Select.d.ts.map +1 -0
  146. package/dist/types/interfaces/index.d.ts +4 -0
  147. package/dist/types/interfaces/index.d.ts.map +1 -0
  148. package/dist/types/interfaces/json.d.ts +7 -0
  149. package/dist/types/interfaces/json.d.ts.map +1 -0
  150. package/dist/types/labels/label-rights.d.ts +5 -0
  151. package/dist/types/labels/label-rights.d.ts.map +1 -0
  152. package/dist/types/link-results/index.d.ts +3 -0
  153. package/dist/types/link-results/index.d.ts.map +1 -0
  154. package/dist/types/link-results/link-results.d.ts +12 -0
  155. package/dist/types/link-results/link-results.d.ts.map +1 -0
  156. package/dist/types/link-results/links-results.d.ts +9 -0
  157. package/dist/types/link-results/links-results.d.ts.map +1 -0
  158. package/dist/types/preview/CategoryHighlightData.d.ts +12 -0
  159. package/dist/types/preview/CategoryHighlightData.d.ts.map +1 -0
  160. package/dist/types/preview/CustomHighlights.d.ts +8 -0
  161. package/dist/types/preview/CustomHighlights.d.ts.map +1 -0
  162. package/dist/types/preview/HighlightDataPerCategory.d.ts +6 -0
  163. package/dist/types/preview/HighlightDataPerCategory.d.ts.map +1 -0
  164. package/dist/types/preview/HighlightDataPerLocation.d.ts +11 -0
  165. package/dist/types/preview/HighlightDataPerLocation.d.ts.map +1 -0
  166. package/dist/types/preview/HighlightValue.d.ts +10 -0
  167. package/dist/types/preview/HighlightValue.d.ts.map +1 -0
  168. package/dist/types/preview/Location.d.ts +8 -0
  169. package/dist/types/preview/Location.d.ts.map +1 -0
  170. package/dist/types/preview/PreviewData.d.ts +15 -0
  171. package/dist/types/preview/PreviewData.d.ts.map +1 -0
  172. package/dist/types/preview/index.d.ts +8 -0
  173. package/dist/types/preview/index.d.ts.map +1 -0
  174. package/dist/types/principal/Principal.d.ts +29 -0
  175. package/dist/types/principal/Principal.d.ts.map +1 -0
  176. package/dist/types/principal/PrincipalChangedEvent.d.ts +11 -0
  177. package/dist/types/principal/PrincipalChangedEvent.d.ts.map +1 -0
  178. package/dist/types/principal/PrincipalEvent.d.ts +7 -0
  179. package/dist/types/principal/PrincipalEvent.d.ts.map +1 -0
  180. package/dist/types/principal/PrincipalParams.d.ts +8 -0
  181. package/dist/types/principal/PrincipalParams.d.ts.map +1 -0
  182. package/dist/types/principal/PrincipalUserIdsParams.d.ts +6 -0
  183. package/dist/types/principal/PrincipalUserIdsParams.d.ts.map +1 -0
  184. package/dist/types/principal/PrincipalUserInfo.d.ts +11 -0
  185. package/dist/types/principal/PrincipalUserInfo.d.ts.map +1 -0
  186. package/dist/types/principal/index.d.ts +7 -0
  187. package/dist/types/principal/index.d.ts.map +1 -0
  188. package/dist/types/search/AccessListPrincipal.d.ts +17 -0
  189. package/dist/types/search/AccessListPrincipal.d.ts.map +1 -0
  190. package/dist/types/search/AccessLists.d.ts +9 -0
  191. package/dist/types/search/AccessLists.d.ts.map +1 -0
  192. package/dist/types/search/Answer.d.ts +16 -0
  193. package/dist/types/search/Answer.d.ts.map +1 -0
  194. package/dist/types/search/Article.d.ts +194 -0
  195. package/dist/types/search/Article.d.ts.map +1 -0
  196. package/dist/types/search/Attributes.d.ts +17 -0
  197. package/dist/types/search/Attributes.d.ts.map +1 -0
  198. package/dist/types/search/DidYouMean.d.ts +10 -0
  199. package/dist/types/search/DidYouMean.d.ts.map +1 -0
  200. package/dist/types/search/DidYouMeanItem.d.ts +17 -0
  201. package/dist/types/search/DidYouMeanItem.d.ts.map +1 -0
  202. package/dist/types/search/DidYouMeanKind.d.ts +8 -0
  203. package/dist/types/search/DidYouMeanKind.d.ts.map +1 -0
  204. package/dist/types/search/DocumentAccessLists.d.ts +10 -0
  205. package/dist/types/search/DocumentAccessLists.d.ts.map +1 -0
  206. package/dist/types/search/EntityItem.d.ts +26 -0
  207. package/dist/types/search/EntityItem.d.ts.map +1 -0
  208. package/dist/types/search/MatchLocationsPerPartname.d.ts +8 -0
  209. package/dist/types/search/MatchLocationsPerPartname.d.ts.map +1 -0
  210. package/dist/types/search/MatchingPassage.d.ts +11 -0
  211. package/dist/types/search/MatchingPassage.d.ts.map +1 -0
  212. package/dist/types/search/PartnameMatchLocations.d.ts +8 -0
  213. package/dist/types/search/PartnameMatchLocations.d.ts.map +1 -0
  214. package/dist/types/search/Passage.d.ts +8 -0
  215. package/dist/types/search/Passage.d.ts.map +1 -0
  216. package/dist/types/search/QueryAnalysis.d.ts +11 -0
  217. package/dist/types/search/QueryAnalysis.d.ts.map +1 -0
  218. package/dist/types/search/QueryAnalysisElement.d.ts +24 -0
  219. package/dist/types/search/QueryAnalysisElement.d.ts.map +1 -0
  220. package/dist/types/search/QueryIntent.d.ts +15 -0
  221. package/dist/types/search/QueryIntent.d.ts.map +1 -0
  222. package/dist/types/search/QueryIntentAction.d.ts +11 -0
  223. package/dist/types/search/QueryIntentAction.d.ts.map +1 -0
  224. package/dist/types/search/QueryIntentData.d.ts +27 -0
  225. package/dist/types/search/QueryIntentData.d.ts.map +1 -0
  226. package/dist/types/search/QueryIntentDatasets.d.ts +13 -0
  227. package/dist/types/search/QueryIntentDatasets.d.ts.map +1 -0
  228. package/dist/types/search/QueryIntentEntity.d.ts +12 -0
  229. package/dist/types/search/QueryIntentEntity.d.ts.map +1 -0
  230. package/dist/types/search/QueryIntentWord.d.ts +12 -0
  231. package/dist/types/search/QueryIntentWord.d.ts.map +1 -0
  232. package/dist/types/search/RFMActionDisplay.d.ts +16 -0
  233. package/dist/types/search/RFMActionDisplay.d.ts.map +1 -0
  234. package/dist/types/search/RFMData.d.ts +10 -0
  235. package/dist/types/search/RFMData.d.ts.map +1 -0
  236. package/dist/types/search/RFMDisplay.d.ts +18 -0
  237. package/dist/types/search/RFMDisplay.d.ts.map +1 -0
  238. package/dist/types/search/RelevantExtract.d.ts +11 -0
  239. package/dist/types/search/RelevantExtract.d.ts.map +1 -0
  240. package/dist/types/search/Result.d.ts +43 -0
  241. package/dist/types/search/Result.d.ts.map +1 -0
  242. package/dist/types/search/Tab.d.ts +25 -0
  243. package/dist/types/search/Tab.d.ts.map +1 -0
  244. package/dist/types/search/TermPresence.d.ts +11 -0
  245. package/dist/types/search/TermPresence.d.ts.map +1 -0
  246. package/dist/types/search/TopPassage.d.ts +13 -0
  247. package/dist/types/search/TopPassage.d.ts.map +1 -0
  248. package/dist/types/search/index.d.ts +32 -0
  249. package/dist/types/search/index.d.ts.map +1 -0
  250. package/dist/types/suggest/suggestion.d.ts +11 -0
  251. package/dist/types/suggest/suggestion.d.ts.map +1 -0
  252. package/dist/types/user-settings/user-settings.d.ts +14 -0
  253. package/dist/types/user-settings/user-settings.d.ts.map +1 -0
  254. package/dist/utils/aggregations.d.ts +51 -0
  255. package/dist/utils/aggregations.d.ts.map +1 -0
  256. package/dist/utils/array/bisect.d.ts +17 -0
  257. package/dist/utils/array/bisect.d.ts.map +1 -0
  258. package/dist/utils/concepts.d.ts +72 -0
  259. package/dist/utils/concepts.d.ts.map +1 -0
  260. package/dist/utils/date.d.ts +31 -0
  261. package/dist/utils/date.d.ts.map +1 -0
  262. package/dist/utils/index.d.ts +7 -0
  263. package/dist/utils/index.d.ts.map +1 -0
  264. package/dist/utils/query-params.d.ts +72 -0
  265. package/dist/utils/query-params.d.ts.map +1 -0
  266. package/dist/utils/syslang.d.ts +27 -0
  267. package/dist/utils/syslang.d.ts.map +1 -0
  268. package/dist/web-api/fetch-aggregation.d.ts +11 -0
  269. package/dist/web-api/fetch-aggregation.d.ts.map +1 -0
  270. package/dist/web-api/fetch-app.d.ts +17 -0
  271. package/dist/web-api/fetch-app.d.ts.map +1 -0
  272. package/dist/web-api/fetch-audit.d.ts +33 -0
  273. package/dist/web-api/fetch-audit.d.ts.map +1 -0
  274. package/dist/web-api/fetch-dataset.d.ts +43 -0
  275. package/dist/web-api/fetch-dataset.d.ts.map +1 -0
  276. package/dist/web-api/fetch-labels.d.ts +95 -0
  277. package/dist/web-api/fetch-labels.d.ts.map +1 -0
  278. package/dist/web-api/fetch-preview.d.ts +17 -0
  279. package/dist/web-api/fetch-preview.d.ts.map +1 -0
  280. package/dist/web-api/fetch-principal.d.ts +13 -0
  281. package/dist/web-api/fetch-principal.d.ts.map +1 -0
  282. package/dist/web-api/fetch-query.d.ts +27 -0
  283. package/dist/web-api/fetch-query.d.ts.map +1 -0
  284. package/dist/web-api/fetch-sponsored-links.d.ts +14 -0
  285. package/dist/web-api/fetch-sponsored-links.d.ts.map +1 -0
  286. package/dist/web-api/fetch-suggest.d.ts +55 -0
  287. package/dist/web-api/fetch-suggest.d.ts.map +1 -0
  288. package/dist/web-api/fetch-text-chunk.d.ts +16 -0
  289. package/dist/web-api/fetch-text-chunk.d.ts.map +1 -0
  290. package/dist/web-api/fetch-user-settings.d.ts +28 -0
  291. package/dist/web-api/fetch-user-settings.d.ts.map +1 -0
  292. package/dist/web-api/helpers.d.ts +35 -0
  293. package/dist/web-api/helpers.d.ts.map +1 -0
  294. package/dist/web-api/helpers.test.d.ts +2 -0
  295. package/dist/web-api/helpers.test.d.ts.map +1 -0
  296. package/dist/web-api/index.d.ts +14 -0
  297. package/dist/web-api/index.d.ts.map +1 -0
  298. package/package.json +41 -0
@@ -0,0 +1 @@
1
+ (function(r,_){typeof exports=="object"&&typeof module<"u"?_(exports):typeof define=="function"&&define.amd?define(["exports"],_):(r=typeof globalThis<"u"?globalThis:r||self,_(r.atomic={}))})(this,function(r){"use strict";r.globalConfig={apiPath:"api/v1",loginPath:"/login",backendUrl:window.location.origin};function _(e){r.globalConfig={...r.globalConfig,...e}}function D(e){const t=L(),n=new Headers(e);n.append("Sinequa-Force-Camel-Case","true"),n.append("accept","application/json"),n.append("Sinequa-csrf-token",t);const{userOverride:a,userOverrideActive:o}=r.globalConfig;return a&&o&&(n.append("sinequa-override-user",a.username),n.append("sinequa-override-domain",a.domain)),n}async function S(e){var n;if(e.status===401)throw r.globalConfig.userOverrideActive?(r.globalConfig.userOverrideActive=!1,new Error("Unauthorized... User override failed.")):await((n=e.body)==null?void 0:n.getReader().read().then(({done:o,value:i})=>{if(o)return e;const c=JSON.parse(new TextDecoder().decode(i));return c.status=401,c}));if(e.status===500||e.status!==200)throw e;const t=e.headers.get("sinequa-jwt-refresh");return t!==null&&P(t),await e.json()}async function u(e,t,n){const a=D(n==null?void 0:n.headers),{app:o,backendUrl:i,apiPath:c}=r.globalConfig,s={app:o,...t,locale:t.locale||navigator.language,noUserOverride:!0,noAutoAuthentication:!0},l=await fetch(`${i}/${c}/${e}`,{method:"POST",headers:a,body:JSON.stringify(s)});return S(l)}async function g(e,t,n){const a=D(n==null?void 0:n.headers),{backendUrl:o,apiPath:i}=r.globalConfig,c=t?`?${new URLSearchParams(t)}`:void 0,s=await fetch(`${o}/${i}/${e}${c}`,{method:"GET",headers:a});return S(s)}const M=11;async function ee(e,t,n){var c;const o=await u("query",{query:e,$auditRecord:t,queryIntentData:n});o.aggregations.forEach(s=>{s.$hasMore=!1,!s.isDistribution&&!s.isTree&&s.items&&(s.$hasMore=s.items.length===M),s.isTree&&s.items&&b(s)}),(c=o.records)==null||c.map(s=>Object.assign(s,{value:s.title,type:"default"}));const i={...o,nextPage:o.page<Math.ceil(o.rowCount/o.pageSize)?o.page+1:void 0,previousPage:o.page>1?o.page-1:void 0};return Promise.resolve(i)}async function te(e,t,n){const{app:a=""}=r.globalConfig,o={methods:[],mode:t,propagateErrors:!0,$auditRecord:{auditEvents:[n]}};for(const s of e)o.methods.push({method:"query",app:a,query:s});const i=await u("multi",o);i.results.forEach(s=>{s.aggregations.forEach(l=>{l.$hasMore=!1,!l.isDistribution&&!l.isTree&&l.items&&(l.$hasMore=l.items.length===M),l.isTree&&b(l)})}),i.results.forEach(s=>{var l;return(l=s.records)==null?void 0:l.map(f=>Object.assign(f,{value:f.title,type:"default"}))});const c=i.results.map(s=>({...s,nextPage:s.page<Math.ceil(s.rowCount/s.pageSize)?s.page+1:void 0,previousPage:s.page>1?s.page-1:void 0}));return Promise.resolve(c)}function b(e,t="",n=0){let a=[];return e.items&&e.items.forEach(o=>{let i=t?`${t}/${o.value}`:o.value,c=n+1;a.push({path:i,level:c}),o.$path=i,o.$level=c,o.hasChildren&&(a=a.concat(b(o,i,c)))}),a}async function ne(e,t){const n=`${window.location.origin}${window.location.pathname}`,a={name:t==null?void 0:t.name,text:t==null?void 0:t.text};return u("preview",{action:"get",id:e,query:a,browserUrl:n})}async function ae(e){const t=new Headers;t.append("content-type","text");const n=await fetch(e,{method:"GET",headers:t});S(n)}async function re(){const e=new URLSearchParams({action:"get",noAutoAuthentication:"true"});return g("principal",e)}async function oe(){const{app:e}=r.globalConfig,t=new URLSearchParams({app:e||""});return g("app",t)}async function $(){const{app:e}=r.globalConfig,t=new URLSearchParams({app:e||"",preLogin:"true"});return g("app",t)}function ie(){let{backendUrl:e,app:t}=r.globalConfig;if(e||(e=window.location.origin),!t){const n=window.location.pathname.match(/\/app(?:-debug)?\/([^\/#]+)/);n&&(t=n[1])}return _({...r.globalConfig,backendUrl:e,app:t}),$().then(n=>{const{autoOAuthProvider:a,autoSAMLProvider:o}=r.globalConfig,i=!a&&!n.autoOAuthProvider&&!o&&!n.autoSAMLProvider;_({...r.globalConfig,autoOAuthProvider:a||n.autoOAuthProvider,autoSAMLProvider:o||n.autoSAMLProvider,useCredentialsOrSSO:i}),console.log("Application initialized",n)}).catch(n=>{throw console.error("Error initializing application",n),n})}async function se(e,t,n){var d;const a=((d=e.items)==null?void 0:d.length)||0,o=10,i={query:{...t,action:"aggregate",aggregations:{[e.name]:{skip:a,count:o}}},$auditRecord:{auditEvents:[n]}},c=await u("query",i),s=await S(c),{aggregations:l}=s,f=l[0];return f.$hasMore=f.items.length>o,f.items=[...e.items,...f.items],Promise.resolve(f)}function ce(e,t,n){var i,c,s,l;if(!e||!t)return;if(n){const f=Object.keys(t.queries).find(F=>F===(n==null?void 0:n.toLowerCase()));let d;f&&(d=t.queries[f]);const O=(c=((i=d==null?void 0:d.columnsInfo)==null?void 0:i.columns)||[])==null?void 0:c.find(F=>{var E,T;return(T=(E=F.aliases)==null?void 0:E.split(","))==null?void 0:T.includes(e)});if(O)return O.name}const a=(l=(s=t.indexes)==null?void 0:s._)==null?void 0:l.columns,o=Object.entries(a).find(f=>{var d;return(d=f[1].aliases)==null?void 0:d.includes(e)});if(o)return o[0]}function le(e,t){const n=e[t];return n===void 0?[]:Array.isArray(n)?n.map(a=>typeof a=="string"?{display:a}:a):[{display:n}]}function m(e){return e!==null&&typeof e=="object"}function I(e){return m(e)&&Object.prototype.toString.call(e)==="[object ArrayBuffer]"}function A(e){return m(e)&&Object.prototype.toString.call(e)==="[object Blob]"}function Q(e){return typeof e=="string"}function ue(e){return(m(e)||Array.isArray(e))&&!I(e)&&!A(e)&&!Q(e)}function B(e=!0){let t=Date.now();return(e?"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx":"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx").replace(/[xy]/g,a=>{const o=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(a==="x"?o:o&3|8).toString(16)})}function fe(e){if(!e)return"``";if(e=String(e),e.search(/[\\`]/)===-1)return"`"+e+"`";const t=["`"];for(let n=0,a=e.length;n<a;n++){const o=e[n];(o==="\\"||o==="`")&&t.push("\\"),t.push(o)}return t.push("`"),t.join("")}function de(e){return crypto.subtle.digest("SHA-512",new TextEncoder().encode(e)).then(t=>Array.prototype.map.call(new Uint8Array(t),n=>("00"+n.toString(16)).slice(-2)).join(""))}var h=(e=>(e.None="None",e.Search_FirstPage="Search_FirstPage",e.Search_Text="Search_Text",e.Search_Refine="Search_Refine",e.Search_Select_Item="Search_Select_Item",e.Search_Select_Custom="Search_Select_Custom",e.Search_Select_Concept="Search_Select_Concept",e.Search_Select_Correction="Search_Select_Correction",e.Search_GotoPage="Search_GotoPage",e.Search_GotoTab="Search_GotoTab",e.Search_DisplayResult="Search_DisplayResult",e.Search_RemoveResult="Search_RemoveResult",e.Search_RemoveAdvanced="Search_RemoveAdvanced",e.Search_SavedQuery="Search_SavedQuery",e.Search_WebService="Search_WebService",e.Search_DidYouMean_Original="Search_DidYouMean_Original",e.Search_DidYouMean_Correction="Search_DidYouMean_Correction",e.Search_ExportCSV="Search_ExportCSV",e.Search_SavedQuery_ExportCSV="Search_SavedQuery_ExportCSV",e.Search_Selection_ExportCSV="Search_Selection_ExportCSV",e.Search_AlertQuery="Search_AlertQuery",e.Search_Select_AnalyticsItem="Search_Select_AnalyticsItem",e.Search_Sort="Search_Sort",e.Search_Exit_Logout="Search_Exit_Logout",e.Search_Timeline_Usage="Search_Timeline_Usage",e.Search_AutoComplete="Search_Autocomplete",e.Search_Login_Success="Login_Success_Form",e.Search_QueryIntent_Detected="Search_QueryIntent_Detected",e.SavedQuery_Add="SavedQuery_Add",e.SavedQuery_Delete="SavedQuery_Delete",e.SavedQuery_DeleteAll="SavedQuery_DeleteAll",e.SavedQuery_Rename="SavedQuery_Rename",e.Alert_Edit="Alert_Edit",e.Alert_Delete="Alert_Delete",e.Alert_DeleteAll="Alert_DeleteAll",e.Link_Display="Link_Display",e.Link_Click="Link_Click",e.Basket_Add="Basket_Add",e.Basket_Delete="Basket_Delete",e.Basket_DeleteAll="Basket_DeleteAll",e.Basket_Rename="Basket_Rename",e.Basket_AddDoc="Basket_AddDoc",e.Basket_RemoveDoc="Basket_RemoveDoc",e.Basket_Open="Basket_Open",e.Basket_ExportCSV="Basket_ExportCSV",e.Label_Add="Label_Add",e.Label_Delete="Label_Delete",e.Label_Rename="Label_Rename",e.Label_Open="Label_Open",e.Label_AddDoc="Label_AddDoc",e.Label_RemoveDoc="Label_RemoveDoc",e.Label_ExportCSV="Label_ExportCSV",e.Label_Menu_ExportCSV="Label_Menu_ExportCSV",e.Rating_Set="Rating_Set",e.Rating_Delete="Rating_Delete",e.Doc_Preview="Doc_Preview",e.Doc_CacheHtml="Doc_CacheHtml",e.Doc_CachePdf="Doc_CachePdf",e.Doc_CacheOriginal="Doc_CacheOriginal",e.Doc_Url1="Doc_Url1",e.Doc_Url2="Doc_Url2",e.Preview_Close="Preview_Close",e.Click_ResultLink="Click_ResultLink",e.Click_ResultLink1="Click_ResultLink1",e.Click_ResultLink2="Click_ResultLink2",e.Click_ResultLink3="Click_ResultLink3",e.Click_ResultLink4="Click_ResultLink4",e.Click_ResultLink5="Click_ResultLink5",e.Click_ResultLink6="Click_ResultLink6",e.Click_ResultLink7="Click_ResultLink7",e.Click_ResultLink8="Click_ResultLink8",e.Click_ResultLink9="Click_ResultLink9",e.Click_ResultLink10="Click_ResultLink10",e.Click_PreviewLink1="Click_PreviewLink1",e.Click_PreviewLink2="Click_PreviewLink2",e.Click_PreviewLink3="Click_PreviewLink3",e.Click_PreviewLink4="Click_PreviewLink4",e.Click_PreviewLink5="Click_PreviewLink5",e.Click_PreviewLink6="Click_PreviewLink6",e.Click_PreviewLink7="Click_PreviewLink7",e.Click_PreviewLink8="Click_PreviewLink8",e.Click_PreviewLink9="Click_PreviewLink9",e.Click_PreviewLink10="Click_PreviewLink10",e.RFM_ClickSet="RFM_ClickSet",e.RFM_ClickReset="RFM_ClickReset",e.RFM_Like="RFM_Like",e.RFM_LikeReset="RFM_LikeReset",e.RFM_Dislike="RFM_Dislike",e.RFM_Important="RFM_Important",e.RFM_ImportantReset="RFM_ImportantReset",e.RFM_Ban="RFM_Ban",e.Navigation_Exit="Navigation_Exit",e.Navigation_Return="Navigation_Return",e.Navigation_Route="Navigation_Route",e.Answer_Display="Answer_Display",e.Answer_Click="Answer_Click",e.Answer_Result="Answer_Result",e.Answer_Liked="Answer_Liked",e.Answer_Disliked="Answer_Disliked",e.Answer_Liked_Cancelled="Answer_Liked_Cancelled",e.Answer_Disliked_Cancelled="Answer_Disliked_Cancelled",e.TopPassages_Display="TopPassages_Display",e.TopPassages_Click="TopPassages_Click",e.UserSettings_Reset="UserSettings_Reset",e))(h||{});const he="1.0";let y,N;function w(e){let t=_e(e.$auditRecord);t&&(G(t),V(t)),e.$auditRecord=t}function _e(e){if(!e)return;let t;if(Array.isArray(e))t=e;else if(m(e)){const n=e;if(n.auditEvents||n.mlAuditEvents)return n;t=[e]}return{auditEvents:t}}function G(e){var n;const t=ge();return(n=e.auditEvents)==null||n.forEach(a=>{a.detail||(a.detail={}),a.detail.sessionid=t}),e}function V(e){var n;const t=decodeURIComponent(window.location.href);return(n=e==null?void 0:e.auditEvents)==null||n.forEach(a=>{a.detail||(a.detail={}),a.detail.url=t}),e}function ge(){return(!y||ke())&&(y=B()),N=new Date,y}function ke(){return new Date().getTime()-N.getTime()>10*60*1e3}async function Se(e){const t={event:h.None,$auditRecord:e};return w(t),u("audit.notify",t)}const me={notify:Se};async function Ce(){const{app:e}=r.globalConfig,t=new URLSearchParams({app:e||"",action:"load"});return g("usersettings",t)}async function j(e,t){const n={action:"save",userSettings:e,$auditRecord:{auditEvents:[t]}};return w(n),u("usersettings",n)}async function be(e,t){const a={action:"patch",userSettings:e,$auditRecord:t?{auditEvents:[t]}:void 0};return w(a),u("usersettings",a)}async function we(){return j({},{type:"UserSettings_Reset"})}async function Re(e,t,n,a,o){const{app:i}=r.globalConfig;return(await u("search.suggest",{app:i||"",suggestQuery:e,text:t,filter:n,kinds:a,showSource:o})).suggests}async function Le(e,t,n,a){const{app:o}=r.globalConfig;return(await u("suggestquery",{app:o||"",suggestQuery:e,text:t,query:n,kinds:a})).suggests}async function Pe(e,t){if(!t)return Promise.resolve([]);const{app:n}=r.globalConfig;return(await u("suggestfield",{app:n||"",text:e,action:"suggests",fields:t})).suggests}async function pe(e,t){var o;const a=await u("query.links",{webservice:e,query:t});return(o=a==null?void 0:a.links)==null?void 0:o.map(i=>({...i,query:t}))}async function De(e,t,n,a,o,i){return u("doc.textchunks",{id:e,textChunks:t,highlights:n,query:a,leftSentencesCount:o,rightSentencesCount:i})}async function ye(e,t,n={}){const a=`search.dataset/${e}/${t}`,i=(await u(a,{parameters:n})).datasets[t];if("errorCode"in i&&"errorMessage"in i)throw new Error(i.errorMessage);return i}async function ve(e,t){const n=`search.dataset/${e}`,{parameters:a={},datasets:o=[]}=t;return(await u(n,{parameters:a,datasets:o})).datasets}async function Ue(e){return await g(`search.dataset/${e}`)}async function Oe(e,t=!0,n){return(await u("labels",{action:"list",q:e,public:t,locale:n,localize:!1})).labels}async function Fe(){const{app:e=""}=r.globalConfig,t=new URLSearchParams({app:e,action:"getUserRights"});return g("labels",t)}async function Me(e,t,n=!0){const a={action:"add",labels:e,ids:t,public:n,$auditRecord:{auditEvents:[{type:h.Label_AddDoc,detail:{public:n,label:e?e.toString():null,doccount:t?t.length:0}}],mlAuditEvents:[{actionType:"addToLabel",documentIds:t}]}};return u("labels",a)}async function $e(e,t,n=!0){const a={action:"remove",labels:e,ids:t,public:n,$auditRecord:{auditEvents:[{type:h.Label_RemoveDoc,detail:{public:n,label:e?e.toString():null,doccount:t?t.length:0}}],mlAuditEvents:[{actionType:"removeFromLabel",documentIds:t}]}};return u("labels",a)}async function Ie(e,t,n=!0){const a={action:"rename",labels:e,newLabel:t,public:n,auditEvents:{type:h.Label_Rename,detail:{public:n,oldlabel:e?e.toString():null,label:t}}};return u("labels",a)}async function Ae(e,t=!0){const n={action:"delete",labels:e,public:t,auditEvents:{type:h.Label_Delete,detail:{public:t,label:e?e.toString():null}}};return u("labels",n)}async function Qe(e,t,n=!0){const a={action:"bulkAdd",labels:e,query:t,public:n,auditEvents:{type:h.Label_Add,detail:{public:n,label:e?e.toString():null,query:t!==null?t.name:null}}};return u("labels",a)}async function Be(e,t,n=!0){const a={action:"bulkRemove",labels:e,query:t,public:n,auditEvents:{type:h.Label_Delete,detail:{public:n,label:e?e.toString():null,query:t!==null?t.name:null}}};return u("labels",a)}const Ne={getUserRights:Fe,add:Me,remove:$e,rename:Ie,delete:Ae,bulkAdd:Qe,bulkRemove:Be};function R(e){const t=new CustomEvent("authenticated",{bubbles:!0,cancelable:!1,detail:{authenticated:e}});dispatchEvent(t)}async function Ge(){const{autoOAuthProvider:e}=r.globalConfig,t={action:"getcode",provider:e,tokenInCookie:!0,originalUrl:window.location.href},n=await u("security.oauth",t);n.redirectUrl&&(window.location.href=n.redirectUrl)}async function Ve(){const{autoSAMLProvider:e}=r.globalConfig,t={action:"getresponse",provider:e,tokenInCookie:!0,originalUrl:window.location.href},n=await u("security.saml",t);n.redirectUrl&&(window.location.href=n.redirectUrl)}const J=async e=>{const{username:t,password:n}=e||{},o=await u("webToken",{action:"get",tokenInCookie:!0,user:t,password:n,noUserOverride:!0,noAutoAuthentication:!0});return o.csrfToken?(P(o.csrfToken),!0):!1},z=async()=>{const e=new URLSearchParams({action:"deleteWebTokenCookie",noUserOverride:"true",noAutoAuthentication:"true"});return g("challenge",e)},L=()=>localStorage.getItem("csrfToken")||"",P=e=>localStorage.setItem("csrfToken",e),je=async e=>{const{useSSO:t}=r.globalConfig;if(L()||t)return R(!0),!0;const{username:n,password:a}=e||{};let o;return n&&a?(_({useCredentials:!0}),o=await J(e)):o=await He(),R(o),o},Je=async()=>{const{useCredentials:e,userOverrideActive:t}=r.globalConfig;localStorage.removeItem("csrfToken"),e&&!t?(await z()).methodresult==="ok"?R(!1):console.error("logout failed"):R(!1)},ze=()=>!!L(),He=async()=>{const{backendUrl:e,apiPath:t,autoOAuthProvider:n,autoSAMLProvider:a}=r.globalConfig,i=await(await fetch(`${e}/${t}/challenge?action=getCsrfToken&suppressErrors=true`)).json();if(i!=null&&i.csrfToken)return P(i.csrfToken),!0;if(n)await Ge();else if(a)await Ve();else throw new Error("No CSRF token found and no autoOauthProvider nor autoSAMLProvider are specified");return!1};function We(e,t){var o;return!(e!=null&&e.items)||((o=e==null?void 0:e.items)==null?void 0:o.length)===0?[]:e.items.reduce((i,c)=>{if(!c.value||c.value==="")return i;const s=H(c,e.column);return i.push({operator:s.operator,value:s.value,display:c.display||s.display,filters:s.filters,disabled:c.count===0,hidden:c.count===0&&e.isDistribution?!t:!1}),i},[])}function H(e,t){const n=t,a=e.value.match(/.*\:\(?([><=\d\-\.AND ]+)\)?/);if(a!=null&&a[1]){const i=(a==null?void 0:a[1].split(" AND ")).map(c=>{const s=c.indexOf(">=")!==-1?"gte":"lt";let l=c.substring(c.indexOf(" ")+1);return{field:n,operator:s,value:l,display:e.display||e.value}});if(i.length===2)return{field:n,operator:"and",filters:i,value:e.value,display:i[0].display||i[0].value};if(i.length===1)return{...i[0],field:n};throw new Error("Failed to parse distribution expression")}return{field:n,operator:"eq",value:e.value,display:e.display}}function qe(e,t,n){return e.valuesAreExpressions?t.display===n.display:t.value===n.value}function Xe(e,t){const n=[];if(e.length>0){const a=new Map,o=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=new RegExp("\\b"+o,"i");e.forEach(c=>{if(c.display.length>1){const s=i.exec(c.display);W(n,a,"/",c.display,+(c.frequency||0),1,((s==null?void 0:s.index)||0)+t.length)}})}return n}function W(e,t,n,a,o,i,c){const s=a.indexOf("/",n.length),l=a.substring(0,s+1);let f=t.get(l);if(!f){const d=l.replace(/^\/|\/$/g,"");f={value:a.substring(n.length,s),count:o,items:[],hasChildren:!1,$level:i,$opened:c>=l.length,$path:d},t.set(l,f),e.push(f)}l.length<a.length&&(f.hasChildren=!0,W(f.items,t,l,a,o,i+1,c))}function Ye(e,t){return e.reduce((n,a)=>(t(a)?n.true.push(a):n.false.push(a),n),{true:[],false:[]})}const xe=/(([\+\-])?\(([^\)]+)\))|(([\+\-])?\[([^\]]+)\])|(([\+\-])?\"([^\"]+)\")|(([\+\-])?\/([^\/]+)\/)|(([\+\-])?(\S+))/g,Ke=2,q=3,Ze=5,X=6,Ee=8,Y=9,Te=11,x=12,et=14,K=15;function C(e){if(!e)return[];const t=[],n=e.matchAll(xe);for(let a of n)a[q]?t.push({type:"group",value:a[q],op:a[Ke]}):a[X]?t.push({type:"adjacent",value:a[X],op:a[Ze]}):a[Y]?t.push({type:"exact",value:a[Y],op:a[Ee]}):a[x]?t.push({type:"regex",value:a[x],op:a[Te]}):a[K]&&t.push({type:"token",value:a[K],op:a[et]});return t}function p(e){return e.map(t=>{const n=t.op||"";switch(t.type){case"group":return`${n}(${t.value})`;case"adjacent":return`${n}[${t.value}]`;case"exact":return`${n}"${t.value}"`;case"regex":return`${n}/${t.value}/`;case"token":return`${n}${t.value}`}}).join(" ")}function tt(e,t,n){let a=C(e);for(let o of t)a.push({type:"adjacent",value:o,op:n});return p(a)}function nt(e,t){const n=C(t),a=n.findIndex(o=>o.value===e);return a!==-1?(n.splice(a,1),t=p(n)):t}function at(e){const t=C(e).filter(n=>n.type!=="adjacent");return p(t)}function rt(e){return C(e).filter(t=>t.type==="adjacent").map(t=>t.value)}function ot(e,t,n){const a=new Intl.RelativeTimeFormat(e,{numeric:"auto"}),{offset:o,unit:i,isFuture:c}=Z(t,n);return a.format(o*(c?1:-1),i)}function Z(e,t){const n=new Date(e),a=t?new Date(t):new Date,o=Math.abs(a.getTime()-n.getTime());return{offset:Math.floor(o/(1e3*60*60*24)),unit:"day",isFuture:n>a}}function it(e){if(e===void 0)return;const{q:t,f:n,p:a,s:o,t:i,...c}=k(e),[s]=e.split("?");return{path:s,text:t,filters:n?v(n):void 0,page:a?parseInt(a,10):void 0,sort:o,tab:i,...c}}function st(e){if(e===void 0)return[];const{f:t}=k(e);return v(t)}function v(e){const t=decodeURIComponent(e);return JSON.parse(t??"[]")}function k(e){const t=e.split("?")[1];if(t===void 0)return{};const n=new URLSearchParams(t);return Object.fromEntries(n)}function ct(e){const{q:t=""}=k(e);return t}function lt(e){const{id:t}=k(e);return decodeURIComponent(t)}function ut(e){const{p:t="0"}=k(e);return parseInt(t,10)}function ft(e){const{t}=k(e);return t}function dt(e,t){if(!e)return e;let n=0;const a=e.length;let o=0;if(e[o]==="["){for(;o<a&&/[0-9]/.test(e[o]);)o++;e[o]==="]"&&(n=o+1)}const i=U(e,n,!1);if(!i)return e;const c=t.charCodeAt(0),s=t.charCodeAt(1);let l=i;for(;l;)if(c===l.lang1&&s===l.lang2){const d=U(e,l.end+4,!0);return e.substring(d.start,d.end)}else l=U(e,l.end+4,!1);const f=e.substring(i.start,i.end);return f||e}function U(e,t,n){for(let a=t,o=e.length-3;a<o;a++)if(e[a]==="["&&e[a+3]==="]")return{start:t,end:a,lang1:e.charCodeAt(a+1),lang2:e.charCodeAt(a+2)};if(n)return{start:t,end:e.length,lang1:-1,lang2:-1}}r.Audit=me,r.AuditEventType=h,r.MINIMUM_COMPATIBLE_SERVER_API_VERSION=he,r.addAuditAdditionalInfo=w,r.addConcepts=tt,r.addSessionId=G,r.addUrl=V,r.aggregationItemStrictCompare=qe,r.appInitializerFn=ie,r.bisect=Ye,r.buildPathsAndLevels=b,r.createHeaders=D,r.deleteUserSettings=we,r.deleteWebTokenCookie=z,r.escapeExpr=fe,r.fetchAggregation=se,r.fetchApp=oe,r.fetchAppPreLogin=$,r.fetchBulkQuery=te,r.fetchDataset=ye,r.fetchDatasetList=Ue,r.fetchDatasets=ve,r.fetchLabels=Oe,r.fetchPreview=ne,r.fetchPreviewUrl=ae,r.fetchPrincipal=re,r.fetchQuery=ee,r.fetchSponsoredLinks=pe,r.fetchSuggest=Re,r.fetchSuggestField=Pe,r.fetchSuggestQuery=Le,r.fetchTextChunks=De,r.fetchUserSettings=Ce,r.get=g,r.getConcepts=rt,r.getFiltersFromURI=v,r.getFiltersFromUrl=st,r.getIdFromUrl=lt,r.getJWToken=J,r.getMetadata=le,r.getOffsetFromDates=Z,r.getQueryPageFromUrl=ut,r.getQueryParamsFromUrl=it,r.getQueryTabFromUrl=ft,r.getQueryTextFromUrl=ct,r.getRelativeDate=ot,r.getToken=L,r.guid=B,r.handleResponse=S,r.isArrayBuffer=I,r.isAuthenticated=ze,r.isBlob=A,r.isJsonable=ue,r.isObject=m,r.isString=Q,r.labels=Ne,r.login=je,r.logout=Je,r.parseText=C,r.parseValueAndOperatorFromItem=H,r.patchUserSettings=be,r.post=u,r.queryParamsFromUrl=k,r.removeConcept=nt,r.removeConcepts=at,r.resolveToColumnName=ce,r.rewriteText=p,r.saveUserSettings=j,r.setGlobalConfig=_,r.setToken=P,r.sha512=de,r.suggestionsToTreeAggregationNodes=Xe,r.sysLang=dt,r.translateAggregationToDateOptions=We,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
@@ -0,0 +1,39 @@
1
+ import { Credentials } from "../types";
2
+ /**
3
+ * Retrieves a JSON Web Token (JWT) for authentication.
4
+ *
5
+ * @param credentials - The user credentials.
6
+ * @returns A boolean indicating whether the JWT retrieval was successful.
7
+ */
8
+ export declare const getJWToken: (credentails: Credentials) => Promise<boolean>;
9
+ /**
10
+ * Deletes the JSON Web Token (JWT) cookie by sending a GET request to the backend server.
11
+ * @returns {Promise<Response>} - A promise that resolves to the response from the server.
12
+ */
13
+ export declare const deleteWebTokenCookie: () => Promise<{
14
+ methodresult: string;
15
+ }>;
16
+ /**
17
+ * Retrieves the CSRF token from the local storage.
18
+ * @returns The CSRF token.
19
+ */
20
+ export declare const getToken: () => string;
21
+ export declare const setToken: (token: string) => void;
22
+ /**
23
+ * Logs in the user with the provided credentials.
24
+ *
25
+ * @param credentials - The user's login credentials.
26
+ * @returns A promise that resolves to a boolean indicating whether the login was successful.
27
+ */
28
+ export declare const login: (credentails?: Credentials) => Promise<boolean>;
29
+ /**
30
+ * Logs out the user.
31
+ * @returns {Promise<void>}
32
+ */
33
+ export declare const logout: () => Promise<void>;
34
+ /**
35
+ * Checks if the user is authenticated.
36
+ * @returns {boolean} True if the user is authenticated, false otherwise.
37
+ */
38
+ export declare const isAuthenticated: () => boolean;
39
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/auth/auth.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AA+EvC;;;;;GAKG;AACH,eAAO,MAAM,UAAU,gBAAuB,WAAW,qBAkBxD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB;kBAQL,MAAM;EACjC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,QAAQ,cAAgD,CAAC;AACtE,eAAO,MAAM,QAAQ,UAAW,MAAM,SAA6C,CAAC;AAGpF;;;;;GAKG;AACH,eAAO,MAAM,KAAK,iBAAwB,WAAW,KAAG,QAAQ,OAAO,CAkBtE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,MAAM,qBAclB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,QAAO,OAAuB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./auth";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Represents the configuration for the application.
3
+ *
4
+ * app: Sinequa's name of the application.
5
+ * backendUrl: URL of the backend server.
6
+ * oauthProvider: Name of the OAuth provider.
7
+ * SAMLProvider: Name of the SAML provider.
8
+ */
9
+ export type AppGlobalConfig = {
10
+ app?: string;
11
+ backendUrl?: string;
12
+ apiPath?: string;
13
+ autoOAuthProvider?: string;
14
+ autoSAMLProvider?: string;
15
+ loginPath?: string;
16
+ userOverride?: {
17
+ username: string;
18
+ domain: string;
19
+ };
20
+ userOverrideActive?: boolean;
21
+ useCredentials?: boolean;
22
+ useSSO?: boolean;
23
+ useCredentialsOrSSO?: boolean;
24
+ };
25
+ /**
26
+ * Configuration object for global settings.
27
+ */
28
+ declare let globalConfig: Partial<AppGlobalConfig>;
29
+ /**
30
+ * Sets the global configuration for the application.
31
+ * @param config - The partial configuration object to be merged with the existing global configuration.
32
+ */
33
+ export declare function setGlobalConfig(config: Partial<AppGlobalConfig>): void;
34
+ export { globalConfig };
35
+ //# sourceMappingURL=global.config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global.config.d.ts","sourceRoot":"","sources":["../../src/configurations/global.config.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,MAAM,eAAe,GAAG;IAC5B,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF;;GAEG;AACH,QAAA,IAAI,YAAY,EAAE,OAAO,CAAC,eAAe,CAAkF,CAAC;AAE5H;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,QAE/D;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from "./global.config";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/configurations/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { CCApp } from "../types";
2
+ /**
3
+ * Resolves an alias to a column name from a query or indexes schema
4
+ * @param alias alias of the column to resolve
5
+ * @param app CCApp object
6
+ * @param queryName name of the query to resolve the column from
7
+ * @returns column name if found, undefined otherwise
8
+ */
9
+ export declare function resolveToColumnName(alias: string, app: CCApp, queryName?: string): string | undefined;
10
+ //# sourceMappingURL=column-resolver.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"column-resolver.d.ts","sourceRoot":"","sources":["../../src/helpers/column-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAW,MAAM,UAAU,CAAC;AAE1C;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAuBrG"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=column-resolver.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"column-resolver.test.d.ts","sourceRoot":"","sources":["../../src/helpers/column-resolver.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ export * from './column-resolver';
2
+ export * from './metadata';
3
+ export * from './ts-helper';
4
+ export * from './utils';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Article } from "../types";
2
+ import { KeyOf } from "./ts-helper";
3
+ /**
4
+ * Retrieves metadata from an article object.
5
+ *
6
+ * @param article - The article object containing the metadata.
7
+ * @param metadata - The key of the metadata to retrieve.
8
+ * @returns An array of objects with a `display` property representing the metadata.
9
+ */
10
+ export declare function getMetadata(article: Partial<Article & Record<string, unknown>>, metadata: KeyOf<Article & Record<string, unknown>>): {
11
+ display: string;
12
+ }[];
13
+ //# sourceMappingURL=metadata.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadata.d.ts","sourceRoot":"","sources":["../../src/helpers/metadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,CAa1J"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Type alias that extracts the keys of a given type `T`
3
+ *
4
+ * @typeParam T - The type from which to extract the keys.
5
+ * @returns The keys of type `string` from the given type `T`.
6
+ */
7
+ export type KeyOf<T> = Extract<keyof T, string>;
8
+ //# sourceMappingURL=ts-helper.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ts-helper.d.ts","sourceRoot":"","sources":["../../src/helpers/ts-helper.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,MAAM,KAAK,CAAC,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC"}
@@ -0,0 +1,21 @@
1
+ export declare function isObject(value: unknown): boolean;
2
+ export declare function isArrayBuffer(value: unknown): boolean;
3
+ export declare function isBlob(value: unknown): boolean;
4
+ export declare function isString(value: unknown): boolean;
5
+ export declare function isJsonable(obj: unknown): boolean;
6
+ /**
7
+ * Return a pseudo-GUID value using `Math.random`
8
+ *
9
+ * @param withHyphens If set, the returned GUID includes hyphen separators
10
+ */
11
+ export declare function guid(withHyphens?: boolean): string;
12
+ /**
13
+ * Escape a string so that the characters in it are not processed by the fielded search expression parser.
14
+ * Single occurrences of the backslash character are replaced by two backslashes and backquote characters
15
+ * are prefixed by a backslash. Finally, the string is enclosed in backquotes.
16
+ *
17
+ * For example: `` a\`\b `` => `` a\\\`\\b ``
18
+ */
19
+ export declare function escapeExpr(value: string | undefined): string;
20
+ export declare function sha512(value: string): Promise<string>;
21
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/helpers/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEhD;AACD,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAErD;AACD,wBAAgB,MAAM,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE9C;AACD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEhD;AACD,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAKhD;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,WAAW,UAAO,GAAG,MAAM,CAS/C;AAED;;;;;;GAMG;AAIH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAkB5D;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAErD"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=utils.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.test.d.ts","sourceRoot":"","sources":["../../src/helpers/utils.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ export * from "./auth";
2
+ export * from "./configurations";
3
+ export * from "./helpers";
4
+ export * from './utils';
5
+ export * from "./types";
6
+ export * from "./web-api";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,kBAAkB,CAAC;AAEjC,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AAExB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC"}
@@ -0,0 +1,38 @@
1
+ import { AggregationItem } from "./AggregationItem";
2
+ import { TreeAggregationNode } from "./TreeAggregationNode";
3
+ /**
4
+ * Describes the results of an aggregation. This serves as a base interface for list and tree aggregations
5
+ */
6
+ export type Aggregation = {
7
+ /**
8
+ * The name of the aggregation
9
+ */
10
+ name: string;
11
+ /**
12
+ * The name of the index column used to provide aggregation items
13
+ */
14
+ column: string;
15
+ /**
16
+ * Indicates whether the aggregation items are calculated using a distribution (see App Dependencies in the Sinequa admin interface)
17
+ */
18
+ isDistribution?: boolean;
19
+ /**
20
+ * Indicates whether the aggregation items should be handled as tree nodes. This can be set to false for a tree aggregation
21
+ * if the "Load tree as csv" option is checked in the Sinequa configuration
22
+ */
23
+ isTree?: boolean;
24
+ /**
25
+ * Indicates whether the values for the items are fielded search expressions. This is the case for aggregations using a
26
+ * distribution (see `isDistribution`) and crossed distributions
27
+ */
28
+ valuesAreExpressions?: boolean;
29
+ /**
30
+ * The aggregation items for this aggregation
31
+ */
32
+ items: (AggregationItem | TreeAggregationNode)[];
33
+ /**
34
+ * Indicates that more data can be fetched from the server
35
+ */
36
+ $hasMore?: boolean;
37
+ };
38
+ //# sourceMappingURL=Aggregation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Aggregation.d.ts","sourceRoot":"","sources":["../../../src/types/aggregations/Aggregation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;GAEG;AAEH,MAAM,MAAM,WAAW,GAAG;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,KAAK,EAAE,CAAC,eAAe,GAAG,mBAAmB,CAAC,EAAE,CAAC;IACjD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB,CAAA"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Describes an aggregation item. This serves as a base interface for list aggregation items and tree aggregation nodes
3
+ */
4
+ declare const OperatorResultsEnum: readonly ["min", "max", "sum", "avg", "stddev", "variance"];
5
+ export type AggregationItem = {
6
+ /**
7
+ * The value of the item
8
+ */
9
+ value: string | number | boolean | null;
10
+ /**
11
+ * The display value of the item, if any
12
+ */
13
+ display?: string;
14
+ /**
15
+ * The number of documents that contain this item in the current results
16
+ */
17
+ count: number;
18
+ score?: number;
19
+ /**
20
+ * Identifies any operator with their associated results
21
+ */
22
+ operatorResults?: Record<typeof OperatorResultsEnum[number], number | Date>;
23
+ /**
24
+ * A client-side field that indicates whether this item is currently selected
25
+ */
26
+ $selected?: boolean;
27
+ $cached?: boolean;
28
+ };
29
+ export {};
30
+ //# sourceMappingURL=AggregationItem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AggregationItem.d.ts","sourceRoot":"","sources":["../../../src/types/aggregations/AggregationItem.ts"],"names":[],"mappings":"AACA;;GAEG;AAEH,QAAA,MAAM,mBAAmB,6DAAmE,CAAA;AAE5F,MAAM,MAAM,eAAe,GAAG;IAC1B;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,CAAC;IACxC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,OAAO,mBAAmB,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;IAC5E;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAA"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * These options can be used to provide pagination of aggregation values
3
+ */
4
+ export type AggregationOptions = {
5
+ /**
6
+ * Specifies the starting index of the values to retrieve
7
+ */
8
+ skip?: number;
9
+ /**
10
+ * Specifies the number of aggregation values to retrieve
11
+ */
12
+ count?: number;
13
+ };
14
+ //# sourceMappingURL=AggregationOptions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AggregationOptions.d.ts","sourceRoot":"","sources":["../../../src/types/aggregations/AggregationOptions.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAA"}
@@ -0,0 +1,6 @@
1
+ import { Aggregation } from "./Aggregation";
2
+ /**
3
+ * Describes the fields specific to a list aggregation
4
+ */
5
+ export type ListAggregation = Aggregation;
6
+ //# sourceMappingURL=ListAggregation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ListAggregation.d.ts","sourceRoot":"","sources":["../../../src/types/aggregations/ListAggregation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { TreeAggregationNode } from "./TreeAggregationNode";
2
+ import { Aggregation } from "./Aggregation";
3
+ /**
4
+ * Describes the fields specific to a tree aggregation
5
+ */
6
+ type TreeAggregation = Aggregation & {
7
+ hasChildren?: boolean;
8
+ items?: TreeAggregationNode[];
9
+ $filtered: TreeAggregationNode[];
10
+ isTree: true;
11
+ };
12
+ export type { TreeAggregation };
13
+ //# sourceMappingURL=TreeAggregation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeAggregation.d.ts","sourceRoot":"","sources":["../../../src/types/aggregations/TreeAggregation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,KAAK,eAAe,GAAG,WAAW,GAAG;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,mBAAmB,EAAE,CAAC;IAC9B,SAAS,EAAE,mBAAmB,EAAE,CAAC;IACjC,MAAM,EAAE,IAAI,CAAC;CAChB,CAAC;AAEF,YAAY,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { AggregationItem } from "./AggregationItem";
2
+ type TreeAggregationNode = Omit<AggregationItem, "items"> & {
3
+ /**
4
+ * Determines whether this node has any children even if the `items` field is not currently populated
5
+ */
6
+ hasChildren?: boolean;
7
+ /**
8
+ * Trees are limited to string values
9
+ */
10
+ value: string;
11
+ /**
12
+ * A client-side field that contains the full path of the node
13
+ */
14
+ $path?: string;
15
+ /**
16
+ * A client-side field that indicates whether a parent node is currently open
17
+ */
18
+ $opened?: boolean;
19
+ $opening?: boolean;
20
+ /**
21
+ * The level at which this node is in the Tree aggregation
22
+ */
23
+ $level?: number;
24
+ items: TreeAggregationNode[];
25
+ };
26
+ export type { TreeAggregationNode };
27
+ //# sourceMappingURL=TreeAggregationNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TreeAggregationNode.d.ts","sourceRoot":"","sources":["../../../src/types/aggregations/TreeAggregationNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,KAAK,mBAAmB,GAAG,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,GAAG;IACxD;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,mBAAmB,EAAE,CAAC;CAChC,CAAA;AAED,YAAY,EAAE,mBAAmB,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from './Aggregation';
2
+ export * from './AggregationItem';
3
+ export * from './AggregationOptions';
4
+ export * from './ListAggregation';
5
+ export * from './TreeAggregation';
6
+ export * from './TreeAggregationNode';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/aggregations/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC"}
@@ -0,0 +1,4 @@
1
+ type StringWithAutocomplete<T> = T | (string & Record<never, never>);
2
+ export type API_ENDPOINTS = StringWithAutocomplete<"app" | "audit.notify" | "challenge" | "doc.textchunks" | "labels" | "multi" | "OriginalDocMerge" | "plugin" | "preview" | "principal" | "principal/list" | "principal/userId" | "principal/userids" | "query" | "query.export" | "query.links" | "queryintent" | "ratings" | "recentqueries" | "search.dataset" | "search.rfm" | "search.suggest" | "similardocuments" | "suggestfield" | "suggestquery" | "usersettings" | "webToken" | "security.oauth" | "security.saml">;
3
+ export {};
4
+ //# sourceMappingURL=api-endpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-endpoints.d.ts","sourceRoot":"","sources":["../../src/types/api-endpoints.ts"],"names":[],"mappings":"AAAA,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AACrE,MAAM,MAAM,aAAa,GAAG,sBAAsB,CAChD,KAAK,GACL,cAAc,GACd,WAAW,GACX,gBAAgB,GAChB,QAAQ,GACR,OAAO,GACP,kBAAkB,GAClB,QAAQ,GACR,SAAS,GACT,WAAW,GACX,gBAAgB,GAChB,kBAAkB,GAClB,mBAAmB,GACnB,OAAO,GACP,cAAc,GACd,aAAa,GACb,aAAa,GACb,SAAS,GACT,eAAe,GACf,gBAAgB,GAChB,YAAY,GACZ,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,cAAc,GACd,cAAc,GACd,UAAU,GACV,gBAAgB,GAChB,eAAe,CAChB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { AuditEventType, AuditEventTypeValues } from "./AuditEventType";
2
+ import { AuditRecord } from "./AuditRecord";
3
+ /**
4
+ * Describes a single audit event
5
+ */
6
+ export type AuditEvent = {
7
+ type: AuditEventType | AuditEventTypeValues | {} & Record<never, never>;
8
+ detail?: Record<string, any>;
9
+ rfmDetail?: {};
10
+ };
11
+ /**
12
+ * A composite type describing a set of AuditEvents
13
+ */
14
+ export type AuditEvents = AuditEvent | AuditEvent[] | AuditRecord;
15
+ //# sourceMappingURL=AuditEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuditEvent.d.ts","sourceRoot":"","sources":["../../../src/types/audit/AuditEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACrB,IAAI,EAAE,cAAc,GAAG,oBAAoB,GAAG,EAAE,GAAG,MAAM,CAAC,KAAK,EAAC,KAAK,CAAC,CAAC;IACvE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,SAAS,CAAC,EAAE,EAAE,CAAA;CACjB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,UAAU,EAAE,GAAG,WAAW,CAAC"}
@@ -0,0 +1,114 @@
1
+ /**
2
+ * The standard audit event types
3
+ */
4
+ export declare const enum AuditEventType {
5
+ None = "None",
6
+ Search_FirstPage = "Search_FirstPage",
7
+ Search_Text = "Search_Text",
8
+ Search_Refine = "Search_Refine",
9
+ Search_Select_Item = "Search_Select_Item",
10
+ Search_Select_Custom = "Search_Select_Custom",
11
+ Search_Select_Concept = "Search_Select_Concept",
12
+ Search_Select_Correction = "Search_Select_Correction",
13
+ Search_GotoPage = "Search_GotoPage",
14
+ Search_GotoTab = "Search_GotoTab",
15
+ Search_DisplayResult = "Search_DisplayResult",
16
+ Search_RemoveResult = "Search_RemoveResult",
17
+ Search_RemoveAdvanced = "Search_RemoveAdvanced",
18
+ Search_SavedQuery = "Search_SavedQuery",
19
+ Search_WebService = "Search_WebService",
20
+ Search_DidYouMean_Original = "Search_DidYouMean_Original",
21
+ Search_DidYouMean_Correction = "Search_DidYouMean_Correction",
22
+ Search_ExportCSV = "Search_ExportCSV",
23
+ Search_SavedQuery_ExportCSV = "Search_SavedQuery_ExportCSV",
24
+ Search_Selection_ExportCSV = "Search_Selection_ExportCSV",
25
+ Search_AlertQuery = "Search_AlertQuery",
26
+ Search_Select_AnalyticsItem = "Search_Select_AnalyticsItem",
27
+ Search_Sort = "Search_Sort",
28
+ Search_Exit_Logout = "Search_Exit_Logout",
29
+ Search_Timeline_Usage = "Search_Timeline_Usage",
30
+ Search_AutoComplete = "Search_Autocomplete",
31
+ Search_Login_Success = "Login_Success_Form",
32
+ Search_QueryIntent_Detected = "Search_QueryIntent_Detected",
33
+ SavedQuery_Add = "SavedQuery_Add",
34
+ SavedQuery_Delete = "SavedQuery_Delete",
35
+ SavedQuery_DeleteAll = "SavedQuery_DeleteAll",
36
+ SavedQuery_Rename = "SavedQuery_Rename",
37
+ Alert_Edit = "Alert_Edit",
38
+ Alert_Delete = "Alert_Delete",
39
+ Alert_DeleteAll = "Alert_DeleteAll",
40
+ Link_Display = "Link_Display",
41
+ Link_Click = "Link_Click",
42
+ Basket_Add = "Basket_Add",
43
+ Basket_Delete = "Basket_Delete",
44
+ Basket_DeleteAll = "Basket_DeleteAll",
45
+ Basket_Rename = "Basket_Rename",
46
+ Basket_AddDoc = "Basket_AddDoc",
47
+ Basket_RemoveDoc = "Basket_RemoveDoc",
48
+ Basket_Open = "Basket_Open",
49
+ Basket_ExportCSV = "Basket_ExportCSV",
50
+ Label_Add = "Label_Add",
51
+ Label_Delete = "Label_Delete",
52
+ Label_Rename = "Label_Rename",
53
+ Label_Open = "Label_Open",
54
+ Label_AddDoc = "Label_AddDoc",
55
+ Label_RemoveDoc = "Label_RemoveDoc",
56
+ Label_ExportCSV = "Label_ExportCSV",
57
+ Label_Menu_ExportCSV = "Label_Menu_ExportCSV",
58
+ Rating_Set = "Rating_Set",
59
+ Rating_Delete = "Rating_Delete",
60
+ Doc_Preview = "Doc_Preview",
61
+ Doc_CacheHtml = "Doc_CacheHtml",
62
+ Doc_CachePdf = "Doc_CachePdf",
63
+ Doc_CacheOriginal = "Doc_CacheOriginal",
64
+ Doc_Url1 = "Doc_Url1",
65
+ Doc_Url2 = "Doc_Url2",
66
+ Preview_Close = "Preview_Close",
67
+ Click_ResultLink = "Click_ResultLink",
68
+ Click_ResultLink1 = "Click_ResultLink1",
69
+ Click_ResultLink2 = "Click_ResultLink2",
70
+ Click_ResultLink3 = "Click_ResultLink3",
71
+ Click_ResultLink4 = "Click_ResultLink4",
72
+ Click_ResultLink5 = "Click_ResultLink5",
73
+ Click_ResultLink6 = "Click_ResultLink6",
74
+ Click_ResultLink7 = "Click_ResultLink7",
75
+ Click_ResultLink8 = "Click_ResultLink8",
76
+ Click_ResultLink9 = "Click_ResultLink9",
77
+ Click_ResultLink10 = "Click_ResultLink10",
78
+ Click_PreviewLink1 = "Click_PreviewLink1",
79
+ Click_PreviewLink2 = "Click_PreviewLink2",
80
+ Click_PreviewLink3 = "Click_PreviewLink3",
81
+ Click_PreviewLink4 = "Click_PreviewLink4",
82
+ Click_PreviewLink5 = "Click_PreviewLink5",
83
+ Click_PreviewLink6 = "Click_PreviewLink6",
84
+ Click_PreviewLink7 = "Click_PreviewLink7",
85
+ Click_PreviewLink8 = "Click_PreviewLink8",
86
+ Click_PreviewLink9 = "Click_PreviewLink9",
87
+ Click_PreviewLink10 = "Click_PreviewLink10",
88
+ RFM_ClickSet = "RFM_ClickSet",
89
+ RFM_ClickReset = "RFM_ClickReset",
90
+ RFM_Like = "RFM_Like",
91
+ RFM_LikeReset = "RFM_LikeReset",
92
+ RFM_Dislike = "RFM_Dislike",
93
+ RFM_Important = "RFM_Important",
94
+ RFM_ImportantReset = "RFM_ImportantReset",
95
+ RFM_Ban = "RFM_Ban",
96
+ Navigation_Exit = "Navigation_Exit",
97
+ Navigation_Return = "Navigation_Return",
98
+ Navigation_Route = "Navigation_Route",
99
+ Answer_Display = "Answer_Display",
100
+ Answer_Click = "Answer_Click",
101
+ Answer_Result = "Answer_Result",
102
+ Answer_Liked = "Answer_Liked",
103
+ Answer_Disliked = "Answer_Disliked",
104
+ Answer_Liked_Cancelled = "Answer_Liked_Cancelled",
105
+ Answer_Disliked_Cancelled = "Answer_Disliked_Cancelled",
106
+ TopPassages_Display = "TopPassages_Display",
107
+ TopPassages_Click = "TopPassages_Click",
108
+ UserSettings_Reset = "UserSettings_Reset"
109
+ }
110
+ /**
111
+ * Helper type to get the values of the AuditEventType enum
112
+ */
113
+ export type AuditEventTypeValues = `${AuditEventType}`;
114
+ //# sourceMappingURL=AuditEventType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuditEventType.d.ts","sourceRoot":"","sources":["../../../src/types/audit/AuditEventType.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,0BAAkB,cAAc;IAE9B,IAAI,SAAS;IAGb,gBAAgB,qBAAqB;IACrC,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,kBAAkB,uBAAuB;IACzC,oBAAoB,yBAAyB;IAC7C,qBAAqB,0BAA0B;IAC/C,wBAAwB,6BAA6B;IACrD,eAAe,oBAAoB;IACnC,cAAc,mBAAmB;IACjC,oBAAoB,yBAAyB;IAC7C,mBAAmB,wBAAwB;IAC3C,qBAAqB,0BAA0B;IAC/C,iBAAiB,sBAAsB;IACvC,iBAAiB,sBAAsB;IACvC,0BAA0B,+BAA+B;IACzD,4BAA4B,iCAAiC;IAC7D,gBAAgB,qBAAqB;IACrC,2BAA2B,gCAAgC;IAC3D,0BAA0B,+BAA+B;IACzD,iBAAiB,sBAAsB;IACvC,2BAA2B,gCAAgC;IAC3D,WAAW,gBAAgB;IAC3B,kBAAkB,uBAAuB;IACzC,qBAAqB,0BAA0B;IAC/C,mBAAmB,wBAAwB;IAC3C,oBAAoB,uBAAuB;IAC3C,2BAA2B,gCAAgC;IAE3D,cAAc,mBAAmB;IACjC,iBAAiB,sBAAsB;IACvC,oBAAoB,yBAAyB;IAC7C,iBAAiB,sBAAsB;IAEvC,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;IAEnC,YAAY,iBAAiB;IAC7B,UAAU,eAAe;IAEzB,UAAU,eAAe;IACzB,aAAa,kBAAkB;IAC/B,gBAAgB,qBAAqB;IACrC,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;IAC/B,gBAAgB,qBAAqB;IACrC,WAAW,gBAAgB;IAC3B,gBAAgB,qBAAqB;IAErC,SAAS,cAAc;IACvB,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;IAC7B,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;IACnC,eAAe,oBAAoB;IACnC,oBAAoB,yBAAyB;IAE7C,UAAU,eAAe;IACzB,aAAa,kBAAkB;IAE/B,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;IAC7B,iBAAiB,sBAAsB;IACvC,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,aAAa,kBAAkB;IAE/B,gBAAgB,qBAAqB;IACrC,iBAAiB,sBAAsB;IACvC,iBAAiB,sBAAsB;IACvC,iBAAiB,sBAAsB;IACvC,iBAAiB,sBAAsB;IACvC,iBAAiB,sBAAsB;IACvC,iBAAiB,sBAAsB;IACvC,iBAAiB,sBAAsB;IACvC,iBAAiB,sBAAsB;IACvC,iBAAiB,sBAAsB;IACvC,kBAAkB,uBAAuB;IACzC,kBAAkB,uBAAuB;IACzC,kBAAkB,uBAAuB;IACzC,kBAAkB,uBAAuB;IACzC,kBAAkB,uBAAuB;IACzC,kBAAkB,uBAAuB;IACzC,kBAAkB,uBAAuB;IACzC,kBAAkB,uBAAuB;IACzC,kBAAkB,uBAAuB;IACzC,kBAAkB,uBAAuB;IACzC,mBAAmB,wBAAwB;IAE3C,YAAY,iBAAiB;IAC7B,cAAc,mBAAmB;IACjC,QAAQ,aAAa;IACrB,aAAa,kBAAkB;IAC/B,WAAW,gBAAgB;IAC3B,aAAa,kBAAkB;IAC/B,kBAAkB,uBAAuB;IACzC,OAAO,YAAY;IAEnB,eAAe,oBAAoB;IACnC,iBAAiB,sBAAsB;IACvC,gBAAgB,qBAAqB;IAErC,cAAc,mBAAmB;IACjC,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,YAAY,iBAAiB;IAC7B,eAAe,oBAAoB;IACnC,sBAAsB,2BAA2B;IACjD,yBAAyB,8BAA8B;IAEvD,mBAAmB,wBAAwB;IAC3C,iBAAiB,sBAAsB;IAEvC,kBAAkB,uBAAuB;CAC1C;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,GAAG,cAAc,EAAE,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { AuditEvent } from "./AuditEvent";
2
+ /**
3
+ * Contains an array of {@link AuditEvent} objects and an array of ML audit event records
4
+ */
5
+ export type AuditRecord = {
6
+ auditEvents?: AuditEvent[];
7
+ mlAuditEvents?: any[];
8
+ };
9
+ //# sourceMappingURL=AuditRecord.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuditRecord.d.ts","sourceRoot":"","sources":["../../../src/types/audit/AuditRecord.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C;;GAEG;AAEH,MAAM,MAAM,WAAW,GAAG;IACtB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;IAC3B,aAAa,CAAC,EAAE,GAAG,EAAE,CAAA;CACxB,CAAA"}
@@ -0,0 +1,5 @@
1
+ export type { AuditEvent, AuditEvents } from "./AuditEvent";
2
+ export type { AuditEventTypeValues } from "./AuditEventType";
3
+ export { AuditEventType } from "./AuditEventType";
4
+ export type { AuditRecord } from "./AuditRecord";
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/audit/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC5D,YAAY,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}