@wildix/wim-knowledge-base-client 0.0.37 → 0.0.39
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.
- package/dist-cjs/protocols/Aws_restJson1.js +5 -0
- package/dist-es/protocols/Aws_restJson1.js +5 -0
- package/dist-types/commands/CreateDocumentCommand.d.ts +1 -0
- package/dist-types/commands/GetDocumentPresignedUploadUrlCommand.d.ts +1 -1
- package/dist-types/commands/QueryKnowledgeBaseCommand.d.ts +1 -0
- package/dist-types/commands/SearchKnowledgeBaseCommand.d.ts +1 -0
- package/dist-types/models/models_0.d.ts +21 -6
- package/package.json +1 -1
|
@@ -96,6 +96,7 @@ const se_CreateDocumentCommand = async (input, context) => {
|
|
|
96
96
|
let body;
|
|
97
97
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
98
98
|
'content': [],
|
|
99
|
+
'metadata': _ => se_Document(_, context),
|
|
99
100
|
'originalFormat': [],
|
|
100
101
|
'originalId': [],
|
|
101
102
|
'originalName': [],
|
|
@@ -374,6 +375,7 @@ const se_QueryKnowledgeBaseCommand = async (input, context) => {
|
|
|
374
375
|
const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
|
|
375
376
|
'content-type': 'application/json',
|
|
376
377
|
[_xsu]: input[_sU],
|
|
378
|
+
[_xesi]: input[_eSI],
|
|
377
379
|
});
|
|
378
380
|
b.bp("/api/v1/knowledge-bases/{knowledgeBaseId}/query");
|
|
379
381
|
b.p('knowledgeBaseId', () => input.knowledgeBaseId, '{knowledgeBaseId}', false);
|
|
@@ -398,6 +400,7 @@ const se_SearchKnowledgeBaseCommand = async (input, context) => {
|
|
|
398
400
|
const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
|
|
399
401
|
'content-type': 'application/json',
|
|
400
402
|
[_xsu]: input[_sU],
|
|
403
|
+
[_xesi]: input[_eSI],
|
|
401
404
|
});
|
|
402
405
|
b.bp("/api/v1/knowledge-bases/{knowledgeBaseId}/search");
|
|
403
406
|
b.p('knowledgeBaseId', () => input.knowledgeBaseId, '{knowledgeBaseId}', false);
|
|
@@ -1173,6 +1176,7 @@ const collectBodyString = (streamBody, context) => (0, smithy_client_1.collectBo
|
|
|
1173
1176
|
const _c = "company";
|
|
1174
1177
|
const _cI = "companyId";
|
|
1175
1178
|
const _dT = "documentType";
|
|
1179
|
+
const _eSI = "externalSessionId";
|
|
1176
1180
|
const _l = "limit";
|
|
1177
1181
|
const _o = "offset";
|
|
1178
1182
|
const _q = "query";
|
|
@@ -1180,4 +1184,5 @@ const _sT = "syncType";
|
|
|
1180
1184
|
const _sU = "searchUser";
|
|
1181
1185
|
const _wC = "withContent";
|
|
1182
1186
|
const _wCi = "withChunks";
|
|
1187
|
+
const _xesi = "x-external-session-id";
|
|
1183
1188
|
const _xsu = "x-search-user";
|
|
@@ -88,6 +88,7 @@ export const se_CreateDocumentCommand = async (input, context) => {
|
|
|
88
88
|
let body;
|
|
89
89
|
body = JSON.stringify(take(input, {
|
|
90
90
|
'content': [],
|
|
91
|
+
'metadata': _ => se_Document(_, context),
|
|
91
92
|
'originalFormat': [],
|
|
92
93
|
'originalId': [],
|
|
93
94
|
'originalName': [],
|
|
@@ -350,6 +351,7 @@ export const se_QueryKnowledgeBaseCommand = async (input, context) => {
|
|
|
350
351
|
const headers = map({}, isSerializableHeaderValue, {
|
|
351
352
|
'content-type': 'application/json',
|
|
352
353
|
[_xsu]: input[_sU],
|
|
354
|
+
[_xesi]: input[_eSI],
|
|
353
355
|
});
|
|
354
356
|
b.bp("/api/v1/knowledge-bases/{knowledgeBaseId}/query");
|
|
355
357
|
b.p('knowledgeBaseId', () => input.knowledgeBaseId, '{knowledgeBaseId}', false);
|
|
@@ -373,6 +375,7 @@ export const se_SearchKnowledgeBaseCommand = async (input, context) => {
|
|
|
373
375
|
const headers = map({}, isSerializableHeaderValue, {
|
|
374
376
|
'content-type': 'application/json',
|
|
375
377
|
[_xsu]: input[_sU],
|
|
378
|
+
[_xesi]: input[_eSI],
|
|
376
379
|
});
|
|
377
380
|
b.bp("/api/v1/knowledge-bases/{knowledgeBaseId}/search");
|
|
378
381
|
b.p('knowledgeBaseId', () => input.knowledgeBaseId, '{knowledgeBaseId}', false);
|
|
@@ -1115,6 +1118,7 @@ const collectBodyString = (streamBody, context) => collectBody(streamBody, conte
|
|
|
1115
1118
|
const _c = "company";
|
|
1116
1119
|
const _cI = "companyId";
|
|
1117
1120
|
const _dT = "documentType";
|
|
1121
|
+
const _eSI = "externalSessionId";
|
|
1118
1122
|
const _l = "limit";
|
|
1119
1123
|
const _o = "offset";
|
|
1120
1124
|
const _q = "query";
|
|
@@ -1122,4 +1126,5 @@ const _sT = "syncType";
|
|
|
1122
1126
|
const _sU = "searchUser";
|
|
1123
1127
|
const _wC = "withContent";
|
|
1124
1128
|
const _wCi = "withChunks";
|
|
1129
|
+
const _xesi = "x-external-session-id";
|
|
1125
1130
|
const _xsu = "x-search-user";
|
|
@@ -43,6 +43,7 @@ declare const CreateDocumentCommand_base: {
|
|
|
43
43
|
* originalId: "STRING_VALUE",
|
|
44
44
|
* companyId: "STRING_VALUE",
|
|
45
45
|
* dataSourceId: "STRING_VALUE", // required
|
|
46
|
+
* metadata: "DOCUMENT_VALUE",
|
|
46
47
|
* };
|
|
47
48
|
* const command = new CreateDocumentCommand(input);
|
|
48
49
|
* const response = await client.send(command);
|
|
@@ -27,7 +27,7 @@ declare const GetDocumentPresignedUploadUrlCommand_base: {
|
|
|
27
27
|
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
30
|
-
* Get a presigned URL for uploading the original file of the document
|
|
30
|
+
* Get a presigned URL for uploading the original file of the document. You must upload the file to this URL using the PUT method.
|
|
31
31
|
* @example
|
|
32
32
|
* Use a bare-bones client and the command you need to make an API call.
|
|
33
33
|
* ```javascript
|
|
@@ -53,6 +53,7 @@ declare const QueryKnowledgeBaseCommand_base: {
|
|
|
53
53
|
* systemPrompt: "STRING_VALUE",
|
|
54
54
|
* },
|
|
55
55
|
* searchUser: "STRING_VALUE",
|
|
56
|
+
* externalSessionId: "STRING_VALUE",
|
|
56
57
|
* };
|
|
57
58
|
* const command = new QueryKnowledgeBaseCommand(input);
|
|
58
59
|
* const response = await client.send(command);
|
|
@@ -47,6 +47,7 @@ declare const SearchKnowledgeBaseCommand_base: {
|
|
|
47
47
|
* },
|
|
48
48
|
* withMetadata: true || false,
|
|
49
49
|
* searchUser: "STRING_VALUE",
|
|
50
|
+
* externalSessionId: "STRING_VALUE",
|
|
50
51
|
* };
|
|
51
52
|
* const command = new SearchKnowledgeBaseCommand(input);
|
|
52
53
|
* const response = await client.send(command);
|
|
@@ -530,7 +530,7 @@ export interface CreateDocumentInput {
|
|
|
530
530
|
*/
|
|
531
531
|
url?: string | undefined;
|
|
532
532
|
/**
|
|
533
|
-
* Optional document content in plain text or markdown format. For file uploads, can be the document content.
|
|
533
|
+
* Optional document content in plain text or markdown format. For file uploads, can be the document content.
|
|
534
534
|
* @public
|
|
535
535
|
*/
|
|
536
536
|
content?: string | undefined;
|
|
@@ -545,7 +545,7 @@ export interface CreateDocumentInput {
|
|
|
545
545
|
*/
|
|
546
546
|
originalName: string;
|
|
547
547
|
/**
|
|
548
|
-
* Original ID from the source system, preserving the reference to the source document. Examples: 'confluence-page-1234567890' (for Confluence), 'gdrive-file-abc123' (for Google Drive)
|
|
548
|
+
* Original ID from the source system, preserving the reference to the source document. Examples: 'confluence-page-1234567890' (for Confluence), 'gdrive-file-abc123' (for Google Drive), sha1(original-file-content) (for file uploads)
|
|
549
549
|
* @public
|
|
550
550
|
*/
|
|
551
551
|
originalId?: string | undefined;
|
|
@@ -559,6 +559,11 @@ export interface CreateDocumentInput {
|
|
|
559
559
|
* @public
|
|
560
560
|
*/
|
|
561
561
|
dataSourceId: string;
|
|
562
|
+
/**
|
|
563
|
+
* Additional metadata of the document. Example: \{ 'createdAt': '2025-01-01T00:00:00Z', 'updatedAt': '2025-05-01T00:00:00Z', 'createdBy': 'user@example.com' \}
|
|
564
|
+
* @public
|
|
565
|
+
*/
|
|
566
|
+
metadata?: __DocumentType | undefined;
|
|
562
567
|
}
|
|
563
568
|
/**
|
|
564
569
|
* @public
|
|
@@ -590,7 +595,7 @@ export interface DocumentItem {
|
|
|
590
595
|
*/
|
|
591
596
|
url?: string | undefined;
|
|
592
597
|
/**
|
|
593
|
-
* Optional document content in plain text or markdown format. For file uploads, can be the document content.
|
|
598
|
+
* Optional document content in plain text or markdown format. For file uploads, can be the document content.
|
|
594
599
|
* @public
|
|
595
600
|
*/
|
|
596
601
|
content?: string | undefined;
|
|
@@ -605,7 +610,7 @@ export interface DocumentItem {
|
|
|
605
610
|
*/
|
|
606
611
|
originalName: string;
|
|
607
612
|
/**
|
|
608
|
-
* Original ID from the source system, preserving the reference to the source document. Examples: 'confluence-page-1234567890' (for Confluence), 'gdrive-file-abc123' (for Google Drive)
|
|
613
|
+
* Original ID from the source system, preserving the reference to the source document. Examples: 'confluence-page-1234567890' (for Confluence), 'gdrive-file-abc123' (for Google Drive), sha1(original-file-content) (for file uploads)
|
|
609
614
|
* @public
|
|
610
615
|
*/
|
|
611
616
|
originalId?: string | undefined;
|
|
@@ -1476,6 +1481,11 @@ export interface QueryKnowledgeBaseInput {
|
|
|
1476
1481
|
* @public
|
|
1477
1482
|
*/
|
|
1478
1483
|
searchUser?: string | undefined;
|
|
1484
|
+
/**
|
|
1485
|
+
* The external session ID. Used for tracking and analytics purposes.
|
|
1486
|
+
* @public
|
|
1487
|
+
*/
|
|
1488
|
+
externalSessionId?: string | undefined;
|
|
1479
1489
|
}
|
|
1480
1490
|
/**
|
|
1481
1491
|
* @public
|
|
@@ -1519,6 +1529,11 @@ export interface SearchKnowledgeBaseInput {
|
|
|
1519
1529
|
* @public
|
|
1520
1530
|
*/
|
|
1521
1531
|
searchUser?: string | undefined;
|
|
1532
|
+
/**
|
|
1533
|
+
* The external session ID. Used for tracking and analytics purposes. Example: 123e4567-e89b-12d3-a456-426614174000
|
|
1534
|
+
* @public
|
|
1535
|
+
*/
|
|
1536
|
+
externalSessionId?: string | undefined;
|
|
1522
1537
|
}
|
|
1523
1538
|
/**
|
|
1524
1539
|
* @public
|
|
@@ -1638,7 +1653,7 @@ export interface UpdateDocumentInput {
|
|
|
1638
1653
|
*/
|
|
1639
1654
|
url?: string | undefined;
|
|
1640
1655
|
/**
|
|
1641
|
-
* Optional document content in plain text or markdown format. For file uploads, can be the document content.
|
|
1656
|
+
* Optional document content in plain text or markdown format. For file uploads, can be the document content.
|
|
1642
1657
|
* @public
|
|
1643
1658
|
*/
|
|
1644
1659
|
content?: string | undefined;
|
|
@@ -1653,7 +1668,7 @@ export interface UpdateDocumentInput {
|
|
|
1653
1668
|
*/
|
|
1654
1669
|
originalName: string;
|
|
1655
1670
|
/**
|
|
1656
|
-
* Original ID from the source system, preserving the reference to the source document. Examples: 'confluence-page-1234567890' (for Confluence), 'gdrive-file-abc123' (for Google Drive)
|
|
1671
|
+
* Original ID from the source system, preserving the reference to the source document. Examples: 'confluence-page-1234567890' (for Confluence), 'gdrive-file-abc123' (for Google Drive), sha1(original-file-content) (for file uploads)
|
|
1657
1672
|
* @public
|
|
1658
1673
|
*/
|
|
1659
1674
|
originalId?: string | undefined;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildix/wim-knowledge-base-client",
|
|
3
3
|
"description": "@wildix/wim-knowledge-base-client client",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.39",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|