karakeep-python-api 0.1.0__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.
- karakeep_python_api/__init__.py +19 -0
- karakeep_python_api/__main__.py +509 -0
- karakeep_python_api/datatypes.py +199 -0
- karakeep_python_api/karakeep_api.py +1630 -0
- karakeep_python_api/openapi_reference.json +2901 -0
- karakeep_python_api-0.1.0.dist-info/METADATA +256 -0
- karakeep_python_api-0.1.0.dist-info/RECORD +11 -0
- karakeep_python_api-0.1.0.dist-info/WHEEL +5 -0
- karakeep_python_api-0.1.0.dist-info/entry_points.txt +2 -0
- karakeep_python_api-0.1.0.dist-info/licenses/LICENSE +674 -0
- karakeep_python_api-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: openapi_reference.json
|
|
3
|
+
# timestamp: 2025-05-04T21:59:34+00:00
|
|
4
|
+
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
from enum import Enum
|
|
8
|
+
from typing import List, Optional, Union
|
|
9
|
+
|
|
10
|
+
from pydantic import BaseModel, Field, RootModel
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class AssetId(RootModel[str]):
|
|
14
|
+
root: str = Field(..., example="ieidlxygmwj87oxz5hxttoc8")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class BookmarkId(RootModel[str]):
|
|
18
|
+
root: str = Field(..., example="ieidlxygmwj87oxz5hxttoc8")
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class ListId(RootModel[str]):
|
|
22
|
+
root: str = Field(..., example="ieidlxygmwj87oxz5hxttoc8")
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class TagId(RootModel[str]):
|
|
26
|
+
root: str = Field(..., example="ieidlxygmwj87oxz5hxttoc8")
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class HighlightId(RootModel[str]):
|
|
30
|
+
root: str = Field(..., example="ieidlxygmwj87oxz5hxttoc8")
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class TaggingStatus(Enum):
|
|
34
|
+
success = "success"
|
|
35
|
+
failure = "failure"
|
|
36
|
+
pending = "pending"
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class AttachedBy(Enum):
|
|
40
|
+
ai = "ai"
|
|
41
|
+
human = "human"
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class Tag(BaseModel):
|
|
45
|
+
id: str
|
|
46
|
+
name: str
|
|
47
|
+
attachedBy: AttachedBy
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class Type(Enum):
|
|
51
|
+
link = "link"
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class Content(BaseModel):
|
|
55
|
+
type: Type
|
|
56
|
+
url: str
|
|
57
|
+
title: Optional[str] = None
|
|
58
|
+
description: Optional[str] = None
|
|
59
|
+
imageUrl: Optional[str] = None
|
|
60
|
+
imageAssetId: Optional[str] = None
|
|
61
|
+
screenshotAssetId: Optional[str] = None
|
|
62
|
+
fullPageArchiveAssetId: Optional[str] = None
|
|
63
|
+
precrawledArchiveAssetId: Optional[str] = None
|
|
64
|
+
videoAssetId: Optional[str] = None
|
|
65
|
+
favicon: Optional[str] = None
|
|
66
|
+
htmlContent: Optional[str] = None
|
|
67
|
+
crawledAt: Optional[str] = None
|
|
68
|
+
author: Optional[str] = None
|
|
69
|
+
publisher: Optional[str] = None
|
|
70
|
+
datePublished: Optional[str] = None
|
|
71
|
+
dateModified: Optional[str] = None
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
class Type1(Enum):
|
|
75
|
+
text = "text"
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class Content1(BaseModel):
|
|
79
|
+
type: Type1
|
|
80
|
+
text: str
|
|
81
|
+
sourceUrl: Optional[str] = None
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
class Type2(Enum):
|
|
85
|
+
asset = "asset"
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class AssetType(Enum):
|
|
89
|
+
image = "image"
|
|
90
|
+
pdf = "pdf"
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class Content2(BaseModel):
|
|
94
|
+
type: Type2
|
|
95
|
+
assetType: AssetType
|
|
96
|
+
assetId: str
|
|
97
|
+
fileName: Optional[str] = None
|
|
98
|
+
sourceUrl: Optional[str] = None
|
|
99
|
+
size: Optional[float] = None
|
|
100
|
+
content: Optional[str] = None
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class Type3(Enum):
|
|
104
|
+
unknown = "unknown"
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
class Content3(BaseModel):
|
|
108
|
+
type: Type3
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class AssetType1(Enum):
|
|
112
|
+
screenshot = "screenshot"
|
|
113
|
+
assetScreenshot = "assetScreenshot"
|
|
114
|
+
bannerImage = "bannerImage"
|
|
115
|
+
fullPageArchive = "fullPageArchive"
|
|
116
|
+
video = "video"
|
|
117
|
+
bookmarkAsset = "bookmarkAsset"
|
|
118
|
+
precrawledArchive = "precrawledArchive"
|
|
119
|
+
unknown = "unknown"
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class Asset(BaseModel):
|
|
123
|
+
id: str
|
|
124
|
+
assetType: AssetType1
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class Bookmark(BaseModel):
|
|
128
|
+
id: str
|
|
129
|
+
createdAt: str
|
|
130
|
+
modifiedAt: str
|
|
131
|
+
title: Optional[str] = None
|
|
132
|
+
archived: bool
|
|
133
|
+
favourited: bool
|
|
134
|
+
taggingStatus: TaggingStatus
|
|
135
|
+
note: Optional[str] = None
|
|
136
|
+
summary: Optional[str] = None
|
|
137
|
+
tags: List[Tag]
|
|
138
|
+
content: Union[Content, Content1, Content2, Content3]
|
|
139
|
+
assets: List[Asset]
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
class PaginatedBookmarks(BaseModel):
|
|
143
|
+
bookmarks: List[Bookmark]
|
|
144
|
+
nextCursor: Optional[str] = None # Allow nextCursor to be None
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
class Cursor(RootModel[str]):
|
|
148
|
+
root: str
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
class Color(Enum):
|
|
152
|
+
yellow = "yellow"
|
|
153
|
+
red = "red"
|
|
154
|
+
green = "green"
|
|
155
|
+
blue = "blue"
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
class Highlight(BaseModel):
|
|
159
|
+
bookmarkId: str
|
|
160
|
+
startOffset: float
|
|
161
|
+
endOffset: float
|
|
162
|
+
color: Optional[Color] = "yellow"
|
|
163
|
+
text: Optional[str] = None # Allow None for text
|
|
164
|
+
note: Optional[str] = None # Allow None for note
|
|
165
|
+
id: str
|
|
166
|
+
userId: str
|
|
167
|
+
createdAt: str
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
class Type4(Enum):
|
|
171
|
+
manual = "manual"
|
|
172
|
+
smart = "smart"
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
class ListModel(BaseModel):
|
|
176
|
+
id: str
|
|
177
|
+
name: str
|
|
178
|
+
description: Optional[str] = None
|
|
179
|
+
icon: str
|
|
180
|
+
parentId: Optional[str] = None # Allow parentId to be None (nullable)
|
|
181
|
+
type: Optional[Type4] = "manual"
|
|
182
|
+
query: Optional[str] = None
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
class NumBookmarksByAttachedType(BaseModel):
|
|
186
|
+
ai: Optional[float] = None
|
|
187
|
+
human: Optional[float] = None
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
class Tag1(BaseModel):
|
|
191
|
+
id: str
|
|
192
|
+
name: str
|
|
193
|
+
numBookmarks: float
|
|
194
|
+
numBookmarksByAttachedType: NumBookmarksByAttachedType
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
class PaginatedHighlights(BaseModel):
|
|
198
|
+
highlights: List[Highlight]
|
|
199
|
+
nextCursor: Optional[str] = None # Allow nextCursor to be None
|