@petercatai/whisker-client 0.1.202512301436 → 0.1.202601221403
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 +935 -808
- package/dist/api.js +190 -2
- package/package.json +2 -2
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) {
|
|
@@ -127,6 +165,8 @@ var IKnowledgeTypeEnum;
|
|
|
127
165
|
IKnowledgeTypeEnum["Kotlin"] = "kotlin";
|
|
128
166
|
IKnowledgeTypeEnum["Js"] = "js";
|
|
129
167
|
IKnowledgeTypeEnum["Ts"] = "ts";
|
|
168
|
+
IKnowledgeTypeEnum["Jsx"] = "jsx";
|
|
169
|
+
IKnowledgeTypeEnum["Tsx"] = "tsx";
|
|
130
170
|
IKnowledgeTypeEnum["Php"] = "php";
|
|
131
171
|
IKnowledgeTypeEnum["Proto"] = "proto";
|
|
132
172
|
IKnowledgeTypeEnum["Python"] = "python";
|
|
@@ -444,6 +484,35 @@ class Api extends HttpClient {
|
|
|
444
484
|
*/
|
|
445
485
|
getKnowledgeOriginalContent: (query, params = {}) => this.request(Object.assign({ path: `/api/knowledge/original_content`, method: "GET", query: query, format: "json" }, params)),
|
|
446
486
|
};
|
|
487
|
+
this.knowledgeIndex = {
|
|
488
|
+
/**
|
|
489
|
+
* No description
|
|
490
|
+
*
|
|
491
|
+
* @tags knowledge_index
|
|
492
|
+
* @name GetKnowledgeIndexList
|
|
493
|
+
* @summary Get Knowledge Index List
|
|
494
|
+
* @request POST:/api/knowledge_index/list
|
|
495
|
+
*/
|
|
496
|
+
getKnowledgeIndexList: (data, params = {}) => this.request(Object.assign({ path: `/api/knowledge_index/list`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
497
|
+
/**
|
|
498
|
+
* No description
|
|
499
|
+
*
|
|
500
|
+
* @tags knowledge_index
|
|
501
|
+
* @name AddKnowledgeIndex
|
|
502
|
+
* @summary Add Knowledge Index
|
|
503
|
+
* @request POST:/api/knowledge_index/{knowledge_id}/add
|
|
504
|
+
*/
|
|
505
|
+
addKnowledgeIndex: (knowledgeId, data, params = {}) => this.request(Object.assign({ path: `/api/knowledge_index/${knowledgeId}/add`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
506
|
+
/**
|
|
507
|
+
* No description
|
|
508
|
+
*
|
|
509
|
+
* @tags knowledge_index
|
|
510
|
+
* @name DeleteKnowledgeIndex
|
|
511
|
+
* @summary Delete Knowledge Index
|
|
512
|
+
* @request POST:/api/knowledge_index/{knowledge_id}/delete
|
|
513
|
+
*/
|
|
514
|
+
deleteKnowledgeIndex: (knowledgeId, params = {}) => this.request(Object.assign({ path: `/api/knowledge_index/${knowledgeId}/delete`, method: "POST", format: "json" }, params)),
|
|
515
|
+
};
|
|
447
516
|
this.retrieval = {
|
|
448
517
|
/**
|
|
449
518
|
* @description 获取所有召回配置的 JSON Schema,用于前端动态渲染表单。 返回格式: { "deep_retrieval": { ... schema ... }, "region_retrieval": { ... schema ... }, "web_search": { ... schema ... }, ... }
|
|
@@ -726,7 +795,61 @@ class Api extends HttpClient {
|
|
|
726
795
|
*/
|
|
727
796
|
getTenantLog: (data, params = {}) => this.request(Object.assign({ path: `/api/v1/dashboard/tenant_log`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
|
|
728
797
|
/**
|
|
729
|
-
* @description
|
|
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 事件
|
|
730
853
|
*
|
|
731
854
|
* @tags webhook
|
|
732
855
|
* @name HandleWebhookApiV1WebhookWebhookTypeSourceAuthInfoKnowledgeBaseIdPost
|
|
@@ -976,6 +1099,71 @@ class Api extends HttpClient {
|
|
|
976
1099
|
* @request PUT:/api/admin/tenant/{tenant_id}/space/{space_id}
|
|
977
1100
|
*/
|
|
978
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)),
|
|
1111
|
+
/**
|
|
1112
|
+
* @description 管理员同步 space summary 到自持 tenant 将目标 tenant 下所有(或指定)space 的 _ai_summary 写入自持 tenant 的知识库中。 可用于历史数据迁移或重建索引。
|
|
1113
|
+
*
|
|
1114
|
+
* @tags admin
|
|
1115
|
+
* @name AdminSyncSummaryToStorage
|
|
1116
|
+
* @summary Admin Sync Summary To Storage
|
|
1117
|
+
* @request POST:/api/admin/sync-summary-to-storage
|
|
1118
|
+
*/
|
|
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)),
|
|
1147
|
+
};
|
|
1148
|
+
this.llmTxt = {
|
|
1149
|
+
/**
|
|
1150
|
+
* @description Get a structured map of documentation in llm.txt format.
|
|
1151
|
+
*
|
|
1152
|
+
* @tags llm_txt
|
|
1153
|
+
* @name GetLlmMapApiLlmTxtMapPost
|
|
1154
|
+
* @summary Get Llm Map
|
|
1155
|
+
* @request POST:/api/llm_txt/map
|
|
1156
|
+
*/
|
|
1157
|
+
getLlmMapApiLlmTxtMapPost: (data, params = {}) => this.request(Object.assign({ path: `/api/llm_txt/map`, method: "POST", body: data, type: ContentType.Json }, params)),
|
|
1158
|
+
/**
|
|
1159
|
+
* No description
|
|
1160
|
+
*
|
|
1161
|
+
* @tags llm_txt
|
|
1162
|
+
* @name GetLlmSourceApiLlmTxtSourcePost
|
|
1163
|
+
* @summary Get Llm Source
|
|
1164
|
+
* @request POST:/api/llm_txt/source
|
|
1165
|
+
*/
|
|
1166
|
+
getLlmSourceApiLlmTxtSourcePost: (data, params = {}) => this.request(Object.assign({ path: `/api/llm_txt/source`, method: "POST", body: data, type: ContentType.Json }, params)),
|
|
979
1167
|
};
|
|
980
1168
|
this.healthChecker = {
|
|
981
1169
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@petercatai/whisker-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.202601221403",
|
|
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.0.
|
|
19
|
+
"@types/node": "^25.0.10",
|
|
20
20
|
"axios": "^1.13.2",
|
|
21
21
|
"typescript": "^5.9.3"
|
|
22
22
|
}
|