@qlik/api 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/analytics/change-stores.d.ts +386 -0
  2. package/analytics/change-stores.js +123 -0
  3. package/analytics.d.ts +14 -0
  4. package/analytics.js +13 -0
  5. package/api-keys.d.ts +362 -3
  6. package/api-keys.js +2 -3
  7. package/apps.d.ts +2673 -3
  8. package/apps.js +2 -3
  9. package/assistants.d.ts +1370 -3
  10. package/assistants.js +2 -3
  11. package/audits.d.ts +318 -3
  12. package/audits.js +4 -4
  13. package/auth-types.d.ts +1 -1
  14. package/auth-types.js +1 -2
  15. package/auth.d.ts +94 -2
  16. package/auth.js +63 -3
  17. package/automation-connections.d.ts +366 -3
  18. package/automation-connections.js +2 -3
  19. package/automation-connectors.d.ts +84 -3
  20. package/automation-connectors.js +2 -3
  21. package/automations.d.ts +805 -3
  22. package/automations.js +2 -3
  23. package/automl-deployments.d.ts +101 -3
  24. package/automl-deployments.js +2 -3
  25. package/automl-predictions.d.ts +238 -3
  26. package/automl-predictions.js +2 -3
  27. package/banners.d.ts +184 -3
  28. package/banners.js +2 -3
  29. package/brands.d.ts +670 -3
  30. package/brands.js +2 -3
  31. package/chunks/{auth-Cle0_tmz.js → auth-BowS4SUR.js} +1 -5
  32. package/chunks/{chunk-EtTptKIv.js → chunk-D3vHIbds.js} +2 -2
  33. package/chunks/{dist-gXLIqDJW.js → dist-n3iOVn1W.js} +4 -4
  34. package/chunks/{auth-functions-BmZgZYSs.js → interceptors-DipDBQQ5.js} +258 -54
  35. package/chunks/{invoke-fetch-PcVIxLW4.js → invoke-fetch-B7lGscuQ.js} +3 -3
  36. package/chunks/{invoke-fetch-CucBpA1C.js → invoke-fetch-DhdyFZ0F.js} +1 -5
  37. package/chunks/{public-runtime-modules-Dwjzb3l8.js → public-runtime-modules-QhLPeQr5.js} +7 -7
  38. package/chunks/{qix-DI5o5XF4.d.ts → qix-CrqXv44x.d.ts} +6 -2
  39. package/chunks/{qix-DjxuPCX0.js → qix-RCUslia8.js} +11 -10
  40. package/chunks/{qix-chunk-entrypoint-tmTo-kpa.js → qix-chunk-entrypoint-WAS4NVTf.js} +48 -50
  41. package/collections.d.ts +582 -3
  42. package/collections.js +2 -3
  43. package/conditions.d.ts +662 -3
  44. package/conditions.js +2 -3
  45. package/consumption.d.ts +182 -3
  46. package/consumption.js +2 -3
  47. package/core/ip-policies.d.ts +328 -4
  48. package/core/ip-policies.js +108 -5
  49. package/core.d.ts +13 -4
  50. package/core.js +3 -4
  51. package/csp-origins.d.ts +273 -3
  52. package/csp-origins.js +2 -3
  53. package/csrf-token.d.ts +62 -3
  54. package/csrf-token.js +2 -3
  55. package/data-alerts.d.ts +1004 -3
  56. package/data-alerts.js +2 -3
  57. package/data-assets.d.ts +207 -3
  58. package/data-assets.js +2 -3
  59. package/data-connections.d.ts +678 -3
  60. package/data-connections.js +2 -3
  61. package/data-credentials.d.ts +292 -3
  62. package/data-credentials.js +2 -3
  63. package/data-files.d.ts +860 -3
  64. package/data-files.js +2 -3
  65. package/data-qualities.d.ts +175 -3
  66. package/data-qualities.js +2 -3
  67. package/data-sets.d.ts +424 -3
  68. package/data-sets.js +2 -3
  69. package/data-sources.d.ts +348 -3
  70. package/data-sources.js +2 -3
  71. package/data-stores.d.ts +537 -3
  72. package/data-stores.js +2 -3
  73. package/dcaas.d.ts +192 -3
  74. package/dcaas.js +2 -3
  75. package/di-projects.d.ts +812 -4
  76. package/di-projects.js +25 -4
  77. package/direct-access-agents.d.ts +710 -4
  78. package/direct-access-agents.js +37 -5
  79. package/docs/authentication.md +1 -1
  80. package/encryption.d.ts +372 -3
  81. package/encryption.js +2 -3
  82. package/extensions.d.ts +295 -3
  83. package/extensions.js +2 -3
  84. package/global-types.d.ts +1 -1
  85. package/global-types.js +0 -2
  86. package/glossaries.d.ts +1223 -3
  87. package/glossaries.js +2 -3
  88. package/groups.d.ts +510 -3
  89. package/groups.js +2 -3
  90. package/identity-providers.d.ts +711 -3
  91. package/identity-providers.js +2 -3
  92. package/index.d.ts +78 -69
  93. package/index.js +28 -10
  94. package/interceptors.d.ts +52 -3
  95. package/interceptors.js +1 -2
  96. package/invoke-fetch-types.d.ts +1 -1
  97. package/items.d.ts +536 -3
  98. package/items.js +2 -3
  99. package/knowledgebases.d.ts +976 -3
  100. package/knowledgebases.js +2 -3
  101. package/licenses.d.ts +663 -3
  102. package/licenses.js +2 -3
  103. package/lineage-graphs.d.ts +704 -3
  104. package/lineage-graphs.js +2 -3
  105. package/ml.d.ts +2808 -3
  106. package/ml.js +2 -3
  107. package/notes.d.ts +110 -3
  108. package/notes.js +2 -3
  109. package/notifications.d.ts +98 -3
  110. package/notifications.js +2 -3
  111. package/oauth-callback.iife.js +1151 -0
  112. package/oauth-clients.d.ts +562 -3
  113. package/oauth-clients.js +2 -3
  114. package/oauth-tokens.d.ts +126 -3
  115. package/oauth-tokens.js +2 -3
  116. package/package.json +6 -4
  117. package/qix.d.ts +3 -3
  118. package/qix.js +38 -3
  119. package/questions.d.ts +364 -3
  120. package/questions.js +2 -3
  121. package/quotas.d.ts +112 -3
  122. package/quotas.js +2 -3
  123. package/reload-tasks.d.ts +249 -3
  124. package/reload-tasks.js +2 -3
  125. package/reloads.d.ts +260 -3
  126. package/reloads.js +2 -3
  127. package/report-templates.d.ts +287 -3
  128. package/report-templates.js +2 -3
  129. package/reports.d.ts +863 -3
  130. package/reports.js +2 -3
  131. package/roles.d.ts +312 -3
  132. package/roles.js +2 -3
  133. package/sharing-tasks.d.ts +1164 -3
  134. package/sharing-tasks.js +2 -3
  135. package/spaces.d.ts +779 -3
  136. package/spaces.js +2 -3
  137. package/tasks.d.ts +564 -3
  138. package/tasks.js +2 -3
  139. package/temp-contents.d.ts +167 -3
  140. package/temp-contents.js +2 -3
  141. package/tenants.d.ts +360 -3
  142. package/tenants.js +2 -3
  143. package/themes.d.ts +270 -3
  144. package/themes.js +2 -3
  145. package/transports.d.ts +435 -4
  146. package/transports.js +20 -5
  147. package/ui-config.d.ts +274 -3
  148. package/ui-config.js +2 -3
  149. package/users.d.ts +674 -3
  150. package/users.js +2 -3
  151. package/web-integrations.d.ts +294 -3
  152. package/web-integrations.js +2 -3
  153. package/web-notifications.d.ts +273 -3
  154. package/web-notifications.js +2 -3
  155. package/webhooks.d.ts +505 -3
  156. package/webhooks.js +2 -3
  157. package/chunks/api-keys-D6Rqaov4.d.ts +0 -365
  158. package/chunks/apps-BwpXUGDb.d.ts +0 -2673
  159. package/chunks/assistants-wh6Qe7l6.d.ts +0 -1366
  160. package/chunks/audits-DakwzT97.d.ts +0 -316
  161. package/chunks/auth-6mptVm5Q.d.ts +0 -95
  162. package/chunks/auth-D11iO7ZV.js +0 -65
  163. package/chunks/automation-connections-k2G_n9rj.d.ts +0 -366
  164. package/chunks/automation-connectors-J5OE-1P0.d.ts +0 -84
  165. package/chunks/automations-BGy83EBO.d.ts +0 -797
  166. package/chunks/automl-deployments-CWEpX2pk.d.ts +0 -101
  167. package/chunks/automl-predictions-BNIjRhBm.d.ts +0 -238
  168. package/chunks/banners-CgBRnZGv.d.ts +0 -184
  169. package/chunks/brands-DCgk6Gqx.d.ts +0 -671
  170. package/chunks/collections-BpYjcpIY.d.ts +0 -582
  171. package/chunks/conditions-CJJG7Uph.d.ts +0 -662
  172. package/chunks/consumption-DerFk437.d.ts +0 -182
  173. package/chunks/core-DQXNZdnf.d.ts +0 -12
  174. package/chunks/csp-origins-3NJlh_n9.d.ts +0 -273
  175. package/chunks/csrf-token-DoaoOQzH.d.ts +0 -63
  176. package/chunks/data-alerts-CILSEFbQ.d.ts +0 -1004
  177. package/chunks/data-assets-CJDcssoX.d.ts +0 -207
  178. package/chunks/data-connections-VSB13K6g.d.ts +0 -678
  179. package/chunks/data-credentials-ChEp_hyU.d.ts +0 -292
  180. package/chunks/data-files-CVzn9M6V.d.ts +0 -860
  181. package/chunks/data-qualities-DBrot957.d.ts +0 -176
  182. package/chunks/data-sets-CFzxgWnO.d.ts +0 -424
  183. package/chunks/data-sources-IsAaof_C.d.ts +0 -346
  184. package/chunks/data-stores-DFOPdgfz.d.ts +0 -537
  185. package/chunks/dcaas-qyv7YlrN.d.ts +0 -192
  186. package/chunks/di-projects-DVQTxASr.d.ts +0 -777
  187. package/chunks/direct-access-agents-B77OhzZi.d.ts +0 -580
  188. package/chunks/encryption-BjA6xbCO.d.ts +0 -372
  189. package/chunks/extensions-OO0WtInj.d.ts +0 -294
  190. package/chunks/glossaries-CIX7-KT_.d.ts +0 -1213
  191. package/chunks/groups-C86-UG7S.d.ts +0 -511
  192. package/chunks/identity-providers-h0dKNxGZ.d.ts +0 -711
  193. package/chunks/interceptors-Csx2tEi5.d.ts +0 -52
  194. package/chunks/interceptors-DTYm37AU.js +0 -104
  195. package/chunks/ip-policies-CKRIlbP7.d.ts +0 -327
  196. package/chunks/ip-policies-DXlf172B.js +0 -108
  197. package/chunks/items-C-jzqvFW.d.ts +0 -536
  198. package/chunks/knowledgebases-CyQtVcZN.d.ts +0 -977
  199. package/chunks/licenses-xzjnkitW.d.ts +0 -663
  200. package/chunks/lineage-graphs-CViCCzKy.d.ts +0 -697
  201. package/chunks/ml-Abt2MUva.d.ts +0 -2809
  202. package/chunks/notes-BZxuyDgt.d.ts +0 -111
  203. package/chunks/notifications-Bd_gp4jU.d.ts +0 -99
  204. package/chunks/oauth-clients-B5QPr4IM.d.ts +0 -563
  205. package/chunks/oauth-tokens-1b7V8182.d.ts +0 -127
  206. package/chunks/qix-CYQsLyGQ.js +0 -40
  207. package/chunks/questions-BVp0tvNs.d.ts +0 -364
  208. package/chunks/quotas-CfAebRJd.d.ts +0 -113
  209. package/chunks/reload-tasks-DfwUTetn.d.ts +0 -249
  210. package/chunks/reloads-CwmagnFx.d.ts +0 -260
  211. package/chunks/report-templates-DjQYj5dn.d.ts +0 -287
  212. package/chunks/reports-DzNC6Uq3.d.ts +0 -861
  213. package/chunks/roles-BYFIY6E7.d.ts +0 -312
  214. package/chunks/sharing-tasks-BMGIQ-FO.d.ts +0 -1164
  215. package/chunks/spaces-BK823t-b.d.ts +0 -780
  216. package/chunks/tasks-COKDfShO.d.ts +0 -564
  217. package/chunks/temp-contents-zDomB-g6.d.ts +0 -168
  218. package/chunks/tenants-Bhn86519.d.ts +0 -361
  219. package/chunks/themes-v9NbhiBo.d.ts +0 -269
  220. package/chunks/transports-CqEiFxD3.d.ts +0 -362
  221. package/chunks/ui-config-Crs0mVMp.d.ts +0 -274
  222. package/chunks/users-BSOBU_fg.d.ts +0 -675
  223. package/chunks/web-integrations-MisPAHod.d.ts +0 -295
  224. package/chunks/web-notifications-DVy6FHYh.d.ts +0 -274
  225. package/chunks/webhooks-Dr4EiXqy.d.ts +0 -505
  226. /package/chunks/{auth-types-E99tzdN0.d.ts → auth-types-YrlH_R9f.d.ts} +0 -0
  227. /package/chunks/{auth-types-JehqruDP.js → auth-types-h43TVDpB.js} +0 -0
  228. /package/chunks/{global-types-CrOvI33z.js → global-types-CEVAJebk.js} +0 -0
  229. /package/chunks/{invoke-fetch-CbU2Dgqr.d.ts → invoke-fetch-C1Z0RJYU.d.ts} +0 -0
  230. /package/chunks/{utils-BnC4lrlq.js → utils-vv-xFm06.js} +0 -0
  231. /package/chunks/{websocket-errors-DSbO6kDZ.js → websocket-errors-CRTDTtBL.js} +0 -0
