Skip to content

Commit

Permalink
Release 1.4.14
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Mar 26, 2024
1 parent e762c41 commit f7a234b
Show file tree
Hide file tree
Showing 11 changed files with 18 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 = "flagright"
version = "1.4.13"
version = "1.4.14"
description = ""
readme = "README.md"
authors = []
Expand Down
4 changes: 0 additions & 4 deletions src/flagright/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
BusinessOptionalSavedPaymentDetailsItem_Swift,
BusinessOptionalSavedPaymentDetailsItem_Upi,
BusinessOptionalSavedPaymentDetailsItem_Wallet,
BusinessResponse,
BusinessUserSegment,
BusinessUsersResponse,
BusinessWithRulesResult,
Expand Down Expand Up @@ -140,7 +139,6 @@
UserDetails,
UserOptional,
UserRegistrationStatus,
UserResponse,
UserRiskScoreDetails,
UserState,
UserStateDetails,
Expand Down Expand Up @@ -190,7 +188,6 @@
"BusinessOptionalSavedPaymentDetailsItem_Swift",
"BusinessOptionalSavedPaymentDetailsItem_Upi",
"BusinessOptionalSavedPaymentDetailsItem_Wallet",
"BusinessResponse",
"BusinessUserSegment",
"BusinessUsersCreateResponse",
"BusinessUsersResponse",
Expand Down Expand Up @@ -315,7 +312,6 @@
"UserDetails",
"UserOptional",
"UserRegistrationStatus",
"UserResponse",
"UserRiskScoreDetails",
"UserState",
"UserStateDetails",
Expand Down
2 changes: 1 addition & 1 deletion src/flagright/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "flagright",
"X-Fern-SDK-Version": "1.4.13",
"X-Fern-SDK-Version": "1.4.14",
}
headers["x-api-key"] = self.api_key
return headers
Expand Down
10 changes: 5 additions & 5 deletions src/flagright/resources/business_users/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ...errors.too_many_requests_error import TooManyRequestsError
from ...errors.unauthorized_error import UnauthorizedError
from ...types.business import Business
from ...types.business_response import BusinessResponse
from ...types.business_with_rules_result import BusinessWithRulesResult
from .types.business_users_create_response import BusinessUsersCreateResponse

try:
Expand Down Expand Up @@ -393,7 +393,7 @@ def create(self, *, request: Business) -> BusinessUsersCreateResponse:
raise ApiError(status_code=_response.status_code, body=_response.text)
raise ApiError(status_code=_response.status_code, body=_response_json)

def get(self, user_id: str) -> BusinessResponse:
def get(self, user_id: str) -> BusinessWithRulesResult:
"""
### GET Business User
Expand All @@ -420,7 +420,7 @@ def get(self, user_id: str) -> BusinessResponse:
timeout=60,
)
if 200 <= _response.status_code < 300:
return pydantic.parse_obj_as(BusinessResponse, _response.json()) # type: ignore
return pydantic.parse_obj_as(BusinessWithRulesResult, _response.json()) # type: ignore
if _response.status_code == 401:
raise UnauthorizedError(pydantic.parse_obj_as(typing.Any, _response.json())) # type: ignore
if _response.status_code == 429:
Expand Down Expand Up @@ -802,7 +802,7 @@ async def create(self, *, request: Business) -> BusinessUsersCreateResponse:
raise ApiError(status_code=_response.status_code, body=_response.text)
raise ApiError(status_code=_response.status_code, body=_response_json)

async def get(self, user_id: str) -> BusinessResponse:
async def get(self, user_id: str) -> BusinessWithRulesResult:
"""
### GET Business User
Expand All @@ -829,7 +829,7 @@ async def get(self, user_id: str) -> BusinessResponse:
timeout=60,
)
if 200 <= _response.status_code < 300:
return pydantic.parse_obj_as(BusinessResponse, _response.json()) # type: ignore
return pydantic.parse_obj_as(BusinessWithRulesResult, _response.json()) # type: ignore
if _response.status_code == 401:
raise UnauthorizedError(pydantic.parse_obj_as(typing.Any, _response.json())) # type: ignore
if _response.status_code == 429:
Expand Down
10 changes: 5 additions & 5 deletions src/flagright/resources/consumer_users/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ...errors.too_many_requests_error import TooManyRequestsError
from ...errors.unauthorized_error import UnauthorizedError
from ...types.user import User
from ...types.user_response import UserResponse
from ...types.user_with_rules_result import UserWithRulesResult
from .types.consumer_users_create_response import ConsumerUsersCreateResponse

try:
Expand Down Expand Up @@ -224,7 +224,7 @@ def create(self, *, request: User) -> ConsumerUsersCreateResponse:
raise ApiError(status_code=_response.status_code, body=_response.text)
raise ApiError(status_code=_response.status_code, body=_response_json)

