Skip to content

Commit

Permalink
Release 0.0.654
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Feb 17, 2024
1 parent 25a5726 commit 59eacae
Show file tree
Hide file tree
Showing 24 changed files with 277 additions and 82 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.649"
version = "0.0.654"
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.649",
"X-Fern-SDK-Version": "0.0.654",
}
return headers

Expand Down
12 changes: 12 additions & 0 deletions src/revert/resources/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,32 @@
Connection,
Contact,
ContactAssociation,
ContactRead,
ContactWrite,
Deal,
DealAssociation,
DealRead,
DealWrite,
Event,
EventAssociation,
EventRead,
EventWrite,
InternalServerError,
Lead,
LeadAssociation,
LeadRead,
LeadWrite,
Message,
NotFoundError,
Note,
NoteRead,
NoteWrite,
ResponseStatus,
RevertUser,
StandardObject,
Task,
TaskAssociation,
TaskRead,
TaskTicket,
TaskTicketWrite,
TaskWrite,
Expand Down Expand Up @@ -66,26 +72,32 @@
"Connection",
"Contact",
"ContactAssociation",
"ContactRead",
"ContactWrite",
"Deal",
"DealAssociation",
"DealRead",
"DealWrite",
"Event",
"EventAssociation",
"EventRead",
"EventWrite",
"InternalServerError",
"Lead",
"LeadAssociation",
"LeadRead",
"LeadWrite",
"Message",
"NotFoundError",
"Note",
"NoteRead",
"NoteWrite",
"ResponseStatus",
"RevertUser",
"StandardObject",
"Task",
"TaskAssociation",
"TaskRead",
"TaskTicket",
"TaskTicketWrite",
"TaskWrite",
Expand Down
12 changes: 12 additions & 0 deletions src/revert/resources/common/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,23 @@
Company,
CompanyAddress,
Contact,
ContactRead,
ContactWrite,
Deal,
DealRead,
DealWrite,
Event,
EventRead,
EventWrite,
Lead,
LeadRead,
LeadWrite,
Message,
Note,
NoteRead,
NoteWrite,
Task,
TaskRead,
TaskTicket,
TaskTicketWrite,
TaskWrite,
Expand All @@ -63,26 +69,32 @@
"Connection",
"Contact",
"ContactAssociation",
"ContactRead",
"ContactWrite",
"Deal",
"DealAssociation",
"DealRead",
"DealWrite",
"Event",
"EventAssociation",
"EventRead",
"EventWrite",
"InternalServerError",
"Lead",
"LeadAssociation",
"LeadRead",
"LeadWrite",
"Message",
"NotFoundError",
"Note",
"NoteRead",
"NoteWrite",
"ResponseStatus",
"RevertUser",
"StandardObject",
"Task",
"TaskAssociation",
"TaskRead",
"TaskTicket",
"TaskTicketWrite",
"TaskWrite",
Expand Down
12 changes: 12 additions & 0 deletions src/revert/resources/common/resources/unified/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,23 @@
Company,
CompanyAddress,
Contact,
ContactRead,
ContactWrite,
Deal,
DealRead,
DealWrite,
Event,
EventRead,
EventWrite,
Lead,
LeadRead,
LeadWrite,
Message,
Note,
NoteRead,
NoteWrite,
Task,
TaskRead,
TaskTicket,
TaskTicketWrite,
TaskWrite,
Expand All @@ -33,17 +39,23 @@
"Company",
"CompanyAddress",
"Contact",
"ContactRead",
"ContactWrite",
"Deal",
"DealRead",
"DealWrite",
"Event",
"EventRead",
"EventWrite",
"Lead",
"LeadRead",
"LeadWrite",
"Message",
"Note",
"NoteRead",
"NoteWrite",
"Task",
"TaskRead",
"TaskTicket",
"TaskTicketWrite",
"TaskWrite",
Expand Down
12 changes: 12 additions & 0 deletions src/revert/resources/common/resources/unified/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,23 @@
from .company import Company
from .company_address import CompanyAddress
from .contact import Contact
from .contact_read import ContactRead
from .contact_write import ContactWrite
from .deal import Deal
from .deal_read import DealRead
from .deal_write import DealWrite
from .event import Event
from .event_read import EventRead
from .event_write import EventWrite
from .lead import Lead
from .lead_read import LeadRead
from .lead_write import LeadWrite
from .message import Message
from .note import Note
from .note_read import NoteRead
from .note_write import NoteWrite
from .task import Task
from .task_read import TaskRead
from .task_ticket import TaskTicket
from .task_ticket_write import TaskTicketWrite
from .task_write import TaskWrite
Expand All @@ -31,17 +37,23 @@
"Company",
"CompanyAddress",
"Contact",
"ContactRead",
"ContactWrite",
"Deal",
"DealRead",
"DealWrite",
"Event",
"EventRead",
"EventWrite",
"Lead",
"LeadRead",
"LeadWrite",
"Message",
"Note",
"NoteRead",
"NoteWrite",
"Task",
"TaskRead",
"TaskTicket",
"TaskTicketWrite",
"TaskWrite",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

