mergepythonclient 2.6.2__py3-none-any.whl → 2.6.3__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/client.py +36 -36
- merge/core/client_wrapper.py +2 -2
- merge/resources/chat/types/conversation.py +3 -0
- merge/resources/chat/types/type_enum.py +15 -0
- {mergepythonclient-2.6.2.dist-info → mergepythonclient-2.6.3.dist-info}/METADATA +19 -17
- {mergepythonclient-2.6.2.dist-info → mergepythonclient-2.6.3.dist-info}/RECORD +8 -8
- {mergepythonclient-2.6.2.dist-info → mergepythonclient-2.6.3.dist-info}/LICENSE.md +0 -0
- {mergepythonclient-2.6.2.dist-info → mergepythonclient-2.6.3.dist-info}/WHEEL +0 -0
merge/client.py
CHANGED
|
@@ -88,23 +88,15 @@ class Merge:
|
|
|
88
88
|
else httpx.Client(timeout=_defaulted_timeout),
|
|
89
89
|
timeout=_defaulted_timeout,
|
|
90
90
|
)
|
|
91
|
-
self._ats: typing.Optional[AtsClient] = None
|
|
92
91
|
self._chat: typing.Optional[ChatClient] = None
|
|
92
|
+
self._ats: typing.Optional[AtsClient] = None
|
|
93
93
|
self._crm: typing.Optional[CrmClient] = None
|
|
94
|
-
self._filestorage: typing.Optional[FilestorageClient] = None
|
|
95
94
|
self._hris: typing.Optional[HrisClient] = None
|
|
96
95
|
self._knowledgebase: typing.Optional[KnowledgebaseClient] = None
|
|
97
96
|
self._ticketing: typing.Optional[TicketingClient] = None
|
|
97
|
+
self._filestorage: typing.Optional[FilestorageClient] = None
|
|
98
98
|
self._accounting: typing.Optional[AccountingClient] = None
|
|
99
99
|
|
|
100
|
-
@property
|
|
101
|
-
def ats(self):
|
|
102
|
-
if self._ats is None:
|
|
103
|
-
from .resources.ats.client import AtsClient # noqa: E402
|
|
104
|
-
|
|
105
|
-
self._ats = AtsClient(client_wrapper=self._client_wrapper)
|
|
106
|
-
return self._ats
|
|
107
|
-
|
|
108
100
|
@property
|
|
109
101
|
def chat(self):
|
|
110
102
|
if self._chat is None:
|
|
@@ -113,6 +105,14 @@ class Merge:
|
|
|
113
105
|
self._chat = ChatClient(client_wrapper=self._client_wrapper)
|
|
114
106
|
return self._chat
|
|
115
107
|
|
|
108
|
+
@property
|
|
109
|
+
def ats(self):
|
|
110
|
+
if self._ats is None:
|
|
111
|
+
from .resources.ats.client import AtsClient # noqa: E402
|
|
112
|
+
|
|
113
|
+
self._ats = AtsClient(client_wrapper=self._client_wrapper)
|
|
114
|
+
return self._ats
|
|
115
|
+
|
|
116
116
|
@property
|
|
117
117
|
def crm(self):
|
|
118
118
|
if self._crm is None:
|
|
@@ -121,14 +121,6 @@ class Merge:
|
|
|
121
121
|
self._crm = CrmClient(client_wrapper=self._client_wrapper)
|
|
122
122
|
return self._crm
|
|
123
123
|
|
|
124
|
-
@property
|
|
125
|
-
def filestorage(self):
|
|
126
|
-
if self._filestorage is None:
|
|
127
|
-
from .resources.filestorage.client import FilestorageClient # noqa: E402
|
|
128
|
-
|
|
129
|
-
self._filestorage = FilestorageClient(client_wrapper=self._client_wrapper)
|
|
130
|
-
return self._filestorage
|
|
131
|
-
|
|
132
124
|
@property
|
|
133
125
|
def hris(self):
|
|
134
126
|
if self._hris is None:
|
|
@@ -153,6 +145,14 @@ class Merge:
|
|
|
153
145
|
self._ticketing = TicketingClient(client_wrapper=self._client_wrapper)
|
|
154
146
|
return self._ticketing
|
|
155
147
|
|
|
148
|
+
@property
|
|
149
|
+
def filestorage(self):
|
|
150
|
+
if self._filestorage is None:
|
|
151
|
+
from .resources.filestorage.client import FilestorageClient # noqa: E402
|
|
152
|
+
|
|
153
|
+
self._filestorage = FilestorageClient(client_wrapper=self._client_wrapper)
|
|
154
|
+
return self._filestorage
|
|
155
|
+
|
|
156
156
|
@property
|
|
157
157
|
def accounting(self):
|
|
158
158
|
if self._accounting is None:
|
|
@@ -231,23 +231,15 @@ class AsyncMerge:
|
|
|
231
231
|
else httpx.AsyncClient(timeout=_defaulted_timeout),
|
|
232
232
|
timeout=_defaulted_timeout,
|
|
233
233
|
)
|
|
234
|
-
self._ats: typing.Optional[AsyncAtsClient] = None
|
|
235
234
|
self._chat: typing.Optional[AsyncChatClient] = None
|
|
235
|
+
self._ats: typing.Optional[AsyncAtsClient] = None
|
|
236
236
|
self._crm: typing.Optional[AsyncCrmClient] = None
|
|
237
|
-
self._filestorage: typing.Optional[AsyncFilestorageClient] = None
|
|
238
237
|
self._hris: typing.Optional[AsyncHrisClient] = None
|
|
239
238
|
self._knowledgebase: typing.Optional[AsyncKnowledgebaseClient] = None
|
|
240
239
|
self._ticketing: typing.Optional[AsyncTicketingClient] = None
|
|
240
|
+
self._filestorage: typing.Optional[AsyncFilestorageClient] = None
|
|
241
241
|
self._accounting: typing.Optional[AsyncAccountingClient] = None
|
|
242
242
|
|
|
243
|
-
@property
|
|
244
|
-
def ats(self):
|
|
245
|
-
if self._ats is None:
|
|
246
|
-
from .resources.ats.client import AsyncAtsClient # noqa: E402
|
|
247
|
-
|
|
248
|
-
self._ats = AsyncAtsClient(client_wrapper=self._client_wrapper)
|
|
249
|
-
return self._ats
|
|
250
|
-
|
|
251
243
|
@property
|
|
252
244
|
def chat(self):
|
|
253
245
|
if self._chat is None:
|
|
@@ -256,6 +248,14 @@ class AsyncMerge:
|
|
|
256
248
|
self._chat = AsyncChatClient(client_wrapper=self._client_wrapper)
|
|
257
249
|
return self._chat
|
|
258
250
|
|
|
251
|
+
@property
|
|
252
|
+
def ats(self):
|
|
253
|
+
if self._ats is None:
|
|
254
|
+
from .resources.ats.client import AsyncAtsClient # noqa: E402
|
|
255
|
+
|
|
256
|
+
self._ats = AsyncAtsClient(client_wrapper=self._client_wrapper)
|
|
257
|
+
return self._ats
|
|
258
|
+
|
|
259
259
|
@property
|
|
260
260
|
def crm(self):
|
|
261
261
|
if self._crm is None:
|
|
@@ -264,14 +264,6 @@ class AsyncMerge:
|
|
|
264
264
|
self._crm = AsyncCrmClient(client_wrapper=self._client_wrapper)
|
|
265
265
|
return self._crm
|
|
266
266
|
|
|
267
|
-
@property
|
|
268
|
-
def filestorage(self):
|
|
269
|
-
if self._filestorage is None:
|
|
270
|
-
from .resources.filestorage.client import AsyncFilestorageClient # noqa: E402
|
|
271
|
-
|
|
272
|
-
self._filestorage = AsyncFilestorageClient(client_wrapper=self._client_wrapper)
|
|
273
|
-
return self._filestorage
|
|
274
|
-
|
|
275
267
|
@property
|
|
276
268
|
def hris(self):
|
|
277
269
|
if self._hris is None:
|
|
@@ -296,6 +288,14 @@ class AsyncMerge:
|
|
|
296
288
|
self._ticketing = AsyncTicketingClient(client_wrapper=self._client_wrapper)
|
|
297
289
|
return self._ticketing
|
|
298
290
|
|
|
291
|
+
@property
|
|
292
|
+
def filestorage(self):
|
|
293
|
+
if self._filestorage is None:
|
|
294
|
+
from .resources.filestorage.client import AsyncFilestorageClient # noqa: E402
|
|
295
|
+
|
|
296
|
+
self._filestorage = AsyncFilestorageClient(client_wrapper=self._client_wrapper)
|
|
297
|
+
return self._filestorage
|
|
298
|
+
|
|
299
299
|
@property
|
|
300
300
|
def accounting(self):
|
|
301
301
|
if self._accounting is None:
|
merge/core/client_wrapper.py
CHANGED
|
@@ -24,10 +24,10 @@ class BaseClientWrapper:
|
|
|
24
24
|
|
|
25
25
|
def get_headers(self) -> typing.Dict[str, str]:
|
|
26
26
|
headers: typing.Dict[str, str] = {
|
|
27
|
-
"User-Agent": "MergePythonClient/2.6.
|
|
27
|
+
"User-Agent": "MergePythonClient/2.6.3",
|
|
28
28
|
"X-Fern-Language": "Python",
|
|
29
29
|
"X-Fern-SDK-Name": "MergePythonClient",
|
|
30
|
-
"X-Fern-SDK-Version": "2.6.
|
|
30
|
+
"X-Fern-SDK-Version": "2.6.3",
|
|
31
31
|
**(self.get_custom_headers() or {}),
|
|
32
32
|
}
|
|
33
33
|
if self._account_token is not None:
|
|
@@ -59,6 +59,9 @@ class Conversation(UncheckedBaseModel):
|
|
|
59
59
|
* `PRIVATE_EXTERNAL` - PRIVATE_EXTERNAL
|
|
60
60
|
* `PUBLIC_INTERNAL` - PUBLIC_INTERNAL
|
|
61
61
|
* `PUBLIC_EXTERNAL` - PUBLIC_EXTERNAL
|
|
62
|
+
* `ONE_ON_ONE_CHAT` - ONE_ON_ONE_CHAT
|
|
63
|
+
* `GROUP_CHAT` - GROUP_CHAT
|
|
64
|
+
* `MEETING_CHAT` - MEETING_CHAT
|
|
62
65
|
"""
|
|
63
66
|
|
|
64
67
|
members: typing.Optional[typing.List[typing.Optional[str]]] = None
|
|
@@ -12,12 +12,18 @@ class TypeEnum(str, enum.Enum):
|
|
|
12
12
|
* `PRIVATE_EXTERNAL` - PRIVATE_EXTERNAL
|
|
13
13
|
* `PUBLIC_INTERNAL` - PUBLIC_INTERNAL
|
|
14
14
|
* `PUBLIC_EXTERNAL` - PUBLIC_EXTERNAL
|
|
15
|
+
* `ONE_ON_ONE_CHAT` - ONE_ON_ONE_CHAT
|
|
16
|
+
* `GROUP_CHAT` - GROUP_CHAT
|
|
17
|
+
* `MEETING_CHAT` - MEETING_CHAT
|
|
15
18
|
"""
|
|
16
19
|
|
|
17
20
|
PRIVATE_INTERNAL = "PRIVATE_INTERNAL"
|
|
18
21
|
PRIVATE_EXTERNAL = "PRIVATE_EXTERNAL"
|
|
19
22
|
PUBLIC_INTERNAL = "PUBLIC_INTERNAL"
|
|
20
23
|
PUBLIC_EXTERNAL = "PUBLIC_EXTERNAL"
|
|
24
|
+
ONE_ON_ONE_CHAT = "ONE_ON_ONE_CHAT"
|
|
25
|
+
GROUP_CHAT = "GROUP_CHAT"
|
|
26
|
+
MEETING_CHAT = "MEETING_CHAT"
|
|
21
27
|
|
|
22
28
|
def visit(
|
|
23
29
|
self,
|
|
@@ -25,6 +31,9 @@ class TypeEnum(str, enum.Enum):
|
|
|
25
31
|
private_external: typing.Callable[[], T_Result],
|
|
26
32
|
public_internal: typing.Callable[[], T_Result],
|
|
27
33
|
public_external: typing.Callable[[], T_Result],
|
|
34
|
+
one_on_one_chat: typing.Callable[[], T_Result],
|
|
35
|
+
group_chat: typing.Callable[[], T_Result],
|
|
36
|
+
meeting_chat: typing.Callable[[], T_Result],
|
|
28
37
|
) -> T_Result:
|
|
29
38
|
if self is TypeEnum.PRIVATE_INTERNAL:
|
|
30
39
|
return private_internal()
|
|
@@ -34,3 +43,9 @@ class TypeEnum(str, enum.Enum):
|
|
|
34
43
|
return public_internal()
|
|
35
44
|
if self is TypeEnum.PUBLIC_EXTERNAL:
|
|
36
45
|
return public_external()
|
|
46
|
+
if self is TypeEnum.ONE_ON_ONE_CHAT:
|
|
47
|
+
return one_on_one_chat()
|
|
48
|
+
if self is TypeEnum.GROUP_CHAT:
|
|
49
|
+
return group_chat()
|
|
50
|
+
if self is TypeEnum.MEETING_CHAT:
|
|
51
|
+
return meeting_chat()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mergepythonclient
|
|
3
|
-
Version: 2.6.
|
|
3
|
+
Version: 2.6.3
|
|
4
4
|
Summary:
|
|
5
5
|
Requires-Python: >=3.8,<4.0
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -70,17 +70,17 @@ Instantiate and use the client with the following:
|
|
|
70
70
|
|
|
71
71
|
```python
|
|
72
72
|
from merge import Merge
|
|
73
|
-
from merge.resources.
|
|
73
|
+
from merge.resources.chat import DataPassthroughRequest, MethodEnum
|
|
74
74
|
|
|
75
75
|
client = Merge(
|
|
76
76
|
account_token="YOUR_ACCOUNT_TOKEN",
|
|
77
77
|
api_key="YOUR_API_KEY",
|
|
78
78
|
)
|
|
79
|
-
client.
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
client.chat.async_passthrough.create(
|
|
80
|
+
request=DataPassthroughRequest(
|
|
81
|
+
method=MethodEnum.GET,
|
|
82
|
+
path="/scooters",
|
|
83
|
+
),
|
|
84
84
|
)
|
|
85
85
|
```
|
|
86
86
|
|
|
@@ -115,7 +115,7 @@ The SDK also exports an `async` client so that you can make non-blocking calls t
|
|
|
115
115
|
import asyncio
|
|
116
116
|
|
|
117
117
|
from merge import AsyncMerge
|
|
118
|
-
from merge.resources.
|
|
118
|
+
from merge.resources.chat import DataPassthroughRequest, MethodEnum
|
|
119
119
|
|
|
120
120
|
client = AsyncMerge(
|
|
121
121
|
account_token="YOUR_ACCOUNT_TOKEN",
|
|
@@ -124,11 +124,11 @@ client = AsyncMerge(
|
|
|
124
124
|
|
|
125
125
|
|
|
126
126
|
async def main() -> None:
|
|
127
|
-
await client.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
127
|
+
await client.chat.async_passthrough.create(
|
|
128
|
+
request=DataPassthroughRequest(
|
|
129
|
+
method=MethodEnum.GET,
|
|
130
|
+
path="/scooters",
|
|
131
|
+
),
|
|
132
132
|
)
|
|
133
133
|
|
|
134
134
|
|
|
@@ -144,7 +144,7 @@ will be thrown.
|
|
|
144
144
|
from merge.core.api_error import ApiError
|
|
145
145
|
|
|
146
146
|
try:
|
|
147
|
-
client.
|
|
147
|
+
client.chat.async_passthrough.create(...)
|
|
148
148
|
except ApiError as e:
|
|
149
149
|
print(e.status_code)
|
|
150
150
|
print(e.body)
|
|
@@ -163,7 +163,7 @@ from merge import Merge
|
|
|
163
163
|
client = Merge(
|
|
164
164
|
...,
|
|
165
165
|
)
|
|
166
|
-
response = client.
|
|
166
|
+
response = client.chat.async_passthrough.with_raw_response.create(...)
|
|
167
167
|
print(response.headers) # access the response headers
|
|
168
168
|
print(response.data) # access the underlying object
|
|
169
169
|
```
|
|
@@ -183,7 +183,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
|
|
|
183
183
|
Use the `max_retries` request option to configure this behavior.
|
|
184
184
|
|
|
185
185
|
```python
|
|
186
|
-
client.
|
|
186
|
+
client.chat.async_passthrough.create(..., request_options={
|
|
187
187
|
"max_retries": 1
|
|
188
188
|
})
|
|
189
189
|
```
|
|
@@ -203,7 +203,7 @@ client = Merge(
|
|
|
203
203
|
|
|
204
204
|
|
|
205
205
|
# Override timeout for a specific method
|
|
206
|
-
client.
|
|
206
|
+
client.chat.async_passthrough.create(..., request_options={
|
|
207
207
|
"timeout_in_seconds": 1
|
|
208
208
|
})
|
|
209
209
|
```
|
|
@@ -290,3 +290,5 @@ while response.next is not None:
|
|
|
290
290
|
|
|
291
291
|
|
|
292
292
|
|
|
293
|
+
|
|
294
|
+
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
merge/__init__.py,sha256=K3KxH-H0yK6Mp-fSHYH_I6TxE3EquIdXUOeclJm6yYg,1697
|
|
2
|
-
merge/client.py,sha256=
|
|
2
|
+
merge/client.py,sha256=X_HQAqKZIQzXgmzrPQhT1f2sgT1eL08EKA6R6ttbaXw,11937
|
|
3
3
|
merge/core/__init__.py,sha256=HNk-wnH_j2yAf7IroaZM9JJFe4mnkNHq06t2QmaBweg,3862
|
|
4
4
|
merge/core/api_error.py,sha256=44vPoTyWN59gonCIZMdzw7M1uspygiLnr3GNFOoVL2Q,614
|
|
5
|
-
merge/core/client_wrapper.py,sha256=
|
|
5
|
+
merge/core/client_wrapper.py,sha256=_nM_lm2uOiLrCI-iJh5_GHijsXVZy348aRKjpoW_Tjs,3096
|
|
6
6
|
merge/core/datetime_utils.py,sha256=nBys2IsYrhPdszxGKCNRPSOCwa-5DWOHG95FB8G9PKo,1047
|
|
7
7
|
merge/core/file.py,sha256=d4NNbX8XvXP32z8KpK2Xovv33nFfruIrpz0QWxlgpZk,2663
|
|
8
8
|
merge/core/force_multipart.py,sha256=cH981xLy0kZVKiZZkFoeUjgJ2Zuq7KXB2aRAnmHzRDc,477
|
|
@@ -1212,7 +1212,7 @@ merge/resources/chat/types/category_enum.py,sha256=7hv-PXVE1JmNQD7yjp16POyeGfZQS
|
|
|
1212
1212
|
merge/resources/chat/types/common_model_scope_api.py,sha256=iikeXuknnlFYmnwoRcQ34AnBwbpAPIYhgmov3HpeBGg,812
|
|
1213
1213
|
merge/resources/chat/types/common_model_scopes_body_request.py,sha256=KMnJBN-wDY0eQNjXYAgoiyoyXY74T9pzZum_2BIiUhU,726
|
|
1214
1214
|
merge/resources/chat/types/completed_account_initial_screen_enum.py,sha256=O8ZkUxzZ79KqliNtuFiA2dhVSsYCysziBgyRDG3pGZI,149
|
|
1215
|
-
merge/resources/chat/types/conversation.py,sha256=
|
|
1215
|
+
merge/resources/chat/types/conversation.py,sha256=WTLOcRPdRX9Tm3tzHCf_X4XuMSAOYXLTNOI0tJ1NjAg,3072
|
|
1216
1216
|
merge/resources/chat/types/conversation_type.py,sha256=r2ju7rTTCvCaSzTxV17fFjubI0GKTVDwpHN5G3tLg6s,160
|
|
1217
1217
|
merge/resources/chat/types/data_passthrough_request.py,sha256=arL5gXYjwGtbdAcjx3hggnoLmZsiRITvn9lXPn08sNw,2533
|
|
1218
1218
|
merge/resources/chat/types/data_passthrough_request_method.py,sha256=pPQyuc3sRVbGsvXWrtdwzNYsosT3CzBjXEFLVkGWolo,178
|
|
@@ -1276,7 +1276,7 @@ merge/resources/chat/types/status_fd_5_enum.py,sha256=9uFhTnWd-OPGZ-HbAwKZp_FL2w
|
|
|
1276
1276
|
merge/resources/chat/types/sync_status.py,sha256=dSf0uOh8TCgMJ7S3YeU6KyFIOqzgKJDGxqr2XwoT67Q,1469
|
|
1277
1277
|
merge/resources/chat/types/sync_status_last_sync_result.py,sha256=NY6veRnsfFgeHEMlj9Q35FFJCKoCOQAmtLotkPTPbSU,200
|
|
1278
1278
|
merge/resources/chat/types/sync_status_status.py,sha256=VAGVIs8Hv1VAaU0_UNCXjXLFcbMHs4P7muYSh9gkUX4,177
|
|
1279
|
-
merge/resources/chat/types/type_enum.py,sha256=
|
|
1279
|
+
merge/resources/chat/types/type_enum.py,sha256=Sg8hJZZ_0RyyyDRILNQEbU_6eQVmVG9y2VINeda7YGU,1728
|
|
1280
1280
|
merge/resources/chat/types/user.py,sha256=uVxNSjRnMJgN8IOsWl14s_EDe7wn0-J-7rKei_AIrIg,2868
|
|
1281
1281
|
merge/resources/chat/types/validation_problem_source.py,sha256=0ayE7x_uM8R0pzVRz9ZZEc6WS1RUZO3VW3zXjh61RVs,576
|
|
1282
1282
|
merge/resources/chat/types/warning_validation_problem.py,sha256=t9CzZaDPK9NykBCj9ok4cJoOXNixtxQCf_DuQg48xDc,787
|
|
@@ -2682,7 +2682,7 @@ merge/resources/ticketing/types/viewer_user.py,sha256=VrOx8xWvNadSYjdErIMg2pPsHV
|
|
|
2682
2682
|
merge/resources/ticketing/types/warning_validation_problem.py,sha256=RXDtt3t3FwIeGGXkIr_OHOAybDZg44L_5hOqa2sLlJ0,736
|
|
2683
2683
|
merge/resources/ticketing/types/webhook_receiver.py,sha256=g4KQnc-vZPJGlXK-OOFIn2WGyTLKoeaq9TPWQ46VwFY,623
|
|
2684
2684
|
merge/version.py,sha256=kLtHrVsKjnCqlIC_JtezQUWrCPQkXhjpD_2pdlcGh18,84
|
|
2685
|
-
mergepythonclient-2.6.
|
|
2686
|
-
mergepythonclient-2.6.
|
|
2687
|
-
mergepythonclient-2.6.
|
|
2688
|
-
mergepythonclient-2.6.
|
|
2685
|
+
mergepythonclient-2.6.3.dist-info/LICENSE.md,sha256=WKO7xLnLSUInldiq5i25eVqKAjwIUKenaS4Cgir2Iuw,3275
|
|
2686
|
+
mergepythonclient-2.6.3.dist-info/METADATA,sha256=UFKiu9VXHRFjx6z1orD9tq7FyRJCdwde4mRk8TiwHsQ,7974
|
|
2687
|
+
mergepythonclient-2.6.3.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
|
|
2688
|
+
mergepythonclient-2.6.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|