@leaflow/sdk 0.44.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;
|
|
@@ -633,6 +691,13 @@ export interface components {
|
|
|
633
691
|
* @description Size of what was stored. For an image that has been resized, this is the resized size, not what was uploaded.
|
|
634
692
|
*/
|
|
635
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;
|
|
636
701
|
filename: string;
|
|
637
702
|
/**
|
|
638
703
|
* Format: int64
|
|
@@ -951,6 +1016,8 @@ export interface components {
|
|
|
951
1016
|
archived: boolean;
|
|
952
1017
|
/** Format: date-time */
|
|
953
1018
|
createdAt: string;
|
|
1019
|
+
/** @description The folder this conversation is filed under, or null when it is in none */
|
|
1020
|
+
folderId: string | null;
|
|
954
1021
|
id: string;
|
|
955
1022
|
model: string;
|
|
956
1023
|
title: string | null;
|
|
@@ -959,6 +1026,8 @@ export interface components {
|
|
|
959
1026
|
updatedAt: string;
|
|
960
1027
|
};
|
|
961
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;
|
|
962
1031
|
threads: components["schemas"]["ThreadSummaryResource"][] | null;
|
|
963
1032
|
};
|
|
964
1033
|
CreateThreadRequestBody: {
|
|
@@ -1155,6 +1224,12 @@ export interface components {
|
|
|
1155
1224
|
/** @enum {string} */
|
|
1156
1225
|
approvalMode?: "guardian" | "manual" | "yolo";
|
|
1157
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;
|
|
1158
1233
|
/**
|
|
1159
1234
|
* @description Rename this conversation.
|
|
1160
1235
|
*
|
|
@@ -1326,6 +1401,28 @@ export interface components {
|
|
|
1326
1401
|
/** Format: int64 */
|
|
1327
1402
|
reverted: number;
|
|
1328
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
|
+
};
|
|
1329
1426
|
};
|
|
1330
1427
|
responses: never;
|
|
1331
1428
|
parameters: never;
|
|
@@ -1964,6 +2061,163 @@ export interface operations {
|
|
|
1964
2061
|
};
|
|
1965
2062
|
};
|
|
1966
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
|
+
};
|
|
1967
2221
|
"list-memories": {
|
|
1968
2222
|
parameters: {
|
|
1969
2223
|
query?: never;
|
|
@@ -2187,6 +2441,16 @@ export interface operations {
|
|
|
2187
2441
|
q?: string;
|
|
2188
2442
|
/** @description When true, returns **only** archived conversations; otherwise only unarchived ones */
|
|
2189
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;
|
|
2190
2454
|
limit?: number;
|
|
2191
2455
|
};
|
|
2192
2456
|
header?: never;
|