Skip to content

Commit

Permalink
Release 0.0.647
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Feb 16, 2024
1 parent e773827 commit 21ada11
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "revert-api"
version = "0.0.630"
version = "0.0.647"
description = ""
readme = "README.md"
authors = []
Expand Down
2 changes: 1 addition & 1 deletion src/revert/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "revert-api",
"X-Fern-SDK-Version": "0.0.630",
"X-Fern-SDK-Version": "0.0.647",
}
return headers

Expand Down
2 changes: 2 additions & 0 deletions src/revert/resources/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from .resources import (
Account,
App,
AppConfig,
BadRequestError,
BaseError,
Channel,
Expand Down Expand Up @@ -53,6 +54,7 @@
__all__ = [
"Account",
"App",
"AppConfig",
"BadRequestError",
"BaseError",
"Channel",
Expand Down
2 changes: 2 additions & 0 deletions src/revert/resources/common/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from .types import (
Account,
App,
AppConfig,
Connection,
ResponseStatus,
RevertUser,
Expand Down Expand Up @@ -50,6 +51,7 @@
__all__ = [
"Account",
"App",
"AppConfig",
"BadRequestError",
"BaseError",
"Channel",
Expand Down
2 changes: 2 additions & 0 deletions src/revert/resources/common/resources/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from .types import (
Account,
App,
AppConfig,
Connection,
ResponseStatus,
RevertUser,
Expand All @@ -15,6 +16,7 @@
__all__ = [
"Account",
"App",
"AppConfig",
"Connection",
"ResponseStatus",
"RevertUser",
Expand Down
2 changes: 2 additions & 0 deletions src/revert/resources/common/resources/types/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from .account import Account
from .app import App
from .app_config import AppConfig
from .connection import Connection
from .response_status import ResponseStatus
from .revert_user import RevertUser
Expand All @@ -13,6 +14,7 @@
__all__ = [
"Account",
"App",
"AppConfig",
"Connection",
"ResponseStatus",
"RevertUser",
Expand Down
2 changes: 2 additions & 0 deletions src/revert/resources/common/resources/types/types/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import typing

from ......core.datetime_utils import serialize_datetime
from .app_config import AppConfig
from .tpid import Tpid

try:
Expand All @@ -24,6 +25,7 @@ class App(pydantic.BaseModel):
account: typing.Optional[Account]
connections: typing.Optional[typing.List[Connection]]
is_revert_app: bool
app_config: typing.Optional[AppConfig]

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
Expand Down
29 changes: 29 additions & 0 deletions src/revert/resources/common/resources/types/types/app_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

from ......core.datetime_utils import serialize_datetime

try:
import pydantic.v1 as pydantic # type: ignore
except ImportError:
import pydantic # type: ignore


class AppConfig(pydantic.BaseModel):
bot_token: typing.Optional[str]
org_url: typing.Optional[str]

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().json(**kwargs_with_defaults)

def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
return super().dict(**kwargs_with_defaults)

class Config:
frozen = True
smart_union = True
json_encoders = {dt.datetime: serialize_datetime}
8 changes: 8 additions & 0 deletions src/revert/resources/common/resources/types/types/tpid.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ class Tpid(str, enum.Enum):
SFDC = "sfdc"
PIPEDRIVE = "pipedrive"
SLACK = "slack"
CLOSECRM = "closecrm"
MS_DYNAMICS_365_SALES = "ms_dynamics_365_sales"

def visit(
self,
Expand All @@ -20,6 +22,8 @@ def visit(
sfdc: typing.Callable[[], T_Result],
pipedrive: typing.Callable[[], T_Result],
slack: typing.Callable[[], T_Result],
closecrm: typing.Callable[[], T_Result],
ms_dynamics_365_sales: typing.Callable[[], T_Result],
) -> T_Result:
if self is Tpid.HUBSPOT:
return hubspot()
Expand All @@ -31,3 +35,7 @@ def visit(
return pipedrive()
if self is Tpid.SLACK:
return slack()
if self is Tpid.CLOSECRM:
return closecrm()
if self is Tpid.MS_DYNAMICS_365_SALES:
return ms_dynamics_365_sales()
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@


class UserWrite(pydantic.BaseModel):
"""
Include the "businessUnitId" in the "additional" section, as it is a mandatory field for Microsoft Dynamics Sales.
"""

first_name: str = pydantic.Field(alias="firstName", description="The first name of a user in a CRM.")
last_name: str = pydantic.Field(alias="lastName", description="The last name of a user in a CRM.")
phone: str = pydantic.Field(description="The phone number of a user in a CRM.")
Expand Down

0 comments on commit 21ada11

Please sign in to comment.