from ......core.datetime_utils import serialize_datetime
from .common_unified_fields import CommonUnifiedFields
from .contact_write import ContactWrite
from .contact_read import ContactRead


class Contact(CommonUnifiedFields, ContactWrite):
class Contact(CommonUnifiedFields, ContactRead):
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)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# 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 ContactRead(pydantic.BaseModel):
first_name: str = pydantic.Field(alias="firstName", description="The first name of the contact in a CRM.")
last_name: str = pydantic.Field(alias="lastName", description="The last name of the contact in a CRM.")
phone: str = pydantic.Field(description="The phone number of the contact in a CRM.")
email: str = pydantic.Field(description="The email of the contact in a CRM.")

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
allow_population_by_field_name = True
json_encoders = {dt.datetime: serialize_datetime}
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,10 @@

from ......core.datetime_utils import serialize_datetime
from ...associations.types.contact_association import ContactAssociation
from .contact_read import ContactRead

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


class ContactWrite(pydantic.BaseModel):
first_name: str = pydantic.Field(alias="firstName", description="The first name of the contact in a CRM.")
last_name: str = pydantic.Field(alias="lastName", description="The last name of the contact in a CRM.")
phone: str = pydantic.Field(description="The phone number of the contact in a CRM.")
email: str = pydantic.Field(description="The email of the contact in a CRM.")
class ContactWrite(ContactRead):
associations: typing.Optional[ContactAssociation]

def json(self, **kwargs: typing.Any) -> str:
Expand Down
4 changes: 2 additions & 2 deletions src/revert/resources/common/resources/unified/types/deal.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

from ......core.datetime_utils import serialize_datetime
from .common_unified_fields import CommonUnifiedFields
from .deal_write import DealWrite
from .deal_read import DealRead


class Deal(CommonUnifiedFields, DealWrite):
class Deal(CommonUnifiedFields, DealRead):
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)
Expand Down
42 changes: 42 additions & 0 deletions src/revert/resources/common/resources/unified/types/deal_read.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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 DealRead(pydantic.BaseModel):
amount: int = pydantic.Field(description="The deal amount mentioned in the CRM for this deal.")
priority: typing.Optional[str] = pydantic.Field(
description="The priority attached to this deal. (not supported by pipedrive)"
)
stage: str = pydantic.Field(description="Deal stage in the CRM.")
name: str = pydantic.Field(description="The name of the deal in a CRM.")
expected_close_date: typing.Any = pydantic.Field(
alias="expectedCloseDate",
description="Expected close date for this deal. (not supported by pipedrive search api)",
)
is_won: bool = pydantic.Field(alias="isWon", description="Is `true` if the deal is closed (won).")
probability: int = pydantic.Field(
description="Probability of the deal getting closed, a decimal number between 0 to 1 (inclusive)."
)

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
allow_population_by_field_name = True
json_encoders = {dt.datetime: serialize_datetime}
22 changes: 2 additions & 20 deletions src/revert/resources/common/resources/unified/types/deal_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,10 @@

from ......core.datetime_utils import serialize_datetime
from ...associations.types.deal_association import DealAssociation
from .deal_read import DealRead

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


class DealWrite(pydantic.BaseModel):
amount: int = pydantic.Field(description="The deal amount mentioned in the CRM for this deal.")
priority: typing.Optional[str] = pydantic.Field(
description="The priority attached to this deal. (not supported by pipedrive)"
)
stage: str = pydantic.Field(description="Deal stage in the CRM.")
name: str = pydantic.Field(description="The name of the deal in a CRM.")
expected_close_date: typing.Any = pydantic.Field(
alias="expectedCloseDate",
description="Expected close date for this deal. (not supported by pipedrive search api)",
)
is_won: bool = pydantic.Field(alias="isWon", description="Is `true` if the deal is closed (won).")
probability: int = pydantic.Field(
description="Probability of the deal getting closed, a decimal number between 0 to 1 (inclusive)."
)
class DealWrite(DealRead):
associations: typing.Optional[DealAssociation]

def json(self, **kwargs: typing.Any) -> str:
Expand Down
Loading

0 comments on commit 59eacae

Please sign in to comment.