@blade-hq/agent-kit 0.4.4 → 0.4.5
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/README.md +3 -0
- package/dist/client/index.d.ts +529 -40
- package/dist/client/index.js +20 -1
- package/dist/client/index.js.map +1 -1
- package/dist/react/index.d.ts +74 -2
- package/dist/react/index.js +131 -23
- package/dist/react/index.js.map +1 -1
- package/dist/style.css +2 -0
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -22,8 +22,11 @@ pnpm install
|
|
|
22
22
|
```ts
|
|
23
23
|
import { BladeClient } from "@blade-hq/agent-kit/client"
|
|
24
24
|
import { BladeClientProvider } from "@blade-hq/agent-kit/react"
|
|
25
|
+
import "@blade-hq/agent-kit/style.css"
|
|
25
26
|
```
|
|
26
27
|
|
|
28
|
+
如果使用 `@blade-hq/agent-kit/chat`、`@blade-hq/agent-kit/session` 等预制 React UI,应用入口必须导入 `@blade-hq/agent-kit/style.css`。只使用 `/client` 或 hooks 自行渲染 UI 时不需要导入这份样式。
|
|
29
|
+
|
|
27
30
|
## 认证
|
|
28
31
|
|
|
29
32
|
SDK 支持 cookie 会话和 Bearer Token 两种模式。
|
package/dist/client/index.d.ts
CHANGED
|
@@ -10,6 +10,23 @@ import 'socket.io-client';
|
|
|
10
10
|
* Do not make direct changes to the file.
|
|
11
11
|
*/
|
|
12
12
|
interface paths {
|
|
13
|
+
"/api/auth/me": {
|
|
14
|
+
parameters: {
|
|
15
|
+
query?: never;
|
|
16
|
+
header?: never;
|
|
17
|
+
path?: never;
|
|
18
|
+
cookie?: never;
|
|
19
|
+
};
|
|
20
|
+
/** Me */
|
|
21
|
+
get: operations["me_api_auth_me_get"];
|
|
22
|
+
put?: never;
|
|
23
|
+
post?: never;
|
|
24
|
+
delete?: never;
|
|
25
|
+
options?: never;
|
|
26
|
+
head?: never;
|
|
27
|
+
patch?: never;
|
|
28
|
+
trace?: never;
|
|
29
|
+
};
|
|
13
30
|
"/api/config": {
|
|
14
31
|
parameters: {
|
|
15
32
|
query?: never;
|
|
@@ -92,7 +109,7 @@ interface paths {
|
|
|
92
109
|
* Login Submit
|
|
93
110
|
* @description mock 登录页提交。仅 ``mock + mock_login_page=true`` 时挂用。
|
|
94
111
|
*
|
|
95
|
-
* 校验顺序:state →
|
|
112
|
+
* 校验顺序:state → 用户名/密码命中某个 mock user。命中走真 mint 路径。
|
|
96
113
|
* 失败则重新拿 state 重渲染表单(让用户能重试,next 不丢)。
|
|
97
114
|
*/
|
|
98
115
|
post: operations["login_submit_api_auth_login_post"];
|
|
@@ -176,23 +193,6 @@ interface paths {
|
|
|
176
193
|
patch?: never;
|
|
177
194
|
trace?: never;
|
|
178
195
|
};
|
|
179
|
-
"/api/auth/me": {
|
|
180
|
-
parameters: {
|
|
181
|
-
query?: never;
|
|
182
|
-
header?: never;
|
|
183
|
-
path?: never;
|
|
184
|
-
cookie?: never;
|
|
185
|
-
};
|
|
186
|
-
/** Me */
|
|
187
|
-
get: operations["me_api_auth_me_get"];
|
|
188
|
-
put?: never;
|
|
189
|
-
post?: never;
|
|
190
|
-
delete?: never;
|
|
191
|
-
options?: never;
|
|
192
|
-
head?: never;
|
|
193
|
-
patch?: never;
|
|
194
|
-
trace?: never;
|
|
195
|
-
};
|
|
196
196
|
"/api/gis/{session_id}/state": {
|
|
197
197
|
parameters: {
|
|
198
198
|
query?: never;
|
|
@@ -1088,6 +1088,111 @@ interface paths {
|
|
|
1088
1088
|
patch: operations["rename_api_key_api_user_api_keys__key_id__patch"];
|
|
1089
1089
|
trace?: never;
|
|
1090
1090
|
};
|
|
1091
|
+
"/api/scheduled-tasks": {
|
|
1092
|
+
parameters: {
|
|
1093
|
+
query?: never;
|
|
1094
|
+
header?: never;
|
|
1095
|
+
path?: never;
|
|
1096
|
+
cookie?: never;
|
|
1097
|
+
};
|
|
1098
|
+
/** List Scheduled Tasks */
|
|
1099
|
+
get: operations["list_scheduled_tasks_api_scheduled_tasks_get"];
|
|
1100
|
+
put?: never;
|
|
1101
|
+
/** Create Scheduled Task */
|
|
1102
|
+
post: operations["create_scheduled_task_api_scheduled_tasks_post"];
|
|
1103
|
+
delete?: never;
|
|
1104
|
+
options?: never;
|
|
1105
|
+
head?: never;
|
|
1106
|
+
patch?: never;
|
|
1107
|
+
trace?: never;
|
|
1108
|
+
};
|
|
1109
|
+
"/api/scheduled-tasks/calendar": {
|
|
1110
|
+
parameters: {
|
|
1111
|
+
query?: never;
|
|
1112
|
+
header?: never;
|
|
1113
|
+
path?: never;
|
|
1114
|
+
cookie?: never;
|
|
1115
|
+
};
|
|
1116
|
+
/** Get Scheduled Task Calendar */
|
|
1117
|
+
get: operations["get_scheduled_task_calendar_api_scheduled_tasks_calendar_get"];
|
|
1118
|
+
put?: never;
|
|
1119
|
+
post?: never;
|
|
1120
|
+
delete?: never;
|
|
1121
|
+
options?: never;
|
|
1122
|
+
head?: never;
|
|
1123
|
+
patch?: never;
|
|
1124
|
+
trace?: never;
|
|
1125
|
+
};
|
|
1126
|
+
"/api/scheduled-tasks/{task_id}": {
|
|
1127
|
+
parameters: {
|
|
1128
|
+
query?: never;
|
|
1129
|
+
header?: never;
|
|
1130
|
+
path?: never;
|
|
1131
|
+
cookie?: never;
|
|
1132
|
+
};
|
|
1133
|
+
/** Get Scheduled Task */
|
|
1134
|
+
get: operations["get_scheduled_task_api_scheduled_tasks__task_id__get"];
|
|
1135
|
+
put?: never;
|
|
1136
|
+
post?: never;
|
|
1137
|
+
/** Delete Scheduled Task */
|
|
1138
|
+
delete: operations["delete_scheduled_task_api_scheduled_tasks__task_id__delete"];
|
|
1139
|
+
options?: never;
|
|
1140
|
+
head?: never;
|
|
1141
|
+
/** Update Scheduled Task */
|
|
1142
|
+
patch: operations["update_scheduled_task_api_scheduled_tasks__task_id__patch"];
|
|
1143
|
+
trace?: never;
|
|
1144
|
+
};
|
|
1145
|
+
"/api/scheduled-tasks/{task_id}/start": {
|
|
1146
|
+
parameters: {
|
|
1147
|
+
query?: never;
|
|
1148
|
+
header?: never;
|
|
1149
|
+
path?: never;
|
|
1150
|
+
cookie?: never;
|
|
1151
|
+
};
|
|
1152
|
+
get?: never;
|
|
1153
|
+
put?: never;
|
|
1154
|
+
/** Start Scheduled Task */
|
|
1155
|
+
post: operations["start_scheduled_task_api_scheduled_tasks__task_id__start_post"];
|
|
1156
|
+
delete?: never;
|
|
1157
|
+
options?: never;
|
|
1158
|
+
head?: never;
|
|
1159
|
+
patch?: never;
|
|
1160
|
+
trace?: never;
|
|
1161
|
+
};
|
|
1162
|
+
"/api/scheduled-tasks/{task_id}/stop": {
|
|
1163
|
+
parameters: {
|
|
1164
|
+
query?: never;
|
|
1165
|
+
header?: never;
|
|
1166
|
+
path?: never;
|
|
1167
|
+
cookie?: never;
|
|
1168
|
+
};
|
|
1169
|
+
get?: never;
|
|
1170
|
+
put?: never;
|
|
1171
|
+
/** Stop Scheduled Task */
|
|
1172
|
+
post: operations["stop_scheduled_task_api_scheduled_tasks__task_id__stop_post"];
|
|
1173
|
+
delete?: never;
|
|
1174
|
+
options?: never;
|
|
1175
|
+
head?: never;
|
|
1176
|
+
patch?: never;
|
|
1177
|
+
trace?: never;
|
|
1178
|
+
};
|
|
1179
|
+
"/api/scheduled-tasks/{task_id}/runs": {
|
|
1180
|
+
parameters: {
|
|
1181
|
+
query?: never;
|
|
1182
|
+
header?: never;
|
|
1183
|
+
path?: never;
|
|
1184
|
+
cookie?: never;
|
|
1185
|
+
};
|
|
1186
|
+
/** List Scheduled Task Runs */
|
|
1187
|
+
get: operations["list_scheduled_task_runs_api_scheduled_tasks__task_id__runs_get"];
|
|
1188
|
+
put?: never;
|
|
1189
|
+
post?: never;
|
|
1190
|
+
delete?: never;
|
|
1191
|
+
options?: never;
|
|
1192
|
+
head?: never;
|
|
1193
|
+
patch?: never;
|
|
1194
|
+
trace?: never;
|
|
1195
|
+
};
|
|
1091
1196
|
"/api/solutions": {
|
|
1092
1197
|
parameters: {
|
|
1093
1198
|
query?: never;
|
|
@@ -2846,6 +2951,117 @@ interface components {
|
|
|
2846
2951
|
*/
|
|
2847
2952
|
memoryEnabled: boolean;
|
|
2848
2953
|
};
|
|
2954
|
+
/** ScheduledTaskCalendarItem */
|
|
2955
|
+
ScheduledTaskCalendarItem: {
|
|
2956
|
+
/** Task Id */
|
|
2957
|
+
task_id: string;
|
|
2958
|
+
/** Title */
|
|
2959
|
+
title: string;
|
|
2960
|
+
/** Occurrences */
|
|
2961
|
+
occurrences: string[];
|
|
2962
|
+
};
|
|
2963
|
+
/** ScheduledTaskCreateRequest */
|
|
2964
|
+
ScheduledTaskCreateRequest: {
|
|
2965
|
+
/** Title */
|
|
2966
|
+
title: string;
|
|
2967
|
+
/** Prompt */
|
|
2968
|
+
prompt: string;
|
|
2969
|
+
/** Cron */
|
|
2970
|
+
cron: string;
|
|
2971
|
+
/**
|
|
2972
|
+
* Timezone
|
|
2973
|
+
* @default Asia/Shanghai
|
|
2974
|
+
*/
|
|
2975
|
+
timezone: string;
|
|
2976
|
+
/**
|
|
2977
|
+
* Enabled
|
|
2978
|
+
* @default true
|
|
2979
|
+
*/
|
|
2980
|
+
enabled: boolean;
|
|
2981
|
+
/** Expires At */
|
|
2982
|
+
expires_at?: string | null;
|
|
2983
|
+
/**
|
|
2984
|
+
* Skip Confirmations
|
|
2985
|
+
* @default false
|
|
2986
|
+
*/
|
|
2987
|
+
skip_confirmations: boolean;
|
|
2988
|
+
/** Model */
|
|
2989
|
+
model?: string | null;
|
|
2990
|
+
};
|
|
2991
|
+
/** ScheduledTaskPublic */
|
|
2992
|
+
ScheduledTaskPublic: {
|
|
2993
|
+
/** Id */
|
|
2994
|
+
id: string;
|
|
2995
|
+
/** Title */
|
|
2996
|
+
title: string;
|
|
2997
|
+
/** Prompt */
|
|
2998
|
+
prompt: string;
|
|
2999
|
+
/** Cron */
|
|
3000
|
+
cron: string;
|
|
3001
|
+
/** Timezone */
|
|
3002
|
+
timezone: string;
|
|
3003
|
+
/** Enabled */
|
|
3004
|
+
enabled: boolean;
|
|
3005
|
+
/** Expires At */
|
|
3006
|
+
expires_at: string | null;
|
|
3007
|
+
/** Skip Confirmations */
|
|
3008
|
+
skip_confirmations: boolean;
|
|
3009
|
+
/** Model */
|
|
3010
|
+
model: string | null;
|
|
3011
|
+
/** Next Run At */
|
|
3012
|
+
next_run_at: string | null;
|
|
3013
|
+
/** Last Run At */
|
|
3014
|
+
last_run_at: string | null;
|
|
3015
|
+
/**
|
|
3016
|
+
* Created At
|
|
3017
|
+
* Format: date-time
|
|
3018
|
+
*/
|
|
3019
|
+
created_at: string;
|
|
3020
|
+
/**
|
|
3021
|
+
* Updated At
|
|
3022
|
+
* Format: date-time
|
|
3023
|
+
*/
|
|
3024
|
+
updated_at: string;
|
|
3025
|
+
};
|
|
3026
|
+
/** ScheduledTaskRunPublic */
|
|
3027
|
+
ScheduledTaskRunPublic: {
|
|
3028
|
+
/** Id */
|
|
3029
|
+
id: string;
|
|
3030
|
+
/** Task Id */
|
|
3031
|
+
task_id: string;
|
|
3032
|
+
/** Session Id */
|
|
3033
|
+
session_id: string | null;
|
|
3034
|
+
/** Status */
|
|
3035
|
+
status: string;
|
|
3036
|
+
/** Error */
|
|
3037
|
+
error: string | null;
|
|
3038
|
+
/**
|
|
3039
|
+
* Triggered At
|
|
3040
|
+
* Format: date-time
|
|
3041
|
+
*/
|
|
3042
|
+
triggered_at: string;
|
|
3043
|
+
/** Finished At */
|
|
3044
|
+
finished_at: string | null;
|
|
3045
|
+
};
|
|
3046
|
+
/** ScheduledTaskUpdateRequest */
|
|
3047
|
+
ScheduledTaskUpdateRequest: {
|
|
3048
|
+
/** Title */
|
|
3049
|
+
title?: string;
|
|
3050
|
+
/** Prompt */
|
|
3051
|
+
prompt?: string;
|
|
3052
|
+
/** Cron */
|
|
3053
|
+
cron?: string;
|
|
3054
|
+
/** Timezone */
|
|
3055
|
+
timezone?: string;
|
|
3056
|
+
/** Enabled */
|
|
3057
|
+
enabled?: boolean;
|
|
3058
|
+
/** Expires At */
|
|
3059
|
+
expires_at?: string | null;
|
|
3060
|
+
/** Skip Confirmations */
|
|
3061
|
+
skip_confirmations?: boolean;
|
|
3062
|
+
/** Model */
|
|
3063
|
+
model?: string | null;
|
|
3064
|
+
};
|
|
2849
3065
|
/** SessionMemoryRequest */
|
|
2850
3066
|
SessionMemoryRequest: {
|
|
2851
3067
|
/** Memory Enabled */
|
|
@@ -3202,6 +3418,28 @@ interface components {
|
|
|
3202
3418
|
pathItems: never;
|
|
3203
3419
|
}
|
|
3204
3420
|
interface operations {
|
|
3421
|
+
me_api_auth_me_get: {
|
|
3422
|
+
parameters: {
|
|
3423
|
+
query?: never;
|
|
3424
|
+
header?: never;
|
|
3425
|
+
path?: never;
|
|
3426
|
+
cookie?: never;
|
|
3427
|
+
};
|
|
3428
|
+
requestBody?: never;
|
|
3429
|
+
responses: {
|
|
3430
|
+
/** @description Successful Response */
|
|
3431
|
+
200: {
|
|
3432
|
+
headers: {
|
|
3433
|
+
[name: string]: unknown;
|
|
3434
|
+
};
|
|
3435
|
+
content: {
|
|
3436
|
+
"application/json": {
|
|
3437
|
+
[key: string]: unknown;
|
|
3438
|
+
};
|
|
3439
|
+
};
|
|
3440
|
+
};
|
|
3441
|
+
};
|
|
3442
|
+
};
|
|
3205
3443
|
get_runtime_config_api_config_get: {
|
|
3206
3444
|
parameters: {
|
|
3207
3445
|
query?: never;
|
|
@@ -3465,28 +3703,6 @@ interface operations {
|
|
|
3465
3703
|
};
|
|
3466
3704
|
};
|
|
3467
3705
|
};
|
|
3468
|
-
me_api_auth_me_get: {
|
|
3469
|
-
parameters: {
|
|
3470
|
-
query?: never;
|
|
3471
|
-
header?: never;
|
|
3472
|
-
path?: never;
|
|
3473
|
-
cookie?: never;
|
|
3474
|
-
};
|
|
3475
|
-
requestBody?: never;
|
|
3476
|
-
responses: {
|
|
3477
|
-
/** @description Successful Response */
|
|
3478
|
-
200: {
|
|
3479
|
-
headers: {
|
|
3480
|
-
[name: string]: unknown;
|
|
3481
|
-
};
|
|
3482
|
-
content: {
|
|
3483
|
-
"application/json": {
|
|
3484
|
-
[key: string]: unknown;
|
|
3485
|
-
};
|
|
3486
|
-
};
|
|
3487
|
-
};
|
|
3488
|
-
};
|
|
3489
|
-
};
|
|
3490
3706
|
get_gis_state_api_gis__session_id__state_get: {
|
|
3491
3707
|
parameters: {
|
|
3492
3708
|
query?: never;
|
|
@@ -5531,6 +5747,279 @@ interface operations {
|
|
|
5531
5747
|
};
|
|
5532
5748
|
};
|
|
5533
5749
|
};
|
|
5750
|
+
list_scheduled_tasks_api_scheduled_tasks_get: {
|
|
5751
|
+
parameters: {
|
|
5752
|
+
query?: never;
|
|
5753
|
+
header?: never;
|
|
5754
|
+
path?: never;
|
|
5755
|
+
cookie?: never;
|
|
5756
|
+
};
|
|
5757
|
+
requestBody?: never;
|
|
5758
|
+
responses: {
|
|
5759
|
+
/** @description Successful Response */
|
|
5760
|
+
200: {
|
|
5761
|
+
headers: {
|
|
5762
|
+
[name: string]: unknown;
|
|
5763
|
+
};
|
|
5764
|
+
content: {
|
|
5765
|
+
"application/json": components["schemas"]["ScheduledTaskPublic"][];
|
|
5766
|
+
};
|
|
5767
|
+
};
|
|
5768
|
+
};
|
|
5769
|
+
};
|
|
5770
|
+
create_scheduled_task_api_scheduled_tasks_post: {
|
|
5771
|
+
parameters: {
|
|
5772
|
+
query?: never;
|
|
5773
|
+
header?: never;
|
|
5774
|
+
path?: never;
|
|
5775
|
+
cookie?: never;
|
|
5776
|
+
};
|
|
5777
|
+
requestBody: {
|
|
5778
|
+
content: {
|
|
5779
|
+
"application/json": components["schemas"]["ScheduledTaskCreateRequest"];
|
|
5780
|
+
};
|
|
5781
|
+
};
|
|
5782
|
+
responses: {
|
|
5783
|
+
/** @description Successful Response */
|
|
5784
|
+
201: {
|
|
5785
|
+
headers: {
|
|
5786
|
+
[name: string]: unknown;
|
|
5787
|
+
};
|
|
5788
|
+
content: {
|
|
5789
|
+
"application/json": components["schemas"]["ScheduledTaskPublic"];
|
|
5790
|
+
};
|
|
5791
|
+
};
|
|
5792
|
+
/** @description Validation Error */
|
|
5793
|
+
422: {
|
|
5794
|
+
headers: {
|
|
5795
|
+
[name: string]: unknown;
|
|
5796
|
+
};
|
|
5797
|
+
content: {
|
|
5798
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
5799
|
+
};
|
|
5800
|
+
};
|
|
5801
|
+
};
|
|
5802
|
+
};
|
|
5803
|
+
get_scheduled_task_calendar_api_scheduled_tasks_calendar_get: {
|
|
5804
|
+
parameters: {
|
|
5805
|
+
query: {
|
|
5806
|
+
from: string;
|
|
5807
|
+
to: string;
|
|
5808
|
+
};
|
|
5809
|
+
header?: never;
|
|
5810
|
+
path?: never;
|
|
5811
|
+
cookie?: never;
|
|
5812
|
+
};
|
|
5813
|
+
requestBody?: never;
|
|
5814
|
+
responses: {
|
|
5815
|
+
/** @description Successful Response */
|
|
5816
|
+
200: {
|
|
5817
|
+
headers: {
|
|
5818
|
+
[name: string]: unknown;
|
|
5819
|
+
};
|
|
5820
|
+
content: {
|
|
5821
|
+
"application/json": components["schemas"]["ScheduledTaskCalendarItem"][];
|
|
5822
|
+
};
|
|
5823
|
+
};
|
|
5824
|
+
/** @description Validation Error */
|
|
5825
|
+
422: {
|
|
5826
|
+
headers: {
|
|
5827
|
+
[name: string]: unknown;
|
|
5828
|
+
};
|
|
5829
|
+
content: {
|
|
5830
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
5831
|
+
};
|
|
5832
|
+
};
|
|
5833
|
+
};
|
|
5834
|
+
};
|
|
5835
|
+
get_scheduled_task_api_scheduled_tasks__task_id__get: {
|
|
5836
|
+
parameters: {
|
|
5837
|
+
query?: never;
|
|
5838
|
+
header?: never;
|
|
5839
|
+
path: {
|
|
5840
|
+
task_id: string;
|
|
5841
|
+
};
|
|
5842
|
+
cookie?: never;
|
|
5843
|
+
};
|
|
5844
|
+
requestBody?: never;
|
|
5845
|
+
responses: {
|
|
5846
|
+
/** @description Successful Response */
|
|
5847
|
+
200: {
|
|
5848
|
+
headers: {
|
|
5849
|
+
[name: string]: unknown;
|
|
5850
|
+
};
|
|
5851
|
+
content: {
|
|
5852
|
+
"application/json": components["schemas"]["ScheduledTaskPublic"];
|
|
5853
|
+
};
|
|
5854
|
+
};
|
|
5855
|
+
/** @description Validation Error */
|
|
5856
|
+
422: {
|
|
5857
|
+
headers: {
|
|
5858
|
+
[name: string]: unknown;
|
|
5859
|
+
};
|
|
5860
|
+
content: {
|
|
5861
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
5862
|
+
};
|
|
5863
|
+
};
|
|
5864
|
+
};
|
|
5865
|
+
};
|
|
5866
|
+
delete_scheduled_task_api_scheduled_tasks__task_id__delete: {
|
|
5867
|
+
parameters: {
|
|
5868
|
+
query?: never;
|
|
5869
|
+
header?: never;
|
|
5870
|
+
path: {
|
|
5871
|
+
task_id: string;
|
|
5872
|
+
};
|
|
5873
|
+
cookie?: never;
|
|
5874
|
+
};
|
|
5875
|
+
requestBody?: never;
|
|
5876
|
+
responses: {
|
|
5877
|
+
/** @description Successful Response */
|
|
5878
|
+
204: {
|
|
5879
|
+
headers: {
|
|
5880
|
+
[name: string]: unknown;
|
|
5881
|
+
};
|
|
5882
|
+
content?: never;
|
|
5883
|
+
};
|
|
5884
|
+
/** @description Validation Error */
|
|
5885
|
+
422: {
|
|
5886
|
+
headers: {
|
|
5887
|
+
[name: string]: unknown;
|
|
5888
|
+
};
|
|
5889
|
+
content: {
|
|
5890
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
5891
|
+
};
|
|
5892
|
+
};
|
|
5893
|
+
};
|
|
5894
|
+
};
|
|
5895
|
+
update_scheduled_task_api_scheduled_tasks__task_id__patch: {
|
|
5896
|
+
parameters: {
|
|
5897
|
+
query?: never;
|
|
5898
|
+
header?: never;
|
|
5899
|
+
path: {
|
|
5900
|
+
task_id: string;
|
|
5901
|
+
};
|
|
5902
|
+
cookie?: never;
|
|
5903
|
+
};
|
|
5904
|
+
requestBody: {
|
|
5905
|
+
content: {
|
|
5906
|
+
"application/json": components["schemas"]["ScheduledTaskUpdateRequest"];
|
|
5907
|
+
};
|
|
5908
|
+
};
|
|
5909
|
+
responses: {
|
|
5910
|
+
/** @description Successful Response */
|
|
5911
|
+
200: {
|
|
5912
|
+
headers: {
|
|
5913
|
+
[name: string]: unknown;
|
|
5914
|
+
};
|
|
5915
|
+
content: {
|
|
5916
|
+
"application/json": components["schemas"]["ScheduledTaskPublic"];
|
|
5917
|
+
};
|
|
5918
|
+
};
|
|
5919
|
+
/** @description Validation Error */
|
|
5920
|
+
422: {
|
|
5921
|
+
headers: {
|
|
5922
|
+
[name: string]: unknown;
|
|
5923
|
+
};
|
|
5924
|
+
content: {
|
|
5925
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
5926
|
+
};
|
|
5927
|
+
};
|
|
5928
|
+
};
|
|
5929
|
+
};
|
|
5930
|
+
start_scheduled_task_api_scheduled_tasks__task_id__start_post: {
|
|
5931
|
+
parameters: {
|
|
5932
|
+
query?: never;
|
|
5933
|
+
header?: never;
|
|
5934
|
+
path: {
|
|
5935
|
+
task_id: string;
|
|
5936
|
+
};
|
|
5937
|
+
cookie?: never;
|
|
5938
|
+
};
|
|
5939
|
+
requestBody?: never;
|
|
5940
|
+
responses: {
|
|
5941
|
+
/** @description Successful Response */
|
|
5942
|
+
200: {
|
|
5943
|
+
headers: {
|
|
5944
|
+
[name: string]: unknown;
|
|
5945
|
+
};
|
|
5946
|
+
content: {
|
|
5947
|
+
"application/json": components["schemas"]["ScheduledTaskPublic"];
|
|
5948
|
+
};
|
|
5949
|
+
};
|
|
5950
|
+
/** @description Validation Error */
|
|
5951
|
+
422: {
|
|
5952
|
+
headers: {
|
|
5953
|
+
[name: string]: unknown;
|
|
5954
|
+
};
|
|
5955
|
+
content: {
|
|
5956
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
5957
|
+
};
|
|
5958
|
+
};
|
|
5959
|
+
};
|
|
5960
|
+
};
|
|
5961
|
+
stop_scheduled_task_api_scheduled_tasks__task_id__stop_post: {
|
|
5962
|
+
parameters: {
|
|
5963
|
+
query?: never;
|
|
5964
|
+
header?: never;
|
|
5965
|
+
path: {
|
|
5966
|
+
task_id: string;
|
|
5967
|
+
};
|
|
5968
|
+
cookie?: never;
|
|
5969
|
+
};
|
|
5970
|
+
requestBody?: never;
|
|
5971
|
+
responses: {
|
|
5972
|
+
/** @description Successful Response */
|
|
5973
|
+
200: {
|
|
5974
|
+
headers: {
|
|
5975
|
+
[name: string]: unknown;
|
|
5976
|
+
};
|
|
5977
|
+
content: {
|
|
5978
|
+
"application/json": components["schemas"]["ScheduledTaskPublic"];
|
|
5979
|
+
};
|
|
5980
|
+
};
|
|
5981
|
+
/** @description Validation Error */
|
|
5982
|
+
422: {
|
|
5983
|
+
headers: {
|
|
5984
|
+
[name: string]: unknown;
|
|
5985
|
+
};
|
|
5986
|
+
content: {
|
|
5987
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
5988
|
+
};
|
|
5989
|
+
};
|
|
5990
|
+
};
|
|
5991
|
+
};
|
|
5992
|
+
list_scheduled_task_runs_api_scheduled_tasks__task_id__runs_get: {
|
|
5993
|
+
parameters: {
|
|
5994
|
+
query?: never;
|
|
5995
|
+
header?: never;
|
|
5996
|
+
path: {
|
|
5997
|
+
task_id: string;
|
|
5998
|
+
};
|
|
5999
|
+
cookie?: never;
|
|
6000
|
+
};
|
|
6001
|
+
requestBody?: never;
|
|
6002
|
+
responses: {
|
|
6003
|
+
/** @description Successful Response */
|
|
6004
|
+
200: {
|
|
6005
|
+
headers: {
|
|
6006
|
+
[name: string]: unknown;
|
|
6007
|
+
};
|
|
6008
|
+
content: {
|
|
6009
|
+
"application/json": components["schemas"]["ScheduledTaskRunPublic"][];
|
|
6010
|
+
};
|
|
6011
|
+
};
|
|
6012
|
+
/** @description Validation Error */
|
|
6013
|
+
422: {
|
|
6014
|
+
headers: {
|
|
6015
|
+
[name: string]: unknown;
|
|
6016
|
+
};
|
|
6017
|
+
content: {
|
|
6018
|
+
"application/json": components["schemas"]["HTTPValidationError"];
|
|
6019
|
+
};
|
|
6020
|
+
};
|
|
6021
|
+
};
|
|
6022
|
+
};
|
|
5534
6023
|
list_solutions_api_solutions_get: {
|
|
5535
6024
|
parameters: {
|
|
5536
6025
|
query?: never;
|
package/dist/client/index.js
CHANGED
|
@@ -28,9 +28,28 @@ var ApiKeysResource = class {
|
|
|
28
28
|
return this.client.json("PATCH", `/api/user/api-keys/${encodeURIComponent(id)}`, { name });
|
|
29
29
|
}
|
|
30
30
|
async deleteApiKey(id) {
|
|
31
|
-
|
|
31
|
+
try {
|
|
32
|
+
await this.client.json("DELETE", `/api/user/api-keys/${encodeURIComponent(id)}`);
|
|
33
|
+
} catch (err) {
|
|
34
|
+
if (err instanceof BladeApiError) {
|
|
35
|
+
const detail = await readErrorDetail(err.response);
|
|
36
|
+
if (detail) {
|
|
37
|
+
throw new Error(detail);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
throw err;
|
|
41
|
+
}
|
|
32
42
|
}
|
|
33
43
|
};
|
|
44
|
+
async function readErrorDetail(response) {
|
|
45
|
+
try {
|
|
46
|
+
const data = await response.clone().json();
|
|
47
|
+
const detail = data?.detail;
|
|
48
|
+
return typeof detail === "string" && detail.trim() ? detail : null;
|
|
49
|
+
} catch {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
34
53
|
|
|
35
54
|
// src/client/resources/auth.ts
|
|
36
55
|
var AuthResource = class {
|