@petercatai/whisker-client 3.0.202603061556 → 4.0.0

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 +179 -116
  2. package/dist/api.js +71 -2
  3. package/package.json +2 -2
package/dist/api.d.ts CHANGED
@@ -136,6 +136,20 @@ export declare enum IResource {
136
136
  Tagging = "tagging",
137
137
  Artifact = "artifact"
138
138
  }
139
+ /** PublicEndpointId */
140
+ export declare enum IPublicEndpointId {
141
+ TenantGetTenantMe = "tenant.get_tenant_me",
142
+ SpaceGetSpaceList = "space.get_space_list",
143
+ SpaceGetSpaceById = "space.get_space_by_id",
144
+ KnowledgeGetKnowledgeList = "knowledge.get_knowledge_list",
145
+ KnowledgeGetKnowledgeById = "knowledge.get_knowledge_by_id",
146
+ TaskGetSupportedTaskTypes = "task.get_supported_task_types",
147
+ TaskGetTaskList = "task.get_task_list",
148
+ TaskGetTaskDetail = "task.get_task_detail",
149
+ RetrievalRetrieveKnowledgeContent = "retrieval.retrieve_knowledge_content",
150
+ RetrievalRetrieveSpaceContent = "retrieval.retrieve_space_content",
151
+ RetrievalRetrieve = "retrieval.retrieve"
152
+ }
139
153
  /** Operator */
