feat(alerting): Add subscriptions alerts API#367
feat(alerting): Add subscriptions alerts API#367vankiru wants to merge 3 commits intofeat/move-wallets-api-to-customer-walletsfrom
Conversation
annvelents
left a comment
There was a problem hiding this comment.
checked all the values for Alerts for both: you and me and updated my model to include values that you have. The only difference we have now is Alert vs AlertInput
|
|
||
|
|
||
| class Alert(BaseModel): | ||
| alert_type: Optional[str] |
There was a problem hiding this comment.
cannot be null due to validation on the DB
There was a problem hiding this comment.
All the input classes are just called {Model} without Input suffix, so I kept the same naming for alerts as well 😊
I initially marked everything as optional in the model definitions since that's how most of the other models are set up 🤔 But I've updated the alerts model to require the fields you mentioned.
|
|
||
| class Alert(BaseModel): | ||
| alert_type: Optional[str] | ||
| code: Optional[str] |
| alert_type: Optional[str] | ||
| code: Optional[str] | ||
| name: Optional[str] | ||
| thresholds: Optional[AlertThresholdList] |
There was a problem hiding this comment.
thresholds should be provided - required by the service
lago_python_client/models/alert.py
Outdated
|
|
||
| class AlertThreshold(BaseModel): | ||
| code: Optional[str] | ||
| value: Optional[str] |
lago_python_client/models/alert.py
Outdated
|
|
||
|
|
||
| class AlertThresholdResponse(BaseResponseModel): | ||
| code: str |
There was a problem hiding this comment.
and this one IS optional 😅
a45c8d2 to
3f12610
Compare
6196069 to
f834aad
Compare
3f12610 to
041ee4e
Compare
Context
The PR implements missing api for subscription alerts. It relies on the implementation of Nested Commands introduced in #366.
Related PR: getlago/lago-api#4925
Description
The wallet alerts API looks like this 👇