Skip to content

Commit 2a47d9b

Browse files
committed
Release 1.6.1
1 parent 25bb0a7 commit 2a47d9b

File tree

7 files changed

+49
-2
lines changed

7 files changed

+49
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "flagright"
3-
version = "1.6.0"
3+
version = "1.6.1"
44
description = ""
55
readme = "README.md"
66
authors = []

src/flagright/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
AcquisitionChannel,
77
Address,
88
AlertClosedDetails,
9+
AlertOpenedDetails,
910
Amount,
1011
ApiErrorResponse,
1112
BooleanString,
@@ -265,6 +266,7 @@
265266
"AcquisitionChannel",
266267
"Address",
267268
"AlertClosedDetails",
269+
"AlertOpenedDetails",
268270
"Amount",
269271
"ApiErrorResponse",
270272
"BadRequestError",

src/flagright/core/client_wrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def get_headers(self) -> typing.Dict[str, str]:
1414
headers: typing.Dict[str, str] = {
1515
"X-Fern-Language": "Python",
1616
"X-Fern-SDK-Name": "flagright",
17-
"X-Fern-SDK-Version": "1.6.0",
17+
"X-Fern-SDK-Version": "1.6.1",
1818
}
1919
headers["x-api-key"] = self.api_key
2020
return headers

src/flagright/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from .acquisition_channel import AcquisitionChannel
66
from .address import Address
77
from .alert_closed_details import AlertClosedDetails
8+
from .alert_opened_details import AlertOpenedDetails
89
from .amount import Amount
910
from .api_error_response import ApiErrorResponse
1011
from .boolean_string import BooleanString
@@ -250,6 +251,7 @@
250251
"AcquisitionChannel",
251252
"Address",
252253
"AlertClosedDetails",
254+
"AlertOpenedDetails",
253255
"Amount",
254256
"ApiErrorResponse",
255257
"BooleanString",
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This file was auto-generated by Fern from our API Definition.
2+
3+
import datetime as dt
4+
import typing
5+
6+
from ..core.datetime_utils import serialize_datetime
7+
8+
try:
9+
import pydantic.v1 as pydantic # type: ignore
10+
except ImportError:
11+
import pydantic # type: ignore
12+
13+
14+
class AlertOpenedDetails(pydantic.BaseModel):
15+
alert_id: typing.Optional[str] = pydantic.Field(alias="alertId")
16+
status: typing.Optional[str]
17+
transaction_ids: typing.Optional[typing.List[str]] = pydantic.Field(alias="transactionIds")
18+
rule_name: typing.Optional[str] = pydantic.Field(alias="ruleName")
19+
rule_description: typing.Optional[str] = pydantic.Field(alias="ruleDescription")
20+
rule_id: typing.Optional[str] = pydantic.Field(alias="ruleId")
21+
rule_instance_id: typing.Optional[str] = pydantic.Field(alias="ruleInstanceId")
22+
case_id: typing.Optional[str] = pydantic.Field(alias="caseId")
23+
user_id: typing.Optional[str] = pydantic.Field(alias="userId")
24+
25+
def json(self, **kwargs: typing.Any) -> str:
26+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
27+
return super().json(**kwargs_with_defaults)
28+
29+
def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
30+
kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
31+
return super().dict(**kwargs_with_defaults)
32+
33+
class Config:
34+
frozen = True
35+
smart_union = True
36+
allow_population_by_field_name = True
37+
json_encoders = {dt.datetime: serialize_datetime}

src/flagright/types/webhook_event_data.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import typing
44

55
from .alert_closed_details import AlertClosedDetails
6+
from .alert_opened_details import AlertOpenedDetails
67
from .case_closed_details import CaseClosedDetails
78
from .case_opened_details import CaseOpenedDetails
89
from .kyc_status_details import KycStatusDetails
@@ -14,6 +15,7 @@
1415
CaseClosedDetails,
1516
CaseOpenedDetails,
1617
AlertClosedDetails,
18+
AlertOpenedDetails,
1719
TransactionStatusDetails,
1820
KycStatusDetails,
1921
]

src/flagright/types/webhook_event_type.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ class WebhookEventType(str, enum.Enum):
1313
TRANSACTION_STATUS_UPDATED = "TRANSACTION_STATUS_UPDATED"
1414
KYC_STATUS_UPDATED = "KYC_STATUS_UPDATED"
1515
CASE_OPENED = "CASE_OPENED"
16+
ALERT_OPENED = "ALERT_OPENED"
1617

1718
def visit(
1819
self,
@@ -22,6 +23,7 @@ def visit(
2223
transaction_status_updated: typing.Callable[[], T_Result],
2324
kyc_status_updated: typing.Callable[[], T_Result],
2425
case_opened: typing.Callable[[], T_Result],
26+
alert_opened: typing.Callable[[], T_Result],
2527
) -> T_Result:
2628
if self is WebhookEventType.CASE_CLOSED:
2729
return case_closed()
@@ -35,3 +37,5 @@ def visit(
3537
return kyc_status_updated()
3638
if self is WebhookEventType.CASE_OPENED:
3739
return case_opened()
40+
if self is WebhookEventType.ALERT_OPENED:
41+
return alert_opened()

0 commit comments

Comments
 (0)