140
154
  export declare enum IOperator {
141
155
  And = "and",
@@ -1298,11 +1312,8 @@ export interface IDocxCreate {
1298
1312
  * parent id of the knowledge
1299
1313
  */
1300
1314
  parent_id?: string | null;
1301
- /**
1302
- * Source Config
1303
- * source config of the knowledge
1304
- */
1305
- source_config: IOpenUrlSourceConfig | IOpenIdSourceConfig | IS3SourceConfig;
1315
+ /** source config of the knowledge */
1316
+ source_config: IOpenUrlSourceConfig;
1306
1317
  /** split config of the knowledge (markdown after markitdown conversion) */
1307
1318
  split_config: IMarkdownSplitConfig;
1308
1319
  }
@@ -1739,7 +1750,7 @@ export interface IHituNodePackageElementCreate {
1739
1750
  * Source Config
1740
1751
  * source config of the knowledge
1741
1752
  */
1742
- source_config: ITextSourceConfig | IOpenUrlSourceConfig | IOpenIdSourceConfig | IS3SourceConfig;
1753
+ source_config: ITextSourceConfig | IOpenUrlSourceConfig;
1743
1754
  /** split config of the knowledge */
1744
1755
  split_config: ITextSplitConfig;
1745
1756
  }
@@ -1807,7 +1818,7 @@ export interface IImageCreate {
1807
1818
  * Source Config
1808
1819
  * source config of the knowledge
1809
1820
  */
1810
- source_config: IOpenUrlSourceConfig | IOpenIdSourceConfig | IS3SourceConfig | ITextSourceConfig;
1821
+ source_config: IOpenUrlSourceConfig | ITextSourceConfig;
1811
1822
  /**
1812
1823
  * Split Config
1813
1824
  * split config of the knowledge
@@ -1873,7 +1884,7 @@ export interface IJSONCreate {
1873
1884
  * Source Config
1874
1885
  * source config of the knowledge
1875
1886
  */
1876
- source_config: ITextSourceConfig | IOpenUrlSourceConfig | IOpenIdSourceConfig | IS3SourceConfig;
1887
+ source_config: ITextSourceConfig | IOpenUrlSourceConfig;
1877
1888
  /** split config of the knowledge */
1878
1889
  split_config: IJSONSplitConfig;
1879
1890
  }
@@ -1949,7 +1960,7 @@ export interface IKnowledgeInput {
1949
1960
  * Source Config
1950
1961
  * source config of the knowledge
1951
1962
  */
1952
- source_config: IGithubRepoSourceConfig | IGithubFileSourceConfig | IS3SourceConfig | IOpenUrlSourceConfig | ITextSourceConfig | IOpenIdSourceConfig | IYuqueSourceConfig | IYuquePersonalDocSourceConfig | IYuquePersonalNoteSourceConfig | INodePackageSourceConfig | IFolderSourceConfig;
1963
+ source_config: IGithubRepoSourceConfig | IGithubFileSourceConfig | IOpenUrlSourceConfig | ITextSourceConfig | IYuqueSourceConfig | IYuquePersonalDocSourceConfig | IYuquePersonalNoteSourceConfig | INodePackageSourceConfig | IFolderSourceConfig;
1953
1964
  /**
1954
1965
  * Embedding Model Name
1955
1966
  * name of the embedding model. you can set any other model if target embedding service registered
@@ -1959,7 +1970,7 @@ export interface IKnowledgeInput {
1959
1970
  * Split Config
1960
1971
  * configuration for splitting the knowledge
1961
1972
  */
1962
- split_config: IMarkdownSplitConfig | ITextSplitConfig | IJSONSplitConfig | IPDFSplitConfig | IYuqueSplitConfig | IGeaGraphSplitConfig | IGithubRepoParseConfig | IBaseCodeSplitConfig | IImageSplitConfig | INodePackageParseConfig | IMemorySplitConfig | IFolderSplitConfig | IBaseCharSplitConfig;
1973
+ split_config: IMarkdownSplitConfig | ITextSplitConfig | IJSONSplitConfig | IYuqueSplitConfig | IGeaGraphSplitConfig | IGithubRepoParseConfig | IBaseCodeSplitConfig | IImageSplitConfig | INodePackageParseConfig | IMemorySplitConfig | IFolderSplitConfig | IBaseCharSplitConfig;
1963
1974
  /**
1964
1975
  * File Sha
1965
1976
  * SHA of the file
@@ -2035,7 +2046,7 @@ export interface IKnowledgeOutput {
2035
2046
  * Source Config
2036
2047
  * source config of the knowledge
2037
2048
  */
2038
- source_config: IGithubRepoSourceConfig | IGithubFileSourceConfig | IS3SourceConfig | IOpenUrlSourceConfig | ITextSourceConfig | IOpenIdSourceConfig | IYuqueSourceConfig | IYuquePersonalDocSourceConfig | IYuquePersonalNoteSourceConfig | INodePackageSourceConfig | IFolderSourceConfig;
2049
+ source_config: IGithubRepoSourceConfig | IGithubFileSourceConfig | IOpenUrlSourceConfig | ITextSourceConfig | IYuqueSourceConfig | IYuquePersonalDocSourceConfig | IYuquePersonalNoteSourceConfig | INodePackageSourceConfig | IFolderSourceConfig;
2039
2050
  /**
2040
2051
  * Embedding Model Name
2041
2052
  * name of the embedding model. you can set any other model if target embedding service registered
@@ -2045,7 +2056,7 @@ export interface IKnowledgeOutput {
2045
2056
  * Split Config
2046
2057
  * configuration for splitting the knowledge
2047
2058
  */
2048
- split_config: IMarkdownSplitConfig | ITextSplitConfig | IJSONSplitConfig | IPDFSplitConfig | IYuqueSplitConfig | IGeaGraphSplitConfig | IGithubRepoParseConfig | IBaseCodeSplitConfig | IImageSplitConfig | INodePackageParseConfig | IMemorySplitConfig | IFolderSplitConfig | IBaseCharSplitConfig;
2059
+ split_config: IMarkdownSplitConfig | ITextSplitConfig | IJSONSplitConfig | IYuqueSplitConfig | IGeaGraphSplitConfig | IGithubRepoParseConfig | IBaseCodeSplitConfig | IImageSplitConfig | INodePackageParseConfig | IMemorySplitConfig | IFolderSplitConfig | IBaseCharSplitConfig;
2049
2060
  /**
2050
2061
  * File Sha
2051
2062
  * SHA of the file
@@ -2287,7 +2298,7 @@ export interface IKnowledgeResponse {
2287
2298
  * Source Config
2288
2299
  * source config of the knowledge
2289
2300
  */
2290
- source_config: IGithubRepoSourceConfig | IGithubFileSourceConfig | IS3SourceConfig | IOpenUrlSourceConfig | ITextSourceConfig | IOpenIdSourceConfig | IYuqueSourceConfig | IYuquePersonalDocSourceConfig | IYuquePersonalNoteSourceConfig | INodePackageSourceConfig | IFolderSourceConfig;
2301
+ source_config: IGithubRepoSourceConfig | IGithubFileSourceConfig | IOpenUrlSourceConfig | ITextSourceConfig | IYuqueSourceConfig | IYuquePersonalDocSourceConfig | IYuquePersonalNoteSourceConfig | INodePackageSourceConfig | IFolderSourceConfig;
2291
2302
  /**
2292
2303
  * Embedding Model Name
2293
2304
  * name of the embedding model. you can set any other model if target embedding service registered
@@ -2297,7 +2308,7 @@ export interface IKnowledgeResponse {
2297
2308
  * Split Config
2298
2309
  * configuration for splitting the knowledge
2299
2310
  */
2300
- split_config: IMarkdownSplitConfig | ITextSplitConfig | IJSONSplitConfig | IPDFSplitConfig | IYuqueSplitConfig | IGeaGraphSplitConfig | IGithubRepoParseConfig | IBaseCodeSplitConfig | IImageSplitConfig | INodePackageParseConfig | IMemorySplitConfig | IFolderSplitConfig | IBaseCharSplitConfig;
2311
+ split_config: IMarkdownSplitConfig | ITextSplitConfig | IJSONSplitConfig | IYuqueSplitConfig | IGeaGraphSplitConfig | IGithubRepoParseConfig | IBaseCodeSplitConfig | IImageSplitConfig | INodePackageParseConfig | IMemorySplitConfig | IFolderSplitConfig | IBaseCharSplitConfig;
2301
2312
  /**
2302
2313
  * File Sha
2303
2314
  * SHA of the file
@@ -2403,7 +2414,7 @@ export interface IMarkdownCreate {
2403
2414
  * Source Config
2404
2415
  * source config of the knowledge
2405
2416
  */
2406
- source_config: ITextSourceConfig | IOpenUrlSourceConfig | IOpenIdSourceConfig | IS3SourceConfig;
2417
+ source_config: ITextSourceConfig | IOpenUrlSourceConfig;
2407
2418
  /** split config of the knowledge */
2408
2419
  split_config: IMarkdownSplitConfig;
2409
2420
  }
@@ -2855,19 +2866,6 @@ export interface INodePackageSourceConfig {
2855
2866
  */
2856
2867
  package_version: string;
2857
2868
  }
2858
- /** OpenIdSourceConfig */
2859
- export interface IOpenIdSourceConfig {
2860
- /**
2861
- * Id
2862
- * cloud storage file id, used for afts
2863
- */
2864
- id: string;
2865
- /**
2866
- * Auth Info
2867
- * authentication information
2868
- */
2869
- auth_info?: string | Record<string, any> | null;
2870
- }
2871
2869
  /** OpenUrlSourceConfig */
2872
2870
  export interface IOpenUrlSourceConfig {
2873
2871
  /**
@@ -2931,51 +2929,11 @@ export interface IPDFCreate {
2931
2929
  * parent id of the knowledge
2932
2930
  */
2933
2931
  parent_id?: string | null;
2934
- /**
2935
- * Source Config
2936
- * source config of the knowledge
2937
- */
2938
- source_config: IOpenUrlSourceConfig | IOpenIdSourceConfig | IS3SourceConfig;
2932
+ /** source config of the knowledge */
2933
+ source_config: IOpenUrlSourceConfig;
2939
2934
  /** split config of the knowledge (markdown after markitdown conversion) */
2940
2935
  split_config: IMarkdownSplitConfig;
2941
2936
  }
2942
- /**
2943
- * PDFSplitConfig
2944
- * PDF document split configuration
2945
- */
2946
- export interface IPDFSplitConfig {
2947
- /**
2948
- * Chunk Size
2949
- * chunk max size
2950
- * @min 1
2951
- * @default 1500
2952
- */
2953
- chunk_size?: number;
2954
- /**
2955
- * Chunk Overlap
2956
- * chunk overlap size, must be less than chunk_size
2957
- * @min 0
2958
- * @default 150
2959
- */
2960
- chunk_overlap?: number;
2961
- /**
2962
- * Type
2963
- * @default "pdf"
2964
- */
2965
- type?: "pdf";
2966
- /**
2967
- * Extract Images
2968
- * Whether to extract images
2969
- * @default false
2970
- */
2971
- extract_images?: boolean;
2972
- /**
2973
- * Table Extract Mode
2974
- * Table extraction mode: 'text' or 'structure'
2975
- * @default "text"
2976
- */
2977
- table_extract_mode?: string;
2978
- }
2979
2937
  /** PageQueryParams[APIKey] */
2980
2938
  export interface IPageQueryParamsAPIKey {
2981
2939
  /**
@@ -3573,6 +3531,19 @@ export interface IPageResponseKnowledgeResponse {
3573
3531
  /** Total Pages */
3574
3532
  total_pages: number;
3575
3533
  }
3534
+ /** PageResponse[PublicReadTenantItem] */
3535
+ export interface IPageResponsePublicReadTenantItem {
3536
+ /** Items */
3537
+ items: IPublicReadTenantItem[];
3538
+ /** Total */
3539
+ total: number;
3540
+ /** Page */
3541
+ page: number;
3542
+ /** Page Size */
3543
+ page_size: number;
3544
+ /** Total Pages */
3545
+ total_pages: number;
3546
+ }
3576
3547
  /** PageResponse[SchedulerJob] */
3577
3548
  export interface IPageResponseSchedulerJob {
3578
3549
  /** Items */
@@ -3748,14 +3719,24 @@ export interface IPowerPointCreate {
3748
3719
  * parent id of the knowledge
3749
3720
  */
3750
3721
  parent_id?: string | null;
3751
- /**
3752
- * Source Config
3753
- * source config of the knowledge
3754
- */
3755
- source_config: IOpenUrlSourceConfig | IOpenIdSourceConfig | IS3SourceConfig;
3722
+ /** source config of the knowledge */
3723
+ source_config: IOpenUrlSourceConfig;
3756
3724
  /** split config of the knowledge (markdown after markitdown conversion) */
3757
3725
  split_config: IMarkdownSplitConfig;
3758
3726
  }
3727
+ /** PublicReadEndpointIdItem */
3728
+ export interface IPublicReadEndpointIdItem {
3729
+ value: IPublicEndpointId;
3730
+ }
3731
+ /** PublicReadTenantItem */
3732
+ export interface IPublicReadTenantItem {
3733
+ /** Tenant Id */
3734
+ tenant_id: string;
3735
+ /** Tenant Name */
3736
+ tenant_name: string;
3737
+ /** Endpoints */
3738
+ endpoints: Record<string, string>[];
3739
+ }
3759
3740
  /** QACreate */
3760
3741
  export interface IQACreate {
3761
3742
  /**
@@ -4037,6 +4018,15 @@ export interface IResponseModelListDictStrAny {
4037
4018
  /** Message */
4038
4019
  message?: string | null;
4039
4020
  }
4021
+ /** ResponseModel[List[Dict[str, str]]] */
4022
+ export interface IResponseModelListDictStrStr {
4023
+ /** Success */
4024
+ success: boolean;
4025
+ /** Data */
4026
+ data?: Record<string, string>[] | null;
4027
+ /** Message */
4028
+ message?: string | null;
4029
+ }
4040
4030
  /** ResponseModel[List[Knowledge]] */
4041
4031
  export interface IResponseModelListKnowledge {
4042
4032
  /** Success */
@@ -4055,6 +4045,15 @@ export interface IResponseModelListMemory {
4055
4045
  /** Message */
4056
4046
  message?: string | null;
4057
4047
  }
4048
+ /** ResponseModel[List[PublicReadEndpointIdItem]] */
4049
+ export interface IResponseModelListPublicReadEndpointIdItem {
4050
+ /** Success */
4051
+ success: boolean;
4052
+ /** Data */
4053
+ data?: IPublicReadEndpointIdItem[] | null;
4054
+ /** Message */
4055
+ message?: string | null;
4056
+ }
4058
4057
  /** ResponseModel[List[RetrievalChunk]] */
4059
4058
  export interface IResponseModelListRetrievalChunk {
4060
4059
  /** Success */
@@ -4192,6 +4191,14 @@ export interface IResponseModelPageResponseKnowledgeResponse {
4192
4191
  /** Message */
4193
4192
  message?: string | null;
4194
4193
  }
4194
+ /** ResponseModel[PageResponse[PublicReadTenantItem]] */
4195
+ export interface IResponseModelPageResponsePublicReadTenantItem {
4196
+ /** Success */
4197
+ success: boolean;
4198
+ data?: IPageResponsePublicReadTenantItem | null;
4199
+ /** Message */
4200
+ message?: string | null;
4201
+ }
4195
4202
  /** ResponseModel[PageResponse[SchedulerJob]] */
4196
4203
  export interface IResponseModelPageResponseSchedulerJob {
4197
4204
  /** Success */
@@ -4637,44 +4644,6 @@ export interface IRetryDeliveryRequest {
4637
4644
  */
4638
4645
  tenant_id: string;
4639
4646
  }
4640
- /** S3SourceConfig */
4641
- export interface IS3SourceConfig {
4642
- /**
4643
- * Bucket
4644
- * s3 bucket name
4645
- */
4646
- bucket: string;
4647
- /**
4648
- * Key
4649
- * s3 key
4650
- */
4651
- key: string;
4652
- /**
4653
- * Version Id
4654
- * s3 version id
4655
- */
4656
- version_id?: string | null;
4657
- /**
4658
- * Region
4659
- * s3 region
4660
- */
4661
- region?: string | null;
4662
- /**
4663
- * Access Key
4664
- * s3 access key
4665
- */
4666
- access_key?: string | null;
4667
- /**
4668
- * Secret Key
4669
- * s3 secret key
4670
- */
4671
- secret_key?: string | null;
4672
- /**
4673
- * Auth Info
4674
- * s3 session token
4675
- */
4676
- auth_info?: string | null;
4677
- }
4678
4647
  /**
4679
4648
  * SchedulerJob
4680
4649
  * Scheduler job DTO.
@@ -4846,6 +4815,14 @@ export interface ISchedulerRunHistory {
4846
4815
  /** Detail Ext */
4847
4816
  detail_ext?: Record<string, any>;
4848
4817
  }
4818
+ /** SetDefaultSpaceRequest */
4819
+ export interface ISetDefaultSpaceRequest {
4820
+ /**
4821
+ * Space Id
4822
+ * 要设为默认的空间ID
4823
+ */
4824
+ space_id: string;
4825
+ }
4849
4826
  /** Space */
4850
4827
  export interface ISpace {
4851
4828
  /**
@@ -5402,6 +5379,17 @@ export interface ITenant {
5402
5379
  * Metadata for the tenant
5403
5380
  */
5404
5381
  metadata?: Record<string, any> | null;
5382
+ /**
5383
+ * Public Read Enabled
5384
+ * whether anonymous public read is enabled
5385
+ * @default false
5386
+ */
5387
+ public_read_enabled?: boolean;
5388
+ /**
5389
+ * Public Read Allowlist
5390
+ * allowed public read endpoint ids
5391
+ */
5392
+ public_read_allowlist?: string[];
5405
5393
  }
5406
5394
  /** TenantBindWohu */
5407
5395
  export interface ITenantBindWohu {
@@ -5460,6 +5448,16 @@ export interface ITenantNameCheckResponse {
5460
5448
  /** Message */
5461
5449
  message: string;
5462
5450
  }
5451
+ /** TenantPublicReadPolicyUpdate */
5452
+ export interface ITenantPublicReadPolicyUpdate {
5453
+ /**
5454
+ * Public Read Enabled
5455
+ * @default false
5456
+ */
5457
+ public_read_enabled?: boolean;
5458
+ /** Public Read Allowlist */
5459
+ public_read_allowlist?: IPublicEndpointId[];
5460
+ }
5463
5461
  /** TenantUpdate */
5464
5462
  export interface ITenantUpdate {
5465
5463
  /** Tenant Name */
@@ -5527,7 +5525,7 @@ export interface ITextCreate {
5527
5525
  * Source Config
5528
5526
  * source config of the knowledge
5529
5527
  */
5530
- source_config: ITextSourceConfig | IOpenUrlSourceConfig | IOpenIdSourceConfig | IS3SourceConfig;
5528
+ source_config: ITextSourceConfig | IOpenUrlSourceConfig;
5531
5529
  /** split config of the knowledge */
5532
5530
  split_config: ITextSplitConfig;
5533
5531
  }
@@ -5550,7 +5548,7 @@ export interface ITextKnowledgeContentUpdateItem {
5550
5548
  * Source Config
5551
5549
  * source config for text-like knowledge
5552
5550
  */
5553
- source_config: ITextSourceConfig | IOpenUrlSourceConfig | IOpenIdSourceConfig | IS3SourceConfig;
5551
+ source_config: ITextSourceConfig | IOpenUrlSourceConfig;
5554
5552
  }
5555
5553
  /** TextKnowledgeContentUpdateResult */
5556
5554
  export interface ITextKnowledgeContentUpdateResult {
@@ -6529,7 +6527,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6529
6527
  */
6530
6528
  checkTenantName: (data: ITenantNameCheckRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelTenantNameCheckResponse, void | IHTTPValidationError>>;
6531
6529
  /**
6532
- * @description 创建租户 创建新租户并自动生成认证密钥(secret_key): - tenant_id 可自定义或由系统自动生成 - secret_key 由系统自动生成,仅在创建时返回一次 - 创建成功后根据 notify 参数决定是否发送通知邮件 Args: params.tenant_name: 租户名称,必须唯一 params.email: 联系邮箱,用于接收通知 params.metadata: 自定义元数据(可选) params.notify: 是否发送邮件通知,默认 true params.tenant_id: 自定义租户ID(可选),支持字母、数字、下划线、中划线 Returns: 创建的租户信息,包含 secret_key(仅此一次) Raises: 400: 租户名称或ID已存在
6530
+ * @description 创建租户 创建新租户并自动生成认证密钥(secret_key): - tenant_id 可自定义或由系统自动生成 - secret_key 由系统自动生成,仅在创建时返回一次 - 创建成功后根据 notify 参数决定是否发送通知邮件 - 如果 metadata.default_space_id 存在,则自动创建默认空间 Args: params.tenant_name: 租户名称,必须唯一 params.email: 联系邮箱,用于接收通知 params.metadata: 自定义元数据(可选),可包含 default_space_id params.notify: 是否发送邮件通知,默认 true params.tenant_id: 自定义租户ID(可选),支持字母、数字、下划线、中划线 Returns: 创建的租户信息,包含 secret_key(仅此一次) Raises: 400: 租户名称或ID已存在
6533
6531
  *
6534
6532
  * @tags tenant
6535
6533
  * @name CreateTenant
@@ -6602,6 +6600,62 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6602
6600
  * @request POST:/api/tenant/bind-wohu-info
6603
6601
  */
6604
6602
  bindWohuInfo: (data: ITenantBindWohu, params?: RequestParams) => Promise<HttpResponse<IResponseModelTenant, void | IHTTPValidationError>>;
6603
+ /**
6604
+ * @description 设置当前租户的默认空间。 Args: body.space_id: 要设为默认空间的 space_id Returns: 更新后的租户信息 Raises: 400: 空间不存在或不属于当前租户
6605
+ *
6606
+ * @tags tenant
6607
+ * @name SetDefaultSpace
6608
+ * @summary Set Default Space
6609
+ * @request POST:/api/tenant/default-space
6610
+ */
6611
+ setDefaultSpace: (data: ISetDefaultSpaceRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelTenant, void | IHTTPValidationError>>;
6612
+ /**
6613
+ * @description 更新当前租户匿名只读策略(字段版)
6614
+ *
6615
+ * @tags tenant
6616
+ * @name UpdateTenantPublicReadPolicy
6617
+ * @summary Update Tenant Public Read Policy
6618
+ * @request POST:/api/tenant/public-read/config
6619
+ */
6620
+ updateTenantPublicReadPolicy: (data: ITenantPublicReadPolicyUpdate, params?: RequestParams) => Promise<HttpResponse<IResponseModelTenant, void | IHTTPValidationError>>;
6621
+ /**
6622
+ * @description 获取可配置为匿名只读的 endpoint_id 枚举列表,供前端选择配置。
6623
+ *
6624
+ * @tags tenant
6625
+ * @name ListPublicReadEndpointIds
6626
+ * @summary List Public Read Endpoint Ids
6627
+ * @request GET:/api/tenant/public-read/endpoint-ids
6628
+ */
6629
+ listPublicReadEndpointIds: (params?: RequestParams) => Promise<HttpResponse<IResponseModelListPublicReadEndpointIdItem, void>>;
6630
+ /**
6631
+ * @description 获取系统支持开放的匿名只读接口目录
6632
+ *
6633
+ * @tags tenant
6634
+ * @name ListPublicReadEndpointCatalog
6635
+ * @summary List Public Read Endpoint Catalog
6636
+ * @request GET:/api/tenant/public-read/endpoints
6637
+ */
6638
+ listPublicReadEndpointCatalog: (params?: RequestParams) => Promise<HttpResponse<IResponseModelListDictStrStr, void>>;
6639
+ /**
6640
+ * @description 罗列全部已开放匿名只读能力的租户及其开放接口
6641
+ *
6642
+ * @tags tenant
6643
+ * @name ListPublicReadTenants
6644
+ * @summary List Public Read Tenants
6645
+ * @request GET:/api/tenant/public-read/list
6646
+ */
6647
+ listPublicReadTenants: (query?: {
6648
+ /**
6649
+ * Page
6650
+ * @default 1
6651
+ */
6652
+ page?: number;
6653
+ /**
6654
+ * Page Size
6655
+ * @default 10
6656
+ */
6657
+ page_size?: number;
6658
+ }, params?: RequestParams) => Promise<HttpResponse<IResponseModelPageResponsePublicReadTenantItem, void | IHTTPValidationError>>;
6605
6659
  };
6606
6660
  space: {
6607
6661
  /**
@@ -6974,6 +7028,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6974
7028
  * @request POST:/api/admin/task/restart
6975
7029
  */
6976
7030
  adminRestartTasks: (data: IAdminTaskRestartRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelAdminTaskRestartResponse, void | IHTTPValidationError>>;
7031
+ /**
7032
+ * @description 管理员级联删除租户。 删除顺序为:先删除租户下全部 space 及其关联资源,再删除 tenant 本身。
7033
+ *
7034
+ * @tags admin
7035
+ * @name AdminDeleteTenant
7036
+ * @summary Admin Delete Tenant
7037
+ * @request DELETE:/api/admin/tenant/{tenant_id}
7038
+ */
7039
+ adminDeleteTenant: (tenantId: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelBool, void | IHTTPValidationError>>;
6977
7040
  /**
6978
7041
  * @description 管理员更新租户信息 支持更新 tenant_name、email、is_active、metadata。 所有字段均为可选,只传入需要更新的字段即可。
6979
7042
  *
package/dist/api.js CHANGED
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
22
22
  return t;
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.Api = exports.HttpClient = exports.ContentType = exports.IAction = exports.ICliApplyStatus = exports.ICliChangeOp = exports.IKnowledgeSourceEnum = exports.IKnowledgeTypeEnum = exports.ILanguage = exports.IMemoryStatusEnum = exports.IMemoryTypeEnum = exports.IOperator = exports.IResource = exports.ISchedulerCronTimezone = exports.ISchedulerIntervalType = exports.ISchedulerJobStatus = exports.ISchedulerJobType = exports.ISchedulerRunResult = exports.ISchedulerTargetType = exports.ITagObjectType = exports.ITaskStatus = exports.ITextKnowledgeContentUpdateStatusEnum = exports.IWebhookDeliveryStatus = exports.IWebhookEventType = exports.IWebhookOutboxStatus = exports.IWebhookSubscriptionStatus = void 0;
25
+ exports.Api = exports.HttpClient = exports.ContentType = exports.IAction = exports.ICliApplyStatus = exports.ICliChangeOp = exports.IKnowledgeSourceEnum = exports.IKnowledgeTypeEnum = exports.ILanguage = exports.IMemoryStatusEnum = exports.IMemoryTypeEnum = exports.IOperator = exports.IPublicEndpointId = exports.IResource = exports.ISchedulerCronTimezone = exports.ISchedulerIntervalType = exports.ISchedulerJobStatus = exports.ISchedulerJobType = exports.ISchedulerRunResult = exports.ISchedulerTargetType = exports.ITagObjectType = exports.ITaskStatus = exports.ITextKnowledgeContentUpdateStatusEnum = exports.IWebhookDeliveryStatus = exports.IWebhookEventType = exports.IWebhookOutboxStatus = exports.IWebhookSubscriptionStatus = void 0;
26
26
  /**
27
27
  * WebhookSubscriptionStatus
28
28
  * Webhook订阅状态
@@ -175,6 +175,21 @@ var IResource;
175
175
  IResource["Tagging"] = "tagging";
176
176
  IResource["Artifact"] = "artifact";
177
177
  })(IResource || (exports.IResource = IResource = {}));
178
+ /** PublicEndpointId */
179
+ var IPublicEndpointId;
180
+ (function (IPublicEndpointId) {
181
+ IPublicEndpointId["TenantGetTenantMe"] = "tenant.get_tenant_me";
182
+ IPublicEndpointId["SpaceGetSpaceList"] = "space.get_space_list";
183
+ IPublicEndpointId["SpaceGetSpaceById"] = "space.get_space_by_id";
184
+ IPublicEndpointId["KnowledgeGetKnowledgeList"] = "knowledge.get_knowledge_list";
185
+ IPublicEndpointId["KnowledgeGetKnowledgeById"] = "knowledge.get_knowledge_by_id";
186
+ IPublicEndpointId["TaskGetSupportedTaskTypes"] = "task.get_supported_task_types";
187
+ IPublicEndpointId["TaskGetTaskList"] = "task.get_task_list";
188
+ IPublicEndpointId["TaskGetTaskDetail"] = "task.get_task_detail";
189
+ IPublicEndpointId["RetrievalRetrieveKnowledgeContent"] = "retrieval.retrieve_knowledge_content";
190
+ IPublicEndpointId["RetrievalRetrieveSpaceContent"] = "retrieval.retrieve_space_content";
191
+ IPublicEndpointId["RetrievalRetrieve"] = "retrieval.retrieve";
192
+ })(IPublicEndpointId || (exports.IPublicEndpointId = IPublicEndpointId = {}));
178
193
  /** Operator */
179
194
  var IOperator;
180
195
  (function (IOperator) {
@@ -846,7 +861,7 @@ class Api extends HttpClient {
846
861
  */
847
862
  checkTenantName: (data, params = {}) => this.request(Object.assign({ path: `/api/tenant/check-name`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
848
863
  /**
849
- * @description 创建租户 创建新租户并自动生成认证密钥(secret_key): - tenant_id 可自定义或由系统自动生成 - secret_key 由系统自动生成,仅在创建时返回一次 - 创建成功后根据 notify 参数决定是否发送通知邮件 Args: params.tenant_name: 租户名称,必须唯一 params.email: 联系邮箱,用于接收通知 params.metadata: 自定义元数据(可选) params.notify: 是否发送邮件通知,默认 true params.tenant_id: 自定义租户ID(可选),支持字母、数字、下划线、中划线 Returns: 创建的租户信息,包含 secret_key(仅此一次) Raises: 400: 租户名称或ID已存在
864
+ * @description 创建租户 创建新租户并自动生成认证密钥(secret_key): - tenant_id 可自定义或由系统自动生成 - secret_key 由系统自动生成,仅在创建时返回一次 - 创建成功后根据 notify 参数决定是否发送通知邮件 - 如果 metadata.default_space_id 存在,则自动创建默认空间 Args: params.tenant_name: 租户名称,必须唯一 params.email: 联系邮箱,用于接收通知 params.metadata: 自定义元数据(可选),可包含 default_space_id params.notify: 是否发送邮件通知,默认 true params.tenant_id: 自定义租户ID(可选),支持字母、数字、下划线、中划线 Returns: 创建的租户信息,包含 secret_key(仅此一次) Raises: 400: 租户名称或ID已存在
850
865
  *
851
866
  * @tags tenant
852
867
  * @name CreateTenant
@@ -908,6 +923,51 @@ class Api extends HttpClient {
908
923
  * @request POST:/api/tenant/bind-wohu-info
909
924
  */
910
925
  bindWohuInfo: (data, params = {}) => this.request(Object.assign({ path: `/api/tenant/bind-wohu-info`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
926
+ /**
927
+ * @description 设置当前租户的默认空间。 Args: body.space_id: 要设为默认空间的 space_id Returns: 更新后的租户信息 Raises: 400: 空间不存在或不属于当前租户
928
+ *
929
+ * @tags tenant
930
+ * @name SetDefaultSpace
931
+ * @summary Set Default Space
932
+ * @request POST:/api/tenant/default-space
933
+ */
934
+ setDefaultSpace: (data, params = {}) => this.request(Object.assign({ path: `/api/tenant/default-space`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
935
+ /**
936
+ * @description 更新当前租户匿名只读策略(字段版)
937
+ *
938
+ * @tags tenant
939
+ * @name UpdateTenantPublicReadPolicy
940
+ * @summary Update Tenant Public Read Policy
941
+ * @request POST:/api/tenant/public-read/config
942
+ */
943
+ updateTenantPublicReadPolicy: (data, params = {}) => this.request(Object.assign({ path: `/api/tenant/public-read/config`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
944
+ /**
945
+ * @description 获取可配置为匿名只读的 endpoint_id 枚举列表,供前端选择配置。
946
+ *
947
+ * @tags tenant
948
+ * @name ListPublicReadEndpointIds
949
+ * @summary List Public Read Endpoint Ids
950
+ * @request GET:/api/tenant/public-read/endpoint-ids
951
+ */
952
+ listPublicReadEndpointIds: (params = {}) => this.request(Object.assign({ path: `/api/tenant/public-read/endpoint-ids`, method: "GET", format: "json" }, params)),
953
+ /**
954
+ * @description 获取系统支持开放的匿名只读接口目录
955
+ *
956
+ * @tags tenant
957
+ * @name ListPublicReadEndpointCatalog
958
+ * @summary List Public Read Endpoint Catalog
959
+ * @request GET:/api/tenant/public-read/endpoints
960
+ */
961
+ listPublicReadEndpointCatalog: (params = {}) => this.request(Object.assign({ path: `/api/tenant/public-read/endpoints`, method: "GET", format: "json" }, params)),
962
+ /**
963
+ * @description 罗列全部已开放匿名只读能力的租户及其开放接口
964
+ *
965
+ * @tags tenant
966
+ * @name ListPublicReadTenants
967
+ * @summary List Public Read Tenants
968
+ * @request GET:/api/tenant/public-read/list
969
+ */
970
+ listPublicReadTenants: (query, params = {}) => this.request(Object.assign({ path: `/api/tenant/public-read/list`, method: "GET", query: query, format: "json" }, params)),
911
971
  };
912
972
  this.space = {
913
973
  /**
@@ -1280,6 +1340,15 @@ class Api extends HttpClient {
1280
1340
  * @request POST:/api/admin/task/restart
1281
1341
  */
1282
1342
  adminRestartTasks: (data, params = {}) => this.request(Object.assign({ path: `/api/admin/task/restart`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
1343
+ /**
1344
+ * @description 管理员级联删除租户。 删除顺序为:先删除租户下全部 space 及其关联资源,再删除 tenant 本身。
1345
+ *
1346
+ * @tags admin
1347
+ * @name AdminDeleteTenant
1348
+ * @summary Admin Delete Tenant
1349
+ * @request DELETE:/api/admin/tenant/{tenant_id}
1350
+ */
1351
+ adminDeleteTenant: (tenantId, params = {}) => this.request(Object.assign({ path: `/api/admin/tenant/${tenantId}`, method: "DELETE", format: "json" }, params)),
1283
1352
  /**
1284
1353
  * @description 管理员更新租户信息 支持更新 tenant_name、email、is_active、metadata。 所有字段均为可选,只传入需要更新的字段即可。
1285
1354
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@petercatai/whisker-client",
3
- "version": "3.0.202603061556",
3
+ "version": "4.0.0",
4
4
  "description": "Generated API client (Production)",
5
5
  "main": "dist/api.js",
6
6
  "types": "dist/api.d.ts",
@@ -16,7 +16,7 @@
16
16
  "tag": "latest"
17
17
  },
18
18
  "devDependencies": {
19
- "@types/node": "^25.3.5",
19
+ "@types/node": "^25.4.0",
20
20
  "axios": "^1.13.6",
21
21
  "typescript": "^5.9.3"
22
22
  }