@petercatai/whisker-client 0.1.202504211903-dev → 0.1.202504211908-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.
package/dist/api.d.ts CHANGED
@@ -873,6 +873,40 @@ export interface IPageParamsKnowledge {
873
873
  */
874
874
  eq_conditions?: object | null;
875
875
  }
876
+ /** PageParams[Space] */
877
+ export interface IPageParamsSpace {
878
+ /**
879
+ * Page
880
+ * page number
881
+ * @min 1
882
+ * @default 1
883
+ */
884
+ page?: number;
885
+ /**
886
+ * Page Size
887
+ * page size
888
+ * @min 1
889
+ * @max 1000
890
+ * @default 10
891
+ */
892
+ page_size?: number;
893
+ /**
894
+ * Order By
895
+ * order by field
896
+ */
897
+ order_by?: string | null;
898
+ /**
899
+ * Order Direction
900
+ * asc or desc
901
+ * @default "asc"
902
+ */
903
+ order_direction?: string | null;
904
+ /**
905
+ * Eq Conditions
906
+ * list of equality conditions, each as a dict with key and value
907
+ */
908
+ eq_conditions?: object | null;
909
+ }
876
910
  /** PageParams[Task] */
877
911
  export interface IPageParamsTask {
878
912
  /**
@@ -933,6 +967,19 @@ export interface IPageResponseKnowledge {
933
967
  /** Total Pages */
934
968
  total_pages: number;
935
969
  }
970
+ /** PageResponse[SpaceResponse] */
971
+ export interface IPageResponseSpaceResponse {
972
+ /** Items */
973
+ items: ISpaceResponse[];
974
+ /** Total */
975
+ total: number;
976
+ /** Page */
977
+ page: number;
978
+ /** Page Size */
979
+ page_size: number;
980
+ /** Total Pages */
981
+ total_pages: number;
982
+ }
936
983
  /** QACreate */
937
984
  export interface IQACreate {
938
985
  /**
@@ -1060,6 +1107,22 @@ export interface IResponseModelPageResponseKnowledge {
1060
1107
  /** Message */
1061
1108
  message?: string | null;
1062
1109
  }
1110
+ /** ResponseModel[PageResponse[SpaceResponse]] */
1111
+ export interface IResponseModelPageResponseSpaceResponse {
1112
+ /** Success */
1113
+ success: boolean;
1114
+ data?: IPageResponseSpaceResponse | null;
1115
+ /** Message */
1116
+ message?: string | null;
1117
+ }
1118
+ /** ResponseModel[SpaceResponse] */
1119
+ export interface IResponseModelSpaceResponse {
1120
+ /** Success */
1121
+ success: boolean;
1122
+ data?: ISpaceResponse | null;
1123
+ /** Message */
1124
+ message?: string | null;
1125
+ }
1063
1126
  /** ResponseModel[StatusStatisticsPageResponse[Task]] */
