@petercatai/whisker-client 0.0.1761293285 → 0.0.1763262163

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
@@ -125,7 +125,9 @@ export declare enum IKnowledgeSourceEnum {
125
125
  UserInputText = "user_input_text",
126
126
  CloudStorageText = "cloud_storage_text",
127
127
  CloudStorageImage = "cloud_storage_image",
128
- Yuque = "yuque"
128
+ Yuque = "yuque",
129
+ YuquePersonalDoc = "yuque_personal_doc",
130
+ YuquePersonalNote = "yuque_personal_note"
129
131
  }
130
132
  /** Action */
131
133
  export declare enum IAction {
@@ -514,6 +516,13 @@ export interface IBaseCodeSplitConfig {
514
516
  */
515
517
  chunk_overlap?: number;
516
518
  }
519
+ /** BatchQueryRequest */
520
+ export interface IBatchQueryRequest {
521
+ /** Space Id */
522
+ space_id: string;
523
+ /** Knowledge Names */
524
+ knowledge_names: string[];
525
+ }
517
526
  /** Chunk */
518
527
  export interface IChunkInput {
519
528
  /**
@@ -1143,7 +1152,7 @@ export interface IKnowledgeInput {
1143
1152
  * Source Config
1144
1153
  * source config of the knowledge
1145
1154
  */
1146
- source_config: IGithubRepoSourceConfig | IGithubFileSourceConfig | IS3SourceConfig | IOpenUrlSourceConfig | ITextSourceConfig | IYuqueSourceConfig;
1155
+ source_config: IGithubRepoSourceConfig | IGithubFileSourceConfig | IS3SourceConfig | IOpenUrlSourceConfig | ITextSourceConfig | IYuqueSourceConfig | IYuquePersonalDocSourceConfig | IYuquePersonalNoteSourceConfig;
1147
1156
  /**
1148
1157
  * Embedding Model Name
1149
1158
  * name of the embedding model. you can set any other model if target embedding service registered
@@ -1229,7 +1238,7 @@ export interface IKnowledgeOutput {
1229
1238
  * Source Config
1230
1239
  * source config of the knowledge
1231
1240
  */
1232
- source_config: IGithubRepoSourceConfig | IGithubFileSourceConfig | IS3SourceConfig | IOpenUrlSourceConfig | ITextSourceConfig | IYuqueSourceConfig;
1241
+ source_config: IGithubRepoSourceConfig | IGithubFileSourceConfig | IS3SourceConfig | IOpenUrlSourceConfig | ITextSourceConfig | IYuqueSourceConfig | IYuquePersonalDocSourceConfig | IYuquePersonalNoteSourceConfig;
1233
1242
  /**
1234
1243
  * Embedding Model Name
1235
1244
  * name of the embedding model. you can set any other model if target embedding service registered
@@ -2197,6 +2206,15 @@ export interface IResponseModelListTenantLog {
2197
2206
  /** Message */
2198
2207
  message?: string | null;
2199
2208
  }
2209
+ /** ResponseModel[List[WohuProductSpace]] */
2210
+ export interface IResponseModelListWohuProductSpace {
2211
+ /** Success */
2212
+ success: boolean;
2213
+ /** Data */
2214
+ data?: IWohuProductSpace[] | null;
2215
+ /** Message */
2216
+ message?: string | null;
2217
+ }
2200
2218
  /** ResponseModel[NoneType] */
2201
2219
  export interface IResponseModelNoneType {
2202
2220
  /** Success */
@@ -3510,6 +3528,27 @@ export interface IValidationError {
3510
3528
  /** Error Type */
3511
3529
  type: string;
3512
3530
  }
3531
+ /**
3532
+ * WohuProductSpace
3533
+ * 产品空间响应模型
3534
+ */
3535
+ export interface IWohuProductSpace {
3536
+ /**
3537
+ * Product Id
3538
+ * 空间ID
3539
+ */
3540
+ product_id: string;
3541
+ /**
3542
+ * Product Name
3543
+ * 空间名称
3544
+ */
3545
+ product_name: string;
3546
+ /**
3547
+ * Visit Url
3548
+ * 访问地址
3549
+ */
3550
+ visit_url: string;
3551
+ }
3513
3552
  /** YuqueCreate */
3514
3553
  export interface IYuqueCreate {
3515
3554
  /**
@@ -3565,19 +3604,45 @@ export interface IYuqueCreate {
3565
3604
  * Source Config
3566
3605
  * source config of the knowledge
3567
3606
  */
3568
- source_config: IYuqueSourceConfig | IOpenUrlSourceConfig | IOpenIdSourceConfig;
3607
+ source_config: IYuqueSourceConfig | IOpenUrlSourceConfig | IOpenIdSourceConfig | IYuquePersonalDocSourceConfig | IYuquePersonalNoteSourceConfig;
3569
3608
  /**
3570
3609
  * Split Config
3571
3610
  * split config of the knowledge
3572
3611
  */
3573
3612
  split_config: IGeaGraphSplitConfig | IYuqueSplitConfig;
3574
3613
  }
3614
+ /** YuquePersonalDocSourceConfig */
3615
+ export interface IYuquePersonalDocSourceConfig {
3616
+ /**
3617
+ * Doc Id
3618
+ * the yuque personal doc id
3619
+ */
3620
+ doc_id: number;
3621
+ /**
3622
+ * Auth Info
3623
+ * authentication information
3624
+ */
3625
+ auth_info: string;
3626
+ }
3627
+ /** YuquePersonalNoteSourceConfig */
3628
+ export interface IYuquePersonalNoteSourceConfig {
3629
+ /**
3630
+ * Note Id
3631
+ * the yuque personal note id
3632
+ */
3633
+ note_id: number;
3634
+ /**
3635
+ * Auth Info
3636
+ * authentication information
3637
+ */
3638
+ auth_info: string;
3639
+ }
3575
3640
  /** YuqueSourceConfig */
3576
3641
  export interface IYuqueSourceConfig {
3577
3642
  /**
3578
3643
  * Api Url
3579
3644
  * the yuque api url
3580
- * @default "https://www.yuque.com"
3645
+ * @default "https://yuque-api.antfin-inc.com"
3581
3646
  */
3582
3647
  api_url?: string;
3583
3648
  /**
@@ -3705,6 +3770,23 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
3705
3770
  * @request GET:/
3706
3771
  */
3707
3772
  homePageGet: (params?: RequestParams) => Promise<HttpResponse<any, any>>;
3773
+ user: {
3774
+ /**
3775
+ * @description 根据登录账号查询用户有权限的产品空间列表 Args: login_account: 用户登录账号 Returns: 用户有权限的产品空间列表
3776
+ *
3777
+ * @tags user
3778
+ * @name GetUserProductSpaces
3779
+ * @summary Get User Product Spaces
3780
+ * @request GET:/api/user/product-spaces
3781
+ */
3782
+ getUserProductSpaces: (query: {
3783
+ /**
3784
+ * Login Account
3785
+ * 用户登录账号
3786
+ */
3787
+ login_account: string;
3788
+ }, params?: RequestParams) => Promise<HttpResponse<IResponseModelListWohuProductSpace, void | IHTTPValidationError>>;
3789
+ };
3708
3790
  knowledge: {
3709
3791
  /**
3710
3792
  * @description 添加知识 使用DDD架构创建新的知识,禁止重复的file_sha条目。 通过TaskCoordinationService统一协调知识创建和任务执行,确保事务一致性。
@@ -3775,6 +3857,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
3775
3857
  * @request GET:/api/knowledge/embedding/models
3776
3858
  */
3777
3859
  getEmbeddingModelsList: (params?: RequestParams) => Promise<HttpResponse<any, void | IHTTPValidationError>>;
3860
+ /**
3861
+ * @description 根据wohu知识库ID(space_id)和素材ID列表(knowledge_name)批量查询知识 支持最多114个素材ID的批量查询 素材ID对应knowledge_name字段 Args: body.space_id: wohu知识库ID body.knowledge_names: 素材ID列表(knowledge_name) Returns: 符合条件的知识列表
3862
+ *
3863
+ * @tags knowledge
3864
+ * @name BatchQueryKnowledgeByNames
3865
+ * @summary Batch Query Knowledge By Names
3866
+ * @request POST:/api/knowledge/batch_query_by_names
3867
+ */
3868
+ batchQueryKnowledgeByNames: (data: IBatchQueryRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelListKnowledge, void | IHTTPValidationError>>;
3778
3869
  };
3779
3870
  retrieval: {
3780
3871
  /**
@@ -3796,7 +3887,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
3796
3887
  */
3797
3888
  retrieveSpaceContent: (data: IRetrievalBySpaceRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelListRetrievalChunk, void | IHTTPValidationError>>;
3798
3889
  /**
3799
- * @description Retrieve chunks within a space_id, for example, given a petercat bot_id, retrieve all chunks under that bot_id. 使用DDD架构的RetrievalService进行检索。
3890
+ * @description Retrieve chunks within a space_id, for example, given a petercat bot_id, retrieve all chunks under that bot_id.
3800
3891
  *
3801
3892
  * @tags retrieval
3802
3893
  * @name Retrieve
@@ -3804,6 +3895,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
3804
3895
  * @request POST:/api/retrieval/
3805
3896
  */
3806
3897
  retrieve: (data: IRetrievalRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelListRetrievalChunk, void | IHTTPValidationError>>;
3898
+ /**
3899
+ * @description 因为 antvis 要对公网开放相关信息,故提供本单独接口
3900
+ *
3901
+ * @tags retrieval
3902
+ * @name AntvisRetrieve
3903
+ * @summary Context7 Antvis Retrieve
3904
+ * @request POST:/api/retrieval/context7/antvis
3905
+ */
3906
+ antvisRetrieve: (data: IRetrievalRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelListRetrievalChunk, void | IHTTPValidationError>>;
3807
3907
  };
3808
3908
  task: {
3809
3909
  /**
package/dist/api.js CHANGED
@@ -158,6 +158,8 @@ var IKnowledgeSourceEnum;
158
158
  IKnowledgeSourceEnum["CloudStorageText"] = "cloud_storage_text";
159
159
  IKnowledgeSourceEnum["CloudStorageImage"] = "cloud_storage_image";
160
160
  IKnowledgeSourceEnum["Yuque"] = "yuque";
161
+ IKnowledgeSourceEnum["YuquePersonalDoc"] = "yuque_personal_doc";
162
+ IKnowledgeSourceEnum["YuquePersonalNote"] = "yuque_personal_note";
161
163
  })(IKnowledgeSourceEnum || (exports.IKnowledgeSourceEnum = IKnowledgeSourceEnum = {}));
162
164
  /** Action */
163
165
  var IAction;
@@ -327,6 +329,17 @@ class Api extends HttpClient {
327
329
  * @request GET:/
328
330
  */
329
331
  this.homePageGet = (params = {}) => this.request(Object.assign({ path: `/`, method: "GET", format: "json" }, params));
332
+ this.user = {
333
+ /**
334
+ * @description 根据登录账号查询用户有权限的产品空间列表 Args: login_account: 用户登录账号 Returns: 用户有权限的产品空间列表
335
+ *
336
+ * @tags user
337
+ * @name GetUserProductSpaces
338
+ * @summary Get User Product Spaces
339
+ * @request GET:/api/user/product-spaces
340
+ */
341
+ getUserProductSpaces: (query, params = {}) => this.request(Object.assign({ path: `/api/user/product-spaces`, method: "GET", query: query, format: "json" }, params)),
342
+ };
330
343
  this.knowledge = {
331
344
  /**
332
345
  * @description 添加知识 使用DDD架构创建新的知识,禁止重复的file_sha条目。 通过TaskCoordinationService统一协调知识创建和任务执行,确保事务一致性。
@@ -391,6 +404,15 @@ class Api extends HttpClient {
391
404
  * @request GET:/api/knowledge/embedding/models
392
405
  */
393
406
  getEmbeddingModelsList: (params = {}) => this.request(Object.assign({ path: `/api/knowledge/embedding/models`, method: "GET", format: "json" }, params)),
407
+ /**
408
+ * @description 根据wohu知识库ID(space_id)和素材ID列表(knowledge_name)批量查询知识 支持最多114个素材ID的批量查询 素材ID对应knowledge_name字段 Args: body.space_id: wohu知识库ID body.knowledge_names: 素材ID列表(knowledge_name) Returns: 符合条件的知识列表
409
+ *
410
+ * @tags knowledge
411
+ * @name BatchQueryKnowledgeByNames
412
+ * @summary Batch Query Knowledge By Names
413
+ * @request POST:/api/knowledge/batch_query_by_names
414
+ */
415
+ batchQueryKnowledgeByNames: (data, params = {}) => this.request(Object.assign({ path: `/api/knowledge/batch_query_by_names`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
394
416
  };
395
417
  this.retrieval = {
396
418
  /**
@@ -412,7 +434,7 @@ class Api extends HttpClient {
412
434
  */
413
435
  retrieveSpaceContent: (data, params = {}) => this.request(Object.assign({ path: `/api/retrieval/space`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
414
436
  /**
415
- * @description Retrieve chunks within a space_id, for example, given a petercat bot_id, retrieve all chunks under that bot_id. 使用DDD架构的RetrievalService进行检索。
437
+ * @description Retrieve chunks within a space_id, for example, given a petercat bot_id, retrieve all chunks under that bot_id.
416
438
  *
417
439
  * @tags retrieval
418
440
  * @name Retrieve
@@ -420,6 +442,15 @@ class Api extends HttpClient {
420
442
  * @request POST:/api/retrieval/
421
443
  */
422
444
  retrieve: (data, params = {}) => this.request(Object.assign({ path: `/api/retrieval/`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
445
+ /**
446
+ * @description 因为 antvis 要对公网开放相关信息,故提供本单独接口
447
+ *
448
+ * @tags retrieval
449
+ * @name AntvisRetrieve
450
+ * @summary Context7 Antvis Retrieve
451
+ * @request POST:/api/retrieval/context7/antvis
452
+ */
453
+ antvisRetrieve: (data, params = {}) => this.request(Object.assign({ path: `/api/retrieval/context7/antvis`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
423
454
  };
424
455
  this.task = {
425
456
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@petercatai/whisker-client",
3
- "version": "0.0.1761293285",
3
+ "version": "0.0.1763262163",
4
4
  "description": "Generated API client (Production)",
5
5
  "main": "dist/api.js",
6
6
  "types": "dist/api.d.ts",
@@ -16,8 +16,8 @@
16
16
  "tag": "latest"
17
17
  },
18
18
  "devDependencies": {
19
- "@types/node": "^24.9.1",
20
- "axios": "^1.12.2",
19
+ "@types/node": "^24.10.1",
20
+ "axios": "^1.13.2",
21
21
  "typescript": "^5.9.3"
22
22
  }
23
23
  }