@petercatai/whisker-client 0.1.202505141055 → 0.1.202505160550-dev

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 (3) hide show
  1. package/dist/api.d.ts +119 -42
  2. package/dist/api.js +15 -6
  3. package/package.json +4 -4
package/dist/api.d.ts CHANGED
@@ -10,7 +10,7 @@ export declare enum ITaskStatus {
10
10
  }
11
11
  /**
12
12
  * KnowledgeTypeEnum
13
- * mime type of the knowledge
13
+ * mime type of the knowledge. If multiple files are included and require a decomposer, please set the type to 'folder'
14
14
  */
15
15
  export declare enum IKnowledgeTypeEnum {
16
16
  Text = "text",
@@ -105,6 +105,12 @@ export interface IChunk {
105
105
  * file source info
106
106
  */
107
107
  knowledge_id: string;
108
+ /**
109
+ * Enabled
110
+ * is chunk enabled
111
+ * @default true
112
+ */
113
+ enabled?: boolean;
108
114
  /**
109
115
  * Embedding Model Name
110
116
  * name of the embedding model
@@ -150,6 +156,13 @@ export interface IChunkUpdate {
150
156
  /** Metadata */
151
157
  metadata?: Record<string, any> | null;
152
158
  }
159
+ /** EnableStatusUpdate */
160
+ export interface IEnableStatusUpdate {
161
+ /** Knowledge Id */
162
+ knowledge_id: string;
163
+ /** Status */
164
+ status: boolean;
165
+ }
153
166
  /**
154
167
  * GeaGraphSplitConfig
155
168
  * JSON document split configuration
@@ -165,7 +178,7 @@ export interface IGeaGraphSplitConfig {
165
178
  * Kisid
166
179
  * The Kis platform business id
167
180
  */
168
- kisId?: number | null;
181
+ kisId: number;
169
182
  }
170
183
  /** GithubFileSourceConfig */
