@petercatai/whisker-client 0.1.202512231541 → 0.1.202512291542-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.d.ts CHANGED
@@ -317,6 +317,129 @@ export interface IActiveStatusUpdate {
317
317
  /** Status */
318
318
  status: boolean;
319
319
  }
320
+ /**
321
+ * AdminTaskRestartRequest
322
+ * 管理员任务重启请求
323
+ */
324
+ export interface IAdminTaskRestartRequest {
325
+ /**
326
+ * Start Time
327
+ * 开始时间 (UTC)
328
+ * @format date-time
329
+ */
330
+ start_time: string;
331
+ /**
332
+ * End Time
333
+ * 结束时间 (UTC)
334
+ * @format date-time
335
+ */
336
+ end_time: string;
337
+ /**
338
+ * Status List
339
+ * 任务状态列表,如 ['failed', 'canceled']
340
+ */
341
+ status_list: ITaskStatus[];
342
+ /**
343
+ * Tenant Id
344
+ * 租户ID(可选)
345
+ */
346
+ tenant_id?: string | null;
347
+ /**
348
+ * Space Id
349
+ * 空间ID(可选)
350
+ */
351
+ space_id?: string | null;
352
+ /**
353
+ * Task Type
354
+ * 任务类型(可选)
355
+ */
356
+ task_type?: string | null;
357
+ /**
358
+ * Dry Run
359
+ * 是否仅预览,不实际重启
360
+ * @default false
361
+ */
362
+ dry_run?: boolean;
363
+ }
364
+ /**
365
+ * AdminTaskRestartResponse
366
+ * 管理员任务重启响应
367
+ */
368
+ export interface IAdminTaskRestartResponse {
369
+ /**
370
+ * Total Matched
371
+ * 匹配的任务总数
372
+ */
373
+ total_matched: number;
374
+ /**
375
+ * Restarted Count
376
+ * 成功重启的任务数
377
+ */
378
+ restarted_count: number;
379
+ /**
380
+ * Task Ids
381
+ * 重启的任务ID列表
382
+ */
383
+ task_ids?: string[];
384
+ }
385
+ /**
386
+ * AdminUpdateSpaceRequest
387
+ * 管理员更新空间信息请求
388
+ */
389
+ export interface IAdminUpdateSpaceRequest {
390
+ /**
391
+ * Space Name
392
+ * 空间名称
393
+ */
394
+ space_name?: string | null;
395
+ /**
396
+ * Description
397
+ * 空间描述
398
+ */
399
+ description?: string | null;
400
+ /**
401
+ * Metadata
402
+ * 元数据
403
+ */
404
+ metadata?: Record<string, any> | null;
405
+ }
406
+ /**
407
+ * AdminUpdateTenantRequest
408
+ * 管理员更新租户信息请求
409
+ */
410
+ export interface IAdminUpdateTenantRequest {
411
+ /**
412
+ * Tenant Name
413
+ * 租户名称
414
+ */
415
+ tenant_name?: string | null;
416
+ /**
417
+ * Email
418
+ * 邮箱
419
+ */
420
+ email?: string | null;
421
+ /**
422
+ * Is Active
423
+ * 是否激活
424
+ */
425
+ is_active?: boolean | null;
426
+ /**
427
+ * Metadata
428
+ * 元数据
429
+ */
430
+ metadata?: Record<string, any> | null;
431
+ }
432
+ /**
433
+ * AdminUpdateTenantSecretKeyRequest
434
+ * 管理员更新租户密钥请求
435
+ */
436
+ export interface IAdminUpdateTenantSecretKeyRequest {
437
+ /**
438
+ * Secret Key
439
+ * 新密钥,格式必须为 sk-xxxx(至少10个字符)
440
+ */
441
+ secret_key: string;
442
+ }
320
443
  /**
321
444
  * ArtifactIndex
322
445
  * whisker_artifact_index 模型
@@ -2290,6 +2413,14 @@ export interface IResponseModelAPIKey {
2290
2413
  /** Message */
