-
Notifications
You must be signed in to change notification settings - Fork 126
feat(audit_logs): Activity logs creation #3669
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4054f14
to
037a359
Compare
6ce8b1d
to
3e37e0d
Compare
4202624
to
1ddac2b
Compare
## Roadmap Task 👉 [https://getlago.canny.io/feature-requests/p/access-audit-logs](https://getlago.canny.io/feature-requests/p/access-audit-logs) ## Context Our users want to have visibility on what’s happening in Lago. Examples: - *A plan and prices have been updated: When? By whom? What?* - *A subscription has been deleted: When? By whom? What?* ## Description The goal of this PR is to create activity logs when creating/updating or deleting a plan.
## Roadmap Task 👉 [https://getlago.canny.io/feature-requests/p/access-audit-logs](https://getlago.canny.io/feature-requests/p/access-audit-logs) ## Context Our users want to have visibility on what’s happening in Lago. Examples: - *A plan and prices have been updated: When? By whom? What?* - *A subscription has been deleted: When? By whom? What?* ## Description The goal of this PR is to add customer activity logs.
## Roadmap Task 👉 [https://getlago.canny.io/feature-requests/p/access-audit-logs](https://getlago.canny.io/feature-requests/p/access-audit-logs) ## Context Our users want to have visibility on what’s happening in Lago. Examples: - *A plan and prices have been updated: When? By whom? What?* - *A subscription has been deleted: When? By whom? What?* ## Description The goal of this PR is to return deleted activity object for activity logs.
Activity Logs for Wallets.
BillingEntities activity logs `billing_entities.deleted` is not implemented yet and, if necessary, will have to handled manually using the console.
Activity logs for coupons.
## Roadmap Task 👉 [https://getlago.canny.io/feature-requests/p/access-audit-logs](https://getlago.canny.io/feature-requests/p/access-audit-logs) ## Context Our users want to have visibility on what’s happening in Lago. Examples: - *A plan and prices have been updated: When? By whom? What?* - *A subscription has been deleted: When? By whom? What?* ## Description The goal of this PR is to create activity logs for credit notes.
Adds the invoice activity logs
Activity logs for subscriptions. **It requires the code to produce activity log without a block.**
Activity Logs for Wallet Transactions. It requires the code to produce activity log without a block.
Activity log for payment.recorded.
👉 [https://getlago.canny.io/feature-requests/p/access-audit-logs](https://getlago.canny.io/feature-requests/p/access-audit-logs) Our users want to have visibility on what’s happening in Lago. Examples: - *A plan and prices have been updated: When? By whom? What?* - *A subscription has been deleted: When? By whom? What?* The goal of this PR is to add relations to activity logs. It will be useful for displaying activity logs tab on several objects (customer / invoice / subscription / ...)
Some fixes for the Activity Logs. ``` "billable_metric.created" => OK "billable_metric.updated" => OK "billable_metric.deleted" => OK "plan.created" => OK "plan.updated" => OK "plan.deleted" => OK "customer.created" => OK "customer.updated" => OK "customer.deleted" => OK "invoice.drafted" "invoice.failed" "invoice.created" "invoice.one_off_created" => FIXED OK "invoice.paid_credit_added" "invoice.generated" => OK "invoice.payment_status_updated" => OK "invoice.payment_overdue" "invoice.voided" => OK "invoice.payment_failure" "payment_receipt.created" => FIXED OK / *** PaymentReceipt does not have a customer associated "payment_receipt.generated" => FIXED OK / *** same as "payment_receipt.created" "credit_note.created" => OK "credit_note.generated" => OK "credit_note.refund_failure" => FIXED OK "billing_entities.created" "billing_entities.updated" "billing_entities.deleted" => NOT IMPLEMENTED "subscription.started" => OK "subscription.terminated" => FIXED OK "subscription.updated" => OK "wallet.created" => OK / *** Front has to fix ".id" to use ".lago_id" or use wallet ".name" "wallet.updated" => OK / *** same as "wallet.created" "wallet_transaction.payment_failure" "wallet_transaction.created" => OK / *** same as "wallet.created" "wallet_transaction.updated" => FIXED OK / *** same as "wallet.created" "payment.recorded" => FIXED OK / *** The activity_object is a Payment. Resouce can be an Invoice or PaymentRequest. Front expects to activity_object to have "invoice_number". "coupon.created" => OK "coupon.updated" => OK "coupon.deleted" => OK / *** Maybe add "coupon.terminated" ? "applied_coupon.created" => OK / *** Front is broken, it expects activity_object have ".code" but its ".coupon_code" "applied_coupon.deleted" => OK / *** same as "applied_coupon.created" ```
## Roadmap Task 👉 [https://getlago.canny.io/feature-requests/p/access-audit-logs](https://getlago.canny.io/feature-requests/p/access-audit-logs) ## Context Our users want to have visibility on what’s happening in Lago. Examples: - *A plan and prices have been updated: When? By whom? What?* - *A subscription has been deleted: When? By whom? What?* ## Description The goal of this PR is to - include serialized sub resources to activity logs - add api key object in the activity log resolver
mariohd
approved these changes
Jun 4, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Roadmap Task
👉 https://getlago.canny.io/feature-requests/p/access-audit-logs
Context
Our users want to have visibility on what’s happening in Lago.
Examples:
Description
This PR is the global PR for merging activity logs.