@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,72 @@
1
+ export type FullTextPattern = {
2
+ type: 'group' | 'adjacent' | 'exact' | 'regex' | 'token';
3
+ value: string;
4
+ op?: '+' | '-';
5
+ };
6
+ /**
7
+ * Parses the given text and returns an array of FullTextPattern objects.
8
+ * @param text - The text to parse.
9
+ * @returns An array of FullTextPattern objects.
10
+ */
11
+ export declare function parseText(text: string): FullTextPattern[];
12
+ /**
13
+ * Rewrites the text based on the provided patterns.
14
+ * @param patterns An array of FullTextPattern objects representing the patterns to be applied.
15
+ * @returns The rewritten text.
16
+ */
17
+ export declare function rewriteText(patterns: FullTextPattern[]): string;
18
+ /**
19
+ * Adds concepts to the given text by modifying the patterns.
20
+ * @param text - The input text to which the concepts will be added.
21
+ * @param concepts - An array of concepts to be added to the text.
22
+ * @param op - An optional parameter specifying the operation to be performed on the concepts.
23
+ * If '+' is provided, the concepts will be added adjacent to the text.
24
+ * If '-' is provided, the concepts will be removed from the text.
25
+ * @returns The modified text after adding or removing the concepts.
26
+ *
27
+ * @example
28
+ * // Example 1:
29
+ * const text = "This is a +[test] +[sentence].";
30
+ * const result = addConcepts(text, ["example"]);
31
+ * // Output: "This is a +[test] +[sentence] +[example]."
32
+ */
33
+ export declare function addConcepts(text: string, concepts: string[], op?: '+' | '-'): string;
34
+ /**
35
+ * Removes a concept from the given text.
36
+ *
37
+ * @param concept - The concept to be removed.
38
+ * @param text - The text from which the concept should be removed.
39
+ * @returns The updated text with the concept removed, or the original text if the concept was not found.
40
+ *
41
+ * @example
42
+ * // Example 1:
43
+ * const text = "This is a +test +sentence.";
44
+ * const result = removeConcept("test", text);
45
+ * // Output: "This is a +sentence."
46
+ */
47
+ export declare function removeConcept(concept: string, text: string): string;
48
+ /**
49
+ * Removes concepts from the given text.
50
+ * @param text - The input text.
51
+ * @returns The text with concepts removed.
52
+ *
53
+ * @example
54
+ * // Example 1:
55
+ * const text = "This is a +[test] +[sentence].";
56
+ * const result = removeConcepts(text);
57
+ * // Output: "This is a ."
58
+ */
59
+ export declare function removeConcepts(text: string): string;
60
+ /**
61
+ * Retrieves the concepts from the given text.
62
+ * @param text - The text to parse and extract concepts from.
63
+ * @returns An array of concepts extracted from the text.
64
+ *
65
+ * @example
66
+ * // Example 1:
67
+ * const text = "This is a +[test] +[sentence].";
68
+ * const concepts = getConcepts(text);
69
+ * // Output: ["test", "sentence"]
70
+ */
71
+ export declare function getConcepts(text: string): string[];
72
+ //# sourceMappingURL=concepts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concepts.d.ts","sourceRoot":"","sources":["../../src/utils/concepts.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,OAAO,GAAG,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,GAAG,GAAG,GAAG,CAAA;CACf,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAC,MAAM,GAAG,eAAe,EAAE,CAYxD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,eAAe,EAAE,GAAG,MAAM,CAW/D;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAC,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,EAAE,GAAG,GAAC,GAAG,GAAG,MAAM,CAMjF;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAC,MAAM,GAAG,MAAM,CAQlE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAC,MAAM,GAAG,MAAM,CAIlD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAC,MAAM,GAAG,MAAM,EAAE,CAIjD"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Relative date object to represent the difference between two dates
3
+ * @typedef {Object} RelativeDate
4
+ * @property {number} offset - The difference between two dates
5
+ * @property {Intl.RelativeTimeFormatUnit} unit - The unit of the difference
6
+ * @property {boolean} isFuture - If the target date is in the future
7
+ */
8
+ export type RelativeDate = {
9
+ offset: number;
10
+ unit: Intl.RelativeTimeFormatUnit;
11
+ isFuture: boolean;
12
+ };
13
+ /**
14
+ * Get the relative date between two dates, in most cases the base date is the current date
15
+ * @param locale Locale to use for the relative date
16
+ * @param target Target date to compare
17
+ * @param base Base date to compare
18
+ * @returns Relative date string as a human readable format using {@link Intl.RelativeTimeFormat}
19
+ */
20
+ export declare function getRelativeDate(locale: string, target: string, base?: string): string;
21
+ /**
22
+ * Get the relative date between two dates, in most cases the base date is the current date
23
+ * and the target date is the the future date to compare, if the base date is not provided
24
+ * the current date will be used.
25
+ * RelativeDate.offset is return in day unit.
26
+ * @param target Target date to compare
27
+ * @param base Base date to compare
28
+ * @returns RelativeDate object with offset, unit and isFuture
29
+ */
30
+ export declare function getOffsetFromDates(target: string, base?: string): RelativeDate;
31
+ //# sourceMappingURL=date.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.d.ts","sourceRoot":"","sources":["../../src/utils/date.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,IAAI,CAAC,sBAAsB,CAAC;IAClC,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAKrF;AAGD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,YAAY,CAY9E"}
@@ -0,0 +1,7 @@
1
+ export * from './aggregations';
2
+ export * from './array/bisect';
3
+ export * from './concepts';
4
+ export * from './date';
5
+ export * from './query-params';
6
+ export * from './syslang';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC"}
@@ -0,0 +1,72 @@
1
+ import { LegacyFilter, Query } from "../types";
2
+ /**
3
+ * `path`: hash of the search without the bang in form of `/search/all`
4
+ * `filters`: filters associated to the query
5
+ * `id`: document id if there's one opened,
6
+ * `queryName`: name of the query
7
+ */
8
+ export type QueryParams = Query & {
9
+ path?: string;
10
+ filters?: LegacyFilter[];
11
+ id?: string;
12
+ queryName?: string;
13
+ };
14
+ /**
15
+ * Get {@link QueryParams} from url string
16
+ *
17
+ * @param url string to parse
18
+ * @returns {@link QueryParams} or undefined
19
+ */
20
+ export declare function getQueryParamsFromUrl(url: string | undefined): QueryParams | undefined;
21
+ /**
22
+ * Get {@link Filter} array from query params string
23
+ *
24
+ * @param queryParams string to parse
25
+ * @returns {@link Filter} array
26
+ */
27
+ export declare function getFiltersFromUrl(url: string | undefined): LegacyFilter[];
28
+ /**
29
+ * Get {@link Filter} array from uri string
30
+ *
31
+ * @param uri string to parse
32
+ * @returns {@link Filter} array
33
+ */
34
+ export declare function getFiltersFromURI(uri: string): LegacyFilter[];
35
+ /**
36
+ * Returns the object query parameters from the given URL
37
+ *
38
+ * @param url
39
+ * @returns
40
+ *
41
+ * @example
42
+ * ```typescript
43
+ * const url = 'https://example.com/search?q=hello&f=type:document';
44
+ * const rawQueryParams = queryParamsFromUrl(url);
45
+ *
46
+ * console.log(rawQueryParams);
47
+ *
48
+ * ^// Output: {q:'hello', f:'type:document', ...}
49
+ * ```
50
+ */
51
+ export declare function queryParamsFromUrl(url: string): Record<string, string>;
52
+ /**
53
+ * Retrieves the query text from a URL.
54
+ * @param url - The URL containing the query text.
55
+ * @returns The decoded query text.
56
+ */
57
+ export declare function getQueryTextFromUrl(url: string): string;
58
+ /**
59
+ * Retrieves the ID from the given URL.
60
+ * @param url - The URL from which to extract the ID.
61
+ * @returns The decoded ID.
62
+ */
63
+ export declare function getIdFromUrl(url: string): string;
64
+ /**
65
+ * Retrieves the page number from the given URL query string.
66
+ *
67
+ * @param url - The URL containing the query string.
68
+ * @returns The page number parsed from the query string.
69
+ */
70
+ export declare function getQueryPageFromUrl(url: string): number;
71
+ export declare function getQueryTabFromUrl(url: string): string;
72
+ //# sourceMappingURL=query-params.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-params.d.ts","sourceRoot":"","sources":["../../src/utils/query-params.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAE/C;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG;IAChC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,YAAY,EAAE,CAAC;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAetF;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,YAAY,EAAE,CAKzE;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,EAAE,CAK7D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOtE;AAGD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGvD;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAIhD;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAIvD;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAItD"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Translates a system language formatted text to the specified locale.
3
+ * If a matching language is found, returns the translated text.
4
+ * If no matching language is found, returns the default language text.
5
+ * If the input text is empty, returns an empty string.
6
+ *
7
+ * @param text - The system language formatted text to translate.
8
+ * @param currentLocale - The locale to translate the text to.
9
+ * @returns The translated text or the default language text.
10
+ *
11
+ * @example
12
+ * // Example 1:
13
+ * const translatedText = sysLang("all[fr]tous[de]alle", "en-US");
14
+ * // Output: "all"
15
+ *
16
+ * @example
17
+ * // Example 2:
18
+ * const translatedText = sysLang("all[fr]tous[de]alle", "fr-FR");
19
+ * // Output: "tous"
20
+ *
21
+ * @example
22
+ * // Example 2:
23
+ * const translatedText = sysLang("all[fr]tous[de]alle", "fr");
24
+ * // Output: "tous"
25
+ */
26
+ export declare function sysLang(text: string, currentLocale: string): string;
27
+ //# sourceMappingURL=syslang.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syslang.d.ts","sourceRoot":"","sources":["../../src/utils/syslang.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAsCnE"}
@@ -0,0 +1,11 @@
1
+ import { Aggregation, AuditEvents, Query } from "../types";
2
+ /**
3
+ * Fetches an aggregation from the server.
4
+ *
5
+ * @param aggregation - The aggregation to fetch.
6
+ * @param query - The query parameters.
7
+ * @param audit - Optional audit events.
8
+ * @returns A promise that resolves to the fetched aggregation.
9
+ */
10
+ export declare function fetchAggregation(aggregation: Aggregation, query: Query, audit?: AuditEvents): Promise<Aggregation>;
11
+ //# sourceMappingURL=fetch-aggregation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-aggregation.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-aggregation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,KAAK,EAAU,MAAM,UAAU,CAAC;AAGnE;;;;;;;GAOG;AACH,wBAAsB,gBAAgB,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAkBxH"}
@@ -0,0 +1,17 @@
1
+ import { CCApp, CCAppPreLogin } from "../types";
2
+ /**
3
+ * Fetches the CCApp object.
4
+ * @returns A promise that resolves to the CCApp object.
5
+ */
6
+ export declare function fetchApp(): Promise<CCApp>;
7
+ /**
8
+ * Fetches the pre-login information for the app.
9
+ * @returns A promise that resolves to the pre-login information of the app.
10
+ */
11
+ export declare function fetchAppPreLogin(): Promise<CCAppPreLogin>;
12
+ /**
13
+ * Initializes the application by setting the global configuration and fetching app pre-login data.
14
+ * @returns A promise that resolves when the initialization is complete.
15
+ */
16
+ export declare function appInitializerFn(): Promise<any>;
17
+ //# sourceMappingURL=fetch-app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-app.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-app.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIhD;;;GAGG;AACH,wBAAsB,QAAQ,IAAI,OAAO,CAAC,KAAK,CAAC,CAK/C;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC,CAQ/D;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,IAAI,OAAO,CAAC,GAAG,CAAC,CA8C/C"}
@@ -0,0 +1,33 @@
1
+ import { AuditEvents, AuditRecord } from "../types";
2
+ /**
3
+ * Adds additional audit information to the provided body object.
4
+ *
5
+ * @param body - The body object to add audit information to.
6
+ */
7
+ export declare function addAuditAdditionalInfo(body: unknown): void;
8
+ /**
9
+ * Adds a session ID to the audit record.
10
+ *
11
+ * @param auditRecord - The audit record to modify.
12
+ * @returns The modified audit record with the session ID added.
13
+ */
14
+ export declare function addSessionId(auditRecord: AuditRecord): AuditRecord;
15
+ /**
16
+ * Adds the current URL to the audit record.
17
+ *
18
+ * @param auditRecord - The audit record to update.
19
+ * @returns The updated audit record.
20
+ */
21
+ export declare function addUrl(auditRecord: AuditRecord): AuditRecord;
22
+ /**
23
+ * Notifies the server about audit events.
24
+ *
25
+ * @param auditEvents - The audit events to be sent to the server.
26
+ * @returns A promise that resolves to the updated audit events.
27
+ */
28
+ declare function notify(auditEvents: AuditEvents): Promise<AuditEvents>;
29
+ export declare const Audit: {
30
+ notify: typeof notify;
31
+ };
32
+ export {};
33
+ //# sourceMappingURL=fetch-audit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-audit.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-audit.ts"],"names":[],"mappings":"AACA,OAAO,EAAc,WAAW,EAAkB,WAAW,EAAE,MAAM,UAAU,CAAC;AAOhF;;;;EAIE;AACF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,OAAO,QAOlD;AA6BD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,WAAW,eASpD;AAGD;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,WAAW,EAAE,WAAW,eAS9C;AAwBF;;;;;GAKG;AACH,iBAAe,MAAM,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CASpE;AAED,eAAO,MAAM,KAAK;;CAAa,CAAA"}
@@ -0,0 +1,43 @@
1
+ import { Result } from "../types";
2
+ export type DatasetError = {
3
+ errorCode: number;
4
+ errorMessage: string;
5
+ };
6
+ export type DatasetDescription = {
7
+ name: string;
8
+ description?: string;
9
+ };
10
+ export type DataSet<T extends Result = Result> = Record<string, T | DatasetError>;
11
+ /**
12
+ * Fetches a dataset from the specified web service and query name.
13
+ *
14
+ * @template T - The type of the dataset, defaults to `Article`.
15
+ * @param {string} webserviceName - The name of the web service to fetch the dataset from.
16
+ * @param {string} queryName - The name of the query to execute.
17
+ * @param {object} [parameters={}] - Optional parameters to pass to the query.
18
+ * @returns {Promise<T>} A promise that resolves to the fetched dataset.
19
+ * @throws {Error} If the dataset contains an error code and message.
20
+ */
21
+ export declare function fetchDataset<T extends Result = Result>(webserviceName: string, queryName: string, parameters?: {}): Promise<T>;
22
+ /**
23
+ * Fetches datasets from a specified web service.
24
+ *
25
+ * @template T - The type of the articles in the dataset, defaults to `Article`.
26
+ * @param {string} webserviceName - The name of the web service to fetch datasets from.
27
+ * @param {Object} options - The options for the request.
28
+ * @param {Object} [options.body] - The body of the request, defaults to an empty object.
29
+ * @param {string[]} [options.datasets] - An array of dataset names to fetch, defaults to an empty array.
30
+ * @returns {Promise<DataSet<T>>} - A promise that resolves to the fetched datasets.
31
+ */
32
+ export declare function fetchDatasets<T extends Result = Result>(webserviceName: string, options: {
33
+ parameters?: {};
34
+ datasets?: string[];
35
+ }): Promise<DataSet<T>>;
36
+ /**
37
+ * Fetches a list of dataset descriptions from the specified web service.
38
+ *
39
+ * @param webserviceName - The name of the web service to fetch the dataset list from.
40
+ * @returns A promise that resolves to an array of `DatasetDescription` objects.
41
+ */
42
+ export declare function fetchDatasetList(webserviceName: string): Promise<DatasetDescription[]>;
43
+ //# sourceMappingURL=fetch-dataset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-dataset.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-dataset.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGlC,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAA;CACrB,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAA;AAED,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC,GAAC,YAAY,CAAC,CAAC;AAEhF;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,UAAU,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CASpI;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE;IAAE,UAAU,CAAC,EAAE,EAAE,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;CAAC,GAAI,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAO7J;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAG5F"}
@@ -0,0 +1,95 @@
1
+ import { LabelsRights, Query } from "../types";
2
+ /**
3
+ * Fetches labels based on the provided prefix and other optional parameters.
4
+ *
5
+ * @param {string} prefix - The prefix to filter the labels.
6
+ * @param {boolean} [publicOnly=true] - Whether to fetch only public labels. Defaults to true.
7
+ * @param {string} [locale] - Optional locale to filter the labels.
8
+ * @returns {Promise<Labels>} A promise that resolves to the fetched labels.
9
+ */
10
+ export declare function fetchLabels(prefix: string, publicOnly?: boolean, locale?: string): Promise<string[]>;
11
+ /**
12
+ * Fetches the user labels's rights.
13
+ *
14
+ * This function constructs a URLSearchParams object with the current application
15
+ * name and the action "getUserRights". It then calls the `get` function with
16
+ * the endpoint "labels" and the constructed parameters to retrieve the user labels's rights.
17
+ *
18
+ * @returns {Promise<LabelsRights>} A promise that resolves to the user rights for the current application.
19
+ */
20
+ declare function getUserRights(): Promise<LabelsRights>;
21
+ /**
22
+ * Adds labels to the specified document IDs.
23
+ *
24
+ * @param labels - An array of labels to be added.
25
+ * @param ids - An array of document IDs to which the labels will be added.
26
+ * @param publicOnly - A boolean indicating whether the labels should be public. Defaults to true.
27
+ * @returns A promise that resolves when the labels have been added.
28
+ */
29
+ declare function add(labels: string[], ids: string[], publicOnly?: boolean): Promise<void>;
30
+ /**
31
+ * Removes labels from documents.
32
+ *
33
+ * @param {string[]} labels - The labels to be removed.
34
+ * @param {string[]} ids - The IDs of the documents from which the labels will be removed.
35
+ * @param {boolean} [publicOnly=true] - Indicates whether the operation should be public only.
36
+ * @returns {Promise<void>} A promise that resolves when the operation is complete.
37
+ */
38
+ declare function remove(labels: string[], ids: string[], publicOnly?: boolean): Promise<void>;
39
+ /**
40
+ * Renames a set of labels to a new label.
41
+ *
42
+ * @param {string[]} labels - The list of labels to be renamed.
43
+ * @param {string} newLabel - The new label name to be assigned.
44
+ * @param {boolean} [publicOnly=true] - Indicates if the operation should be applied to public labels only.
45
+ * @returns {Promise<void>} A promise that resolves when the operation is complete.
46
+ */
47
+ declare function rename(labels: string[], newLabel: string, publicOnly?: boolean): Promise<void>;
48
+ /**
49
+ * Deletes the specified labels.
50
+ *
51
+ * @param {string[]} labels - The labels to be deleted.
52
+ * @param {boolean} [publicOnly=true] - Indicates whether to delete only public labels. Defaults to true.
53
+ * @returns {Promise<void>} A promise that resolves when the labels have been deleted.
54
+ */
55
+ declare function deleteLabels(labels: string[], publicOnly?: boolean): Promise<void>;
56
+ /**
57
+ * Adds multiple labels in bulk to the specified query.
58
+ *
59
+ * @param labels - An array of labels to be added.
60
+ * @param query - The query object to which the labels will be added.
61
+ * @param publicOnly - A boolean indicating whether the labels should be public. Defaults to true.
62
+ * @returns A promise that resolves when the labels have been added.
63
+ */
64
+ declare function bulkAdd(labels: string[], query: Query, publicOnly?: boolean): Promise<void>;
65
+ /**
66
+ * Removes multiple labels based on the provided query.
67
+ *
68
+ * @param labels - An array of label strings to be removed.
69
+ * @param query - The query object used to filter which labels to remove.
70
+ * @param publicOnly - A boolean indicating whether to remove only public labels. Defaults to true.
71
+ * @returns A promise that resolves when the labels have been removed.
72
+ */
73
+ declare function bulkRemove(labels: string[], query: Query, publicOnly?: boolean): Promise<void>;
74
+ /**
75
+ * A collection of functions related to label management.
76
+ *
77
+ * @property {Function} getUserRights - Retrieves the rights of a user.
78
+ * @property {Function} add - Adds a new label.
79
+ * @property {Function} remove - Removes an existing label.
80
+ * @property {Function} rename - Renames an existing label.
81
+ * @property {Function} delete - Deletes a label.
82
+ * @property {Function} bulkAdd - Adds multiple labels at once.
83
+ * @property {Function} bulkRemove - Removes multiple labels at once.
84
+ */
85
+ export declare const labels: {
86
+ getUserRights: typeof getUserRights;
87
+ add: typeof add;
88
+ remove: typeof remove;
89
+ rename: typeof rename;
90
+ delete: typeof deleteLabels;
91
+ bulkAdd: typeof bulkAdd;
92
+ bulkRemove: typeof bulkRemove;
93
+ };
94
+ export {};
95
+ //# sourceMappingURL=fetch-labels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-labels.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-labels.ts"],"names":[],"mappings":"AACA,OAAO,EAAkB,YAAY,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAG/D;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,GAAE,OAAc,EAAE,MAAM,CAAC,EAAE,MAAM,qBAW5F;AAED;;;;;;;;GAQG;AACH,iBAAe,aAAa,0BAQ3B;AAED;;;;;;;GAOG;AACH,iBAAe,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,UAAU,GAAE,OAAc,iBA2B7E;AAED;;;;;;;GAOG;AACH,iBAAe,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,UAAU,GAAE,OAAc,iBA2BhF;AAED;;;;;;;GAOG;AACH,iBAAe,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,GAAE,OAAc,iBAiBnF;AAED;;;;;;GAMG;AACH,iBAAe,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,UAAU,GAAE,OAAc,iBAevE;AAED;;;;;;;GAOG;AACH,iBAAe,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,GAAE,OAAc,iBAiBhF;AAED;;;;;;;GAOG;AACH,iBAAe,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,GAAE,OAAc,iBAiBnF;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,MAAM;;;;;;;;CAQlB,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { PreviewData, Query } from "../types";
2
+ /**
3
+ * Fetches preview data for a given id and query.
4
+ *
5
+ * @param id - The identifier for the preview.
6
+ * @param query - The query parameters for the preview.
7
+ * @returns A promise that resolves to the PreviewData.
8
+ */
9
+ export declare function fetchPreview(id: string, q: Query): Promise<PreviewData>;
10
+ /**
11
+ * Fetches preview document content from a given URL.
12
+ *
13
+ * @param url - The URL to fetch the preview document content from.
14
+ * @returns A promise that resolves to the PreviewData.
15
+ */
16
+ export declare function fetchPreviewUrl(url: string): Promise<void>;
17
+ //# sourceMappingURL=fetch-preview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-preview.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-preview.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAG9C;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC,WAAW,CAAC,CAY7E;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,iBAYhD"}
@@ -0,0 +1,13 @@
1
+ import { Principal } from "../types";
2
+ /**
3
+ * Fetches the principal (current user) information from the backend API.
4
+ *
5
+ * This function sends a GET request to the "principal" endpoint with specific
6
+ * query parameters to retrieve the current user's data without triggering
7
+ * automatic authentication.
8
+ *
9
+ * @returns A promise that resolves to the Principal object, representing
10
+ * the current user's information.
11
+ */
12
+ export declare function fetchPrincipal(): Promise<Principal>;
13
+ //# sourceMappingURL=fetch-principal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-principal.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-principal.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAGrC;;;;;;;;;GASG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,SAAS,CAAC,CAOzD"}
@@ -0,0 +1,27 @@
1
+ import { AuditEvents, Query, QueryIntentData, Result, TreeAggregation, TreeAggregationNode } from "../types";
2
+ /**
3
+ * Fetches data from the backend using the specified query.
4
+ * @param query The query to be sent to the backend.
5
+ * @returns A promise that resolves to the fetched data.
6
+ */
7
+ export declare function fetchQuery(query: Query, audit?: AuditEvents, queryIntentData?: QueryIntentData): Promise<Result>;
8
+ /**
9
+ * Fetches multiple queries in bulk.
10
+ * @param queries - An array of Query objects representing the queries to be fetched.
11
+ * @param auditEvents - Optional AuditEvents object containing audit events for the request.
12
+ * @returns A Promise that resolves to an array of Result objects representing the query results.
13
+ */
14
+ export declare function fetchBulkQuery(queries: Query[], mode?: "parallel", auditEvents?: AuditEvents): Promise<Result[]>;
15
+ /**
16
+ * Builds an array of paths and levels for a given tree aggregation.
17
+ *
18
+ * @param tree - The tree aggregation object.
19
+ * @param currentPath - The current path (optional, default: '').
20
+ * @param currentLevel - The current level (optional, default: 0).
21
+ * @returns An array of objects containing the path and level for each item in the tree.
22
+ */
23
+ export declare function buildPathsAndLevels(tree: TreeAggregation | TreeAggregationNode, currentPath?: string, currentLevel?: number): {
24
+ path: string;
25
+ level: number;
26
+ }[];
27
+ //# sourceMappingURL=fetch-query.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-query.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-query.ts"],"names":[],"mappings":"AACA,OAAO,EAAwB,WAAW,EAAE,KAAK,EAAE,eAAe,EAAE,MAAM,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKnI;;;;GAIG;AACH,wBAAsB,UAAU,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,WAAW,EAAE,eAAe,CAAC,EAAE,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CA0BtH;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,IAAI,CAAC,EAAE,UAAU,EAAE,WAAW,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAoDtH;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,eAAe,GAAG,mBAAmB,EAAE,WAAW,SAAK,EAAE,YAAY,SAAI,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAAG,CAkBvJ"}
@@ -0,0 +1,14 @@
1
+ import { LinkResult, Query } from "../types";
2
+ /**
3
+ * Fetches sponsored links based on the provided webservice and query.
4
+ *
5
+ * This function sends a POST request to the "query.links" endpoint with the
6
+ * specified webservice and query parameters to retrieve sponsored links.
7
+ *
8
+ * @param webservice - The name of the webservice to use for fetching sponsored links.
9
+ * @param query - The query parameters for fetching sponsored links.
10
+ * @returns A promise that resolves to an array of LinkResult objects, each
11
+ * representing a sponsored link with the original query attached.
12
+ */
13
+ export declare function fetchSponsoredLinks(webservice: string, query: Query): Promise<LinkResult[]>;
14
+ //# sourceMappingURL=fetch-sponsored-links.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-sponsored-links.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-sponsored-links.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAgB,KAAK,EAAE,MAAM,UAAU,CAAC;AAG3D;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAQjG"}
@@ -0,0 +1,55 @@
1
+ import { Suggestion } from "../types";
2
+ /**
3
+ * Fetches suggestions based on the provided parameters.
4
+ *
5
+ * @param suggestQueryName - The name of the suggest query.
6
+ * @param text - The text to be used for suggestions.
7
+ * @param filter - Optional filter object for additional filtering.
8
+ * Contains a list of columns (key/value pairs) to filter.<br>
9
+ * The columns used within this parameter must be declared in the Filter columns section options of the suggestion lexicon.<br>
10
+ * @example
11
+ * {
12
+ * "columns":{
13
+ * "docformat":"*",
14
+ * "authors":"*"
15
+ * },
16
+ * "filter":{
17
+ * "docformat":"doc"
18
+ * }
19
+ * }
20
+ *
21
+ * @param kinds - Optional array of kinds to filter the suggestions.
22
+ * Allows overriding the types defined in the suggestion query that are used by default.
23
+ * To specify several kinds, use the comma as a separator.
24
+ * By default, all kinds defined in the suggestion lexicon are taken into account.
25
+ * @example "kinds": ["city", "name"]
26
+ * @param showSource - Optional flag, when set to true, returns the name of the index column from which the suggested term is extracted.
27
+ * @returns A promise that resolves to an array of suggestions.
28
+ */
29
+ export declare function fetchSuggest(suggestQueryName: string, text: string, filter?: Record<string, unknown>, kinds?: string[], showSource?: boolean): Promise<Suggestion[]>;
30
+ /**
31
+ * @deprecated Use fetchSuggest instead.
32
+ *
33
+ * Fetches suggestions based on the provided query parameters.
34
+ * @param suggestQueryName - The name of the suggest query.
35
+ * @param text - The text to be used for suggestion.
36
+ * @param queryName - The name of the query.
37
+ * @param fields - Optional array of kinds to filter the suggestions.
38
+ * Allows overriding the types defined in the suggestion query that are used by default.
39
+ * To specify several kinds, use the comma as a separator.
40
+ * By default, all kinds defined in the suggestion lexicon are taken into account.
41
+ * @example "kinds": ["city", "name"]
42
+ * @returns A promise that resolves to an array of suggestions.
43
+ */
44
+ export declare function fetchSuggestQuery(suggestQueryName: string, text: string, queryName: string, fields?: string | string[]): Promise<Suggestion[]>;
45
+ /**
46
+ * Fetches suggestions for a specific field.
47
+ *
48
+ * @param text - The text to search for suggestions.
49
+ * @param fields - Indicates a list of fields for which suggestions must be returned.
50
+ * This parameter is required if you set action to **suggests**
51
+ *
52
+ * @returns A promise that resolves to an array of suggestions.
53
+ */
54
+ export declare function fetchSuggestField(text: string, fields: string[]): Promise<Suggestion[]>;
55
+ //# sourceMappingURL=fetch-suggest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-suggest.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-suggest.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAsB,YAAY,CAAC,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAC,OAAO,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,EAAE,UAAU,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAazK;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,iBAAiB,CAAC,gBAAgB,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAYpJ;AAGD;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAa7F"}
@@ -0,0 +1,16 @@
1
+ import { Query, TextChunk, TextLocation } from "../types";
2
+ /**
3
+ * Fetches text chunks from a document based on specified parameters.
4
+ *
5
+ * @param id - The unique identifier of the document.
6
+ * @param textChunks - An array of TextLocation objects representing the chunks to fetch.
7
+ * @param highlights - An array of strings to highlight within the text chunks.
8
+ * @param query - The Query object containing search parameters.
9
+ * @param leftSentencesCount - The number of sentences to include before each chunk.
10
+ * @param rightSentencesCount - The number of sentences to include after each chunk.
11
+ * @returns A Promise that resolves to an object containing an array of TextChunk objects.
12
+ */
13
+ export declare function fetchTextChunks(id: string, textChunks: TextLocation[], highlights: string[], query: Query, leftSentencesCount: number, rightSentencesCount: number): Promise<{
14
+ chunks: TextChunk[];
15
+ }>;
16
+ //# sourceMappingURL=fetch-text-chunk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch-text-chunk.d.ts","sourceRoot":"","sources":["../../src/web-api/fetch-text-chunk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAI1D;;;;;;;;;;GAUG;AACH,wBAAsB,eAAe,CACnC,EAAE,EAAE,MAAM,EACV,UAAU,EAAE,YAAY,EAAE,EAC1B,UAAU,EAAE,MAAM,EAAE,EACpB,KAAK,EAAE,KAAK,EACZ,kBAAkB,EAAE,MAAM,EAC1B,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAAC;IAAC,MAAM,EAAE,SAAS,EAAE,CAAA;CAAC,CAAC,CAW7D"}