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
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import datetime as dt
|
|
4
|
+
import typing
|
|
5
|
+
|
|
6
|
+
import pydantic
|
|
7
|
+
from ....core.pydantic_utilities import IS_PYDANTIC_V2
|
|
8
|
+
from ....core.unchecked_base_model import UncheckedBaseModel
|
|
9
|
+
from .chat_sync_selection_type import ChatSyncSelectionType
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class ChatSyncSelection(UncheckedBaseModel):
|
|
13
|
+
id: typing.Optional[str] = pydantic.Field(default=None)
|
|
14
|
+
"""
|
|
15
|
+
The Merge ID of the selected object.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
remote_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
19
|
+
"""
|
|
20
|
+
The third-party API ID of the selected object.
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
24
|
+
"""
|
|
25
|
+
The name of the selected object.
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
type: ChatSyncSelectionType = pydantic.Field()
|
|
29
|
+
"""
|
|
30
|
+
The type of the selected object.
|
|
31
|
+
"""
|
|
32
|
+
|
|
33
|
+
url: typing.Optional[str] = pydantic.Field(default=None)
|
|
34
|
+
"""
|
|
35
|
+
A link to the selected object in the third party.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
39
|
+
"""
|
|
40
|
+
When the selection was made.
|
|
41
|
+
"""
|
|
42
|
+
|
|
43
|
+
if IS_PYDANTIC_V2:
|
|
44
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
45
|
+
else:
|
|
46
|
+
|
|
47
|
+
class Config:
|
|
48
|
+
frozen = True
|
|
49
|
+
smart_union = True
|
|
50
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ....core import enum
|
|
6
|
+
|
|
7
|
+
T_Result = typing.TypeVar("T_Result")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ChatSyncSelectionTypeEnum(enum.StrEnum):
|
|
11
|
+
CHAT_GROUP = "CHAT_GROUP"
|
|
12
|
+
CONVERSATION = "CONVERSATION"
|
|
13
|
+
|
|
14
|
+
def visit(self, chat_group: typing.Callable[[], T_Result], conversation: typing.Callable[[], T_Result]) -> T_Result:
|
|
15
|
+
if self is ChatSyncSelectionTypeEnum.CHAT_GROUP:
|
|
16
|
+
return chat_group()
|
|
17
|
+
if self is ChatSyncSelectionTypeEnum.CONVERSATION:
|
|
18
|
+
return conversation()
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ....core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ....core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class LabelSelection(UncheckedBaseModel):
|
|
11
|
+
remote_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
12
|
+
"""
|
|
13
|
+
The label's ID in the third-party system.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
name: typing.Optional[str] = pydantic.Field(default=None)
|
|
17
|
+
"""
|
|
18
|
+
The label's name.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
label_type: typing.Optional[str] = pydantic.Field(default=None)
|
|
22
|
+
"""
|
|
23
|
+
The label's type.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
parent_remote_id: typing.Optional[str] = pydantic.Field(default=None)
|
|
27
|
+
"""
|
|
28
|
+
The parent label's ID in the third-party system. Null for top-level labels.
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
parent_name: typing.Optional[str] = pydantic.Field(default=None)
|
|
32
|
+
"""
|
|
33
|
+
The parent label's name. Null for top-level labels.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
if IS_PYDANTIC_V2:
|
|
37
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
38
|
+
else:
|
|
39
|
+
|
|
40
|
+
class Config:
|
|
41
|
+
frozen = True
|
|
42
|
+
smart_union = True
|
|
43
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ....core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ....core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
from .label_selection import LabelSelection
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class LabelSelectionList(UncheckedBaseModel):
|
|
12
|
+
results: typing.List[LabelSelection]
|
|
13
|
+
|
|
14
|
+
if IS_PYDANTIC_V2:
|
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
16
|
+
else:
|
|
17
|
+
|
|
18
|
+
class Config:
|
|
19
|
+
frozen = True
|
|
20
|
+
smart_union = True
|
|
21
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
from ....core import enum
|
|
6
|
+
|
|
7
|
+
T_Result = typing.TypeVar("T_Result")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OperatorEnum(enum.StrEnum):
|
|
11
|
+
CONTAINS = "CONTAINS"
|
|
12
|
+
EQUALS = "EQUALS"
|
|
13
|
+
GREATER_THAN = "GREATER_THAN"
|
|
14
|
+
GREATER_THAN_OR_EQUAL_TO = "GREATER_THAN_OR_EQUAL_TO"
|
|
15
|
+
HAS_ALL_OF = "HAS_ALL_OF"
|
|
16
|
+
HAS_NONE_OF = "HAS_NONE_OF"
|
|
17
|
+
IS_ONE_OF = "IS_ONE_OF"
|
|
18
|
+
LESS_THAN = "LESS_THAN"
|
|
19
|
+
LESS_THAN_OR_EQUAL_TO = "LESS_THAN_OR_EQUAL_TO"
|
|
20
|
+
NOT_EQUALS = "NOT_EQUALS"
|
|
21
|
+
WITHIN = "WITHIN"
|
|
22
|
+
|
|
23
|
+
def visit(
|
|
24
|
+
self,
|
|
25
|
+
contains: typing.Callable[[], T_Result],
|
|
26
|
+
equals: typing.Callable[[], T_Result],
|
|
27
|
+
greater_than: typing.Callable[[], T_Result],
|
|
28
|
+
greater_than_or_equal_to: typing.Callable[[], T_Result],
|
|
29
|
+
has_all_of: typing.Callable[[], T_Result],
|
|
30
|
+
has_none_of: typing.Callable[[], T_Result],
|
|
31
|
+
is_one_of: typing.Callable[[], T_Result],
|
|
32
|
+
less_than: typing.Callable[[], T_Result],
|
|
33
|
+
less_than_or_equal_to: typing.Callable[[], T_Result],
|
|
34
|
+
not_equals: typing.Callable[[], T_Result],
|
|
35
|
+
within: typing.Callable[[], T_Result],
|
|
36
|
+
) -> T_Result:
|
|
37
|
+
if self is OperatorEnum.CONTAINS:
|
|
38
|
+
return contains()
|
|
39
|
+
if self is OperatorEnum.EQUALS:
|
|
40
|
+
return equals()
|
|
41
|
+
if self is OperatorEnum.GREATER_THAN:
|
|
42
|
+
return greater_than()
|
|
43
|
+
if self is OperatorEnum.GREATER_THAN_OR_EQUAL_TO:
|
|
44
|
+
return greater_than_or_equal_to()
|
|
45
|
+
if self is OperatorEnum.HAS_ALL_OF:
|
|
46
|
+
return has_all_of()
|
|
47
|
+
if self is OperatorEnum.HAS_NONE_OF:
|
|
48
|
+
return has_none_of()
|
|
49
|
+
if self is OperatorEnum.IS_ONE_OF:
|
|
50
|
+
return is_one_of()
|
|
51
|
+
if self is OperatorEnum.LESS_THAN:
|
|
52
|
+
return less_than()
|
|
53
|
+
if self is OperatorEnum.LESS_THAN_OR_EQUAL_TO:
|
|
54
|
+
return less_than_or_equal_to()
|
|
55
|
+
if self is OperatorEnum.NOT_EQUALS:
|
|
56
|
+
return not_equals()
|
|
57
|
+
if self is OperatorEnum.WITHIN:
|
|
58
|
+
return within()
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ....core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ....core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
from .chat_sync_selection import ChatSyncSelection
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class PaginatedChatSyncSelectionList(UncheckedBaseModel):
|
|
12
|
+
next: typing.Optional[str] = None
|
|
13
|
+
previous: typing.Optional[str] = None
|
|
14
|
+
results: typing.Optional[typing.List[ChatSyncSelection]] = None
|
|
15
|
+
|
|
16
|
+
if IS_PYDANTIC_V2:
|
|
17
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
18
|
+
else:
|
|
19
|
+
|
|
20
|
+
class Config:
|
|
21
|
+
frozen = True
|
|
22
|
+
smart_union = True
|
|
23
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ....core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ....core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
from .selective_sync_condition_operator import SelectiveSyncConditionOperator
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SelectiveSyncCondition(UncheckedBaseModel):
|
|
12
|
+
id: str = pydantic.Field()
|
|
13
|
+
"""
|
|
14
|
+
The Merge ID of the filter.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
common_model: str = pydantic.Field()
|
|
18
|
+
"""
|
|
19
|
+
The common model the filter applies to.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
normalized_key_name: str = pydantic.Field()
|
|
23
|
+
"""
|
|
24
|
+
The Merge field the filter applies to.
|
|
25
|
+
"""
|
|
26
|
+
|
|
27
|
+
remote_key_name: typing.Optional[str] = pydantic.Field(default=None)
|
|
28
|
+
"""
|
|
29
|
+
The third-party API's name for the filtered field.
|
|
30
|
+
"""
|
|
31
|
+
|
|
32
|
+
operator: SelectiveSyncConditionOperator = pydantic.Field()
|
|
33
|
+
"""
|
|
34
|
+
How the value is compared.
|
|
35
|
+
"""
|
|
36
|
+
|
|
37
|
+
value: typing.Dict[str, typing.Any] = pydantic.Field()
|
|
38
|
+
"""
|
|
39
|
+
The value the field is compared against.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
if IS_PYDANTIC_V2:
|
|
43
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
44
|
+
else:
|
|
45
|
+
|
|
46
|
+
class Config:
|
|
47
|
+
frozen = True
|
|
48
|
+
smart_union = True
|
|
49
|
+
extra = pydantic.Extra.allow
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
|
|
5
|
+
import pydantic
|
|
6
|
+
from ....core.pydantic_utilities import IS_PYDANTIC_V2
|
|
7
|
+
from ....core.unchecked_base_model import UncheckedBaseModel
|
|
8
|
+
from .selective_sync_condition import SelectiveSyncCondition
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SelectiveSyncConditionList(UncheckedBaseModel):
|
|
12
|
+
results: typing.List[SelectiveSyncCondition]
|
|
13
|
+
|
|
14
|
+
if IS_PYDANTIC_V2:
|
|
15
|
+
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
|
|
16
|
+
else:
|
|
17
|
+
|
|
18
|
+
class Config:
|
|
19
|
+
frozen = True
|
|
20
|
+
smart_union = True
|
|
21
|
+
extra = pydantic.Extra.allow
|
|
@@ -29,6 +29,11 @@ class SyncStatus(UncheckedBaseModel):
|
|
|
29
29
|
last_sync_result: typing.Optional[SyncStatusLastSyncResult] = None
|
|
30
30
|
last_sync_finished: typing.Optional[dt.datetime] = None
|
|
31
31
|
data_fresh_as_of: typing.Optional[dt.datetime] = None
|
|
32
|
+
historical_data_since: typing.Optional[dt.datetime] = pydantic.Field(default=None)
|
|
33
|
+
"""
|
|
34
|
+
The earliest point this model has complete historical data for, based on each record's modified date in the third-party platform. Records modified before this time have not been fully synced. A model synced over its full history reaches back to 1900-01-01, unless there's a selective sync filter. Null until the first sync completes.
|
|
35
|
+
"""
|
|
36
|
+
|
|
32
37
|
status: SyncStatusStatus
|
|
33
38
|
sync_status_reason: typing.Optional[SyncStatusSyncStatusReason] = pydantic.Field(default=None)
|
|
34
39
|
"""
|
merge/resources/crm/__init__.py
CHANGED
|
@@ -143,6 +143,7 @@ if typing.TYPE_CHECKING:
|
|
|
143
143
|
NoteRequestOwner,
|
|
144
144
|
NoteResponse,
|
|
145
145
|
ObjectClassDescriptionRequest,
|
|
146
|
+
OperatorEnum,
|
|
146
147
|
Opportunity,
|
|
147
148
|
OpportunityAccount,
|
|
148
149
|
OpportunityOwner,
|
|
@@ -225,6 +226,9 @@ if typing.TYPE_CHECKING:
|
|
|
225
226
|
RequestFormatEnum,
|
|
226
227
|
ResponseTypeEnum,
|
|
227
228
|
RoleEnum,
|
|
229
|
+
SelectiveSyncCondition,
|
|
230
|
+
SelectiveSyncConditionList,
|
|
231
|
+
SelectiveSyncConditionOperator,
|
|
228
232
|
SelectiveSyncConfigurationsUsageEnum,
|
|
229
233
|
Stage,
|
|
230
234
|
StatusFd5Enum,
|
|
@@ -296,6 +300,7 @@ if typing.TYPE_CHECKING:
|
|
|
296
300
|
passthrough,
|
|
297
301
|
regenerate_key,
|
|
298
302
|
scopes,
|
|
303
|
+
selective_sync,
|
|
299
304
|
stages,
|
|
300
305
|
sync_status,
|
|
301
306
|
tasks,
|
|
@@ -451,6 +456,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
451
456
|
"NotesListRequestExpandItem": ".resources",
|
|
452
457
|
"NotesRetrieveRequestExpandItem": ".resources",
|
|
453
458
|
"ObjectClassDescriptionRequest": ".types",
|
|
459
|
+
"OperatorEnum": ".types",
|
|
454
460
|
"OpportunitiesListRequestExpandItem": ".resources",
|
|
455
461
|
"OpportunitiesListRequestStatus": ".resources",
|
|
456
462
|
"OpportunitiesRetrieveRequestExpandItem": ".resources",
|
|
@@ -536,6 +542,9 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
536
542
|
"RequestFormatEnum": ".types",
|
|
537
543
|
"ResponseTypeEnum": ".types",
|
|
538
544
|
"RoleEnum": ".types",
|
|
545
|
+
"SelectiveSyncCondition": ".types",
|
|
546
|
+
"SelectiveSyncConditionList": ".types",
|
|
547
|
+
"SelectiveSyncConditionOperator": ".types",
|
|
539
548
|
"SelectiveSyncConfigurationsUsageEnum": ".types",
|
|
540
549
|
"Stage": ".types",
|
|
541
550
|
"StatusFd5Enum": ".types",
|
|
@@ -590,6 +599,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
590
599
|
"passthrough": ".resources",
|
|
591
600
|
"regenerate_key": ".resources",
|
|
592
601
|
"scopes": ".resources",
|
|
602
|
+
"selective_sync": ".resources",
|
|
593
603
|
"stages": ".resources",
|
|
594
604
|
"sync_status": ".resources",
|
|
595
605
|
"tasks": ".resources",
|
|
@@ -768,6 +778,7 @@ __all__ = [
|
|
|
768
778
|
"NotesListRequestExpandItem",
|
|
769
779
|
"NotesRetrieveRequestExpandItem",
|
|
770
780
|
"ObjectClassDescriptionRequest",
|
|
781
|
+
"OperatorEnum",
|
|
771
782
|
"OpportunitiesListRequestExpandItem",
|
|
772
783
|
"OpportunitiesListRequestStatus",
|
|
773
784
|
"OpportunitiesRetrieveRequestExpandItem",
|
|
@@ -853,6 +864,9 @@ __all__ = [
|
|
|
853
864
|
"RequestFormatEnum",
|
|
854
865
|
"ResponseTypeEnum",
|
|
855
866
|
"RoleEnum",
|
|
867
|
+
"SelectiveSyncCondition",
|
|
868
|
+
"SelectiveSyncConditionList",
|
|
869
|
+
"SelectiveSyncConditionOperator",
|
|
856
870
|
"SelectiveSyncConfigurationsUsageEnum",
|
|
857
871
|
"Stage",
|
|
858
872
|
"StatusFd5Enum",
|
|
@@ -907,6 +921,7 @@ __all__ = [
|
|
|
907
921
|
"passthrough",
|
|
908
922
|
"regenerate_key",
|
|
909
923
|
"scopes",
|
|
924
|
+
"selective_sync",
|
|
910
925
|
"stages",
|
|
911
926
|
"sync_status",
|
|
912
927
|
"tasks",
|
merge/resources/crm/client.py
CHANGED
|
@@ -40,6 +40,7 @@ if typing.TYPE_CHECKING:
|
|
|
40
40
|
from .resources.passthrough.client import PassthroughClient
|
|
41
41
|
from .resources.regenerate_key.client import AsyncRegenerateKeyClient, RegenerateKeyClient
|
|
42
42
|
from .resources.scopes.client import AsyncScopesClient, ScopesClient
|
|
43
|
+
from .resources.selective_sync.client import AsyncSelectiveSyncClient, SelectiveSyncClient
|
|
43
44
|
from .resources.stages.client import AsyncStagesClient, StagesClient
|
|
44
45
|
from .resources.sync_status.client import AsyncSyncStatusClient, SyncStatusClient
|
|
45
46
|
from .resources.tasks.client import AsyncTasksClient, TasksClient
|
|
@@ -78,6 +79,7 @@ class CrmClient:
|
|
|
78
79
|
self._opportunities: typing.Optional[OpportunitiesClient] = None
|
|
79
80
|
self._passthrough: typing.Optional[PassthroughClient] = None
|
|
80
81
|
self._regenerate_key: typing.Optional[RegenerateKeyClient] = None
|
|
82
|
+
self._selective_sync: typing.Optional[SelectiveSyncClient] = None
|
|
81
83
|
self._stages: typing.Optional[StagesClient] = None
|
|
82
84
|
self._sync_status: typing.Optional[SyncStatusClient] = None
|
|
83
85
|
self._force_resync: typing.Optional[ForceResyncClient] = None
|
|
@@ -300,6 +302,14 @@ class CrmClient:
|
|
|
300
302
|
self._regenerate_key = RegenerateKeyClient(client_wrapper=self._client_wrapper)
|
|
301
303
|
return self._regenerate_key
|
|
302
304
|
|
|
305
|
+
@property
|
|
306
|
+
def selective_sync(self):
|
|
307
|
+
if self._selective_sync is None:
|
|
308
|
+
from .resources.selective_sync.client import SelectiveSyncClient # noqa: E402
|
|
309
|
+
|
|
310
|
+
self._selective_sync = SelectiveSyncClient(client_wrapper=self._client_wrapper)
|
|
311
|
+
return self._selective_sync
|
|
312
|
+
|
|
303
313
|
@property
|
|
304
314
|
def stages(self):
|
|
305
315
|
if self._stages is None:
|
|
@@ -378,6 +388,7 @@ class AsyncCrmClient:
|
|
|
378
388
|
self._opportunities: typing.Optional[AsyncOpportunitiesClient] = None
|
|
379
389
|
self._passthrough: typing.Optional[resources_crm_resources_passthrough_client_AsyncPassthroughClient] = None
|
|
380
390
|
self._regenerate_key: typing.Optional[AsyncRegenerateKeyClient] = None
|
|
391
|
+
self._selective_sync: typing.Optional[AsyncSelectiveSyncClient] = None
|
|
381
392
|
self._stages: typing.Optional[AsyncStagesClient] = None
|
|
382
393
|
self._sync_status: typing.Optional[AsyncSyncStatusClient] = None
|
|
383
394
|
self._force_resync: typing.Optional[AsyncForceResyncClient] = None
|
|
@@ -600,6 +611,14 @@ class AsyncCrmClient:
|
|
|
600
611
|
self._regenerate_key = AsyncRegenerateKeyClient(client_wrapper=self._client_wrapper)
|
|
601
612
|
return self._regenerate_key
|
|
602
613
|
|
|
614
|
+
@property
|
|
615
|
+
def selective_sync(self):
|
|
616
|
+
if self._selective_sync is None:
|
|
617
|
+
from .resources.selective_sync.client import AsyncSelectiveSyncClient # noqa: E402
|
|
618
|
+
|
|
619
|
+
self._selective_sync = AsyncSelectiveSyncClient(client_wrapper=self._client_wrapper)
|
|
620
|
+
return self._selective_sync
|
|
621
|
+
|
|
603
622
|
@property
|
|
604
623
|
def stages(self):
|
|
605
624
|
if self._stages is None:
|
|
@@ -33,6 +33,7 @@ if typing.TYPE_CHECKING:
|
|
|
33
33
|
passthrough,
|
|
34
34
|
regenerate_key,
|
|
35
35
|
scopes,
|
|
36
|
+
selective_sync,
|
|
36
37
|
stages,
|
|
37
38
|
sync_status,
|
|
38
39
|
tasks,
|
|
@@ -97,6 +98,7 @@ _dynamic_imports: typing.Dict[str, str] = {
|
|
|
97
98
|
"passthrough": ".passthrough",
|
|
98
99
|
"regenerate_key": ".regenerate_key",
|
|
99
100
|
"scopes": ".scopes",
|
|
101
|
+
"selective_sync": ".selective_sync",
|
|
100
102
|
"stages": ".stages",
|
|
101
103
|
"sync_status": ".sync_status",
|
|
102
104
|
"tasks": ".tasks",
|
|
@@ -170,6 +172,7 @@ __all__ = [
|
|
|
170
172
|
"passthrough",
|
|
171
173
|
"regenerate_key",
|
|
172
174
|
"scopes",
|
|
175
|
+
"selective_sync",
|
|
173
176
|
"stages",
|
|
174
177
|
"sync_status",
|
|
175
178
|
"tasks",
|
|
@@ -0,0 +1,104 @@
|
|
|
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.selective_sync_condition_list import SelectiveSyncConditionList
|
|
8
|
+
from .raw_client import AsyncRawSelectiveSyncClient, RawSelectiveSyncClient
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class SelectiveSyncClient:
|
|
12
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
13
|
+
self._raw_client = RawSelectiveSyncClient(client_wrapper=client_wrapper)
|
|
14
|
+
|
|
15
|
+
@property
|
|
16
|
+
def with_raw_response(self) -> RawSelectiveSyncClient:
|
|
17
|
+
"""
|
|
18
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
19
|
+
|
|
20
|
+
Returns
|
|
21
|
+
-------
|
|
22
|
+
RawSelectiveSyncClient
|
|
23
|
+
"""
|
|
24
|
+
return self._raw_client
|
|
25
|
+
|
|
26
|
+
def conditions_list(self, *, request_options: typing.Optional[RequestOptions] = None) -> SelectiveSyncConditionList:
|
|
27
|
+
"""
|
|
28
|
+
Returns a list of `SelectiveSyncCondition` objects.
|
|
29
|
+
|
|
30
|
+
Parameters
|
|
31
|
+
----------
|
|
32
|
+
request_options : typing.Optional[RequestOptions]
|
|
33
|
+
Request-specific configuration.
|
|
34
|
+
|
|
35
|
+
Returns
|
|
36
|
+
-------
|
|
37
|
+
SelectiveSyncConditionList
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
Examples
|
|
41
|
+
--------
|
|
42
|
+
from merge import Merge
|
|
43
|
+
|
|
44
|
+
client = Merge(
|
|
45
|
+
account_token="YOUR_ACCOUNT_TOKEN",
|
|
46
|
+
api_key="YOUR_API_KEY",
|
|
47
|
+
)
|
|
48
|
+
client.crm.selective_sync.conditions_list()
|
|
49
|
+
"""
|
|
50
|
+
_response = self._raw_client.conditions_list(request_options=request_options)
|
|
51
|
+
return _response.data
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class AsyncSelectiveSyncClient:
|
|
55
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
56
|
+
self._raw_client = AsyncRawSelectiveSyncClient(client_wrapper=client_wrapper)
|
|
57
|
+
|
|
58
|
+
@property
|
|
59
|
+
def with_raw_response(self) -> AsyncRawSelectiveSyncClient:
|
|
60
|
+
"""
|
|
61
|
+
Retrieves a raw implementation of this client that returns raw responses.
|
|
62
|
+
|
|
63
|
+
Returns
|
|
64
|
+
-------
|
|
65
|
+
AsyncRawSelectiveSyncClient
|
|
66
|
+
"""
|
|
67
|
+
return self._raw_client
|
|
68
|
+
|
|
69
|
+
async def conditions_list(
|
|
70
|
+
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
71
|
+
) -> SelectiveSyncConditionList:
|
|
72
|
+
"""
|
|
73
|
+
Returns a list of `SelectiveSyncCondition` objects.
|
|
74
|
+
|
|
75
|
+
Parameters
|
|
76
|
+
----------
|
|
77
|
+
request_options : typing.Optional[RequestOptions]
|
|
78
|
+
Request-specific configuration.
|
|
79
|
+
|
|
80
|
+
Returns
|
|
81
|
+
-------
|
|
82
|
+
SelectiveSyncConditionList
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
Examples
|
|
86
|
+
--------
|
|
87
|
+
import asyncio
|
|
88
|
+
|
|
89
|
+
from merge import AsyncMerge
|
|
90
|
+
|
|
91
|
+
client = AsyncMerge(
|
|
92
|
+
account_token="YOUR_ACCOUNT_TOKEN",
|
|
93
|
+
api_key="YOUR_API_KEY",
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
async def main() -> None:
|
|
98
|
+
await client.crm.selective_sync.conditions_list()
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
asyncio.run(main())
|
|
102
|
+
"""
|
|
103
|
+
_response = await self._raw_client.conditions_list(request_options=request_options)
|
|
104
|
+
return _response.data
|