@@ -64,6 +64,58 @@ pub struct PlanLimits {
6464 pub is_above_mau_limit : bool ,
6565}
6666
67+ #[ derive( Debug , Serialize , Deserialize , PartialEq , Eq , Hash , Clone ) ]
68+ #[ serde( rename_all = "camelCase" ) ]
69+ pub struct Feature {
70+ pub id : String ,
71+ pub is_enabled : bool ,
72+ pub config : Option < serde_json:: Value > ,
73+ }
74+
75+ #[ derive( Debug , Serialize , Deserialize , PartialEq , Eq , Hash , Clone ) ]
76+ #[ serde( rename_all = "camelCase" ) ]
77+ pub struct FeaturesResponse {
78+ pub features : Vec < Feature > ,
79+ }
80+
81+ #[ derive( Debug , Clone , PartialEq , Eq ) ]
82+ pub struct ProjectDataRequest < ' a > {
83+ pub id : & ' a str ,
84+ pub include_limits : bool ,
85+ pub include_features : bool ,
86+ }
87+
88+ impl < ' a > ProjectDataRequest < ' a > {
89+ pub fn new ( id : & ' a str ) -> Self {
90+ Self {
91+ id,
92+ include_limits : false ,
93+ include_features : false ,
94+ }
95+ }
96+
97+ pub fn include_limits ( mut self ) -> Self {
98+ self . include_limits = true ;
99+ self
100+ }
101+
102+ pub fn include_features ( mut self ) -> Self {
103+ self . include_features = true ;
104+ self
105+ }
106+ }
107+
108+ #[ derive( Debug , Serialize , Deserialize , PartialEq , Eq , Hash , Clone ) ]
109+ #[ serde( rename_all = "camelCase" ) ]
110+ pub struct ProjectDataResponse {
111+ #[ serde( flatten) ]
112+ pub data : ProjectData ,
113+ #[ serde( default ) ]
114+ pub limits : Option < PlanLimits > ,
115+ #[ serde( default ) ]
116+ pub features : Option < Vec < Feature > > ,
117+ }
118+
67119impl ProjectData {
68120 pub fn validate_access (
69121 & self ,
0 commit comments