@@ -1,4 +1,977 @@
1
- import "./chunks/auth-types-E99tzdN0.js";
2
- import "./chunks/invoke-fetch-CbU2Dgqr.js";
3
- import { $ as KnowledgeBase, A as DownloadFileResponse, At as deleteKnowledgebaseDatasource, B as GetKnowledgebaseDatasourceHistoryHttpError, Bt as patchKnowledgebase, C as DeleteKnowledgebaseDatasourceHttpResponse, Ct as UpdateKnowledgebaseDatasourceHttpResponse, D as DeleteKnowledgebaseHttpResponse, Dt as createKnowledgebaseDatasource, E as DeleteKnowledgebaseHttpError, Et as createKnowledgebase, F as ErrorResponseCode, Ft as getKnowledgebaseDatasourceHistory, G as GetKnowledgebaseHistoriesHttpResponse, H as GetKnowledgebaseDatasourceScheduleHttpError, Ht as syncKnowledgebaseDatasource, I as ErrorResponseCodeCopy, It as getKnowledgebaseDatasourceSchedule, J as GetKnowledgebasesHttpError, K as GetKnowledgebaseHttpError, L as ErrorResponseCopy, Lt as getKnowledgebaseHistories, M as DownloadKnowledgebaseDatasourceHttpResponse, Mt as downloadKnowledgebaseDatasource, N as Duration, Nt as getKnowledgebase, O as DocStats, Ot as createKnowledgebaseDatasourceSchedule, P as ErrorResponse, Pt as getKnowledgebaseDatasourceHistories, Q as KbChunkMeta, R as GetKnowledgebaseDatasourceHistoriesHttpError, Rt as getKnowledgebases, S as DeleteKnowledgebaseDatasourceHttpError, St as UpdateKnowledgebaseDatasourceHttpError, T as DeleteKnowledgebaseDatasourceScheduleHttpResponse, Tt as clearCache, U as GetKnowledgebaseDatasourceScheduleHttpResponse, Ut as updateKnowledgebaseDatasource, V as GetKnowledgebaseDatasourceHistoryHttpResponse, Vt as searchKnowledgebase, W as GetKnowledgebaseHistoriesHttpError, X as JSONPatch, Y as GetKnowledgebasesHttpResponse, Z as JSONPatchArray, _ as DataSourceCrawlScope, _t as SyncHistory, a as ContentSummary, at as PatchKnowledgebaseHttpError, b as DataSourceSync, bt as SyncKnowledgebaseDatasourceHttpError, c as CreateKnowledgebaseDatasourceHttpError, ct as Schedule, d as CreateKnowledgebaseDatasourceScheduleHttpResponse, dt as ScheduleRange, et as KnowledgeBaseLight, f as CreateKnowledgebaseHttpError, ft as ScheduleWithManifest, g as DataSourceCrawlPattern, gt as SearchResponse, h as DataSourceCrawlConfig, ht as SearchRequest, i as Chunking, it as PageLinks, j as DownloadKnowledgebaseDatasourceHttpError, jt as deleteKnowledgebaseDatasourceSchedule, k as DownloadFile, kt as deleteKnowledgebase, l as CreateKnowledgebaseDatasourceHttpResponse, lt as ScheduleCalendar, m as DataSource, mt as SearchKnowledgebaseHttpResponse, n as CancelKnowledgebaseDatasourceHttpResponse, nt as KnowledgebasesAPI, o as CreateDataSource, ot as PatchKnowledgebaseHttpResponse, p as CreateKnowledgebaseHttpResponse, pt as SearchKnowledgebaseHttpError, q as GetKnowledgebaseHttpResponse, r as Chunk, rt as PageLink, s as CreateKnowledgeBase, st as ResultMeta, t as CancelKnowledgebaseDatasourceHttpError, tt as KnowledgeBasesResult, u as CreateKnowledgebaseDatasourceScheduleHttpError, ut as ScheduleInterval, v as DataSourceFileConfig, vt as SyncHistoryDetails, w as DeleteKnowledgebaseDatasourceScheduleHttpError, wt as cancelKnowledgebaseDatasource, x as DataSourceSyncStatus, xt as SyncKnowledgebaseDatasourceHttpResponse, y as DataSourceFileCrawlScope, yt as SyncHistoryResult, z as GetKnowledgebaseDatasourceHistoriesHttpResponse, zt as knowledgebasesExport } from "./chunks/knowledgebases-CyQtVcZN.js";
1
+ import { y as ApiCallOptions } from "./chunks/auth-types-YrlH_R9f.js";
2
+ import "./chunks/invoke-fetch-C1Z0RJYU.js";
3
+
4
+ //#region src/public/rest/knowledgebases.d.ts
5
+ /**
6
+ * A JSON Patch document as defined in http://tools.ietf.org/html/rfc6902.
7
+ */
8
+ type JSONPatch = {
9
+ /** The operation to be performed. */
10
+ op: "REPLACE";
11
+ /** A JSON Pointer. */
12
+ path: string;
13
+ /** The value to be used for this operation. */
14
+ value: string | number | boolean;
15
+ };
16
+ /**
17
+ * An array of JSON Patch documents
18
+ * @example
19
+ * [
20
+ * {
21
+ * path: "/name",
22
+ * value: "new name"
23
+ * },
24
+ * {
25
+ * path: "/description",
26
+ * value: "new description"
27
+ * }
28
+ * ]
29
+ */
30
+ type JSONPatchArray = JSONPatch[];
31
+ type Chunk = {
32
+ /** Metadata about the chunk */
33
+ chunkMeta: KbChunkMeta;
34
+ /** search method for the chunk, e.g. `semantic search`, `keyword search` or `semantic and keyword search` */
35
+ searchSource?: string;
36
+ /** Similarity score from embedding match */
37
+ semanticScore?: number;
38
+ /** Text content of the chunk */
39
+ text: string;
40
+ /** Score from keyword search */
41
+ tfidfScore?: number;
42
+ };
43
+ type Chunking = {
44
+ /** Allows to keep or remove separators used */
45
+ keepSeparator: boolean;
46
+ /** Chunk overlap, should be less than size */
47
+ overlap: number;
48
+ /** List of separators to chunk by */
49
+ separators: string[];
50
+ /** Size of chunks */
51
+ size: number;
52
+ /** Chunking strategy */
53
+ type: string;
54
+ };
55
+ type ContentSummary = {
56
+ effectivePages: number;
57
+ fileCount: number;
58
+ fileSize: number;
59
+ textSize: number;
60
+ };
61
+ /**
62
+ * Specification on where to fetch the files for. This is required when the type == 'file'. Only one of path and files can be set. Path takes precedence if both are provided.
63
+ */
64
+ type CreateDataSource = {
65
+ /** Configuration for webcrawling */
66
+ crawlerConfig?: DataSourceCrawlConfig;
67
+ /** Specification on where to fetch the files for. This is required when the type == 'file'. Only one of path and files can be set. Path takes precedence if both are provided. */
68
+ fileConfig?: DataSourceFileConfig;
69
+ /** Name of the datasource */
70
+ name: string;
71
+ type: "file" | "web" | "database";
72
+ };
73
+ type CreateKnowledgeBase = {
74
+ /** User opt in to advanced parsing and chunking pipeline. Default is false, which will run legacy parsing and chunking. */
75
+ advancedIndexing?: boolean;
76
+ /** Description of the knowledgebase */
77
+ description?: string;
78
+ /** Name of the knowledgebase */
79
+ name: string;
80
+ /** Number of selected errors to store in the case of any failed datasources. Optional value with a default of 10. */
81
+ selectedErrorsCount?: number;
82
+ /** Unique identifier of the space to contain the knowledgebase */
83
+ spaceId: string;
84
+ /** List of tags for knowledgebase */
85
+ tags?: string[];
86
+ };
87
+ /**
88
+ * Specification on where to fetch the files for. This is required when the type == 'file'. Only one of path and files can be set. Path takes precedence if both are provided.
89
+ */
90
+ type DataSource = {
91
+ chunking?: Chunking;
92
+ contentSummary: ContentSummary;
93
+ /** Configuration for webcrawling */
94
+ crawlerConfig?: DataSourceCrawlConfig;
95
+ /** Specification on where to fetch the files for. This is required when the type == 'file'. Only one of path and files can be set. Path takes precedence if both are provided. */
96
+ fileConfig?: DataSourceFileConfig;
97
+ /** Unique identifier of the datasource */
98
+ id: string;
99
+ /** Name of the datasource */
100
+ name?: string;
101
+ /** The number of times that a datasource was referenced as a source in an answer */
102
+ sourceCount?: number;
103
+ /** The unique identifier of the space containing the datasource */
104
+ spaceId?: string;
105
+ syncInfo?: DataSourceSyncStatus;
106
+ type: "file" | "web" | "database";
107
+ };
108
+ /**
109
+ * Configuration for webcrawling
110
+ */
111
+ type DataSourceCrawlConfig = {
112
+ /** Pattern matching links to crawl */
113
+ crawlPatterns?: DataSourceCrawlPattern[];
114
+ /** Pattern matching links to index */
115
+ indexPatterns?: DataSourceCrawlPattern[];
116
+ /** Scope for th webcrawler */
117
+ scope: DataSourceCrawlScope;
118
+ /** Seed URL that crawling will start on. */
119
+ url: string;
120
+ };
121
+ /**
122
+ * Include or exclude pattern
123
+ */
124
+ type DataSourceCrawlPattern = {
125
+ /** Regex patterna to filter links on */
126
+ pattern: string;
127
+ /** include or exclude */
128
+ type: "include" | "exclude";
129
+ };
130
+ /**
131
+ * Scope for th webcrawler
132
+ */
133
+ type DataSourceCrawlScope = {
134
+ /** The number of levels of links the crawler will traverse */
135
+ depth: number;
136
+ /** if set to true crawler will try to download and index other supported content like pdf:s from links */
137
+ downloadFiles?: boolean;
138
+ /** Maximum number of links per page that will be extracted */
139
+ maxLinks?: number;
140
+ /** Optional parameter. Max size of downloaded files in bytes */
141
+ maxSize?: number;
142
+ /** The scope that the crawler will crawl. */
143
+ scope: "all" | "domain" | "subdomain";
144
+ };
145
+ /**
146
+ * Specification on where to fetch the files for. This is required when the type == 'file'. Only one of path and files can be set. Path takes precedence if both are provided.
147
+ */
148
+ type DataSourceFileConfig = {
149
+ /** connection id to be used to retrieve the raw data */
150
+ connectionId: string;
151
+ /** Pattern matching links to crawl */
152
+ crawlPatterns?: DataSourceCrawlPattern[];
153
+ files?: string[];
154
+ /** Root folder for traversing. */
155
+ folder?: string;
156
+ /** Scope for the file crawler. */
157
+ scope?: DataSourceFileCrawlScope;
158
+ /** userId of the owner of the datasource fileConfig */
159
+ userId: string;
160
+ };
161
+ /**
162
+ * Scope for the file crawler.
163
+ */
164
+ type DataSourceFileCrawlScope = {
165
+ /** The number of levels of sub folders that should be considered */
166
+ depth: number;
167
+ /** list of file extensions to be considered */
168
+ extensions?: string[];
169
+ /** Maximum number of files per folder that should be considered */
170
+ maxFilesPerFolder?: number;
171
+ /** Total number of files that should be considered */
172
+ maxFilesTotal?: number;
173
+ /** Optional parameter. Max size of downloaded files in bytes */
174
+ maxSize?: number;
175
+ /** only files modified after this time should be indexed. If set older files will be removed from index. */
176
+ modifiedAfter?: string;
177
+ };
178
+ /**
179
+ * Response when a datasource sync is started, contains the sync Id
180
+ */
181
+ type DataSourceSync = {
182
+ /** Unique identifier of the sync */
183
+ id: string;
184
+ };
185
+ type DataSourceSyncStatus = {
186
+ /** Datetime when the sync task was completed */
187
+ readonly completedAt: string;
188
+ /** sync Id */
189
+ lastSyncId?: string;
190
+ /** Datetime when the sync task was started */
191
+ readonly startedAt: string;
192
+ /** Sync status */
193
+ readonly status: "neverIndexed" | "progress" | "completed" | "completedWithError" | "toAdd" | "toDelete";
194
+ };
195
+ /**
196
+ * Summary of documents processed
197
+ */
198
+ type DocStats = {
199
+ readonly added: number;
200
+ readonly deleted: number;
201
+ readonly deltaBytes: number;
202
+ readonly deltaEffectivePages: number;
203
+ readonly deltaTextSize: number;
204
+ readonly errors: number;
205
+ readonly largestFileSize: number;
206
+ readonly totalBytesProcessed: number;
207
+ readonly updated: number;
208
+ };
209
+ type DownloadFile = {
210
+ /** file path to the file to downlaod. */
211
+ path: string;
212
+ };
213
+ /**
214
+ * Download information for the file.
215
+ */
216
+ type DownloadFileResponse = {
217
+ /** Size of downloaded file. */
218
+ fileSize: number;
219
+ /** Date for last time the file was modified. */
220
+ lastUpdatedAt: string;
221
+ /** The mimetype of the file. */
222
+ mimeType: string;
223
+ /** The requested file name. */
224
+ name: string;
225
+ /** Space id the file belongs in. */
226
+ spaceId: string;
227
+ /** URL to download the file. */
228
+ url: string;
229
+ };
230
+ type Duration = {
231
+ readonly chunk: number;
232
+ readonly download: number;
233
+ readonly embed: number;
234
+ readonly parse: number;
235
+ readonly store: number;
236
+ };
237
+ type ErrorResponse = {
238
+ errors?: ErrorResponseCode[];
239
+ traceId?: string;
240
+ };
241
+ type ErrorResponseCode = {
242
+ code?: string;
243
+ detail?: string;
244
+ title?: string;
245
+ };
246
+ type ErrorResponseCodeCopy = {
247
+ /** Custom error codes
248
+ * * AE-1 - Internal processing error
249
+ * * AE-2 - Incorrect request
250
+ * * AE-3 - Authentication issue
251
+ * * AE-4 - Prompt is rejected
252
+ * * AE-5 - Resource is not found
253
+ * * AE-6 - API usage rate limit is exceeded
254
+ * * AE-7 - Method is not allowed */
255
+ code?: string;
256
+ detail?: string;
257
+ title?: string;
258
+ };
259
+ type ErrorResponseCopy = {
260
+ errors?: ErrorResponseCodeCopy[];
261
+ traceId?: string;
262
+ };
263
+ /**
264
+ * Metadata about the chunk
265
+ */
266
+ type KbChunkMeta = {
267
+ /** chunkId */
268
+ chunkId: string;
269
+ /** datasourceId of chunk */
270
+ datasourceId: string;
271
+ /** documentId of chunk */
272
+ documentId: string;
273
+ /** knowledgeBaseId of chunk */
274
+ knowledgeBaseId: string;
275
+ /** source of chunk */
276
+ source: string;
277
+ };
278
+ type KnowledgeBase = KnowledgeBaseLight & {
279
+ datasources?: DataSource[];
280
+ };
281
+ type KnowledgeBaseLight = {
282
+ /** User opt in to advanced parsing and chunking pipeline. Default is false, which will run legacy parsing and chunking. */
283
+ advancedIndexing?: boolean;
284
+ contentSummary: ContentSummary;
285
+ /** Datetime when the knowledgebase was created */
286
+ readonly createdAt: string;
287
+ /** Unique identifier of the user who created the knowledgebase */
288
+ readonly createdBy: string;
289
+ /** Description of the knowledgebase */
290
+ description: string;
291
+ /** Unique identifier of the knowledgebase */
292
+ id: string;
293
+ /** Datetime when the knowledgebase was last indexed */
294
+ readonly lastIndexedAt?: string;
295
+ /** Name of the knowledgebase */
296
+ name: string;
297
+ /** The unique identifier of the knowledgebase owner */
298
+ ownerId: string;
299
+ /** Number of selected errors to store in the case of any failed datasources. */
300
+ selectedErrorsCount?: number;
301
+ /** The unique identifier of the space containing the knowledgebase */
302
+ spaceId: string;
303
+ /** List of tags associated with the knowledgebase. */
304
+ tags: string[];
305
+ /** Unique identifier of the tenant */
306
+ tenantId?: string;
307
+ /** Datetime when the knowledgebase was updated */
308
+ readonly updatedAt: string;
309
+ /** The unique identifier of the user who last updated the knowledgebase */
310
+ readonly updatedBy: string;
311
+ };
312
+ type KnowledgeBasesResult = {
313
+ data: KnowledgeBaseLight[];
314
+ links?: PageLinks;
315
+ };
316
+ type PageLink = {
317
+ href?: string;
318
+ };
319
+ type PageLinks = {
320
+ next?: PageLink;
321
+ prev?: PageLink;
322
+ self?: PageLink;
323
+ };
324
+ type ResultMeta = {
325
+ countTotal?: number;
326
+ };
327
+ type Schedule = {
328
+ calendars?: ScheduleCalendar[];
329
+ intervals?: ScheduleInterval[];
330
+ };
331
+ /**
332
+ * An event specification relative to the calendar, similar to a traditional cron specification.
333
+ */
334
+ type ScheduleCalendar = {
335
+ /** Description of the intention of this schedule */
336
+ comment: string;
337
+ /** DayOfMonth range to match (1-31). Default matches all days */
338
+ dayOfMonth: ScheduleRange[];
339
+ /** DayOfWeek range to match (0-6; 0 is Sunday). Default matches all days of the week */
340
+ dayOfWeek: ScheduleRange[];
341
+ /** Hour range to match (0-23). Default matches 0 */
342
+ hour: ScheduleRange[];
343
+ /** Minute range to match (0-59). Default matches 0 */
344
+ minute: ScheduleRange[];
345
+ /** Month range to match (1-12). Default matches all months */
346
+ month: ScheduleRange[];
347
+ /** Second range to match (0-59). Default matches 0 */
348
+ second: ScheduleRange[];
349
+ /** Year range to match. Default matches all years */
350
+ year: ScheduleRange[];
351
+ };
352
+ /**
353
+ * For example, an `every` of 1 hour with `offset` of zero would match every hour, on the hour. The same `every` but an `offset` of 19 minutes would match every `xx:19:00`.
354
+ */
355
+ type ScheduleInterval = {
356
+ /** The period to repeat the interval */
357
+ every: string;
358
+ /** A fixed offset added to the intervals period. Optional, defaults to 0 */
359
+ offset?: string;
360
+ };
361
+ /**
362
+ * ScheduleRange represents a set of integer values, used to match fields of a calendar time in scheduleCalendar. If end < start, then end is interpreted as equal to start
363
+ */
364
+ type ScheduleRange = {
365
+ /** End of the range (inclusive). If end < start, then end is interpreted as equal to start. Optional, defaulted to Start */
366
+ end?: number;
367
+ /** Start of the range (inclusive) */
368
+ start: number;
369
+ /** Step to be take between each value. Optional, defaulted to 1 */
370
+ step?: number;
371
+ };
372
+ type ScheduleWithManifest = {
373
+ calendars: ScheduleCalendar[];
374
+ datasourceId?: string;
375
+ intervals?: ScheduleInterval[];
376
+ knowledgebaseId: string;
377
+ ownerId: string;
378
+ spaceId?: string;
379
+ tenantId: string;
380
+ };
381
+ type SearchRequest = {
382
+ /** Query text or question to search. */
383
+ prompt: string;
384
+ /** Search mode to use. Allowed values: `SIMPLE` and `FULL`. Default: `SIMPLE`. */
385
+ searchMode?: "SIMPLE" | "FULL";
386
+ /** Number of chunks to return in results. */
387
+ topN?: number;
388
+ };
389
+ type SearchResponse = {
390
+ /** Retrieved document chunks */
391
+ chunks: Chunk[];
392
+ };
393
+ type SyncHistory = {
394
+ /** Datetime when the sync task was completed */
395
+ readonly completedAt?: string;
396
+ /** Connection id that the datasource used */
397
+ connectionId: string;
398
+ /** datasource id */
399
+ datasourceId: string;
400
+ /** Summary of documents processed */
401
+ docStats: DocStats;
402
+ /** sync id */
403
+ id: string;
404
+ /** populated with up to the first selectedErrorsCount errors if there were any during sync */
405
+ selectedErrors?: string[];
406
+ /** Datetime when the sync task was started */
407
+ readonly startedAt: string;
408
+ /** Sync status */
409
+ readonly status: "neverIndexed" | "progress" | "completed" | "completedWithError";
410
+ /** Datasource trigger type, was it manually or automatically synced */
411
+ triggerType: string;
412
+ };
413
+ type SyncHistoryDetails = {
414
+ /** acion performed */
415
+ readonly action: "add" | "delete" | "update";
416
+ /** chunk size */
417
+ readonly chunkSize?: number;
418
+ /** number of chunks */
419
+ readonly chunks?: number;
420
+ duration?: Duration;
421
+ /** error if one happened during sync */
422
+ error?: string;
423
+ /** page count */
424
+ readonly explicitPages: number;
425
+ /** Datetime when the file processing finished */
426
+ readonly fileCompletedAt?: string;
427
+ /** Datetime when the file was last modified */
428
+ readonly fileLastModified?: string;
429
+ /** file size */
430
+ readonly fileSize?: number;
431
+ /** Datetime when the file processing started */
432
+ readonly fileStartedAt?: string;
433
+ /** document Id */
434
+ id: string;
435
+ /** Source of the document */
436
+ readonly source: string;
437
+ /** sync Id */
438
+ syncId: string;
439
+ /** Datetime when the sync task was executed */
440
+ readonly syncedAt: string;
441
+ };
442
+ type SyncHistoryResult = {
443
+ data: SyncHistory[];
444
+ links?: PageLinks;
445
+ meta?: ResultMeta;
446
+ };
447
+ /**
448
+ * Returns a list of all knowledgebases the user has access to.
449
+ *
450
+ * @param query an object with query parameters
451
+ * @throws GetKnowledgebasesHttpError
452
+ */
453
+ declare function getKnowledgebases(query: {
454
+ /** @deprecated
455
+ * Optional parameter to request total count for query */
456
+ countTotal?: boolean;
457
+ /** The number of knowledgebases to get. */
458
+ limit?: number;
459
+ /** Optional parameter to request the next page. */
460
+ next?: string;
461
+ /** Optional parameter to request the previous page. */
462
+ prev?: string;
463
+ /** Optional resource field name to sort on, case insensitive, eg. name. Can be prefixed with - to set descending order, defaults to ascending. */
464
+ sort?: "NAME" | "-NAME" | "DESCRIPTION" | "-DESCRIPTION" | "CREATED" | "-CREATED" | "UPDATED" | "-UPDATED";
465
+ }, options?: ApiCallOptions): Promise<GetKnowledgebasesHttpResponse>;
466
+ type GetKnowledgebasesHttpResponse = {
467
+ data: KnowledgeBasesResult;
468
+ headers: Headers;
469
+ status: 200;
470
+ prev?: (options?: ApiCallOptions) => Promise<GetKnowledgebasesHttpResponse>;
471
+ next?: (options?: ApiCallOptions) => Promise<GetKnowledgebasesHttpResponse>;
472
+ };
473
+ type GetKnowledgebasesHttpError = {
474
+ data: ErrorResponse;
475
+ headers: Headers;
476
+ status: 400 | 403;
477
+ };
478
+ /**
479
+ * Creates a new knowledgebase.
480
+ *
481
+ * @param body an object with the body content
482
+ * @throws CreateKnowledgebaseHttpError
483
+ */
484
+ declare function createKnowledgebase(body: CreateKnowledgeBase, options?: ApiCallOptions): Promise<CreateKnowledgebaseHttpResponse>;
485
+ type CreateKnowledgebaseHttpResponse = {
486
+ data: KnowledgeBaseLight;
487
+ headers: Headers;
488
+ status: 201;
489
+ };
490
+ type CreateKnowledgebaseHttpError = {
491
+ data: ErrorResponse;
492
+ headers: Headers;
493
+ status: 400 | 403;
494
+ };
495
+ /**
496
+ * Deletes a knowledgebase and all of its resources.
497
+ *
498
+ * @param id The id of the knowledgebase to delete.
499
+ * @throws DeleteKnowledgebaseHttpError
500
+ */
501
+ declare function deleteKnowledgebase(id: string, options?: ApiCallOptions): Promise<DeleteKnowledgebaseHttpResponse>;
502
+ type DeleteKnowledgebaseHttpResponse = {
503
+ data: void;
504
+ headers: Headers;
505
+ status: 204;
506
+ };
507
+ type DeleteKnowledgebaseHttpError = {
508
+ data: ErrorResponse;
509
+ headers: Headers;
510
+ status: 400 | 403 | 404;
511
+ };
512
+ /**
513
+ * Retrieves a specific knowledgebase.
514
+ *
515
+ * @param id The id of the knowledgebase to retrieve.
516
+ * @throws GetKnowledgebaseHttpError
517
+ */
518
+ declare function getKnowledgebase(id: string, options?: ApiCallOptions): Promise<GetKnowledgebaseHttpResponse>;
519
+ type GetKnowledgebaseHttpResponse = {
520
+ data: KnowledgeBase;
521
+ headers: Headers;
522
+ status: 200;
523
+ };
524
+ type GetKnowledgebaseHttpError = {
525
+ data: ErrorResponse;
526
+ headers: Headers;
527
+ status: 400 | 403 | 404;
528
+ };
529
+ /**
530
+ * Updates properties of a specific knowledgebase.
531
+ *
532
+ * @param id The knowledgebase id.
533
+ * @param body an object with the body content
534
+ * @throws PatchKnowledgebaseHttpError
535
+ */
536
+ declare function patchKnowledgebase(id: string, body: JSONPatchArray, options?: ApiCallOptions): Promise<PatchKnowledgebaseHttpResponse>;
537
+ type PatchKnowledgebaseHttpResponse = {
538
+ data: void;
539
+ headers: Headers;
540
+ status: 204;
541
+ };
542
+ type PatchKnowledgebaseHttpError = {
543
+ data: ErrorResponse;
544
+ headers: Headers;
545
+ status: 400 | 401 | 403 | 404 | 429;
546
+ };
547
+ /**
548
+ * Execute search with either `SIMPLE` or `FULL` mode. SIMPLE does semantic search while FULL will also do reranking and include keyword based chunks. Use topN to control number of chunks in response, max limit is 50. Default to 5.
549
+ *
550
+ * @param id The ID of the knowledgebase
551
+ * @param body an object with the body content
552
+ * @throws SearchKnowledgebaseHttpError
553
+ */
554
+ declare function searchKnowledgebase(id: string, body: SearchRequest, options?: ApiCallOptions): Promise<SearchKnowledgebaseHttpResponse>;
555
+ type SearchKnowledgebaseHttpResponse = {
556
+ data: SearchResponse;
557
+ headers: Headers;
558
+ status: 200;
559
+ };
560
+ type SearchKnowledgebaseHttpError = {
561
+ data: ErrorResponseCopy;
562
+ headers: Headers;
563
+ status: 400 | 403 | 404 | 405 | 500;
564
+ };
565
+ /**
566
+ * Adds a datasource to a knowledgebase.
567
+ *
568
+ * @param id The id of the knowledgebase.
569
+ * @param body an object with the body content
570
+ * @throws CreateKnowledgebaseDatasourceHttpError
571
+ */
572
+ declare function createKnowledgebaseDatasource(id: string, body: CreateDataSource, options?: ApiCallOptions): Promise<CreateKnowledgebaseDatasourceHttpResponse>;
573
+ type CreateKnowledgebaseDatasourceHttpResponse = {
574
+ data: DataSource;
575
+ headers: Headers;
576
+ status: 201;
577
+ };
578
+ type CreateKnowledgebaseDatasourceHttpError = {
579
+ data: ErrorResponse;
580
+ headers: Headers;
581
+ status: 400 | 403 | 404;
582
+ };
583
+ /**
584
+ * Deletes a specified datasource and all its resources.
585
+ *
586
+ * @param id The id of the knowledgebase the datasource belongs to.
587
+ * @param datasourceId The id of the datasource to delete.
588
+ * @throws DeleteKnowledgebaseDatasourceHttpError
589
+ */
590
+ declare function deleteKnowledgebaseDatasource(id: string, datasourceId: string, options?: ApiCallOptions): Promise<DeleteKnowledgebaseDatasourceHttpResponse>;
591
+ type DeleteKnowledgebaseDatasourceHttpResponse = {
592
+ data: void;
593
+ headers: Headers;
594
+ status: 204;
595
+ };
596
+ type DeleteKnowledgebaseDatasourceHttpError = {
597
+ data: ErrorResponse;
598
+ headers: Headers;
599
+ status: 400 | 403 | 404;
600
+ };
601
+ /**
602
+ * Update a knowledgebase datasource
603
+ *
604
+ * @param id The id of a knowledgebase.
605
+ * @param datasourceId The id of the datasource to update.
606
+ * @param body an object with the body content
607
+ * @throws UpdateKnowledgebaseDatasourceHttpError
608
+ */
609
+ declare function updateKnowledgebaseDatasource(id: string, datasourceId: string, body: DataSource, options?: ApiCallOptions): Promise<UpdateKnowledgebaseDatasourceHttpResponse>;
610
+ type UpdateKnowledgebaseDatasourceHttpResponse = {
611
+ data: DataSource;
612
+ headers: Headers;
613
+ status: 200;
614
+ };
615
+ type UpdateKnowledgebaseDatasourceHttpError = {
616
+ data: ErrorResponse;
617
+ headers: Headers;
618
+ status: 400 | 403 | 404;
619
+ };
620
+ /**
621
+ * Cancels ongoing sync for a specified datasource.
622
+ *
623
+ * @param id The id of the knowledgebase the datasource belongs to.
624
+ * @param datasourceId The id of the datasource to cancel sync for.
625
+ * @throws CancelKnowledgebaseDatasourceHttpError
626
+ */
627
+ declare function cancelKnowledgebaseDatasource(id: string, datasourceId: string, options?: ApiCallOptions): Promise<CancelKnowledgebaseDatasourceHttpResponse>;
628
+ type CancelKnowledgebaseDatasourceHttpResponse = {
629
+ data: DataSourceSync;
630
+ headers: Headers;
631
+ status: 200;
632
+ };
633
+ type CancelKnowledgebaseDatasourceHttpError = {
634
+ data: ErrorResponse;
635
+ headers: Headers;
636
+ status: 400 | 403 | 404;
637
+ };
638
+ /**
639
+ * Download knowledgebase datasource reference
640
+ *
641
+ * @param id The id of the knowledgebase the datasource belongs to.
642
+ * @param datasourceId The id of the datasource to download from.
643
+ * @param body an object with the body content
644
+ * @throws DownloadKnowledgebaseDatasourceHttpError
645
+ */
646
+ declare function downloadKnowledgebaseDatasource(id: string, datasourceId: string, body: DownloadFile, options?: ApiCallOptions): Promise<DownloadKnowledgebaseDatasourceHttpResponse>;
647
+ type DownloadKnowledgebaseDatasourceHttpResponse = {
648
+ data: DownloadFileResponse;
649
+ headers: Headers;
650
+ status: 200;
651
+ };
652
+ type DownloadKnowledgebaseDatasourceHttpError = {
653
+ data: ErrorResponse;
654
+ headers: Headers;
655
+ status: 400 | 403 | 404;
656
+ };
657
+ /**
658
+ * Starts syncing a specified datasource to a specified knowledgebase index.
659
+ *
660
+ * @param id The id of the knowledgebase the datasource belongs to.
661
+ * @param datasourceId The id of the datasource to sync.
662
+ * @param query an object with query parameters
663
+ * @throws SyncKnowledgebaseDatasourceHttpError
664
+ */
665
+ declare function syncKnowledgebaseDatasource(id: string, datasourceId: string, query: {
666
+ /** Optional parameter to migrate indexed files to docdetails collection */
667
+ migrate?: boolean;
668
+ }, options?: ApiCallOptions): Promise<SyncKnowledgebaseDatasourceHttpResponse>;
669
+ type SyncKnowledgebaseDatasourceHttpResponse = {
670
+ data: DataSourceSync;
671
+ headers: Headers;
672
+ status: 202;
673
+ };
674
+ type SyncKnowledgebaseDatasourceHttpError = {
675
+ data: ErrorResponse;
676
+ headers: Headers;
677
+ status: 400 | 403 | 404;
678
+ };
679
+ /**
680
+ * Retrieves sync history for a specified datasource in a knowledgebase. Returns a `404` if there is no sync history, or if the calling user doesn't have access to the datasource.
681
+ *
682
+ * @param id The id of the knowledgebase the datasource belongs to.
683
+ * @param datasourceId The id of the datasource.
684
+ * @param query an object with query parameters
685
+ * @throws GetKnowledgebaseDatasourceHistoriesHttpError
686
+ */
687
+ declare function getKnowledgebaseDatasourceHistories(id: string, datasourceId: string, query: {
688
+ /** The number of knowledgebases to get. */
689
+ limit?: number;
690
+ /** Optional parameter to request the next page. */
691
+ next?: string;
692
+ /** Optional parameter to request the previous page. */
693
+ prev?: string;
694
+ /** Optional resource field name to sort on, case insensitive, eg. name. Can be prefixed with - to set descending order, defaults to ascending. */
695
+ sort?: "COMPLETED" | "-COMPLETED";
696
+ }, options?: ApiCallOptions): Promise<GetKnowledgebaseDatasourceHistoriesHttpResponse>;
697
+ type GetKnowledgebaseDatasourceHistoriesHttpResponse = {
698
+ data: SyncHistoryResult;
699
+ headers: Headers;
700
+ status: 200;
701
+ prev?: (options?: ApiCallOptions) => Promise<GetKnowledgebaseDatasourceHistoriesHttpResponse>;
702
+ next?: (options?: ApiCallOptions) => Promise<GetKnowledgebaseDatasourceHistoriesHttpResponse>;
703
+ };
704
+ type GetKnowledgebaseDatasourceHistoriesHttpError = {
705
+ data: ErrorResponse;
706
+ headers: Headers;
707
+ status: 400 | 403 | 404;
708
+ };
709
+ /**
710
+ * @deprecated
711
+ *
712
+ * Retrieves detailed sync history for a specified datasource.
713
+ *
714
+ * @param id The id of the knowledgebase the datasource belongs to.
715
+ * @param datasourceId The id of the datasource.
716
+ * @param syncId The sync identifier.
717
+ * @throws GetKnowledgebaseDatasourceHistoryHttpError
718
+ */
719
+ declare function getKnowledgebaseDatasourceHistory(id: string, datasourceId: string, syncId: string, options?: ApiCallOptions): Promise<GetKnowledgebaseDatasourceHistoryHttpResponse>;
720
+ type GetKnowledgebaseDatasourceHistoryHttpResponse = {
721
+ data: SyncHistoryDetails;
722
+ headers: Headers;
723
+ status: 200;
724
+ };
725
+ type GetKnowledgebaseDatasourceHistoryHttpError = {
726
+ data: ErrorResponse;
727
+ headers: Headers;
728
+ status: 400 | 403 | 404;
729
+ };
730
+ /**
731
+ * Delete knowledgebase datasource schedule
732
+ *
733
+ * @param id The id of the knowledgebase the schedule belongs to.
734
+ * @param datasourceId The id of the datasource the schedule belongs to.
735
+ * @throws DeleteKnowledgebaseDatasourceScheduleHttpError
736
+ */
737
+ declare function deleteKnowledgebaseDatasourceSchedule(id: string, datasourceId: string, options?: ApiCallOptions): Promise<DeleteKnowledgebaseDatasourceScheduleHttpResponse>;
738
+ type DeleteKnowledgebaseDatasourceScheduleHttpResponse = {
739
+ data: void;
740
+ headers: Headers;
741
+ status: 204;
742
+ };
743
+ type DeleteKnowledgebaseDatasourceScheduleHttpError = {
744
+ data: ErrorResponse;
745
+ headers: Headers;
746
+ status: 400 | 403 | 404;
747
+ };
748
+ /**
749
+ * Get a knowledgebase datasource schedule
750
+ *
751
+ * @param id The id of the knowledgebase the schedule belongs to.
752
+ * @param datasourceId The id of the datasource the schedule belongs to.
753
+ * @throws GetKnowledgebaseDatasourceScheduleHttpError
754
+ */
755
+ declare function getKnowledgebaseDatasourceSchedule(id: string, datasourceId: string, options?: ApiCallOptions): Promise<GetKnowledgebaseDatasourceScheduleHttpResponse>;
756
+ type GetKnowledgebaseDatasourceScheduleHttpResponse = {
757
+ data: ScheduleWithManifest;
758
+ headers: Headers;
759
+ status: 200;
760
+ };
761
+ type GetKnowledgebaseDatasourceScheduleHttpError = {
762
+ data: ErrorResponse;
763
+ headers: Headers;
764
+ status: 400 | 403 | 404;
765
+ };
766
+ /**
767
+ * Creates or updates a specified datasource schedule.
768
+ *
769
+ * @param id The id of the knowledgebase the schedule belongs to.
770
+ * @param datasourceId The id of the datasource the schedule belongs to.
771
+ * @param body an object with the body content
772
+ * @throws CreateKnowledgebaseDatasourceScheduleHttpError
773
+ */
774
+ declare function createKnowledgebaseDatasourceSchedule(id: string, datasourceId: string, body: Schedule, options?: ApiCallOptions): Promise<CreateKnowledgebaseDatasourceScheduleHttpResponse>;
775
+ type CreateKnowledgebaseDatasourceScheduleHttpResponse = {
776
+ data: ScheduleWithManifest;
777
+ headers: Headers;
778
+ status: 200 | 201;
779
+ };
780
+ type CreateKnowledgebaseDatasourceScheduleHttpError = {
781
+ data: ErrorResponse;
782
+ headers: Headers;
783
+ status: 400 | 403 | 404;
784
+ };
785
+ /**
786
+ * Retrieves sync history for the specified knowledgebase. Will return a `404` if no sync history exists, or if the calling user does not have access to synced datasources.
787
+ *
788
+ * @param id The id of the knowledgebase.
789
+ * @param query an object with query parameters
790
+ * @throws GetKnowledgebaseHistoriesHttpError
791
+ */
792
+ declare function getKnowledgebaseHistories(id: string, query: {
793
+ /** The number of sync histories to get. */
794
+ limit?: number;
795
+ /** Optional parameter to request the next page. */
796
+ next?: string;
797
+ /** Optional parameter to request the previous page. */
798
+ prev?: string;
799
+ /** Optional resource field name to sort on, case insensitive, eg. name. Can be prefixed with - to set descending order, defaults to ascending. */
800
+ sort?: "COMPLETED" | "-COMPLETED";
801
+ }, options?: ApiCallOptions): Promise<GetKnowledgebaseHistoriesHttpResponse>;
802
+ type GetKnowledgebaseHistoriesHttpResponse = {
803
+ data: SyncHistoryResult;
804
+ headers: Headers;
805
+ status: 200;
806
+ prev?: (options?: ApiCallOptions) => Promise<GetKnowledgebaseHistoriesHttpResponse>;
807
+ next?: (options?: ApiCallOptions) => Promise<GetKnowledgebaseHistoriesHttpResponse>;
808
+ };
809
+ type GetKnowledgebaseHistoriesHttpError = {
810
+ data: ErrorResponse;
811
+ headers: Headers;
812
+ status: 400 | 403 | 404;
813
+ };
814
+ /**
815
+ * Clears the cache for knowledgebases api requests.
816
+ */
817
+ declare function clearCache(): void;
818
+ type KnowledgebasesAPI = {
819
+ /**
820
+ * Returns a list of all knowledgebases the user has access to.
821
+ *
822
+ * @param query an object with query parameters
823
+ * @throws GetKnowledgebasesHttpError
824
+ */
825
+ getKnowledgebases: typeof getKnowledgebases;
826
+ /**
827
+ * Creates a new knowledgebase.
828
+ *
829
+ * @param body an object with the body content
830
+ * @throws CreateKnowledgebaseHttpError
831
+ */
832
+ createKnowledgebase: typeof createKnowledgebase;
833
+ /**
834
+ * Deletes a knowledgebase and all of its resources.
835
+ *
836
+ * @param id The id of the knowledgebase to delete.
837
+ * @throws DeleteKnowledgebaseHttpError
838
+ */
839
+ deleteKnowledgebase: typeof deleteKnowledgebase;
840
+ /**
841
+ * Retrieves a specific knowledgebase.
842
+ *
843
+ * @param id The id of the knowledgebase to retrieve.
844
+ * @throws GetKnowledgebaseHttpError
845
+ */
846
+ getKnowledgebase: typeof getKnowledgebase;
847
+ /**
848
+ * Updates properties of a specific knowledgebase.
849
+ *
850
+ * @param id The knowledgebase id.
851
+ * @param body an object with the body content
852
+ * @throws PatchKnowledgebaseHttpError
853
+ */
854
+ patchKnowledgebase: typeof patchKnowledgebase;
855
+ /**
856
+ * Execute search with either `SIMPLE` or `FULL` mode. SIMPLE does semantic search while FULL will also do reranking and include keyword based chunks. Use topN to control number of chunks in response, max limit is 50. Default to 5.
857
+ *
858
+ * @param id The ID of the knowledgebase
859
+ * @param body an object with the body content
860
+ * @throws SearchKnowledgebaseHttpError
861
+ */
862
+ searchKnowledgebase: typeof searchKnowledgebase;
863
+ /**
864
+ * Adds a datasource to a knowledgebase.
865
+ *
866
+ * @param id The id of the knowledgebase.
867
+ * @param body an object with the body content
868
+ * @throws CreateKnowledgebaseDatasourceHttpError
869
+ */
870
+ createKnowledgebaseDatasource: typeof createKnowledgebaseDatasource;
871
+ /**
872
+ * Deletes a specified datasource and all its resources.
873
+ *
874
+ * @param id The id of the knowledgebase the datasource belongs to.
875
+ * @param datasourceId The id of the datasource to delete.
876
+ * @throws DeleteKnowledgebaseDatasourceHttpError
877
+ */
878
+ deleteKnowledgebaseDatasource: typeof deleteKnowledgebaseDatasource;
879
+ /**
880
+ * Update a knowledgebase datasource
881
+ *
882
+ * @param id The id of a knowledgebase.
883
+ * @param datasourceId The id of the datasource to update.
884
+ * @param body an object with the body content
885
+ * @throws UpdateKnowledgebaseDatasourceHttpError
886
+ */
887
+ updateKnowledgebaseDatasource: typeof updateKnowledgebaseDatasource;
888
+ /**
889
+ * Cancels ongoing sync for a specified datasource.
890
+ *
891
+ * @param id The id of the knowledgebase the datasource belongs to.
892
+ * @param datasourceId The id of the datasource to cancel sync for.
893
+ * @throws CancelKnowledgebaseDatasourceHttpError
894
+ */
895
+ cancelKnowledgebaseDatasource: typeof cancelKnowledgebaseDatasource;
896
+ /**
897
+ * Download knowledgebase datasource reference
898
+ *
899
+ * @param id The id of the knowledgebase the datasource belongs to.
900
+ * @param datasourceId The id of the datasource to download from.
901
+ * @param body an object with the body content
902
+ * @throws DownloadKnowledgebaseDatasourceHttpError
903
+ */
904
+ downloadKnowledgebaseDatasource: typeof downloadKnowledgebaseDatasource;
905
+ /**
906
+ * Starts syncing a specified datasource to a specified knowledgebase index.
907
+ *
908
+ * @param id The id of the knowledgebase the datasource belongs to.
909
+ * @param datasourceId The id of the datasource to sync.
910
+ * @param query an object with query parameters
911
+ * @throws SyncKnowledgebaseDatasourceHttpError
912
+ */
913
+ syncKnowledgebaseDatasource: typeof syncKnowledgebaseDatasource;
914
+ /**
915
+ * Retrieves sync history for a specified datasource in a knowledgebase. Returns a `404` if there is no sync history, or if the calling user doesn't have access to the datasource.
916
+ *
917
+ * @param id The id of the knowledgebase the datasource belongs to.
918
+ * @param datasourceId The id of the datasource.
919
+ * @param query an object with query parameters
920
+ * @throws GetKnowledgebaseDatasourceHistoriesHttpError
921
+ */
922
+ getKnowledgebaseDatasourceHistories: typeof getKnowledgebaseDatasourceHistories;
923
+ /**
924
+ * @deprecated
925
+ *
926
+ * Retrieves detailed sync history for a specified datasource.
927
+ *
928
+ * @param id The id of the knowledgebase the datasource belongs to.
929
+ * @param datasourceId The id of the datasource.
930
+ * @param syncId The sync identifier.
931
+ * @throws GetKnowledgebaseDatasourceHistoryHttpError
932
+ */
933
+ getKnowledgebaseDatasourceHistory: typeof getKnowledgebaseDatasourceHistory;
934
+ /**
935
+ * Delete knowledgebase datasource schedule
936
+ *
937
+ * @param id The id of the knowledgebase the schedule belongs to.
938
+ * @param datasourceId The id of the datasource the schedule belongs to.
939
+ * @throws DeleteKnowledgebaseDatasourceScheduleHttpError
940
+ */
941
+ deleteKnowledgebaseDatasourceSchedule: typeof deleteKnowledgebaseDatasourceSchedule;
942
+ /**
943
+ * Get a knowledgebase datasource schedule
944
+ *
945
+ * @param id The id of the knowledgebase the schedule belongs to.
946
+ * @param datasourceId The id of the datasource the schedule belongs to.
947
+ * @throws GetKnowledgebaseDatasourceScheduleHttpError
948
+ */
949
+ getKnowledgebaseDatasourceSchedule: typeof getKnowledgebaseDatasourceSchedule;
950
+ /**
951
+ * Creates or updates a specified datasource schedule.
952
+ *
953
+ * @param id The id of the knowledgebase the schedule belongs to.
954
+ * @param datasourceId The id of the datasource the schedule belongs to.
955
+ * @param body an object with the body content
956
+ * @throws CreateKnowledgebaseDatasourceScheduleHttpError
957
+ */
958
+ createKnowledgebaseDatasourceSchedule: typeof createKnowledgebaseDatasourceSchedule;
959
+ /**
960
+ * Retrieves sync history for the specified knowledgebase. Will return a `404` if no sync history exists, or if the calling user does not have access to synced datasources.
961
+ *
962
+ * @param id The id of the knowledgebase.
963
+ * @param query an object with query parameters
964
+ * @throws GetKnowledgebaseHistoriesHttpError
965
+ */
966
+ getKnowledgebaseHistories: typeof getKnowledgebaseHistories;
967
+ /**
968
+ * Clears the cache for knowledgebases api requests.
969
+ */
970
+ clearCache: typeof clearCache;
971
+ };
972
+ /**
973
+ * Functions for the knowledgebases api
974
+ */
975
+ declare const knowledgebasesExport: KnowledgebasesAPI;
976
+ //#endregion
4
977
  export { CancelKnowledgebaseDatasourceHttpError, CancelKnowledgebaseDatasourceHttpResponse, Chunk, Chunking, ContentSummary, CreateDataSource, CreateKnowledgeBase, CreateKnowledgebaseDatasourceHttpError, CreateKnowledgebaseDatasourceHttpResponse, CreateKnowledgebaseDatasourceScheduleHttpError, CreateKnowledgebaseDatasourceScheduleHttpResponse, CreateKnowledgebaseHttpError, CreateKnowledgebaseHttpResponse, DataSource, DataSourceCrawlConfig, DataSourceCrawlPattern, DataSourceCrawlScope, DataSourceFileConfig, DataSourceFileCrawlScope, DataSourceSync, DataSourceSyncStatus, DeleteKnowledgebaseDatasourceHttpError, DeleteKnowledgebaseDatasourceHttpResponse, DeleteKnowledgebaseDatasourceScheduleHttpError, DeleteKnowledgebaseDatasourceScheduleHttpResponse, DeleteKnowledgebaseHttpError, DeleteKnowledgebaseHttpResponse, DocStats, DownloadFile, DownloadFileResponse, DownloadKnowledgebaseDatasourceHttpError, DownloadKnowledgebaseDatasourceHttpResponse, Duration, ErrorResponse, ErrorResponseCode, ErrorResponseCodeCopy, ErrorResponseCopy, GetKnowledgebaseDatasourceHistoriesHttpError, GetKnowledgebaseDatasourceHistoriesHttpResponse, GetKnowledgebaseDatasourceHistoryHttpError, GetKnowledgebaseDatasourceHistoryHttpResponse, GetKnowledgebaseDatasourceScheduleHttpError, GetKnowledgebaseDatasourceScheduleHttpResponse, GetKnowledgebaseHistoriesHttpError, GetKnowledgebaseHistoriesHttpResponse, GetKnowledgebaseHttpError, GetKnowledgebaseHttpResponse, GetKnowledgebasesHttpError, GetKnowledgebasesHttpResponse, JSONPatch, JSONPatchArray, KbChunkMeta, KnowledgeBase, KnowledgeBaseLight, KnowledgeBasesResult, KnowledgebasesAPI, PageLink, PageLinks, PatchKnowledgebaseHttpError, PatchKnowledgebaseHttpResponse, ResultMeta, Schedule, ScheduleCalendar, ScheduleInterval, ScheduleRange, ScheduleWithManifest, SearchKnowledgebaseHttpError, SearchKnowledgebaseHttpResponse, SearchRequest, SearchResponse, SyncHistory, SyncHistoryDetails, SyncHistoryResult, SyncKnowledgebaseDatasourceHttpError, SyncKnowledgebaseDatasourceHttpResponse, UpdateKnowledgebaseDatasourceHttpError, UpdateKnowledgebaseDatasourceHttpResponse, cancelKnowledgebaseDatasource, clearCache, createKnowledgebase, createKnowledgebaseDatasource, createKnowledgebaseDatasourceSchedule, knowledgebasesExport as default, deleteKnowledgebase, deleteKnowledgebaseDatasource, deleteKnowledgebaseDatasourceSchedule, downloadKnowledgebaseDatasource, getKnowledgebase, getKnowledgebaseDatasourceHistories, getKnowledgebaseDatasourceHistory, getKnowledgebaseDatasourceSchedule, getKnowledgebaseHistories, getKnowledgebases, patchKnowledgebase, searchKnowledgebase, syncKnowledgebaseDatasource, updateKnowledgebaseDatasource };