@leaflow/sdk 0.0.0-dev.113.g5d6fb99 → 0.0.0-dev.13.g732c6b7

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 ADDED
@@ -0,0 +1,24 @@
1
+ # leaflow-ts
2
+
3
+ Leaflow 平台的 TypeScript SDK(`@leaflow/sdk`)。
4
+ `gen/` 下全是产物,源在 `LeaflowNET/leaflowapis`。
5
+
6
+ ## 为什么和 Go 分开在两个仓库
7
+
8
+ **它们在同一个仓库里会抢同一个 tag 空间。** Go 的子目录模块要 `go/v1.2.3` 这种带前缀的 tag,
9
+ npm 要 `v1.2.3`——上一版两者挤在一个仓库里,结果是 Go 那半从来没被正确发布过,而没有任何东西
10
+ 会报错(`go get` 只是拿不到)。
11
+
12
+ ## 契约是一个 submodule
13
+
14
+ ```
15
+ leaflowapis/ 钉在某一个 commit 上——那个指针就是「这版 SDK 出自哪版契约」的答案
16
+ ```
17
+
18
+ ```
19
+ git submodule update --remote leaflowapis # 要跟进新契约时才做
20
+ npm run generate
21
+ ```
22
+
23
+ 产物由人在本地跑完提交,CI 只验证不写回:一个会 commit 回来的流水线,在两次推送挨得近时只能靠
24
+ 重试或者强推——前者会打架,后者会丢东西。
@@ -22,6 +22,8 @@ export type SubmitIdentityVerificationResult = operations["submit-identity-verif
22
22
  export type SubmitIdentityVerificationBody = NonNullable<operations["submit-identity-verification"]["requestBody"]>["content"]["application/json"];
23
23
  /** `GET /account/v1/me/invitations` 成功时的响应体。 */
24
24
  export type ListMyInvitationsResult = operations["list-my-invitations"]["responses"][200]["content"]["application/json"];
25
+ /** `GET /account/v1/me/invitations` 的查询参数。 */
26
+ export type ListMyInvitationsQuery = operations["list-my-invitations"]["parameters"]["query"];
25
27
  /** `POST /account/v1/me/invitations/accept` 成功时的响应体。 */
26
28
  export type AcceptInvitationByTokenResult = operations["accept-invitation-by-token"]["responses"][200]["content"]["application/json"];
27
29
  /** `POST /account/v1/me/invitations/accept` 的请求体。 */
@@ -30,6 +32,8 @@ export type AcceptInvitationByTokenBody = NonNullable<operations["accept-invitat
30
32
  export type AcceptInvitationResult = operations["accept-invitation"]["responses"][200]["content"]["application/json"];
31
33
  /** `GET /account/v1/projects` 成功时的响应体。 */
32
34
  export type ListProjectsResult = operations["list-projects"]["responses"][200]["content"]["application/json"];
35
+ /** `GET /account/v1/projects` 的查询参数。 */
36
+ export type ListProjectsQuery = operations["list-projects"]["parameters"]["query"];
33
37
  /** `POST /account/v1/projects` 成功时的响应体。 */
34
38
  export type CreateProjectResult = operations["create-project"]["responses"][201]["content"]["application/json"];
35
39
  /** `POST /account/v1/projects` 的请求体。 */
@@ -1,68 +1,80 @@
1
1
  export type { paths, components, operations, webhooks } from "./schema.js";
2
2
  import type { operations } from "./schema.js";
3
- /** `POST /v1/attachments` 成功时的响应体。 */
3
+ /** `POST /api/v1/attachments` 成功时的响应体。 */
4
4
  export type UploadAttachmentResult = operations["upload-attachment"]["responses"][201]["content"]["application/json"];
5
- /** `GET /v1/bindings` 成功时的响应体。 */
5
+ /** `GET /api/v1/bindings` 成功时的响应体。 */
6
6
  export type ListBindingsResult = operations["list-bindings"]["responses"][200]["content"]["application/json"];
7
- /** `GET /v1/bindings/{binding}` 成功时的响应体。 */
7
+ /** `GET /api/v1/bindings` 的查询参数。 */
8
+ export type ListBindingsQuery = operations["list-bindings"]["parameters"]["query"];
9
+ /** `GET /api/v1/bindings/{binding}` 成功时的响应体。 */
8
10
  export type GetBindingResult = operations["get-binding"]["responses"][200]["content"]["application/json"];
9
- /** `GET /v1/channels` 成功时的响应体。 */
11
+ /** `GET /api/v1/channels` 成功时的响应体。 */
10
12
  export type ListChannelsResult = operations["list-channels"]["responses"][200]["content"]["application/json"];
11
- /** `POST /v1/channels` 成功时的响应体。 */
13
+ /** `GET /api/v1/channels` 的查询参数。 */
14
+ export type ListChannelsQuery = operations["list-channels"]["parameters"]["query"];
15
+ /** `POST /api/v1/channels` 成功时的响应体。 */
12
16
  export type CreateChannelResult = operations["create-channel"]["responses"][201]["content"]["application/json"];
13
- /** `POST /v1/channels` 的请求体。 */
17
+ /** `POST /api/v1/channels` 的请求体。 */
14
18
  export type CreateChannelBody = NonNullable<operations["create-channel"]["requestBody"]>["content"]["application/json"];
15
- /** `GET /v1/channels/{channel}` 成功时的响应体。 */
19
+ /** `GET /api/v1/channels/{channel}` 成功时的响应体。 */
16
20
  export type GetChannelResult = operations["get-channel"]["responses"][200]["content"]["application/json"];
17
- /** `PATCH /v1/channels/{channel}` 成功时的响应体。 */
21
+ /** `PATCH /api/v1/channels/{channel}` 成功时的响应体。 */
18
22
  export type UpdateChannelResult = operations["update-channel"]["responses"][200]["content"]["application/json"];
19
- /** `PATCH /v1/channels/{channel}` 的请求体。 */
23
+ /** `PATCH /api/v1/channels/{channel}` 的请求体。 */
20
24
  export type UpdateChannelBody = NonNullable<operations["update-channel"]["requestBody"]>["content"]["application/json"];
21
- /** `POST /v1/channels/{channel}/binding-codes` 成功时的响应体。 */
25
+ /** `POST /api/v1/channels/{channel}/binding-codes` 成功时的响应体。 */
22
26
  export type CreateBindingCodeResult = operations["create-binding-code"]["responses"][201]["content"]["application/json"];
23
- /** `GET /v1/channels/{channel}/rejections` 成功时的响应体。 */
27
+ /** `GET /api/v1/channels/{channel}/rejections` 成功时的响应体。 */
24
28
  export type ListChannelRejectionsResult = operations["list-channel-rejections"]["responses"][200]["content"]["application/json"];
25
- /** `POST /v1/channels/{channel}/secret` 成功时的响应体。 */
29
+ /** `GET /api/v1/channels/{channel}/rejections` 的查询参数。 */
30
+ export type ListChannelRejectionsQuery = operations["list-channel-rejections"]["parameters"]["query"];
31
+ /** `POST /api/v1/channels/{channel}/secret` 成功时的响应体。 */
26
32
  export type RotateChannelSecretResult = operations["rotate-channel-secret"]["responses"][200]["content"]["application/json"];
27
- /** `POST /v1/channels/{channel}/secret` 的请求体。 */
33
+ /** `POST /api/v1/channels/{channel}/secret` 的请求体。 */
28
34
  export type RotateChannelSecretBody = NonNullable<operations["rotate-channel-secret"]["requestBody"]>["content"]["application/json"];
29
- /** `GET /v1/channels/{channel}/sender-check` 成功时的响应体。 */
35
+ /** `GET /api/v1/channels/{channel}/sender-check` 成功时的响应体。 */
30
36
  export type CheckSenderResult = operations["check-sender"]["responses"][200]["content"]["application/json"];
31
- /** `POST /v1/channels/{channel}/weixin-logins` 成功时的响应体。 */
37
+ /** `GET /api/v1/channels/{channel}/sender-check` 的查询参数。 */
38
+ export type CheckSenderQuery = operations["check-sender"]["parameters"]["query"];
39
+ /** `POST /api/v1/channels/{channel}/weixin-logins` 成功时的响应体。 */
32
40
  export type BeginWeixinLoginResult = operations["begin-weixin-login"]["responses"][201]["content"]["application/json"];
33
- /** `GET /v1/platforms` 成功时的响应体。 */
41
+ /** `GET /api/v1/platforms` 成功时的响应体。 */
34
42
  export type ListPlatformsResult = operations["list-platforms"]["responses"][200]["content"]["application/json"];
35
- /** `GET /v1/weixin-logins/{login}` 成功时的响应体。 */
43
+ /** `GET /api/v1/weixin-logins/{login}` 成功时的响应体。 */
36
44
  export type GetWeixinLoginResult = operations["get-weixin-login"]["responses"][200]["content"]["application/json"];
37
- /** `POST /v1/weixin-logins/{login}/verify-code` 成功时的响应体。 */
45
+ /** `POST /api/v1/weixin-logins/{login}/verify-code` 成功时的响应体。 */
38
46
  export type SubmitWeixinVerifyCodeResult = operations["submit-weixin-verify-code"]["responses"][200]["content"]["application/json"];
39
- /** `POST /v1/weixin-logins/{login}/verify-code` 的请求体。 */
47
+ /** `POST /api/v1/weixin-logins/{login}/verify-code` 的请求体。 */
40
48
  export type SubmitWeixinVerifyCodeBody = NonNullable<operations["submit-weixin-verify-code"]["requestBody"]>["content"]["application/json"];
41
- /** `GET /v1/models` 成功时的响应体。 */
49
+ /** `GET /api/v1/models` 成功时的响应体。 */
42
50
  export type ListModelsResult = operations["list-models"]["responses"][200]["content"]["application/json"];
43
- /** `GET /v1/threads` 成功时的响应体。 */
51
+ /** `GET /api/v1/threads` 成功时的响应体。 */
44
52
  export type ListThreadsResult = operations["list-threads"]["responses"][200]["content"]["application/json"];
45
- /** `POST /v1/threads` 成功时的响应体。 */
53
+ /** `GET /api/v1/threads` 的查询参数。 */
54
+ export type ListThreadsQuery = operations["list-threads"]["parameters"]["query"];
55
+ /** `POST /api/v1/threads` 成功时的响应体。 */
46
56
  export type CreateThreadResult = operations["create-thread"]["responses"][201]["content"]["application/json"];
47
- /** `POST /v1/threads` 的请求体。 */
57
+ /** `POST /api/v1/threads` 的请求体。 */
48
58
  export type CreateThreadBody = NonNullable<operations["create-thread"]["requestBody"]>["content"]["application/json"];
49
- /** `GET /v1/threads/{thread}` 成功时的响应体。 */
59
+ /** `GET /api/v1/threads/{thread}` 成功时的响应体。 */
50
60
  export type GetThreadResult = operations["get-thread"]["responses"][200]["content"]["application/json"];
51
- /** `PATCH /v1/threads/{thread}` 成功时的响应体。 */
61
+ /** `PATCH /api/v1/threads/{thread}` 成功时的响应体。 */
52
62
  export type UpdateThreadResult = operations["update-thread"]["responses"][200]["content"]["application/json"];
53
- /** `PATCH /v1/threads/{thread}` 的请求体。 */
63
+ /** `PATCH /api/v1/threads/{thread}` 的请求体。 */
54
64
  export type UpdateThreadBody = NonNullable<operations["update-thread"]["requestBody"]>["content"]["application/json"];
55
- /** `POST /v1/threads/{thread}/approvals/{batch}` 的请求体。 */
65
+ /** `POST /api/v1/threads/{thread}/approvals/{batch}` 的请求体。 */
56
66
  export type DecideApprovalBody = NonNullable<operations["decide-approval"]["requestBody"]>["content"]["application/json"];
57
- /** `GET /v1/threads/{thread}/earlier` 成功时的响应体。 */
67
+ /** `GET /api/v1/threads/{thread}/earlier` 成功时的响应体。 */
58
68
  export type ListEarlierItemsResult = operations["list-earlier-items"]["responses"][200]["content"]["application/json"];
59
- /** `POST /v1/threads/{thread}/messages` 成功时的响应体。 */
69
+ /** `GET /api/v1/threads/{thread}/earlier` 的查询参数。 */
70
+ export type ListEarlierItemsQuery = operations["list-earlier-items"]["parameters"]["query"];
71
+ /** `POST /api/v1/threads/{thread}/messages` 成功时的响应体。 */
60
72
  export type SendMessageResult = operations["send-message"]["responses"][202]["content"]["application/json"];
61
- /** `POST /v1/threads/{thread}/messages` 的请求体。 */
73
+ /** `POST /api/v1/threads/{thread}/messages` 的请求体。 */
62
74
  export type SendMessageBody = NonNullable<operations["send-message"]["requestBody"]>["content"]["application/json"];
63
- /** `POST /v1/threads/{thread}/questions/{item}` 的请求体。 */
75
+ /** `POST /api/v1/threads/{thread}/questions/{item}` 的请求体。 */
64
76
  export type AnswerQuestionBody = NonNullable<operations["answer-question"]["requestBody"]>["content"]["application/json"];
65
- /** `POST /v1/threads/{thread}/revert` 成功时的响应体。 */
77
+ /** `POST /api/v1/threads/{thread}/revert` 成功时的响应体。 */
66
78
  export type RevertThreadResult = operations["revert-thread"]["responses"][200]["content"]["application/json"];
67
- /** `POST /v1/threads/{thread}/revert` 的请求体。 */
79
+ /** `POST /api/v1/threads/{thread}/revert` 的请求体。 */
68
80
  export type RevertThreadBody = NonNullable<operations["revert-thread"]["requestBody"]>["content"]["application/json"];
@@ -3,7 +3,7 @@
3
3
  * Do not make direct changes to the file.
4
4
  */
5
5
  export interface paths {
6
- "/v1/attachments": {
6
+ "/api/v1/attachments": {
7
7
  parameters: {
8
8
  query?: never;
9
9
  header?: never;
@@ -23,7 +23,7 @@ export interface paths {
23
23
  patch?: never;
24
24
  trace?: never;
25
25
  };
26
- "/v1/attachments/{attachment}": {
26
+ "/api/v1/attachments/{attachment}": {
27
27
  parameters: {
28
28
  query?: never;
29
29
  header?: never;
@@ -43,7 +43,7 @@ export interface paths {
43
43
  patch?: never;
44
44
  trace?: never;
45
45
  };
46
- "/v1/bindings": {
46
+ "/api/v1/bindings": {
47
47
  parameters: {
48
48
  query?: never;
49
49
  header?: never;
@@ -63,7 +63,7 @@ export interface paths {
63
63
  patch?: never;
64
64
  trace?: never;
65
65
  };
66
- "/v1/bindings/{binding}": {
66
+ "/api/v1/bindings/{binding}": {
67
67
  parameters: {
68
68
  query?: never;
69
69
  header?: never;
@@ -81,7 +81,7 @@ export interface paths {
81
81
  patch?: never;
82
82
  trace?: never;
83
83
  };
84
- "/v1/channels": {
84
+ "/api/v1/channels": {
85
85
  parameters: {
86
86
  query?: never;
87
87
  header?: never;
@@ -102,7 +102,7 @@ export interface paths {
102
102
  patch?: never;
103
103
  trace?: never;
104
104
  };
105
- "/v1/channels/{channel}": {
105
+ "/api/v1/channels/{channel}": {
106
106
  parameters: {
107
107
  query?: never;
108
108
  header?: never;
@@ -127,7 +127,7 @@ export interface paths {
127
127
  patch: operations["update-channel"];
128
128
  trace?: never;
129
129
  };
130
- "/v1/channels/{channel}/binding-codes": {
130
+ "/api/v1/channels/{channel}/binding-codes": {
131
131
  parameters: {
132
132
  query?: never;
133
133
  header?: never;
@@ -147,7 +147,7 @@ export interface paths {
147
147
  patch?: never;
148
148
  trace?: never;
149
149
  };
150
- "/v1/channels/{channel}/rejections": {
150
+ "/api/v1/channels/{channel}/rejections": {
151
151
  parameters: {
152
152
  query?: never;
153
153
  header?: never;
@@ -167,7 +167,7 @@ export interface paths {
167
167
  patch?: never;
168
168
  trace?: never;
169
169
  };
170
- "/v1/channels/{channel}/secret": {
170
+ "/api/v1/channels/{channel}/secret": {
171
171
  parameters: {
172
172
  query?: never;
173
173
  header?: never;
@@ -187,7 +187,7 @@ export interface paths {
187
187
  patch?: never;
188
188
  trace?: never;
189
189
  };
190
- "/v1/channels/{channel}/sender-check": {
190
+ "/api/v1/channels/{channel}/sender-check": {
191
191
  parameters: {
192
192
  query?: never;
193
193
  header?: never;
@@ -207,7 +207,7 @@ export interface paths {
207
207
  patch?: never;
208
208
  trace?: never;
209
209
  };
210
- "/v1/channels/{channel}/weixin-logins": {
210
+ "/api/v1/channels/{channel}/weixin-logins": {
211
211
  parameters: {
212
212
  query?: never;
213
213
  header?: never;
@@ -227,7 +227,7 @@ export interface paths {
227
227
  patch?: never;
228
228
  trace?: never;
229
229
  };
230
- "/v1/platforms": {
230
+ "/api/v1/platforms": {
231
231
  parameters: {
232
232
  query?: never;
233
233
  header?: never;
@@ -247,7 +247,7 @@ export interface paths {
247
247
  patch?: never;
248
248
  trace?: never;
249
249
  };
250
- "/v1/weixin-logins/{login}": {
250
+ "/api/v1/weixin-logins/{login}": {
251
251
  parameters: {
252
252
  query?: never;
253
253
  header?: never;
@@ -267,7 +267,7 @@ export interface paths {
267
267
  patch?: never;
268
268
  trace?: never;
269
269
  };
270
- "/v1/weixin-logins/{login}/verify-code": {
270
+ "/api/v1/weixin-logins/{login}/verify-code": {
271
271
  parameters: {
272
272
  query?: never;
273
273
  header?: never;
@@ -287,7 +287,7 @@ export interface paths {
287
287
  patch?: never;
288
288
  trace?: never;
289
289
  };
290
- "/v1/models": {
290
+ "/api/v1/models": {
291
291
  parameters: {
292
292
  query?: never;
293
293
  header?: never;
@@ -307,7 +307,7 @@ export interface paths {
307
307
  patch?: never;
308
308
  trace?: never;
309
309
  };
310
- "/v1/threads": {
310
+ "/api/v1/threads": {
311
311
  parameters: {
312
312
  query?: never;
313
313
  header?: never;
@@ -328,7 +328,7 @@ export interface paths {
328
328
  patch?: never;
329
329
  trace?: never;
330
330
  };
331
- "/v1/threads/{thread}": {
331
+ "/api/v1/threads/{thread}": {
332
332
  parameters: {
333
333
  query?: never;
334
334
  header?: never;
@@ -352,7 +352,7 @@ export interface paths {
352
352
  patch: operations["update-thread"];
353
353
  trace?: never;
354
354
  };
355
- "/v1/threads/{thread}/approvals/{batch}": {
355
+ "/api/v1/threads/{thread}/approvals/{batch}": {
356
356
  parameters: {
357
357
  query?: never;
358
358
  header?: never;
@@ -372,7 +372,7 @@ export interface paths {
372
372
  patch?: never;
373
373
  trace?: never;
374
374
  };
375
- "/v1/threads/{thread}/earlier": {
375
+ "/api/v1/threads/{thread}/earlier": {
376
376
  parameters: {
377
377
  query?: never;
378
378
  header?: never;
@@ -392,7 +392,7 @@ export interface paths {
392
392
  patch?: never;
393
393
  trace?: never;
394
394
  };
395
- "/v1/threads/{thread}/interrupt": {
395
+ "/api/v1/threads/{thread}/interrupt": {
396
396
  parameters: {
397
397
  query?: never;
398
398
  header?: never;
@@ -412,7 +412,7 @@ export interface paths {
412
412
  patch?: never;
413
413
  trace?: never;
414
414
  };
415
- "/v1/threads/{thread}/messages": {
415
+ "/api/v1/threads/{thread}/messages": {
416
416
  parameters: {
417
417
  query?: never;
418
418
  header?: never;
@@ -432,7 +432,7 @@ export interface paths {
432
432
  patch?: never;
433
433
  trace?: never;
434
434
  };
435
- "/v1/threads/{thread}/questions/{item}": {
435
+ "/api/v1/threads/{thread}/questions/{item}": {
436
436
  parameters: {
437
437
  query?: never;
438
438
  header?: never;
@@ -452,7 +452,7 @@ export interface paths {
452
452
  patch?: never;
453
453
  trace?: never;
454
454
  };
455
- "/v1/threads/{thread}/read": {
455
+ "/api/v1/threads/{thread}/read": {
456
456
  parameters: {
457
457
  query?: never;
458
458
  header?: never;
@@ -469,7 +469,7 @@ export interface paths {
469
469
  patch?: never;
470
470
  trace?: never;
471
471
  };
472
- "/v1/threads/{thread}/revert": {
472
+ "/api/v1/threads/{thread}/revert": {
473
473
  parameters: {
474
474
  query?: never;
475
475
  header?: never;
@@ -845,13 +845,13 @@ export interface components {
845
845
  DocumentResource: {
846
846
  context: components["schemas"]["ContextResource"];
847
847
  cursor: string | null;
848
- earlier: components["schemas"]["EarlierResource"];
848
+ earlier: components["schemas"]["EarlierResource"] | null;
849
849
  items: components["schemas"]["ItemResource"][] | null;
850
850
  status: string;
851
- stream: components["schemas"]["StreamResource"];
852
- turn: components["schemas"]["TurnResource"];
851
+ stream: components["schemas"]["StreamResource"] | null;
852
+ turn: components["schemas"]["TurnResource"] | null;
853
853
  turnId: string | null;
854
- wait: components["schemas"]["WaitResource"];
854
+ wait: components["schemas"]["WaitResource"] | null;
855
855
  };
856
856
  UpdateThreadRequestBody: {
857
857
  /** @enum {string} */
@@ -949,9 +949,13 @@ export interface operations {
949
949
  /** @description OK */
950
950
  200: {
951
951
  headers: {
952
+ /** @description 私有而且长缓存:这些字节按 id 寻址而 id 永不复用,所以它们永远不会变;而它们属于一个人,所以不能进任何共享缓存。 */
953
+ "Cache-Control"?: string;
952
954
  [name: string]: unknown;
953
955
  };
954
- content?: never;
956
+ content: {
957
+ "image/*": string;
958
+ };
955
959
  };
956
960
  /** @description Error */
957
961
  default: {
@@ -2,6 +2,8 @@ export type { paths, components, operations, webhooks } from "./schema.js";
2
2
  import type { operations } from "./schema.js";
3
3
  /** `GET /api/v1/keys` 成功时的响应体。 */
4
4
  export type ListApiKeysResult = operations["list-api-keys"]["responses"][200]["content"]["application/json"];
5
+ /** `GET /api/v1/keys` 的查询参数。 */
6
+ export type ListApiKeysQuery = operations["list-api-keys"]["parameters"]["query"];
5
7
  /** `POST /api/v1/keys` 成功时的响应体。 */
6
8
  export type CreateApiKeyResult = operations["create-api-key"]["responses"][201]["content"]["application/json"];
7
9
  /** `POST /api/v1/keys` 的请求体。 */
@@ -24,13 +26,23 @@ export type ListModelsResult = operations["list-models"]["responses"][200]["cont
24
26
  export type GetModelResult = operations["get-model"]["responses"][200]["content"]["application/json"];
25
27
  /** `GET /api/v1/requests` 成功时的响应体。 */
26
28
  export type ListRequestsResult = operations["list-requests"]["responses"][200]["content"]["application/json"];
29
+ /** `GET /api/v1/requests` 的查询参数。 */
30
+ export type ListRequestsQuery = operations["list-requests"]["parameters"]["query"];
27
31
  /** `GET /api/v1/requests/{requestId}` 成功时的响应体。 */
28
32
  export type GetRequestResult = operations["get-request"]["responses"][200]["content"]["application/json"];
29
33
  /** `GET /api/v1/usage/by-api-key` 成功时的响应体。 */
30
34
  export type ListUsageByApiKeyResult = operations["list-usage-by-api-key"]["responses"][200]["content"]["application/json"];
35
+ /** `GET /api/v1/usage/by-api-key` 的查询参数。 */
36
+ export type ListUsageByApiKeyQuery = operations["list-usage-by-api-key"]["parameters"]["query"];
31
37
  /** `GET /api/v1/usage/by-model` 成功时的响应体。 */
32
38
  export type ListUsageByModelResult = operations["list-usage-by-model"]["responses"][200]["content"]["application/json"];
39
+ /** `GET /api/v1/usage/by-model` 的查询参数。 */
40
+ export type ListUsageByModelQuery = operations["list-usage-by-model"]["parameters"]["query"];
33
41
  /** `GET /api/v1/usage/summary` 成功时的响应体。 */
34
42
  export type GetUsageSummaryResult = operations["get-usage-summary"]["responses"][200]["content"]["application/json"];
43
+ /** `GET /api/v1/usage/summary` 的查询参数。 */
44
+ export type GetUsageSummaryQuery = operations["get-usage-summary"]["parameters"]["query"];
35
45
  /** `GET /api/v1/usage/timeline` 成功时的响应体。 */
36
46
  export type GetUsageTimelineResult = operations["get-usage-timeline"]["responses"][200]["content"]["application/json"];
47
+ /** `GET /api/v1/usage/timeline` 的查询参数。 */
48
+ export type GetUsageTimelineQuery = operations["get-usage-timeline"]["parameters"]["query"];
@@ -2,6 +2,8 @@ export type { paths, components, operations, webhooks } from "./schema.js";
2
2
  import type { operations } from "./schema.js";
3
3
  /** `GET /api/v1/backups` 成功时的响应体。 */
4
4
  export type ListBackupsResult = operations["list-backups"]["responses"][200]["content"]["application/json"];
5
+ /** `GET /api/v1/backups` 的查询参数。 */
6
+ export type ListBackupsQuery = operations["list-backups"]["parameters"]["query"];
5
7
  /** `POST /api/v1/backups` 成功时的响应体。 */
6
8
  export type CreateBackupResult = operations["create-backup"]["responses"][201]["content"]["application/json"];
7
9
  /** `POST /api/v1/backups` 的请求体。 */
@@ -18,16 +20,24 @@ export type RestoreBackupResult = operations["restore-backup"]["responses"][201]
18
20
  export type RestoreBackupBody = NonNullable<operations["restore-backup"]["requestBody"]>["content"]["application/json"];
19
21
  /** `GET /api/v1/disk-types` 成功时的响应体。 */
20
22
  export type ListDiskTypesResult = operations["list-disk-types"]["responses"][200]["content"]["application/json"];
23
+ /** `GET /api/v1/disk-types` 的查询参数。 */
24
+ export type ListDiskTypesQuery = operations["list-disk-types"]["parameters"]["query"];
21
25
  /** `GET /api/v1/images` 成功时的响应体。 */
22
26
  export type ListImagesResult = operations["list-images"]["responses"][200]["content"]["application/json"];
27
+ /** `GET /api/v1/images` 的查询参数。 */
28
+ export type ListImagesQuery = operations["list-images"]["parameters"]["query"];
23
29
  /** `GET /api/v1/instance-types` 成功时的响应体。 */
24
30
  export type ListInstanceTypesResult = operations["list-instance-types"]["responses"][200]["content"]["application/json"];
31
+ /** `GET /api/v1/instance-types` 的查询参数。 */
32
+ export type ListInstanceTypesQuery = operations["list-instance-types"]["parameters"]["query"];
25
33
  /** `GET /api/v1/regions` 成功时的响应体。 */
26
34
  export type ListRegionsResult = operations["list-regions"]["responses"][200]["content"]["application/json"];
27
35
  /** `GET /api/v1/regions/{regionCode}/availability-zones` 成功时的响应体。 */
28
36
  export type ListAvailabilityZonesResult = operations["list-availability-zones"]["responses"][200]["content"]["application/json"];
29
37
  /** `GET /api/v1/disks` 成功时的响应体。 */
30
38
  export type ListDisksResult = operations["list-disks"]["responses"][200]["content"]["application/json"];
39
+ /** `GET /api/v1/disks` 的查询参数。 */
40
+ export type ListDisksQuery = operations["list-disks"]["parameters"]["query"];
31
41
  /** `POST /api/v1/disks` 成功时的响应体。 */
32
42
  export type CreateDiskResult = operations["create-disk"]["responses"][201]["content"]["application/json"];
33
43
  /** `POST /api/v1/disks` 的请求体。 */
@@ -84,6 +94,8 @@ export type ActOnInstanceBody = NonNullable<operations["act-on-instance"]["reque
84
94
  export type OpenInstanceConsoleResult = operations["open-instance-console"]["responses"][200]["content"]["application/json"];
85
95
  /** `GET /api/v1/instances/{instanceId}/console-output` 成功时的响应体。 */
86
96
  export type GetInstanceConsoleOutputResult = operations["get-instance-console-output"]["responses"][200]["content"]["application/json"];
97
+ /** `GET /api/v1/instances/{instanceId}/console-output` 的查询参数。 */
98
+ export type GetInstanceConsoleOutputQuery = operations["get-instance-console-output"]["parameters"]["query"];
87
99
  /** `POST /api/v1/instances/{instanceId}/password` 成功时的响应体。 */
88
100
  export type ResetInstancePasswordResult = operations["reset-instance-password"]["responses"][200]["content"]["application/json"];
89
101
  /** `POST /api/v1/instances/{instanceId}/password` 的请求体。 */
@@ -124,6 +136,8 @@ export type AttachPortBody = NonNullable<operations["attach-port"]["requestBody"
124
136
  export type DetachPortResult = operations["detach-port"]["responses"][200]["content"]["application/json"];
125
137
  /** `GET /api/v1/operation-logs` 成功时的响应体。 */
126
138
  export type ListOperationLogsResult = operations["list-operation-logs"]["responses"][200]["content"]["application/json"];
139
+ /** `GET /api/v1/operation-logs` 的查询参数。 */
140
+ export type ListOperationLogsQuery = operations["list-operation-logs"]["parameters"]["query"];
127
141
  /** `GET /api/v1/ports` 成功时的响应体。 */
128
142
  export type ListPortsResult = operations["list-ports"]["responses"][200]["content"]["application/json"];
129
143
  /** `POST /api/v1/ports` 成功时的响应体。 */
@@ -132,6 +146,8 @@ export type CreatePortResult = operations["create-port"]["responses"][201]["cont
132
146
  export type CreatePortBody = NonNullable<operations["create-port"]["requestBody"]>["content"]["application/json"];
133
147
  /** `GET /api/v1/private-images` 成功时的响应体。 */
134
148
  export type ListPrivateImagesResult = operations["list-private-images"]["responses"][200]["content"]["application/json"];
149
+ /** `GET /api/v1/private-images` 的查询参数。 */
150
+ export type ListPrivateImagesQuery = operations["list-private-images"]["parameters"]["query"];
135
151
  /** `POST /api/v1/private-images` 成功时的响应体。 */
136
152
  export type CreatePrivateImageResult = operations["create-private-image"]["responses"][201]["content"]["application/json"];
137
153
  /** `POST /api/v1/private-images` 的请求体。 */
@@ -144,6 +160,8 @@ export type RenamePrivateImageResult = operations["rename-private-image"]["respo
144
160
  export type RenamePrivateImageBody = NonNullable<operations["rename-private-image"]["requestBody"]>["content"]["application/json"];
145
161
  /** `GET /api/v1/private-networks` 成功时的响应体。 */
146
162
  export type ListPrivateNetworksResult = operations["list-private-networks"]["responses"][200]["content"]["application/json"];
163
+ /** `GET /api/v1/private-networks` 的查询参数。 */
164
+ export type ListPrivateNetworksQuery = operations["list-private-networks"]["parameters"]["query"];
147
165
  /** `POST /api/v1/private-networks` 成功时的响应体。 */
148
166
  export type CreatePrivateNetworkResult = operations["create-private-network"]["responses"][201]["content"]["application/json"];
149
167
  /** `POST /api/v1/private-networks` 的请求体。 */
@@ -172,8 +190,12 @@ export type CreateSubnetResult = operations["create-subnet"]["responses"][201]["
172
190
  export type CreateSubnetBody = NonNullable<operations["create-subnet"]["requestBody"]>["content"]["application/json"];
173
191
  /** `GET /api/v1/private-networks/{privateNetworkId}/subnets/next-free-cidr` 成功时的响应体。 */
174
192
  export type SuggestSubnetCidrResult = operations["suggest-subnet-cidr"]["responses"][200]["content"]["application/json"];
193
+ /** `GET /api/v1/private-networks/{privateNetworkId}/subnets/next-free-cidr` 的查询参数。 */
194
+ export type SuggestSubnetCidrQuery = operations["suggest-subnet-cidr"]["parameters"]["query"];
175
195
  /** `GET /api/v1/security-groups` 成功时的响应体。 */
176
196
  export type ListSecurityGroupsResult = operations["list-security-groups"]["responses"][200]["content"]["application/json"];
197
+ /** `GET /api/v1/security-groups` 的查询参数。 */
198
+ export type ListSecurityGroupsQuery = operations["list-security-groups"]["parameters"]["query"];
177
199
  /** `POST /api/v1/security-groups` 成功时的响应体。 */
178
200
  export type CreateSecurityGroupResult = operations["create-security-group"]["responses"][201]["content"]["application/json"];
179
201
  /** `POST /api/v1/security-groups` 的请求体。 */
@@ -188,6 +210,8 @@ export type CreateSecurityGroupRuleResult = operations["create-security-group-ru
188
210
  export type CreateSecurityGroupRuleBody = NonNullable<operations["create-security-group-rule"]["requestBody"]>["content"]["application/json"];
189
211
  /** `GET /api/v1/snapshots` 成功时的响应体。 */
190
212
  export type ListSnapshotsResult = operations["list-snapshots"]["responses"][200]["content"]["application/json"];
213
+ /** `GET /api/v1/snapshots` 的查询参数。 */
214
+ export type ListSnapshotsQuery = operations["list-snapshots"]["parameters"]["query"];
191
215
  /** `POST /api/v1/snapshots` 成功时的响应体。 */
192
216
  export type CreateSnapshotResult = operations["create-snapshot"]["responses"][201]["content"]["application/json"];
193
217
  /** `POST /api/v1/snapshots` 的请求体。 */
@@ -1281,7 +1281,10 @@ export interface components {
1281
1281
  name: string;
1282
1282
  /** Format: int64 */
1283
1283
  size_gb: number;
1284
- /** @description 从该快照恢复。提供时容量只需不小于快照本身 */
1284
+ /**
1285
+ * Format: uuid
1286
+ * @description 从该快照恢复。提供时容量只需不小于快照本身
1287
+ */
1285
1288
  snapshot_id?: string;
1286
1289
  };
1287
1290
  RenameDiskRequestBody: {
@@ -14,12 +14,16 @@ export type UpdateProjectBody = NonNullable<operations["update-project"]["reques
14
14
  export type GetProjectMembershipResult = operations["get-project-membership"]["responses"][200]["content"]["application/json"];
15
15
  /** `GET /api/v1/invitations` 成功时的响应体。 */
16
16
  export type ListProjectInvitationsResult = operations["list-project-invitations"]["responses"][200]["content"]["application/json"];
17
+ /** `GET /api/v1/invitations` 的查询参数。 */
18
+ export type ListProjectInvitationsQuery = operations["list-project-invitations"]["parameters"]["query"];
17
19
  /** `POST /api/v1/invitations` 成功时的响应体。 */
18
20
  export type IssueInvitationResult = operations["issue-invitation"]["responses"][201]["content"]["application/json"];
19
21
  /** `POST /api/v1/invitations` 的请求体。 */
20
22
  export type IssueInvitationBody = NonNullable<operations["issue-invitation"]["requestBody"]>["content"]["application/json"];
21
23
  /** `GET /api/v1/members` 成功时的响应体。 */
22
24
  export type ListMembersResult = operations["list-members"]["responses"][200]["content"]["application/json"];
25
+ /** `GET /api/v1/members` 的查询参数。 */
26
+ export type ListMembersQuery = operations["list-members"]["parameters"]["query"];
23
27
  /** `PUT /api/v1/members/{userId}/roles` 成功时的响应体。 */
24
28
  export type SetMemberRolesResult = operations["set-member-roles"]["responses"][200]["content"]["application/json"];
25
29
  /** `PUT /api/v1/members/{userId}/roles` 的请求体。 */
@@ -42,6 +46,8 @@ export type UpdateRoleResult = operations["update-role"]["responses"][200]["cont
42
46
  export type UpdateRoleBody = NonNullable<operations["update-role"]["requestBody"]>["content"]["application/json"];
43
47
  /** `GET /api/v1/ssh-keys` 成功时的响应体。 */
44
48
  export type ListSshKeysResult = operations["list-ssh-keys"]["responses"][200]["content"]["application/json"];
49
+ /** `GET /api/v1/ssh-keys` 的查询参数。 */
50
+ export type ListSshKeysQuery = operations["list-ssh-keys"]["parameters"]["query"];
45
51
  /** `POST /api/v1/ssh-keys` 成功时的响应体。 */
46
52
  export type CreateSshKeyResult = operations["create-ssh-key"]["responses"][201]["content"]["application/json"];
47
53
  /** `POST /api/v1/ssh-keys` 的请求体。 */
@@ -506,7 +506,7 @@ export interface components {
506
506
  * @default me
507
507
  * @enum {string}
508
508
  */
509
- owner: "me" | "project";
509
+ owner?: "me" | "project";
510
510
  /** @description OpenSSH 格式的公钥。类型和指纹从它算出来,都不可改 */
511
511
  public_key: string;
512
512
  /** @description 用途标签,比如 ci、bastion */