matelab-python-sdk 0.1.0a1__py3-none-any.whl
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.
- matelab/__init__.py +372 -0
- matelab/_generated/__init__.py +1 -0
- matelab/_generated/models.py +3553 -0
- matelab/_transport.py +481 -0
- matelab/client.py +191 -0
- matelab/cloud_drive.py +789 -0
- matelab/errors.py +38 -0
- matelab/groups.py +78 -0
- matelab/literature.py +1243 -0
- matelab/models.py +27 -0
- matelab/notebooks.py +467 -0
- matelab/py.typed +1 -0
- matelab/records.py +2511 -0
- matelab/streaming.py +82 -0
- matelab/templates.py +737 -0
- matelab/uploads.py +247 -0
- matelab/users.py +77 -0
- matelab_python_sdk-0.1.0a1.dist-info/METADATA +538 -0
- matelab_python_sdk-0.1.0a1.dist-info/RECORD +22 -0
- matelab_python_sdk-0.1.0a1.dist-info/WHEEL +4 -0
- matelab_python_sdk-0.1.0a1.dist-info/licenses/LICENSE +202 -0
- matelab_python_sdk-0.1.0a1.dist-info/licenses/NOTICE +2 -0
|
@@ -0,0 +1,3553 @@
|
|
|
1
|
+
# @generated by datamodel-codegen:
|
|
2
|
+
# filename: openapi.yaml
|
|
3
|
+
# version: 0.71.0
|
|
4
|
+
|
|
5
|
+
from enum import Enum, IntEnum, StrEnum
|
|
6
|
+
from typing import Annotated, Any, Literal
|
|
7
|
+
|
|
8
|
+
from pydantic import BaseModel, ConfigDict, Field, RootModel, SecretStr
|
|
9
|
+
|
|
10
|
+
OPENAPI_INFO_VERSION = "0.1.0"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ResponseEnvelope(BaseModel):
|
|
14
|
+
model_config = ConfigDict(
|
|
15
|
+
extra="allow",
|
|
16
|
+
)
|
|
17
|
+
code: int
|
|
18
|
+
msg: str
|
|
19
|
+
errcode: int
|
|
20
|
+
"""
|
|
21
|
+
Legacy alias of `code`; always present in these operations.
|
|
22
|
+
"""
|
|
23
|
+
errmsg: str
|
|
24
|
+
"""
|
|
25
|
+
Legacy alias of `msg`; always present in these operations.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class BasicSuccessResponse(BaseModel):
|
|
30
|
+
model_config = ConfigDict(
|
|
31
|
+
extra="allow",
|
|
32
|
+
)
|
|
33
|
+
code: Literal[0]
|
|
34
|
+
msg: str
|
|
35
|
+
errcode: Literal[0]
|
|
36
|
+
errmsg: str
|
|
37
|
+
"""
|
|
38
|
+
Legacy alias of `msg`; always present in these operations.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class Code(Enum):
|
|
43
|
+
int_0 = 0
|
|
44
|
+
int_10 = 10
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class Errcode(Enum):
|
|
48
|
+
int_0 = 0
|
|
49
|
+
int_10 = 10
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class ForwardableSuccessResponse(BaseModel):
|
|
53
|
+
model_config = ConfigDict(
|
|
54
|
+
extra="allow",
|
|
55
|
+
)
|
|
56
|
+
code: Code
|
|
57
|
+
msg: str
|
|
58
|
+
errcode: Errcode
|
|
59
|
+
errmsg: str
|
|
60
|
+
"""
|
|
61
|
+
Legacy alias of `msg`; always present in these operations.
|
|
62
|
+
"""
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
class ErrorDetail(RootModel[Any]):
|
|
66
|
+
root: Any
|
|
67
|
+
"""
|
|
68
|
+
A stable per-field or per-location error value returned when code is 4.
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class ErrorResponse(BaseModel):
|
|
73
|
+
model_config = ConfigDict(
|
|
74
|
+
extra="allow",
|
|
75
|
+
)
|
|
76
|
+
code: int
|
|
77
|
+
msg: str
|
|
78
|
+
errcode: int
|
|
79
|
+
errmsg: str
|
|
80
|
+
errs: list[ErrorDetail] | None = None
|
|
81
|
+
"""
|
|
82
|
+
Present for multi-error code 4; absent from ordinary errors.
|
|
83
|
+
"""
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class Sha256(RootModel[str]):
|
|
87
|
+
root: Annotated[str, Field(pattern="^[0-9a-f]{64}$")]
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
class CloudDriveIdentityResponse(BaseModel):
|
|
91
|
+
model_config = ConfigDict(
|
|
92
|
+
extra="allow",
|
|
93
|
+
)
|
|
94
|
+
code: Literal[0]
|
|
95
|
+
msg: str
|
|
96
|
+
errcode: Literal[0]
|
|
97
|
+
errmsg: str
|
|
98
|
+
"""
|
|
99
|
+
Legacy alias of `msg`; always present in these operations.
|
|
100
|
+
"""
|
|
101
|
+
id: Annotated[int, Field(ge=1)]
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
class CloudDriveFile(BaseModel):
|
|
105
|
+
model_config = ConfigDict(
|
|
106
|
+
extra="allow",
|
|
107
|
+
)
|
|
108
|
+
id: Annotated[int, Field(ge=1)]
|
|
109
|
+
filename: Annotated[str, Field(max_length=255, min_length=1)]
|
|
110
|
+
hash: Sha256
|
|
111
|
+
size: Annotated[str, Field(pattern="^[0-9]+$")]
|
|
112
|
+
"""
|
|
113
|
+
Unsigned BIGINT serialized as a decimal string by this query.
|
|
114
|
+
"""
|
|
115
|
+
userid: Annotated[int, Field(ge=1)]
|
|
116
|
+
date_time: Annotated[str | None, Field(pattern="^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$")]
|
|
117
|
+
comm: str
|
|
118
|
+
"""
|
|
119
|
+
PHP normalizes a database null to the empty string.
|
|
120
|
+
"""
|
|
121
|
+
username: Annotated[str | None, Field(...)]
|
|
122
|
+
"""
|
|
123
|
+
Nullable because the owner is LEFT JOINed.
|
|
124
|
+
"""
|
|
125
|
+
date: Annotated[str, Field(pattern="^\\d{4}-\\d{2}-\\d{2}$")]
|
|
126
|
+
time: Annotated[str, Field(pattern="^\\d{2}:\\d{2}$")]
|
|
127
|
+
owner: Literal[True]
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
class CloudDriveRootPermissions(BaseModel):
|
|
131
|
+
model_config = ConfigDict(
|
|
132
|
+
extra="allow",
|
|
133
|
+
)
|
|
134
|
+
id: Literal[0]
|
|
135
|
+
power: Literal[1823]
|
|
136
|
+
showtext: str
|
|
137
|
+
comm: str
|
|
138
|
+
admin: Literal[False]
|
|
139
|
+
dir_create: Literal[True]
|
|
140
|
+
dir_delete: Literal[True]
|
|
141
|
+
dir_edit: Literal[True]
|
|
142
|
+
file_create: Literal[True]
|
|
143
|
+
file_delete: Literal[True]
|
|
144
|
+
file_view: Literal[True]
|
|
145
|
+
file_edit: Literal[True]
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
class CloudDriveFolder(BaseModel):
|
|
149
|
+
model_config = ConfigDict(
|
|
150
|
+
extra="allow",
|
|
151
|
+
)
|
|
152
|
+
id: Annotated[int, Field(ge=1)]
|
|
153
|
+
showtext: Annotated[str, Field(min_length=1)]
|
|
154
|
+
parent: Annotated[int, Field(ge=0)]
|
|
155
|
+
num: Annotated[int, Field(ge=0)]
|
|
156
|
+
"""
|
|
157
|
+
Direct file count; child-folder contents are not included.
|
|
158
|
+
"""
|
|
159
|
+
comm: Annotated[str | None, Field(...)]
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
class SaveCloudDriveFolderRequest(BaseModel):
|
|
163
|
+
model_config = ConfigDict(
|
|
164
|
+
extra="forbid",
|
|
165
|
+
)
|
|
166
|
+
id: Annotated[int, Field(ge=0)] = 0
|
|
167
|
+
parent: Annotated[int, Field(ge=0)] = 0
|
|
168
|
+
root_id: Literal[0] = 0
|
|
169
|
+
showtext: Annotated[str, Field(max_length=100, min_length=1)]
|
|
170
|
+
"""
|
|
171
|
+
Must also satisfy the Provider's legal-filename check.
|
|
172
|
+
"""
|
|
173
|
+
comm: Annotated[str, Field(max_length=1000)] = ""
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
class CloudDriveFolderIdRequest(BaseModel):
|
|
177
|
+
model_config = ConfigDict(
|
|
178
|
+
extra="forbid",
|
|
179
|
+
)
|
|
180
|
+
id: Annotated[int, Field(ge=1)]
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
class MoveCloudDriveFolderRequest(BaseModel):
|
|
184
|
+
model_config = ConfigDict(
|
|
185
|
+
extra="forbid",
|
|
186
|
+
)
|
|
187
|
+
id: Annotated[int, Field(ge=1)]
|
|
188
|
+
target: Annotated[int, Field(ge=0)] = 0
|
|
189
|
+
"""
|
|
190
|
+
Target parent folder; zero is the root.
|
|
191
|
+
"""
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
class BindCloudDriveFileRequest(BaseModel):
|
|
195
|
+
model_config = ConfigDict(
|
|
196
|
+
extra="forbid",
|
|
197
|
+
)
|
|
198
|
+
file_id: Annotated[int, Field(ge=1)]
|
|
199
|
+
"""
|
|
200
|
+
Completed upload_temp id returned by stageTemporaryFile.
|
|
201
|
+
"""
|
|
202
|
+
type_id: Annotated[int, Field(ge=0)] = 0
|
|
203
|
+
root_id: Literal[0] = 0
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
class EditCloudDriveFileRequest(BaseModel):
|
|
207
|
+
model_config = ConfigDict(
|
|
208
|
+
extra="forbid",
|
|
209
|
+
)
|
|
210
|
+
id: Annotated[int, Field(ge=1)]
|
|
211
|
+
filename: Annotated[str, Field(max_length=255, min_length=1)]
|
|
212
|
+
"""
|
|
213
|
+
Must preserve the existing extension and pass the legal-filename check.
|
|
214
|
+
"""
|
|
215
|
+
comm: Annotated[str, Field(max_length=1000)] = ""
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
class CloudDriveFileIdListItem(RootModel[int]):
|
|
219
|
+
root: Annotated[int, Field(ge=1)]
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
class CloudDriveFileIdList(RootModel[list[CloudDriveFileIdListItem]]):
|
|
223
|
+
root: Annotated[list[CloudDriveFileIdListItem], Field(min_length=1)]
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
class DeleteCloudDriveFilesRequest(BaseModel):
|
|
227
|
+
model_config = ConfigDict(
|
|
228
|
+
extra="forbid",
|
|
229
|
+
)
|
|
230
|
+
ids: Annotated[
|
|
231
|
+
str,
|
|
232
|
+
Field(
|
|
233
|
+
json_schema_extra={
|
|
234
|
+
"contentMediaType": "application/json",
|
|
235
|
+
"contentSchema": {"$ref": "#/components/schemas/CloudDriveFileIdList"},
|
|
236
|
+
},
|
|
237
|
+
min_length=1,
|
|
238
|
+
),
|
|
239
|
+
]
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
class TransferCloudDriveFilesRequest(BaseModel):
|
|
243
|
+
model_config = ConfigDict(
|
|
244
|
+
extra="forbid",
|
|
245
|
+
)
|
|
246
|
+
files: Annotated[
|
|
247
|
+
str,
|
|
248
|
+
Field(
|
|
249
|
+
json_schema_extra={
|
|
250
|
+
"contentMediaType": "application/json",
|
|
251
|
+
"contentSchema": {"$ref": "#/components/schemas/CloudDriveFileIdList"},
|
|
252
|
+
},
|
|
253
|
+
min_length=1,
|
|
254
|
+
),
|
|
255
|
+
]
|
|
256
|
+
target: Annotated[int, Field(ge=0)] = 0
|
|
257
|
+
root_id: Literal[0] = 0
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
class UploadAttachmentRequest(BaseModel):
|
|
261
|
+
model_config = ConfigDict(
|
|
262
|
+
extra="forbid",
|
|
263
|
+
)
|
|
264
|
+
eln: Annotated[str, Field(min_length=1)]
|
|
265
|
+
"""
|
|
266
|
+
Notebook title used to select its data server.
|
|
267
|
+
"""
|
|
268
|
+
user: Annotated[int | None, Field(ge=1)] = None
|
|
269
|
+
"""
|
|
270
|
+
Optional notebook owner identifier for a non-owned notebook.
|
|
271
|
+
"""
|
|
272
|
+
uid: Annotated[str, Field(max_length=45, min_length=1)]
|
|
273
|
+
"""
|
|
274
|
+
Record wire UID and upload-event identifier.
|
|
275
|
+
"""
|
|
276
|
+
name: Annotated[str, Field(max_length=45)] = ""
|
|
277
|
+
"""
|
|
278
|
+
Missing or empty falls back to uid as the unique temporary upload name.
|
|
279
|
+
"""
|
|
280
|
+
hash: Sha256
|
|
281
|
+
last: Literal[1] = 1
|
|
282
|
+
"""
|
|
283
|
+
Missing defaults to 1; integration-v1 only contracts the completed one-fragment flow.
|
|
284
|
+
"""
|
|
285
|
+
file: bytes
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
class UploadAttachmentResponse(BaseModel):
|
|
289
|
+
model_config = ConfigDict(
|
|
290
|
+
extra="allow",
|
|
291
|
+
)
|
|
292
|
+
code: Literal[0]
|
|
293
|
+
msg: str
|
|
294
|
+
errcode: Literal[0]
|
|
295
|
+
errmsg: str
|
|
296
|
+
"""
|
|
297
|
+
Legacy alias of `msg`; always present in these operations.
|
|
298
|
+
"""
|
|
299
|
+
id: Annotated[int, Field(ge=1)]
|
|
300
|
+
path: Literal["url_eln/temp"]
|
|
301
|
+
query: str
|
|
302
|
+
"""
|
|
303
|
+
Provider-built legacy query string for the temporary file.
|
|
304
|
+
"""
|
|
305
|
+
name: Annotated[str, Field(min_length=1)]
|
|
306
|
+
filename: Annotated[str, Field(min_length=1)]
|
|
307
|
+
size: Annotated[int, Field(ge=0)]
|
|
308
|
+
hash: Sha256
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
class AppUser(BaseModel):
|
|
312
|
+
model_config = ConfigDict(
|
|
313
|
+
extra="allow",
|
|
314
|
+
)
|
|
315
|
+
username: Annotated[str | None, Field(...)]
|
|
316
|
+
"""
|
|
317
|
+
Raw nullable `login_user.realname`.
|
|
318
|
+
"""
|
|
319
|
+
avatar: Annotated[str | None, Field(...)]
|
|
320
|
+
"""
|
|
321
|
+
Raw id-photo path, normalized to null when empty.
|
|
322
|
+
"""
|
|
323
|
+
email: Annotated[str | None, Field(...)]
|
|
324
|
+
userid: Annotated[int, Field(ge=1)]
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
class AppNotification(BaseModel):
|
|
328
|
+
model_config = ConfigDict(
|
|
329
|
+
extra="allow",
|
|
330
|
+
)
|
|
331
|
+
id: Annotated[int, Field(ge=1)]
|
|
332
|
+
showtext: Annotated[str | None, Field(...)]
|
|
333
|
+
datetime_add: Annotated[str | None, Field(...)]
|
|
334
|
+
"""
|
|
335
|
+
Raw database datetime retained by the PHP response.
|
|
336
|
+
"""
|
|
337
|
+
datetime: str
|
|
338
|
+
"""
|
|
339
|
+
Provider-formatted `Y-m-d H:i`.
|
|
340
|
+
"""
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
class AppEnvironment(BaseModel):
|
|
344
|
+
model_config = ConfigDict(
|
|
345
|
+
extra="allow",
|
|
346
|
+
)
|
|
347
|
+
ai: bool
|
|
348
|
+
smtp: bool
|
|
349
|
+
institute: Annotated[int, Field(ge=0)]
|
|
350
|
+
annals: Annotated[int, Field(ge=0)]
|
|
351
|
+
paper: Annotated[int, Field(ge=0)]
|
|
352
|
+
topics: Annotated[int, Field(ge=0)]
|
|
353
|
+
device: Annotated[int, Field(ge=0)]
|
|
354
|
+
eln: Annotated[int, Field(ge=0)]
|
|
355
|
+
files: Annotated[int, Field(ge=0)]
|
|
356
|
+
recommend: Annotated[int, Field(ge=0)]
|
|
357
|
+
assets: Annotated[int, Field(ge=0)]
|
|
358
|
+
feedback: Annotated[int, Field(ge=0)]
|
|
359
|
+
doc: Annotated[int, Field(ge=0)]
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
class AppMenuItem(BaseModel):
|
|
363
|
+
model_config = ConfigDict(
|
|
364
|
+
extra="allow",
|
|
365
|
+
)
|
|
366
|
+
showtext: str
|
|
367
|
+
icon: str
|
|
368
|
+
url: str
|
|
369
|
+
order: int
|
|
370
|
+
|
|
371
|
+
|
|
372
|
+
class TokenRefreshRequest(BaseModel):
|
|
373
|
+
model_config = ConfigDict(
|
|
374
|
+
extra="forbid",
|
|
375
|
+
)
|
|
376
|
+
refresh_token: Annotated[str, Field(min_length=1)]
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
class TokenLoginRequest(BaseModel):
|
|
380
|
+
model_config = ConfigDict(
|
|
381
|
+
extra="forbid",
|
|
382
|
+
)
|
|
383
|
+
username: Annotated[str, Field(max_length=128, min_length=2)]
|
|
384
|
+
"""
|
|
385
|
+
Login username or email address.
|
|
386
|
+
"""
|
|
387
|
+
password: Annotated[SecretStr, Field(max_length=32, min_length=8)]
|
|
388
|
+
code: str = ""
|
|
389
|
+
"""
|
|
390
|
+
Conditional WeChat mini-program binding code. Absent in the current MCP
|
|
391
|
+
credential-login flow.
|
|
392
|
+
|
|
393
|
+
"""
|
|
394
|
+
iopcard: Annotated[str, Field(max_length=45)] = ""
|
|
395
|
+
"""
|
|
396
|
+
Conditional employee-card identifier to bind after successful login.
|
|
397
|
+
Absent in the current MCP credential-login flow.
|
|
398
|
+
|
|
399
|
+
"""
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
class ChatSsoCodeExchangeRequest(BaseModel):
|
|
403
|
+
model_config = ConfigDict(
|
|
404
|
+
extra="forbid",
|
|
405
|
+
)
|
|
406
|
+
code: Annotated[str, Field(max_length=21, min_length=21, pattern="^chat-[^-]{16}$")]
|
|
407
|
+
"""
|
|
408
|
+
One-time `chat-` plus 16-character code created by `/actions/ai_iframe`.
|
|
409
|
+
"""
|
|
410
|
+
key: Annotated[SecretStr, Field(min_length=1)]
|
|
411
|
+
"""
|
|
412
|
+
Shared key configured for the `chat` third-party type.
|
|
413
|
+
"""
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
class AuthToken(BaseModel):
|
|
417
|
+
model_config = ConfigDict(
|
|
418
|
+
extra="allow",
|
|
419
|
+
)
|
|
420
|
+
token: Annotated[str, Field(min_length=1)]
|
|
421
|
+
expiredAt: Annotated[int, Field(ge=1)]
|
|
422
|
+
"""
|
|
423
|
+
Unix expiration timestamp in milliseconds.
|
|
424
|
+
"""
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
class TemplateIdRequest(BaseModel):
|
|
428
|
+
model_config = ConfigDict(
|
|
429
|
+
extra="forbid",
|
|
430
|
+
)
|
|
431
|
+
id: Annotated[int, Field(ge=1)]
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
class ShareMultipleTemplatesRequest(BaseModel):
|
|
435
|
+
model_config = ConfigDict(
|
|
436
|
+
extra="forbid",
|
|
437
|
+
)
|
|
438
|
+
templates: Annotated[
|
|
439
|
+
str,
|
|
440
|
+
Field(
|
|
441
|
+
json_schema_extra={
|
|
442
|
+
"contentMediaType": "application/json",
|
|
443
|
+
"contentSchema": {
|
|
444
|
+
"type": "array",
|
|
445
|
+
"minItems": 1,
|
|
446
|
+
"maxItems": 10,
|
|
447
|
+
"uniqueItems": True,
|
|
448
|
+
"items": {"type": "integer", "minimum": 1},
|
|
449
|
+
},
|
|
450
|
+
},
|
|
451
|
+
min_length=1,
|
|
452
|
+
),
|
|
453
|
+
]
|
|
454
|
+
"""
|
|
455
|
+
JSON-encoded owned template-id list.
|
|
456
|
+
"""
|
|
457
|
+
users: Annotated[
|
|
458
|
+
str,
|
|
459
|
+
Field(
|
|
460
|
+
json_schema_extra={
|
|
461
|
+
"contentMediaType": "application/json",
|
|
462
|
+
"contentSchema": {
|
|
463
|
+
"type": "array",
|
|
464
|
+
"minItems": 1,
|
|
465
|
+
"maxItems": 10,
|
|
466
|
+
"uniqueItems": True,
|
|
467
|
+
"items": {"type": "integer", "minimum": 1},
|
|
468
|
+
},
|
|
469
|
+
},
|
|
470
|
+
min_length=1,
|
|
471
|
+
),
|
|
472
|
+
]
|
|
473
|
+
"""
|
|
474
|
+
JSON-encoded recipient user-id list.
|
|
475
|
+
"""
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
class RemoveUserTemplateRelationRequest(BaseModel):
|
|
479
|
+
model_config = ConfigDict(
|
|
480
|
+
extra="forbid",
|
|
481
|
+
)
|
|
482
|
+
id: Annotated[int, Field(ge=1)]
|
|
483
|
+
"""
|
|
484
|
+
Relation id from `listTemplates.share[].id` or `listTemplates.stores[].id`.
|
|
485
|
+
"""
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
class AddGroupTemplateRequest(BaseModel):
|
|
489
|
+
model_config = ConfigDict(
|
|
490
|
+
extra="forbid",
|
|
491
|
+
)
|
|
492
|
+
template_id: Annotated[int, Field(ge=1)]
|
|
493
|
+
"""
|
|
494
|
+
Owned template identifier.
|
|
495
|
+
"""
|
|
496
|
+
group_id: Annotated[int, Field(ge=1)]
|
|
497
|
+
"""
|
|
498
|
+
ELN group identifier in which the caller has a valid membership.
|
|
499
|
+
"""
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
class DeleteGroupTemplateRequest(BaseModel):
|
|
503
|
+
model_config = ConfigDict(
|
|
504
|
+
extra="forbid",
|
|
505
|
+
)
|
|
506
|
+
id: Annotated[int, Field(ge=1)]
|
|
507
|
+
"""
|
|
508
|
+
Group-template relation id from `listTemplates.group[].id`.
|
|
509
|
+
"""
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
class SaveTemplateMetadataRequest(BaseModel):
|
|
513
|
+
model_config = ConfigDict(
|
|
514
|
+
extra="forbid",
|
|
515
|
+
)
|
|
516
|
+
id: Annotated[int | None, Field(ge=0)] = 0
|
|
517
|
+
"""
|
|
518
|
+
Missing or null becomes 0 and selects the create branch.
|
|
519
|
+
"""
|
|
520
|
+
showtext: Annotated[str, Field(max_length=45, min_length=1)]
|
|
521
|
+
comm: Annotated[str | None, Field(max_length=255)] = ""
|
|
522
|
+
"""
|
|
523
|
+
Missing or null becomes the empty string through requestStr.
|
|
524
|
+
"""
|
|
525
|
+
keyword: Annotated[
|
|
526
|
+
str | None,
|
|
527
|
+
Field(
|
|
528
|
+
json_schema_extra={
|
|
529
|
+
"contentMediaType": "application/json",
|
|
530
|
+
"contentSchema": {"type": "array", "items": {"type": "string"}},
|
|
531
|
+
}
|
|
532
|
+
),
|
|
533
|
+
] = ""
|
|
534
|
+
"""
|
|
535
|
+
JSON-encoded keyword string array, not a direct JSON array. Missing,
|
|
536
|
+
null, malformed JSON, and JSON null are normalized by PHP to `[]`.
|
|
537
|
+
The stable contract deliberately narrows non-null values to the
|
|
538
|
+
matelab-mcp use case instead of promising every JSON value PHP could
|
|
539
|
+
incidentally decode and store.
|
|
540
|
+
|
|
541
|
+
"""
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
class SaveTemplateContentRequest(BaseModel):
|
|
545
|
+
model_config = ConfigDict(
|
|
546
|
+
extra="forbid",
|
|
547
|
+
)
|
|
548
|
+
id: Annotated[int, Field(ge=1)]
|
|
549
|
+
data: Annotated[
|
|
550
|
+
str,
|
|
551
|
+
Field(
|
|
552
|
+
json_schema_extra={
|
|
553
|
+
"contentMediaType": "application/json",
|
|
554
|
+
"contentSchema": {
|
|
555
|
+
"type": "array",
|
|
556
|
+
"items": {"$ref": "#/components/schemas/TemplateModule"},
|
|
557
|
+
},
|
|
558
|
+
}
|
|
559
|
+
),
|
|
560
|
+
]
|
|
561
|
+
"""
|
|
562
|
+
JSON-encoded canonical module array. PHP additionally rejects
|
|
563
|
+
duplicate module names, duplicate table-column names, duplicate
|
|
564
|
+
form-item names, and purely numeric names; those cross-item rules
|
|
565
|
+
cannot be expressed completely by JSON Schema and are documented as
|
|
566
|
+
business validation.
|
|
567
|
+
|
|
568
|
+
"""
|
|
569
|
+
|
|
570
|
+
|
|
571
|
+
class CopyTemplateRequest(BaseModel):
|
|
572
|
+
model_config = ConfigDict(
|
|
573
|
+
extra="forbid",
|
|
574
|
+
)
|
|
575
|
+
id: Annotated[int, Field(ge=1)]
|
|
576
|
+
template_name: Annotated[str, Field(max_length=45, min_length=1)]
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
class UpdateTemplateIntroRequest(BaseModel):
|
|
580
|
+
model_config = ConfigDict(
|
|
581
|
+
extra="forbid",
|
|
582
|
+
)
|
|
583
|
+
id: Annotated[int, Field(ge=1)]
|
|
584
|
+
intro: Annotated[str | None, Field(max_length=13000)] = ""
|
|
585
|
+
"""
|
|
586
|
+
Missing or null becomes the empty string through requestStr.
|
|
587
|
+
"""
|
|
588
|
+
uid: Annotated[str, Field(min_length=1)]
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
class TemplateModule(BaseModel):
|
|
592
|
+
model_config = ConfigDict(
|
|
593
|
+
extra="allow",
|
|
594
|
+
)
|
|
595
|
+
name: Annotated[str, Field(min_length=1, pattern=".*[^0-9.\\-+eE ].*")]
|
|
596
|
+
"""
|
|
597
|
+
PHP trims the name, rejects an empty or purely numeric value, and
|
|
598
|
+
rejects duplicate names across the module array.
|
|
599
|
+
|
|
600
|
+
"""
|
|
601
|
+
type: Annotated[str, Field(min_length=1)]
|
|
602
|
+
data: dict[str, Any] | list[Any] | str | float | bool | None = None
|
|
603
|
+
"""
|
|
604
|
+
Runtime requirements depend on the target module type.
|
|
605
|
+
"""
|
|
606
|
+
language: str | None = None
|
|
607
|
+
style: Any | None = None
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
class TemplateTableColumn(BaseModel):
|
|
611
|
+
model_config = ConfigDict(
|
|
612
|
+
extra="allow",
|
|
613
|
+
)
|
|
614
|
+
name: Annotated[str, Field(min_length=1, pattern=".*[^0-9.\\-+eE ].*")]
|
|
615
|
+
"""
|
|
616
|
+
PHP also rejects duplicate names within the table.
|
|
617
|
+
"""
|
|
618
|
+
type: str
|
|
619
|
+
data: list[Any]
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
class TemplateFormItem(BaseModel):
|
|
623
|
+
model_config = ConfigDict(
|
|
624
|
+
extra="allow",
|
|
625
|
+
)
|
|
626
|
+
name: Annotated[str, Field(min_length=1, pattern=".*[^0-9.\\-+eE ].*")]
|
|
627
|
+
"""
|
|
628
|
+
PHP also rejects duplicate names within the form.
|
|
629
|
+
"""
|
|
630
|
+
|
|
631
|
+
|
|
632
|
+
class TemplateContentResponse(BaseModel):
|
|
633
|
+
model_config = ConfigDict(
|
|
634
|
+
extra="allow",
|
|
635
|
+
)
|
|
636
|
+
code: Literal[0]
|
|
637
|
+
msg: str
|
|
638
|
+
errcode: Literal[0]
|
|
639
|
+
errmsg: str
|
|
640
|
+
"""
|
|
641
|
+
Legacy alias of `msg`; always present in these operations.
|
|
642
|
+
"""
|
|
643
|
+
content: list[TemplateModule]
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
class Action(StrEnum):
|
|
647
|
+
add = "add"
|
|
648
|
+
edit = "edit"
|
|
649
|
+
|
|
650
|
+
|
|
651
|
+
class SaveTemplateMetadataResponse(BaseModel):
|
|
652
|
+
model_config = ConfigDict(
|
|
653
|
+
extra="allow",
|
|
654
|
+
)
|
|
655
|
+
code: Literal[0]
|
|
656
|
+
msg: str
|
|
657
|
+
errcode: Literal[0]
|
|
658
|
+
errmsg: str
|
|
659
|
+
"""
|
|
660
|
+
Legacy alias of `msg`; always present in these operations.
|
|
661
|
+
"""
|
|
662
|
+
id: Annotated[int, Field(ge=1)]
|
|
663
|
+
action: Action
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
class UpdateTemplateIntroResponse(BaseModel):
|
|
667
|
+
model_config = ConfigDict(
|
|
668
|
+
extra="allow",
|
|
669
|
+
)
|
|
670
|
+
code: Literal[0]
|
|
671
|
+
msg: str
|
|
672
|
+
errcode: Literal[0]
|
|
673
|
+
errmsg: str
|
|
674
|
+
"""
|
|
675
|
+
Legacy alias of `msg`; always present in these operations.
|
|
676
|
+
"""
|
|
677
|
+
intro: str
|
|
678
|
+
|
|
679
|
+
|
|
680
|
+
class TemplateListItem(BaseModel):
|
|
681
|
+
model_config = ConfigDict(
|
|
682
|
+
extra="allow",
|
|
683
|
+
)
|
|
684
|
+
id: Annotated[int | None, Field(ge=1)] = None
|
|
685
|
+
template_id: Annotated[int, Field(ge=1)]
|
|
686
|
+
template_name: Annotated[str | None, Field(...)]
|
|
687
|
+
comm: Annotated[str | None, Field(...)]
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
class PendingTemplateListItem(BaseModel):
|
|
691
|
+
model_config = ConfigDict(
|
|
692
|
+
extra="allow",
|
|
693
|
+
)
|
|
694
|
+
id: Annotated[int, Field(ge=1)]
|
|
695
|
+
template_id: Annotated[int, Field(ge=1)]
|
|
696
|
+
template_name: str
|
|
697
|
+
comm: Annotated[str | None, Field(...)]
|
|
698
|
+
userid: Literal[0]
|
|
699
|
+
username: Annotated[str | None, Field(...)]
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
class StoreTemplateListItem(BaseModel):
|
|
703
|
+
model_config = ConfigDict(
|
|
704
|
+
extra="allow",
|
|
705
|
+
)
|
|
706
|
+
id: Annotated[int, Field(ge=1)]
|
|
707
|
+
template_id: Annotated[int, Field(ge=1)]
|
|
708
|
+
template_name: str
|
|
709
|
+
comm: Annotated[str | None, Field(...)]
|
|
710
|
+
pub: Literal[2]
|
|
711
|
+
username: Annotated[str | None, Field(...)]
|
|
712
|
+
|
|
713
|
+
|
|
714
|
+
class SharedTemplateListItem(BaseModel):
|
|
715
|
+
model_config = ConfigDict(
|
|
716
|
+
extra="allow",
|
|
717
|
+
)
|
|
718
|
+
id: Annotated[int, Field(ge=1)]
|
|
719
|
+
template_id: Annotated[int, Field(ge=1)]
|
|
720
|
+
template_name: Annotated[str | None, Field(...)]
|
|
721
|
+
comm: Annotated[str | None, Field(...)]
|
|
722
|
+
userid_from: Annotated[int | None, Field(ge=1)]
|
|
723
|
+
username: Annotated[str | None, Field(...)]
|
|
724
|
+
avatar: Annotated[str | None, Field(...)]
|
|
725
|
+
|
|
726
|
+
|
|
727
|
+
class GroupTemplateListItem(BaseModel):
|
|
728
|
+
model_config = ConfigDict(
|
|
729
|
+
extra="allow",
|
|
730
|
+
)
|
|
731
|
+
id: Annotated[int, Field(ge=1)]
|
|
732
|
+
template_id: Annotated[int, Field(ge=1)]
|
|
733
|
+
template_name: Annotated[str | None, Field(...)]
|
|
734
|
+
comm: Annotated[str | None, Field(...)]
|
|
735
|
+
group_id: Annotated[int, Field(ge=1)]
|
|
736
|
+
datetime: str
|
|
737
|
+
userid: Annotated[int | None, Field(ge=1)]
|
|
738
|
+
email: Annotated[str | None, Field(...)]
|
|
739
|
+
username: Annotated[str | None, Field(...)]
|
|
740
|
+
group_name: Annotated[str | None, Field(...)]
|
|
741
|
+
admin: bool
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
class DefaultTemplateListItem(BaseModel):
|
|
745
|
+
model_config = ConfigDict(
|
|
746
|
+
extra="allow",
|
|
747
|
+
)
|
|
748
|
+
template_id: Annotated[int, Field(ge=1)]
|
|
749
|
+
template_name: str
|
|
750
|
+
comm: Annotated[str | None, Field(...)]
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
class OwnedTemplateListItem(BaseModel):
|
|
754
|
+
model_config = ConfigDict(
|
|
755
|
+
extra="allow",
|
|
756
|
+
)
|
|
757
|
+
id: Annotated[int, Field(ge=1)]
|
|
758
|
+
template_id: Annotated[int, Field(ge=1)]
|
|
759
|
+
template_name: str
|
|
760
|
+
comm: Annotated[str | None, Field(...)]
|
|
761
|
+
intro: Annotated[str | None, Field(...)]
|
|
762
|
+
version: Annotated[int, Field(ge=0)]
|
|
763
|
+
datetime: Annotated[str | None, Field(...)]
|
|
764
|
+
keyword: list[Any]
|
|
765
|
+
userid_from: Annotated[int, Field(ge=0)]
|
|
766
|
+
username: Annotated[str | None, Field(...)]
|
|
767
|
+
idphoto: Annotated[str | None, Field(...)]
|
|
768
|
+
pub: Annotated[int, Field(ge=0)]
|
|
769
|
+
Ifnull_pub_reason_____: Annotated[str, Field(alias="Ifnull(pub_reason, '')")]
|
|
770
|
+
template_show: Annotated[str | None, Field(...)]
|
|
771
|
+
store_version: Annotated[int, Field(ge=0)]
|
|
772
|
+
|
|
773
|
+
|
|
774
|
+
class My(IntEnum):
|
|
775
|
+
integer_0 = 0
|
|
776
|
+
integer_1 = 1
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
class TemplateStoreItem(BaseModel):
|
|
780
|
+
model_config = ConfigDict(
|
|
781
|
+
extra="allow",
|
|
782
|
+
)
|
|
783
|
+
id: Annotated[int, Field(ge=1)]
|
|
784
|
+
showtext: str
|
|
785
|
+
comm: Annotated[str | None, Field(...)]
|
|
786
|
+
intro: Annotated[str | None, Field(...)]
|
|
787
|
+
datetime_modify: Annotated[str | None, Field(...)]
|
|
788
|
+
dtime_pub: Annotated[str | None, Field(...)]
|
|
789
|
+
pub: Literal[2]
|
|
790
|
+
username: Annotated[str | None, Field(...)]
|
|
791
|
+
buy_count: Annotated[int | None, Field(ge=0)]
|
|
792
|
+
my: My
|
|
793
|
+
"""
|
|
794
|
+
Raw MySQL EXISTS result; PHP does not cast it to boolean.
|
|
795
|
+
"""
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
class ElnGroup(BaseModel):
|
|
799
|
+
model_config = ConfigDict(
|
|
800
|
+
extra="allow",
|
|
801
|
+
)
|
|
802
|
+
id: Annotated[int, Field(ge=1)]
|
|
803
|
+
showtext: Annotated[str | None, Field(...)]
|
|
804
|
+
server: Annotated[str | None, Field(...)]
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
class ElnGroupUser(BaseModel):
|
|
808
|
+
model_config = ConfigDict(
|
|
809
|
+
extra="allow",
|
|
810
|
+
)
|
|
811
|
+
id: Annotated[int | None, Field(ge=1)]
|
|
812
|
+
"""
|
|
813
|
+
Null only when the membership references a missing user selected by LEFT JOIN.
|
|
814
|
+
"""
|
|
815
|
+
username: Annotated[str | None, Field(...)]
|
|
816
|
+
email: Annotated[str | None, Field(...)]
|
|
817
|
+
iop_id: Annotated[int | None, Field(ge=0)]
|
|
818
|
+
"""
|
|
819
|
+
Null only for a missing joined user; otherwise NOT NULL and 0 means unlinked.
|
|
820
|
+
"""
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
class DirectoryUser(BaseModel):
|
|
824
|
+
model_config = ConfigDict(
|
|
825
|
+
extra="allow",
|
|
826
|
+
)
|
|
827
|
+
id: Annotated[int, Field(ge=1)]
|
|
828
|
+
username: Annotated[str | None, Field(...)]
|
|
829
|
+
"""
|
|
830
|
+
Raw nullable login_user.realname.
|
|
831
|
+
"""
|
|
832
|
+
email: Annotated[str | None, Field(...)]
|
|
833
|
+
"""
|
|
834
|
+
Raw nullable login_user.email; no format guarantee.
|
|
835
|
+
"""
|
|
836
|
+
institute: Annotated[str | None, Field(...)]
|
|
837
|
+
"""
|
|
838
|
+
Nullable only when the LEFT JOIN cannot resolve the institute row.
|
|
839
|
+
"""
|
|
840
|
+
iop_id: Annotated[int, Field(ge=0)]
|
|
841
|
+
"""
|
|
842
|
+
Zero means no linked IOP identity.
|
|
843
|
+
"""
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
class DisplayEnum(Enum):
|
|
847
|
+
int_0 = 0
|
|
848
|
+
int_1 = 1
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
class Display(RootModel[DisplayEnum | None]):
|
|
852
|
+
root: DisplayEnum | None = 0
|
|
853
|
+
"""
|
|
854
|
+
PHP normalizes an explicit null to 0.
|
|
855
|
+
"""
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
class SaveNotebookRequest(BaseModel):
|
|
859
|
+
model_config = ConfigDict(
|
|
860
|
+
extra="forbid",
|
|
861
|
+
regex_engine="python-re",
|
|
862
|
+
)
|
|
863
|
+
id: Annotated[int | None, Field(ge=0)] = 0
|
|
864
|
+
"""
|
|
865
|
+
Null or 0 creates a notebook; a positive value attempts an owned-notebook update.
|
|
866
|
+
"""
|
|
867
|
+
display: Annotated[Display | None, Field(validate_default=True)] = 0
|
|
868
|
+
"""
|
|
869
|
+
PHP normalizes an explicit null to 0.
|
|
870
|
+
"""
|
|
871
|
+
types: Annotated[
|
|
872
|
+
str | None,
|
|
873
|
+
Field(
|
|
874
|
+
json_schema_extra={
|
|
875
|
+
"contentMediaType": "application/json",
|
|
876
|
+
"contentSchema": {"type": "array"},
|
|
877
|
+
}
|
|
878
|
+
),
|
|
879
|
+
] = "[]"
|
|
880
|
+
"""
|
|
881
|
+
JSON-encoded notebook type array. A JSON null field is normalized to
|
|
882
|
+
the string default `[]`; malformed encoded JSON and the encoded string
|
|
883
|
+
`null` produce a business error.
|
|
884
|
+
|
|
885
|
+
"""
|
|
886
|
+
showtext: Annotated[str, Field(max_length=100, min_length=1, pattern="^(?!-?(?:0|[1-9][0-9]*)$)")]
|
|
887
|
+
"""
|
|
888
|
+
PHP rejects a canonical decimal integer string as a notebook name.
|
|
889
|
+
"""
|
|
890
|
+
comm: Annotated[str | None, Field(max_length=255)] = ""
|
|
891
|
+
"""
|
|
892
|
+
PHP normalizes an explicit null to the empty string.
|
|
893
|
+
"""
|
|
894
|
+
requests: Annotated[
|
|
895
|
+
str | None,
|
|
896
|
+
Field(
|
|
897
|
+
json_schema_extra={
|
|
898
|
+
"contentMediaType": "application/json",
|
|
899
|
+
"contentSchema": {
|
|
900
|
+
"type": "array",
|
|
901
|
+
"items": {
|
|
902
|
+
"type": "object",
|
|
903
|
+
"required": ["uid", "path"],
|
|
904
|
+
"properties": {
|
|
905
|
+
"uid": {},
|
|
906
|
+
"path": {"type": "array", "minItems": 1, "maxItems": 4},
|
|
907
|
+
},
|
|
908
|
+
"additionalProperties": True,
|
|
909
|
+
},
|
|
910
|
+
},
|
|
911
|
+
}
|
|
912
|
+
),
|
|
913
|
+
] = None
|
|
914
|
+
"""
|
|
915
|
+
Optional JSON-encoded list-display configuration. Missing, explicit
|
|
916
|
+
null, or empty string is normalized to null. A non-empty value is
|
|
917
|
+
validated only when display is 1.
|
|
918
|
+
|
|
919
|
+
"""
|
|
920
|
+
group_id: Annotated[int | None, Field(ge=0)] = 0
|
|
921
|
+
"""
|
|
922
|
+
Null is normalized to 0. Creation-only; PHP ignores it during updates.
|
|
923
|
+
"""
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
class AddNotebookShareRequest(BaseModel):
|
|
927
|
+
model_config = ConfigDict(
|
|
928
|
+
extra="forbid",
|
|
929
|
+
)
|
|
930
|
+
id: Annotated[int, Field(ge=1)]
|
|
931
|
+
"""
|
|
932
|
+
Notebook database identifier.
|
|
933
|
+
"""
|
|
934
|
+
users: Annotated[
|
|
935
|
+
str,
|
|
936
|
+
Field(
|
|
937
|
+
json_schema_extra={
|
|
938
|
+
"contentMediaType": "application/json",
|
|
939
|
+
"contentSchema": {
|
|
940
|
+
"type": "array",
|
|
941
|
+
"minItems": 1,
|
|
942
|
+
"uniqueItems": True,
|
|
943
|
+
"items": {"type": "integer", "minimum": 1},
|
|
944
|
+
},
|
|
945
|
+
},
|
|
946
|
+
min_length=1,
|
|
947
|
+
),
|
|
948
|
+
]
|
|
949
|
+
"""
|
|
950
|
+
JSON-encoded user-id list. The stable contract requires at least one
|
|
951
|
+
positive unique user even though PHP silently filters zero and duplicate
|
|
952
|
+
values before applying its own self/already-shared filter.
|
|
953
|
+
|
|
954
|
+
"""
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
class Write(IntEnum):
|
|
958
|
+
integer_0 = 0
|
|
959
|
+
integer_1 = 1
|
|
960
|
+
|
|
961
|
+
|
|
962
|
+
class Create(IntEnum):
|
|
963
|
+
integer_0 = 0
|
|
964
|
+
integer_1 = 1
|
|
965
|
+
|
|
966
|
+
|
|
967
|
+
class Delete(IntEnum):
|
|
968
|
+
integer_0 = 0
|
|
969
|
+
integer_1 = 1
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
class Sign(IntEnum):
|
|
973
|
+
integer_0 = 0
|
|
974
|
+
integer_1 = 1
|
|
975
|
+
|
|
976
|
+
|
|
977
|
+
class Subtype(IntEnum):
|
|
978
|
+
integer_0 = 0
|
|
979
|
+
integer_1 = 1
|
|
980
|
+
|
|
981
|
+
|
|
982
|
+
class Log(IntEnum):
|
|
983
|
+
integer_0 = 0
|
|
984
|
+
integer_1 = 1
|
|
985
|
+
|
|
986
|
+
|
|
987
|
+
class User(IntEnum):
|
|
988
|
+
integer_0 = 0
|
|
989
|
+
integer_1 = 1
|
|
990
|
+
|
|
991
|
+
|
|
992
|
+
class UpdateNotebookSharePermissionsRequest(BaseModel):
|
|
993
|
+
model_config = ConfigDict(
|
|
994
|
+
extra="forbid",
|
|
995
|
+
)
|
|
996
|
+
id: Annotated[int, Field(ge=1)]
|
|
997
|
+
"""
|
|
998
|
+
Direct-share row identifier returned by listNotebookShares.
|
|
999
|
+
"""
|
|
1000
|
+
write: Write = 0
|
|
1001
|
+
create: Create = 0
|
|
1002
|
+
delete: Delete = 0
|
|
1003
|
+
sign: Sign = 0
|
|
1004
|
+
subtype: Subtype = 0
|
|
1005
|
+
log: Log = 0
|
|
1006
|
+
user: User = 0
|
|
1007
|
+
|
|
1008
|
+
|
|
1009
|
+
class DeleteNotebookShareRequest(BaseModel):
|
|
1010
|
+
model_config = ConfigDict(
|
|
1011
|
+
extra="forbid",
|
|
1012
|
+
)
|
|
1013
|
+
id: Annotated[int, Field(ge=1)]
|
|
1014
|
+
"""
|
|
1015
|
+
Direct-share row identifier, not a notebook identifier.
|
|
1016
|
+
"""
|
|
1017
|
+
|
|
1018
|
+
|
|
1019
|
+
class PublicRecordListRequest(BaseModel):
|
|
1020
|
+
model_config = ConfigDict(
|
|
1021
|
+
extra="forbid",
|
|
1022
|
+
)
|
|
1023
|
+
eln: Annotated[str, Field(min_length=1)]
|
|
1024
|
+
|
|
1025
|
+
|
|
1026
|
+
class CreateRecordRequest(BaseModel):
|
|
1027
|
+
model_config = ConfigDict(
|
|
1028
|
+
extra="forbid",
|
|
1029
|
+
)
|
|
1030
|
+
eln: Annotated[str, Field(min_length=1)]
|
|
1031
|
+
title: Annotated[str, Field(max_length=100, min_length=1)]
|
|
1032
|
+
describe: Annotated[str | None, Field(max_length=256)] = ""
|
|
1033
|
+
"""
|
|
1034
|
+
Missing or null becomes an empty summary.
|
|
1035
|
+
"""
|
|
1036
|
+
uid: Annotated[str | None, Field(max_length=45)] = ""
|
|
1037
|
+
"""
|
|
1038
|
+
Missing, null, or empty asks the data server to generate a UID.
|
|
1039
|
+
"""
|
|
1040
|
+
user: Annotated[int | None, Field(ge=1)] = None
|
|
1041
|
+
"""
|
|
1042
|
+
Missing or null selects the authenticated user's notebook.
|
|
1043
|
+
"""
|
|
1044
|
+
path: list[str] | None = None
|
|
1045
|
+
"""
|
|
1046
|
+
Missing or null selects the root subtype.
|
|
1047
|
+
"""
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
class ImportRecordItem(BaseModel):
|
|
1051
|
+
model_config = ConfigDict(
|
|
1052
|
+
extra="forbid",
|
|
1053
|
+
)
|
|
1054
|
+
uid: Annotated[str, Field(max_length=45, min_length=1)]
|
|
1055
|
+
title: Annotated[str, Field(max_length=100, min_length=1)]
|
|
1056
|
+
data: dict[str, Any]
|
|
1057
|
+
"""
|
|
1058
|
+
Template-shaped values keyed by canonical module name.
|
|
1059
|
+
"""
|
|
1060
|
+
keyword: str | None = ""
|
|
1061
|
+
"""
|
|
1062
|
+
Missing or null becomes an empty keyword string.
|
|
1063
|
+
"""
|
|
1064
|
+
path: list[str] | None = None
|
|
1065
|
+
|
|
1066
|
+
|
|
1067
|
+
class IdItem(RootModel[int]):
|
|
1068
|
+
root: Annotated[int, Field(ge=1)]
|
|
1069
|
+
|
|
1070
|
+
|
|
1071
|
+
class ImportRecordsResponse(BaseModel):
|
|
1072
|
+
model_config = ConfigDict(
|
|
1073
|
+
extra="allow",
|
|
1074
|
+
)
|
|
1075
|
+
code: Literal[0]
|
|
1076
|
+
msg: str
|
|
1077
|
+
errcode: Literal[0]
|
|
1078
|
+
errmsg: str
|
|
1079
|
+
"""
|
|
1080
|
+
Legacy alias of `msg`; always present in these operations.
|
|
1081
|
+
"""
|
|
1082
|
+
id: list[IdItem]
|
|
1083
|
+
eln_id: Annotated[int, Field(ge=1)]
|
|
1084
|
+
|
|
1085
|
+
|
|
1086
|
+
class NotebookSelector1(RootModel[str]):
|
|
1087
|
+
root: Annotated[str, Field(min_length=1)]
|
|
1088
|
+
|
|
1089
|
+
|
|
1090
|
+
class User1(RootModel[int]):
|
|
1091
|
+
root: Annotated[int, Field(ge=1)]
|
|
1092
|
+
|
|
1093
|
+
|
|
1094
|
+
class User2(RootModel[str]):
|
|
1095
|
+
root: Annotated[str, Field(min_length=1)]
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
class SharedNotebookSelector(BaseModel):
|
|
1099
|
+
model_config = ConfigDict(
|
|
1100
|
+
extra="forbid",
|
|
1101
|
+
)
|
|
1102
|
+
title: Annotated[str, Field(min_length=1)]
|
|
1103
|
+
user: User1 | User2
|
|
1104
|
+
|
|
1105
|
+
|
|
1106
|
+
class ExportRecordItem(BaseModel):
|
|
1107
|
+
model_config = ConfigDict(
|
|
1108
|
+
extra="allow",
|
|
1109
|
+
)
|
|
1110
|
+
eln_name: Annotated[str | None, Field(...)]
|
|
1111
|
+
id: Annotated[int, Field(ge=1)]
|
|
1112
|
+
title: str
|
|
1113
|
+
comm: Annotated[str | None, Field(...)]
|
|
1114
|
+
uid: str
|
|
1115
|
+
data: list[Any]
|
|
1116
|
+
|
|
1117
|
+
|
|
1118
|
+
class Path(RootModel[int]):
|
|
1119
|
+
root: Annotated[int, Field(ge=0)]
|
|
1120
|
+
|
|
1121
|
+
|
|
1122
|
+
class SearchExtractionRequest(BaseModel):
|
|
1123
|
+
model_config = ConfigDict(
|
|
1124
|
+
extra="forbid",
|
|
1125
|
+
)
|
|
1126
|
+
uid: Annotated[str, Field(min_length=1)]
|
|
1127
|
+
path: Annotated[list[str | Path], Field(max_length=4, min_length=1)]
|
|
1128
|
+
|
|
1129
|
+
|
|
1130
|
+
class SearchRecordItem(BaseModel):
|
|
1131
|
+
model_config = ConfigDict(
|
|
1132
|
+
extra="allow",
|
|
1133
|
+
)
|
|
1134
|
+
id: Annotated[int, Field(ge=1)]
|
|
1135
|
+
eln_id: Annotated[int, Field(ge=1)]
|
|
1136
|
+
uid: str
|
|
1137
|
+
title: str
|
|
1138
|
+
eln_name: str
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
class QuoteRequest(BaseModel):
|
|
1142
|
+
model_config = ConfigDict(
|
|
1143
|
+
extra="forbid",
|
|
1144
|
+
)
|
|
1145
|
+
uid: Annotated[str, Field(min_length=1)]
|
|
1146
|
+
name: Annotated[str, Field(min_length=1)]
|
|
1147
|
+
path: Annotated[list[str | int], Field(max_length=4, min_length=1)]
|
|
1148
|
+
|
|
1149
|
+
|
|
1150
|
+
class User3(RootModel[int]):
|
|
1151
|
+
root: Annotated[int, Field(ge=1)] = None
|
|
1152
|
+
|
|
1153
|
+
|
|
1154
|
+
class User4(RootModel[str]):
|
|
1155
|
+
root: Annotated[str, Field(min_length=1)] = None
|
|
1156
|
+
|
|
1157
|
+
|
|
1158
|
+
class ModifyItem(BaseModel):
|
|
1159
|
+
model_config = ConfigDict(
|
|
1160
|
+
extra="allow",
|
|
1161
|
+
)
|
|
1162
|
+
path: Annotated[list[str | int], Field(min_length=1)]
|
|
1163
|
+
data: Any
|
|
1164
|
+
|
|
1165
|
+
|
|
1166
|
+
class PathOperation(BaseModel):
|
|
1167
|
+
model_config = ConfigDict(
|
|
1168
|
+
extra="allow",
|
|
1169
|
+
)
|
|
1170
|
+
path: Annotated[list[str | int], Field(min_length=1)]
|
|
1171
|
+
|
|
1172
|
+
|
|
1173
|
+
class DeleteModuleOperation(BaseModel):
|
|
1174
|
+
model_config = ConfigDict(
|
|
1175
|
+
extra="forbid",
|
|
1176
|
+
)
|
|
1177
|
+
name: Annotated[str, Field(min_length=1)]
|
|
1178
|
+
|
|
1179
|
+
|
|
1180
|
+
class Type(StrEnum):
|
|
1181
|
+
form = "form"
|
|
1182
|
+
table = "table"
|
|
1183
|
+
files = "files"
|
|
1184
|
+
richtext = "richtext"
|
|
1185
|
+
code = "code"
|
|
1186
|
+
|
|
1187
|
+
|
|
1188
|
+
class LanguageEnum(Enum):
|
|
1189
|
+
json = "json"
|
|
1190
|
+
python = "python"
|
|
1191
|
+
javascript = "javascript"
|
|
1192
|
+
html = "html"
|
|
1193
|
+
css = "css"
|
|
1194
|
+
xml = "xml"
|
|
1195
|
+
php = "php"
|
|
1196
|
+
java = "java"
|
|
1197
|
+
cpp = "cpp"
|
|
1198
|
+
sql = "sql"
|
|
1199
|
+
latex = "latex"
|
|
1200
|
+
other = "other"
|
|
1201
|
+
|
|
1202
|
+
|
|
1203
|
+
class Language(RootModel[LanguageEnum | None]):
|
|
1204
|
+
root: LanguageEnum | None = None
|
|
1205
|
+
|
|
1206
|
+
|
|
1207
|
+
class StyleEnum(Enum):
|
|
1208
|
+
ternary = "ternary"
|
|
1209
|
+
echarts = "echarts"
|
|
1210
|
+
|
|
1211
|
+
|
|
1212
|
+
class Style(RootModel[StyleEnum | None]):
|
|
1213
|
+
root: StyleEnum | None = None
|
|
1214
|
+
|
|
1215
|
+
|
|
1216
|
+
class AddModuleOperation(BaseModel):
|
|
1217
|
+
model_config = ConfigDict(
|
|
1218
|
+
extra="forbid",
|
|
1219
|
+
)
|
|
1220
|
+
name: Annotated[str, Field(min_length=1)]
|
|
1221
|
+
type: Type
|
|
1222
|
+
data: str | None = None
|
|
1223
|
+
"""
|
|
1224
|
+
Accepted only as initial content for richtext and code modules.
|
|
1225
|
+
"""
|
|
1226
|
+
language: Language | None = None
|
|
1227
|
+
style: Style | None = None
|
|
1228
|
+
|
|
1229
|
+
|
|
1230
|
+
class Module(RootModel[str]):
|
|
1231
|
+
root: Annotated[str, Field(min_length=1)]
|
|
1232
|
+
|
|
1233
|
+
|
|
1234
|
+
class Type1Enum(Enum):
|
|
1235
|
+
text = "text"
|
|
1236
|
+
richtext = "richtext"
|
|
1237
|
+
multiline = "multiline"
|
|
1238
|
+
number = "number"
|
|
1239
|
+
date = "date"
|
|
1240
|
+
time = "time"
|
|
1241
|
+
file = "file"
|
|
1242
|
+
bool = "bool"
|
|
1243
|
+
|
|
1244
|
+
|
|
1245
|
+
class Type1(RootModel[Type1Enum | None]):
|
|
1246
|
+
root: Type1Enum | None = None
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
class RowEnum(Enum):
|
|
1250
|
+
int_0 = 0
|
|
1251
|
+
int__1 = -1
|
|
1252
|
+
|
|
1253
|
+
|
|
1254
|
+
class Row(RootModel[RowEnum | None]):
|
|
1255
|
+
root: RowEnum | None = None
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
class AddValueOperation(BaseModel):
|
|
1259
|
+
model_config = ConfigDict(
|
|
1260
|
+
extra="forbid",
|
|
1261
|
+
)
|
|
1262
|
+
module: Module | int
|
|
1263
|
+
name: Annotated[str | None, Field(min_length=1)] = None
|
|
1264
|
+
type: Type1 | None = None
|
|
1265
|
+
row: Row | None = None
|
|
1266
|
+
data: dict[str, Any] | list[Any] | str | float | bool | None = None
|
|
1267
|
+
"""
|
|
1268
|
+
Runtime requirements depend on the target module type.
|
|
1269
|
+
"""
|
|
1270
|
+
path: list[str] | None = None
|
|
1271
|
+
|
|
1272
|
+
|
|
1273
|
+
class Uid1(RootModel[str]):
|
|
1274
|
+
root: Annotated[str, Field(min_length=1)]
|
|
1275
|
+
|
|
1276
|
+
|
|
1277
|
+
class DeleteRecordsRequest(BaseModel):
|
|
1278
|
+
model_config = ConfigDict(
|
|
1279
|
+
extra="forbid",
|
|
1280
|
+
)
|
|
1281
|
+
eln: Annotated[str, Field(min_length=1)]
|
|
1282
|
+
uids: Annotated[list[Uid1], Field(min_length=1)]
|
|
1283
|
+
user: Annotated[int | None, Field(ge=1)] = None
|
|
1284
|
+
|
|
1285
|
+
|
|
1286
|
+
class PublicRecordItem(BaseModel):
|
|
1287
|
+
model_config = ConfigDict(
|
|
1288
|
+
extra="allow",
|
|
1289
|
+
)
|
|
1290
|
+
id: Annotated[int, Field(ge=1)]
|
|
1291
|
+
item_id: Annotated[int, Field(ge=1)]
|
|
1292
|
+
eln_id: Annotated[int, Field(ge=1)]
|
|
1293
|
+
uid: Annotated[str | None, Field(...)]
|
|
1294
|
+
title: Annotated[str | None, Field(...)]
|
|
1295
|
+
comm: Annotated[str | None, Field(...)]
|
|
1296
|
+
locked: bool
|
|
1297
|
+
eln_name: Annotated[str | None, Field(...)]
|
|
1298
|
+
userid: Annotated[int | None, Field(...)]
|
|
1299
|
+
username: Annotated[str | None, Field(...)]
|
|
1300
|
+
email: Annotated[str | None, Field(...)]
|
|
1301
|
+
owner: bool
|
|
1302
|
+
|
|
1303
|
+
|
|
1304
|
+
class Id(RootModel[int]):
|
|
1305
|
+
root: Annotated[int, Field(ge=1)]
|
|
1306
|
+
|
|
1307
|
+
|
|
1308
|
+
class Display1(IntEnum):
|
|
1309
|
+
integer_0 = 0
|
|
1310
|
+
integer_1 = 1
|
|
1311
|
+
|
|
1312
|
+
|
|
1313
|
+
class OrderDesc(IntEnum):
|
|
1314
|
+
integer_0 = 0
|
|
1315
|
+
integer_1 = 1
|
|
1316
|
+
|
|
1317
|
+
|
|
1318
|
+
class RecordPageNotebook(BaseModel):
|
|
1319
|
+
model_config = ConfigDict(
|
|
1320
|
+
extra="allow",
|
|
1321
|
+
)
|
|
1322
|
+
id: Annotated[int, Field(ge=1)]
|
|
1323
|
+
group_id: Annotated[int, Field(ge=0)]
|
|
1324
|
+
username: Annotated[str | None, Field(...)]
|
|
1325
|
+
template_id: Annotated[int | None, Field(...)]
|
|
1326
|
+
eln_text: Annotated[str | None, Field(...)]
|
|
1327
|
+
editable: bool
|
|
1328
|
+
create: bool
|
|
1329
|
+
delete: bool
|
|
1330
|
+
owner: bool
|
|
1331
|
+
subtype: bool
|
|
1332
|
+
readlog: bool
|
|
1333
|
+
user: bool
|
|
1334
|
+
server: str
|
|
1335
|
+
sign: bool
|
|
1336
|
+
power: Annotated[int, Field(ge=0)]
|
|
1337
|
+
display: Display1
|
|
1338
|
+
page_size: Annotated[int, Field(ge=1, le=255)]
|
|
1339
|
+
order_by: Annotated[int, Field(ge=0)]
|
|
1340
|
+
order_desc: OrderDesc
|
|
1341
|
+
requests: list[Any]
|
|
1342
|
+
|
|
1343
|
+
|
|
1344
|
+
class Editable(IntEnum):
|
|
1345
|
+
integer_0 = 0
|
|
1346
|
+
integer_1 = 1
|
|
1347
|
+
|
|
1348
|
+
|
|
1349
|
+
class PublicAssociation(BaseModel):
|
|
1350
|
+
model_config = ConfigDict(
|
|
1351
|
+
extra="allow",
|
|
1352
|
+
)
|
|
1353
|
+
id: Annotated[int, Field(ge=1)]
|
|
1354
|
+
title: Annotated[str | None, Field(...)]
|
|
1355
|
+
item_id: Annotated[int, Field(ge=1)]
|
|
1356
|
+
editable: Editable
|
|
1357
|
+
|
|
1358
|
+
|
|
1359
|
+
class ResourceAssociation(BaseModel):
|
|
1360
|
+
model_config = ConfigDict(
|
|
1361
|
+
extra="allow",
|
|
1362
|
+
)
|
|
1363
|
+
title: Annotated[str | None, Field(...)]
|
|
1364
|
+
item_id: Annotated[int, Field(ge=1)]
|
|
1365
|
+
|
|
1366
|
+
|
|
1367
|
+
class RecordShareLink(BaseModel):
|
|
1368
|
+
model_config = ConfigDict(
|
|
1369
|
+
extra="allow",
|
|
1370
|
+
)
|
|
1371
|
+
id: Annotated[int, Field(ge=1)]
|
|
1372
|
+
item_id: Annotated[int, Field(ge=1)]
|
|
1373
|
+
token: Annotated[str | None, Field(...)]
|
|
1374
|
+
expired: Annotated[int, Field(ge=0)]
|
|
1375
|
+
|
|
1376
|
+
|
|
1377
|
+
class DeletedRecordItem(BaseModel):
|
|
1378
|
+
model_config = ConfigDict(
|
|
1379
|
+
extra="allow",
|
|
1380
|
+
)
|
|
1381
|
+
id: Annotated[int, Field(ge=1)]
|
|
1382
|
+
datetime_create: str
|
|
1383
|
+
datetime_modify: str
|
|
1384
|
+
deleted_dtime: Annotated[str | None, Field(...)]
|
|
1385
|
+
title: str
|
|
1386
|
+
comm: Annotated[str | None, Field(...)]
|
|
1387
|
+
sn: str
|
|
1388
|
+
|
|
1389
|
+
|
|
1390
|
+
class DeletedRecordNotebook(BaseModel):
|
|
1391
|
+
model_config = ConfigDict(
|
|
1392
|
+
extra="allow",
|
|
1393
|
+
)
|
|
1394
|
+
id: Annotated[int, Field(ge=1)]
|
|
1395
|
+
group_id: Annotated[int, Field(ge=0)]
|
|
1396
|
+
username: Annotated[str | None, Field(...)]
|
|
1397
|
+
eln_text: Annotated[str | None, Field(...)]
|
|
1398
|
+
server: str
|
|
1399
|
+
|
|
1400
|
+
|
|
1401
|
+
class RestoreRecordsRequest(BaseModel):
|
|
1402
|
+
model_config = ConfigDict(
|
|
1403
|
+
extra="forbid",
|
|
1404
|
+
)
|
|
1405
|
+
eln: Annotated[int, Field(ge=1)]
|
|
1406
|
+
ids: Annotated[
|
|
1407
|
+
str,
|
|
1408
|
+
Field(
|
|
1409
|
+
json_schema_extra={
|
|
1410
|
+
"contentMediaType": "application/json",
|
|
1411
|
+
"contentSchema": {
|
|
1412
|
+
"type": "array",
|
|
1413
|
+
"minItems": 1,
|
|
1414
|
+
"items": {"type": "integer", "minimum": 1},
|
|
1415
|
+
},
|
|
1416
|
+
}
|
|
1417
|
+
),
|
|
1418
|
+
]
|
|
1419
|
+
"""
|
|
1420
|
+
JSON-encoded list of deleted record ids.
|
|
1421
|
+
"""
|
|
1422
|
+
|
|
1423
|
+
|
|
1424
|
+
class CopyRecordRequest(BaseModel):
|
|
1425
|
+
model_config = ConfigDict(
|
|
1426
|
+
extra="forbid",
|
|
1427
|
+
)
|
|
1428
|
+
eln: Annotated[int, Field(ge=1)]
|
|
1429
|
+
eln_to: Annotated[int | None, Field(ge=0)] = 0
|
|
1430
|
+
"""
|
|
1431
|
+
Missing, null, or zero copies into the source notebook.
|
|
1432
|
+
"""
|
|
1433
|
+
id: Annotated[int, Field(ge=1)]
|
|
1434
|
+
uid: Annotated[str | None, Field(max_length=45)] = ""
|
|
1435
|
+
"""
|
|
1436
|
+
Missing, null, or empty asks PHP to generate a unique UID.
|
|
1437
|
+
"""
|
|
1438
|
+
title: Annotated[str, Field(max_length=100, min_length=1)]
|
|
1439
|
+
|
|
1440
|
+
|
|
1441
|
+
class CopyRecordResponse(BaseModel):
|
|
1442
|
+
model_config = ConfigDict(
|
|
1443
|
+
extra="allow",
|
|
1444
|
+
)
|
|
1445
|
+
code: Code
|
|
1446
|
+
msg: str
|
|
1447
|
+
errcode: Errcode
|
|
1448
|
+
errmsg: str
|
|
1449
|
+
"""
|
|
1450
|
+
Legacy alias of `msg`; always present in these operations.
|
|
1451
|
+
"""
|
|
1452
|
+
id: Annotated[int, Field(ge=1)]
|
|
1453
|
+
|
|
1454
|
+
|
|
1455
|
+
class AddRelationRequest(BaseModel):
|
|
1456
|
+
model_config = ConfigDict(
|
|
1457
|
+
extra="forbid",
|
|
1458
|
+
)
|
|
1459
|
+
eln_id: Annotated[int, Field(ge=1)]
|
|
1460
|
+
item_id: Annotated[int, Field(ge=1)]
|
|
1461
|
+
related_eln: Annotated[int, Field(ge=1)]
|
|
1462
|
+
related_id: Annotated[int, Field(ge=1)]
|
|
1463
|
+
|
|
1464
|
+
|
|
1465
|
+
class DeleteRelationRequest(BaseModel):
|
|
1466
|
+
model_config = ConfigDict(
|
|
1467
|
+
extra="forbid",
|
|
1468
|
+
)
|
|
1469
|
+
eln: Annotated[int, Field(ge=1)]
|
|
1470
|
+
item_id: Annotated[int, Field(ge=1)]
|
|
1471
|
+
related_id: Annotated[int, Field(ge=1)]
|
|
1472
|
+
|
|
1473
|
+
|
|
1474
|
+
class SaveRecordCommentRequest(BaseModel):
|
|
1475
|
+
model_config = ConfigDict(
|
|
1476
|
+
extra="forbid",
|
|
1477
|
+
)
|
|
1478
|
+
id: Annotated[int, Field(ge=0)] = 0
|
|
1479
|
+
"""
|
|
1480
|
+
Missing or zero creates; a positive comment id attempts an owner-only edit.
|
|
1481
|
+
"""
|
|
1482
|
+
eln: Annotated[int, Field(ge=1)]
|
|
1483
|
+
"""
|
|
1484
|
+
Notebook database identifier.
|
|
1485
|
+
"""
|
|
1486
|
+
item_id: Annotated[int, Field(ge=1)]
|
|
1487
|
+
"""
|
|
1488
|
+
Record database identifier.
|
|
1489
|
+
"""
|
|
1490
|
+
more: Annotated[
|
|
1491
|
+
str,
|
|
1492
|
+
Field(
|
|
1493
|
+
json_schema_extra={"contentMediaType": "text/html"},
|
|
1494
|
+
max_length=16373,
|
|
1495
|
+
min_length=1,
|
|
1496
|
+
pattern="\\S",
|
|
1497
|
+
),
|
|
1498
|
+
]
|
|
1499
|
+
"""
|
|
1500
|
+
Non-blank rich-text comment content. PHP trims surrounding
|
|
1501
|
+
whitespace and rewrites embedded Matelab attachment URLs before
|
|
1502
|
+
persistence.
|
|
1503
|
+
|
|
1504
|
+
"""
|
|
1505
|
+
uid: Annotated[str, Field(max_length=45)] = ""
|
|
1506
|
+
"""
|
|
1507
|
+
Optional temporary-upload correlation key. Missing or explicit
|
|
1508
|
+
empty form content has the same no-new-attachment meaning.
|
|
1509
|
+
|
|
1510
|
+
"""
|
|
1511
|
+
|
|
1512
|
+
|
|
1513
|
+
class UploadRecordCommentAttachmentRequest(BaseModel):
|
|
1514
|
+
model_config = ConfigDict(
|
|
1515
|
+
extra="forbid",
|
|
1516
|
+
)
|
|
1517
|
+
uid: Annotated[str, Field(max_length=45, min_length=1)]
|
|
1518
|
+
"""
|
|
1519
|
+
Caller-generated correlation key. Reuse this exact value when saving
|
|
1520
|
+
the comment; use an unguessable value unique to this binding attempt.
|
|
1521
|
+
|
|
1522
|
+
"""
|
|
1523
|
+
eln: Annotated[int, Field(ge=1)]
|
|
1524
|
+
"""
|
|
1525
|
+
Notebook database identifier.
|
|
1526
|
+
"""
|
|
1527
|
+
i: Annotated[int, Field(ge=1)]
|
|
1528
|
+
"""
|
|
1529
|
+
Record database identifier; this is not a comment id.
|
|
1530
|
+
"""
|
|
1531
|
+
upload: bytes
|
|
1532
|
+
"""
|
|
1533
|
+
Complete attachment bytes in the Provider's literal multipart field name.
|
|
1534
|
+
"""
|
|
1535
|
+
|
|
1536
|
+
|
|
1537
|
+
class UploadRecordCommentAttachmentResponse(BaseModel):
|
|
1538
|
+
model_config = ConfigDict(
|
|
1539
|
+
extra="allow",
|
|
1540
|
+
)
|
|
1541
|
+
code: Literal[0]
|
|
1542
|
+
msg: str
|
|
1543
|
+
errcode: Literal[0]
|
|
1544
|
+
errmsg: str
|
|
1545
|
+
"""
|
|
1546
|
+
Legacy alias of `msg`; always present in these operations.
|
|
1547
|
+
"""
|
|
1548
|
+
filename: Annotated[str, Field(max_length=1000, min_length=1)]
|
|
1549
|
+
"""
|
|
1550
|
+
Original multipart filename.
|
|
1551
|
+
"""
|
|
1552
|
+
path: Literal["eln_url/eln_temp"]
|
|
1553
|
+
query: Annotated[str, Field(min_length=1)]
|
|
1554
|
+
"""
|
|
1555
|
+
URL-encoded temporary reference containing `eln`, temporary row
|
|
1556
|
+
`id`, SHA-256 `h`, byte size `s`, and original filename `f`.
|
|
1557
|
+
|
|
1558
|
+
"""
|
|
1559
|
+
|
|
1560
|
+
|
|
1561
|
+
class DeleteRecordCommentRequest(BaseModel):
|
|
1562
|
+
model_config = ConfigDict(
|
|
1563
|
+
extra="forbid",
|
|
1564
|
+
)
|
|
1565
|
+
eln: Annotated[int, Field(ge=1)]
|
|
1566
|
+
"""
|
|
1567
|
+
Notebook database identifier.
|
|
1568
|
+
"""
|
|
1569
|
+
item_id: Annotated[int, Field(ge=1)]
|
|
1570
|
+
"""
|
|
1571
|
+
Record database identifier.
|
|
1572
|
+
"""
|
|
1573
|
+
id: Annotated[int, Field(ge=1)]
|
|
1574
|
+
"""
|
|
1575
|
+
Comment identifier returned by listRecordComments.
|
|
1576
|
+
"""
|
|
1577
|
+
|
|
1578
|
+
|
|
1579
|
+
class RelatedRecordItem(BaseModel):
|
|
1580
|
+
model_config = ConfigDict(
|
|
1581
|
+
extra="allow",
|
|
1582
|
+
)
|
|
1583
|
+
id: Annotated[int, Field(ge=1)]
|
|
1584
|
+
related_eln: Annotated[int | None, Field(...)]
|
|
1585
|
+
related_id: Annotated[int, Field(ge=1)]
|
|
1586
|
+
eln_id: Annotated[int | None, Field(...)]
|
|
1587
|
+
title: Annotated[str | None, Field(...)]
|
|
1588
|
+
comm: Annotated[str | None, Field(...)]
|
|
1589
|
+
uid: Annotated[str | None, Field(...)]
|
|
1590
|
+
eln: str | None = None
|
|
1591
|
+
"""
|
|
1592
|
+
Conditional; appended only for a current-user notebook on the same server.
|
|
1593
|
+
"""
|
|
1594
|
+
|
|
1595
|
+
|
|
1596
|
+
class RecordComment(BaseModel):
|
|
1597
|
+
model_config = ConfigDict(
|
|
1598
|
+
extra="allow",
|
|
1599
|
+
)
|
|
1600
|
+
id: Annotated[int, Field(ge=1)]
|
|
1601
|
+
"""
|
|
1602
|
+
Comment database identifier.
|
|
1603
|
+
"""
|
|
1604
|
+
datetime: str
|
|
1605
|
+
"""
|
|
1606
|
+
Provider-local creation time, or last edit time after an owner edit.
|
|
1607
|
+
"""
|
|
1608
|
+
data: str
|
|
1609
|
+
"""
|
|
1610
|
+
Stored rich-text content; embedded attachment links may use the internal elnurl scheme.
|
|
1611
|
+
"""
|
|
1612
|
+
username: Annotated[str | None, Field(...)]
|
|
1613
|
+
"""
|
|
1614
|
+
Required nullable user display name resolved by the front Provider.
|
|
1615
|
+
"""
|
|
1616
|
+
owner: bool
|
|
1617
|
+
"""
|
|
1618
|
+
Whether the authenticated caller created this comment.
|
|
1619
|
+
"""
|
|
1620
|
+
|
|
1621
|
+
|
|
1622
|
+
class NotebookShare(BaseModel):
|
|
1623
|
+
model_config = ConfigDict(
|
|
1624
|
+
extra="allow",
|
|
1625
|
+
)
|
|
1626
|
+
id: Annotated[int, Field(ge=1)]
|
|
1627
|
+
"""
|
|
1628
|
+
Direct-share row identifier.
|
|
1629
|
+
"""
|
|
1630
|
+
power: Annotated[int, Field(ge=0, le=510)]
|
|
1631
|
+
"""
|
|
1632
|
+
Stored mask. A newly added row is 0 despite implicit read access;
|
|
1633
|
+
after permission editing PHP includes READ (4) plus selected flags.
|
|
1634
|
+
|
|
1635
|
+
"""
|
|
1636
|
+
username: Annotated[str | None, Field(...)]
|
|
1637
|
+
"""
|
|
1638
|
+
Required nullable because login_user is LEFT JOINed.
|
|
1639
|
+
"""
|
|
1640
|
+
email: Annotated[str | None, Field(...)]
|
|
1641
|
+
"""
|
|
1642
|
+
Required nullable because login_user is LEFT JOINed and the profile column may be null.
|
|
1643
|
+
"""
|
|
1644
|
+
userid: Annotated[int, Field(ge=1)]
|
|
1645
|
+
self: bool
|
|
1646
|
+
"""
|
|
1647
|
+
Whether this share row belongs to the authenticated caller.
|
|
1648
|
+
"""
|
|
1649
|
+
|
|
1650
|
+
|
|
1651
|
+
class DeferredUserField(BaseModel):
|
|
1652
|
+
model_config = ConfigDict(
|
|
1653
|
+
extra="forbid",
|
|
1654
|
+
)
|
|
1655
|
+
userid: Annotated[int, Field(ge=1)]
|
|
1656
|
+
field: Literal["idphoto"]
|
|
1657
|
+
|
|
1658
|
+
|
|
1659
|
+
class PublicNotebook(BaseModel):
|
|
1660
|
+
model_config = ConfigDict(
|
|
1661
|
+
extra="allow",
|
|
1662
|
+
)
|
|
1663
|
+
id: Annotated[int, Field(ge=1)]
|
|
1664
|
+
showtext: str
|
|
1665
|
+
comm: str
|
|
1666
|
+
"""
|
|
1667
|
+
PHP normalizes a database null to an empty string.
|
|
1668
|
+
"""
|
|
1669
|
+
num: Annotated[int, Field(ge=0)]
|
|
1670
|
+
datetime_create: str
|
|
1671
|
+
userid: Annotated[int, Field(ge=0)]
|
|
1672
|
+
owner: bool
|
|
1673
|
+
|
|
1674
|
+
|
|
1675
|
+
class ListRecordsRequest(BaseModel):
|
|
1676
|
+
model_config = ConfigDict(
|
|
1677
|
+
extra="forbid",
|
|
1678
|
+
)
|
|
1679
|
+
eln: Annotated[str, Field(min_length=1)]
|
|
1680
|
+
"""
|
|
1681
|
+
Exact `showtext` from an owned or shared notebook.
|
|
1682
|
+
"""
|
|
1683
|
+
user: Annotated[int | None, Field(ge=1)] = None
|
|
1684
|
+
"""
|
|
1685
|
+
Owner userid for a shared notebook; omitted for an owned notebook.
|
|
1686
|
+
"""
|
|
1687
|
+
date_start: str | None = ""
|
|
1688
|
+
"""
|
|
1689
|
+
Raw lower datetime bound compared by the Provider.
|
|
1690
|
+
"""
|
|
1691
|
+
date_end: str | None = ""
|
|
1692
|
+
"""
|
|
1693
|
+
Raw upper datetime bound; the current consumer appends 23:59:59 for a date.
|
|
1694
|
+
"""
|
|
1695
|
+
keywords: list[str] | None = []
|
|
1696
|
+
content: str | None = ""
|
|
1697
|
+
"""
|
|
1698
|
+
Free-text search value used by JSON_SEARCH.
|
|
1699
|
+
"""
|
|
1700
|
+
|
|
1701
|
+
|
|
1702
|
+
class Encrypt(IntEnum):
|
|
1703
|
+
integer_0 = 0
|
|
1704
|
+
integer_1 = 1
|
|
1705
|
+
|
|
1706
|
+
|
|
1707
|
+
class RecordListItem(BaseModel):
|
|
1708
|
+
model_config = ConfigDict(
|
|
1709
|
+
extra="allow",
|
|
1710
|
+
)
|
|
1711
|
+
id: Annotated[int, Field(ge=1)]
|
|
1712
|
+
datetime_create: str
|
|
1713
|
+
"""
|
|
1714
|
+
Provider-formatted `Y-m-d H:i`.
|
|
1715
|
+
"""
|
|
1716
|
+
datetime_modify: str
|
|
1717
|
+
"""
|
|
1718
|
+
Provider-formatted `Y-m-d H:i`.
|
|
1719
|
+
"""
|
|
1720
|
+
title: str
|
|
1721
|
+
comm: Annotated[str | None, Field(...)]
|
|
1722
|
+
sn: str
|
|
1723
|
+
keywords: list[str]
|
|
1724
|
+
template_id: Annotated[int | None, Field(...)]
|
|
1725
|
+
subtype: Annotated[int | None, Field(...)]
|
|
1726
|
+
encrypt: Encrypt
|
|
1727
|
+
log: Annotated[int | None, Field(ge=1)]
|
|
1728
|
+
"""
|
|
1729
|
+
Caller-specific audit row count, or null when no matching row exists.
|
|
1730
|
+
"""
|
|
1731
|
+
config: list[Any]
|
|
1732
|
+
"""
|
|
1733
|
+
Currently normalized to an empty array by the Provider list constructor.
|
|
1734
|
+
"""
|
|
1735
|
+
|
|
1736
|
+
|
|
1737
|
+
class RecordSubtype(BaseModel):
|
|
1738
|
+
model_config = ConfigDict(
|
|
1739
|
+
extra="allow",
|
|
1740
|
+
)
|
|
1741
|
+
id: Annotated[int, Field(ge=1)]
|
|
1742
|
+
showtext: str
|
|
1743
|
+
parent: Annotated[int, Field(ge=0)]
|
|
1744
|
+
items_num: Annotated[int | None, Field(ge=0)]
|
|
1745
|
+
subtype_num: Annotated[int | None, Field(ge=0)]
|
|
1746
|
+
|
|
1747
|
+
|
|
1748
|
+
class Locked(IntEnum):
|
|
1749
|
+
integer_0 = 0
|
|
1750
|
+
integer_1 = 1
|
|
1751
|
+
|
|
1752
|
+
|
|
1753
|
+
class RecordVersion(BaseModel):
|
|
1754
|
+
model_config = ConfigDict(
|
|
1755
|
+
extra="allow",
|
|
1756
|
+
)
|
|
1757
|
+
id: Annotated[int, Field(ge=1)]
|
|
1758
|
+
"""
|
|
1759
|
+
`eln_items_version.id`, suitable for the `item_view` version query parameter.
|
|
1760
|
+
"""
|
|
1761
|
+
datetime_locked: Annotated[int, Field(ge=0)]
|
|
1762
|
+
datetime_modify: Annotated[int, Field(ge=0)]
|
|
1763
|
+
locked: Locked
|
|
1764
|
+
"""
|
|
1765
|
+
Raw tinyint; PHP does not cast this nested field to boolean.
|
|
1766
|
+
"""
|
|
1767
|
+
userid: Annotated[int, Field(ge=1)]
|
|
1768
|
+
username: Annotated[str | None, Field(...)]
|
|
1769
|
+
|
|
1770
|
+
|
|
1771
|
+
class RecordSignature(BaseModel):
|
|
1772
|
+
model_config = ConfigDict(
|
|
1773
|
+
extra="allow",
|
|
1774
|
+
)
|
|
1775
|
+
userid: Annotated[int, Field(ge=1)]
|
|
1776
|
+
username: Annotated[str | None, Field(...)]
|
|
1777
|
+
photo_sign: Annotated[str | None, Field(...)]
|
|
1778
|
+
datetime_sign: Annotated[str | None, Field(...)]
|
|
1779
|
+
timestamp_result: str
|
|
1780
|
+
user_result: str
|
|
1781
|
+
|
|
1782
|
+
|
|
1783
|
+
class LiteratureLibrary(BaseModel):
|
|
1784
|
+
model_config = ConfigDict(
|
|
1785
|
+
extra="allow",
|
|
1786
|
+
)
|
|
1787
|
+
id: Annotated[int | None, Field(ge=0)]
|
|
1788
|
+
"""
|
|
1789
|
+
Null only for a dangling membership whose LEFT JOIN target no longer exists.
|
|
1790
|
+
"""
|
|
1791
|
+
showtext: Annotated[str | None, Field(...)]
|
|
1792
|
+
"""
|
|
1793
|
+
Null only for a dangling membership whose LEFT JOIN target no longer exists.
|
|
1794
|
+
"""
|
|
1795
|
+
power: Annotated[int, Field(ge=0)]
|
|
1796
|
+
"""
|
|
1797
|
+
Provider permission bitmask; the synthetic private library uses 91.
|
|
1798
|
+
"""
|
|
1799
|
+
num: Annotated[int, Field(ge=0)]
|
|
1800
|
+
keywords: list[str]
|
|
1801
|
+
"""
|
|
1802
|
+
Invalid or null stored JSON is normalized to an empty array.
|
|
1803
|
+
"""
|
|
1804
|
+
intro: Annotated[str | None, Field(...)]
|
|
1805
|
+
|
|
1806
|
+
|
|
1807
|
+
class IncomingLiteratureShare(BaseModel):
|
|
1808
|
+
model_config = ConfigDict(
|
|
1809
|
+
extra="allow",
|
|
1810
|
+
)
|
|
1811
|
+
id: Annotated[int, Field(ge=1)]
|
|
1812
|
+
title: Annotated[str | None, Field(...)]
|
|
1813
|
+
"""
|
|
1814
|
+
JSON extraction returns null when content or title is absent.
|
|
1815
|
+
"""
|
|
1816
|
+
username: str
|
|
1817
|
+
"""
|
|
1818
|
+
Snapshot of the sender name stored in `recommend_fav.user_from`.
|
|
1819
|
+
"""
|
|
1820
|
+
intro: Annotated[str | None, Field(...)]
|
|
1821
|
+
keywords: list[str]
|
|
1822
|
+
"""
|
|
1823
|
+
Invalid or null stored JSON is normalized to an empty array.
|
|
1824
|
+
"""
|
|
1825
|
+
|
|
1826
|
+
|
|
1827
|
+
class LiteratureShareComment(BaseModel):
|
|
1828
|
+
model_config = ConfigDict(
|
|
1829
|
+
extra="allow",
|
|
1830
|
+
)
|
|
1831
|
+
id: Annotated[int, Field(ge=1)]
|
|
1832
|
+
fav_id: Annotated[int, Field(ge=1)]
|
|
1833
|
+
content: str
|
|
1834
|
+
|
|
1835
|
+
|
|
1836
|
+
class Source(IntEnum):
|
|
1837
|
+
integer_1 = 1
|
|
1838
|
+
integer_2 = 2
|
|
1839
|
+
integer_3 = 3
|
|
1840
|
+
|
|
1841
|
+
|
|
1842
|
+
class LiteratureListItem(BaseModel):
|
|
1843
|
+
model_config = ConfigDict(
|
|
1844
|
+
extra="allow",
|
|
1845
|
+
)
|
|
1846
|
+
id: Annotated[int, Field(ge=1)]
|
|
1847
|
+
star: Annotated[int, Field(ge=0, le=5)]
|
|
1848
|
+
source: Source
|
|
1849
|
+
"""
|
|
1850
|
+
One for subscribed, two for user-created, and three for shared.
|
|
1851
|
+
"""
|
|
1852
|
+
hash: str
|
|
1853
|
+
"""
|
|
1854
|
+
Empty when no PDF is attached.
|
|
1855
|
+
"""
|
|
1856
|
+
filename: str
|
|
1857
|
+
"""
|
|
1858
|
+
Empty when no PDF is attached.
|
|
1859
|
+
"""
|
|
1860
|
+
title: str
|
|
1861
|
+
"""
|
|
1862
|
+
Missing or null content title is normalized to an empty string.
|
|
1863
|
+
"""
|
|
1864
|
+
author: str
|
|
1865
|
+
"""
|
|
1866
|
+
Explicit author text, or semicolon-joined `content.authors`.
|
|
1867
|
+
"""
|
|
1868
|
+
info: str
|
|
1869
|
+
"""
|
|
1870
|
+
Provider-generated HTML citation summary.
|
|
1871
|
+
"""
|
|
1872
|
+
abstract: str
|
|
1873
|
+
"""
|
|
1874
|
+
Missing or null abstract is normalized to an empty string.
|
|
1875
|
+
"""
|
|
1876
|
+
journal: str
|
|
1877
|
+
"""
|
|
1878
|
+
Missing or null journal is normalized to an empty string.
|
|
1879
|
+
"""
|
|
1880
|
+
keywords: list[str]
|
|
1881
|
+
"""
|
|
1882
|
+
Invalid or null stored JSON is normalized to an empty array.
|
|
1883
|
+
"""
|
|
1884
|
+
dtime: Annotated[str, Field(pattern="^\\d{4}-\\d{2}-\\d{2}$")]
|
|
1885
|
+
authors_bold: list[str]
|
|
1886
|
+
"""
|
|
1887
|
+
Author fragments matching an active author search; otherwise empty.
|
|
1888
|
+
"""
|
|
1889
|
+
|
|
1890
|
+
|
|
1891
|
+
class Hash(RootModel[str]):
|
|
1892
|
+
root: Annotated[str, Field(max_length=0)] = ""
|
|
1893
|
+
"""
|
|
1894
|
+
Optional complete-file SHA-256 checked only on the final fragment.
|
|
1895
|
+
"""
|
|
1896
|
+
|
|
1897
|
+
|
|
1898
|
+
class Last(IntEnum):
|
|
1899
|
+
integer_0 = 0
|
|
1900
|
+
integer_1 = 1
|
|
1901
|
+
|
|
1902
|
+
|
|
1903
|
+
class Abort(IntEnum):
|
|
1904
|
+
integer_0 = 0
|
|
1905
|
+
integer_1 = 1
|
|
1906
|
+
|
|
1907
|
+
|
|
1908
|
+
class StageTemporaryFileRequest(BaseModel):
|
|
1909
|
+
model_config = ConfigDict(
|
|
1910
|
+
extra="forbid",
|
|
1911
|
+
)
|
|
1912
|
+
uid: Annotated[str, Field(max_length=45, min_length=1)]
|
|
1913
|
+
"""
|
|
1914
|
+
Caller-generated, unguessable per-file binding key. Literature
|
|
1915
|
+
binding later reuses this value; cloud drive binds by the returned
|
|
1916
|
+
temporary row id. Never stage more than one file under one uid.
|
|
1917
|
+
|
|
1918
|
+
"""
|
|
1919
|
+
tempid: Annotated[str, Field(max_length=45)] = ""
|
|
1920
|
+
"""
|
|
1921
|
+
Resumable upload-session key repeated for every fragment. Missing or
|
|
1922
|
+
empty makes PHP generate one and return it on a non-final response;
|
|
1923
|
+
integrations should generate it up front so abort is always possible.
|
|
1924
|
+
|
|
1925
|
+
"""
|
|
1926
|
+
hash: Annotated[Sha256 | Hash, Field(validate_default=True)] = ""
|
|
1927
|
+
"""
|
|
1928
|
+
Optional complete-file SHA-256 checked only on the final fragment.
|
|
1929
|
+
"""
|
|
1930
|
+
last: Last = 0
|
|
1931
|
+
"""
|
|
1932
|
+
One marks the final fragment; missing/null/non-integer input is coerced to zero by PHP.
|
|
1933
|
+
"""
|
|
1934
|
+
abort: Abort = 0
|
|
1935
|
+
"""
|
|
1936
|
+
One cancels and cleans the matching caller-owned upload session.
|
|
1937
|
+
"""
|
|
1938
|
+
file: bytes | None = None
|
|
1939
|
+
"""
|
|
1940
|
+
Required for upload branches and omitted for abort.
|
|
1941
|
+
"""
|
|
1942
|
+
|
|
1943
|
+
|
|
1944
|
+
class StagedTemporaryFileFragmentResponse(BaseModel):
|
|
1945
|
+
model_config = ConfigDict(
|
|
1946
|
+
extra="allow",
|
|
1947
|
+
)
|
|
1948
|
+
code: Literal[0]
|
|
1949
|
+
msg: str
|
|
1950
|
+
errcode: Literal[0]
|
|
1951
|
+
errmsg: str
|
|
1952
|
+
"""
|
|
1953
|
+
Legacy alias of `msg`; always present in these operations.
|
|
1954
|
+
"""
|
|
1955
|
+
hash: Sha256
|
|
1956
|
+
tempid: Annotated[str, Field(max_length=45, min_length=1)]
|
|
1957
|
+
|
|
1958
|
+
|
|
1959
|
+
class StagedTemporaryFileResponse(BaseModel):
|
|
1960
|
+
model_config = ConfigDict(
|
|
1961
|
+
extra="allow",
|
|
1962
|
+
)
|
|
1963
|
+
code: Literal[0]
|
|
1964
|
+
msg: str
|
|
1965
|
+
errcode: Literal[0]
|
|
1966
|
+
errmsg: str
|
|
1967
|
+
"""
|
|
1968
|
+
Legacy alias of `msg`; always present in these operations.
|
|
1969
|
+
"""
|
|
1970
|
+
id: Annotated[int, Field(ge=1)]
|
|
1971
|
+
"""
|
|
1972
|
+
Temporary upload row id. Literature metadata extraction verifies
|
|
1973
|
+
caller ownership; cloud-drive binding is affected by PVD-031.
|
|
1974
|
+
|
|
1975
|
+
"""
|
|
1976
|
+
path: Literal["url_eln/temp"]
|
|
1977
|
+
query: Annotated[str, Field(min_length=1)]
|
|
1978
|
+
"""
|
|
1979
|
+
Provider-built legacy query string for the temporary file.
|
|
1980
|
+
"""
|
|
1981
|
+
name: Annotated[str, Field(max_length=45, min_length=1)]
|
|
1982
|
+
"""
|
|
1983
|
+
The upload-session tempid.
|
|
1984
|
+
"""
|
|
1985
|
+
filename: Annotated[str, Field(min_length=1)]
|
|
1986
|
+
"""
|
|
1987
|
+
Original client filename.
|
|
1988
|
+
"""
|
|
1989
|
+
size: Annotated[int, Field(ge=0)]
|
|
1990
|
+
hash: Sha256
|
|
1991
|
+
|
|
1992
|
+
|
|
1993
|
+
class ExtractLiteratureMetadataRequest1(BaseModel):
|
|
1994
|
+
model_config = ConfigDict(
|
|
1995
|
+
extra="forbid",
|
|
1996
|
+
)
|
|
1997
|
+
id: Annotated[int, Field(ge=1)]
|
|
1998
|
+
"""
|
|
1999
|
+
Caller-owned upload_temp id; zero selects DOI mode.
|
|
2000
|
+
"""
|
|
2001
|
+
doi: Literal[""] = ""
|
|
2002
|
+
"""
|
|
2003
|
+
DOI source; empty selects staged-PDF mode.
|
|
2004
|
+
"""
|
|
2005
|
+
|
|
2006
|
+
|
|
2007
|
+
class ExtractLiteratureMetadataRequest2(BaseModel):
|
|
2008
|
+
model_config = ConfigDict(
|
|
2009
|
+
extra="forbid",
|
|
2010
|
+
)
|
|
2011
|
+
id: Annotated[Literal[0], Field(ge=0)] = 0
|
|
2012
|
+
"""
|
|
2013
|
+
Caller-owned upload_temp id; zero selects DOI mode.
|
|
2014
|
+
"""
|
|
2015
|
+
doi: Annotated[str, Field(min_length=1)]
|
|
2016
|
+
"""
|
|
2017
|
+
DOI source; empty selects staged-PDF mode.
|
|
2018
|
+
"""
|
|
2019
|
+
|
|
2020
|
+
|
|
2021
|
+
class ExtractLiteratureMetadataRequest(
|
|
2022
|
+
RootModel[ExtractLiteratureMetadataRequest1 | ExtractLiteratureMetadataRequest2]
|
|
2023
|
+
):
|
|
2024
|
+
root: ExtractLiteratureMetadataRequest1 | ExtractLiteratureMetadataRequest2
|
|
2025
|
+
|
|
2026
|
+
|
|
2027
|
+
class ExtractedLiteratureAuthor(BaseModel):
|
|
2028
|
+
model_config = ConfigDict(
|
|
2029
|
+
extra="allow",
|
|
2030
|
+
)
|
|
2031
|
+
name: str
|
|
2032
|
+
affiliation: list[str] | None = None
|
|
2033
|
+
email: str | None = None
|
|
2034
|
+
is_corresponding: bool | None = None
|
|
2035
|
+
orcid: str | None = None
|
|
2036
|
+
|
|
2037
|
+
|
|
2038
|
+
class SaveLiteratureItemRequest1(BaseModel):
|
|
2039
|
+
model_config = ConfigDict(
|
|
2040
|
+
extra="forbid",
|
|
2041
|
+
)
|
|
2042
|
+
id: Annotated[Literal[0], Field(ge=0)] = 0
|
|
2043
|
+
"""
|
|
2044
|
+
Missing or zero creates; a positive id selects metadata replacement.
|
|
2045
|
+
"""
|
|
2046
|
+
store_id: Annotated[Literal[0], Field(ge=0)] = 0
|
|
2047
|
+
"""
|
|
2048
|
+
Must be zero for create; ignored and derived from the row for update.
|
|
2049
|
+
"""
|
|
2050
|
+
uid: Annotated[str, Field(max_length=45)] = ""
|
|
2051
|
+
"""
|
|
2052
|
+
In create mode, empty creates metadata only and a non-empty value
|
|
2053
|
+
consumes the one completed file staged under that unguessable uid.
|
|
2054
|
+
Update mode ignores this field. Non-empty create uid binding is
|
|
2055
|
+
affected by PVD-026.
|
|
2056
|
+
|
|
2057
|
+
"""
|
|
2058
|
+
info: Annotated[
|
|
2059
|
+
str,
|
|
2060
|
+
Field(
|
|
2061
|
+
json_schema_extra={
|
|
2062
|
+
"contentMediaType": "application/json",
|
|
2063
|
+
"contentSchema": {"$ref": "#/components/schemas/SaveLiteratureContent"},
|
|
2064
|
+
},
|
|
2065
|
+
min_length=1,
|
|
2066
|
+
),
|
|
2067
|
+
]
|
|
2068
|
+
|
|
2069
|
+
|
|
2070
|
+
class SaveLiteratureItemRequest2(BaseModel):
|
|
2071
|
+
model_config = ConfigDict(
|
|
2072
|
+
extra="forbid",
|
|
2073
|
+
)
|
|
2074
|
+
id: Annotated[int, Field(ge=1)]
|
|
2075
|
+
"""
|
|
2076
|
+
Missing or zero creates; a positive id selects metadata replacement.
|
|
2077
|
+
"""
|
|
2078
|
+
store_id: Annotated[int, Field(ge=0)] = 0
|
|
2079
|
+
"""
|
|
2080
|
+
Must be zero for create; ignored and derived from the row for update.
|
|
2081
|
+
"""
|
|
2082
|
+
uid: Annotated[str, Field(max_length=45)] = ""
|
|
2083
|
+
"""
|
|
2084
|
+
In create mode, empty creates metadata only and a non-empty value
|
|
2085
|
+
consumes the one completed file staged under that unguessable uid.
|
|
2086
|
+
Update mode ignores this field. Non-empty create uid binding is
|
|
2087
|
+
affected by PVD-026.
|
|
2088
|
+
|
|
2089
|
+
"""
|
|
2090
|
+
info: Annotated[
|
|
2091
|
+
str,
|
|
2092
|
+
Field(
|
|
2093
|
+
json_schema_extra={
|
|
2094
|
+
"contentMediaType": "application/json",
|
|
2095
|
+
"contentSchema": {"$ref": "#/components/schemas/SaveLiteratureContent"},
|
|
2096
|
+
},
|
|
2097
|
+
min_length=1,
|
|
2098
|
+
),
|
|
2099
|
+
]
|
|
2100
|
+
|
|
2101
|
+
|
|
2102
|
+
class SaveLiteratureItemRequest(RootModel[SaveLiteratureItemRequest1 | SaveLiteratureItemRequest2]):
|
|
2103
|
+
root: SaveLiteratureItemRequest1 | SaveLiteratureItemRequest2
|
|
2104
|
+
|
|
2105
|
+
|
|
2106
|
+
class Comm(IntEnum):
|
|
2107
|
+
integer_0 = 0
|
|
2108
|
+
integer_1 = 1
|
|
2109
|
+
|
|
2110
|
+
|
|
2111
|
+
class ShareLiteratureItemsRequest(BaseModel):
|
|
2112
|
+
model_config = ConfigDict(
|
|
2113
|
+
extra="forbid",
|
|
2114
|
+
)
|
|
2115
|
+
ids: Annotated[
|
|
2116
|
+
str,
|
|
2117
|
+
Field(
|
|
2118
|
+
json_schema_extra={
|
|
2119
|
+
"contentMediaType": "application/json",
|
|
2120
|
+
"contentSchema": {
|
|
2121
|
+
"type": "array",
|
|
2122
|
+
"minItems": 1,
|
|
2123
|
+
"uniqueItems": True,
|
|
2124
|
+
"items": {"type": "integer", "minimum": 1},
|
|
2125
|
+
},
|
|
2126
|
+
},
|
|
2127
|
+
min_length=1,
|
|
2128
|
+
),
|
|
2129
|
+
]
|
|
2130
|
+
"""
|
|
2131
|
+
JSON-encoded ids from the caller's readable literature list.
|
|
2132
|
+
"""
|
|
2133
|
+
users: Annotated[
|
|
2134
|
+
str,
|
|
2135
|
+
Field(
|
|
2136
|
+
json_schema_extra={
|
|
2137
|
+
"contentMediaType": "application/json",
|
|
2138
|
+
"contentSchema": {
|
|
2139
|
+
"type": "array",
|
|
2140
|
+
"minItems": 1,
|
|
2141
|
+
"uniqueItems": True,
|
|
2142
|
+
"items": {"type": "integer", "minimum": 1},
|
|
2143
|
+
},
|
|
2144
|
+
},
|
|
2145
|
+
min_length=1,
|
|
2146
|
+
),
|
|
2147
|
+
]
|
|
2148
|
+
"""
|
|
2149
|
+
JSON-encoded, existing, non-self recipient user ids returned by searchUsers.
|
|
2150
|
+
"""
|
|
2151
|
+
comm: Comm = 0
|
|
2152
|
+
"""
|
|
2153
|
+
One copies the sender's own comment and its attachment quotes.
|
|
2154
|
+
"""
|
|
2155
|
+
intro: Annotated[str, Field(max_length=255)] = ""
|
|
2156
|
+
"""
|
|
2157
|
+
Optional note shown with every pending recipient copy.
|
|
2158
|
+
"""
|
|
2159
|
+
|
|
2160
|
+
|
|
2161
|
+
class DeletePersonalLiteratureItemRequest(BaseModel):
|
|
2162
|
+
model_config = ConfigDict(
|
|
2163
|
+
extra="forbid",
|
|
2164
|
+
)
|
|
2165
|
+
id: Annotated[int, Field(ge=1)]
|
|
2166
|
+
"""
|
|
2167
|
+
Literature item id returned by listLiteratureItems for the caller's
|
|
2168
|
+
synthetic personal library (`store_id=0`).
|
|
2169
|
+
|
|
2170
|
+
"""
|
|
2171
|
+
|
|
2172
|
+
|
|
2173
|
+
class ReplaceLiteraturePdfRequest(BaseModel):
|
|
2174
|
+
model_config = ConfigDict(
|
|
2175
|
+
extra="forbid",
|
|
2176
|
+
)
|
|
2177
|
+
id: Annotated[int, Field(ge=1)]
|
|
2178
|
+
"""
|
|
2179
|
+
Existing literature item for which the caller has FAV_WRITE.
|
|
2180
|
+
"""
|
|
2181
|
+
uid: Annotated[str, Field(max_length=45, min_length=1)]
|
|
2182
|
+
"""
|
|
2183
|
+
Unguessable uid containing exactly one completed staged PDF.
|
|
2184
|
+
"""
|
|
2185
|
+
|
|
2186
|
+
|
|
2187
|
+
class DeleteLiteraturePdfRequest(BaseModel):
|
|
2188
|
+
model_config = ConfigDict(
|
|
2189
|
+
extra="forbid",
|
|
2190
|
+
)
|
|
2191
|
+
id: Annotated[int, Field(ge=1)]
|
|
2192
|
+
"""
|
|
2193
|
+
Existing literature item for which the caller has FAV_WRITE.
|
|
2194
|
+
"""
|
|
2195
|
+
|
|
2196
|
+
|
|
2197
|
+
class Keyword(RootModel[str]):
|
|
2198
|
+
root: Annotated[str, Field(min_length=1)]
|
|
2199
|
+
|
|
2200
|
+
|
|
2201
|
+
class ReferenceItem(RootModel[str]):
|
|
2202
|
+
root: Annotated[str, Field(min_length=1)]
|
|
2203
|
+
|
|
2204
|
+
|
|
2205
|
+
class LiteratureCitationInfoInput(BaseModel):
|
|
2206
|
+
model_config = ConfigDict(
|
|
2207
|
+
extra="forbid",
|
|
2208
|
+
)
|
|
2209
|
+
year: float | None = None
|
|
2210
|
+
volume: str | None = None
|
|
2211
|
+
issue: str | None = None
|
|
2212
|
+
page: str | None = None
|
|
2213
|
+
|
|
2214
|
+
|
|
2215
|
+
class LiteratureContent1(RootModel[list[Any]]):
|
|
2216
|
+
root: Annotated[list[Any], Field(max_length=0)]
|
|
2217
|
+
"""
|
|
2218
|
+
PHP fallback when the stored JSON is null or invalid.
|
|
2219
|
+
"""
|
|
2220
|
+
|
|
2221
|
+
|
|
2222
|
+
class LiteratureCitationInfo(BaseModel):
|
|
2223
|
+
model_config = ConfigDict(
|
|
2224
|
+
extra="allow",
|
|
2225
|
+
)
|
|
2226
|
+
year: float | None = None
|
|
2227
|
+
volume: str | None = None
|
|
2228
|
+
issue: str | None = None
|
|
2229
|
+
page: str | None = None
|
|
2230
|
+
|
|
2231
|
+
|
|
2232
|
+
class Name(RootModel[list[str]]):
|
|
2233
|
+
root: Annotated[list[str], Field(max_length=2, min_length=2)]
|
|
2234
|
+
|
|
2235
|
+
|
|
2236
|
+
class Type2(StrEnum):
|
|
2237
|
+
richtext = "richtext"
|
|
2238
|
+
text = "text"
|
|
2239
|
+
object = "object"
|
|
2240
|
+
number = "number"
|
|
2241
|
+
textgroup = "textgroup"
|
|
2242
|
+
|
|
2243
|
+
|
|
2244
|
+
class Comm1(RootModel[list[str]]):
|
|
2245
|
+
root: Annotated[list[str], Field(max_length=2, min_length=2)]
|
|
2246
|
+
|
|
2247
|
+
|
|
2248
|
+
class LiteratureNestedFieldDefinition(BaseModel):
|
|
2249
|
+
model_config = ConfigDict(
|
|
2250
|
+
extra="allow",
|
|
2251
|
+
)
|
|
2252
|
+
name: str | Name
|
|
2253
|
+
id: Annotated[str, Field(min_length=1)]
|
|
2254
|
+
type: Type2
|
|
2255
|
+
width: Annotated[int | None, Field(ge=1)] = None
|
|
2256
|
+
|
|
2257
|
+
|
|
2258
|
+
class Condition(BaseModel):
|
|
2259
|
+
model_config = ConfigDict(
|
|
2260
|
+
extra="allow",
|
|
2261
|
+
)
|
|
2262
|
+
id: str
|
|
2263
|
+
value: Any
|
|
2264
|
+
|
|
2265
|
+
|
|
2266
|
+
class Logical(StrEnum):
|
|
2267
|
+
and_ = "and"
|
|
2268
|
+
or_ = "or"
|
|
2269
|
+
|
|
2270
|
+
|
|
2271
|
+
class LiteratureFieldCondition(BaseModel):
|
|
2272
|
+
model_config = ConfigDict(
|
|
2273
|
+
extra="allow",
|
|
2274
|
+
)
|
|
2275
|
+
conditions: Annotated[list[Condition], Field(min_length=1)]
|
|
2276
|
+
logical: Logical | None = None
|
|
2277
|
+
|
|
2278
|
+
|
|
2279
|
+
class LiteratureComment(BaseModel):
|
|
2280
|
+
model_config = ConfigDict(
|
|
2281
|
+
extra="allow",
|
|
2282
|
+
)
|
|
2283
|
+
id: Annotated[int, Field(ge=1)]
|
|
2284
|
+
content: str
|
|
2285
|
+
userid: Annotated[int, Field(ge=1)]
|
|
2286
|
+
user: Annotated[str | None, Field(...)]
|
|
2287
|
+
dtime: Annotated[str, Field(pattern="^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$")]
|
|
2288
|
+
owner: bool
|
|
2289
|
+
|
|
2290
|
+
|
|
2291
|
+
class SaveLiteratureCommentRequest1(BaseModel):
|
|
2292
|
+
model_config = ConfigDict(
|
|
2293
|
+
extra="forbid",
|
|
2294
|
+
)
|
|
2295
|
+
id: Annotated[Literal[0], Field(ge=0)] = 0
|
|
2296
|
+
"""
|
|
2297
|
+
Missing or zero creates; a positive id selects an owner-only edit.
|
|
2298
|
+
"""
|
|
2299
|
+
fav_id: Annotated[int, Field(ge=1)]
|
|
2300
|
+
"""
|
|
2301
|
+
Required and positive for create; ignored for an owner-only edit.
|
|
2302
|
+
"""
|
|
2303
|
+
comment: Annotated[
|
|
2304
|
+
str,
|
|
2305
|
+
Field(json_schema_extra={"contentMediaType": "text/html"}, max_length=13000),
|
|
2306
|
+
] = ""
|
|
2307
|
+
"""
|
|
2308
|
+
Rich-text content before Provider URL normalization. Missing and an
|
|
2309
|
+
explicitly empty multipart field both persist an empty string.
|
|
2310
|
+
|
|
2311
|
+
"""
|
|
2312
|
+
uid: Annotated[str, Field(max_length=100, min_length=1)]
|
|
2313
|
+
"""
|
|
2314
|
+
Required temporary-upload correlation key. It may name no staged
|
|
2315
|
+
files, but Consumers must still generate a fresh, unguessable value.
|
|
2316
|
+
|
|
2317
|
+
"""
|
|
2318
|
+
|
|
2319
|
+
|
|
2320
|
+
class SaveLiteratureCommentRequest2(BaseModel):
|
|
2321
|
+
model_config = ConfigDict(
|
|
2322
|
+
extra="forbid",
|
|
2323
|
+
)
|
|
2324
|
+
id: Annotated[int, Field(ge=1)]
|
|
2325
|
+
"""
|
|
2326
|
+
Missing or zero creates; a positive id selects an owner-only edit.
|
|
2327
|
+
"""
|
|
2328
|
+
fav_id: Annotated[int, Field(ge=0)] = 0
|
|
2329
|
+
"""
|
|
2330
|
+
Required and positive for create; ignored for an owner-only edit.
|
|
2331
|
+
"""
|
|
2332
|
+
comment: Annotated[
|
|
2333
|
+
str,
|
|
2334
|
+
Field(json_schema_extra={"contentMediaType": "text/html"}, max_length=13000),
|
|
2335
|
+
] = ""
|
|
2336
|
+
"""
|
|
2337
|
+
Rich-text content before Provider URL normalization. Missing and an
|
|
2338
|
+
explicitly empty multipart field both persist an empty string.
|
|
2339
|
+
|
|
2340
|
+
"""
|
|
2341
|
+
uid: Annotated[str, Field(max_length=100, min_length=1)]
|
|
2342
|
+
"""
|
|
2343
|
+
Required temporary-upload correlation key. It may name no staged
|
|
2344
|
+
files, but Consumers must still generate a fresh, unguessable value.
|
|
2345
|
+
|
|
2346
|
+
"""
|
|
2347
|
+
|
|
2348
|
+
|
|
2349
|
+
class SaveLiteratureCommentRequest(RootModel[SaveLiteratureCommentRequest1 | SaveLiteratureCommentRequest2]):
|
|
2350
|
+
root: SaveLiteratureCommentRequest1 | SaveLiteratureCommentRequest2
|
|
2351
|
+
|
|
2352
|
+
|
|
2353
|
+
class DeleteLiteratureCommentRequest(BaseModel):
|
|
2354
|
+
model_config = ConfigDict(
|
|
2355
|
+
extra="forbid",
|
|
2356
|
+
)
|
|
2357
|
+
id: Annotated[int, Field(ge=1)]
|
|
2358
|
+
"""
|
|
2359
|
+
Comment identifier returned by readLiteratureDetail.
|
|
2360
|
+
"""
|
|
2361
|
+
|
|
2362
|
+
|
|
2363
|
+
class ShareMultipleTemplatesWithUsersResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2364
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2365
|
+
|
|
2366
|
+
|
|
2367
|
+
class RemoveTemplateFromUserLibraryResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2368
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2369
|
+
|
|
2370
|
+
|
|
2371
|
+
class AddTemplateToGroupResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2372
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2373
|
+
|
|
2374
|
+
|
|
2375
|
+
class RemoveTemplateFromGroupResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2376
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2377
|
+
|
|
2378
|
+
|
|
2379
|
+
class ListTemplateStoreParametersQuery(BaseModel):
|
|
2380
|
+
search: str = ""
|
|
2381
|
+
page: Annotated[int, Field(ge=1)] = 1
|
|
2382
|
+
page_size: Annotated[int, Field(ge=0, le=256)] = 0
|
|
2383
|
+
|
|
2384
|
+
|
|
2385
|
+
class BuyTemplateStoreEntryResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2386
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2387
|
+
|
|
2388
|
+
|
|
2389
|
+
class ReadTemplateContentParametersQuery(BaseModel):
|
|
2390
|
+
id: Annotated[int, Field(ge=1)]
|
|
2391
|
+
|
|
2392
|
+
|
|
2393
|
+
class ReadTemplateContentResponse(RootModel[TemplateContentResponse | ErrorResponse]):
|
|
2394
|
+
root: TemplateContentResponse | ErrorResponse
|
|
2395
|
+
|
|
2396
|
+
|
|
2397
|
+
class SaveTemplateMetadataResponse1(RootModel[SaveTemplateMetadataResponse | ErrorResponse]):
|
|
2398
|
+
root: SaveTemplateMetadataResponse | ErrorResponse
|
|
2399
|
+
|
|
2400
|
+
|
|
2401
|
+
class SaveTemplateContentResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2402
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2403
|
+
|
|
2404
|
+
|
|
2405
|
+
class CopyTemplateResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2406
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2407
|
+
|
|
2408
|
+
|
|
2409
|
+
class UpdateTemplateIntroResponse1(RootModel[UpdateTemplateIntroResponse | ErrorResponse]):
|
|
2410
|
+
root: UpdateTemplateIntroResponse | ErrorResponse
|
|
2411
|
+
|
|
2412
|
+
|
|
2413
|
+
class SubmitTemplateToStoreResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2414
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2415
|
+
|
|
2416
|
+
|
|
2417
|
+
class All(IntEnum):
|
|
2418
|
+
integer_0 = 0
|
|
2419
|
+
integer_1 = 1
|
|
2420
|
+
|
|
2421
|
+
|
|
2422
|
+
class SearchUsersParametersQuery(BaseModel):
|
|
2423
|
+
keyword: Annotated[str, Field(max_length=100, min_length=2, pattern=".*\\S.*")]
|
|
2424
|
+
all: All = 0
|
|
2425
|
+
|
|
2426
|
+
|
|
2427
|
+
class SaveNotebookMetadataResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2428
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2429
|
+
|
|
2430
|
+
|
|
2431
|
+
class ListNotebookSharesParametersQuery(BaseModel):
|
|
2432
|
+
id: Annotated[int, Field(ge=1)]
|
|
2433
|
+
|
|
2434
|
+
|
|
2435
|
+
class AddNotebookShareResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2436
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2437
|
+
|
|
2438
|
+
|
|
2439
|
+
class UpdateNotebookSharePermissionsResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2440
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2441
|
+
|
|
2442
|
+
|
|
2443
|
+
class DeleteNotebookShareResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2444
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2445
|
+
|
|
2446
|
+
|
|
2447
|
+
class CreateBlankRecordResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2448
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2449
|
+
|
|
2450
|
+
|
|
2451
|
+
class ImportRecordDatasetResponse(RootModel[ImportRecordsResponse | ErrorResponse]):
|
|
2452
|
+
root: ImportRecordsResponse | ErrorResponse
|
|
2453
|
+
|
|
2454
|
+
|
|
2455
|
+
class UpdateRecordDataResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2456
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2457
|
+
|
|
2458
|
+
|
|
2459
|
+
class DeleteRecordsByUidResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2460
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2461
|
+
|
|
2462
|
+
|
|
2463
|
+
class UploadRecordAttachmentResponse(RootModel[UploadAttachmentResponse | ErrorResponse]):
|
|
2464
|
+
root: UploadAttachmentResponse | ErrorResponse
|
|
2465
|
+
|
|
2466
|
+
|
|
2467
|
+
class Default(IntEnum):
|
|
2468
|
+
integer_0 = 0
|
|
2469
|
+
integer_1 = 1
|
|
2470
|
+
|
|
2471
|
+
|
|
2472
|
+
class ListNotebookRecordPageParametersQuery(BaseModel):
|
|
2473
|
+
eln: Annotated[int, Field(ge=1)]
|
|
2474
|
+
page: Annotated[int, Field(ge=1)] = 1
|
|
2475
|
+
page_size: Annotated[int, Field(ge=0, le=255)] = 0
|
|
2476
|
+
subtype: Annotated[int, Field(ge=-1)] = 0
|
|
2477
|
+
default: Default = 0
|
|
2478
|
+
order_by: Annotated[int, Field(ge=0)] = 0
|
|
2479
|
+
order_desc: OrderDesc = 1
|
|
2480
|
+
ds: str = ""
|
|
2481
|
+
de: str = ""
|
|
2482
|
+
content: str = ""
|
|
2483
|
+
keywords: Annotated[
|
|
2484
|
+
str,
|
|
2485
|
+
Field(
|
|
2486
|
+
json_schema_extra={
|
|
2487
|
+
"contentMediaType": "application/json",
|
|
2488
|
+
"contentSchema": {"type": "array", "items": {"type": "string"}},
|
|
2489
|
+
}
|
|
2490
|
+
),
|
|
2491
|
+
] = ""
|
|
2492
|
+
|
|
2493
|
+
|
|
2494
|
+
class ListDeletedRecordPageParametersQuery(BaseModel):
|
|
2495
|
+
eln: Annotated[int, Field(ge=1)]
|
|
2496
|
+
page: Annotated[int, Field(ge=1)] = 1
|
|
2497
|
+
page_size: Annotated[int, Field(ge=1)] = 24
|
|
2498
|
+
|
|
2499
|
+
|
|
2500
|
+
class RestoreDeletedRecordsResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2501
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2502
|
+
|
|
2503
|
+
|
|
2504
|
+
class CopyRecordResponse1(RootModel[CopyRecordResponse | ErrorResponse]):
|
|
2505
|
+
root: CopyRecordResponse | ErrorResponse
|
|
2506
|
+
|
|
2507
|
+
|
|
2508
|
+
class ListRecordRelationsParametersQuery(BaseModel):
|
|
2509
|
+
eln: Annotated[int, Field(ge=1)]
|
|
2510
|
+
item_id: Annotated[int, Field(ge=1)]
|
|
2511
|
+
|
|
2512
|
+
|
|
2513
|
+
class AddRecordRelationResponse(RootModel[ForwardableSuccessResponse | ErrorResponse]):
|
|
2514
|
+
root: ForwardableSuccessResponse | ErrorResponse
|
|
2515
|
+
|
|
2516
|
+
|
|
2517
|
+
class DeleteRecordRelationResponse(RootModel[ForwardableSuccessResponse | ErrorResponse]):
|
|
2518
|
+
root: ForwardableSuccessResponse | ErrorResponse
|
|
2519
|
+
|
|
2520
|
+
|
|
2521
|
+
class ListRecordCommentsParametersQuery(BaseModel):
|
|
2522
|
+
eln: Annotated[int, Field(ge=1)]
|
|
2523
|
+
item_id: Annotated[int, Field(ge=1)]
|
|
2524
|
+
|
|
2525
|
+
|
|
2526
|
+
class SaveRecordCommentResponse(RootModel[ForwardableSuccessResponse | ErrorResponse]):
|
|
2527
|
+
root: ForwardableSuccessResponse | ErrorResponse
|
|
2528
|
+
|
|
2529
|
+
|
|
2530
|
+
class UploadRecordCommentAttachmentResponse1(RootModel[UploadRecordCommentAttachmentResponse | ErrorResponse]):
|
|
2531
|
+
root: UploadRecordCommentAttachmentResponse | ErrorResponse
|
|
2532
|
+
|
|
2533
|
+
|
|
2534
|
+
class DeleteRecordCommentResponse(RootModel[ForwardableSuccessResponse | ErrorResponse]):
|
|
2535
|
+
root: ForwardableSuccessResponse | ErrorResponse
|
|
2536
|
+
|
|
2537
|
+
|
|
2538
|
+
class DownloadRecordCommentAttachmentParametersQuery(BaseModel):
|
|
2539
|
+
eln: Annotated[int, Field(ge=1)]
|
|
2540
|
+
i: Annotated[int, Field(ge=1)]
|
|
2541
|
+
h: Sha256
|
|
2542
|
+
s: Annotated[int, Field(ge=1)]
|
|
2543
|
+
f: Annotated[str, Field(max_length=1000, min_length=1)]
|
|
2544
|
+
|
|
2545
|
+
|
|
2546
|
+
class ReadRecordParametersQuery(BaseModel):
|
|
2547
|
+
eln: Annotated[int, Field(ge=1)]
|
|
2548
|
+
id: Annotated[int, Field(ge=1)]
|
|
2549
|
+
version: Annotated[int, Field(ge=0)] = 0
|
|
2550
|
+
|
|
2551
|
+
|
|
2552
|
+
class DownloadRecordAttachmentParametersQuery(BaseModel):
|
|
2553
|
+
eln: Annotated[int, Field(ge=1)]
|
|
2554
|
+
i: Annotated[int, Field(ge=1)]
|
|
2555
|
+
u: Annotated[str, Field(min_length=1)]
|
|
2556
|
+
h: Sha256
|
|
2557
|
+
f: Annotated[str, Field(min_length=1)]
|
|
2558
|
+
s: Annotated[int, Field(ge=0)]
|
|
2559
|
+
c: Literal[0]
|
|
2560
|
+
thumb: Literal[0] = 0
|
|
2561
|
+
|
|
2562
|
+
|
|
2563
|
+
class SearchType(IntEnum):
|
|
2564
|
+
integer_0 = 0
|
|
2565
|
+
integer_1 = 1
|
|
2566
|
+
|
|
2567
|
+
|
|
2568
|
+
class ListLiteratureItemsParametersQuery(BaseModel):
|
|
2569
|
+
page: Annotated[int, Field(ge=0)] = 0
|
|
2570
|
+
page_size: Annotated[int, Field(ge=0, le=256)] = 0
|
|
2571
|
+
store_id: Annotated[int, Field(ge=0)] = 0
|
|
2572
|
+
types: Annotated[
|
|
2573
|
+
str,
|
|
2574
|
+
Field(
|
|
2575
|
+
json_schema_extra={
|
|
2576
|
+
"contentMediaType": "application/json",
|
|
2577
|
+
"contentSchema": {
|
|
2578
|
+
"type": "array",
|
|
2579
|
+
"uniqueItems": True,
|
|
2580
|
+
"items": {"type": "integer", "enum": [1, 2, 3]},
|
|
2581
|
+
},
|
|
2582
|
+
}
|
|
2583
|
+
),
|
|
2584
|
+
] = ""
|
|
2585
|
+
stars: Annotated[
|
|
2586
|
+
str,
|
|
2587
|
+
Field(
|
|
2588
|
+
json_schema_extra={
|
|
2589
|
+
"contentMediaType": "application/json",
|
|
2590
|
+
"contentSchema": {
|
|
2591
|
+
"type": "array",
|
|
2592
|
+
"uniqueItems": True,
|
|
2593
|
+
"items": {"type": "integer", "minimum": 1, "maximum": 5},
|
|
2594
|
+
},
|
|
2595
|
+
}
|
|
2596
|
+
),
|
|
2597
|
+
] = ""
|
|
2598
|
+
keywords: Annotated[
|
|
2599
|
+
str,
|
|
2600
|
+
Field(
|
|
2601
|
+
json_schema_extra={
|
|
2602
|
+
"contentMediaType": "application/json",
|
|
2603
|
+
"contentSchema": {
|
|
2604
|
+
"type": "array",
|
|
2605
|
+
"uniqueItems": True,
|
|
2606
|
+
"items": {"type": "string"},
|
|
2607
|
+
},
|
|
2608
|
+
}
|
|
2609
|
+
),
|
|
2610
|
+
] = ""
|
|
2611
|
+
search: str = ""
|
|
2612
|
+
search_type: SearchType = 0
|
|
2613
|
+
|
|
2614
|
+
|
|
2615
|
+
class ReadLiteratureDetailParametersQuery(BaseModel):
|
|
2616
|
+
id: Annotated[int, Field(ge=1)]
|
|
2617
|
+
|
|
2618
|
+
|
|
2619
|
+
class SaveLiteratureCommentResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2620
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2621
|
+
|
|
2622
|
+
|
|
2623
|
+
class DeleteLiteratureCommentResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2624
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2625
|
+
|
|
2626
|
+
|
|
2627
|
+
class ShareLiteratureItemsResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2628
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2629
|
+
|
|
2630
|
+
|
|
2631
|
+
class DeletePersonalLiteratureItemResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2632
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2633
|
+
|
|
2634
|
+
|
|
2635
|
+
class StageTemporaryFileResponse(
|
|
2636
|
+
RootModel[StagedTemporaryFileFragmentResponse | StagedTemporaryFileResponse | ErrorResponse]
|
|
2637
|
+
):
|
|
2638
|
+
root: StagedTemporaryFileFragmentResponse | StagedTemporaryFileResponse | ErrorResponse
|
|
2639
|
+
|
|
2640
|
+
|
|
2641
|
+
class SaveLiteratureItemResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2642
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2643
|
+
|
|
2644
|
+
|
|
2645
|
+
class ReplaceLiteraturePdfResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2646
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2647
|
+
|
|
2648
|
+
|
|
2649
|
+
class DeleteLiteraturePdfResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2650
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2651
|
+
|
|
2652
|
+
|
|
2653
|
+
class C(IntEnum):
|
|
2654
|
+
integer_0 = 0
|
|
2655
|
+
integer_1 = 1
|
|
2656
|
+
|
|
2657
|
+
|
|
2658
|
+
class DownloadLiteraturePdfParametersQuery(BaseModel):
|
|
2659
|
+
t: Literal["recommend_fav_pdf"]
|
|
2660
|
+
id: Annotated[int, Field(ge=1)]
|
|
2661
|
+
h: Sha256
|
|
2662
|
+
f: str = ""
|
|
2663
|
+
c: C = 1
|
|
2664
|
+
thumb: Literal[0] = 0
|
|
2665
|
+
|
|
2666
|
+
|
|
2667
|
+
class OrderBy(IntEnum):
|
|
2668
|
+
integer_0 = 0
|
|
2669
|
+
integer_1 = 1
|
|
2670
|
+
|
|
2671
|
+
|
|
2672
|
+
class ListCloudDriveFilesParametersQuery(BaseModel):
|
|
2673
|
+
type_id: Annotated[int, Field(ge=0)] = 0
|
|
2674
|
+
root_id: Literal[0] = 0
|
|
2675
|
+
page: Annotated[int, Field(ge=0)] = 0
|
|
2676
|
+
page_size: Annotated[int, Field(ge=0, le=256)] = 20
|
|
2677
|
+
order_by: OrderBy = 0
|
|
2678
|
+
order_desc: OrderDesc = 1
|
|
2679
|
+
search: str = ""
|
|
2680
|
+
|
|
2681
|
+
|
|
2682
|
+
class SaveCloudDriveFolderResponse(RootModel[CloudDriveIdentityResponse | ErrorResponse]):
|
|
2683
|
+
root: CloudDriveIdentityResponse | ErrorResponse
|
|
2684
|
+
|
|
2685
|
+
|
|
2686
|
+
class DeleteEmptyCloudDriveFolderResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2687
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2688
|
+
|
|
2689
|
+
|
|
2690
|
+
class MoveCloudDriveFolderResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2691
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2692
|
+
|
|
2693
|
+
|
|
2694
|
+
class BindStagedCloudDriveFileResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2695
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2696
|
+
|
|
2697
|
+
|
|
2698
|
+
class EditCloudDriveFileResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2699
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2700
|
+
|
|
2701
|
+
|
|
2702
|
+
class DeleteCloudDriveFilesResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2703
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2704
|
+
|
|
2705
|
+
|
|
2706
|
+
class MoveCloudDriveFilesResponse(RootModel[BasicSuccessResponse | ErrorResponse]):
|
|
2707
|
+
root: BasicSuccessResponse | ErrorResponse
|
|
2708
|
+
|
|
2709
|
+
|
|
2710
|
+
class Thumb(IntEnum):
|
|
2711
|
+
integer_0 = 0
|
|
2712
|
+
integer_1 = 1
|
|
2713
|
+
|
|
2714
|
+
|
|
2715
|
+
class DownloadCloudDriveFileParametersQuery(BaseModel):
|
|
2716
|
+
id: Annotated[int, Field(ge=1)]
|
|
2717
|
+
thumb: Thumb = 0
|
|
2718
|
+
c: C = 1
|
|
2719
|
+
|
|
2720
|
+
|
|
2721
|
+
class CloudDriveFileListResponse(BaseModel):
|
|
2722
|
+
model_config = ConfigDict(
|
|
2723
|
+
extra="allow",
|
|
2724
|
+
)
|
|
2725
|
+
code: Literal[0]
|
|
2726
|
+
msg: str
|
|
2727
|
+
errcode: Literal[0]
|
|
2728
|
+
errmsg: str
|
|
2729
|
+
"""
|
|
2730
|
+
Legacy alias of `msg`; always present in these operations.
|
|
2731
|
+
"""
|
|
2732
|
+
files: list[CloudDriveFile]
|
|
2733
|
+
count: Annotated[int, Field(ge=0)]
|
|
2734
|
+
quota: Annotated[int, Field(ge=0)]
|
|
2735
|
+
"""
|
|
2736
|
+
Effective cloud-drive quota in GiB; zero means unlimited.
|
|
2737
|
+
"""
|
|
2738
|
+
used: Annotated[int, Field(ge=0)]
|
|
2739
|
+
root_type: CloudDriveRootPermissions
|
|
2740
|
+
types: list[CloudDriveFolder]
|
|
2741
|
+
users: Annotated[list[Any], Field(max_length=0)]
|
|
2742
|
+
"""
|
|
2743
|
+
Always empty because integration-v1 fixes root_id to the personal root.
|
|
2744
|
+
"""
|
|
2745
|
+
|
|
2746
|
+
|
|
2747
|
+
class AppMenu(BaseModel):
|
|
2748
|
+
model_config = ConfigDict(
|
|
2749
|
+
extra="allow",
|
|
2750
|
+
)
|
|
2751
|
+
uid: str
|
|
2752
|
+
order: int | None = None
|
|
2753
|
+
"""
|
|
2754
|
+
May be absent on menu entries merged from the optional IOP server.
|
|
2755
|
+
"""
|
|
2756
|
+
showtext: str
|
|
2757
|
+
icon: str
|
|
2758
|
+
sub: list[AppMenuItem]
|
|
2759
|
+
|
|
2760
|
+
|
|
2761
|
+
class TokenLoginResponse(BaseModel):
|
|
2762
|
+
model_config = ConfigDict(
|
|
2763
|
+
extra="allow",
|
|
2764
|
+
)
|
|
2765
|
+
code: Literal[0]
|
|
2766
|
+
msg: str
|
|
2767
|
+
errcode: Literal[0]
|
|
2768
|
+
errmsg: str
|
|
2769
|
+
"""
|
|
2770
|
+
Legacy alias of `msg`; always present in these operations.
|
|
2771
|
+
"""
|
|
2772
|
+
userid: Annotated[int, Field(ge=1)]
|
|
2773
|
+
protect: bool
|
|
2774
|
+
username: Annotated[str | None, Field(...)]
|
|
2775
|
+
avatar: Annotated[str | None, Field(...)]
|
|
2776
|
+
email: Annotated[str | None, Field(...)]
|
|
2777
|
+
timestamp: Annotated[int, Field(ge=1)]
|
|
2778
|
+
"""
|
|
2779
|
+
Provider Unix timestamp in milliseconds.
|
|
2780
|
+
"""
|
|
2781
|
+
access: AuthToken
|
|
2782
|
+
refresh: AuthToken
|
|
2783
|
+
|
|
2784
|
+
|
|
2785
|
+
class Token(BaseModel):
|
|
2786
|
+
model_config = ConfigDict(
|
|
2787
|
+
extra="allow",
|
|
2788
|
+
)
|
|
2789
|
+
access: AuthToken
|
|
2790
|
+
refresh: AuthToken
|
|
2791
|
+
|
|
2792
|
+
|
|
2793
|
+
class ChatSsoCodeExchangeResponse(BaseModel):
|
|
2794
|
+
model_config = ConfigDict(
|
|
2795
|
+
extra="allow",
|
|
2796
|
+
)
|
|
2797
|
+
code: Literal[0]
|
|
2798
|
+
msg: str
|
|
2799
|
+
errcode: Literal[0]
|
|
2800
|
+
errmsg: str
|
|
2801
|
+
"""
|
|
2802
|
+
Legacy alias of `msg`; always present in these operations.
|
|
2803
|
+
"""
|
|
2804
|
+
userid: Annotated[int, Field(ge=1)]
|
|
2805
|
+
username: Annotated[str | None, Field(...)]
|
|
2806
|
+
email: Annotated[str | None, Field(...)]
|
|
2807
|
+
token: Token
|
|
2808
|
+
|
|
2809
|
+
|
|
2810
|
+
class TokenRefreshResponse(BaseModel):
|
|
2811
|
+
model_config = ConfigDict(
|
|
2812
|
+
extra="allow",
|
|
2813
|
+
)
|
|
2814
|
+
code: Literal[0]
|
|
2815
|
+
msg: str
|
|
2816
|
+
errcode: Literal[0]
|
|
2817
|
+
errmsg: str
|
|
2818
|
+
"""
|
|
2819
|
+
Legacy alias of `msg`; always present in these operations.
|
|
2820
|
+
"""
|
|
2821
|
+
timestamp: Annotated[int, Field(ge=1)]
|
|
2822
|
+
"""
|
|
2823
|
+
Provider Unix timestamp in milliseconds.
|
|
2824
|
+
"""
|
|
2825
|
+
access: AuthToken
|
|
2826
|
+
refresh: AuthToken
|
|
2827
|
+
|
|
2828
|
+
|
|
2829
|
+
class TemplateListResponse(BaseModel):
|
|
2830
|
+
model_config = ConfigDict(
|
|
2831
|
+
extra="allow",
|
|
2832
|
+
)
|
|
2833
|
+
code: Literal[0]
|
|
2834
|
+
msg: str
|
|
2835
|
+
errcode: Literal[0]
|
|
2836
|
+
errmsg: str
|
|
2837
|
+
"""
|
|
2838
|
+
Legacy alias of `msg`; always present in these operations.
|
|
2839
|
+
"""
|
|
2840
|
+
pending: list[PendingTemplateListItem]
|
|
2841
|
+
stores: list[StoreTemplateListItem]
|
|
2842
|
+
share: list[SharedTemplateListItem]
|
|
2843
|
+
my: list[OwnedTemplateListItem]
|
|
2844
|
+
group: list[GroupTemplateListItem]
|
|
2845
|
+
default: list[DefaultTemplateListItem]
|
|
2846
|
+
|
|
2847
|
+
|
|
2848
|
+
class TemplateStoreListResponse(BaseModel):
|
|
2849
|
+
model_config = ConfigDict(
|
|
2850
|
+
extra="allow",
|
|
2851
|
+
)
|
|
2852
|
+
code: Literal[0]
|
|
2853
|
+
msg: str
|
|
2854
|
+
errcode: Literal[0]
|
|
2855
|
+
errmsg: str
|
|
2856
|
+
"""
|
|
2857
|
+
Legacy alias of `msg`; always present in these operations.
|
|
2858
|
+
"""
|
|
2859
|
+
items: list[TemplateStoreItem]
|
|
2860
|
+
count: Annotated[int, Field(ge=0)]
|
|
2861
|
+
|
|
2862
|
+
|
|
2863
|
+
class ElnGroupsResponse(BaseModel):
|
|
2864
|
+
model_config = ConfigDict(
|
|
2865
|
+
extra="allow",
|
|
2866
|
+
)
|
|
2867
|
+
code: Literal[0]
|
|
2868
|
+
msg: str
|
|
2869
|
+
errcode: Literal[0]
|
|
2870
|
+
errmsg: str
|
|
2871
|
+
"""
|
|
2872
|
+
Legacy alias of `msg`; always present in these operations.
|
|
2873
|
+
"""
|
|
2874
|
+
users: list[ElnGroupUser]
|
|
2875
|
+
"""
|
|
2876
|
+
Members of the group identified by `group_id` only. PHP does not
|
|
2877
|
+
filter `eln_usergroup_list.valid` in this second query.
|
|
2878
|
+
|
|
2879
|
+
"""
|
|
2880
|
+
groups: list[ElnGroup]
|
|
2881
|
+
"""
|
|
2882
|
+
Groups with a valid membership for the current user. Result order
|
|
2883
|
+
is unspecified because the Provider query has no ORDER BY clause.
|
|
2884
|
+
|
|
2885
|
+
"""
|
|
2886
|
+
group_id: Annotated[int, Field(ge=0)]
|
|
2887
|
+
"""
|
|
2888
|
+
`groups[0].id`, or 0 when `groups` is empty.
|
|
2889
|
+
"""
|
|
2890
|
+
|
|
2891
|
+
|
|
2892
|
+
class UserDirectorySearchResponse(BaseModel):
|
|
2893
|
+
model_config = ConfigDict(
|
|
2894
|
+
extra="allow",
|
|
2895
|
+
)
|
|
2896
|
+
code: Literal[0]
|
|
2897
|
+
msg: str
|
|
2898
|
+
errcode: Literal[0]
|
|
2899
|
+
errmsg: str
|
|
2900
|
+
"""
|
|
2901
|
+
Legacy alias of `msg`; always present in these operations.
|
|
2902
|
+
"""
|
|
2903
|
+
users: list[DirectoryUser]
|
|
2904
|
+
"""
|
|
2905
|
+
Unpaged and unordered matches from the caller's institute.
|
|
2906
|
+
"""
|
|
2907
|
+
|
|
2908
|
+
|
|
2909
|
+
class ImportRecordsRequest(BaseModel):
|
|
2910
|
+
model_config = ConfigDict(
|
|
2911
|
+
extra="forbid",
|
|
2912
|
+
)
|
|
2913
|
+
eln: Annotated[str, Field(min_length=1)]
|
|
2914
|
+
template: Annotated[str, Field(min_length=1)]
|
|
2915
|
+
dataset: Annotated[list[ImportRecordItem], Field(max_length=100, min_length=1)]
|
|
2916
|
+
user: Annotated[int | None, Field(ge=1)] = None
|
|
2917
|
+
"""
|
|
2918
|
+
Missing or null selects the authenticated user.
|
|
2919
|
+
"""
|
|
2920
|
+
template_user: Annotated[int | None, Field(ge=1)] = None
|
|
2921
|
+
"""
|
|
2922
|
+
Missing or null selects the authenticated user.
|
|
2923
|
+
"""
|
|
2924
|
+
|
|
2925
|
+
|
|
2926
|
+
class NotebookSelector(RootModel[NotebookSelector1 | SharedNotebookSelector]):
|
|
2927
|
+
root: NotebookSelector1 | SharedNotebookSelector
|
|
2928
|
+
|
|
2929
|
+
|
|
2930
|
+
class Uid(BaseModel):
|
|
2931
|
+
model_config = ConfigDict(
|
|
2932
|
+
extra="forbid",
|
|
2933
|
+
)
|
|
2934
|
+
uid: Annotated[str, Field(min_length=1)]
|
|
2935
|
+
eln: NotebookSelector
|
|
2936
|
+
|
|
2937
|
+
|
|
2938
|
+
class ExportRecordsRequest(BaseModel):
|
|
2939
|
+
model_config = ConfigDict(
|
|
2940
|
+
extra="forbid",
|
|
2941
|
+
)
|
|
2942
|
+
uids: Annotated[list[Uid], Field(min_length=1)]
|
|
2943
|
+
|
|
2944
|
+
|
|
2945
|
+
class ExportRecordsResponse(BaseModel):
|
|
2946
|
+
model_config = ConfigDict(
|
|
2947
|
+
extra="allow",
|
|
2948
|
+
)
|
|
2949
|
+
code: Code
|
|
2950
|
+
msg: str
|
|
2951
|
+
errcode: Errcode
|
|
2952
|
+
errmsg: str
|
|
2953
|
+
"""
|
|
2954
|
+
Legacy alias of `msg`; always present in these operations.
|
|
2955
|
+
"""
|
|
2956
|
+
dataset: list[ExportRecordItem]
|
|
2957
|
+
|
|
2958
|
+
|
|
2959
|
+
class SearchRecordsRequest(BaseModel):
|
|
2960
|
+
model_config = ConfigDict(
|
|
2961
|
+
extra="forbid",
|
|
2962
|
+
)
|
|
2963
|
+
eln: Annotated[list[NotebookSelector] | None, Field(validate_default=True)] = []
|
|
2964
|
+
"""
|
|
2965
|
+
Missing, null, or an empty array searches all notebooks owned by the caller.
|
|
2966
|
+
"""
|
|
2967
|
+
requests: Annotated[list[SearchExtractionRequest], Field(max_length=24, min_length=1)]
|
|
2968
|
+
date_start: str | None = ""
|
|
2969
|
+
date_end: str | None = ""
|
|
2970
|
+
keywords: list[str] | None = []
|
|
2971
|
+
|
|
2972
|
+
|
|
2973
|
+
class SearchRecordsResponse(BaseModel):
|
|
2974
|
+
model_config = ConfigDict(
|
|
2975
|
+
extra="allow",
|
|
2976
|
+
)
|
|
2977
|
+
code: Code
|
|
2978
|
+
msg: str
|
|
2979
|
+
errcode: Errcode
|
|
2980
|
+
errmsg: str
|
|
2981
|
+
"""
|
|
2982
|
+
Legacy alias of `msg`; always present in these operations.
|
|
2983
|
+
"""
|
|
2984
|
+
data: list[SearchRecordItem]
|
|
2985
|
+
|
|
2986
|
+
|
|
2987
|
+
class UpdateRecordRequest(BaseModel):
|
|
2988
|
+
model_config = ConfigDict(
|
|
2989
|
+
extra="forbid",
|
|
2990
|
+
)
|
|
2991
|
+
eln: Annotated[str, Field(min_length=1)]
|
|
2992
|
+
uid: Annotated[str, Field(min_length=1)]
|
|
2993
|
+
user: User3 | User4 | None = None
|
|
2994
|
+
password: str | None = ""
|
|
2995
|
+
quote: list[QuoteRequest] | None = None
|
|
2996
|
+
del_: Annotated[list[PathOperation] | None, Field(alias="del")] = None
|
|
2997
|
+
delModule: list[DeleteModuleOperation] | None = None
|
|
2998
|
+
addModule: list[AddModuleOperation] | None = None
|
|
2999
|
+
add: list[AddValueOperation] | None = None
|
|
3000
|
+
modify: list[ModifyItem] | None = None
|
|
3001
|
+
|
|
3002
|
+
|
|
3003
|
+
class PublicRecordListResponse(BaseModel):
|
|
3004
|
+
model_config = ConfigDict(
|
|
3005
|
+
extra="allow",
|
|
3006
|
+
)
|
|
3007
|
+
code: Literal[0]
|
|
3008
|
+
msg: str
|
|
3009
|
+
errcode: Literal[0]
|
|
3010
|
+
errmsg: str
|
|
3011
|
+
"""
|
|
3012
|
+
Legacy alias of `msg`; always present in these operations.
|
|
3013
|
+
"""
|
|
3014
|
+
items: list[PublicRecordItem]
|
|
3015
|
+
|
|
3016
|
+
|
|
3017
|
+
class RecordPageResponse(BaseModel):
|
|
3018
|
+
model_config = ConfigDict(
|
|
3019
|
+
extra="allow",
|
|
3020
|
+
)
|
|
3021
|
+
code: Literal[0]
|
|
3022
|
+
msg: str
|
|
3023
|
+
errcode: Literal[0]
|
|
3024
|
+
errmsg: str
|
|
3025
|
+
"""
|
|
3026
|
+
Legacy alias of `msg`; always present in these operations.
|
|
3027
|
+
"""
|
|
3028
|
+
items: list[RecordListItem]
|
|
3029
|
+
subtypes: list[RecordSubtype]
|
|
3030
|
+
trash_num: Annotated[int, Field(ge=0)]
|
|
3031
|
+
ids: list[Id]
|
|
3032
|
+
page: Annotated[int, Field(ge=1)]
|
|
3033
|
+
eln: RecordPageNotebook
|
|
3034
|
+
keywords: list[Any]
|
|
3035
|
+
public_assoc: list[PublicAssociation]
|
|
3036
|
+
resource_assoc: list[ResourceAssociation]
|
|
3037
|
+
link_power: bool
|
|
3038
|
+
links: list[RecordShareLink]
|
|
3039
|
+
agreement: str
|
|
3040
|
+
agreement_title: str
|
|
3041
|
+
|
|
3042
|
+
|
|
3043
|
+
class DeletedRecordPageResponse(BaseModel):
|
|
3044
|
+
model_config = ConfigDict(
|
|
3045
|
+
extra="allow",
|
|
3046
|
+
)
|
|
3047
|
+
code: Code
|
|
3048
|
+
msg: str
|
|
3049
|
+
errcode: Errcode
|
|
3050
|
+
errmsg: str
|
|
3051
|
+
"""
|
|
3052
|
+
Legacy alias of `msg`; always present in these operations.
|
|
3053
|
+
"""
|
|
3054
|
+
items: list[DeletedRecordItem]
|
|
3055
|
+
eln: DeletedRecordNotebook
|
|
3056
|
+
count: Annotated[int, Field(ge=0)]
|
|
3057
|
+
page: Annotated[int, Field(ge=1)]
|
|
3058
|
+
|
|
3059
|
+
|
|
3060
|
+
class RelationListResponse(BaseModel):
|
|
3061
|
+
model_config = ConfigDict(
|
|
3062
|
+
extra="allow",
|
|
3063
|
+
)
|
|
3064
|
+
code: Literal[0]
|
|
3065
|
+
msg: str
|
|
3066
|
+
errcode: Literal[0]
|
|
3067
|
+
errmsg: str
|
|
3068
|
+
"""
|
|
3069
|
+
Legacy alias of `msg`; always present in these operations.
|
|
3070
|
+
"""
|
|
3071
|
+
items: list[RelatedRecordItem]
|
|
3072
|
+
more: list[RecordComment]
|
|
3073
|
+
editable: bool
|
|
3074
|
+
|
|
3075
|
+
|
|
3076
|
+
class CommentListResponse(BaseModel):
|
|
3077
|
+
model_config = ConfigDict(
|
|
3078
|
+
extra="allow",
|
|
3079
|
+
)
|
|
3080
|
+
code: Literal[0]
|
|
3081
|
+
msg: str
|
|
3082
|
+
errcode: Literal[0]
|
|
3083
|
+
errmsg: str
|
|
3084
|
+
"""
|
|
3085
|
+
Legacy alias of `msg`; always present in these operations.
|
|
3086
|
+
"""
|
|
3087
|
+
mores: list[RecordComment]
|
|
3088
|
+
|
|
3089
|
+
|
|
3090
|
+
class NotebookShareListResponse(BaseModel):
|
|
3091
|
+
model_config = ConfigDict(
|
|
3092
|
+
extra="allow",
|
|
3093
|
+
)
|
|
3094
|
+
code: Literal[0]
|
|
3095
|
+
msg: str
|
|
3096
|
+
errcode: Literal[0]
|
|
3097
|
+
errmsg: str
|
|
3098
|
+
"""
|
|
3099
|
+
Legacy alias of `msg`; always present in these operations.
|
|
3100
|
+
"""
|
|
3101
|
+
list_: Annotated[list[NotebookShare], Field(alias="list")]
|
|
3102
|
+
owner: bool
|
|
3103
|
+
"""
|
|
3104
|
+
True only when the authenticated caller owns the notebook.
|
|
3105
|
+
"""
|
|
3106
|
+
power: Annotated[int, Field(ge=0, le=65535)]
|
|
3107
|
+
"""
|
|
3108
|
+
Caller's effective notebook permission mask.
|
|
3109
|
+
"""
|
|
3110
|
+
|
|
3111
|
+
|
|
3112
|
+
class ElnNotebook(BaseModel):
|
|
3113
|
+
model_config = ConfigDict(
|
|
3114
|
+
extra="allow",
|
|
3115
|
+
)
|
|
3116
|
+
id: Annotated[int, Field(ge=1)]
|
|
3117
|
+
showtext: Annotated[str | None, Field(...)]
|
|
3118
|
+
sn: Annotated[str | None, Field(...)]
|
|
3119
|
+
num_total: Annotated[int, Field(ge=0)]
|
|
3120
|
+
modify: str
|
|
3121
|
+
"""
|
|
3122
|
+
Localized relative-time text computed when the response is built.
|
|
3123
|
+
"""
|
|
3124
|
+
datetime_create: Annotated[str | None, Field(...)]
|
|
3125
|
+
comm: Annotated[str | None, Field(...)]
|
|
3126
|
+
group_name: Annotated[str | None, Field(...)]
|
|
3127
|
+
username: str
|
|
3128
|
+
email: str
|
|
3129
|
+
server: str
|
|
3130
|
+
userid_to: Annotated[int | None, Field(...)]
|
|
3131
|
+
share_num: Annotated[int, Field(ge=0)]
|
|
3132
|
+
share_id: Annotated[int, Field(ge=0)]
|
|
3133
|
+
trans_username: str
|
|
3134
|
+
owner: bool
|
|
3135
|
+
userid: Annotated[int, Field(ge=1)]
|
|
3136
|
+
types: list[Any]
|
|
3137
|
+
keywords: list[Any]
|
|
3138
|
+
power: Annotated[int, Field(ge=0)]
|
|
3139
|
+
display: Display1
|
|
3140
|
+
requests: Annotated[str | None, Field(...)]
|
|
3141
|
+
"""
|
|
3142
|
+
Raw JSON database column; this controller does not decode it.
|
|
3143
|
+
"""
|
|
3144
|
+
avatar: str | DeferredUserField | None = None
|
|
3145
|
+
"""
|
|
3146
|
+
Conditional; returned for a notebook not owned by the caller. Normally
|
|
3147
|
+
resolved to the owner's avatar filename or null. The raw Provider
|
|
3148
|
+
lookup descriptor remains when no matching user can be resolved.
|
|
3149
|
+
|
|
3150
|
+
"""
|
|
3151
|
+
|
|
3152
|
+
|
|
3153
|
+
class RecordListResponse(BaseModel):
|
|
3154
|
+
model_config = ConfigDict(
|
|
3155
|
+
extra="allow",
|
|
3156
|
+
)
|
|
3157
|
+
code: Code
|
|
3158
|
+
msg: str
|
|
3159
|
+
errcode: Errcode
|
|
3160
|
+
errmsg: str
|
|
3161
|
+
"""
|
|
3162
|
+
Legacy alias of `msg`; always present in these operations.
|
|
3163
|
+
"""
|
|
3164
|
+
items: list[RecordListItem]
|
|
3165
|
+
subtypes: list[RecordSubtype]
|
|
3166
|
+
trash_num: Annotated[int, Field(ge=0)]
|
|
3167
|
+
|
|
3168
|
+
|
|
3169
|
+
class ItemViewResponse(BaseModel):
|
|
3170
|
+
model_config = ConfigDict(
|
|
3171
|
+
extra="allow",
|
|
3172
|
+
)
|
|
3173
|
+
code: Literal[0]
|
|
3174
|
+
msg: str
|
|
3175
|
+
errcode: Literal[0]
|
|
3176
|
+
errmsg: str
|
|
3177
|
+
"""
|
|
3178
|
+
Legacy alias of `msg`; always present in these operations.
|
|
3179
|
+
"""
|
|
3180
|
+
title: Annotated[str | None, Field(...)]
|
|
3181
|
+
keywords: Annotated[list[str] | None, Field(...)]
|
|
3182
|
+
modules: list[TemplateModule]
|
|
3183
|
+
"""
|
|
3184
|
+
Canonical record modules; module objects remain an open JSON structure.
|
|
3185
|
+
"""
|
|
3186
|
+
template_id: Annotated[int | None, Field(...)]
|
|
3187
|
+
datetime_modify: Annotated[int, Field(ge=0)]
|
|
3188
|
+
"""
|
|
3189
|
+
Unix timestamp in milliseconds.
|
|
3190
|
+
"""
|
|
3191
|
+
username: Annotated[str | None, Field(...)]
|
|
3192
|
+
modify_log: list[RecordVersion]
|
|
3193
|
+
uid: Annotated[str | None, Field(...)]
|
|
3194
|
+
"""
|
|
3195
|
+
Historical version `sn` is nullable.
|
|
3196
|
+
"""
|
|
3197
|
+
current_version: Annotated[int, Field(ge=0)]
|
|
3198
|
+
item_id: Annotated[int, Field(ge=1)]
|
|
3199
|
+
datetime_locked: Annotated[int, Field(ge=0)]
|
|
3200
|
+
"""
|
|
3201
|
+
Unix timestamp in milliseconds, or zero.
|
|
3202
|
+
"""
|
|
3203
|
+
locked: bool
|
|
3204
|
+
signs: list[RecordSignature]
|
|
3205
|
+
signed: bool
|
|
3206
|
+
owner: bool
|
|
3207
|
+
eln_text: Annotated[str | None, Field(...)]
|
|
3208
|
+
eln_server: str
|
|
3209
|
+
eln_id: Annotated[int, Field(ge=1)]
|
|
3210
|
+
editable: bool
|
|
3211
|
+
keyword_eln: list[Any]
|
|
3212
|
+
pdf_enable: bool
|
|
3213
|
+
template_show: str
|
|
3214
|
+
"""
|
|
3215
|
+
Template render metadata; PHP normalizes missing or null to an empty string.
|
|
3216
|
+
"""
|
|
3217
|
+
template_text: str
|
|
3218
|
+
"""
|
|
3219
|
+
Template title; PHP normalizes missing or null to an empty string.
|
|
3220
|
+
"""
|
|
3221
|
+
template_intro: str
|
|
3222
|
+
"""
|
|
3223
|
+
Template usage HTML; PHP normalizes missing or null to an empty string.
|
|
3224
|
+
"""
|
|
3225
|
+
|
|
3226
|
+
|
|
3227
|
+
class LiteratureLibrariesResponse(BaseModel):
|
|
3228
|
+
model_config = ConfigDict(
|
|
3229
|
+
extra="allow",
|
|
3230
|
+
)
|
|
3231
|
+
code: Literal[0]
|
|
3232
|
+
msg: str
|
|
3233
|
+
errcode: Literal[0]
|
|
3234
|
+
errmsg: str
|
|
3235
|
+
"""
|
|
3236
|
+
Legacy alias of `msg`; always present in these operations.
|
|
3237
|
+
"""
|
|
3238
|
+
stores: list[LiteratureLibrary]
|
|
3239
|
+
share: list[IncomingLiteratureShare]
|
|
3240
|
+
share_comments: list[LiteratureShareComment]
|
|
3241
|
+
|
|
3242
|
+
|
|
3243
|
+
class LiteratureListResponse(BaseModel):
|
|
3244
|
+
model_config = ConfigDict(
|
|
3245
|
+
extra="allow",
|
|
3246
|
+
)
|
|
3247
|
+
code: Literal[0]
|
|
3248
|
+
msg: str
|
|
3249
|
+
errcode: Literal[0]
|
|
3250
|
+
errmsg: str
|
|
3251
|
+
"""
|
|
3252
|
+
Legacy alias of `msg`; always present in these operations.
|
|
3253
|
+
"""
|
|
3254
|
+
items: list[LiteratureListItem]
|
|
3255
|
+
keywords: list[str]
|
|
3256
|
+
"""
|
|
3257
|
+
Library-level keywords; invalid or null JSON is normalized to an empty array.
|
|
3258
|
+
"""
|
|
3259
|
+
count: Annotated[int, Field(ge=0)]
|
|
3260
|
+
"""
|
|
3261
|
+
Total number of valid items matching the filters before pagination.
|
|
3262
|
+
"""
|
|
3263
|
+
store_name: str
|
|
3264
|
+
power: Annotated[int, Field(ge=0)]
|
|
3265
|
+
"""
|
|
3266
|
+
Caller permission bitmask for the selected library.
|
|
3267
|
+
"""
|
|
3268
|
+
|
|
3269
|
+
|
|
3270
|
+
class ExtractedLiteratureMetadata(BaseModel):
|
|
3271
|
+
model_config = ConfigDict(
|
|
3272
|
+
extra="allow",
|
|
3273
|
+
)
|
|
3274
|
+
DOI: str | None = None
|
|
3275
|
+
url: str | None = None
|
|
3276
|
+
date: str | None = None
|
|
3277
|
+
"""
|
|
3278
|
+
External publication-date string; Consumers must not assume full-date precision.
|
|
3279
|
+
"""
|
|
3280
|
+
publisher: str | None = None
|
|
3281
|
+
publication: str | None = None
|
|
3282
|
+
issue: str | None = None
|
|
3283
|
+
volume: str | None = None
|
|
3284
|
+
page: str | None = None
|
|
3285
|
+
title: str | None = None
|
|
3286
|
+
abstract: str | None = None
|
|
3287
|
+
authors: list[ExtractedLiteratureAuthor] | None = None
|
|
3288
|
+
keywords: list[str] | None = None
|
|
3289
|
+
refs: list[str] | None = None
|
|
3290
|
+
fundings: list[Any] | None = None
|
|
3291
|
+
language: str | None = None
|
|
3292
|
+
citation_count: Annotated[int | None, Field(ge=0)] = None
|
|
3293
|
+
|
|
3294
|
+
|
|
3295
|
+
class SaveLiteratureContent(BaseModel):
|
|
3296
|
+
model_config = ConfigDict(
|
|
3297
|
+
extra="forbid",
|
|
3298
|
+
)
|
|
3299
|
+
title: Annotated[str, Field(min_length=1)]
|
|
3300
|
+
journal: str | None = None
|
|
3301
|
+
info: LiteratureCitationInfoInput | None = None
|
|
3302
|
+
author: str | None = None
|
|
3303
|
+
keywords: Annotated[list[Keyword] | None, Field(validate_default=True)] = []
|
|
3304
|
+
abstract: str | None = ""
|
|
3305
|
+
doi: str | None = None
|
|
3306
|
+
url: str | None = None
|
|
3307
|
+
reference: Annotated[list[ReferenceItem] | None, Field(validate_default=True)] = []
|
|
3308
|
+
|
|
3309
|
+
|
|
3310
|
+
class LiteratureContentObject(BaseModel):
|
|
3311
|
+
model_config = ConfigDict(
|
|
3312
|
+
extra="allow",
|
|
3313
|
+
)
|
|
3314
|
+
title: str | None = None
|
|
3315
|
+
journal: str | None = None
|
|
3316
|
+
info: LiteratureCitationInfo | None = None
|
|
3317
|
+
author: str | None = None
|
|
3318
|
+
authors: list[str] | None = None
|
|
3319
|
+
keywords: list[str] | None = None
|
|
3320
|
+
abstract: str | None = None
|
|
3321
|
+
reference_information: str | None = None
|
|
3322
|
+
doi: str | None = None
|
|
3323
|
+
url: str | None = None
|
|
3324
|
+
reference: list[str] | None = None
|
|
3325
|
+
|
|
3326
|
+
|
|
3327
|
+
class LiteratureFieldDefinition(BaseModel):
|
|
3328
|
+
model_config = ConfigDict(
|
|
3329
|
+
extra="allow",
|
|
3330
|
+
)
|
|
3331
|
+
group: str | None = None
|
|
3332
|
+
name: str | Name
|
|
3333
|
+
id: Annotated[str, Field(min_length=1)]
|
|
3334
|
+
type: Type2
|
|
3335
|
+
required: bool | None = None
|
|
3336
|
+
comm: str | Comm1 | None = None
|
|
3337
|
+
print: str | None = None
|
|
3338
|
+
template: list[LiteratureNestedFieldDefinition] | None = None
|
|
3339
|
+
show: bool | None = None
|
|
3340
|
+
width: Annotated[int | None, Field(ge=1)] = None
|
|
3341
|
+
condition: LiteratureFieldCondition | None = None
|
|
3342
|
+
|
|
3343
|
+
|
|
3344
|
+
class LoginTokenSetResponse(RootModel[TokenLoginResponse | ErrorResponse]):
|
|
3345
|
+
root: TokenLoginResponse | ErrorResponse
|
|
3346
|
+
|
|
3347
|
+
|
|
3348
|
+
class RefreshTokenSetResponse(RootModel[TokenRefreshResponse | ErrorResponse]):
|
|
3349
|
+
root: TokenRefreshResponse | ErrorResponse
|
|
3350
|
+
|
|
3351
|
+
|
|
3352
|
+
class ExchangeChatSsoCodeResponse(RootModel[ChatSsoCodeExchangeResponse | ErrorResponse]):
|
|
3353
|
+
root: ChatSsoCodeExchangeResponse | ErrorResponse
|
|
3354
|
+
|
|
3355
|
+
|
|
3356
|
+
class ListTemplatesResponse(RootModel[TemplateListResponse | ErrorResponse]):
|
|
3357
|
+
root: TemplateListResponse | ErrorResponse
|
|
3358
|
+
|
|
3359
|
+
|
|
3360
|
+
class ListTemplateStoreResponse(RootModel[TemplateStoreListResponse | ErrorResponse]):
|
|
3361
|
+
root: TemplateStoreListResponse | ErrorResponse
|
|
3362
|
+
|
|
3363
|
+
|
|
3364
|
+
class ListCurrentUserElnGroupsResponse(RootModel[ElnGroupsResponse | ErrorResponse]):
|
|
3365
|
+
root: ElnGroupsResponse | ErrorResponse
|
|
3366
|
+
|
|
3367
|
+
|
|
3368
|
+
class SearchUsersResponse(RootModel[UserDirectorySearchResponse | ErrorResponse]):
|
|
3369
|
+
root: UserDirectorySearchResponse | ErrorResponse
|
|
3370
|
+
|
|
3371
|
+
|
|
3372
|
+
class ListNotebookSharesResponse(RootModel[NotebookShareListResponse | ErrorResponse]):
|
|
3373
|
+
root: NotebookShareListResponse | ErrorResponse
|
|
3374
|
+
|
|
3375
|
+
|
|
3376
|
+
class ListNotebookRecordsResponse(RootModel[RecordListResponse | ErrorResponse]):
|
|
3377
|
+
root: RecordListResponse | ErrorResponse
|
|
3378
|
+
|
|
3379
|
+
|
|
3380
|
+
class ExportRecordsResponse1(RootModel[ExportRecordsResponse | ErrorResponse]):
|
|
3381
|
+
root: ExportRecordsResponse | ErrorResponse
|
|
3382
|
+
|
|
3383
|
+
|
|
3384
|
+
class SearchRecordDataResponse(RootModel[SearchRecordsResponse | ErrorResponse]):
|
|
3385
|
+
root: SearchRecordsResponse | ErrorResponse
|
|
3386
|
+
|
|
3387
|
+
|
|
3388
|
+
class ListPublicNotebookRecordsResponse(RootModel[PublicRecordListResponse | ErrorResponse]):
|
|
3389
|
+
root: PublicRecordListResponse | ErrorResponse
|
|
3390
|
+
|
|
3391
|
+
|
|
3392
|
+
class ListNotebookRecordPageResponse(RootModel[RecordPageResponse | ErrorResponse]):
|
|
3393
|
+
root: RecordPageResponse | ErrorResponse
|
|
3394
|
+
|
|
3395
|
+
|
|
3396
|
+
class ListDeletedRecordPageResponse(RootModel[DeletedRecordPageResponse | ErrorResponse]):
|
|
3397
|
+
root: DeletedRecordPageResponse | ErrorResponse
|
|
3398
|
+
|
|
3399
|
+
|
|
3400
|
+
class ListRecordRelationsResponse(RootModel[RelationListResponse | ErrorResponse]):
|
|
3401
|
+
root: RelationListResponse | ErrorResponse
|
|
3402
|
+
|
|
3403
|
+
|
|
3404
|
+
class ListRecordCommentsResponse(RootModel[CommentListResponse | ErrorResponse]):
|
|
3405
|
+
root: CommentListResponse | ErrorResponse
|
|
3406
|
+
|
|
3407
|
+
|
|
3408
|
+
class ReadRecordResponse(RootModel[ItemViewResponse | ErrorResponse]):
|
|
3409
|
+
root: ItemViewResponse | ErrorResponse
|
|
3410
|
+
|
|
3411
|
+
|
|
3412
|
+
class ListLiteratureLibrariesResponse(RootModel[LiteratureLibrariesResponse | ErrorResponse]):
|
|
3413
|
+
root: LiteratureLibrariesResponse | ErrorResponse
|
|
3414
|
+
|
|
3415
|
+
|
|
3416
|
+
class ListLiteratureItemsResponse(RootModel[LiteratureListResponse | ErrorResponse]):
|
|
3417
|
+
root: LiteratureListResponse | ErrorResponse
|
|
3418
|
+
|
|
3419
|
+
|
|
3420
|
+
class ListCloudDriveFilesResponse(RootModel[CloudDriveFileListResponse | ErrorResponse]):
|
|
3421
|
+
root: CloudDriveFileListResponse | ErrorResponse
|
|
3422
|
+
|
|
3423
|
+
|
|
3424
|
+
class AppIdentityResponse(BaseModel):
|
|
3425
|
+
model_config = ConfigDict(
|
|
3426
|
+
extra="allow",
|
|
3427
|
+
)
|
|
3428
|
+
code: Literal[0]
|
|
3429
|
+
msg: str
|
|
3430
|
+
errcode: Literal[0]
|
|
3431
|
+
errmsg: str
|
|
3432
|
+
"""
|
|
3433
|
+
Legacy alias of `msg`; always present in these operations.
|
|
3434
|
+
"""
|
|
3435
|
+
user: AppUser
|
|
3436
|
+
notifications: Annotated[list[AppNotification], Field(max_length=5)]
|
|
3437
|
+
env: AppEnvironment
|
|
3438
|
+
ai_enable: bool
|
|
3439
|
+
ai_text: Annotated[list[str], Field(min_length=1)]
|
|
3440
|
+
institute: str
|
|
3441
|
+
institute_eng: str
|
|
3442
|
+
product_name: str
|
|
3443
|
+
product_name_eng: str
|
|
3444
|
+
menu: list[AppMenu]
|
|
3445
|
+
|
|
3446
|
+
|
|
3447
|
+
class NotebookListResponse(BaseModel):
|
|
3448
|
+
model_config = ConfigDict(
|
|
3449
|
+
extra="allow",
|
|
3450
|
+
)
|
|
3451
|
+
code: Literal[0]
|
|
3452
|
+
msg: str
|
|
3453
|
+
errcode: Literal[0]
|
|
3454
|
+
errmsg: str
|
|
3455
|
+
"""
|
|
3456
|
+
Legacy alias of `msg`; always present in these operations.
|
|
3457
|
+
"""
|
|
3458
|
+
my: list[ElnNotebook]
|
|
3459
|
+
share: list[ElnNotebook]
|
|
3460
|
+
public: list[PublicNotebook]
|
|
3461
|
+
|
|
3462
|
+
|
|
3463
|
+
class LiteratureTemplateResponse(BaseModel):
|
|
3464
|
+
model_config = ConfigDict(
|
|
3465
|
+
extra="allow",
|
|
3466
|
+
)
|
|
3467
|
+
code: Literal[0]
|
|
3468
|
+
msg: str
|
|
3469
|
+
errcode: Literal[0]
|
|
3470
|
+
errmsg: str
|
|
3471
|
+
"""
|
|
3472
|
+
Legacy alias of `msg`; always present in these operations.
|
|
3473
|
+
"""
|
|
3474
|
+
template: Annotated[list[LiteratureFieldDefinition], Field(max_length=10, min_length=10)]
|
|
3475
|
+
doipdf: bool
|
|
3476
|
+
"""
|
|
3477
|
+
Whether this deployment configured the optional DOI/PDF extraction backend.
|
|
3478
|
+
"""
|
|
3479
|
+
|
|
3480
|
+
|
|
3481
|
+
class LiteratureMetadataExtractionResponse(BaseModel):
|
|
3482
|
+
model_config = ConfigDict(
|
|
3483
|
+
extra="allow",
|
|
3484
|
+
)
|
|
3485
|
+
code: Literal[0]
|
|
3486
|
+
msg: str
|
|
3487
|
+
errcode: Literal[0]
|
|
3488
|
+
errmsg: str
|
|
3489
|
+
"""
|
|
3490
|
+
Legacy alias of `msg`; always present in these operations.
|
|
3491
|
+
"""
|
|
3492
|
+
doi: ExtractedLiteratureMetadata
|
|
3493
|
+
|
|
3494
|
+
|
|
3495
|
+
class LiteratureContent(RootModel[LiteratureContentObject | LiteratureContent1]):
|
|
3496
|
+
root: LiteratureContentObject | LiteratureContent1
|
|
3497
|
+
|
|
3498
|
+
|
|
3499
|
+
class ResolveCurrentIdentityResponse(RootModel[AppIdentityResponse | ErrorResponse]):
|
|
3500
|
+
root: AppIdentityResponse | ErrorResponse
|
|
3501
|
+
|
|
3502
|
+
|
|
3503
|
+
class ListNotebooksResponse(RootModel[NotebookListResponse | ErrorResponse]):
|
|
3504
|
+
root: NotebookListResponse | ErrorResponse
|
|
3505
|
+
|
|
3506
|
+
|
|
3507
|
+
class ReadLiteratureCreateTemplateResponse(RootModel[LiteratureTemplateResponse | ErrorResponse]):
|
|
3508
|
+
root: LiteratureTemplateResponse | ErrorResponse
|
|
3509
|
+
|
|
3510
|
+
|
|
3511
|
+
class ExtractLiteratureMetadataResponse(RootModel[LiteratureMetadataExtractionResponse | ErrorResponse]):
|
|
3512
|
+
root: LiteratureMetadataExtractionResponse | ErrorResponse
|
|
3513
|
+
|
|
3514
|
+
|
|
3515
|
+
class LiteratureDetailResponse(BaseModel):
|
|
3516
|
+
model_config = ConfigDict(
|
|
3517
|
+
extra="allow",
|
|
3518
|
+
)
|
|
3519
|
+
code: Literal[0]
|
|
3520
|
+
msg: str
|
|
3521
|
+
errcode: Literal[0]
|
|
3522
|
+
errmsg: str
|
|
3523
|
+
"""
|
|
3524
|
+
Legacy alias of `msg`; always present in these operations.
|
|
3525
|
+
"""
|
|
3526
|
+
template: Annotated[list[LiteratureFieldDefinition], Field(max_length=10, min_length=10)]
|
|
3527
|
+
"""
|
|
3528
|
+
Static Provider field definitions from `RecommendTrait::fav_template`.
|
|
3529
|
+
"""
|
|
3530
|
+
content: LiteratureContent
|
|
3531
|
+
keywords: list[str]
|
|
3532
|
+
"""
|
|
3533
|
+
Library-level keywords.
|
|
3534
|
+
"""
|
|
3535
|
+
keywords_item: list[str]
|
|
3536
|
+
"""
|
|
3537
|
+
Keywords attached to this literature item.
|
|
3538
|
+
"""
|
|
3539
|
+
star: Annotated[int, Field(ge=0, le=5)]
|
|
3540
|
+
comments: list[LiteratureComment]
|
|
3541
|
+
"""
|
|
3542
|
+
Ordered by descending comment id.
|
|
3543
|
+
"""
|
|
3544
|
+
filename: Annotated[str | None, Field(...)]
|
|
3545
|
+
hash: Annotated[str | None, Field(...)]
|
|
3546
|
+
size: Annotated[int | None, Field(ge=0)]
|
|
3547
|
+
source: Source
|
|
3548
|
+
power: Annotated[int, Field(ge=0)]
|
|
3549
|
+
store_name: str
|
|
3550
|
+
|
|
3551
|
+
|
|
3552
|
+
class ReadLiteratureDetailResponse(RootModel[LiteratureDetailResponse | ErrorResponse]):
|
|
3553
|
+
root: LiteratureDetailResponse | ErrorResponse
|