def get(self, user_id: str) -> UserResponse:
def get(self, user_id: str) -> UserWithRulesResult:
"""
### GET Consumer User
Expand All @@ -251,7 +251,7 @@ def get(self, user_id: str) -> UserResponse:
timeout=60,
)
if 200 <= _response.status_code < 300:
return pydantic.parse_obj_as(UserResponse, _response.json()) # type: ignore
return pydantic.parse_obj_as(UserWithRulesResult, _response.json()) # type: ignore
if _response.status_code == 401:
raise UnauthorizedError(pydantic.parse_obj_as(typing.Any, _response.json())) # type: ignore
if _response.status_code == 429:
Expand Down Expand Up @@ -464,7 +464,7 @@ async def create(self, *, request: User) -> ConsumerUsersCreateResponse:
raise ApiError(status_code=_response.status_code, body=_response.text)
raise ApiError(status_code=_response.status_code, body=_response_json)

async def get(self, user_id: str) -> UserResponse:
async def get(self, user_id: str) -> UserWithRulesResult:
"""
### GET Consumer User
Expand All @@ -491,7 +491,7 @@ async def get(self, user_id: str) -> UserResponse:
timeout=60,
)
if 200 <= _response.status_code < 300:
return pydantic.parse_obj_as(UserResponse, _response.json()) # type: ignore
return pydantic.parse_obj_as(UserWithRulesResult, _response.json()) # type: ignore
if _response.status_code == 401:
raise UnauthorizedError(pydantic.parse_obj_as(typing.Any, _response.json())) # type: ignore
if _response.status_code == 429:
Expand Down
4 changes: 0 additions & 4 deletions src/flagright/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
BusinessOptionalSavedPaymentDetailsItem_Upi,
BusinessOptionalSavedPaymentDetailsItem_Wallet,
)
from .business_response import BusinessResponse
from .business_user_segment import BusinessUserSegment
from .business_users_response import BusinessUsersResponse
from .business_with_rules_result import BusinessWithRulesResult
Expand Down Expand Up @@ -145,7 +144,6 @@
from .user_details import UserDetails
from .user_optional import UserOptional
from .user_registration_status import UserRegistrationStatus
from .user_response import UserResponse
from .user_risk_score_details import UserRiskScoreDetails
from .user_state import UserState
from .user_state_details import UserStateDetails
Expand Down Expand Up @@ -180,7 +178,6 @@
"BusinessOptionalSavedPaymentDetailsItem_Swift",
"BusinessOptionalSavedPaymentDetailsItem_Upi",
"BusinessOptionalSavedPaymentDetailsItem_Wallet",
"BusinessResponse",
"BusinessUserSegment",
"BusinessUsersResponse",
"BusinessWithRulesResult",
Expand Down Expand Up @@ -298,7 +295,6 @@
"UserDetails",
"UserOptional",
"UserRegistrationStatus",
"UserResponse",
"UserRiskScoreDetails",
"UserState",
"UserStateDetails",
Expand Down
31 changes: 0 additions & 31 deletions src/flagright/types/business_response.py

This file was deleted.

2 changes: 2 additions & 0 deletions src/flagright/types/business_with_rules_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from .business import Business
from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
from .user_risk_score_details import UserRiskScoreDetails

try:
import pydantic.v1 as pydantic # type: ignore
Expand All @@ -21,6 +22,7 @@ class BusinessWithRulesResult(Business):

executed_rules: typing.Optional[typing.List[ExecutedRulesResult]] = pydantic.Field(alias="executedRules")
hit_rules: typing.Optional[typing.List[HitRulesDetails]] = pydantic.Field(alias="hitRules")
risk_score_details: typing.Optional[UserRiskScoreDetails] = pydantic.Field(alias="riskScoreDetails")

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
Expand Down
2 changes: 2 additions & 0 deletions src/flagright/types/transaction_event_monitoring_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from ..core.datetime_utils import serialize_datetime
from .rules_results import RulesResults
from .transaction import Transaction
from .transaction_risk_scoring_result import TransactionRiskScoringResult

try:
import pydantic.v1 as pydantic # type: ignore
Expand All @@ -16,6 +17,7 @@
class TransactionEventMonitoringResult(RulesResults):
event_id: str = pydantic.Field(alias="eventId")
transaction: Transaction
risk_score_details: typing.Optional[TransactionRiskScoringResult] = pydantic.Field(alias="riskScoreDetails")

def json(self, **kwargs: typing.Any) -> str:
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
Expand Down
31 changes: 0 additions & 31 deletions src/flagright/types/user_response.py

This file was deleted.

2 changes: 2 additions & 0 deletions src/flagright/types/user_with_rules_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from .executed_rules_result import ExecutedRulesResult
from .hit_rules_details import HitRulesDetails
from .user import User
from .user_risk_score_details import UserRiskScoreDetails

try:
import pydantic.v1 as pydantic # type: ignore
Expand All @@ -21,6 +22,7 @@ class UserWithRulesResult(User):

executed_rules: typing.Optional[typing.List[ExecutedRulesResult]] = pydantic.Field(alias="executedRules")
hit_rules: typing.Optional[typing.List[HitRulesDetails]] = pydantic.Field(alias="hitRules")
risk_score_details: typing.Optional[UserRiskScoreDetails] = pydantic.Field(alias="riskScoreDetails")

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

0 comments on commit f7a234b

Please sign in to comment.