@wildix/wim-knowledge-base-client 0.0.38 → 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.
@@ -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': [],
@@ -399,6 +400,7 @@ const se_SearchKnowledgeBaseCommand = async (input, context) => {
399
400
  const headers = (0, smithy_client_1.map)({}, smithy_client_1.isSerializableHeaderValue, {
400
401
  'content-type': 'application/json',
401
402
  [_xsu]: input[_sU],
403
+ [_xesi]: input[_eSI],
402
404
  });
403
405
  b.bp("/api/v1/knowledge-bases/{knowledgeBaseId}/search");
404
406
  b.p('knowledgeBaseId', () => input.knowledgeBaseId, '{knowledgeBaseId}', false);
@@ -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': [],
@@ -374,6 +375,7 @@ export const se_SearchKnowledgeBaseCommand = async (input, context) => {
374
375
  const headers = map({}, 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}/search");
379
381
  b.p('knowledgeBaseId', () => input.knowledgeBaseId, '{knowledgeBaseId}', false);
@@ -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
@@ -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. For integrated sources (Confluence, GDrive), typically populated during sync from the original source
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. For integrated sources (Confluence, GDrive), typically populated during sync from the original source
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;
@@ -1524,6 +1529,11 @@ export interface SearchKnowledgeBaseInput {
1524
1529
  * @public
1525
1530
  */
1526
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;
1527
1537
  }
1528
1538
  /**
1529
1539
  * @public
@@ -1643,7 +1653,7 @@ export interface UpdateDocumentInput {
1643
1653
  */
1644
1654
  url?: string | undefined;
1645
1655
  /**
1646
- * Optional document content in plain text or markdown format. For file uploads, can be the document content. For integrated sources (Confluence, GDrive), typically populated during sync from the original source
1656
+ * Optional document content in plain text or markdown format. For file uploads, can be the document content.
1647
1657
  * @public
1648
1658
  */
1649
1659
  content?: string | undefined;
@@ -1658,7 +1668,7 @@ export interface UpdateDocumentInput {
1658
1668
  */
1659
1669
  originalName: string;
1660
1670
  /**
1661
- * 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)
1662
1672
  * @public
1663
1673
  */
1664
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.38",
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",