@petercatai/whisker-client 0.1.202601141132-dev → 0.1.202601221404

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 +535 -5
  2. package/dist/api.js +130 -2
  3. package/package.json +4 -4
package/dist/api.d.ts CHANGED
@@ -1,3 +1,38 @@
1
+ /**
2
+ * WebhookSubscriptionStatus
3
+ * Webhook订阅状态
4
+ */
5
+ export declare enum IWebhookSubscriptionStatus {
6
+ ACTIVE = "ACTIVE",
7
+ INACTIVE = "INACTIVE",
8
+ DELETED = "DELETED"
9
+ }
10
+ /**
11
+ * WebhookEventType
12
+ * Webhook事件类型
13
+ */
14
+ export declare enum IWebhookEventType {
15
+ SpaceCreated = "space.created",
16
+ SpaceUpdated = "space.updated",
17
+ SpaceDeleted = "space.deleted",
18
+ KnowledgeCreated = "knowledge.created",
19
+ KnowledgeUpdated = "knowledge.updated",
20
+ KnowledgeDeleted = "knowledge.deleted",
21
+ TaskHituPackageCompleted = "task.hitu_package.completed",
22
+ TaskComponentRepoAnalyseCompleted = "task.component_repo_analyse.completed",
23
+ TaskKnowledgeChunkCompleted = "task.knowledge_chunk.completed",
24
+ TaskSpaceSummaryCompleted = "task.space_summary.completed",
25
+ Test = "test"
26
+ }
27
+ /**
28
+ * WebhookDeliveryStatus
29
+ * Webhook投递状态
30
+ */
31
+ export declare enum IWebhookDeliveryStatus {
32
+ PENDING = "PENDING",
33
+ SUCCEEDED = "SUCCEEDED",
34
+ GAVE_UP = "GAVE_UP"
35
+ }
1
36
  /** TaskStatus */
2
37
  export declare enum ITaskStatus {
3
38
  Pending = "pending",
@@ -257,6 +292,64 @@ export interface IActiveStatusUpdate {
257
292
  /** Status */
258
293
  status: boolean;
259
294
  }
295
+ /**
296
+ * AdminRebuildKnowledgeIndexRequest
297
+ * 管理员补齐 knowledge_index 请求
298
+ */
299
+ export interface IAdminRebuildKnowledgeIndexRequest {
300
+ /**
301
+ * Tenant Id
302
+ * 租户ID(可选,不传则遍历全租户)
303
+ */
304
+ tenant_id?: string | null;
305
+ /**
306
+ * Space Id
307
+ * 空间ID(可选)
308
+ */
309
+ space_id?: string | null;
310
+ /**
311
+ * Knowledge Id
312
+ * 知识ID(可选)
313
+ */
314
+ knowledge_id?: string | null;
315
+ /**
316
+ * Knowledge Type
317
+ * 知识类型(可选)
318
+ */
319
+ knowledge_type?: string | null;
320
+ /**
321
+ * Dry Run
322
+ * 是否仅预览,不实际写入
323
+ * @default false
324
+ */
325
+ dry_run?: boolean;
326
+ }
327
+ /**
328
+ * AdminRebuildKnowledgeIndexResponse
329
+ * 管理员补齐 knowledge_index 响应
330
+ */
331
+ export interface IAdminRebuildKnowledgeIndexResponse {
332
+ /**
333
+ * Total Matched
334
+ * 匹配的知识总数
335
+ */
336
+ total_matched: number;
337
+ /**
338
+ * Rebuilt Count
339
+ * 成功补齐的知识数量
340
+ */
341
+ rebuilt_count: number;
342
+ /**
343
+ * Failed Count
344
+ * 失败的知识数量
345
+ */
346
+ failed_count: number;
347
+ /**
348
+ * Details
349
+ * 各知识处理详情
350
+ */
351
+ details?: Record<string, any>[];
352
+ }
260
353
  /**
261
354
  * AdminSyncSummaryToStorageRequest
262
355
  * 管理员同步 space summary 到自持 tenant 请求
@@ -433,6 +526,83 @@ export interface IAdminUpdateTenantSecretKeyRequest {
433
526
  */
434
527
  secret_key: string;
435
528
  }
