Skip to content

Commit 21ada11

Browse files
committed
Release 0.0.647
1 parent e773827 commit 21ada11

10 files changed

Lines changed: 53 additions & 2 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "revert-api"
3-
version = "0.0.630"
3+
version = "0.0.647"
44
description = ""
55
readme = "README.md"
66
authors = []

src/revert/core/client_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def get_headers(self) -> typing.Dict[str, str]:
1313
headers: typing.Dict[str, str] = {
1414
"X-Fern-Language": "Python",
1515
"X-Fern-SDK-Name": "revert-api",
16-
"X-Fern-SDK-Version": "0.0.630",
16+
"X-Fern-SDK-Version": "0.0.647",
1717
}
1818
return headers
1919

src/revert/resources/common/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from .resources import (
44
Account,
55
App,
6+
AppConfig,
67
BadRequestError,
78
BaseError,
89
Channel,
@@ -53,6 +54,7 @@
5354
__all__ = [
5455
"Account",
5556
"App",
57+
"AppConfig",
5658
"BadRequestError",
5759
"BaseError",
5860
"Channel",

src/revert/resources/common/resources/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from .types import (
44
Account,
55
App,
6+
AppConfig,
67
Connection,
78
ResponseStatus,
89
RevertUser,
@@ -50,6 +51,7 @@
5051
__all__ = [
5152
"Account",
5253
"App",
54+
"AppConfig",
5355
"BadRequestError",
5456
"BaseError",
5557
"Channel",

src/revert/resources/common/resources/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from .types import (
44
Account,
55
App,
6+
AppConfig,
67
Connection,
78
ResponseStatus,
89
RevertUser,
@@ -15,6 +16,7 @@
1516
__all__ = [
1617
"Account",
1718
"App",
19+
"AppConfig",
1820
"Connection",
1921
"ResponseStatus",
2022
"RevertUser",

src/revert/resources/common/resources/types/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from .account import Account
44
from .app import App
5+
from .app_config import AppConfig
56
from .connection import Connection
67
from .response_status import ResponseStatus
78
from .revert_user import RevertUser
@@ -13,6 +14,7 @@
1314
__all__ = [
1415
"Account",
1516
"App",
17+
"AppConfig",
1618
"Connection",
1719
"ResponseStatus",
1820
"RevertUser",

src/revert/resources/common/resources/types/types/app.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import typing
77

88
from ......core.datetime_utils import serialize_datetime
9+
from .app_config import AppConfig
910
from .tpid import Tpid
1011

1112
try:
@@ -24,6 +25,7 @@ class App(pydantic.BaseModel):
2425
account: typing.Optional[Account]
2526
connections: typing.Optional[typing.List[Connection]]
2627
is_revert_app: bool
28+
app_config: typing.Optional[AppConfig]
2729

2830
def json(self, **kwargs: typing.Any) -> str:
2931
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import datetime as dt
4+
import typing
5+
6+
from ......core.datetime_utils import serialize_datetime
7+
8+
try:
9+
import pydantic.v1 as pydantic # type: ignore
10+
except ImportError:
11+
import pydantic # type: ignore
12+
13+
14+
class AppConfig(pydantic.BaseModel):
15+
bot_token: typing.Optional[str]
16+
org_url: typing.Optional[str]
17+
18+
def json(self, **kwargs: typing.Any) -> str:
19+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
20+
return super().json(**kwargs_with_defaults)
21+
22+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
23+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
24+
return super().dict(**kwargs_with_defaults)
25+
26+
class Config:
27+
frozen = True
28+
smart_union = True
29+
json_encoders = {dt.datetime: serialize_datetime}

src/revert/resources/common/resources/types/types/tpid.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ class Tpid(str, enum.Enum):
1212
SFDC = "sfdc"
1313
PIPEDRIVE = "pipedrive"
1414
SLACK = "slack"
15+
CLOSECRM = "closecrm"
16+
MS_DYNAMICS_365_SALES = "ms_dynamics_365_sales"
1517

1618
def visit(
1719
self,
@@ -20,6 +22,8 @@ def visit(
2022
sfdc: typing.Callable[[], T_Result],
2123
pipedrive: typing.Callable[[], T_Result],
2224
slack: typing.Callable[[], T_Result],
25+
closecrm: typing.Callable[[], T_Result],
26+
ms_dynamics_365_sales: typing.Callable[[], T_Result],
2327
) -> T_Result:
2428
if self is Tpid.HUBSPOT:
2529
return hubspot()
@@ -31,3 +35,7 @@ def visit(
3135
return pipedrive()
3236
if self is Tpid.SLACK:
3337
return slack()
38+
if self is Tpid.CLOSECRM:
39+
return closecrm()
40+
if self is Tpid.MS_DYNAMICS_365_SALES:
41+
return ms_dynamics_365_sales()

src/revert/resources/common/resources/unified/types/user_write.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212

1313

1414
class UserWrite(pydantic.BaseModel):
15+
"""
16+
Include the "businessUnitId" in the "additional" section, as it is a mandatory field for Microsoft Dynamics Sales.
17+
"""
18+
1519
first_name: str = pydantic.Field(alias="firstName", description="The first name of a user in a CRM.")
1620
last_name: str = pydantic.Field(alias="lastName", description="The last name of a user in a CRM.")
1721
phone: str = pydantic.Field(description="The phone number of a user in a CRM.")

0 commit comments

Comments
 (0)