@wildix/wim-knowledge-base-client 0.0.16 → 0.0.18
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.
|
@@ -206,6 +206,8 @@ const se_GetDocumentCommand = async (input, context) => {
|
|
|
206
206
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
207
207
|
const query = (0, smithy_client_1.map)({
|
|
208
208
|
[_c]: [, input[_cI]],
|
|
209
|
+
[_wC]: [() => input.withContent !== void 0, () => (input[_wC].toString())],
|
|
210
|
+
[_wCi]: [() => input.withChunks !== void 0, () => (input[_wCi].toString())],
|
|
209
211
|
});
|
|
210
212
|
let body;
|
|
211
213
|
b.m("GET")
|
|
@@ -643,6 +645,8 @@ const de_GetDocumentCommand = async (output, context) => {
|
|
|
643
645
|
});
|
|
644
646
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
645
647
|
const doc = (0, smithy_client_1.take)(data, {
|
|
648
|
+
'chunks': smithy_client_1._json,
|
|
649
|
+
'content': smithy_client_1.expectString,
|
|
646
650
|
'document': smithy_client_1._json,
|
|
647
651
|
});
|
|
648
652
|
Object.assign(contents, doc);
|
|
@@ -1119,3 +1123,5 @@ const _l = "limit";
|
|
|
1119
1123
|
const _o = "offset";
|
|
1120
1124
|
const _q = "query";
|
|
1121
1125
|
const _sT = "syncType";
|
|
1126
|
+
const _wC = "withContent";
|
|
1127
|
+
const _wCi = "withChunks";
|
|
@@ -192,6 +192,8 @@ export const se_GetDocumentCommand = async (input, context) => {
|
|
|
192
192
|
b.p('documentId', () => input.documentId, '{documentId}', false);
|
|
193
193
|
const query = map({
|
|
194
194
|
[_c]: [, input[_cI]],
|
|
195
|
+
[_wC]: [() => input.withContent !== void 0, () => (input[_wC].toString())],
|
|
196
|
+
[_wCi]: [() => input.withChunks !== void 0, () => (input[_wCi].toString())],
|
|
195
197
|
});
|
|
196
198
|
let body;
|
|
197
199
|
b.m("GET")
|
|
@@ -603,6 +605,8 @@ export const de_GetDocumentCommand = async (output, context) => {
|
|
|
603
605
|
});
|
|
604
606
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
605
607
|
const doc = take(data, {
|
|
608
|
+
'chunks': _json,
|
|
609
|
+
'content': __expectString,
|
|
606
610
|
'document': _json,
|
|
607
611
|
});
|
|
608
612
|
Object.assign(contents, doc);
|
|
@@ -1063,3 +1067,5 @@ const _l = "limit";
|
|
|
1063
1067
|
const _o = "offset";
|
|
1064
1068
|
const _q = "query";
|
|
1065
1069
|
const _sT = "syncType";
|
|
1070
|
+
const _wC = "withContent";
|
|
1071
|
+
const _wCi = "withChunks";
|
|
@@ -38,6 +38,8 @@ declare const GetDocumentCommand_base: {
|
|
|
38
38
|
* companyId: "STRING_VALUE",
|
|
39
39
|
* dataSourceId: "STRING_VALUE", // required
|
|
40
40
|
* documentId: "STRING_VALUE", // required
|
|
41
|
+
* withContent: true || false,
|
|
42
|
+
* withChunks: true || false,
|
|
41
43
|
* };
|
|
42
44
|
* const command = new GetDocumentCommand(input);
|
|
43
45
|
* const response = await client.send(command);
|
|
@@ -59,6 +61,16 @@ declare const GetDocumentCommand_base: {
|
|
|
59
61
|
* // status: "draft" || "pending" || "processing" || "completed" || "failed", // required
|
|
60
62
|
* // errorMessage: "STRING_VALUE",
|
|
61
63
|
* // },
|
|
64
|
+
* // content: "STRING_VALUE",
|
|
65
|
+
* // chunks: [ // ChunksList
|
|
66
|
+
* // { // ChunkItem
|
|
67
|
+
* // id: "STRING_VALUE", // required
|
|
68
|
+
* // documentId: "STRING_VALUE", // required
|
|
69
|
+
* // content: "STRING_VALUE", // required
|
|
70
|
+
* // createdAt: "STRING_VALUE", // required
|
|
71
|
+
* // updatedAt: "STRING_VALUE", // required
|
|
72
|
+
* // },
|
|
73
|
+
* // ],
|
|
62
74
|
* // };
|
|
63
75
|
*
|
|
64
76
|
* ```
|
|
@@ -34,6 +34,24 @@ export declare class UnauthorizedException extends __BaseException {
|
|
|
34
34
|
*/
|
|
35
35
|
constructor(opts: __ExceptionOptionType<UnauthorizedException, __BaseException>);
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* @public
|
|
39
|
+
*/
|
|
40
|
+
export interface ChunkItem {
|
|
41
|
+
/**
|
|
42
|
+
* The ID of the chunk. Example: 123e4567-e89b-12d3-a456-426614174000
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
45
|
+
id: string;
|
|
46
|
+
/**
|
|
47
|
+
* The ID of the document. Example: 123e4567-e89b-12d3-a456-426614174000
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
50
|
+
documentId: string;
|
|
51
|
+
content: string;
|
|
52
|
+
createdAt: string;
|
|
53
|
+
updatedAt: string;
|
|
54
|
+
}
|
|
37
55
|
/**
|
|
38
56
|
* @public
|
|
39
57
|
*/
|
|
@@ -732,12 +750,24 @@ export interface GetDocumentInput {
|
|
|
732
750
|
* @public
|
|
733
751
|
*/
|
|
734
752
|
documentId: string;
|
|
753
|
+
/**
|
|
754
|
+
* Whether to include the content of the document
|
|
755
|
+
* @public
|
|
756
|
+
*/
|
|
757
|
+
withContent?: boolean | undefined;
|
|
758
|
+
/**
|
|
759
|
+
* Whether to include the chunks of the document
|
|
760
|
+
* @public
|
|
761
|
+
*/
|
|
762
|
+
withChunks?: boolean | undefined;
|
|
735
763
|
}
|
|
736
764
|
/**
|
|
737
765
|
* @public
|
|
738
766
|
*/
|
|
739
767
|
export interface GetDocumentOutput {
|
|
740
768
|
document: DocumentItem;
|
|
769
|
+
content?: string | undefined;
|
|
770
|
+
chunks?: (ChunkItem)[] | undefined;
|
|
741
771
|
}
|
|
742
772
|
/**
|
|
743
773
|
* @public
|
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.18",
|
|
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",
|