529
+ /**
530
+ * AdminWebhookDeliveryListResponse
531
+ * 管理员Webhook投递记录列表响应
532
+ */
533
+ export interface IAdminWebhookDeliveryListResponse {
534
+ /** Items */
535
+ items: IAdminWebhookDeliveryResponse[];
536
+ /** Total */
537
+ total: number;
538
+ /** Page */
539
+ page: number;
540
+ /** Page Size */
541
+ page_size: number;
542
+ }
543
+ /**
544
+ * AdminWebhookDeliveryResponse
545
+ * 管理员Webhook投递记录响应
546
+ */
547
+ export interface IAdminWebhookDeliveryResponse {
548
+ /** Delivery Id */
549
+ delivery_id: string;
550
+ /** Tenant Id */
551
+ tenant_id: string;
552
+ /** Webhook Id */
553
+ webhook_id: string;
554
+ /** Event Id */
555
+ event_id: string;
556
+ /** Webhook投递状态 */
557
+ status: IWebhookDeliveryStatus;
558
+ /** Attempt Count */
559
+ attempt_count: number;
560
+ /** Last Error */
561
+ last_error: string | null;
562
+ /** Response Code */
563
+ response_code: number | null;
564
+ /** Response Time Ms */
565
+ response_time_ms: number | null;
566
+ /** Last Attempt At */
567
+ last_attempt_at: string | null;
568
+ /** Next Retry At */
569
+ next_retry_at: string | null;
570
+ /** Gmt Create */
571
+ gmt_create: string;
572
+ /** Gmt Modified */
573
+ gmt_modified: string;
574
+ }
575
+ /**
576
+ * AdminWebhookStatsResponse
577
+ * 管理员Webhook系统统计响应
578
+ */
579
+ export interface IAdminWebhookStatsResponse {
580
+ /**
581
+ * Outbox New Count
582
+ * Outbox待处理事件数
583
+ */
584
+ outbox_new_count: number;
585
+ /**
586
+ * Outbox Processed Count
587
+ * Outbox已处理事件数
588
+ */
589
+ outbox_processed_count: number;
590
+ /**
591
+ * Delivery Pending Count
592
+ * 待投递数量
593
+ */
594
+ delivery_pending_count: number;
595
+ /**
596
+ * Delivery Succeeded Count
597
+ * 投递成功数量
598
+ */
599
+ delivery_succeeded_count: number;
600
+ /**
601
+ * Delivery Gave Up Count
602
+ * 放弃重试数量
603
+ */
604
+ delivery_gave_up_count: number;
605
+ }
436
606
  /**
437
607
  * ArtifactIndex
438
608
  * whisker_artifact_index 模型
@@ -2137,6 +2307,82 @@ export interface IPageQueryParamsTask {
2137
2307
  */
2138
2308
  page_size?: number;
2139
2309
  }
2310
+ /** PageQueryParams[WebhookDelivery] */
2311
+ export interface IPageQueryParamsWebhookDelivery {
2312
+ /**
2313
+ * Order By
2314
+ * order by field
2315
+ */
2316
+ order_by?: string | null;
2317
+ /**
2318
+ * Order Direction
2319
+ * asc or desc
2320
+ * @default "asc"
2321
+ */
2322
+ order_direction?: string | null;
2323
+ /**
2324
+ * Eq Conditions
2325
+ * list of equality conditions, each as a dict with key and value
2326
+ */
2327
+ eq_conditions?: Record<string, any> | null;
2328
+ /** advanced filter with nested conditions */
2329
+ advanced_filter?: IFilterGroup | null;
2330
+ /** 标签过滤条件 tag_name 和 tag_id */
2331
+ tag_filter?: ITagFilter | null;
2332
+ /**
2333
+ * Page
2334
+ * page number
2335
+ * @min 1
2336
+ * @default 1
2337
+ */
2338
+ page?: number;
2339
+ /**
2340
+ * Page Size
2341
+ * page size
2342
+ * @min 1
2343
+ * @max 1000
2344
+ * @default 10
2345
+ */
2346
+ page_size?: number;
2347
+ }
2348
+ /** PageQueryParams[WebhookSubscription] */
2349
+ export interface IPageQueryParamsWebhookSubscription {
2350
+ /**
2351
+ * Order By
2352
+ * order by field
2353
+ */
2354
+ order_by?: string | null;
2355
+ /**
2356
+ * Order Direction
2357
+ * asc or desc
2358
+ * @default "asc"
2359
+ */
2360
+ order_direction?: string | null;
2361
+ /**
2362
+ * Eq Conditions
2363
+ * list of equality conditions, each as a dict with key and value
2364
+ */
2365
+ eq_conditions?: Record<string, any> | null;
2366
+ /** advanced filter with nested conditions */
2367
+ advanced_filter?: IFilterGroup | null;
2368
+ /** 标签过滤条件 tag_name 和 tag_id */
2369
+ tag_filter?: ITagFilter | null;
2370
+ /**
2371
+ * Page
2372
+ * page number
2373
+ * @min 1
2374
+ * @default 1
2375
+ */
2376
+ page?: number;
2377
+ /**
2378
+ * Page Size
2379
+ * page size
2380
+ * @min 1
2381
+ * @max 1000
2382
+ * @default 10
2383
+ */
2384
+ page_size?: number;
2385
+ }
2140
2386
  /** PageResponse[APIKey] */
