@leaflow/sdk 0.43.0 → 0.45.0
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.
|
@@ -50,6 +50,18 @@ export type SubmitWeixinVerifyCodeResult = operations["submit-weixin-verify-code
|
|
|
50
50
|
export type SubmitWeixinVerifyCodeBody = NonNullable<operations["submit-weixin-verify-code"]["requestBody"]>["content"]["application/json"];
|
|
51
51
|
/** `POST /api/v1/dynamic-calls/{call}/result` 的请求体。 */
|
|
52
52
|
export type SubmitDynamicCallResultBody = NonNullable<operations["submit-dynamic-call-result"]["requestBody"]>["content"]["application/json"];
|
|
53
|
+
/** `GET /api/v1/folders` 成功时的响应体。 */
|
|
54
|
+
export type ListFoldersResult = operations["list-folders"]["responses"][200]["content"]["application/json"];
|
|
55
|
+
/** `POST /api/v1/folders` 成功时的响应体。 */
|
|
56
|
+
export type CreateFolderResult = operations["create-folder"]["responses"][201]["content"]["application/json"];
|
|
57
|
+
/** `POST /api/v1/folders` 的请求体。 */
|
|
58
|
+
export type CreateFolderBody = NonNullable<operations["create-folder"]["requestBody"]>["content"]["application/json"];
|
|
59
|
+
/** `GET /api/v1/folders/{folder}` 成功时的响应体。 */
|
|
60
|
+
export type GetFolderResult = operations["get-folder"]["responses"][200]["content"]["application/json"];
|
|
61
|
+
/** `PATCH /api/v1/folders/{folder}` 成功时的响应体。 */
|
|
62
|
+
export type UpdateFolderResult = operations["update-folder"]["responses"][200]["content"]["application/json"];
|
|
63
|
+
/** `PATCH /api/v1/folders/{folder}` 的请求体。 */
|
|
64
|
+
export type UpdateFolderBody = NonNullable<operations["update-folder"]["requestBody"]>["content"]["application/json"];
|
|
53
65
|
/** `GET /api/v1/memories` 成功时的响应体。 */
|
|
54
66
|
export type ListMemoriesResult = operations["list-memories"]["responses"][200]["content"]["application/json"];
|
|
55
67
|
/** `GET /api/v1/skills` 成功时的响应体。 */
|
|
@@ -14,7 +14,9 @@ export interface paths {
|
|
|
14
14
|
put?: never;
|
|
15
15
|
/**
|
|
16
16
|
* Upload a file
|
|
17
|
-
* @description The body is the file bytes themselves, not multipart, one file per request. The kind is determined from the content, not from Content-Type or from the name. Put the returned id in attachmentIds when sending a message
|
|
17
|
+
* @description The body is the file bytes themselves, not multipart, one file per request. The kind is determined from the content, not from Content-Type or from the name. Put the returned id in attachmentIds when sending a message.
|
|
18
|
+
*
|
|
19
|
+
* An upload that no message ever references is a draft, and drafts are collected — `draftExpiresAt` in the response says when this one goes. Sending a message with the id makes it permanent.
|
|
18
20
|
*
|
|
19
21
|
* The returned `kind` says how the assistant will see it. An `image` is read directly, and only by models that accept image input. A small `text` file is placed inline in the message. A large `text` file, and anything `binary`, arrives as a reference the assistant reads on demand — for a binary that usually means downloading it onto one of the project's cloud instances.
|
|
20
22
|
*/
|
|
@@ -315,6 +317,62 @@ export interface paths {
|
|
|
315
317
|
patch?: never;
|
|
316
318
|
trace?: never;
|
|
317
319
|
};
|
|
320
|
+
"/api/v1/folders": {
|
|
321
|
+
parameters: {
|
|
322
|
+
query?: never;
|
|
323
|
+
header?: never;
|
|
324
|
+
path?: never;
|
|
325
|
+
cookie?: never;
|
|
326
|
+
};
|
|
327
|
+
/**
|
|
328
|
+
* List folders
|
|
329
|
+
* @description The current account's folders in this project, oldest first. That order is fixed and does not react to what happens inside a folder: a folder is a place on the screen, and a place that moves whenever something is put into it is not one anybody can aim at. Not paginated — there is a cap on how many there can be, and all of them come back at once.
|
|
330
|
+
*/
|
|
331
|
+
get: operations["list-folders"];
|
|
332
|
+
put?: never;
|
|
333
|
+
/**
|
|
334
|
+
* Create a folder
|
|
335
|
+
* @description A folder groups conversations in the sidebar and does nothing else. The assistant is never told which folder a conversation is in, and a conversation behaves exactly the same inside one as outside: no shared instructions, no shared files, no shared memory.
|
|
336
|
+
*
|
|
337
|
+
* Names are unique within an account's folders in this project, because the only way to aim at a folder is to read its name.
|
|
338
|
+
*/
|
|
339
|
+
post: operations["create-folder"];
|
|
340
|
+
delete?: never;
|
|
341
|
+
options?: never;
|
|
342
|
+
head?: never;
|
|
343
|
+
patch?: never;
|
|
344
|
+
trace?: never;
|
|
345
|
+
};
|
|
346
|
+
"/api/v1/folders/{folder}": {
|
|
347
|
+
parameters: {
|
|
348
|
+
query?: never;
|
|
349
|
+
header?: never;
|
|
350
|
+
path?: never;
|
|
351
|
+
cookie?: never;
|
|
352
|
+
};
|
|
353
|
+
/**
|
|
354
|
+
* Fetch one folder
|
|
355
|
+
* @description The list returns every folder at once, so this is for the case the list does not cover: a page opened straight at a folder, holding nothing but the id from the address bar. Its conversations are a separate request — `GET /api/v1/threads?folder=<id>`.
|
|
356
|
+
*/
|
|
357
|
+
get: operations["get-folder"];
|
|
358
|
+
put?: never;
|
|
359
|
+
post?: never;
|
|
360
|
+
/**
|
|
361
|
+
* Delete a folder
|
|
362
|
+
* @description The conversations inside are **not** deleted. They leave the folder and go back to the ungrouped list, where they can be filed again. Emptying a shelf is not the same as throwing out what was on it, and deleting a conversation is a different request.
|
|
363
|
+
*
|
|
364
|
+
* Idempotent: deleting a folder that is already gone succeeds and changes nothing.
|
|
365
|
+
*/
|
|
366
|
+
delete: operations["delete-folder"];
|
|
367
|
+
options?: never;
|
|
368
|
+
head?: never;
|
|
369
|
+
/**
|
|
370
|
+
* Rename a folder
|
|
371
|
+
* @description The conversations in it are untouched, and none of them move in the list — a folder's name is not part of what any conversation is about.
|
|
372
|
+
*/
|
|
373
|
+
patch: operations["update-folder"];
|
|
374
|
+
trace?: never;
|
|
375
|
+
};
|
|
318
376
|
"/api/v1/memories": {
|
|
319
377
|
parameters: {
|
|
320
378
|
query?: never;
|
|
@@ -455,12 +513,24 @@ export interface paths {
|
|
|
455
513
|
get: operations["get-thread"];
|
|
456
514
|
put?: never;
|
|
457
515
|
post?: never;
|
|
458
|
-
|
|
516
|
+
/**
|
|
517
|
+
* Delete a conversation
|
|
518
|
+
* @description Removes the conversation from every list and makes it unreachable by id. The assistant can no longer find it either — neither by searching past conversations nor by reading one back.
|
|
519
|
+
*
|
|
520
|
+
* Deleting is not the same as archiving, and the two are not degrees of the same thing. An archived conversation is still there and still readable, it just takes no new input; a deleted one is gone from view. Archiving can be undone; this cannot.
|
|
521
|
+
*
|
|
522
|
+
* What survives is the record itself, because a conversation with this assistant is an account of what was done to real infrastructure — which machine was changed, which disk was removed. That record is kept even though nobody can reach it here.
|
|
523
|
+
*
|
|
524
|
+
* Fails while a turn is running: stop it first. Deleting an already deleted conversation succeeds and changes nothing.
|
|
525
|
+
*/
|
|
526
|
+
delete: operations["delete-thread"];
|
|
459
527
|
options?: never;
|
|
460
528
|
head?: never;
|
|
461
529
|
/**
|
|
462
530
|
* Update conversation settings
|
|
463
|
-
* @description Changes the approval mode and archived
|
|
531
|
+
* @description Changes the title, the approval mode, and whether the conversation is archived. A change to the approval mode takes effect from the next turn; a turn already running keeps the settings it started with.
|
|
532
|
+
*
|
|
533
|
+
* Archiving makes a conversation read-only: it stays in the list under "archived", stays readable, and the assistant can still find it when it searches past conversations — it just takes no new input. Unarchive it to continue. Archiving fails while a turn is running; stop it first.
|
|
464
534
|
*/
|
|
465
535
|
patch: operations["update-thread"];
|
|
466
536
|
trace?: never;
|
|
@@ -621,6 +691,13 @@ export interface components {
|
|
|
621
691
|
* @description Size of what was stored. For an image that has been resized, this is the resized size, not what was uploaded.
|
|
622
692
|
*/
|
|
623
693
|
byteSize: number;
|
|
694
|
+
/**
|
|
695
|
+
* Format: date-time
|
|
696
|
+
* @description When this upload gets cleared if no message ever references it. Sending a message with this id makes it permanent and this stops applying — a file that belongs to a conversation is kept as long as the conversation is.
|
|
697
|
+
*
|
|
698
|
+
* It is here so the editor can say so before it happens. An attachment chip that quietly stops working a week later reads as a bug, and the person who hits it has no way to tell that what they are seeing is a draft being collected.
|
|
699
|
+
*/
|
|
700
|
+
draftExpiresAt: string;
|
|
624
701
|
filename: string;
|
|
625
702
|
/**
|
|
626
703
|
* Format: int64
|
|
@@ -939,6 +1016,8 @@ export interface components {
|
|
|
939
1016
|
archived: boolean;
|
|
940
1017
|
/** Format: date-time */
|
|
941
1018
|
createdAt: string;
|
|
1019
|
+
/** @description The folder this conversation is filed under, or null when it is in none */
|
|
1020
|
+
folderId: string | null;
|
|
942
1021
|
id: string;
|
|
943
1022
|
model: string;
|
|
944
1023
|
title: string | null;
|
|
@@ -947,6 +1026,8 @@ export interface components {
|
|
|
947
1026
|
updatedAt: string;
|
|
948
1027
|
};
|
|
949
1028
|
ThreadListResponseBody: {
|
|
1029
|
+
/** @description Pass this back as `cursor` for the next page. Null means this was the last one — it is only set when there is genuinely more, so an empty final page never happens. */
|
|
1030
|
+
nextCursor: string | null;
|
|
950
1031
|
threads: components["schemas"]["ThreadSummaryResource"][] | null;
|
|
951
1032
|
};
|
|
952
1033
|
CreateThreadRequestBody: {
|
|
@@ -1143,6 +1224,12 @@ export interface components {
|
|
|
1143
1224
|
/** @enum {string} */
|
|
1144
1225
|
approvalMode?: "guardian" | "manual" | "yolo";
|
|
1145
1226
|
archived?: boolean;
|
|
1227
|
+
/**
|
|
1228
|
+
* @description File this conversation into a folder, or `null` to take it out of the one it is in. Omit the field to leave it where it is.
|
|
1229
|
+
*
|
|
1230
|
+
* Filing does not move the conversation in the list. The order answers "which conversation has something new in it", and putting one away is not that.
|
|
1231
|
+
*/
|
|
1232
|
+
folderId?: string | null;
|
|
1146
1233
|
/**
|
|
1147
1234
|
* @description Rename this conversation.
|
|
1148
1235
|
*
|
|
@@ -1314,6 +1401,28 @@ export interface components {
|
|
|
1314
1401
|
/** Format: int64 */
|
|
1315
1402
|
reverted: number;
|
|
1316
1403
|
};
|
|
1404
|
+
FolderResource: {
|
|
1405
|
+
/** Format: date-time */
|
|
1406
|
+
createdAt: string;
|
|
1407
|
+
id: string;
|
|
1408
|
+
name: string;
|
|
1409
|
+
/**
|
|
1410
|
+
* Format: int64
|
|
1411
|
+
* @description How many conversations are filed here and would show up in the default list. Archived and deleted ones are not counted, so this is exactly what `GET /api/v1/threads?folder=<id>` returns.
|
|
1412
|
+
*/
|
|
1413
|
+
threadCount: number;
|
|
1414
|
+
/** Format: date-time */
|
|
1415
|
+
updatedAt: string;
|
|
1416
|
+
};
|
|
1417
|
+
FolderListResponseBody: {
|
|
1418
|
+
folders: components["schemas"]["FolderResource"][] | null;
|
|
1419
|
+
};
|
|
1420
|
+
CreateFolderRequestBody: {
|
|
1421
|
+
name: string;
|
|
1422
|
+
};
|
|
1423
|
+
UpdateFolderRequestBody: {
|
|
1424
|
+
name: string;
|
|
1425
|
+
};
|
|
1317
1426
|
};
|
|
1318
1427
|
responses: never;
|
|
1319
1428
|
parameters: never;
|
|
@@ -1952,6 +2061,163 @@ export interface operations {
|
|
|
1952
2061
|
};
|
|
1953
2062
|
};
|
|
1954
2063
|
};
|
|
2064
|
+
"list-folders": {
|
|
2065
|
+
parameters: {
|
|
2066
|
+
query?: never;
|
|
2067
|
+
header?: never;
|
|
2068
|
+
path?: never;
|
|
2069
|
+
cookie?: never;
|
|
2070
|
+
};
|
|
2071
|
+
requestBody?: never;
|
|
2072
|
+
responses: {
|
|
2073
|
+
/** @description OK */
|
|
2074
|
+
200: {
|
|
2075
|
+
headers: {
|
|
2076
|
+
[name: string]: unknown;
|
|
2077
|
+
};
|
|
2078
|
+
content: {
|
|
2079
|
+
"application/json": components["schemas"]["FolderListResponseBody"];
|
|
2080
|
+
};
|
|
2081
|
+
};
|
|
2082
|
+
/** @description Error */
|
|
2083
|
+
default: {
|
|
2084
|
+
headers: {
|
|
2085
|
+
[name: string]: unknown;
|
|
2086
|
+
};
|
|
2087
|
+
content: {
|
|
2088
|
+
"application/json": components["schemas"]["Error"];
|
|
2089
|
+
};
|
|
2090
|
+
};
|
|
2091
|
+
};
|
|
2092
|
+
};
|
|
2093
|
+
"create-folder": {
|
|
2094
|
+
parameters: {
|
|
2095
|
+
query?: never;
|
|
2096
|
+
header?: never;
|
|
2097
|
+
path?: never;
|
|
2098
|
+
cookie?: never;
|
|
2099
|
+
};
|
|
2100
|
+
requestBody: {
|
|
2101
|
+
content: {
|
|
2102
|
+
"application/json": components["schemas"]["CreateFolderRequestBody"];
|
|
2103
|
+
};
|
|
2104
|
+
};
|
|
2105
|
+
responses: {
|
|
2106
|
+
/** @description Created */
|
|
2107
|
+
201: {
|
|
2108
|
+
headers: {
|
|
2109
|
+
[name: string]: unknown;
|
|
2110
|
+
};
|
|
2111
|
+
content: {
|
|
2112
|
+
"application/json": components["schemas"]["FolderResource"];
|
|
2113
|
+
};
|
|
2114
|
+
};
|
|
2115
|
+
/** @description Error */
|
|
2116
|
+
default: {
|
|
2117
|
+
headers: {
|
|
2118
|
+
[name: string]: unknown;
|
|
2119
|
+
};
|
|
2120
|
+
content: {
|
|
2121
|
+
"application/json": components["schemas"]["Error"];
|
|
2122
|
+
};
|
|
2123
|
+
};
|
|
2124
|
+
};
|
|
2125
|
+
};
|
|
2126
|
+
"get-folder": {
|
|
2127
|
+
parameters: {
|
|
2128
|
+
query?: never;
|
|
2129
|
+
header?: never;
|
|
2130
|
+
path: {
|
|
2131
|
+
folder: string;
|
|
2132
|
+
};
|
|
2133
|
+
cookie?: never;
|
|
2134
|
+
};
|
|
2135
|
+
requestBody?: never;
|
|
2136
|
+
responses: {
|
|
2137
|
+
/** @description OK */
|
|
2138
|
+
200: {
|
|
2139
|
+
headers: {
|
|
2140
|
+
[name: string]: unknown;
|
|
2141
|
+
};
|
|
2142
|
+
content: {
|
|
2143
|
+
"application/json": components["schemas"]["FolderResource"];
|
|
2144
|
+
};
|
|
2145
|
+
};
|
|
2146
|
+
/** @description Error */
|
|
2147
|
+
default: {
|
|
2148
|
+
headers: {
|
|
2149
|
+
[name: string]: unknown;
|
|
2150
|
+
};
|
|
2151
|
+
content: {
|
|
2152
|
+
"application/json": components["schemas"]["Error"];
|
|
2153
|
+
};
|
|
2154
|
+
};
|
|
2155
|
+
};
|
|
2156
|
+
};
|
|
2157
|
+
"delete-folder": {
|
|
2158
|
+
parameters: {
|
|
2159
|
+
query?: never;
|
|
2160
|
+
header?: never;
|
|
2161
|
+
path: {
|
|
2162
|
+
folder: string;
|
|
2163
|
+
};
|
|
2164
|
+
cookie?: never;
|
|
2165
|
+
};
|
|
2166
|
+
requestBody?: never;
|
|
2167
|
+
responses: {
|
|
2168
|
+
/** @description No Content */
|
|
2169
|
+
204: {
|
|
2170
|
+
headers: {
|
|
2171
|
+
[name: string]: unknown;
|
|
2172
|
+
};
|
|
2173
|
+
content?: never;
|
|
2174
|
+
};
|
|
2175
|
+
/** @description Error */
|
|
2176
|
+
default: {
|
|
2177
|
+
headers: {
|
|
2178
|
+
[name: string]: unknown;
|
|
2179
|
+
};
|
|
2180
|
+
content: {
|
|
2181
|
+
"application/json": components["schemas"]["Error"];
|
|
2182
|
+
};
|
|
2183
|
+
};
|
|
2184
|
+
};
|
|
2185
|
+
};
|
|
2186
|
+
"update-folder": {
|
|
2187
|
+
parameters: {
|
|
2188
|
+
query?: never;
|
|
2189
|
+
header?: never;
|
|
2190
|
+
path: {
|
|
2191
|
+
folder: string;
|
|
2192
|
+
};
|
|
2193
|
+
cookie?: never;
|
|
2194
|
+
};
|
|
2195
|
+
requestBody: {
|
|
2196
|
+
content: {
|
|
2197
|
+
"application/json": components["schemas"]["UpdateFolderRequestBody"];
|
|
2198
|
+
};
|
|
2199
|
+
};
|
|
2200
|
+
responses: {
|
|
2201
|
+
/** @description OK */
|
|
2202
|
+
200: {
|
|
2203
|
+
headers: {
|
|
2204
|
+
[name: string]: unknown;
|
|
2205
|
+
};
|
|
2206
|
+
content: {
|
|
2207
|
+
"application/json": components["schemas"]["FolderResource"];
|
|
2208
|
+
};
|
|
2209
|
+
};
|
|
2210
|
+
/** @description Error */
|
|
2211
|
+
default: {
|
|
2212
|
+
headers: {
|
|
2213
|
+
[name: string]: unknown;
|
|
2214
|
+
};
|
|
2215
|
+
content: {
|
|
2216
|
+
"application/json": components["schemas"]["Error"];
|
|
2217
|
+
};
|
|
2218
|
+
};
|
|
2219
|
+
};
|
|
2220
|
+
};
|
|
1955
2221
|
"list-memories": {
|
|
1956
2222
|
parameters: {
|
|
1957
2223
|
query?: never;
|
|
@@ -2175,6 +2441,16 @@ export interface operations {
|
|
|
2175
2441
|
q?: string;
|
|
2176
2442
|
/** @description When true, returns **only** archived conversations; otherwise only unarchived ones */
|
|
2177
2443
|
archived?: boolean;
|
|
2444
|
+
/** @description Narrow the list to one folder. Omitting it returns conversations from every folder and from none; a folder id returns that folder's; the empty value (`?folder=`) returns the ones that are in no folder at all. Empty is not the same as omitted, and a sidebar needs both: "chats" is exactly the ungrouped set, and asking for everything would let filed conversations crowd it out of the limit. */
|
|
2445
|
+
folder?: string;
|
|
2446
|
+
/**
|
|
2447
|
+
* @description Where the previous page ended, from its `nextCursor`. Omit it for the first page.
|
|
2448
|
+
*
|
|
2449
|
+
* It is a position, not an offset, and that matters here: this list is ordered by recent activity, and the activity happens while it is being read. An offset would hand back a conversation twice when one moves up in between, and skip one when it moves down — silently, because a conversation that was skipped simply is not there.
|
|
2450
|
+
*
|
|
2451
|
+
* Pass the same `q`, `archived` and `folder` along with it. A cursor carries a position, not the question that produced it, so changing the filters mid-scroll walks a range nobody asked for.
|
|
2452
|
+
*/
|
|
2453
|
+
cursor?: string;
|
|
2178
2454
|
limit?: number;
|
|
2179
2455
|
};
|
|
2180
2456
|
header?: never;
|
|
@@ -2267,6 +2543,35 @@ export interface operations {
|
|
|
2267
2543
|
};
|
|
2268
2544
|
};
|
|
2269
2545
|
};
|
|
2546
|
+
"delete-thread": {
|
|
2547
|
+
parameters: {
|
|
2548
|
+
query?: never;
|
|
2549
|
+
header?: never;
|
|
2550
|
+
path: {
|
|
2551
|
+
thread: string;
|
|
2552
|
+
};
|
|
2553
|
+
cookie?: never;
|
|
2554
|
+
};
|
|
2555
|
+
requestBody?: never;
|
|
2556
|
+
responses: {
|
|
2557
|
+
/** @description No Content */
|
|
2558
|
+
204: {
|
|
2559
|
+
headers: {
|
|
2560
|
+
[name: string]: unknown;
|
|
2561
|
+
};
|
|
2562
|
+
content?: never;
|
|
2563
|
+
};
|
|
2564
|
+
/** @description Error */
|
|
2565
|
+
default: {
|
|
2566
|
+
headers: {
|
|
2567
|
+
[name: string]: unknown;
|
|
2568
|
+
};
|
|
2569
|
+
content: {
|
|
2570
|
+
"application/json": components["schemas"]["Error"];
|
|
2571
|
+
};
|
|
2572
|
+
};
|
|
2573
|
+
};
|
|
2574
|
+
};
|
|
2270
2575
|
"update-thread": {
|
|
2271
2576
|
parameters: {
|
|
2272
2577
|
query?: never;
|