@wildix/wim-knowledge-base-client 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (112) hide show
  1. package/dist-cjs/KnowledgeBase.js +57 -0
  2. package/dist-cjs/KnowledgeBaseClient.js +41 -0
  3. package/dist-cjs/commands/CreateDataSourceCommand.js +21 -0
  4. package/dist-cjs/commands/CreateDocumentCommand.js +21 -0
  5. package/dist-cjs/commands/CreateKnowledgeBaseCommand.js +21 -0
  6. package/dist-cjs/commands/DeleteDataSourceCommand.js +21 -0
  7. package/dist-cjs/commands/DeleteDocumentCommand.js +21 -0
  8. package/dist-cjs/commands/DeleteKnowledgeBaseCommand.js +21 -0
  9. package/dist-cjs/commands/GetAuthorizationSessionForDataSourceCommand.js +21 -0
  10. package/dist-cjs/commands/GetDataSourceCommand.js +21 -0
  11. package/dist-cjs/commands/GetDocumentCommand.js +21 -0
  12. package/dist-cjs/commands/GetDocumentPresignedDownloadUrlCommand.js +21 -0
  13. package/dist-cjs/commands/GetDocumentPresignedUploadUrlCommand.js +21 -0
  14. package/dist-cjs/commands/GetKnowledgeBaseCommand.js +21 -0
  15. package/dist-cjs/commands/GetSyncLogsCommand.js +21 -0
  16. package/dist-cjs/commands/GetSyncStatusCommand.js +21 -0
  17. package/dist-cjs/commands/ListDataSourcesCommand.js +21 -0
  18. package/dist-cjs/commands/ListDocumentsCommand.js +21 -0
  19. package/dist-cjs/commands/ListKnowledgeBasesCommand.js +21 -0
  20. package/dist-cjs/commands/QueryKnowledgeBaseCommand.js +21 -0
  21. package/dist-cjs/commands/SearchKnowledgeBaseCommand.js +21 -0
  22. package/dist-cjs/commands/SyncDataSourceCommand.js +21 -0
  23. package/dist-cjs/commands/UpdateDataSourceCommand.js +21 -0
  24. package/dist-cjs/commands/UpdateDocumentCommand.js +21 -0
  25. package/dist-cjs/commands/UpdateKnowledgeBaseCommand.js +21 -0
  26. package/dist-cjs/commands/index.js +26 -0
  27. package/dist-cjs/extensionConfiguration.js +2 -0
  28. package/dist-cjs/index.js +10 -0
  29. package/dist-cjs/models/KnowledgeBaseServiceException.js +12 -0
  30. package/dist-cjs/models/index.js +4 -0
  31. package/dist-cjs/models/models_0.js +132 -0
  32. package/dist-cjs/protocols/Aws_restJson1.js +936 -0
  33. package/dist-cjs/runtimeConfig.browser.js +32 -0
  34. package/dist-cjs/runtimeConfig.js +37 -0
  35. package/dist-cjs/runtimeConfig.native.js +15 -0
  36. package/dist-cjs/runtimeConfig.shared.js +21 -0
  37. package/dist-cjs/runtimeExtensions.js +11 -0
  38. package/dist-es/KnowledgeBase.js +53 -0
  39. package/dist-es/KnowledgeBaseClient.js +37 -0
  40. package/dist-es/commands/CreateDataSourceCommand.js +17 -0
  41. package/dist-es/commands/CreateDocumentCommand.js +17 -0
  42. package/dist-es/commands/CreateKnowledgeBaseCommand.js +17 -0
  43. package/dist-es/commands/DeleteDataSourceCommand.js +17 -0
  44. package/dist-es/commands/DeleteDocumentCommand.js +17 -0
  45. package/dist-es/commands/DeleteKnowledgeBaseCommand.js +17 -0
  46. package/dist-es/commands/GetAuthorizationSessionForDataSourceCommand.js +17 -0
  47. package/dist-es/commands/GetDataSourceCommand.js +17 -0
  48. package/dist-es/commands/GetDocumentCommand.js +17 -0
  49. package/dist-es/commands/GetDocumentPresignedDownloadUrlCommand.js +17 -0
  50. package/dist-es/commands/GetDocumentPresignedUploadUrlCommand.js +17 -0
  51. package/dist-es/commands/GetKnowledgeBaseCommand.js +17 -0
  52. package/dist-es/commands/GetSyncLogsCommand.js +17 -0
  53. package/dist-es/commands/GetSyncStatusCommand.js +17 -0
  54. package/dist-es/commands/ListDataSourcesCommand.js +17 -0
  55. package/dist-es/commands/ListDocumentsCommand.js +17 -0
  56. package/dist-es/commands/ListKnowledgeBasesCommand.js +17 -0
  57. package/dist-es/commands/QueryKnowledgeBaseCommand.js +17 -0
  58. package/dist-es/commands/SearchKnowledgeBaseCommand.js +17 -0
  59. package/dist-es/commands/SyncDataSourceCommand.js +17 -0
  60. package/dist-es/commands/UpdateDataSourceCommand.js +17 -0
  61. package/dist-es/commands/UpdateDocumentCommand.js +17 -0
  62. package/dist-es/commands/UpdateKnowledgeBaseCommand.js +17 -0
  63. package/dist-es/commands/index.js +23 -0
  64. package/dist-es/extensionConfiguration.js +1 -0
  65. package/dist-es/index.js +5 -0
  66. package/dist-es/models/KnowledgeBaseServiceException.js +8 -0
  67. package/dist-es/models/index.js +1 -0
  68. package/dist-es/models/models_0.js +123 -0
  69. package/dist-es/protocols/Aws_restJson1.js +887 -0
  70. package/dist-es/runtimeConfig.browser.js +27 -0
  71. package/dist-es/runtimeConfig.js +32 -0
  72. package/dist-es/runtimeConfig.native.js +11 -0
  73. package/dist-es/runtimeConfig.shared.js +17 -0
  74. package/dist-es/runtimeExtensions.js +7 -0
  75. package/dist-types/KnowledgeBase.d.ts +172 -0
  76. package/dist-types/KnowledgeBaseClient.d.ts +166 -0
  77. package/dist-types/commands/CreateDataSourceCommand.d.ts +167 -0
  78. package/dist-types/commands/CreateDocumentCommand.d.ts +107 -0
  79. package/dist-types/commands/CreateKnowledgeBaseCommand.d.ts +99 -0
  80. package/dist-types/commands/DeleteDataSourceCommand.d.ts +83 -0
  81. package/dist-types/commands/DeleteDocumentCommand.d.ts +84 -0
  82. package/dist-types/commands/DeleteKnowledgeBaseCommand.d.ts +83 -0
  83. package/dist-types/commands/GetAuthorizationSessionForDataSourceCommand.d.ts +85 -0
  84. package/dist-types/commands/GetDataSourceCommand.d.ts +131 -0
  85. package/dist-types/commands/GetDocumentCommand.d.ts +102 -0
  86. package/dist-types/commands/GetDocumentPresignedDownloadUrlCommand.d.ts +87 -0
  87. package/dist-types/commands/GetDocumentPresignedUploadUrlCommand.d.ts +86 -0
  88. package/dist-types/commands/GetKnowledgeBaseCommand.d.ts +95 -0
  89. package/dist-types/commands/GetSyncLogsCommand.d.ts +91 -0
  90. package/dist-types/commands/GetSyncStatusCommand.d.ts +87 -0
  91. package/dist-types/commands/ListDataSourcesCommand.d.ts +132 -0
  92. package/dist-types/commands/ListDocumentsCommand.d.ts +103 -0
  93. package/dist-types/commands/ListKnowledgeBasesCommand.d.ts +96 -0
  94. package/dist-types/commands/QueryKnowledgeBaseCommand.d.ts +98 -0
  95. package/dist-types/commands/SearchKnowledgeBaseCommand.d.ts +99 -0
  96. package/dist-types/commands/SyncDataSourceCommand.d.ts +84 -0
  97. package/dist-types/commands/UpdateDataSourceCommand.d.ts +168 -0
  98. package/dist-types/commands/UpdateDocumentCommand.d.ts +108 -0
  99. package/dist-types/commands/UpdateKnowledgeBaseCommand.d.ts +100 -0
  100. package/dist-types/commands/index.d.ts +23 -0
  101. package/dist-types/extensionConfiguration.d.ts +7 -0
  102. package/dist-types/index.d.ts +7 -0
  103. package/dist-types/models/KnowledgeBaseServiceException.d.ts +14 -0
  104. package/dist-types/models/index.d.ts +1 -0
  105. package/dist-types/models/models_0.d.ts +981 -0
  106. package/dist-types/protocols/Aws_restJson1.d.ts +209 -0
  107. package/dist-types/runtimeConfig.browser.d.ts +31 -0
  108. package/dist-types/runtimeConfig.d.ts +31 -0
  109. package/dist-types/runtimeConfig.native.d.ts +30 -0
  110. package/dist-types/runtimeConfig.shared.d.ts +15 -0
  111. package/dist-types/runtimeExtensions.d.ts +17 -0
  112. package/package.json +83 -0