2141
2387
  export interface IPageResponseAPIKey {
2142
2388
  /** Items */
@@ -2254,6 +2500,32 @@ export interface IPageResponseTenant {
2254
2500
  /** Total Pages */
2255
2501
  total_pages: number;
2256
2502
  }
2503
+ /** PageResponse[WebhookDeliveryResponse] */
2504
+ export interface IPageResponseWebhookDeliveryResponse {
2505
+ /** Items */
2506
+ items: IWebhookDeliveryResponse[];
2507
+ /** Total */
2508
+ total: number;
2509
+ /** Page */
2510
+ page: number;
2511
+ /** Page Size */
2512
+ page_size: number;
2513
+ /** Total Pages */
2514
+ total_pages: number;
2515
+ }
2516
+ /** PageResponse[WebhookSubscriptionResponse] */
2517
+ export interface IPageResponseWebhookSubscriptionResponse {
2518
+ /** Items */
2519
+ items: IWebhookSubscriptionResponse[];
2520
+ /** Total */
2521
+ total: number;
2522
+ /** Page */
2523
+ page: number;
2524
+ /** Page Size */
2525
+ page_size: number;
2526
+ /** Total Pages */
2527
+ total_pages: number;
2528
+ }
2257
2529
  /** Permission */
2258
2530
  export interface IPermission {
2259
2531
  resource: IResource;
@@ -2345,6 +2617,14 @@ export interface IResponseModelAPIKey {
2345
2617
  /** Message */
2346
2618
  message?: string | null;
2347
2619
  }
2620
+ /** ResponseModel[AdminRebuildKnowledgeIndexResponse] */
2621
+ export interface IResponseModelAdminRebuildKnowledgeIndexResponse {
2622
+ /** Success */
2623
+ success: boolean;
2624
+ data?: IAdminRebuildKnowledgeIndexResponse | null;
2625
+ /** Message */
2626
+ message?: string | null;
2627
+ }
2348
2628
  /** ResponseModel[AdminSyncSummaryToStorageResponse] */
2349
2629
  export interface IResponseModelAdminSyncSummaryToStorageResponse {
2350
2630
  /** Success */
@@ -2361,6 +2641,30 @@ export interface IResponseModelAdminTaskRestartResponse {
2361
2641
  /** Message */
2362
2642
  message?: string | null;
2363
2643
  }
2644
+ /** ResponseModel[AdminWebhookDeliveryListResponse] */
2645
+ export interface IResponseModelAdminWebhookDeliveryListResponse {
2646
+ /** Success */
2647
+ success: boolean;
2648
+ data?: IAdminWebhookDeliveryListResponse | null;
2649
+ /** Message */
2650
+ message?: string | null;
2651
+ }
2652
+ /** ResponseModel[AdminWebhookDeliveryResponse] */
2653
+ export interface IResponseModelAdminWebhookDeliveryResponse {
2654
+ /** Success */
2655
+ success: boolean;
2656
+ data?: IAdminWebhookDeliveryResponse | null;
2657
+ /** Message */
2658
+ message?: string | null;
2659
+ }
2660
+ /** ResponseModel[AdminWebhookStatsResponse] */
2661
+ export interface IResponseModelAdminWebhookStatsResponse {
2662
+ /** Success */
2663
+ success: boolean;
2664
+ data?: IAdminWebhookStatsResponse | null;
2665
+ /** Message */
2666
+ message?: string | null;
2667
+ }
2364
2668
  /** ResponseModel[Any] */
2365
2669
  export interface IResponseModelAny {
2366
2670
  /** Success */
@@ -2590,6 +2894,22 @@ export interface IResponseModelPageResponseTenant {
2590
2894
  /** Message */
2591
2895
  message?: string | null;
2592
2896
  }
2897
+ /** ResponseModel[PageResponse[WebhookDeliveryResponse]] */
2898
+ export interface IResponseModelPageResponseWebhookDeliveryResponse {
2899
+ /** Success */
2900
+ success: boolean;
2901
+ data?: IPageResponseWebhookDeliveryResponse | null;
2902
+ /** Message */
2903
+ message?: string | null;
2904
+ }
2905
+ /** ResponseModel[PageResponse[WebhookSubscriptionResponse]] */
2906
+ export interface IResponseModelPageResponseWebhookSubscriptionResponse {
2907
+ /** Success */
2908
+ success: boolean;
2909
+ data?: IPageResponseWebhookSubscriptionResponse | null;
2910
+ /** Message */
2911
+ message?: string | null;
2912
+ }
2593
2913
  /** ResponseModel[SpaceResponse] */
2594
2914
  export interface IResponseModelSpaceResponse {
2595
2915
  /** Success */
@@ -2646,6 +2966,22 @@ export interface IResponseModelTenant {
2646
2966
  /** Message */
2647
2967
  message?: string | null;
2648
2968
  }
2969
+ /** ResponseModel[WebhookSubscriptionResponse] */
2970
+ export interface IResponseModelWebhookSubscriptionResponse {
2971
+ /** Success */
2972
+ success: boolean;
2973
+ data?: IWebhookSubscriptionResponse | null;
2974
+ /** Message */
2975
+ message?: string | null;
2976
+ }
2977
+ /** ResponseModel[WebhookTestResponse] */
2978
+ export interface IResponseModelWebhookTestResponse {
2979
+ /** Success */
2980
+ success: boolean;
2981
+ data?: IWebhookTestResponse | null;
2982
+ /** Message */
2983
+ message?: string | null;
2984
+ }
2649
2985
  /** ResponseModel[bool] */
2650
2986
  export interface IResponseModelBool {
2651
2987
  /** Success */
@@ -2851,8 +3187,8 @@ export interface IRetrievalConfig {
2851
3187
  type: string;
2852
3188
  [key: string]: any;
2853
3189
  }
2854
- /** RetrievalRequest */
2855
- export interface IRetrievalRequest {
3190
+ /** RetrievalRequest[RetrievalConfig] */
3191
+ export interface IRetrievalRequestRetrievalConfig {
2856
3192
  /**
2857
3193
  * Content
2858
3194
  * The content to be searched, such as a question, text, or any other query string.
@@ -3562,6 +3898,89 @@ export interface IValidationError {
3562
3898
  /** Error Type */
3563
3899
  type: string;
3564
3900
  }
3901
+ /**
3902
+ * WebhookDeliveryResponse
3903
+ * Webhook投递记录响应
3904
+ */
3905
+ export interface IWebhookDeliveryResponse {
3906
+ /** Delivery Id */
3907
+ delivery_id: string;
3908
+ /** Webhook Id */
3909
+ webhook_id: string;
3910
+ /** Event Id */
3911
+ event_id: string;
3912
+ /** Webhook投递状态 */
3913
+ status: IWebhookDeliveryStatus;
3914
+ /** Attempt Count */
3915
+ attempt_count: number;
3916
+ /** Last Error */
3917
+ last_error?: string | null;
3918
+ /** Response Code */
3919
+ response_code?: number | null;
3920
+ /** Response Time Ms */
3921
+ response_time_ms?: number | null;
3922
+ /** Last Attempt At */
3923
+ last_attempt_at?: string | null;
3924
+ /** Next Retry At */
3925
+ next_retry_at?: string | null;
3926
+ /** Gmt Create */
3927
+ gmt_create?: string | null;
3928
+ /** Gmt Modified */
3929
+ gmt_modified?: string | null;
3930
+ }
3931
+ /** WebhookSubscriptionCreate */
3932
+ export interface IWebhookSubscriptionCreate {
3933
+ /**
3934
+ * Webhook Name
3935
+ * Webhook名称
3936
+ */
3937
+ webhook_name: string;
3938
+ /**
3939
+ * Target Url
3940
+ * 目标URL
3941
+ */
3942
+ target_url: string;
3943
+ /**
3944
+ * Event Types
3945
+ * 订阅的事件类型列表
3946
+ */
3947
+ event_types: IWebhookEventType[];
3948
+ /**
3949
+ * Secret
3950
+ * 签名密钥(可选,不提供则自动生成)
3951
+ */
3952
+ secret?: string | null;
3953
+ }
3954
+ /** WebhookSubscriptionResponse */
3955
+ export interface IWebhookSubscriptionResponse {
3956
+ /** Webhook Id */
3957
+ webhook_id: string;
3958
+ /** Webhook Name */
3959
+ webhook_name: string;
3960
+ /** Target Url */
3961
+ target_url: string;
3962
+ /** Event Types */
3963
+ event_types: string[];
3964
+ /** Webhook订阅状态 */
3965
+ status: IWebhookSubscriptionStatus;
3966
+ /** Secret */
3967
+ secret?: string | null;
3968
+ /** Gmt Create */
3969
+ gmt_create?: string | null;
3970
+ /** Gmt Modified */
3971
+ gmt_modified?: string | null;
3972
+ }
3973
+ /** WebhookTestResponse */
3974
+ export interface IWebhookTestResponse {
3975
+ /** Success */
3976
+ success: boolean;
3977
+ /** Status Code */
3978
+ status_code: number | null;
3979
+ /** Duration Ms */
3980
+ duration_ms: number;
3981
+ /** Error */
3982
+ error: string | null;
3983
+ }
3565
3984
  /**
3566
3985
  * WohuProductSpace
3567
3986
  * 产品空间响应模型
@@ -4008,7 +4427,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4008
4427
  * @summary Retrieve
4009
4428
  * @request POST:/api/retrieval/
4010
4429
  */
4011
- retrieve: (data: IRetrievalRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelListRetrievalChunk, void | IHTTPValidationError>>;
4430
+ retrieve: (data: IRetrievalRequestRetrievalConfig, params?: RequestParams) => Promise<HttpResponse<IResponseModelListRetrievalChunk, void | IHTTPValidationError>>;
4012
4431
  /**
4013
4432
  * @description 因为 antvis 要对公网开放相关信息,故提供本单独接口
4014
4433
  *
@@ -4017,7 +4436,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4017
4436
  * @summary Context7 Antvis Retrieve
4018
4437
  * @request POST:/api/retrieval/context7/antvis
4019
4438
  */
4020
- antvisRetrieve: (data: IRetrievalRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelListRetrievalChunk, void | IHTTPValidationError>>;
4439
+ antvisRetrieve: (data: IRetrievalRequestRetrievalConfig, params?: RequestParams) => Promise<HttpResponse<IResponseModelListRetrievalChunk, void | IHTTPValidationError>>;
4021
4440
  };
4022
4441
  task: {
4023
4442
  /**
@@ -4271,7 +4690,61 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4271
4690
  */
4272
4691
  getTenantLog: (data: ITenantLogQuery, params?: RequestParams) => Promise<HttpResponse<IResponseModelListTenantLog, void | IHTTPValidationError>>;
4273
4692
  /**
4274
- * @description whisker 通用 webhook
4693
+ * @description 发送测试消息验证Webhook订阅配置是否正确
4694
+ *
4695
+ * @tags webhook
4696
+ * @name TestSubscriptionApiV1WebhookSubscriptionsWebhookIdTestPost
4697
+ * @summary 测试Webhook订阅
4698
+ * @request POST:/api/v1/webhook/subscriptions/{webhook_id}/test
4699
+ */
4700
+ testSubscriptionApiV1WebhookSubscriptionsWebhookIdTestPost: (webhookId: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelWebhookTestResponse, void | IHTTPValidationError>>;
4701
+ /**
4702
+ * @description 创建一个新的Webhook订阅
4703
+ *
4704
+ * @tags webhook
4705
+ * @name CreateSubscriptionApiV1WebhookSubscriptionsPost
4706
+ * @summary 创建Webhook订阅
4707
+ * @request POST:/api/v1/webhook/subscriptions
4708
+ */
4709
+ createSubscriptionApiV1WebhookSubscriptionsPost: (data: IWebhookSubscriptionCreate, params?: RequestParams) => Promise<HttpResponse<IResponseModelWebhookSubscriptionResponse, void | IHTTPValidationError>>;
4710
+ /**
4711
+ * @description 分页查询租户的Webhook订阅,支持高级筛选条件
4712
+ *
4713
+ * @tags webhook
4714
+ * @name ListSubscriptionsApiV1WebhookSubscriptionsQueryPost
4715
+ * @summary 查询Webhook订阅列表
4716
+ * @request POST:/api/v1/webhook/subscriptions/query
4717
+ */
4718
+ listSubscriptionsApiV1WebhookSubscriptionsQueryPost: (data: IPageQueryParamsWebhookSubscription, params?: RequestParams) => Promise<HttpResponse<IResponseModelPageResponseWebhookSubscriptionResponse, void | IHTTPValidationError>>;
4719
+ /**
4720
+ * @description 删除指定的Webhook订阅
4721
+ *
4722
+ * @tags webhook
4723
+ * @name DeleteSubscriptionApiV1WebhookSubscriptionsWebhookIdDelete
4724
+ * @summary 删除Webhook订阅
4725
+ * @request DELETE:/api/v1/webhook/subscriptions/{webhook_id}
4726
+ */
4727
+ deleteSubscriptionApiV1WebhookSubscriptionsWebhookIdDelete: (webhookId: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelWebhookSubscriptionResponse, void | IHTTPValidationError>>;
4728
+ /**
4729
+ * @description 分页查询指定Webhook订阅的投递历史记录,支持高级筛选条件
4730
+ *
4731
+ * @tags webhook
4732
+ * @name ListDeliveriesApiV1WebhookSubscriptionsWebhookIdDeliveriesQueryPost
4733
+ * @summary 查询Webhook投递历史
4734
+ * @request POST:/api/v1/webhook/subscriptions/{webhook_id}/deliveries/query
4735
+ */
4736
+ listDeliveriesApiV1WebhookSubscriptionsWebhookIdDeliveriesQueryPost: (webhookId: string, data: IPageQueryParamsWebhookDelivery | null, params?: RequestParams) => Promise<HttpResponse<IResponseModelPageResponseWebhookDeliveryResponse, void | IHTTPValidationError>>;
4737
+ /**
4738
+ * @description 用于接收测试 whisker Webhook 发送的消息,验证 whisker自生分发功能
4739
+ *
4740
+ * @tags webhook
4741
+ * @name TestWebhookReceiverApiV1WebhookTestWhiskerWebhookReceiverPost
4742
+ * @summary 测试用例接收器
4743
+ * @request POST:/api/v1/webhook/test-whisker-webhook-receiver
4744
+ */
4745
+ testWebhookReceiverApiV1WebhookTestWhiskerWebhookReceiverPost: (data: Record<string, any>, params?: RequestParams) => Promise<HttpResponse<IResponseModelDictStrAny, void | IHTTPValidationError>>;
4746
+ /**
4747
+ * @description whisker 通用 webhook,用于接接收第三方系统的 webhook 事件
4275
4748
  *
4276
4749
  * @tags webhook
4277
4750
  * @name HandleWebhookApiV1WebhookWebhookTypeSourceAuthInfoKnowledgeBaseIdPost
@@ -4521,6 +4994,15 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4521
4994
  * @request PUT:/api/admin/tenant/{tenant_id}/space/{space_id}
4522
4995
  */
4523
4996
  adminUpdateSpace: (tenantId: string, spaceId: string, data: IAdminUpdateSpaceRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelSpace, void | IHTTPValidationError>>;
4997
+ /**
4998
+ * No description
4999
+ *
5000
+ * @tags admin
5001
+ * @name AdminRebuildKnowledgeIndex
5002
+ * @summary Admin Rebuild Knowledge Index
5003
+ * @request POST:/api/admin/knowledge-index/rebuild
5004
+ */
5005
+ adminRebuildKnowledgeIndex: (data: IAdminRebuildKnowledgeIndexRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelAdminRebuildKnowledgeIndexResponse, void | IHTTPValidationError>>;
4524
5006
  /**
4525
5007
  * @description 管理员同步 space summary 到自持 tenant 将目标 tenant 下所有(或指定)space 的 _ai_summary 写入自持 tenant 的知识库中。 可用于历史数据迁移或重建索引。
4526
5008
  *
@@ -4530,6 +5012,54 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4530
5012
  * @request POST:/api/admin/sync-summary-to-storage
4531
5013
  */
4532
5014
  adminSyncSummaryToStorage: (data: IAdminSyncSummaryToStorageRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelAdminSyncSummaryToStorageResponse, void | IHTTPValidationError>>;
5015
+ /**
5016
+ * @description 获取Webhook系统统计信息 返回 Outbox 队列和 Delivery 投递的统计数据
5017
+ *
5018
+ * @tags admin
5019
+ * @name AdminGetWebhookStats
5020
+ * @summary Admin Get Webhook Stats
5021
+ * @request GET:/api/admin/webhook/stats
5022
+ */
5023
+ adminGetWebhookStats: (params?: RequestParams) => Promise<HttpResponse<IResponseModelAdminWebhookStatsResponse, void | IHTTPValidationError>>;
5024
+ /**
5025
+ * @description 查询Webhook投递记录 支持按租户、订阅、状态、时间范围筛选
5026
+ *
5027
+ * @tags admin
5028
+ * @name AdminListWebhookDeliveries
5029
+ * @summary Admin List Webhook Deliveries
5030
+ * @request GET:/api/admin/webhook/deliveries
5031
+ */
5032
+ adminListWebhookDeliveries: (query?: {
5033
+ /** Tenant Id */
5034
+ tenant_id?: string | null;
5035
+ /** Webhook Id */
5036
+ webhook_id?: string | null;
5037
+ /** Status */
5038
+ status?: IWebhookDeliveryStatus | null;
5039
+ /** Start Time */
5040
+ start_time?: string | null;
5041
+ /** End Time */
5042
+ end_time?: string | null;
5043
+ /**
5044
+ * Page
5045
+ * @default 1
5046
+ */
5047
+ page?: number;
5048
+ /**
5049
+ * Page Size
5050
+ * @default 20
5051
+ */
5052
+ page_size?: number;
5053
+ }, params?: RequestParams) => Promise<HttpResponse<IResponseModelAdminWebhookDeliveryListResponse, void | IHTTPValidationError>>;
5054
+ /**
5055
+ * @description 手动重试Webhook投递 仅对 GAVE_UP 状态的投递记录有效,会将状态重置为 PENDING
5056
+ *
5057
+ * @tags admin
5058
+ * @name AdminRetryWebhookDelivery
5059
+ * @summary Admin Retry Webhook Delivery
5060
+ * @request POST:/api/admin/webhook/deliveries/{delivery_id}/retry
5061
+ */
5062
+ adminRetryWebhookDelivery: (deliveryId: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelAdminWebhookDeliveryResponse, void | IHTTPValidationError>>;
4533
5063
  };
4534
5064
  llmTxt: {
4535
5065
  /**
package/dist/api.js CHANGED
@@ -22,7 +22,45 @@ 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.IKnowledgeSourceEnum = exports.IKnowledgeTypeEnum = exports.ILanguage = exports.IOperator = exports.IResource = exports.ITagObjectType = exports.ITaskStatus = void 0;
25
+ exports.Api = exports.HttpClient = exports.ContentType = exports.IAction = exports.IKnowledgeSourceEnum = exports.IKnowledgeTypeEnum = exports.ILanguage = exports.IOperator = exports.IResource = exports.ITagObjectType = exports.ITaskStatus = exports.IWebhookDeliveryStatus = exports.IWebhookEventType = exports.IWebhookSubscriptionStatus = void 0;
26
+ /**
27
+ * WebhookSubscriptionStatus
28
+ * Webhook订阅状态
29
+ */
30
+ var IWebhookSubscriptionStatus;
31
+ (function (IWebhookSubscriptionStatus) {
32
+ IWebhookSubscriptionStatus["ACTIVE"] = "ACTIVE";
33
+ IWebhookSubscriptionStatus["INACTIVE"] = "INACTIVE";
34
+ IWebhookSubscriptionStatus["DELETED"] = "DELETED";
35
+ })(IWebhookSubscriptionStatus || (exports.IWebhookSubscriptionStatus = IWebhookSubscriptionStatus = {}));
36
+ /**
37
+ * WebhookEventType
38
+ * Webhook事件类型
39
+ */
40
+ var IWebhookEventType;
41
+ (function (IWebhookEventType) {
42
+ IWebhookEventType["SpaceCreated"] = "space.created";
43
+ IWebhookEventType["SpaceUpdated"] = "space.updated";
44
+ IWebhookEventType["SpaceDeleted"] = "space.deleted";
45
+ IWebhookEventType["KnowledgeCreated"] = "knowledge.created";
46
+ IWebhookEventType["KnowledgeUpdated"] = "knowledge.updated";
47
+ IWebhookEventType["KnowledgeDeleted"] = "knowledge.deleted";
48
+ IWebhookEventType["TaskHituPackageCompleted"] = "task.hitu_package.completed";
49
+ IWebhookEventType["TaskComponentRepoAnalyseCompleted"] = "task.component_repo_analyse.completed";
50
+ IWebhookEventType["TaskKnowledgeChunkCompleted"] = "task.knowledge_chunk.completed";
51
+ IWebhookEventType["TaskSpaceSummaryCompleted"] = "task.space_summary.completed";
52
+ IWebhookEventType["Test"] = "test";
53
+ })(IWebhookEventType || (exports.IWebhookEventType = IWebhookEventType = {}));
54
+ /**
55
+ * WebhookDeliveryStatus
56
+ * Webhook投递状态
57
+ */
58
+ var IWebhookDeliveryStatus;
59
+ (function (IWebhookDeliveryStatus) {
60
+ IWebhookDeliveryStatus["PENDING"] = "PENDING";
61
+ IWebhookDeliveryStatus["SUCCEEDED"] = "SUCCEEDED";
62
+ IWebhookDeliveryStatus["GAVE_UP"] = "GAVE_UP";
63
+ })(IWebhookDeliveryStatus || (exports.IWebhookDeliveryStatus = IWebhookDeliveryStatus = {}));
26
64
  /** TaskStatus */
27
65
  var ITaskStatus;
28
66
  (function (ITaskStatus) {
@@ -757,7 +795,61 @@ class Api extends HttpClient {
757
795
  */
758
796
  getTenantLog: (data, params = {}) => this.request(Object.assign({ path: `/api/v1/dashboard/tenant_log`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
759
797
  /**
760
- * @description whisker 通用 webhook
798
+ * @description 发送测试消息验证Webhook订阅配置是否正确
799
+ *
800
+ * @tags webhook
801
+ * @name TestSubscriptionApiV1WebhookSubscriptionsWebhookIdTestPost
802
+ * @summary 测试Webhook订阅
803
+ * @request POST:/api/v1/webhook/subscriptions/{webhook_id}/test
804
+ */
805
+ testSubscriptionApiV1WebhookSubscriptionsWebhookIdTestPost: (webhookId, params = {}) => this.request(Object.assign({ path: `/api/v1/webhook/subscriptions/${webhookId}/test`, method: "POST", format: "json" }, params)),
806
+ /**
807
+ * @description 创建一个新的Webhook订阅
808
+ *
809
+ * @tags webhook
810
+ * @name CreateSubscriptionApiV1WebhookSubscriptionsPost
811
+ * @summary 创建Webhook订阅
812
+ * @request POST:/api/v1/webhook/subscriptions
813
+ */
814
+ createSubscriptionApiV1WebhookSubscriptionsPost: (data, params = {}) => this.request(Object.assign({ path: `/api/v1/webhook/subscriptions`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
815
+ /**
816
+ * @description 分页查询租户的Webhook订阅,支持高级筛选条件
817
+ *
818
+ * @tags webhook
819
+ * @name ListSubscriptionsApiV1WebhookSubscriptionsQueryPost
820
+ * @summary 查询Webhook订阅列表
821
+ * @request POST:/api/v1/webhook/subscriptions/query
822
+ */
823
+ listSubscriptionsApiV1WebhookSubscriptionsQueryPost: (data, params = {}) => this.request(Object.assign({ path: `/api/v1/webhook/subscriptions/query`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
824
+ /**
825
+ * @description 删除指定的Webhook订阅
826
+ *
827
+ * @tags webhook
828
+ * @name DeleteSubscriptionApiV1WebhookSubscriptionsWebhookIdDelete
829
+ * @summary 删除Webhook订阅
830
+ * @request DELETE:/api/v1/webhook/subscriptions/{webhook_id}
831
+ */
832
+ deleteSubscriptionApiV1WebhookSubscriptionsWebhookIdDelete: (webhookId, params = {}) => this.request(Object.assign({ path: `/api/v1/webhook/subscriptions/${webhookId}`, method: "DELETE", format: "json" }, params)),
833
+ /**
834
+ * @description 分页查询指定Webhook订阅的投递历史记录,支持高级筛选条件
835
+ *
836
+ * @tags webhook
837
+ * @name ListDeliveriesApiV1WebhookSubscriptionsWebhookIdDeliveriesQueryPost
838
+ * @summary 查询Webhook投递历史
839
+ * @request POST:/api/v1/webhook/subscriptions/{webhook_id}/deliveries/query
840
+ */
841
+ listDeliveriesApiV1WebhookSubscriptionsWebhookIdDeliveriesQueryPost: (webhookId, data, params = {}) => this.request(Object.assign({ path: `/api/v1/webhook/subscriptions/${webhookId}/deliveries/query`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
842
+ /**
843
+ * @description 用于接收测试 whisker Webhook 发送的消息,验证 whisker自生分发功能
844
+ *
845
+ * @tags webhook
846
+ * @name TestWebhookReceiverApiV1WebhookTestWhiskerWebhookReceiverPost
847
+ * @summary 测试用例接收器
848
+ * @request POST:/api/v1/webhook/test-whisker-webhook-receiver
849
+ */
850
+ testWebhookReceiverApiV1WebhookTestWhiskerWebhookReceiverPost: (data, params = {}) => this.request(Object.assign({ path: `/api/v1/webhook/test-whisker-webhook-receiver`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
851
+ /**
852
+ * @description whisker 通用 webhook,用于接接收第三方系统的 webhook 事件
761
853
  *
762
854
  * @tags webhook
763
855
  * @name HandleWebhookApiV1WebhookWebhookTypeSourceAuthInfoKnowledgeBaseIdPost
@@ -1007,6 +1099,15 @@ class Api extends HttpClient {
1007
1099
  * @request PUT:/api/admin/tenant/{tenant_id}/space/{space_id}
1008
1100
  */
1009
1101
  adminUpdateSpace: (tenantId, spaceId, data, params = {}) => this.request(Object.assign({ path: `/api/admin/tenant/${tenantId}/space/${spaceId}`, method: "PUT", body: data, type: ContentType.Json, format: "json" }, params)),
1102
+ /**
1103
+ * No description
1104
+ *
1105
+ * @tags admin
1106
+ * @name AdminRebuildKnowledgeIndex
1107
+ * @summary Admin Rebuild Knowledge Index
1108
+ * @request POST:/api/admin/knowledge-index/rebuild
1109
+ */
1110
+ adminRebuildKnowledgeIndex: (data, params = {}) => this.request(Object.assign({ path: `/api/admin/knowledge-index/rebuild`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
1010
1111
  /**
1011
1112
  * @description 管理员同步 space summary 到自持 tenant 将目标 tenant 下所有(或指定)space 的 _ai_summary 写入自持 tenant 的知识库中。 可用于历史数据迁移或重建索引。
1012
1113
  *
@@ -1016,6 +1117,33 @@ class Api extends HttpClient {
1016
1117
  * @request POST:/api/admin/sync-summary-to-storage
1017
1118
  */
1018
1119
  adminSyncSummaryToStorage: (data, params = {}) => this.request(Object.assign({ path: `/api/admin/sync-summary-to-storage`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
1120
+ /**
1121
+ * @description 获取Webhook系统统计信息 返回 Outbox 队列和 Delivery 投递的统计数据
1122
+ *
1123
+ * @tags admin
1124
+ * @name AdminGetWebhookStats
1125
+ * @summary Admin Get Webhook Stats
1126
+ * @request GET:/api/admin/webhook/stats
1127
+ */
1128
+ adminGetWebhookStats: (params = {}) => this.request(Object.assign({ path: `/api/admin/webhook/stats`, method: "GET", format: "json" }, params)),
1129
+ /**
1130
+ * @description 查询Webhook投递记录 支持按租户、订阅、状态、时间范围筛选
1131
+ *
1132
+ * @tags admin
1133
+ * @name AdminListWebhookDeliveries
1134
+ * @summary Admin List Webhook Deliveries
1135
+ * @request GET:/api/admin/webhook/deliveries
1136
+ */
1137
+ adminListWebhookDeliveries: (query, params = {}) => this.request(Object.assign({ path: `/api/admin/webhook/deliveries`, method: "GET", query: query, format: "json" }, params)),
1138
+ /**
1139
+ * @description 手动重试Webhook投递 仅对 GAVE_UP 状态的投递记录有效,会将状态重置为 PENDING
1140
+ *
1141
+ * @tags admin
1142
+ * @name AdminRetryWebhookDelivery
1143
+ * @summary Admin Retry Webhook Delivery
1144
+ * @request POST:/api/admin/webhook/deliveries/{delivery_id}/retry
1145
+ */
1146
+ adminRetryWebhookDelivery: (deliveryId, params = {}) => this.request(Object.assign({ path: `/api/admin/webhook/deliveries/${deliveryId}/retry`, method: "POST", format: "json" }, params)),
1019
1147
  };
1020
1148
  this.llmTxt = {
1021
1149
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@petercatai/whisker-client",
3
- "version": "0.1.202601141132-dev",
4
- "description": "Generated API client (Development)",
3
+ "version": "0.1.202601221404",
4
+ "description": "Generated API client (Production)",
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": "dev"
16
+ "tag": "latest"
17
17
  },
18
18
  "devDependencies": {
19
- "@types/node": "^25.0.8",
19
+ "@types/node": "^25.0.10",
20
20
  "axios": "^1.13.2",
21
21
  "typescript": "^5.9.3"
22
22
  }