|
26 | 26 | from synapseclient.core.async_utils import async_to_sync, otel_trace_method
|
27 | 27 | from synapseclient.core.upload.upload_functions_async import upload_file_handle
|
28 | 28 | from synapseclient.core.utils import delete_none_keys
|
| 29 | +from synapseclient.models.protocols.wikipage_protocol import ( |
| 30 | + WikiHeaderSynchronousProtocol, |
| 31 | + WikiHistorySnapshotSynchronousProtocol, |
| 32 | + WikiOrderHintSynchronousProtocol, |
| 33 | + WikiPageSynchronousProtocol, |
| 34 | +) |
29 | 35 |
|
30 | 36 |
|
31 | 37 | @dataclass
|
32 | 38 | @async_to_sync
|
33 |
| -class WikiOrderHint: |
| 39 | +class WikiOrderHint(WikiOrderHintSynchronousProtocol): |
34 | 40 | """
|
35 | 41 | A WikiOrderHint contains the order hint for the root wiki that corresponds to the given owner ID and type.
|
36 | 42 |
|
@@ -130,14 +136,14 @@ async def update_async(
|
130 | 136 |
|
131 | 137 | @dataclass
|
132 | 138 | @async_to_sync
|
133 |
| -class WikiHistorySnapshot: |
| 139 | +class WikiHistorySnapshot(WikiHistorySnapshotSynchronousProtocol): |
134 | 140 | """
|
135 | 141 | A WikiHistorySnapshot contains basic information about an update to a WikiPage.
|
136 | 142 |
|
137 | 143 | Attributes:
|
138 | 144 | version: The version number of the wiki page.
|
139 | 145 | modified_on: The timestamp when this version was created.
|
140 |
| - modified_by: The ID of the user that created this version. |
| 146 | + modified_by: The ID of the user that created this version. |
141 | 147 | """
|
142 | 148 |
|
143 | 149 | version: Optional[str] = None
|
@@ -210,7 +216,7 @@ async def get_async(
|
210 | 216 |
|
211 | 217 | @dataclass
|
212 | 218 | @async_to_sync
|
213 |
| -class WikiHeader: |
| 219 | +class WikiHeader(WikiHeaderSynchronousProtocol): |
214 | 220 | """
|
215 | 221 | A WikiHeader contains basic metadata about a WikiPage.
|
216 | 222 |
|
@@ -285,7 +291,7 @@ async def get_async(
|
285 | 291 |
|
286 | 292 | @dataclass
|
287 | 293 | @async_to_sync
|
288 |
| -class WikiPage: |
| 294 | +class WikiPage(WikiPageSynchronousProtocol): |
289 | 295 | """
|
290 | 296 | Represents a [Wiki Page](https://rest-docs.synapse.org/rest/org/sagebionetworks/repo/model/v2/wiki/V2WikiPage.html).
|
291 | 297 |
|
|
0 commit comments