Skip to content

Commit

Permalink
SDK regeneration (#76)
Browse files Browse the repository at this point in the history
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
  • Loading branch information
fern-api[bot] authored May 3, 2024
1 parent 1694c9f commit 9ec8d5b
Show file tree
Hide file tree
Showing 8 changed files with 71 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 = "trycourier"
version = "v6.0.4"
version = "v6.0.5"
description = ""
readme = "README.md"
authors = []
Expand Down
4 changes: 4 additions & 0 deletions src/courier/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@
NotificationContentHierarchy,
NotificationGetContentResponse,
NotificationListResponse,
NotificationTag,
NotificationTagData,
SubmissionChecksGetResponse,
SubmissionChecksReplaceResponse,
)
Expand Down Expand Up @@ -522,6 +524,8 @@
"NotificationListResponse",
"NotificationPreferenceDetails",
"NotificationPreferences",
"NotificationTag",
"NotificationTagData",
"NotificationTemplates",
"Operator",
"Override",
Expand Down
2 changes: 1 addition & 1 deletion src/courier/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "trycourier",
"X-Fern-SDK-Version": "v6.0.4",
"X-Fern-SDK-Version": "v6.0.5",
}
headers["Authorization"] = f"Bearer {self._get_authorization_token()}"
return headers
Expand Down
4 changes: 4 additions & 0 deletions src/courier/notifications/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
NotificationContentHierarchy,
NotificationGetContentResponse,
NotificationListResponse,
NotificationTag,
NotificationTagData,
SubmissionChecksGetResponse,
SubmissionChecksReplaceResponse,
)
Expand All @@ -36,6 +38,8 @@
"NotificationContentHierarchy",
"NotificationGetContentResponse",
"NotificationListResponse",
"NotificationTag",
"NotificationTagData",
"SubmissionChecksGetResponse",
"SubmissionChecksReplaceResponse",
]
4 changes: 4 additions & 0 deletions src/courier/notifications/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
from .notification_content_hierarchy import NotificationContentHierarchy
from .notification_get_content_response import NotificationGetContentResponse
from .notification_list_response import NotificationListResponse
from .notification_tag import NotificationTag
from .notification_tag_data import NotificationTagData
from .submission_checks_get_response import SubmissionChecksGetResponse
from .submission_checks_replace_response import SubmissionChecksReplaceResponse

Expand All @@ -34,6 +36,8 @@
"NotificationContentHierarchy",
"NotificationGetContentResponse",
"NotificationListResponse",
"NotificationTag",
"NotificationTagData",
"SubmissionChecksGetResponse",
"SubmissionChecksReplaceResponse",
]
5 changes: 5 additions & 0 deletions src/courier/notifications/types/notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,17 @@
from ...core.datetime_utils import serialize_datetime
from ...core.pydantic_utilities import pydantic_v1
from .message_routing import MessageRouting
from .notification_tag import NotificationTag


class Notification(pydantic_v1.BaseModel):
created_at: int
updated_at: int
id: str
routing: MessageRouting
tags: typing.Optional[NotificationTag] = None
title: typing.Optional[str] = None
topic_id: str

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

import datetime as dt
import typing

from ...core.datetime_utils import serialize_datetime
from ...core.pydantic_utilities import pydantic_v1
from .notification_tag_data import NotificationTagData


class NotificationTag(pydantic_v1.BaseModel):
data: typing.List[NotificationTagData]

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
extra = pydantic_v1.Extra.allow
json_encoders = {dt.datetime: serialize_datetime}
26 changes: 26 additions & 0 deletions src/courier/notifications/types/notification_tag_data.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# This file was auto-generated by Fern from our API Definition.

import datetime as dt
import typing

from ...core.datetime_utils import serialize_datetime
from ...core.pydantic_utilities import pydantic_v1


class NotificationTagData(pydantic_v1.BaseModel):
id: str
name: 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
extra = pydantic_v1.Extra.allow
json_encoders = {dt.datetime: serialize_datetime}

0 comments on commit 9ec8d5b

Please sign in to comment.