mergepythonclient 4.1.0__py3-none-any.whl → 4.2.1__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.
- merge/core/client_wrapper.py +2 -2
- merge/resources/accounting/__init__.py +15 -0
- merge/resources/accounting/client.py +19 -0
- merge/resources/accounting/resources/__init__.py +3 -0
- merge/resources/accounting/resources/selective_sync/__init__.py +4 -0
- merge/resources/accounting/resources/selective_sync/client.py +104 -0
- merge/resources/accounting/resources/selective_sync/raw_client.py +103 -0
- merge/resources/accounting/types/__init__.py +12 -0
- merge/resources/accounting/types/operator_enum.py +58 -0
- merge/resources/accounting/types/selective_sync_condition.py +49 -0
- merge/resources/accounting/types/selective_sync_condition_list.py +21 -0
- merge/resources/accounting/types/selective_sync_condition_operator.py +7 -0
- merge/resources/accounting/types/sync_status.py +5 -0
- merge/resources/ats/__init__.py +15 -0
- merge/resources/ats/client.py +19 -0
- merge/resources/ats/resources/__init__.py +3 -0
- merge/resources/ats/resources/selective_sync/__init__.py +4 -0
- merge/resources/ats/resources/selective_sync/client.py +104 -0
- merge/resources/ats/resources/selective_sync/raw_client.py +103 -0
- merge/resources/ats/types/__init__.py +12 -0
- merge/resources/ats/types/operator_enum.py +58 -0
- merge/resources/ats/types/selective_sync_condition.py +49 -0
- merge/resources/ats/types/selective_sync_condition_list.py +21 -0
- merge/resources/ats/types/selective_sync_condition_operator.py +7 -0
- merge/resources/ats/types/sync_status.py +5 -0
- merge/resources/calendar/__init__.py +15 -0
- merge/resources/calendar/client.py +19 -0
- merge/resources/calendar/resources/__init__.py +3 -0
- merge/resources/calendar/resources/selective_sync/__init__.py +4 -0
- merge/resources/calendar/resources/selective_sync/client.py +104 -0
- merge/resources/calendar/resources/selective_sync/raw_client.py +103 -0
- merge/resources/calendar/types/__init__.py +12 -0
- merge/resources/calendar/types/operator_enum.py +58 -0
- merge/resources/calendar/types/selective_sync_condition.py +49 -0
- merge/resources/calendar/types/selective_sync_condition_list.py +21 -0
- merge/resources/calendar/types/selective_sync_condition_operator.py +7 -0
- merge/resources/calendar/types/sync_status.py +5 -0
- merge/resources/chat/__init__.py +33 -0
- merge/resources/chat/client.py +19 -0
- merge/resources/chat/resources/__init__.py +3 -0
- merge/resources/chat/resources/selective_sync/__init__.py +4 -0
- merge/resources/chat/resources/selective_sync/client.py +264 -0
- merge/resources/chat/resources/selective_sync/raw_client.py +293 -0
- merge/resources/chat/types/__init__.py +30 -0
- merge/resources/chat/types/chat_sync_selection.py +50 -0
- merge/resources/chat/types/chat_sync_selection_type.py +7 -0
- merge/resources/chat/types/chat_sync_selection_type_enum.py +18 -0
- merge/resources/chat/types/label_selection.py +43 -0
- merge/resources/chat/types/label_selection_list.py +21 -0
- merge/resources/chat/types/operator_enum.py +58 -0
- merge/resources/chat/types/paginated_chat_sync_selection_list.py +23 -0
- merge/resources/chat/types/selective_sync_condition.py +49 -0
- merge/resources/chat/types/selective_sync_condition_list.py +21 -0
- merge/resources/chat/types/selective_sync_condition_operator.py +7 -0
- merge/resources/chat/types/sync_status.py +5 -0
- merge/resources/crm/__init__.py +15 -0
- merge/resources/crm/client.py +19 -0
- merge/resources/crm/resources/__init__.py +3 -0
- merge/resources/crm/resources/selective_sync/__init__.py +4 -0
- merge/resources/crm/resources/selective_sync/client.py +104 -0
- merge/resources/crm/resources/selective_sync/raw_client.py +103 -0
- merge/resources/crm/types/__init__.py +12 -0
- merge/resources/crm/types/operator_enum.py +58 -0
- merge/resources/crm/types/selective_sync_condition.py +49 -0
- merge/resources/crm/types/selective_sync_condition_list.py +21 -0
- merge/resources/crm/types/selective_sync_condition_operator.py +7 -0
- merge/resources/crm/types/sync_status.py +5 -0
- merge/resources/email/__init__.py +21 -0
- merge/resources/email/client.py +19 -0
- merge/resources/email/resources/__init__.py +3 -0
- merge/resources/email/resources/selective_sync/__init__.py +4 -0
- merge/resources/email/resources/selective_sync/client.py +167 -0
- merge/resources/email/resources/selective_sync/raw_client.py +184 -0
- merge/resources/email/types/__init__.py +18 -0
- merge/resources/email/types/label_selection.py +43 -0
- merge/resources/email/types/label_selection_list.py +21 -0
- merge/resources/email/types/operator_enum.py +58 -0
- merge/resources/email/types/selective_sync_condition.py +49 -0
- merge/resources/email/types/selective_sync_condition_list.py +21 -0
- merge/resources/email/types/selective_sync_condition_operator.py +7 -0
- merge/resources/email/types/sync_status.py +5 -0
- merge/resources/filestorage/__init__.py +33 -0
- merge/resources/filestorage/client.py +19 -0
- merge/resources/filestorage/resources/__init__.py +3 -0
- merge/resources/filestorage/resources/selective_sync/__init__.py +4 -0
- merge/resources/filestorage/resources/selective_sync/client.py +264 -0
- merge/resources/filestorage/resources/selective_sync/raw_client.py +293 -0
- merge/resources/filestorage/types/__init__.py +30 -0
- merge/resources/filestorage/types/file_storage_sync_selection.py +50 -0
- merge/resources/filestorage/types/file_storage_sync_selection_type.py +7 -0
- merge/resources/filestorage/types/file_storage_sync_selection_type_enum.py +26 -0
- merge/resources/filestorage/types/label_selection.py +43 -0
- merge/resources/filestorage/types/label_selection_list.py +21 -0
- merge/resources/filestorage/types/operator_enum.py +58 -0
- merge/resources/filestorage/types/paginated_file_storage_sync_selection_list.py +23 -0
- merge/resources/filestorage/types/selective_sync_condition.py +49 -0
- merge/resources/filestorage/types/selective_sync_condition_list.py +21 -0
- merge/resources/filestorage/types/selective_sync_condition_operator.py +7 -0
- merge/resources/filestorage/types/sync_status.py +5 -0
- merge/resources/hris/__init__.py +15 -0
- merge/resources/hris/client.py +19 -0
- merge/resources/hris/resources/__init__.py +3 -0
- merge/resources/hris/resources/selective_sync/__init__.py +4 -0
- merge/resources/hris/resources/selective_sync/client.py +104 -0
- merge/resources/hris/resources/selective_sync/raw_client.py +103 -0
- merge/resources/hris/types/__init__.py +12 -0
- merge/resources/hris/types/operator_enum.py +58 -0
- merge/resources/hris/types/selective_sync_condition.py +49 -0
- merge/resources/hris/types/selective_sync_condition_list.py +21 -0
- merge/resources/hris/types/selective_sync_condition_operator.py +7 -0
- merge/resources/hris/types/sync_status.py +5 -0
- merge/resources/knowledgebase/__init__.py +27 -0
- merge/resources/knowledgebase/client.py +19 -0
- merge/resources/knowledgebase/resources/__init__.py +3 -0
- merge/resources/knowledgebase/resources/selective_sync/__init__.py +4 -0
- merge/resources/knowledgebase/resources/selective_sync/client.py +201 -0
- merge/resources/knowledgebase/resources/selective_sync/raw_client.py +212 -0
- merge/resources/knowledgebase/types/__init__.py +24 -0
- merge/resources/knowledgebase/types/knowledge_base_sync_selection.py +50 -0
- merge/resources/knowledgebase/types/knowledge_base_sync_selection_type.py +7 -0
- merge/resources/knowledgebase/types/knowledge_base_sync_selection_type_enum.py +18 -0
- merge/resources/knowledgebase/types/operator_enum.py +58 -0
- merge/resources/knowledgebase/types/paginated_knowledge_base_sync_selection_list.py +23 -0
- merge/resources/knowledgebase/types/selective_sync_condition.py +49 -0
- merge/resources/knowledgebase/types/selective_sync_condition_list.py +21 -0
- merge/resources/knowledgebase/types/selective_sync_condition_operator.py +7 -0
- merge/resources/knowledgebase/types/sync_status.py +5 -0
- merge/resources/ticketing/__init__.py +15 -0
- merge/resources/ticketing/client.py +19 -0
- merge/resources/ticketing/resources/__init__.py +3 -0
- merge/resources/ticketing/resources/selective_sync/__init__.py +4 -0
- merge/resources/ticketing/resources/selective_sync/client.py +104 -0
- merge/resources/ticketing/resources/selective_sync/raw_client.py +103 -0
- merge/resources/ticketing/types/__init__.py +12 -0
- merge/resources/ticketing/types/operator_enum.py +58 -0
- merge/resources/ticketing/types/selective_sync_condition.py +49 -0
- merge/resources/ticketing/types/selective_sync_condition_list.py +21 -0
- merge/resources/ticketing/types/selective_sync_condition_operator.py +7 -0
- merge/resources/ticketing/types/sync_status.py +5 -0
- {mergepythonclient-4.1.0.dist-info → mergepythonclient-4.2.1.dist-info}/METADATA +3 -1
- {mergepythonclient-4.1.0.dist-info → mergepythonclient-4.2.1.dist-info}/RECORD +143 -55
- {mergepythonclient-4.1.0.dist-info → mergepythonclient-4.2.1.dist-info}/LICENSE.md +0 -0
- {mergepythonclient-4.1.0.dist-info → mergepythonclient-4.2.1.dist-info}/WHEEL +0 -0
|
@@ -26,6 +26,7 @@ if typing.TYPE_CHECKING:
|
|
|
26
26
|
passthrough,
|
|
27
27
|
regenerate_key,
|
|
28
28
|
scopes,
|
|
29
|
+
selective_sync,
|
|
29
30
|
sync_status,
|
|
30
31
|
users,
|
|
31
32
|
webhook_receivers,
|
|
@@ -72,6 +73,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
72
73
|
"passthrough": ".passthrough",
|
|
73
74
|
"regenerate_key": ".regenerate_key",
|
|
74
75
|
"scopes": ".scopes",
|
|
76
|
+
"selective_sync": ".selective_sync",
|
|
75
77
|
"sync_status": ".sync_status",
|
|
76
78
|
"users": ".users",
|
|
77
79
|
"webhook_receivers": ".webhook_receivers",
|
|
@@ -130,6 +132,7 @@ __all__ = [
|
|
|
130
132
|
"passthrough",
|
|
131
133
|
"regenerate_key",
|
|
132
134
|
"scopes",
|
|
135
|
+
"selective_sync",
|
|
133
136
|
"sync_status",
|
|
134
137
|
"users",
|
|
135
138
|
"webhook_receivers",
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
|
+
from .....core.request_options import RequestOptions
|
|
7
|
+
from ...types.label_selection_list import LabelSelectionList
|
|
8
|
+
from ...types.paginated_file_storage_sync_selection_list import PaginatedFileStorageSyncSelectionList
|
|
9
|
+
from ...types.selective_sync_condition_list import SelectiveSyncConditionList
|
|
10
|
+
from .raw_client import AsyncRawSelectiveSyncClient, RawSelectiveSyncClient
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class SelectiveSyncClient:
|
|
14
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
15
|
+
self._raw_client = RawSelectiveSyncClient(client_wrapper=client_wrapper)
|
|
16
|
+
|
|
17
|
+
@property
|
|
18
|
+
def with_raw_response(self) -> RawSelectiveSyncClient:
|
|
19
|
+
"""
|
|
20
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
21
|
+
|
|
22
|
+
Returns
|
|
23
|
+
-------
|
|
24
|
+
RawSelectiveSyncClient
|
|
25
|
+
"""
|
|
26
|
+
return self._raw_client
|
|
27
|
+
|
|
28
|
+
def conditions_list(self, *, request_options: typing.Optional[RequestOptions] = None) -> SelectiveSyncConditionList:
|
|
29
|
+
"""
|
|
30
|
+
Returns a list of `SelectiveSyncCondition` objects.
|
|
31
|
+
|
|
32
|
+
Parameters
|
|
33
|
+
----------
|
|
34
|
+
request_options : typing.Optional[RequestOptions]
|
|
35
|
+
Request-specific configuration.
|
|
36
|
+
|
|
37
|
+
Returns
|
|
38
|
+
-------
|
|
39
|
+
SelectiveSyncConditionList
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
Examples
|
|
43
|
+
--------
|
|
44
|
+
from merge import Merge
|
|
45
|
+
|
|
46
|
+
client = Merge(
|
|
47
|
+
account_token="YOUR_ACCOUNT_TOKEN",
|
|
48
|
+
api_key="YOUR_API_KEY",
|
|
49
|
+
)
|
|
50
|
+
client.filestorage.selective_sync.conditions_list()
|
|
51
|
+
"""
|
|
52
|
+
_response = self._raw_client.conditions_list(request_options=request_options)
|
|
53
|
+
return _response.data
|
|
54
|
+
|
|
55
|
+
def labels_list(self, *, request_options: typing.Optional[RequestOptions] = None) -> LabelSelectionList:
|
|
56
|
+
"""
|
|
57
|
+
Returns a list of `LabelSelection` objects.
|
|
58
|
+
|
|
59
|
+
Parameters
|
|
60
|
+
----------
|
|
61
|
+
request_options : typing.Optional[RequestOptions]
|
|
62
|
+
Request-specific configuration.
|
|
63
|
+
|
|
64
|
+
Returns
|
|
65
|
+
-------
|
|
66
|
+
LabelSelectionList
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
Examples
|
|
70
|
+
--------
|
|
71
|
+
from merge import Merge
|
|
72
|
+
|
|
73
|
+
client = Merge(
|
|
74
|
+
account_token="YOUR_ACCOUNT_TOKEN",
|
|
75
|
+
api_key="YOUR_API_KEY",
|
|
76
|
+
)
|
|
77
|
+
client.filestorage.selective_sync.labels_list()
|
|
78
|
+
"""
|
|
79
|
+
_response = self._raw_client.labels_list(request_options=request_options)
|
|
80
|
+
return _response.data
|
|
81
|
+
|
|
82
|
+
def selections_list(
|
|
83
|
+
self,
|
|
84
|
+
*,
|
|
85
|
+
cursor: typing.Optional[str] = None,
|
|
86
|
+
page_size: typing.Optional[int] = None,
|
|
87
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
88
|
+
) -> PaginatedFileStorageSyncSelectionList:
|
|
89
|
+
"""
|
|
90
|
+
Returns a list of `FileStorageSyncSelection` objects.
|
|
91
|
+
|
|
92
|
+
Parameters
|
|
93
|
+
----------
|
|
94
|
+
cursor : typing.Optional[str]
|
|
95
|
+
The pagination cursor value.
|
|
96
|
+
|
|
97
|
+
page_size : typing.Optional[int]
|
|
98
|
+
Number of results to return per page. The maximum limit is 100.
|
|
99
|
+
|
|
100
|
+
request_options : typing.Optional[RequestOptions]
|
|
101
|
+
Request-specific configuration.
|
|
102
|
+
|
|
103
|
+
Returns
|
|
104
|
+
-------
|
|
105
|
+
PaginatedFileStorageSyncSelectionList
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
Examples
|
|
109
|
+
--------
|
|
110
|
+
from merge import Merge
|
|
111
|
+
|
|
112
|
+
client = Merge(
|
|
113
|
+
account_token="YOUR_ACCOUNT_TOKEN",
|
|
114
|
+
api_key="YOUR_API_KEY",
|
|
115
|
+
)
|
|
116
|
+
client.filestorage.selective_sync.selections_list(
|
|
117
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
118
|
+
page_size=1,
|
|
119
|
+
)
|
|
120
|
+
"""
|
|
121
|
+
_response = self._raw_client.selections_list(
|
|
122
|
+
cursor=cursor, page_size=page_size, request_options=request_options
|
|
123
|
+
)
|
|
124
|
+
return _response.data
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class AsyncSelectiveSyncClient:
|
|
128
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
129
|
+
self._raw_client = AsyncRawSelectiveSyncClient(client_wrapper=client_wrapper)
|
|
130
|
+
|
|
131
|
+
@property
|
|
132
|
+
def with_raw_response(self) -> AsyncRawSelectiveSyncClient:
|
|
133
|
+
"""
|
|
134
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
135
|
+
|
|
136
|
+
Returns
|
|
137
|
+
-------
|
|
138
|
+
AsyncRawSelectiveSyncClient
|
|
139
|
+
"""
|
|
140
|
+
return self._raw_client
|
|
141
|
+
|
|
142
|
+
async def conditions_list(
|
|
143
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
144
|
+
) -> SelectiveSyncConditionList:
|
|
145
|
+
"""
|
|
146
|
+
Returns a list of `SelectiveSyncCondition` objects.
|
|
147
|
+
|
|
148
|
+
Parameters
|
|
149
|
+
----------
|
|
150
|
+
request_options : typing.Optional[RequestOptions]
|
|
151
|
+
Request-specific configuration.
|
|
152
|
+
|
|
153
|
+
Returns
|
|
154
|
+
-------
|
|
155
|
+
SelectiveSyncConditionList
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
Examples
|
|
159
|
+
--------
|
|
160
|
+
import asyncio
|
|
161
|
+
|
|
162
|
+
from merge import AsyncMerge
|
|
163
|
+
|
|
164
|
+
client = AsyncMerge(
|
|
165
|
+
account_token="YOUR_ACCOUNT_TOKEN",
|
|
166
|
+
api_key="YOUR_API_KEY",
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
async def main() -> None:
|
|
171
|
+
await client.filestorage.selective_sync.conditions_list()
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
asyncio.run(main())
|
|
175
|
+
"""
|
|
176
|
+
_response = await self._raw_client.conditions_list(request_options=request_options)
|
|
177
|
+
return _response.data
|
|
178
|
+
|
|
179
|
+
async def labels_list(self, *, request_options: typing.Optional[RequestOptions] = None) -> LabelSelectionList:
|
|
180
|
+
"""
|
|
181
|
+
Returns a list of `LabelSelection` objects.
|
|
182
|
+
|
|
183
|
+
Parameters
|
|
184
|
+
----------
|
|
185
|
+
request_options : typing.Optional[RequestOptions]
|
|
186
|
+
Request-specific configuration.
|
|
187
|
+
|
|
188
|
+
Returns
|
|
189
|
+
-------
|
|
190
|
+
LabelSelectionList
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
Examples
|
|
194
|
+
--------
|
|
195
|
+
import asyncio
|
|
196
|
+
|
|
197
|
+
from merge import AsyncMerge
|
|
198
|
+
|
|
199
|
+
client = AsyncMerge(
|
|
200
|
+
account_token="YOUR_ACCOUNT_TOKEN",
|
|
201
|
+
api_key="YOUR_API_KEY",
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
async def main() -> None:
|
|
206
|
+
await client.filestorage.selective_sync.labels_list()
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
asyncio.run(main())
|
|
210
|
+
"""
|
|
211
|
+
_response = await self._raw_client.labels_list(request_options=request_options)
|
|
212
|
+
return _response.data
|
|
213
|
+
|
|
214
|
+
async def selections_list(
|
|
215
|
+
self,
|
|
216
|
+
*,
|
|
217
|
+
cursor: typing.Optional[str] = None,
|
|
218
|
+
page_size: typing.Optional[int] = None,
|
|
219
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
220
|
+
) -> PaginatedFileStorageSyncSelectionList:
|
|
221
|
+
"""
|
|
222
|
+
Returns a list of `FileStorageSyncSelection` objects.
|
|
223
|
+
|
|
224
|
+
Parameters
|
|
225
|
+
----------
|
|
226
|
+
cursor : typing.Optional[str]
|
|
227
|
+
The pagination cursor value.
|
|
228
|
+
|
|
229
|
+
page_size : typing.Optional[int]
|
|
230
|
+
Number of results to return per page. The maximum limit is 100.
|
|
231
|
+
|
|
232
|
+
request_options : typing.Optional[RequestOptions]
|
|
233
|
+
Request-specific configuration.
|
|
234
|
+
|
|
235
|
+
Returns
|
|
236
|
+
-------
|
|
237
|
+
PaginatedFileStorageSyncSelectionList
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
Examples
|
|
241
|
+
--------
|
|
242
|
+
import asyncio
|
|
243
|
+
|
|
244
|
+
from merge import AsyncMerge
|
|
245
|
+
|
|
246
|
+
client = AsyncMerge(
|
|
247
|
+
account_token="YOUR_ACCOUNT_TOKEN",
|
|
248
|
+
api_key="YOUR_API_KEY",
|
|
249
|
+
)
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
async def main() -> None:
|
|
253
|
+
await client.filestorage.selective_sync.selections_list(
|
|
254
|
+
cursor="cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
|
|
255
|
+
page_size=1,
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
asyncio.run(main())
|
|
260
|
+
"""
|
|
261
|
+
_response = await self._raw_client.selections_list(
|
|
262
|
+
cursor=cursor, page_size=page_size, request_options=request_options
|
|
263
|
+
)
|
|
264
|
+
return _response.data
|
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from json.decoder import JSONDecodeError
|
|
5
|
+
|
|
6
|
+
from .....core.api_error import ApiError
|
|
7
|
+
from .....core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
8
|
+
from .....core.http_response import AsyncHttpResponse, HttpResponse
|
|
9
|
+
from .....core.parse_error import ParsingError
|
|
10
|
+
from .....core.request_options import RequestOptions
|
|
11
|
+
from .....core.unchecked_base_model import construct_type
|
|
12
|
+
from ...types.label_selection_list import LabelSelectionList
|
|
13
|
+
from ...types.paginated_file_storage_sync_selection_list import PaginatedFileStorageSyncSelectionList
|
|
14
|
+
from ...types.selective_sync_condition_list import SelectiveSyncConditionList
|
|
15
|
+
from pydantic import ValidationError
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class RawSelectiveSyncClient:
|
|
19
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
20
|
+
self._client_wrapper = client_wrapper
|
|
21
|
+
|
|
22
|
+
def conditions_list(
|
|
23
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
24
|
+
) -> HttpResponse[SelectiveSyncConditionList]:
|
|
25
|
+
"""
|
|
26
|
+
Returns a list of `SelectiveSyncCondition` objects.
|
|
27
|
+
|
|
28
|
+
Parameters
|
|
29
|
+
----------
|
|
30
|
+
request_options : typing.Optional[RequestOptions]
|
|
31
|
+
Request-specific configuration.
|
|
32
|
+
|
|
33
|
+
Returns
|
|
34
|
+
-------
|
|
35
|
+
HttpResponse[SelectiveSyncConditionList]
|
|
36
|
+
|
|
37
|
+
"""
|
|
38
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
39
|
+
"filestorage/v1/selective-sync/conditions",
|
|
40
|
+
method="GET",
|
|
41
|
+
request_options=request_options,
|
|
42
|
+
)
|
|
43
|
+
try:
|
|
44
|
+
if 200 <= _response.status_code < 300:
|
|
45
|
+
_data = typing.cast(
|
|
46
|
+
SelectiveSyncConditionList,
|
|
47
|
+
construct_type(
|
|
48
|
+
type_=SelectiveSyncConditionList, # type: ignore
|
|
49
|
+
object_=_response.json(),
|
|
50
|
+
),
|
|
51
|
+
)
|
|
52
|
+
return HttpResponse(response=_response, data=_data)
|
|
53
|
+
_response_json = _response.json()
|
|
54
|
+
except JSONDecodeError:
|
|
55
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
56
|
+
except ValidationError as e:
|
|
57
|
+
raise ParsingError(
|
|
58
|
+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
|
|
59
|
+
)
|
|
60
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
61
|
+
|
|
62
|
+
def labels_list(
|
|
63
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
64
|
+
) -> HttpResponse[LabelSelectionList]:
|
|
65
|
+
"""
|
|
66
|
+
Returns a list of `LabelSelection` objects.
|
|
67
|
+
|
|
68
|
+
Parameters
|
|
69
|
+
----------
|
|
70
|
+
request_options : typing.Optional[RequestOptions]
|
|
71
|
+
Request-specific configuration.
|
|
72
|
+
|
|
73
|
+
Returns
|
|
74
|
+
-------
|
|
75
|
+
HttpResponse[LabelSelectionList]
|
|
76
|
+
|
|
77
|
+
"""
|
|
78
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
79
|
+
"filestorage/v1/selective-sync/labels",
|
|
80
|
+
method="GET",
|
|
81
|
+
request_options=request_options,
|
|
82
|
+
)
|
|
83
|
+
try:
|
|
84
|
+
if 200 <= _response.status_code < 300:
|
|
85
|
+
_data = typing.cast(
|
|
86
|
+
LabelSelectionList,
|
|
87
|
+
construct_type(
|
|
88
|
+
type_=LabelSelectionList, # type: ignore
|
|
89
|
+
object_=_response.json(),
|
|
90
|
+
),
|
|
91
|
+
)
|
|
92
|
+
return HttpResponse(response=_response, data=_data)
|
|
93
|
+
_response_json = _response.json()
|
|
94
|
+
except JSONDecodeError:
|
|
95
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
96
|
+
except ValidationError as e:
|
|
97
|
+
raise ParsingError(
|
|
98
|
+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
|
|
99
|
+
)
|
|
100
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
101
|
+
|
|
102
|
+
def selections_list(
|
|
103
|
+
self,
|
|
104
|
+
*,
|
|
105
|
+
cursor: typing.Optional[str] = None,
|
|
106
|
+
page_size: typing.Optional[int] = None,
|
|
107
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
108
|
+
) -> HttpResponse[PaginatedFileStorageSyncSelectionList]:
|
|
109
|
+
"""
|
|
110
|
+
Returns a list of `FileStorageSyncSelection` objects.
|
|
111
|
+
|
|
112
|
+
Parameters
|
|
113
|
+
----------
|
|
114
|
+
cursor : typing.Optional[str]
|
|
115
|
+
The pagination cursor value.
|
|
116
|
+
|
|
117
|
+
page_size : typing.Optional[int]
|
|
118
|
+
Number of results to return per page. The maximum limit is 100.
|
|
119
|
+
|
|
120
|
+
request_options : typing.Optional[RequestOptions]
|
|
121
|
+
Request-specific configuration.
|
|
122
|
+
|
|
123
|
+
Returns
|
|
124
|
+
-------
|
|
125
|
+
HttpResponse[PaginatedFileStorageSyncSelectionList]
|
|
126
|
+
|
|
127
|
+
"""
|
|
128
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
129
|
+
"filestorage/v1/selective-sync/selections",
|
|
130
|
+
method="GET",
|
|
131
|
+
params={
|
|
132
|
+
"cursor": cursor,
|
|
133
|
+
"page_size": page_size,
|
|
134
|
+
},
|
|
135
|
+
request_options=request_options,
|
|
136
|
+
)
|
|
137
|
+
try:
|
|
138
|
+
if 200 <= _response.status_code < 300:
|
|
139
|
+
_data = typing.cast(
|
|
140
|
+
PaginatedFileStorageSyncSelectionList,
|
|
141
|
+
construct_type(
|
|
142
|
+
type_=PaginatedFileStorageSyncSelectionList, # type: ignore
|
|
143
|
+
object_=_response.json(),
|
|
144
|
+
),
|
|
145
|
+
)
|
|
146
|
+
return HttpResponse(response=_response, data=_data)
|
|
147
|
+
_response_json = _response.json()
|
|
148
|
+
except JSONDecodeError:
|
|
149
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
150
|
+
except ValidationError as e:
|
|
151
|
+
raise ParsingError(
|
|
152
|
+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
|
|
153
|
+
)
|
|
154
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
class AsyncRawSelectiveSyncClient:
|
|
158
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
159
|
+
self._client_wrapper = client_wrapper
|
|
160
|
+
|
|
161
|
+
async def conditions_list(
|
|
162
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
163
|
+
) -> AsyncHttpResponse[SelectiveSyncConditionList]:
|
|
164
|
+
"""
|
|
165
|
+
Returns a list of `SelectiveSyncCondition` objects.
|
|
166
|
+
|
|
167
|
+
Parameters
|
|
168
|
+
----------
|
|
169
|
+
request_options : typing.Optional[RequestOptions]
|
|
170
|
+
Request-specific configuration.
|
|
171
|
+
|
|
172
|
+
Returns
|
|
173
|
+
-------
|
|
174
|
+
AsyncHttpResponse[SelectiveSyncConditionList]
|
|
175
|
+
|
|
176
|
+
"""
|
|
177
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
178
|
+
"filestorage/v1/selective-sync/conditions",
|
|
179
|
+
method="GET",
|
|
180
|
+
request_options=request_options,
|
|
181
|
+
)
|
|
182
|
+
try:
|
|
183
|
+
if 200 <= _response.status_code < 300:
|
|
184
|
+
_data = typing.cast(
|
|
185
|
+
SelectiveSyncConditionList,
|
|
186
|
+
construct_type(
|
|
187
|
+
type_=SelectiveSyncConditionList, # type: ignore
|
|
188
|
+
object_=_response.json(),
|
|
189
|
+
),
|
|
190
|
+
)
|
|
191
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
192
|
+
_response_json = _response.json()
|
|
193
|
+
except JSONDecodeError:
|
|
194
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
195
|
+
except ValidationError as e:
|
|
196
|
+
raise ParsingError(
|
|
197
|
+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
|
|
198
|
+
)
|
|
199
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
200
|
+
|
|
201
|
+
async def labels_list(
|
|
202
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
203
|
+
) -> AsyncHttpResponse[LabelSelectionList]:
|
|
204
|
+
"""
|
|
205
|
+
Returns a list of `LabelSelection` objects.
|
|
206
|
+
|
|
207
|
+
Parameters
|
|
208
|
+
----------
|
|
209
|
+
request_options : typing.Optional[RequestOptions]
|
|
210
|
+
Request-specific configuration.
|
|
211
|
+
|
|
212
|
+
Returns
|
|
213
|
+
-------
|
|
214
|
+
AsyncHttpResponse[LabelSelectionList]
|
|
215
|
+
|
|
216
|
+
"""
|
|
217
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
218
|
+
"filestorage/v1/selective-sync/labels",
|
|
219
|
+
method="GET",
|
|
220
|
+
request_options=request_options,
|
|
221
|
+
)
|
|
222
|
+
try:
|
|
223
|
+
if 200 <= _response.status_code < 300:
|
|
224
|
+
_data = typing.cast(
|
|
225
|
+
LabelSelectionList,
|
|
226
|
+
construct_type(
|
|
227
|
+
type_=LabelSelectionList, # type: ignore
|
|
228
|
+
object_=_response.json(),
|
|
229
|
+
),
|
|
230
|
+
)
|
|
231
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
232
|
+
_response_json = _response.json()
|
|
233
|
+
except JSONDecodeError:
|
|
234
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
235
|
+
except ValidationError as e:
|
|
236
|
+
raise ParsingError(
|
|
237
|
+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
|
|
238
|
+
)
|
|
239
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
240
|
+
|
|
241
|
+
async def selections_list(
|
|
242
|
+
self,
|
|
243
|
+
*,
|
|
244
|
+
cursor: typing.Optional[str] = None,
|
|
245
|
+
page_size: typing.Optional[int] = None,
|
|
246
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
247
|
+
) -> AsyncHttpResponse[PaginatedFileStorageSyncSelectionList]:
|
|
248
|
+
"""
|
|
249
|
+
Returns a list of `FileStorageSyncSelection` objects.
|
|
250
|
+
|
|
251
|
+
Parameters
|
|
252
|
+
----------
|
|
253
|
+
cursor : typing.Optional[str]
|
|
254
|
+
The pagination cursor value.
|
|
255
|
+
|
|
256
|
+
page_size : typing.Optional[int]
|
|
257
|
+
Number of results to return per page. The maximum limit is 100.
|
|
258
|
+
|
|
259
|
+
request_options : typing.Optional[RequestOptions]
|
|
260
|
+
Request-specific configuration.
|
|
261
|
+
|
|
262
|
+
Returns
|
|
263
|
+
-------
|
|
264
|
+
AsyncHttpResponse[PaginatedFileStorageSyncSelectionList]
|
|
265
|
+
|
|
266
|
+
"""
|
|
267
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
268
|
+
"filestorage/v1/selective-sync/selections",
|
|
269
|
+
method="GET",
|
|
270
|
+
params={
|
|
271
|
+
"cursor": cursor,
|
|
272
|
+
"page_size": page_size,
|
|
273
|
+
},
|
|
274
|
+
request_options=request_options,
|
|
275
|
+
)
|
|
276
|
+
try:
|
|
277
|
+
if 200 <= _response.status_code < 300:
|
|
278
|
+
_data = typing.cast(
|
|
279
|
+
PaginatedFileStorageSyncSelectionList,
|
|
280
|
+
construct_type(
|
|
281
|
+
type_=PaginatedFileStorageSyncSelectionList, # type: ignore
|
|
282
|
+
object_=_response.json(),
|
|
283
|
+
),
|
|
284
|
+
)
|
|
285
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
286
|
+
_response_json = _response.json()
|
|
287
|
+
except JSONDecodeError:
|
|
288
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
289
|
+
except ValidationError as e:
|
|
290
|
+
raise ParsingError(
|
|
291
|
+
status_code=_response.status_code, headers=dict(_response.headers), body=_response.json(), cause=e
|
|
292
|
+
)
|
|
293
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|