@petercatai/whisker-client 3.0.202603061742 → 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 +164 -41
  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",
@@ -1956,7 +1970,7 @@ export interface IKnowledgeInput {
1956
1970
  * Split Config
1957
1971
  * configuration for splitting the knowledge
1958
1972
  */
1959
- 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;
1960
1974
  /**
1961
1975
  * File Sha
1962
1976
  * SHA of the file
@@ -2042,7 +2056,7 @@ export interface IKnowledgeOutput {
2042
2056
  * Split Config
2043
2057
  * configuration for splitting the knowledge
2044
2058
  */
2045
- 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;
2046
2060
  /**
2047
2061
  * File Sha
2048
2062
  * SHA of the file
@@ -2294,7 +2308,7 @@ export interface IKnowledgeResponse {
2294
2308
  * Split Config
2295
2309
  * configuration for splitting the knowledge
2296
2310
  */
2297
- 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;
2298
2312
  /**
2299
2313
  * File Sha
2300
2314
  * SHA of the file
@@ -2920,43 +2934,6 @@ export interface IPDFCreate {
2920
2934
  /** split config of the knowledge (markdown after markitdown conversion) */
2921
2935
  split_config: IMarkdownSplitConfig;
2922
2936
  }
2923
- /**
2924
- * PDFSplitConfig
2925
- * PDF document split configuration
2926
- */
2927
- export interface IPDFSplitConfig {
2928
- /**
2929
- * Chunk Size
2930
- * chunk max size
2931
- * @min 1
2932
- * @default 1500
2933
- */
2934
- chunk_size?: number;
2935
- /**
2936
- * Chunk Overlap
2937
- * chunk overlap size, must be less than chunk_size
2938
- * @min 0
2939
- * @default 150
2940
- */
2941
- chunk_overlap?: number;
2942
- /**
2943
- * Type
2944
- * @default "pdf"
2945
- */
2946
- type?: "pdf";
2947
- /**
2948
- * Extract Images
2949
- * Whether to extract images
2950
- * @default false
2951
- */
2952
- extract_images?: boolean;
2953
- /**
2954
- * Table Extract Mode
2955
- * Table extraction mode: 'text' or 'structure'
2956
- * @default "text"
2957
- */
2958
- table_extract_mode?: string;
2959
- }
2960
2937
  /** PageQueryParams[APIKey] */
2961
2938
  export interface IPageQueryParamsAPIKey {
2962
2939
  /**
@@ -3554,6 +3531,19 @@ export interface IPageResponseKnowledgeResponse {
3554
3531
  /** Total Pages */
3555
3532
  total_pages: number;
3556
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
+ }
3557
3547
  /** PageResponse[SchedulerJob] */
3558
3548
  export interface IPageResponseSchedulerJob {
3559
3549
  /** Items */
@@ -3734,6 +3724,19 @@ export interface IPowerPointCreate {
3734
3724
  /** split config of the knowledge (markdown after markitdown conversion) */
3735
3725
  split_config: IMarkdownSplitConfig;
3736
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
+ }
3737
3740
  /** QACreate */
3738
3741
  export interface IQACreate {
3739
3742
  /**
@@ -4015,6 +4018,15 @@ export interface IResponseModelListDictStrAny {
4015
4018
  /** Message */
4016
4019
  message?: string | null;
4017
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
+ }
4018
4030
  /** ResponseModel[List[Knowledge]] */
4019
4031
  export interface IResponseModelListKnowledge {
4020
4032
  /** Success */
@@ -4033,6 +4045,15 @@ export interface IResponseModelListMemory {
4033
4045
  /** Message */
4034
4046
  message?: string | null;
4035
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
+ }
4036
4057
  /** ResponseModel[List[RetrievalChunk]] */
4037
4058
  export interface IResponseModelListRetrievalChunk {
4038
4059
  /** Success */
@@ -4170,6 +4191,14 @@ export interface IResponseModelPageResponseKnowledgeResponse {
4170
4191
  /** Message */
4171
4192
  message?: string | null;
4172
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
+ }
4173
4202
  /** ResponseModel[PageResponse[SchedulerJob]] */
4174
4203
  export interface IResponseModelPageResponseSchedulerJob {
4175
4204
  /** Success */
@@ -4786,6 +4815,14 @@ export interface ISchedulerRunHistory {
4786
4815
  /** Detail Ext */
4787
4816
  detail_ext?: Record<string, any>;
4788
4817
  }
4818
+ /** SetDefaultSpaceRequest */
4819
+ export interface ISetDefaultSpaceRequest {
4820
+ /**
4821
+ * Space Id
4822
+ * 要设为默认的空间ID
4823
+ */
4824
+ space_id: string;
4825
+ }
4789
4826
  /** Space */
4790
4827
  export interface ISpace {
4791
4828
  /**
@@ -5342,6 +5379,17 @@ export interface ITenant {
5342
5379
  * Metadata for the tenant
5343
5380
  */
5344
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[];
5345
5393
  }
5346
5394
  /** TenantBindWohu */
5347
5395
  export interface ITenantBindWohu {
@@ -5400,6 +5448,16 @@ export interface ITenantNameCheckResponse {
5400
5448
  /** Message */
5401
5449
  message: string;
5402
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
+ }
5403
5461
  /** TenantUpdate */
5404
5462
  export interface ITenantUpdate {
5405
5463
  /** Tenant Name */
@@ -6469,7 +6527,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6469
6527
  */
6470
6528
  checkTenantName: (data: ITenantNameCheckRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelTenantNameCheckResponse, void | IHTTPValidationError>>;
6471
6529
  /**
6472
- * @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已存在
6473
6531
  *
6474
6532
  * @tags tenant
6475
6533
  * @name CreateTenant
@@ -6542,6 +6600,62 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6542
6600
  * @request POST:/api/tenant/bind-wohu-info
6543
6601
  */
6544
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>>;
6545
6659
  };
6546
6660
  space: {
6547
6661
  /**
@@ -6914,6 +7028,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6914
7028
  * @request POST:/api/admin/task/restart
6915
7029
  */
6916
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>>;
6917
7040
  /**
6918
7041
  * @description 管理员更新租户信息 支持更新 tenant_name、email、is_active、metadata。 所有字段均为可选,只传入需要更新的字段即可。
6919
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.202603061742",
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
  }