@@ -0,0 +1,981 @@
1
+ import { KnowledgeBaseServiceException as __BaseException } from "./KnowledgeBaseServiceException";
2
+ import { ExceptionOptionType as __ExceptionOptionType } from "@smithy/smithy-client";
3
+ import { DocumentType as __DocumentType } from "@smithy/types";
4
+ /**
5
+ * @public
6
+ */
7
+ export declare class ValidationException extends __BaseException {
8
+ readonly name: "ValidationException";
9
+ readonly $fault: "client";
10
+ /**
11
+ * @internal
12
+ */
13
+ constructor(opts: __ExceptionOptionType<ValidationException, __BaseException>);
14
+ }
15
+ /**
16
+ * @public
17
+ */
18
+ export declare class ForbiddenException extends __BaseException {
19
+ readonly name: "ForbiddenException";
20
+ readonly $fault: "client";
21
+ /**
22
+ * @internal
23
+ */
24
+ constructor(opts: __ExceptionOptionType<ForbiddenException, __BaseException>);
25
+ }
26
+ /**
27
+ * @public
28
+ */
29
+ export declare class UnauthorizedException extends __BaseException {
30
+ readonly name: "UnauthorizedException";
31
+ readonly $fault: "client";
32
+ /**
33
+ * @internal
34
+ */
35
+ constructor(opts: __ExceptionOptionType<UnauthorizedException, __BaseException>);
36
+ }
37
+ /**
38
+ * @public
39
+ */
40
+ export interface ConfluencePagesConfig {
41
+ enabled: (string)[];
42
+ disabled: (string)[];
43
+ }
44
+ /**
45
+ * @public
46
+ */
47
+ export interface ConfluenceConfig {
48
+ /**
49
+ * The URL of the Confluence instance. Example: https://your-confluence-domain.atlassian.net
50
+ * @public
51
+ */
52
+ url: string;
53
+ /**
54
+ * The username or email of the Confluence instance.
55
+ * @public
56
+ */
57
+ username: string;
58
+ /**
59
+ * The API token of the Confluence instance.
60
+ * @public
61
+ */
62
+ apiKey: string;
63
+ /**
64
+ * The space ID of the Confluence instance.
65
+ * @public
66
+ */
67
+ spaceId: string;
68
+ pages?: ConfluencePagesConfig | undefined;
69
+ }
70
+ /**
71
+ * @public
72
+ */
73
+ export interface UserFilesConfig {
74
+ allowedExtensions: (string)[];
75
+ }
76
+ /**
77
+ * @public
78
+ */
79
+ export interface GDriveFoldersConfig {
80
+ enabled: (string)[];
81
+ disabled: (string)[];
82
+ }
83
+ /**
84
+ * @public
85
+ */
86
+ export interface GDriveConfig {
87
+ /**
88
+ * The Nango connection ID of the GDrive instance.
89
+ * @public
90
+ */
91
+ nangoConnectionId: string;
92
+ folders: GDriveFoldersConfig;
93
+ }
94
+ /**
95
+ * @public
96
+ */
97
+ export type DataSourceConfig = DataSourceConfig.ConfluenceMember | DataSourceConfig.FilesMember | DataSourceConfig.GdriveMember | DataSourceConfig.$UnknownMember;
98
+ /**
99
+ * @public
100
+ */
101
+ export declare namespace DataSourceConfig {
102
+ interface ConfluenceMember {
103
+ confluence: ConfluenceConfig;
104
+ gdrive?: never;
105
+ files?: never;
106
+ $unknown?: never;
107
+ }
108
+ interface GdriveMember {
109
+ confluence?: never;
110
+ gdrive: GDriveConfig;
111
+ files?: never;
112
+ $unknown?: never;
113
+ }
114
+ interface FilesMember {
115
+ confluence?: never;
116
+ gdrive?: never;
117
+ files: UserFilesConfig;
118
+ $unknown?: never;
119
+ }
120
+ /**
121
+ * @public
122
+ */
123
+ interface $UnknownMember {
124
+ confluence?: never;
125
+ gdrive?: never;
126
+ files?: never;
127
+ $unknown: [string, any];
128
+ }
129
+ interface Visitor<T> {
130
+ confluence: (value: ConfluenceConfig) => T;
131
+ gdrive: (value: GDriveConfig) => T;
132
+ files: (value: UserFilesConfig) => T;
133
+ _: (name: string, value: any) => T;
134
+ }
135
+ const visit: <T>(value: DataSourceConfig, visitor: Visitor<T>) => T;
136
+ }
137
+ /**
138
+ * @public
139
+ * @enum
140
+ */
141
+ export declare const DataSourceType: {
142
+ readonly CONFLUENCE: "confluence";
143
+ readonly FILES: "files";
144
+ readonly GDRIVE: "gdrive";
145
+ readonly PROXY: "proxy";
146
+ };
147
+ /**
148
+ * @public
149
+ */
150
+ export type DataSourceType = typeof DataSourceType[keyof typeof DataSourceType];
151
+ /**
152
+ * @public
153
+ */
154
+ export interface CreateDataSourceInput {
155
+ /**
156
+ * The name of the data source. Example: Product Confluence
157
+ * @public
158
+ */
159
+ name: string;
160
+ /**
161
+ * The description of the data source. Example: This data source contains information about the products and services we offer in Confluence.
162
+ * @public
163
+ */
164
+ description?: string | undefined;
165
+ /**
166
+ * The type of the data source. Example: confluence
167
+ * @public
168
+ */
169
+ type: DataSourceType;
170
+ config: DataSourceConfig;
171
+ /**
172
+ * Whether the data source is enabled. Example: true
173
+ * @public
174
+ */
175
+ enabled: boolean;
176
+ /**
177
+ * The sync schedule of the data source. Example: 0 *\/6 * * * (every 6 hours)
178
+ * @public
179
+ */
180
+ syncSchedule?: string | undefined;
181
+ /**
182
+ * The unique identifier of the tenant when a service token is used.
183
+ * @public
184
+ */
185
+ companyId?: string | undefined;
186
+ }
187
+ /**
188
+ * @public
189
+ * @enum
190
+ */
191
+ export declare const SyncDataSourceMode: {
192
+ readonly FULL: "full";
193
+ readonly INCREMENTAL: "incremental";
194
+ readonly UNKNOWN: "unknown";
195
+ };
196
+ /**
197
+ * @public
198
+ */
199
+ export type SyncDataSourceMode = typeof SyncDataSourceMode[keyof typeof SyncDataSourceMode];
200
+ /**
201
+ * @public
202
+ * @enum
203
+ */
204
+ export declare const SyncDataSourceStatus: {
205
+ readonly FAILED: "failed";
206
+ readonly IDLE: "idle";
207
+ readonly RUNNING: "running";
208
+ readonly SUCCESS: "success";
209
+ };
210
+ /**
211
+ * @public
212
+ */
213
+ export type SyncDataSourceStatus = typeof SyncDataSourceStatus[keyof typeof SyncDataSourceStatus];
214
+ /**
215
+ * @public
216
+ */
217
+ export interface DataSourceItem {
218
+ /**
219
+ * The name of the data source. Example: Product Confluence
220
+ * @public
221
+ */
222
+ name: string;
223
+ /**
224
+ * The description of the data source. Example: This data source contains information about the products and services we offer in Confluence.
225
+ * @public
226
+ */
227
+ description?: string | undefined;
228
+ /**
229
+ * The type of the data source. Example: confluence
230
+ * @public
231
+ */
232
+ type: DataSourceType;
233
+ config: DataSourceConfig;
234
+ /**
235
+ * Whether the data source is enabled. Example: true
236
+ * @public
237
+ */
238
+ enabled: boolean;
239
+ /**
240
+ * The sync schedule of the data source. Example: 0 *\/6 * * * (every 6 hours)
241
+ * @public
242
+ */
243
+ syncSchedule?: string | undefined;
244
+ id: string;
245
+ companyId: string;
246
+ createdAt: string;
247
+ updatedAt: string;
248
+ syncStatus: SyncDataSourceStatus;
249
+ /**
250
+ * The last time the data source was synced. Example: 2021-01-01T00:00:00Z
251
+ * @public
252
+ */
253
+ lastSyncedAt?: string | undefined;
254
+ /**
255
+ * The mode of the last sync. Example: full or incremental
256
+ * @public
257
+ */
258
+ lastSyncMode?: SyncDataSourceMode | undefined;
259
+ /**
260
+ * The error message of the last sync. Example: Error syncing data source
261
+ * @public
262
+ */
263
+ lastSyncErrorMessage?: string | undefined;
264
+ }
265
+ /**
266
+ * @public
267
+ */
268
+ export interface CreateDataSourceOutput {
269
+ dataSource: DataSourceItem;
270
+ }
271
+ /**
272
+ * @public
273
+ */
274
+ export declare class DataSourceNotFoundException extends __BaseException {
275
+ readonly name: "DataSourceNotFoundException";
276
+ readonly $fault: "client";
277
+ /**
278
+ * @internal
279
+ */
280
+ constructor(opts: __ExceptionOptionType<DataSourceNotFoundException, __BaseException>);
281
+ }
282
+ /**
283
+ * @public
284
+ */
285
+ export declare class DocumentNotFoundException extends __BaseException {
286
+ readonly name: "DocumentNotFoundException";
287
+ readonly $fault: "client";
288
+ /**
289
+ * @internal
290
+ */
291
+ constructor(opts: __ExceptionOptionType<DocumentNotFoundException, __BaseException>);
292
+ }
293
+ /**
294
+ * @public
295
+ */
296
+ export declare class KnowledgeBaseNotFoundException extends __BaseException {
297
+ readonly name: "KnowledgeBaseNotFoundException";
298
+ readonly $fault: "client";
299
+ /**
300
+ * @internal
301
+ */
302
+ constructor(opts: __ExceptionOptionType<KnowledgeBaseNotFoundException, __BaseException>);
303
+ }
304
+ /**
305
+ * @public
306
+ */
307
+ export interface CreateDocumentInput {
308
+ /**
309
+ * The title of the document. Example: Product Knowledge Base
310
+ * @public
311
+ */
312
+ title: string;
313
+ /**
314
+ * The URL of the document. Example: https://www.example.com/product-knowledge-base
315
+ * @public
316
+ */
317
+ url?: string | undefined;
318
+ /**
319
+ * The content of the document. Example: This document contains information about the products and services we offer.
320
+ * @public
321
+ */
322
+ content?: string | undefined;
323
+ /**
324
+ * The format of the original document. Example: pdf, docx, etc.
325
+ * @public
326
+ */
327
+ originalFormat: string;
328
+ /**
329
+ * The name/ID of the original document. Example: product-knowledge-base.pdf
330
+ * @public
331
+ */
332
+ originalName: string;
333
+ /**
334
+ * The original ID of the document. Example: confluence-page-1234567890
335
+ * @public
336
+ */
337
+ originalId?: string | undefined;
338
+ /**
339
+ * The unique identifier of the tenant when a service token is used.
340
+ * @public
341
+ */
342
+ companyId?: string | undefined;
343
+ dataSourceId: string;
344
+ }
345
+ /**
346
+ * @public
347
+ * @enum
348
+ */
349
+ export declare const DocumentStatus: {
350
+ readonly COMPLETED: "completed";
351
+ readonly FAILED: "failed";
352
+ readonly PENDING: "pending";
353
+ readonly PROCESSING: "processing";
354
+ };
355
+ /**
356
+ * @public
357
+ */
358
+ export type DocumentStatus = typeof DocumentStatus[keyof typeof DocumentStatus];
359
+ /**
360
+ * @public
361
+ */
362
+ export interface DocumentItem {
363
+ /**
364
+ * The title of the document. Example: Product Knowledge Base
365
+ * @public
366
+ */
367
+ title: string;
368
+ /**
369
+ * The URL of the document. Example: https://www.example.com/product-knowledge-base
370
+ * @public
371
+ */
372
+ url?: string | undefined;
373
+ /**
374
+ * The content of the document. Example: This document contains information about the products and services we offer.
375
+ * @public
376
+ */
377
+ content?: string | undefined;
378
+ /**
379
+ * The format of the original document. Example: pdf, docx, etc.
380
+ * @public
381
+ */
382
+ originalFormat: string;
383
+ /**
384
+ * The name/ID of the original document. Example: product-knowledge-base.pdf
385
+ * @public
386
+ */
387
+ originalName: string;
388
+ /**
389
+ * The original ID of the document. Example: confluence-page-1234567890
390
+ * @public
391
+ */
392
+ originalId?: string | undefined;
393
+ id: string;
394
+ companyId: string;
395
+ dataSourceId: string;
396
+ s3OriginalKey?: string | undefined;
397
+ s3MarkdownKey?: string | undefined;
398
+ createdAt: string;
399
+ updatedAt: string;
400
+ status: DocumentStatus;
401
+ errorMessage?: string | undefined;
402
+ }
403
+ /**
404
+ * @public
405
+ */
406
+ export interface CreateDocumentOutput {
407
+ document: DocumentItem;
408
+ }
409
+ /**
410
+ * @public
411
+ */
412
+ export interface CreateKnowledgeBaseInput {
413
+ /**
414
+ * The name of the knowledge base. Example: Product Knowledge Base
415
+ * @public
416
+ */
417
+ name: string;
418
+ /**
419
+ * The description of the knowledge base. Example: This knowledge base contains information about the products and services we offer.
420
+ * @public
421
+ */
422
+ description?: string | undefined;
423
+ dataSources: (string)[];
424
+ /**
425
+ * The unique identifier of the tenant when a service token is used.
426
+ * @public
427
+ */
428
+ companyId?: string | undefined;
429
+ }
430
+ /**
431
+ * @public
432
+ */
433
+ export interface KnowledgeBaseItem {
434
+ /**
435
+ * The name of the knowledge base. Example: Product Knowledge Base
436
+ * @public
437
+ */
438
+ name: string;
439
+ /**
440
+ * The description of the knowledge base. Example: This knowledge base contains information about the products and services we offer.
441
+ * @public
442
+ */
443
+ description?: string | undefined;
444
+ dataSources: (string)[];
445
+ id: string;
446
+ companyId: string;
447
+ createdAt: string;
448
+ updatedAt: string;
449
+ }
450
+ /**
451
+ * @public
452
+ */
453
+ export interface CreateKnowledgeBaseOutput {
454
+ knowledgeBase: KnowledgeBaseItem;
455
+ }
456
+ /**
457
+ * @public
458
+ */
459
+ export interface DeleteDataSourceInput {
460
+ /**
461
+ * The unique identifier of the tenant when a service token is used.
462
+ * @public
463
+ */
464
+ companyId?: string | undefined;
465
+ dataSourceId: string;
466
+ }
467
+ /**
468
+ * @public
469
+ */
470
+ export interface DeleteDataSourceOutput {
471
+ }
472
+ /**
473
+ * @public
474
+ */
475
+ export interface DeleteDocumentInput {
476
+ /**
477
+ * The unique identifier of the tenant when a service token is used.
478
+ * @public
479
+ */
480
+ companyId?: string | undefined;
481
+ dataSourceId: string;
482
+ documentId: string;
483
+ }
484
+ /**
485
+ * @public
486
+ */
487
+ export interface DeleteDocumentOutput {
488
+ }
489
+ /**
490
+ * @public
491
+ */
492
+ export interface DeleteKnowledgeBaseInput {
493
+ /**
494
+ * The unique identifier of the tenant when a service token is used.
495
+ * @public
496
+ */
497
+ companyId?: string | undefined;
498
+ knowledgeBaseId: string;
499
+ }
500
+ /**
501
+ * @public
502
+ */
503
+ export interface DeleteKnowledgeBaseOutput {
504
+ }
505
+ /**
506
+ * @public
507
+ * @enum
508
+ */
509
+ export declare const DownloadDocumentType: {
510
+ readonly MARKDOWN: "markdown";
511
+ readonly ORIGINAL: "original";
512
+ };
513
+ /**
514
+ * @public
515
+ */
516
+ export type DownloadDocumentType = typeof DownloadDocumentType[keyof typeof DownloadDocumentType];
517
+ /**
518
+ * @public
519
+ */
520
+ export interface GetAuthorizationSessionForDataSourceInput {
521
+ /**
522
+ * The unique identifier of the tenant when a service token is used.
523
+ * @public
524
+ */
525
+ companyId?: string | undefined;
526
+ dataSourceId: string;
527
+ }
528
+ /**
529
+ * @public
530
+ */
531
+ export interface GetAuthorizationSessionForDataSourceOutput {
532
+ authorizationSession: string;
533
+ }
534
+ /**
535
+ * @public
536
+ */
537
+ export interface GetDataSourceInput {
538
+ /**
539
+ * The unique identifier of the tenant when a service token is used.
540
+ * @public
541
+ */
542
+ companyId?: string | undefined;
543
+ dataSourceId: string;
544
+ }
545
+ /**
546
+ * @public
547
+ */
548
+ export interface GetDataSourceOutput {
549
+ dataSource: DataSourceItem;
550
+ }
551
+ /**
552
+ * @public
553
+ */
554
+ export interface GetDocumentInput {
555
+ /**
556
+ * The unique identifier of the tenant when a service token is used.
557
+ * @public
558
+ */
559
+ companyId?: string | undefined;
560
+ dataSourceId: string;
561
+ documentId: string;
562
+ }
563
+ /**
564
+ * @public
565
+ */
566
+ export interface GetDocumentOutput {
567
+ document: DocumentItem;
568
+ }
569
+ /**
570
+ * @public
571
+ */
572
+ export interface GetDocumentPresignedDownloadUrlInput {
573
+ /**
574
+ * The unique identifier of the tenant when a service token is used.
575
+ * @public
576
+ */
577
+ companyId?: string | undefined;
578
+ dataSourceId: string;
579
+ documentId: string;
580
+ documentType?: DownloadDocumentType | undefined;
581
+ }
582
+ /**
583
+ * @public
584
+ */
585
+ export interface GetDocumentPresignedDownloadUrlOutput {
586
+ presignedDownloadUrl: string;
587
+ }
588
+ /**
589
+ * @public
590
+ */
591
+ export interface GetDocumentPresignedUploadUrlInput {
592
+ /**
593
+ * The unique identifier of the tenant when a service token is used.
594
+ * @public
595
+ */
596
+ companyId?: string | undefined;
597
+ dataSourceId: string;
598
+ documentId: string;
599
+ }
600
+ /**
601
+ * @public
602
+ */
603
+ export interface GetDocumentPresignedUploadUrlOutput {
604
+ presignedUploadUrl: string;
605
+ }
606
+ /**
607
+ * @public
608
+ */
609
+ export interface GetKnowledgeBaseInput {
610
+ /**
611
+ * The unique identifier of the tenant when a service token is used.
612
+ * @public
613
+ */
614
+ companyId?: string | undefined;
615
+ knowledgeBaseId: string;
616
+ }
617
+ /**
618
+ * @public
619
+ */
620
+ export interface GetKnowledgeBaseOutput {
621
+ knowledgeBase: KnowledgeBaseItem;
622
+ }
623
+ /**
624
+ * @public
625
+ */
626
+ export interface GetSyncLogsInput {
627
+ /**
628
+ * The unique identifier of the tenant when a service token is used.
629
+ * @public
630
+ */
631
+ companyId?: string | undefined;
632
+ dataSourceId: string;
633
+ }
634
+ /**
635
+ * @public
636
+ * @enum
637
+ */
638
+ export declare const SyncLogLevel: {
639
+ readonly DEBUG: "debug";
640
+ readonly ERROR: "error";
641
+ readonly INFO: "info";
642
+ readonly WARN: "warn";
643
+ };
644
+ /**
645
+ * @public
646
+ */
647
+ export type SyncLogLevel = typeof SyncLogLevel[keyof typeof SyncLogLevel];
648
+ /**
649
+ * @public
650
+ */
651
+ export interface SyncLogItem {
652
+ timestamp: string;
653
+ level: SyncLogLevel;
654
+ message: string;
655
+ }
656
+ /**
657
+ * @public
658
+ */
659
+ export interface GetSyncLogsOutput {
660
+ logs: (SyncLogItem)[];
661
+ }
662
+ /**
663
+ * @public
664
+ */
665
+ export interface GetSyncStatusInput {
666
+ /**
667
+ * The unique identifier of the tenant when a service token is used.
668
+ * @public
669
+ */
670
+ companyId?: string | undefined;
671
+ dataSourceId: string;
672
+ }
673
+ /**
674
+ * @public
675
+ */
676
+ export interface GetSyncStatusOutput {
677
+ syncStatus: SyncDataSourceStatus;
678
+ /**
679
+ * The progress of the sync. Example: 55
680
+ * @public
681
+ */
682
+ progress?: number | undefined;
683
+ /**
684
+ * The error message of the sync. Example: Error syncing data source
685
+ * @public
686
+ */
687
+ syncErrorMessage?: string | undefined;
688
+ }
689
+ /**
690
+ * @public
691
+ */
692
+ export interface ListDataSourcesInput {
693
+ /**
694
+ * The unique identifier of the tenant when a service token is used.
695
+ * @public
696
+ */
697
+ companyId?: string | undefined;
698
+ }
699
+ /**
700
+ * @public
701
+ */
702
+ export interface ListDataSourcesOutput {
703
+ dataSources: (DataSourceItem)[];
704
+ }
705
+ /**
706
+ * @public
707
+ */
708
+ export interface ListDocumentsInput {
709
+ /**
710
+ * The unique identifier of the tenant when a service token is used.
711
+ * @public
712
+ */
713
+ companyId?: string | undefined;
714
+ dataSourceId: string;
715
+ }
716
+ /**
717
+ * @public
718
+ */
719
+ export interface ListDocumentsOutput {
720
+ documents: (DocumentItem)[];
721
+ }
722
+ /**
723
+ * @public
724
+ */
725
+ export interface ListKnowledgeBasesInput {
726
+ /**
727
+ * The unique identifier of the tenant when a service token is used.
728
+ * @public
729
+ */
730
+ companyId?: string | undefined;
731
+ }
732
+ /**
733
+ * @public
734
+ */
735
+ export interface ListKnowledgeBasesOutput {
736
+ knowledgeBases: (KnowledgeBaseItem)[];
737
+ }
738
+ /**
739
+ * @public
740
+ */
741
+ export interface LlmConfig {
742
+ /**
743
+ * The LLM provider to use for the answer. Example: openai, anthropic, google, etc.
744
+ * @public
745
+ */
746
+ provider: string;
747
+ /**
748
+ * The model to use for the answer. Example: gpt-4o, gpt-4o-mini, etc.
749
+ * @public
750
+ */
751
+ model: string;
752
+ /**
753
+ * The temperature to use for the answer. Example: 0.5
754
+ * @public
755
+ */
756
+ temperature?: number | undefined;
757
+ /**
758
+ * The system prompt to use for the answer. Example: You are a helpful assistant that can answer questions about the knowledge base.
759
+ * @public
760
+ */
761
+ systemPrompt?: string | undefined;
762
+ }
763
+ /**
764
+ * @public
765
+ * @enum
766
+ */
767
+ export declare const SearchStrategy: {
768
+ readonly BM25: "bm25";
769
+ readonly HYBRID: "hybrid";
770
+ readonly VECTOR: "vector";
771
+ };
772
+ /**
773
+ * @public
774
+ */
775
+ export type SearchStrategy = typeof SearchStrategy[keyof typeof SearchStrategy];
776
+ /**
777
+ * @public
778
+ */
779
+ export interface SearchConfig {
780
+ /**
781
+ * The number of results to return. Example: 10
782
+ * @public
783
+ */
784
+ topK?: number | undefined;
785
+ /**
786
+ * The threshold for the results. Example: 0.5
787
+ * @public
788
+ */
789
+ threshold?: number | undefined;
790
+ /**
791
+ * The search strategy to use. Example: hybrid
792
+ * @public
793
+ */
794
+ searchStrategy?: SearchStrategy | undefined;
795
+ }
796
+ /**
797
+ * @public
798
+ */
799
+ export interface QueryKnowledgeBaseInput {
800
+ /**
801
+ * The unique identifier of the tenant when a service token is used.
802
+ * @public
803
+ */
804
+ companyId?: string | undefined;
805
+ knowledgeBaseId: string;
806
+ query: string;
807
+ searchConfig?: SearchConfig | undefined;
808
+ llmConfig?: LlmConfig | undefined;
809
+ }
810
+ /**
811
+ * @public
812
+ */
813
+ export interface QueryKnowledgeBaseOutput {
814
+ result: string;
815
+ metadata: __DocumentType;
816
+ }
817
+ /**
818
+ * @public
819
+ */
820
+ export interface SearchKnowledgeBaseInput {
821
+ /**
822
+ * The unique identifier of the tenant when a service token is used.
823
+ * @public
824
+ */
825
+ companyId?: string | undefined;
826
+ knowledgeBaseId: string;
827
+ query: string;
828
+ searchConfig?: SearchConfig | undefined;
829
+ }
830
+ /**
831
+ * @public
832
+ */
833
+ export interface SearchKnowledgeBaseResult {
834
+ documentId: string;
835
+ score: number;
836
+ source: string;
837
+ content: string;
838
+ url: string;
839
+ }
840
+ /**
841
+ * @public
842
+ */
843
+ export interface SearchKnowledgeBaseOutput {
844
+ results: (SearchKnowledgeBaseResult)[];
845
+ }
846
+ /**
847
+ * @public
848
+ */
849
+ export interface SyncDataSourceInput {
850
+ /**
851
+ * The unique identifier of the tenant when a service token is used.
852
+ * @public
853
+ */
854
+ companyId?: string | undefined;
855
+ dataSourceId: string;
856
+ syncType: SyncDataSourceMode;
857
+ }
858
+ /**
859
+ * @public
860
+ */
861
+ export interface SyncDataSourceOutput {
862
+ }
863
+ /**
864
+ * @public
865
+ */
866
+ export interface UpdateDataSourceInput {
867
+ /**
868
+ * The name of the data source. Example: Product Confluence
869
+ * @public
870
+ */
871
+ name: string;
872
+ /**
873
+ * The description of the data source. Example: This data source contains information about the products and services we offer in Confluence.
874
+ * @public
875
+ */
876
+ description?: string | undefined;
877
+ /**
878
+ * The type of the data source. Example: confluence
879
+ * @public
880
+ */
881
+ type: DataSourceType;
882
+ config: DataSourceConfig;
883
+ /**
884
+ * Whether the data source is enabled. Example: true
885
+ * @public
886
+ */
887
+ enabled: boolean;
888
+ /**
889
+ * The sync schedule of the data source. Example: 0 *\/6 * * * (every 6 hours)
890
+ * @public
891
+ */
892
+ syncSchedule?: string | undefined;
893
+ /**
894
+ * The unique identifier of the tenant when a service token is used.
895
+ * @public
896
+ */
897
+ companyId?: string | undefined;
898
+ dataSourceId: string;
899
+ }
900
+ /**
901
+ * @public
902
+ */
903
+ export interface UpdateDataSourceOutput {
904
+ dataSource: DataSourceItem;
905
+ }
906
+ /**
907
+ * @public
908
+ */
909
+ export interface UpdateDocumentInput {
910
+ /**
911
+ * The title of the document. Example: Product Knowledge Base
912
+ * @public
913
+ */
914
+ title: string;
915
+ /**
916
+ * The URL of the document. Example: https://www.example.com/product-knowledge-base
917
+ * @public
918
+ */
919
+ url?: string | undefined;
920
+ /**
921
+ * The content of the document. Example: This document contains information about the products and services we offer.
922
+ * @public
923
+ */
924
+ content?: string | undefined;
925
+ /**
926
+ * The format of the original document. Example: pdf, docx, etc.
927
+ * @public
928
+ */
929
+ originalFormat: string;
930
+ /**
931
+ * The name/ID of the original document. Example: product-knowledge-base.pdf
932
+ * @public
933
+ */
934
+ originalName: string;
935
+ /**
936
+ * The original ID of the document. Example: confluence-page-1234567890
937
+ * @public
938
+ */
939
+ originalId?: string | undefined;
940
+ /**
941
+ * The unique identifier of the tenant when a service token is used.
942
+ * @public
943
+ */
944
+ companyId?: string | undefined;
945
+ dataSourceId: string;
946
+ documentId: string;
947
+ }
948
+ /**
949
+ * @public
950
+ */
951
+ export interface UpdateDocumentOutput {
952
+ document: DocumentItem;
953
+ }
954
+ /**
955
+ * @public
956
+ */
957
+ export interface UpdateKnowledgeBaseInput {
958
+ /**
959
+ * The name of the knowledge base. Example: Product Knowledge Base
960
+ * @public
961
+ */
962
+ name: string;
963
+ /**
964
+ * The description of the knowledge base. Example: This knowledge base contains information about the products and services we offer.
965
+ * @public
966
+ */
967
+ description?: string | undefined;
968
+ dataSources: (string)[];
969
+ /**
970
+ * The unique identifier of the tenant when a service token is used.
971
+ * @public
972
+ */
973
+ companyId?: string | undefined;
974
+ knowledgeBaseId: string;
975
+ }
976
+ /**
977
+ * @public
978
+ */
979
+ export interface UpdateKnowledgeBaseOutput {
980
+ knowledgeBase: KnowledgeBaseItem;
981
+ }