171
184
  export interface IGithubFileSourceConfig {
@@ -296,8 +309,12 @@ export interface IImageCreate {
296
309
  * @default {}
297
310
  */
298
311
  metadata?: Record<string, any>;
299
- /** source type */
300
- source_type: IKnowledgeSourceEnum;
312
+ /**
313
+ * Source Type
314
+ * source type
315
+ * @default "cloud_storage_image"
316
+ */
317
+ source_type?: "cloud_storage_image";
301
318
  /**
302
319
  * Embedding Model Name
303
320
  * name of the embedding model. you can set any other model if target embedding service registered
@@ -784,21 +801,6 @@ export interface IPDFSplitConfig {
784
801
  }
785
802
  /** PageParams[Chunk] */
786
803
  export interface IPageParamsChunk {
787
- /**
788
- * Page
789
- * page number
790
- * @min 1
791
- * @default 1
792
- */
793
- page?: number;
794
- /**
795
- * Page Size
796
- * page size
797
- * @min 1
798
- * @max 1000
799
- * @default 10
800
- */
801
- page_size?: number;
802
804
  /**
803
805
  * Order By
804
806
  * order by field
@@ -815,9 +817,6 @@ export interface IPageParamsChunk {
815
817
  * list of equality conditions, each as a dict with key and value
816
818
  */
817
819
  eq_conditions?: Record<string, any> | null;
818
- }
819
- /** PageParams[Knowledge] */
820
- export interface IPageParamsKnowledge {
821
820
  /**
822
821
  * Page
823
822
  * page number
@@ -833,6 +832,9 @@ export interface IPageParamsKnowledge {
833
832
  * @default 10
834
833
  */
835
834
  page_size?: number;
835
+ }
836
+ /** PageParams[Knowledge] */
837
+ export interface IPageParamsKnowledge {
836
838
  /**
837
839
  * Order By
838
840
  * order by field
@@ -849,9 +851,6 @@ export interface IPageParamsKnowledge {
849
851
  * list of equality conditions, each as a dict with key and value
850
852
  */
851
853
  eq_conditions?: Record<string, any> | null;
852
- }
853
- /** PageParams[Space] */
854
- export interface IPageParamsSpace {
855
854
  /**
856
855
  * Page
857
856
  * page number
@@ -867,6 +866,9 @@ export interface IPageParamsSpace {
867
866
  * @default 10
868
867
  */
869
868
  page_size?: number;
869
+ }
870
+ /** PageParams[Space] */
871
+ export interface IPageParamsSpace {
870
872
  /**
871
873
  * Order By
872
874
  * order by field
@@ -883,9 +885,6 @@ export interface IPageParamsSpace {
883
885
  * list of equality conditions, each as a dict with key and value
884
886
  */
885
887
  eq_conditions?: Record<string, any> | null;
886
- }
887
- /** PageParams[Task] */
888
- export interface IPageParamsTask {
889
888
  /**
890
889
  * Page
891
890
  * page number
@@ -901,6 +900,9 @@ export interface IPageParamsTask {
901
900
  * @default 10
902
901
  */
903
902
  page_size?: number;
903
+ }
904
+ /** PageParams[Task] */
905
+ export interface IPageParamsTask {
904
906
  /**
905
907
  * Order By
906
908
  * order by field
@@ -917,6 +919,21 @@ export interface IPageParamsTask {
917
919
  * list of equality conditions, each as a dict with key and value
918
920
  */
919
921
  eq_conditions?: Record<string, any> | null;
922
+ /**
923
+ * Page
924
+ * page number
925
+ * @min 1
926
+ * @default 1
927
+ */
928
+ page?: number;
929
+ /**
930
+ * Page Size
931
+ * page size
932
+ * @min 1
933
+ * @max 1000
934
+ * @default 10
935
+ */
936
+ page_size?: number;
920
937
  }
921
938
  /** PageResponse[Chunk] */
922
939
  export interface IPageResponseChunk {
@@ -995,8 +1012,12 @@ export interface IQACreate {
995
1012
  * @default {}
996
1013
  */
997
1014
  metadata?: Record<string, any>;
998
- /** source type */
999
- source_type: IKnowledgeSourceEnum;
1015
+ /**
1016
+ * Source Type
1017
+ * source type
1018
+ * @default "user_input_text"
1019
+ */
1020
+ source_type?: "user_input_text";
1000
1021
  /**
1001
1022
  * Embedding Model Name
1002
1023
  * name of the embedding model. you can set any other model if target embedding service registered
@@ -1392,6 +1413,12 @@ export interface IRetrievalChunk {
1392
1413
  * file source info
1393
1414
  */
1394
1415
  knowledge_id: string;
1416
+ /**
1417
+ * Enabled
1418
+ * is chunk enabled
1419
+ * @default true
1420
+ */
1421
+ enabled?: boolean;
1395
1422
  /**
1396
1423
  * Embedding Model Name
1397
1424
  * name of the embedding model
@@ -1585,6 +1612,11 @@ export interface IStatusStatisticsPageResponseTask {
1585
1612
  * @default 0
1586
1613
  */
1587
1614
  cancelled?: number;
1615
+ /**
1616
+ * Pending
1617
+ * @default 0
1618
+ */
1619
+ pending?: number;
1588
1620
  }
1589
1621
  /** Task */
1590
1622
  export interface ITask {
@@ -1768,9 +1800,9 @@ export interface ITextCreate {
1768
1800
  export interface ITextSourceConfig {
1769
1801
  /**
1770
1802
  * Text
1771
- * Text content, length range 1-100000 characters
1803
+ * Text content, length range 1-1000000 characters
1772
1804
  * @minLength 1
1773
- * @maxLength 100000
1805
+ * @maxLength 10000000
1774
1806
  * @default ""
1775
1807
  */
1776
1808
  text?: string;
@@ -1840,9 +1872,9 @@ export interface IYuqueCreate {
1840
1872
  /**
1841
1873
  * Knowledge Type
1842
1874
  * type of knowledge resource
1843
- * @default "image"
1875
+ * @default "yuquedoc"
1844
1876
  */
1845
- knowledge_type?: "image";
1877
+ knowledge_type?: "yuquedoc" | "folder";
1846
1878
  /**
1847
1879
  * Knowledge Name
1848
1880
  * name of the knowledge resource
@@ -1855,8 +1887,12 @@ export interface IYuqueCreate {
1855
1887
  * @default {}
1856
1888
  */
1857
1889
  metadata?: Record<string, any>;
1858
- /** source type */
1859
- source_type: IKnowledgeSourceEnum;
1890
+ /**
1891
+ * Source Type
1892
+ * source type
1893
+ * @default "yuque"
1894
+ */
1895
+ source_type?: "yuque";
1860
1896
  /**
1861
1897
  * Embedding Model Name
1862
1898
  * name of the embedding model. you can set any other model if target embedding service registered
@@ -1879,7 +1915,7 @@ export interface IYuqueCreate {
1879
1915
  * Split Config
1880
1916
  * split config of the knowledge
1881
1917
  */
1882
- split_config: IGeaGraphSplitConfig | IBaseCharSplitConfig;
1918
+ split_config: IGeaGraphSplitConfig | IYuqueSplitConfig;
1883
1919
  }
1884
1920
  /** YuqueSourceConfig */
1885
1921
  export interface IYuqueSourceConfig {
@@ -1910,6 +1946,38 @@ export interface IYuqueSourceConfig {
1910
1946
  */
1911
1947
  auth_info: string;
1912
1948
  }
1949
+ /** YuqueSplitConfig */
1950
+ export interface IYuqueSplitConfig {
1951
+ /**
1952
+ * Chunk Size
1953
+ * chunk max size
1954
+ * @min 1
1955
+ * @default 1500
1956
+ */
1957
+ chunk_size?: number;
1958
+ /**
1959
+ * Chunk Overlap
1960
+ * chunk overlap size, must be less than chunk_size
1961
+ * @min 0
1962
+ * @default 150
1963
+ */
1964
+ chunk_overlap?: number;
1965
+ /**
1966
+ * Type
1967
+ * @default "yuque"
1968
+ */
1969
+ type?: "yuque";
1970
+ /**
1971
+ * Separators
1972
+ * List of separators to split the text. If None, uses default separators
1973
+ */
1974
+ separators: string[];
1975
+ /**
1976
+ * Is Separator Regex
1977
+ * If true, the separators should be in regular expression format.
1978
+ */
1979
+ is_separator_regex: boolean;
1980
+ }
1913
1981
  export type QueryParamsType = Record<string | number, any>;
1914
1982
  export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
1915
1983
  export interface FullRequestParams extends Omit<RequestInit, "body"> {
@@ -2000,6 +2068,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
2000
2068
  * @request POST:/api/knowledge/update
2001
2069
  */
2002
2070
  updateKnowledge: (data: IKnowledgeInput, params?: RequestParams) => Promise<HttpResponse<IResponseModelKnowledge, void | IHTTPValidationError>>;
2071
+ /**
2072
+ * No description
2073
+ *
2074
+ * @tags knowledge
2075
+ * @name UpdateKnowledgeEnableStatus
2076
+ * @summary Update Knowledge Enable Status
2077
+ * @request POST:/api/knowledge/update/enabled
2078
+ */
2079
+ updateKnowledgeEnableStatus: (data: IEnableStatusUpdate, params?: RequestParams) => Promise<HttpResponse<IResponseModelNoneType, void | IHTTPValidationError>>;
2003
2080
  /**
2004
2081
  * No description
2005
2082
  *
@@ -2241,7 +2318,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
2241
2318
  };
2242
2319
  space: {
2243
2320
  /**
2244
- * @description 获取知识库分页列表
2321
+ * No description
2245
2322
  *
2246
2323
  * @tags space
2247
2324
  * @name GetSpaceList
@@ -2250,7 +2327,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
2250
2327
  */
2251
2328
  getSpaceList: (data: IPageParamsSpace, params?: RequestParams) => Promise<HttpResponse<IResponseModelPageResponseSpaceResponse, void | IHTTPValidationError>>;
2252
2329
  /**
2253
- * @description 创建知识库
2330
+ * No description
2254
2331
  *
2255
2332
  * @tags space
2256
2333
  * @name AddSpace
@@ -2259,7 +2336,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
2259
2336
  */
2260
2337
  addSpace: (data: ISpaceCreate, params?: RequestParams) => Promise<HttpResponse<IResponseModelSpaceResponse, void | IHTTPValidationError>>;
2261
2338
  /**
2262
- * @description 删除知识库
2339
+ * No description
2263
2340
  *
2264
2341
  * @tags space
2265
2342
  * @name DeleteSpace
@@ -2268,7 +2345,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
2268
2345
  */
2269
2346
  deleteSpace: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelNoneType, void | IHTTPValidationError>>;
2270
2347
  /**
2271
- * @description 修改知识库信息,注意:tenant_id 和 space_id 字段不可修改
2348
+ * No description
2272
2349
  *
2273
2350
  * @tags space
2274
2351
  * @name UpdateSpace
@@ -2277,7 +2354,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
2277
2354
  */
2278
2355
  updateSpace: (spaceId: string, data: ISpaceCreate, params?: RequestParams) => Promise<HttpResponse<IResponseModelSpaceResponse, void | IHTTPValidationError>>;
2279
2356
  /**
2280
- * @description 获取知识库详情
2357
+ * No description
2281
2358
  *
2282
2359
  * @tags space
2283
2360
  * @name GetSpaceById
package/dist/api.js CHANGED
@@ -36,7 +36,7 @@ var ITaskStatus;
36
36
  })(ITaskStatus || (exports.ITaskStatus = ITaskStatus = {}));
37
37
  /**
38
38
  * KnowledgeTypeEnum
39
- * mime type of the knowledge
39
+ * mime type of the knowledge. If multiple files are included and require a decomposer, please set the type to 'folder'
40
40
  */
41
41
  var IKnowledgeTypeEnum;
42
42
  (function (IKnowledgeTypeEnum) {
@@ -240,6 +240,15 @@ class Api extends HttpClient {
240
240
  * @request POST:/api/knowledge/update
241
241
  */
242
242
  updateKnowledge: (data, params = {}) => this.request(Object.assign({ path: `/api/knowledge/update`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
243
+ /**
244
+ * No description
245
+ *
246
+ * @tags knowledge
247
+ * @name UpdateKnowledgeEnableStatus
248
+ * @summary Update Knowledge Enable Status
249
+ * @request POST:/api/knowledge/update/enabled
250
+ */
251
+ updateKnowledgeEnableStatus: (data, params = {}) => this.request(Object.assign({ path: `/api/knowledge/update/enabled`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
243
252
  /**
244
253
  * No description
245
254
  *
@@ -458,7 +467,7 @@ class Api extends HttpClient {
458
467
  };
459
468
  this.space = {
460
469
  /**
461
- * @description 获取知识库分页列表
470
+ * No description
462
471
  *
463
472
  * @tags space
464
473
  * @name GetSpaceList
@@ -467,7 +476,7 @@ class Api extends HttpClient {
467
476
  */
468
477
  getSpaceList: (data, params = {}) => this.request(Object.assign({ path: `/api/space/list`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
469
478
  /**
470
- * @description 创建知识库
479
+ * No description
471
480
  *
472
481
  * @tags space
473
482
  * @name AddSpace
@@ -476,7 +485,7 @@ class Api extends HttpClient {
476
485
  */
477
486
  addSpace: (data, params = {}) => this.request(Object.assign({ path: `/api/space/add`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
478
487
  /**
479
- * @description 删除知识库
488
+ * No description
480
489
  *
481
490
  * @tags space
482
491
  * @name DeleteSpace
@@ -485,7 +494,7 @@ class Api extends HttpClient {
485
494
  */
486
495
  deleteSpace: (spaceId, params = {}) => this.request(Object.assign({ path: `/api/space/${spaceId}`, method: "DELETE", format: "json" }, params)),
487
496
  /**
488
- * @description 修改知识库信息,注意:tenant_id 和 space_id 字段不可修改
497
+ * No description
489
498
  *
490
499
  * @tags space
491
500
  * @name UpdateSpace
@@ -494,7 +503,7 @@ class Api extends HttpClient {
494
503
  */
495
504
  updateSpace: (spaceId, data, params = {}) => this.request(Object.assign({ path: `/api/space/${spaceId}`, method: "PUT", body: data, type: ContentType.Json, format: "json" }, params)),
496
505
  /**
497
- * @description 获取知识库详情
506
+ * No description
498
507
  *
499
508
  * @tags space
500
509
  * @name GetSpaceById
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@petercatai/whisker-client",
3
- "version": "0.1.202505141055",
4
- "description": "Generated API client (Production)",
3
+ "version": "0.1.202505160550-dev",
4
+ "description": "Generated API client (preview)",
5
5
  "main": "dist/api.js",
6
6
  "types": "dist/api.d.ts",
7
7
  "files": [
@@ -13,10 +13,10 @@
13
13
  },
14
14
  "publishConfig": {
15
15
  "access": "public",
16
- "tag": "latest"
16
+ "tag": "dev"
17
17
  },
18
18
  "devDependencies": {
19
- "@types/node": "^22.15.17",
19
+ "@types/node": "^22.15.18",
20
20
  "axios": "^1.9.0",
21
21
  "typescript": "^5.8.3"
22
22
  }