Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "python-intercom"

[tool.poetry]
name = "python-intercom"
version = "5.0.1"
version = "5.0.2"
description = ""
readme = "README.md"
authors = []
Expand Down
18 changes: 9 additions & 9 deletions src/intercom/contacts/types/contact.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ class Contact(UncheckedBaseModel):
Contacts represent your leads and users in Intercom.
"""

type: typing.Optional[typing.Literal["contact"]] = pydantic.Field(default=None)
type: typing.Literal["contact"] = pydantic.Field(default="contact")
"""
The type of object.
"""

id: typing.Optional[str] = pydantic.Field(default=None)
id: str = pydantic.Field()
"""
The unique identifier for the contact which is given by Intercom.
"""
Expand All @@ -32,12 +32,12 @@ class Contact(UncheckedBaseModel):
The unique identifier for the contact which is provided by the Client.
"""

workspace_id: typing.Optional[str] = pydantic.Field(default=None)
workspace_id: str = pydantic.Field()
"""
The id of the workspace which the contact belongs to.
"""

role: typing.Optional[str] = pydantic.Field(default=None)
role: str = pydantic.Field()
"""
The role of the contact.
"""
Expand Down Expand Up @@ -67,27 +67,27 @@ class Contact(UncheckedBaseModel):
The id of an admin that has been assigned account ownership of the contact.
"""

has_hard_bounced: typing.Optional[bool] = pydantic.Field(default=None)
has_hard_bounced: bool = pydantic.Field()
"""
Whether the contact has had an email sent to them hard bounce.
"""

marked_email_as_spam: typing.Optional[bool] = pydantic.Field(default=None)
marked_email_as_spam: bool = pydantic.Field()
"""
Whether the contact has marked an email sent to them as spam.
"""

unsubscribed_from_emails: typing.Optional[bool] = pydantic.Field(default=None)
unsubscribed_from_emails: bool = pydantic.Field()
"""
Whether the contact is unsubscribed from emails.
"""

created_at: typing.Optional[int] = pydantic.Field(default=None)
created_at: int = pydantic.Field()
"""
(UNIX timestamp) The time when the contact was created.
"""

updated_at: typing.Optional[int] = pydantic.Field(default=None)
updated_at: int = pydantic.Field()
"""
(UNIX timestamp) The time when the contact was last updated.
"""
Expand Down
20 changes: 10 additions & 10 deletions src/intercom/conversations/types/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ class Conversation(UncheckedBaseModel):
Conversations are how you can communicate with users in Intercom. They are created when a contact replies to an outbound message, or when one admin directly sends a message to a single contact.
"""

type: typing.Optional[str] = pydantic.Field(default=None)
type: str = pydantic.Field()
"""
Always conversation.
"""

id: typing.Optional[str] = pydantic.Field(default=None)
id: str = pydantic.Field()
"""
The id representing the conversation.
"""
Expand All @@ -41,12 +41,12 @@ class Conversation(UncheckedBaseModel):
The title given to the conversation.
"""

created_at: typing.Optional[int] = pydantic.Field(default=None)
created_at: int = pydantic.Field()
"""
The time the conversation was created.
"""

updated_at: typing.Optional[int] = pydantic.Field(default=None)
updated_at: int = pydantic.Field()
"""
The last time the conversation was updated.
"""
Expand All @@ -61,17 +61,17 @@ class Conversation(UncheckedBaseModel):
If set this is the time in the future when this conversation will be marked as open. i.e. it will be in a snoozed state until this time. i.e. it will be in a snoozed state until this time.
"""

open: typing.Optional[bool] = pydantic.Field(default=None)
open: bool = pydantic.Field()
"""
Indicates whether a conversation is open (true) or closed (false).
"""

state: typing.Optional[ConversationState] = pydantic.Field(default=None)
state: ConversationState = pydantic.Field()
"""
Can be set to "open", "closed" or "snoozed".
"""

read: typing.Optional[bool] = pydantic.Field(default=None)
read: bool = pydantic.Field()
"""
Indicates whether a conversation has been read.
"""
Expand All @@ -98,10 +98,10 @@ class Conversation(UncheckedBaseModel):

tags: typing.Optional[Tags] = None
conversation_rating: typing.Optional[ConversationRating] = None
source: typing.Optional[ConversationSource] = None
contacts: typing.Optional[ConversationContacts] = None
source: ConversationSource
contacts: ConversationContacts
teammates: typing.Optional[ConversationTeammates] = None
custom_attributes: typing.Optional[CustomAttributes] = None
custom_attributes: CustomAttributes
first_contact_reply: typing.Optional[ConversationFirstContactReply] = None
sla_applied: typing.Optional[SlaApplied] = None
statistics: typing.Optional[ConversationStatistics] = None
Expand Down
4 changes: 2 additions & 2 deletions src/intercom/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ def __init__(

def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"User-Agent": "python-intercom/5.0.1",
"User-Agent": "python-intercom/5.0.2",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "python-intercom",
"X-Fern-SDK-Version": "5.0.1",
"X-Fern-SDK-Version": "5.0.2",
**(self.get_custom_headers() or {}),
}
headers["Authorization"] = f"Bearer {self._get_token()}"
Expand Down
2 changes: 1 addition & 1 deletion src/intercom/data_events/types/data_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class DataEvent(UncheckedBaseModel):
Data events are used to notify Intercom of changes to your data.
"""

type: typing.Optional[typing.Literal["event"]] = pydantic.Field(default=None)
type: typing.Literal["event"] = pydantic.Field(default="event")
"""
The type of the object
"""
Expand Down
2 changes: 1 addition & 1 deletion src/intercom/messages/types/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Message(UncheckedBaseModel):
The type of message that was sent. Can be email, inapp, facebook or twitter.
"""

