@wildix/wim-knowledge-base-client 0.0.18 → 0.0.20
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 +18 -2
- package/dist-es/protocols/Aws_restJson1.js +18 -2
- package/dist-types/commands/CreateDocumentCommand.d.ts +3 -0
- package/dist-types/commands/DescribeDataSourceCommand.d.ts +54 -2
- package/dist-types/commands/GetDocumentCommand.d.ts +3 -0
- package/dist-types/commands/ListDocumentsCommand.d.ts +3 -0
- package/dist-types/commands/UpdateDocumentCommand.d.ts +3 -0
- package/dist-types/models/models_0.d.ts +221 -2
- package/package.json +1 -1
|
@@ -173,7 +173,7 @@ const se_DescribeDataSourceCommand = async (input, context) => {
|
|
|
173
173
|
});
|
|
174
174
|
let body;
|
|
175
175
|
body = JSON.stringify((0, smithy_client_1.take)(input, {
|
|
176
|
-
'parameters': _ =>
|
|
176
|
+
'parameters': _ => se_DescribeDataSourceParameters(_, context),
|
|
177
177
|
}));
|
|
178
178
|
b.m("POST")
|
|
179
179
|
.h(headers)
|
|
@@ -615,7 +615,7 @@ const de_DescribeDataSourceCommand = async (output, context) => {
|
|
|
615
615
|
});
|
|
616
616
|
const data = (0, smithy_client_1.expectNonNull)(((0, smithy_client_1.expectObject)(await (0, core_1.parseJsonBody)(output.body, context))), "body");
|
|
617
617
|
const doc = (0, smithy_client_1.take)(data, {
|
|
618
|
-
'
|
|
618
|
+
'result': _ => de_DescribeDataSourceResult(_, context),
|
|
619
619
|
});
|
|
620
620
|
Object.assign(contents, doc);
|
|
621
621
|
return contents;
|
|
@@ -1000,6 +1000,14 @@ const se_DataSourceConfig = (input, context) => {
|
|
|
1000
1000
|
_: (name, value) => ({ [name]: value })
|
|
1001
1001
|
});
|
|
1002
1002
|
};
|
|
1003
|
+
const se_DescribeDataSourceParameters = (input, context) => {
|
|
1004
|
+
return (0, smithy_client_1.take)(input, {
|
|
1005
|
+
'confluence': smithy_client_1._json,
|
|
1006
|
+
'files': _ => se_Document(_, context),
|
|
1007
|
+
'gdrive': smithy_client_1._json,
|
|
1008
|
+
'proxy': _ => se_Document(_, context),
|
|
1009
|
+
});
|
|
1010
|
+
};
|
|
1003
1011
|
const se_LlmConfig = (input, context) => {
|
|
1004
1012
|
return (0, smithy_client_1.take)(input, {
|
|
1005
1013
|
'maxOutputTokens': [],
|
|
@@ -1079,6 +1087,14 @@ const de_DataSourceList = (output, context) => {
|
|
|
1079
1087
|
});
|
|
1080
1088
|
return retVal;
|
|
1081
1089
|
};
|
|
1090
|
+
const de_DescribeDataSourceResult = (output, context) => {
|
|
1091
|
+
return (0, smithy_client_1.take)(output, {
|
|
1092
|
+
'confluence': smithy_client_1._json,
|
|
1093
|
+
'files': (_) => de_Document(_, context),
|
|
1094
|
+
'gdrive': smithy_client_1._json,
|
|
1095
|
+
'proxy': (_) => de_Document(_, context),
|
|
1096
|
+
});
|
|
1097
|
+
};
|
|
1082
1098
|
const de_ProxyConfig = (output, context) => {
|
|
1083
1099
|
return (0, smithy_client_1.take)(output, {
|
|
1084
1100
|
'body': (_) => de_Document(_, context),
|
|
@@ -161,7 +161,7 @@ export const se_DescribeDataSourceCommand = async (input, context) => {
|
|
|
161
161
|
});
|
|
162
162
|
let body;
|
|
163
163
|
body = JSON.stringify(take(input, {
|
|
164
|
-
'parameters': _ =>
|
|
164
|
+
'parameters': _ => se_DescribeDataSourceParameters(_, context),
|
|
165
165
|
}));
|
|
166
166
|
b.m("POST")
|
|
167
167
|
.h(headers)
|
|
@@ -577,7 +577,7 @@ export const de_DescribeDataSourceCommand = async (output, context) => {
|
|
|
577
577
|
});
|
|
578
578
|
const data = __expectNonNull((__expectObject(await parseBody(output.body, context))), "body");
|
|
579
579
|
const doc = take(data, {
|
|
580
|
-
'
|
|
580
|
+
'result': _ => de_DescribeDataSourceResult(_, context),
|
|
581
581
|
});
|
|
582
582
|
Object.assign(contents, doc);
|
|
583
583
|
return contents;
|
|
@@ -944,6 +944,14 @@ const se_DataSourceConfig = (input, context) => {
|
|
|
944
944
|
_: (name, value) => ({ [name]: value })
|
|
945
945
|
});
|
|
946
946
|
};
|
|
947
|
+
const se_DescribeDataSourceParameters = (input, context) => {
|
|
948
|
+
return take(input, {
|
|
949
|
+
'confluence': _json,
|
|
950
|
+
'files': _ => se_Document(_, context),
|
|
951
|
+
'gdrive': _json,
|
|
952
|
+
'proxy': _ => se_Document(_, context),
|
|
953
|
+
});
|
|
954
|
+
};
|
|
947
955
|
const se_LlmConfig = (input, context) => {
|
|
948
956
|
return take(input, {
|
|
949
957
|
'maxOutputTokens': [],
|
|
@@ -1023,6 +1031,14 @@ const de_DataSourceList = (output, context) => {
|
|
|
1023
1031
|
});
|
|
1024
1032
|
return retVal;
|
|
1025
1033
|
};
|
|
1034
|
+
const de_DescribeDataSourceResult = (output, context) => {
|
|
1035
|
+
return take(output, {
|
|
1036
|
+
'confluence': _json,
|
|
1037
|
+
'files': (_) => de_Document(_, context),
|
|
1038
|
+
'gdrive': _json,
|
|
1039
|
+
'proxy': (_) => de_Document(_, context),
|
|
1040
|
+
});
|
|
1041
|
+
};
|
|
1026
1042
|
const de_ProxyConfig = (output, context) => {
|
|
1027
1043
|
return take(output, {
|
|
1028
1044
|
'body': (_) => de_Document(_, context),
|
|
@@ -62,6 +62,9 @@ declare const CreateDocumentCommand_base: {
|
|
|
62
62
|
* // createdAt: "STRING_VALUE", // required
|
|
63
63
|
* // updatedAt: "STRING_VALUE", // required
|
|
64
64
|
* // status: "draft" || "pending" || "processing" || "completed" || "failed", // required
|
|
65
|
+
* // chunksCount: Number("int"),
|
|
66
|
+
* // convertingDuration: Number("int"),
|
|
67
|
+
* // processingDuration: Number("int"),
|
|
65
68
|
* // errorMessage: "STRING_VALUE",
|
|
66
69
|
* // },
|
|
67
70
|
* // };
|
|
@@ -37,12 +37,64 @@ declare const DescribeDataSourceCommand_base: {
|
|
|
37
37
|
* const input = { // DescribeDataSourceInput
|
|
38
38
|
* companyId: "STRING_VALUE",
|
|
39
39
|
* dataSourceId: "STRING_VALUE", // required
|
|
40
|
-
* parameters:
|
|
40
|
+
* parameters: { // DescribeDataSourceParameters
|
|
41
|
+
* confluence: { // DescribeDataSourceConfluenceParameters
|
|
42
|
+
* spaces: { // DescribeDataSourceConfluenceSpacesParameters
|
|
43
|
+
* type: "STRING_VALUE",
|
|
44
|
+
* },
|
|
45
|
+
* pages: { // DescribeDataSourceConfluencePagesParameters
|
|
46
|
+
* spaceId: "STRING_VALUE", // required
|
|
47
|
+
* parentId: "STRING_VALUE",
|
|
48
|
+
* parentPages: [ // StringList
|
|
49
|
+
* "STRING_VALUE",
|
|
50
|
+
* ],
|
|
51
|
+
* },
|
|
52
|
+
* },
|
|
53
|
+
* gdrive: { // DescribeDataSourceGDriveParameters
|
|
54
|
+
* session: { // DescribeDataSourceGDriveSessionParameters
|
|
55
|
+
* userId: "STRING_VALUE", // required
|
|
56
|
+
* },
|
|
57
|
+
* folders: { // DescribeDataSourceGDriveFoldersParameters
|
|
58
|
+
* parentId: "STRING_VALUE", // required
|
|
59
|
+
* },
|
|
60
|
+
* },
|
|
61
|
+
* proxy: "DOCUMENT_VALUE",
|
|
62
|
+
* files: "DOCUMENT_VALUE",
|
|
63
|
+
* },
|
|
41
64
|
* };
|
|
42
65
|
* const command = new DescribeDataSourceCommand(input);
|
|
43
66
|
* const response = await client.send(command);
|
|
44
67
|
* // { // DescribeDataSourceOutput
|
|
45
|
-
* //
|
|
68
|
+
* // result: { // DescribeDataSourceResult
|
|
69
|
+
* // confluence: { // DescribeDataSourceConfluenceResult
|
|
70
|
+
* // spaces: { // DescribeDataSourceConfluenceSpacesList
|
|
71
|
+
* // member: { // DescribeDataSourceConfluenceSpaceResult
|
|
72
|
+
* // id: "STRING_VALUE", // required
|
|
73
|
+
* // name: "STRING_VALUE", // required
|
|
74
|
+
* // },
|
|
75
|
+
* // },
|
|
76
|
+
* // pages: { // DescribeDataSourceConfluencePagesList
|
|
77
|
+
* // member: { // DescribeDataSourceConfluencePageResult
|
|
78
|
+
* // id: "STRING_VALUE", // required
|
|
79
|
+
* // parentId: "STRING_VALUE", // required
|
|
80
|
+
* // title: "STRING_VALUE", // required
|
|
81
|
+
* // position: Number("int"),
|
|
82
|
+
* // },
|
|
83
|
+
* // },
|
|
84
|
+
* // },
|
|
85
|
+
* // gdrive: { // DescribeDataSourceGDriveResult
|
|
86
|
+
* // sessionId: "STRING_VALUE",
|
|
87
|
+
* // folders: [ // DescribeDataSourceGDriveFoldersList
|
|
88
|
+
* // { // DescribeDataSourceGDriveFolderResult
|
|
89
|
+
* // id: "STRING_VALUE", // required
|
|
90
|
+
* // parentId: "STRING_VALUE", // required
|
|
91
|
+
* // name: "STRING_VALUE", // required
|
|
92
|
+
* // },
|
|
93
|
+
* // ],
|
|
94
|
+
* // },
|
|
95
|
+
* // proxy: "DOCUMENT_VALUE",
|
|
96
|
+
* // files: "DOCUMENT_VALUE",
|
|
97
|
+
* // },
|
|
46
98
|
* // };
|
|
47
99
|
*
|
|
48
100
|
* ```
|
|
@@ -59,6 +59,9 @@ declare const GetDocumentCommand_base: {
|
|
|
59
59
|
* // createdAt: "STRING_VALUE", // required
|
|
60
60
|
* // updatedAt: "STRING_VALUE", // required
|
|
61
61
|
* // status: "draft" || "pending" || "processing" || "completed" || "failed", // required
|
|
62
|
+
* // chunksCount: Number("int"),
|
|
63
|
+
* // convertingDuration: Number("int"),
|
|
64
|
+
* // processingDuration: Number("int"),
|
|
62
65
|
* // errorMessage: "STRING_VALUE",
|
|
63
66
|
* // },
|
|
64
67
|
* // content: "STRING_VALUE",
|
|
@@ -57,6 +57,9 @@ declare const ListDocumentsCommand_base: {
|
|
|
57
57
|
* // createdAt: "STRING_VALUE", // required
|
|
58
58
|
* // updatedAt: "STRING_VALUE", // required
|
|
59
59
|
* // status: "draft" || "pending" || "processing" || "completed" || "failed", // required
|
|
60
|
+
* // chunksCount: Number("int"),
|
|
61
|
+
* // convertingDuration: Number("int"),
|
|
62
|
+
* // processingDuration: Number("int"),
|
|
60
63
|
* // errorMessage: "STRING_VALUE",
|
|
61
64
|
* // },
|
|
62
65
|
* // ],
|
|
@@ -63,6 +63,9 @@ declare const UpdateDocumentCommand_base: {
|
|
|
63
63
|
* // createdAt: "STRING_VALUE", // required
|
|
64
64
|
* // updatedAt: "STRING_VALUE", // required
|
|
65
65
|
* // status: "draft" || "pending" || "processing" || "completed" || "failed", // required
|
|
66
|
+
* // chunksCount: Number("int"),
|
|
67
|
+
* // convertingDuration: Number("int"),
|
|
68
|
+
* // processingDuration: Number("int"),
|
|
66
69
|
* // errorMessage: "STRING_VALUE",
|
|
67
70
|
* // },
|
|
68
71
|
* // };
|
|
@@ -552,6 +552,25 @@ export interface DocumentItem {
|
|
|
552
552
|
createdAt: string;
|
|
553
553
|
updatedAt: string;
|
|
554
554
|
status: DocumentStatus;
|
|
555
|
+
/**
|
|
556
|
+
* The number of chunks in the document.
|
|
557
|
+
* @public
|
|
558
|
+
*/
|
|
559
|
+
chunksCount?: number | undefined;
|
|
560
|
+
/**
|
|
561
|
+
* The duration of the converting process in milliseconds.
|
|
562
|
+
* @public
|
|
563
|
+
*/
|
|
564
|
+
convertingDuration?: number | undefined;
|
|
565
|
+
/**
|
|
566
|
+
* The duration of chunking and embedding process in milliseconds.
|
|
567
|
+
* @public
|
|
568
|
+
*/
|
|
569
|
+
processingDuration?: number | undefined;
|
|
570
|
+
/**
|
|
571
|
+
* The error message of processing the document.
|
|
572
|
+
* @public
|
|
573
|
+
*/
|
|
555
574
|
errorMessage?: string | undefined;
|
|
556
575
|
}
|
|
557
576
|
/**
|
|
@@ -676,6 +695,95 @@ export interface DeleteKnowledgeBaseInput {
|
|
|
676
695
|
*/
|
|
677
696
|
export interface DeleteKnowledgeBaseOutput {
|
|
678
697
|
}
|
|
698
|
+
/**
|
|
699
|
+
* @public
|
|
700
|
+
*/
|
|
701
|
+
export interface DescribeDataSourceConfluencePagesParameters {
|
|
702
|
+
/**
|
|
703
|
+
* The space ID of the confluence instance
|
|
704
|
+
* @public
|
|
705
|
+
*/
|
|
706
|
+
spaceId: string;
|
|
707
|
+
/**
|
|
708
|
+
* Returns pages that are children of the given page.
|
|
709
|
+
* @public
|
|
710
|
+
*/
|
|
711
|
+
parentId?: string | undefined;
|
|
712
|
+
/**
|
|
713
|
+
* Returns pages that are parents of the given pages.
|
|
714
|
+
* @public
|
|
715
|
+
*/
|
|
716
|
+
parentPages?: (string)[] | undefined;
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* @public
|
|
720
|
+
*/
|
|
721
|
+
export interface DescribeDataSourceConfluenceSpacesParameters {
|
|
722
|
+
/**
|
|
723
|
+
* The type of the space. Example: global, personal
|
|
724
|
+
* @public
|
|
725
|
+
*/
|
|
726
|
+
type?: string | undefined;
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* @public
|
|
730
|
+
*/
|
|
731
|
+
export interface DescribeDataSourceConfluenceParameters {
|
|
732
|
+
/**
|
|
733
|
+
* Whether to include the spaces in the result.
|
|
734
|
+
* @public
|
|
735
|
+
*/
|
|
736
|
+
spaces?: DescribeDataSourceConfluenceSpacesParameters | undefined;
|
|
737
|
+
/**
|
|
738
|
+
* Whether to include the confluence pages in the result.
|
|
739
|
+
* @public
|
|
740
|
+
*/
|
|
741
|
+
pages?: DescribeDataSourceConfluencePagesParameters | undefined;
|
|
742
|
+
}
|
|
743
|
+
/**
|
|
744
|
+
* @public
|
|
745
|
+
*/
|
|
746
|
+
export interface DescribeDataSourceGDriveFoldersParameters {
|
|
747
|
+
/**
|
|
748
|
+
* The parent ID of the folder.
|
|
749
|
+
* @public
|
|
750
|
+
*/
|
|
751
|
+
parentId: string;
|
|
752
|
+
}
|
|
753
|
+
/**
|
|
754
|
+
* @public
|
|
755
|
+
*/
|
|
756
|
+
export interface DescribeDataSourceGDriveSessionParameters {
|
|
757
|
+
/**
|
|
758
|
+
* The user ID of the user who is requesting the session.
|
|
759
|
+
* @public
|
|
760
|
+
*/
|
|
761
|
+
userId: string;
|
|
762
|
+
}
|
|
763
|
+
/**
|
|
764
|
+
* @public
|
|
765
|
+
*/
|
|
766
|
+
export interface DescribeDataSourceGDriveParameters {
|
|
767
|
+
/**
|
|
768
|
+
* Returns Nango SessionID for current Data Source.
|
|
769
|
+
* @public
|
|
770
|
+
*/
|
|
771
|
+
session?: DescribeDataSourceGDriveSessionParameters | undefined;
|
|
772
|
+
/**
|
|
773
|
+
* List of folder IDs to describe.
|
|
774
|
+
* @public
|
|
775
|
+
*/
|
|
776
|
+
folders?: DescribeDataSourceGDriveFoldersParameters | undefined;
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* @public
|
|
780
|
+
*/
|
|
781
|
+
export interface DescribeDataSourceParameters {
|
|
782
|
+
confluence?: DescribeDataSourceConfluenceParameters | undefined;
|
|
783
|
+
gdrive?: DescribeDataSourceGDriveParameters | undefined;
|
|
784
|
+
proxy?: __DocumentType | undefined;
|
|
785
|
+
files?: __DocumentType | undefined;
|
|
786
|
+
}
|
|
679
787
|
/**
|
|
680
788
|
* @public
|
|
681
789
|
*/
|
|
@@ -690,13 +798,124 @@ export interface DescribeDataSourceInput {
|
|
|
690
798
|
* @public
|
|
691
799
|
*/
|
|
692
800
|
dataSourceId: string;
|
|
693
|
-
parameters:
|
|
801
|
+
parameters: DescribeDataSourceParameters;
|
|
802
|
+
}
|
|
803
|
+
/**
|
|
804
|
+
* @public
|
|
805
|
+
*/
|
|
806
|
+
export interface DescribeDataSourceConfluencePageResult {
|
|
807
|
+
/**
|
|
808
|
+
* The ID of the page.
|
|
809
|
+
* @public
|
|
810
|
+
*/
|
|
811
|
+
id: string;
|
|
812
|
+
/**
|
|
813
|
+
* The parent ID of the page.
|
|
814
|
+
* @public
|
|
815
|
+
*/
|
|
816
|
+
parentId: string;
|
|
817
|
+
/**
|
|
818
|
+
* The title of the page.
|
|
819
|
+
* @public
|
|
820
|
+
*/
|
|
821
|
+
title: string;
|
|
822
|
+
/**
|
|
823
|
+
* The position of the page.
|
|
824
|
+
* @public
|
|
825
|
+
*/
|
|
826
|
+
position?: number | undefined;
|
|
827
|
+
}
|
|
828
|
+
/**
|
|
829
|
+
* @public
|
|
830
|
+
*/
|
|
831
|
+
export interface DescribeDataSourceConfluencePagesList {
|
|
832
|
+
member?: DescribeDataSourceConfluencePageResult | undefined;
|
|
833
|
+
}
|
|
834
|
+
/**
|
|
835
|
+
* @public
|
|
836
|
+
*/
|
|
837
|
+
export interface DescribeDataSourceConfluenceSpaceResult {
|
|
838
|
+
/**
|
|
839
|
+
* The ID of the space.
|
|
840
|
+
* @public
|
|
841
|
+
*/
|
|
842
|
+
id: string;
|
|
843
|
+
/**
|
|
844
|
+
* The name of the space.
|
|
845
|
+
* @public
|
|
846
|
+
*/
|
|
847
|
+
name: string;
|
|
848
|
+
}
|
|
849
|
+
/**
|
|
850
|
+
* @public
|
|
851
|
+
*/
|
|
852
|
+
export interface DescribeDataSourceConfluenceSpacesList {
|
|
853
|
+
member?: DescribeDataSourceConfluenceSpaceResult | undefined;
|
|
854
|
+
}
|
|
855
|
+
/**
|
|
856
|
+
* @public
|
|
857
|
+
*/
|
|
858
|
+
export interface DescribeDataSourceConfluenceResult {
|
|
859
|
+
/**
|
|
860
|
+
* Returns confluence spaces for selected type. Example: global, personal
|
|
861
|
+
* @public
|
|
862
|
+
*/
|
|
863
|
+
spaces?: DescribeDataSourceConfluenceSpacesList | undefined;
|
|
864
|
+
/**
|
|
865
|
+
* Returns confluence pages for selected space.
|
|
866
|
+
* @public
|
|
867
|
+
*/
|
|
868
|
+
pages?: DescribeDataSourceConfluencePagesList | undefined;
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* @public
|
|
872
|
+
*/
|
|
873
|
+
export interface DescribeDataSourceGDriveFolderResult {
|
|
874
|
+
/**
|
|
875
|
+
* The ID of the folder.
|
|
876
|
+
* @public
|
|
877
|
+
*/
|
|
878
|
+
id: string;
|
|
879
|
+
/**
|
|
880
|
+
* The parent ID of the folder.
|
|
881
|
+
* @public
|
|
882
|
+
*/
|
|
883
|
+
parentId: string;
|
|
884
|
+
/**
|
|
885
|
+
* The name of the folder.
|
|
886
|
+
* @public
|
|
887
|
+
*/
|
|
888
|
+
name: string;
|
|
889
|
+
}
|
|
890
|
+
/**
|
|
891
|
+
* @public
|
|
892
|
+
*/
|
|
893
|
+
export interface DescribeDataSourceGDriveResult {
|
|
894
|
+
/**
|
|
895
|
+
* Returns Nango SessionID for current Data Source.
|
|
896
|
+
* @public
|
|
897
|
+
*/
|
|
898
|
+
sessionId?: string | undefined;
|
|
899
|
+
/**
|
|
900
|
+
* Returns folders that are children of the given folder.
|
|
901
|
+
* @public
|
|
902
|
+
*/
|
|
903
|
+
folders?: (DescribeDataSourceGDriveFolderResult)[] | undefined;
|
|
904
|
+
}
|
|
905
|
+
/**
|
|
906
|
+
* @public
|
|
907
|
+
*/
|
|
908
|
+
export interface DescribeDataSourceResult {
|
|
909
|
+
confluence?: DescribeDataSourceConfluenceResult | undefined;
|
|
910
|
+
gdrive?: DescribeDataSourceGDriveResult | undefined;
|
|
911
|
+
proxy?: __DocumentType | undefined;
|
|
912
|
+
files?: __DocumentType | undefined;
|
|
694
913
|
}
|
|
695
914
|
/**
|
|
696
915
|
* @public
|
|
697
916
|
*/
|
|
698
917
|
export interface DescribeDataSourceOutput {
|
|
699
|
-
|
|
918
|
+
result: DescribeDataSourceResult;
|
|
700
919
|
}
|
|
701
920
|
/**
|
|
702
921
|
* @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.20",
|
|
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",
|