2291
2414
  message?: string | null;
2292
2415
  }
2416
+ /** ResponseModel[AdminTaskRestartResponse] */
2417
+ export interface IResponseModelAdminTaskRestartResponse {
2418
+ /** Success */
2419
+ success: boolean;
2420
+ data?: IAdminTaskRestartResponse | null;
2421
+ /** Message */
2422
+ message?: string | null;
2423
+ }
2293
2424
  /** ResponseModel[Any] */
2294
2425
  export interface IResponseModelAny {
2295
2426
  /** Success */
@@ -2511,6 +2642,14 @@ export interface IResponseModelSpaceResponse {
2511
2642
  /** Message */
2512
2643
  message?: string | null;
2513
2644
  }
2645
+ /** ResponseModel[Space] */
2646
+ export interface IResponseModelSpace {
2647
+ /** Success */
2648
+ success: boolean;
2649
+ data?: ISpaceOutput | null;
2650
+ /** Message */
2651
+ message?: string | null;
2652
+ }
2514
2653
  /** ResponseModel[StatusStatisticsPageResponse[Task]] */
2515
2654
  export interface IResponseModelStatusStatisticsPageResponseTask {
2516
2655
  /** Success */
@@ -2891,6 +3030,88 @@ export interface IS3SourceConfig {
2891
3030
  */
2892
3031
  auth_info?: string | null;
2893
3032
  }
3033
+ /** Space */
3034
+ export interface ISpaceInput {
3035
+ /**
3036
+ * Gmt Create
3037
+ * creation time
3038
+ */
3039
+ gmt_create?: string | null;
3040
+ /**
3041
+ * Gmt Modified
3042
+ * update time
3043
+ */
3044
+ gmt_modified?: string | null;
3045
+ /**
3046
+ * Space Name
3047
+ * name of the space resource
3048
+ * @maxLength 64
3049
+ */
3050
+ space_name: string;
3051
+ /**
3052
+ * Space Id
3053
+ * space id
3054
+ */
3055
+ space_id?: string;
3056
+ /**
3057
+ * Description
3058
+ * descrition of the space
3059
+ * @maxLength 255
3060
+ */
3061
+ description: string;
3062
+ /**
3063
+ * Metadata
3064
+ * metadata of the space resource
3065
+ * @default {}
3066
+ */
3067
+ metadata?: Record<string, any>;
3068
+ /**
3069
+ * Tenant Id
3070
+ * tenant id
3071
+ */
3072
+ tenant_id: string;
3073
+ }
3074
+ /** Space */
3075
+ export interface ISpaceOutput {
3076
+ /**
3077
+ * Gmt Create
3078
+ * creation time
3079
+ */
3080
+ gmt_create?: string | null;
3081
+ /**
3082
+ * Gmt Modified
3083
+ * update time
3084
+ */
3085
+ gmt_modified?: string | null;
3086
+ /**
3087
+ * Space Name
3088
+ * name of the space resource
3089
+ * @maxLength 64
3090
+ */
3091
+ space_name: string;
3092
+ /**
3093
+ * Space Id
3094
+ * space id
3095
+ */
3096
+ space_id?: string;
3097
+ /**
3098
+ * Description
3099
+ * descrition of the space
3100
+ * @maxLength 255
3101
+ */
3102
+ description: string;
3103
+ /**
3104
+ * Metadata
3105
+ * metadata of the space resource
3106
+ * @default {}
3107
+ */
3108
+ metadata?: Record<string, any>;
3109
+ /**
3110
+ * Tenant Id
3111
+ * tenant id
3112
+ */
3113
+ tenant_id: string;
3114
+ }
2894
3115
  /**
2895
3116
  * SpaceCreate
2896
3117
  * SpaceCreate model for creating space resources.
@@ -3749,9 +3970,8 @@ export interface ITextSourceConfig {
3749
3970
  * Text content, length range 1-30000 characters
3750
3971
  * @minLength 1
3751
3972
  * @maxLength 30000
3752
- * @default ""
3753
3973
  */
3754
- text?: string;
3974
+ text: string;
3755
3975
  }
3756
3976
  /**
3757
3977
  * TextSplitConfig
@@ -4233,7 +4453,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4233
4453
  };
4234
4454
  task: {
4235
4455
  /**
4236
- * @description 重启任务 使用DDD架构的TaskCoordinationService进行任务重启并执行。 重试规则: 1. FAILED 或 CANCELED 状态的任务可以重试 2. 创建时间超过30分钟且未成功的任务可以重试
4456
+ * @description 重试任务 满足下面任意一条规则: 1. FAILED 或 CANCELED 状态的任务可以重试 2. 创建时间超过30分钟且未成功的任务可以重试
4237
4457
  *
4238
4458
  * @tags task
4239
4459
  * @name RestartTask
@@ -4242,7 +4462,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4242
4462
  */
4243
4463
  restartTask: (data: ITaskRestartRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelListTask, void | IHTTPValidationError>>;
4244
4464
  /**
4245
- * @description 取消任务 使用DDD架构的TaskService进行任务取消。
4465
+ * @description 将任务标记为取消
4246
4466
  *
4247
4467
  * @tags task
4248
4468
  * @name CancelTask
@@ -4251,7 +4471,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4251
4471
  */
4252
4472
  cancelTask: (data: ITaskRestartRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelListTask, void | IHTTPValidationError>>;
4253
4473
  /**
4254
- * @description 获取任务列表 使用DDD架构的TaskService进行分页查询。
4474
+ * @description 获取任务列表
4255
4475
  *
4256
4476
  * @tags task
4257
4477
  * @name GetTaskList
@@ -4260,7 +4480,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4260
4480
  */
4261
4481
  getTaskList: (data: IPageQueryParamsTask, params?: RequestParams) => Promise<HttpResponse<IResponseModelStatusStatisticsPageResponseTask, void | IHTTPValidationError>>;
4262
4482
  /**
4263
- * @description 获取任务详情 使用DDD架构的TaskService获取任务详情。
4483
+ * @description 获取任务详情
4264
4484
  *
4265
4485
  * @tags task
4266
4486
  * @name GetTaskDetail
@@ -4272,7 +4492,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4272
4492
  task_id: string;
4273
4493
  }, params?: RequestParams) => Promise<HttpResponse<IResponseModelTask, void | IHTTPValidationError>>;
4274
4494
  /**
4275
- * @description 删除任务 使用DDD架构的TaskService进行任务删除。
4495
+ * @description 删除任务,从数据库中移除任务记录
4276
4496
  *
4277
4497
  * @tags task
4278
4498
  * @name DeleteTaskById
@@ -4696,6 +4916,44 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4696
4916
  */
4697
4917
  proxyYuqueGetDoc: (docId: string, params?: RequestParams) => Promise<HttpResponse<IResponseModelAny, void | IHTTPValidationError>>;
4698
4918
  };
4919
+ admin: {
4920
+ /**
4921
+ * @description 管理员批量重启任务 根据时间范围、状态、租户、空间等条件筛选并重启任务。 满足下面任意一条规则的任务可以重启: 1. FAILED 或 CANCELED 状态的任务可以重试 2. 创建时间超过30分钟且未成功的任务可以重试
4922
+ *
4923
+ * @tags admin
4924
+ * @name AdminRestartTasks
4925
+ * @summary Admin Restart Tasks
4926
+ * @request POST:/api/admin/task/restart
4927
+ */
4928
+ adminRestartTasks: (data: IAdminTaskRestartRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelAdminTaskRestartResponse, void | IHTTPValidationError>>;
4929
+ /**
4930
+ * @description 管理员更新租户信息 支持更新 tenant_name、email、is_active、metadata。 所有字段均为可选,只传入需要更新的字段即可。
4931
+ *
4932
+ * @tags admin
4933
+ * @name AdminUpdateTenant
4934
+ * @summary Admin Update Tenant
4935
+ * @request PUT:/api/admin/tenant/{tenant_id}
4936
+ */
4937
+ adminUpdateTenant: (tenantId: string, data: IAdminUpdateTenantRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelTenant, void | IHTTPValidationError>>;
4938
+ /**
4939
+ * @description 管理员更新租户密钥 secret_key 必须符合 sk-xxxx 格式,且长度大于10个字符。 密钥将自动加密后存储。
4940
+ *
4941
+ * @tags admin
4942
+ * @name AdminUpdateTenantSecretKey
4943
+ * @summary Admin Update Tenant Secret Key
4944
+ * @request PUT:/api/admin/tenant/{tenant_id}/secret-key
4945
+ */
4946
+ adminUpdateTenantSecretKey: (tenantId: string, data: IAdminUpdateTenantSecretKeyRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelTenant, void | IHTTPValidationError>>;
4947
+ /**
4948
+ * @description 管理员更新空间信息 支持更新 space_name、description、metadata。 所有字段均为可选,只传入需要更新的字段即可。
4949
+ *
4950
+ * @tags admin
4951
+ * @name AdminUpdateSpace
4952
+ * @summary Admin Update Space
4953
+ * @request PUT:/api/admin/tenant/{tenant_id}/space/{space_id}
4954
+ */
4955
+ adminUpdateSpace: (tenantId: string, spaceId: string, data: IAdminUpdateSpaceRequest, params?: RequestParams) => Promise<HttpResponse<IResponseModelSpace, void | IHTTPValidationError>>;
4956
+ };
4699
4957
  healthChecker: {
4700
4958
  /**
4701
4959
  * No description
package/dist/api.js CHANGED
@@ -493,7 +493,7 @@ class Api extends HttpClient {
493
493
  };
494
494
  this.task = {
495
495
  /**
496
- * @description 重启任务 使用DDD架构的TaskCoordinationService进行任务重启并执行。 重试规则: 1. FAILED 或 CANCELED 状态的任务可以重试 2. 创建时间超过30分钟且未成功的任务可以重试
496
+ * @description 重试任务 满足下面任意一条规则: 1. FAILED 或 CANCELED 状态的任务可以重试 2. 创建时间超过30分钟且未成功的任务可以重试
497
497
  *
498
498
  * @tags task
499
499
  * @name RestartTask
@@ -502,7 +502,7 @@ class Api extends HttpClient {
502
502
  */
503
503
  restartTask: (data, params = {}) => this.request(Object.assign({ path: `/api/task/restart`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
504
504
  /**
505
- * @description 取消任务 使用DDD架构的TaskService进行任务取消。
505
+ * @description 将任务标记为取消
506
506
  *
507
507
  * @tags task
508
508
  * @name CancelTask
@@ -511,7 +511,7 @@ class Api extends HttpClient {
511
511
  */
512
512
  cancelTask: (data, params = {}) => this.request(Object.assign({ path: `/api/task/cancel`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
513
513
  /**
514
- * @description 获取任务列表 使用DDD架构的TaskService进行分页查询。
514
+ * @description 获取任务列表
515
515
  *
516
516
  * @tags task
517
517
  * @name GetTaskList
@@ -520,7 +520,7 @@ class Api extends HttpClient {
520
520
  */
521
521
  getTaskList: (data, params = {}) => this.request(Object.assign({ path: `/api/task/list`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
522
522
  /**
523
- * @description 获取任务详情 使用DDD架构的TaskService获取任务详情。
523
+ * @description 获取任务详情
524
524
  *
525
525
  * @tags task
526
526
  * @name GetTaskDetail
@@ -529,7 +529,7 @@ class Api extends HttpClient {
529
529
  */
530
530
  getTaskDetail: (query, params = {}) => this.request(Object.assign({ path: `/api/task/detail`, method: "GET", query: query, format: "json" }, params)),
531
531
  /**
532
- * @description 删除任务 使用DDD架构的TaskService进行任务删除。
532
+ * @description 删除任务,从数据库中移除任务记录
533
533
  *
534
534
  * @tags task
535
535
  * @name DeleteTaskById
@@ -939,6 +939,44 @@ class Api extends HttpClient {
939
939
  */
940
940
  proxyYuqueGetDoc: (docId, params = {}) => this.request(Object.assign({ path: `/api/yuque/repos/docs/${docId}`, method: "GET", format: "json" }, params)),
941
941
  };
942
+ this.admin = {
943
+ /**
944
+ * @description 管理员批量重启任务 根据时间范围、状态、租户、空间等条件筛选并重启任务。 满足下面任意一条规则的任务可以重启: 1. FAILED 或 CANCELED 状态的任务可以重试 2. 创建时间超过30分钟且未成功的任务可以重试
945
+ *
946
+ * @tags admin
947
+ * @name AdminRestartTasks
948
+ * @summary Admin Restart Tasks
949
+ * @request POST:/api/admin/task/restart
950
+ */
951
+ adminRestartTasks: (data, params = {}) => this.request(Object.assign({ path: `/api/admin/task/restart`, method: "POST", body: data, type: ContentType.Json, format: "json" }, params)),
952
+ /**
953
+ * @description 管理员更新租户信息 支持更新 tenant_name、email、is_active、metadata。 所有字段均为可选,只传入需要更新的字段即可。
954
+ *
955
+ * @tags admin
956
+ * @name AdminUpdateTenant
957
+ * @summary Admin Update Tenant
958
+ * @request PUT:/api/admin/tenant/{tenant_id}
959
+ */
960
+ adminUpdateTenant: (tenantId, data, params = {}) => this.request(Object.assign({ path: `/api/admin/tenant/${tenantId}`, method: "PUT", body: data, type: ContentType.Json, format: "json" }, params)),
961
+ /**
962
+ * @description 管理员更新租户密钥 secret_key 必须符合 sk-xxxx 格式,且长度大于10个字符。 密钥将自动加密后存储。
963
+ *
964
+ * @tags admin
965
+ * @name AdminUpdateTenantSecretKey
966
+ * @summary Admin Update Tenant Secret Key
967
+ * @request PUT:/api/admin/tenant/{tenant_id}/secret-key
968
+ */
969
+ adminUpdateTenantSecretKey: (tenantId, data, params = {}) => this.request(Object.assign({ path: `/api/admin/tenant/${tenantId}/secret-key`, method: "PUT", body: data, type: ContentType.Json, format: "json" }, params)),
970
+ /**
971
+ * @description 管理员更新空间信息 支持更新 space_name、description、metadata。 所有字段均为可选,只传入需要更新的字段即可。
972
+ *
973
+ * @tags admin
974
+ * @name AdminUpdateSpace
975
+ * @summary Admin Update Space
976
+ * @request PUT:/api/admin/tenant/{tenant_id}/space/{space_id}
977
+ */
978
+ 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)),
979
+ };
942
980
  this.healthChecker = {
943
981
  /**
944
982
  * No description
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@petercatai/whisker-client",
3
- "version": "0.1.202512231541",
4
- "description": "Generated API client (Production)",
3
+ "version": "0.1.202512291542-dev",
4
+ "description": "Generated API client (Productuon)",
5
5
  "main": "dist/api.js",
6
6
  "types": "dist/api.d.ts",
7
7
  "files": [
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "publishConfig": {
15
15
  "access": "public",
16
- "tag": "latest"
16
+ "tag": "dev"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/node": "^25.0.3",