conversation_id: typing.Optional[str] = pydantic.Field(default=None)
conversation_id: str = pydantic.Field()
"""
The associated conversation_id
"""
Expand Down
8 changes: 4 additions & 4 deletions src/intercom/notes/types/note.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ class Note(UncheckedBaseModel):
Notes allow you to annotate and comment on your contacts.
"""

type: typing.Optional[str] = pydantic.Field(default=None)
type: str = pydantic.Field()
"""
String representing the object's type. Always has the value `note`.
"""

id: typing.Optional[str] = pydantic.Field(default=None)
id: str = pydantic.Field()
"""
The id of the note.
"""

created_at: typing.Optional[int] = pydantic.Field(default=None)
created_at: int = pydantic.Field()
"""
The time the note was created.
"""
Expand All @@ -39,7 +39,7 @@ class Note(UncheckedBaseModel):
Optional. Represents the Admin that created the note.
"""

body: typing.Optional[str] = pydantic.Field(default=None)
body: str = pydantic.Field()
"""
The body text of the note.
"""
Expand Down
12 changes: 6 additions & 6 deletions src/intercom/tickets/types/ticket.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,30 @@ class Ticket(UncheckedBaseModel):
Tickets are how you track requests from your users.
"""

type: typing.Optional[typing.Literal["ticket"]] = pydantic.Field(default=None)
type: typing.Literal["ticket"] = pydantic.Field(default="ticket")
"""
Always ticket
"""

id: typing.Optional[str] = pydantic.Field(default=None)
id: str = pydantic.Field()
"""
The unique identifier for the ticket which is given by Intercom.
"""

ticket_id: typing.Optional[str] = pydantic.Field(default=None)
ticket_id: str = pydantic.Field()
"""
The ID of the Ticket used in the Intercom Inbox and Messenger. Do not use ticket_id for API queries.
"""

category: typing.Optional[TicketCategory] = pydantic.Field(default=None)
category: TicketCategory = pydantic.Field()
"""
Category of the Ticket.
"""

ticket_attributes: typing.Optional[TicketCustomAttributes] = None
ticket_attributes: TicketCustomAttributes
ticket_state: typing.Optional[TicketState] = None
ticket_type: typing.Optional[TicketType] = None
contacts: typing.Optional[TicketContacts] = None
contacts: TicketContacts
admin_assignee_id: typing.Optional[str] = pydantic.Field(default=None)
"""
The id representing the admin assigned to the ticket.
Expand Down
6 changes: 3 additions & 3 deletions src/intercom/types/multiple_filter_search_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ class Config:
extra = pydantic.Extra.allow


from .single_filter_search_request_value_two_item import SingleFilterSearchRequestValueTwoItem # noqa: E402, I001
from .single_filter_search_request_operator import SingleFilterSearchRequestOperator # noqa: E402, I001
from .single_filter_search_request_value import SingleFilterSearchRequestValue # noqa: E402, I001
from .multiple_filter_search_request_value import MultipleFilterSearchRequestValue # noqa: E402, I001
from .multiple_filter_search_request_operator import MultipleFilterSearchRequestOperator # noqa: E402, I001
from .multiple_filter_search_request_value import MultipleFilterSearchRequestValue # noqa: E402, I001
from .single_filter_search_request_value_two_item import SingleFilterSearchRequestValueTwoItem # noqa: E402, I001
from .single_filter_search_request_operator import SingleFilterSearchRequestOperator # noqa: E402, I001
from .single_filter_search_request import SingleFilterSearchRequest # noqa: E402, I001

update_forward_refs(
Expand Down
6 changes: 3 additions & 3 deletions src/intercom/types/visitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ class Visitor(UncheckedBaseModel):
Visitors are useful for representing anonymous people that have not yet been identified. They usually represent website visitors. Visitors are not visible in Intercom platform. The Visitors resource provides methods to fetch, update, convert and delete.
"""

type: typing.Optional[typing.Literal["visitor"]] = pydantic.Field(default=None)
type: typing.Literal["visitor"] = pydantic.Field(default="visitor")
"""
Value is 'visitor'
"""

id: typing.Optional[str] = pydantic.Field(default=None)
id: str = pydantic.Field()
"""
The Intercom defined id representing the Visitor.
"""

user_id: typing.Optional[str] = pydantic.Field(default=None)
user_id: str = pydantic.Field()
"""
Automatically generated identifier for the Visitor.
"""
Expand Down
6 changes: 3 additions & 3 deletions src/intercom/unstable/types/multiple_filter_search_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ class Config:


from .single_filter_search_request_operator import SingleFilterSearchRequestOperator # noqa: E402, I001
from .single_filter_search_request import SingleFilterSearchRequest # noqa: E402, I001
from .single_filter_search_request_value import SingleFilterSearchRequestValue # noqa: E402, I001
from .single_filter_search_request_value_two_item import SingleFilterSearchRequestValueTwoItem # noqa: E402, I001
from .multiple_filter_search_request_value import MultipleFilterSearchRequestValue # noqa: E402, I001
from .single_filter_search_request import SingleFilterSearchRequest # noqa: E402, I001
from .multiple_filter_search_request_operator import MultipleFilterSearchRequestOperator # noqa: E402, I001
from .single_filter_search_request_value import SingleFilterSearchRequestValue # noqa: E402, I001
from .multiple_filter_search_request_value import MultipleFilterSearchRequestValue # noqa: E402, I001

update_forward_refs(
MultipleFilterSearchRequest,
Expand Down
Loading