1064
1127
  export interface IResponseModelStatusStatisticsPageResponseTask {
1065
1128
  /** Success */
@@ -1252,6 +1315,81 @@ export interface IS3SourceConfig {
1252
1315
  */
1253
1316
  session_token?: string | null;
1254
1317
  }
1318
+ /**
1319
+ * SpaceCreate
1320
+ * SpaceCreate model for creating space resources.
1321
+ * Attributes:
1322
+ * space_name (str): Space name, example: petercat bot group.
1323
+ * description (str): descrition of the space resource.
1324
+ */
1325
+ export interface ISpaceCreate {
1326
+ /**
1327
+ * Space Name
1328
+ * name of the space resource
1329
+ * @maxLength 64
1330
+ */
1331
+ space_name: string;
1332
+ /**
1333
+ * Description
1334
+ * descrition of the space
1335
+ * @maxLength 255
1336
+ */
1337
+ description: string;
1338
+ }
1339
+ /**
1340
+ * SpaceResponse
1341
+ * SpaceResponse model class that extends Space.
1342
+ * Attributes:
1343
+ * (str): Space ID.
1344
+ * total_size Optional[int]: size of the all kowledge in this space.
1345
+ * knowledge_size Optional[int]: count of the knowledge in this space.
1346
+ */
1347
+ export interface ISpaceResponse {
1348
+ /**
1349
+ * Space Name
1350
+ * name of the space resource
1351
+ * @maxLength 64
1352
+ */
1353
+ space_name: string;
1354
+ /**
1355
+ * Description
1356
+ * descrition of the space
1357
+ * @maxLength 255
1358
+ */
1359
+ description: string;
1360
+ /**
1361
+ * Space Id
1362
+ * space id
1363
+ */
1364
+ space_id?: string;
1365
+ /**
1366
+ * Gmt Create
1367
+ * creation time
1368
+ */
1369
+ gmt_create?: string;
1370
+ /**
1371
+ * Gmt Modified
1372
+ * update time
1373
+ */
1374
+ gmt_modified?: string;
1375
+ /**
1376
+ * Tenant Id
1377
+ * tenant id
1378
+ */
1379
+ tenant_id: string;
1380
+ /**
1381
+ * Storage Size
1382
+ * size of the all kowledge in this space
1383
+ * @default 0
1384
+ */
1385
+ storage_size?: number | null;
1386
+ /**
1387
+ * Knowledge Count
1388
+ * count of the knowledge in this space
1389
+ * @default 0
1390
+ */
1391
+ knowledge_count?: number | null;
1392
+ }
1255
1393
  /** StatusStatisticsPageResponse[Task] */
1256
1394
  export interface IStatusStatisticsPageResponseTask {
1257
1395
  /** Items */
@@ -1720,6 +1858,53 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
1720
1858
  */
1721
1859
  getTenant: (params?: RequestParams) => Promise<HttpResponse<any, void | IHTTPValidationError>>;
1722
1860
  };
1861
+ space: {
1862
+ /**
1863
+ * @description 获取知识库分页列表
1864
+ *
1865
+ * @tags space
1866
+ * @name GetSpaceList
1867
+ * @summary Get Space List
1868
+ * @request POST:/api/space/list
1869
+ */
1870
+ getSpaceList: (data: IPageParamsSpace, params?: RequestParams) => Promise<HttpResponse<IResponseModelPageResponseSpaceResponse, void | IHTTPValidationError>>;
1871
+ /**
1872
+ * @description 创建知识库
1873
+ *
1874
+ * @tags space
1875
+ * @name AddSpace
1876
+ * @summary Add Space
1877
+ * @request POST:/api/space/add
1878
+ */
1879
+ addSpace: (data: ISpaceCreate, params?: RequestParams) => Promise<HttpResponse<IResponseModelSpaceResponse, void | IHTTPValidationError>>;
1880
+ /**
1881
+ * @description 删除知识库
1882
+ *
1883
+ * @tags space
1884
+ * @name DeleteSpace
1885
+ * @summary Delete Space
1886
+ * @request DELETE:/api/space/{space_id}
1887
+ */
1888
+ deleteSpace: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelNoneType, void | IHTTPValidationError>>;
1889
+ /**
1890
+ * @description 修改知识库信息,注意:tenant_id 和 space_id 字段不可修改
1891
+ *
1892
+ * @tags space
1893
+ * @name UpdateSpace
1894
+ * @summary Update Space
1895
+ * @request PUT:/api/space/{space_id}
1896
+ */
1897
+ updateSpace: (spaceId: string, data: ISpaceCreate, params?: RequestParams) => Promise<HttpResponse<IResponseModelSpaceResponse, void | IHTTPValidationError>>;
1898
+ /**
1899
+ * @description 获取知识库详情
1900
+ *
1901
+ * @tags space
1902
+ * @name GetSpaceById
1903
+ * @summary Get Space By Id
1904
+ * @request GET:/api/space/{space_id}
1905
+ */
1906
+ getSpaceById: (spaceId: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelSpaceResponse, void | IHTTPValidationError>>;
1907
+ };
1723
1908
  healthChecker: {
1724
1909
  /**
1725
1910
  * No description
package/dist/api.js CHANGED
@@ -360,6 +360,53 @@ class Api extends HttpClient {
360
360
  */
361
361
  getTenant: (params = {}) => this.request(Object.assign({ path: `/api/tenant/me`, method: "GET", format: "json" }, params)),
362
362
  };
363
+ this.space = {
364
+ /**
365
+ * @description 获取知识库分页列表
366
+ *
367
+ * @tags space
368
+ * @name GetSpaceList
369
+ * @summary Get Space List
370
+ * @request POST:/api/space/list
371
+ */
372
+ getSpaceList: (data, params = {}) => this.request(Object.assign({ path: `/api/space/list`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
373
+ /**
374
+ * @description 创建知识库
375
+ *
376
+ * @tags space
377
+ * @name AddSpace
378
+ * @summary Add Space
379
+ * @request POST:/api/space/add
380
+ */
381
+ addSpace: (data, params = {}) => this.request(Object.assign({ path: `/api/space/add`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
382
+ /**
383
+ * @description 删除知识库
384
+ *
385
+ * @tags space
386
+ * @name DeleteSpace
387
+ * @summary Delete Space
388
+ * @request DELETE:/api/space/{space_id}
389
+ */
390
+ deleteSpace: (spaceId, params = {}) => this.request(Object.assign({ path: `/api/space/${spaceId}`, method: "DELETE", format: "json" }, params)),
391
+ /**
392
+ * @description 修改知识库信息,注意:tenant_id 和 space_id 字段不可修改
393
+ *
394
+ * @tags space
395
+ * @name UpdateSpace
396
+ * @summary Update Space
397
+ * @request PUT:/api/space/{space_id}
398
+ */
399
+ updateSpace: (spaceId, data, params = {}) => this.request(Object.assign({ path: `/api/space/${spaceId}`, method: "PUT", body: data, type: ContentType.Json, format: "json" }, params)),
400
+ /**
401
+ * @description 获取知识库详情
402
+ *
403
+ * @tags space
404
+ * @name GetSpaceById
405
+ * @summary Get Space By Id
406
+ * @request GET:/api/space/{space_id}
407
+ */
408
+ getSpaceById: (spaceId, params = {}) => this.request(Object.assign({ path: `/api/space/${spaceId}`, method: "GET", format: "json" }, params)),
409
+ };
363
410
  this.healthChecker = {
364
411
  /**
365
412
  * No description
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@petercatai/whisker-client",
3
- "version": "0.1.202504211903-dev",
3
+ "version": "0.1.202504211908-dev",
4
4
  "description": "Generated API client (dev)",
5
5
  "main": "dist/api.js",
6
6
  "types": "dist/api.d.ts",