File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed
packages/models-library/src/models_library/rpc/notifications/events Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change 1- from typing import Literal
1+ from typing import Any , Literal
22
33from common_library .pydantic_basic_types import NotEmptyStr
44from models_library .products import ProductName
5- from pydantic import BaseModel , EmailStr
5+ from pydantic import BaseModel , EmailStr , HttpUrl
66
77
88class UserData (BaseModel ):
@@ -33,19 +33,26 @@ class ProductData(BaseModel):
3333 ui : ProductUIData
3434
3535
36- class AccountRequestedEvent (BaseModel ):
37- type : Literal ["account_requested" ] = "account_requested"
38-
36+ class BaseAccountEvent (BaseModel ):
3937 user : UserData
4038 product : ProductData
41- host : str
4239
4340
44- class AccountApprovedEvent (BaseModel ):
41+ class AccountRequestedEvent (BaseAccountEvent ):
42+ type : Literal ["account_requested" ] = "account_requested"
43+
44+ host : HttpUrl
45+ product_info : dict [str , Any ] = {}
46+ request_form : dict [str , Any ] = {}
47+
48+
49+ class AccountApprovedEvent (BaseAccountEvent ):
4550 type : Literal ["account_approved" ] = "account_approved"
4651
52+ link : HttpUrl
53+
4754
48- class AccountRejectedEvent (BaseModel ):
55+ class AccountRejectedEvent (BaseAccountEvent ):
4956 type : Literal ["account_rejected" ] = "account_rejected"
5057
5158 reason : NotEmptyStr
You can’t perform that action at this time.
0 commit comments