diff --git a/pyproject.toml b/pyproject.toml index b3a2bb2..b7f1d23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = [] diff --git a/src/intercom/contacts/types/contact.py b/src/intercom/contacts/types/contact.py index bf52261..5b075ae 100644 --- a/src/intercom/contacts/types/contact.py +++ b/src/intercom/contacts/types/contact.py @@ -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. """ @@ -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. """ @@ -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. """ diff --git a/src/intercom/conversations/types/conversation.py b/src/intercom/conversations/types/conversation.py index 8429784..dfde669 100644 --- a/src/intercom/conversations/types/conversation.py +++ b/src/intercom/conversations/types/conversation.py @@ -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. """ @@ -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. """ @@ -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. """ @@ -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 diff --git a/src/intercom/core/client_wrapper.py b/src/intercom/core/client_wrapper.py index d5110d3..f8d1504 100644 --- a/src/intercom/core/client_wrapper.py +++ b/src/intercom/core/client_wrapper.py @@ -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()}" diff --git a/src/intercom/data_events/types/data_event.py b/src/intercom/data_events/types/data_event.py index db2acc0..9f8189b 100644 --- a/src/intercom/data_events/types/data_event.py +++ b/src/intercom/data_events/types/data_event.py @@ -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 """ diff --git a/src/intercom/messages/types/message.py b/src/intercom/messages/types/message.py index 289ece7..0e2cfa1 100644 --- a/src/intercom/messages/types/message.py +++ b/src/intercom/messages/types/message.py @@ -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 """ diff --git a/src/intercom/notes/types/note.py b/src/intercom/notes/types/note.py index 3bddbc5..0d84345 100644 --- a/src/intercom/notes/types/note.py +++ b/src/intercom/notes/types/note.py @@ -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. """ @@ -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. """ diff --git a/src/intercom/tickets/types/ticket.py b/src/intercom/tickets/types/ticket.py index eca715f..60b777d 100644 --- a/src/intercom/tickets/types/ticket.py +++ b/src/intercom/tickets/types/ticket.py @@ -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. diff --git a/src/intercom/types/multiple_filter_search_request.py b/src/intercom/types/multiple_filter_search_request.py index 5ab15e7..0739613 100644 --- a/src/intercom/types/multiple_filter_search_request.py +++ b/src/intercom/types/multiple_filter_search_request.py @@ -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( diff --git a/src/intercom/types/visitor.py b/src/intercom/types/visitor.py index e218e63..ca8c2c0 100644 --- a/src/intercom/types/visitor.py +++ b/src/intercom/types/visitor.py @@ -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. """ diff --git a/src/intercom/unstable/types/multiple_filter_search_request.py b/src/intercom/unstable/types/multiple_filter_search_request.py index c0719c5..915110e 100644 --- a/src/intercom/unstable/types/multiple_filter_search_request.py +++ b/src/intercom/unstable/types/multiple_filter_search_request.py @@ -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,