* Greenfield: Improve store users API
- Adds an endpoint to update store users (before they had to be removed ad re-added)
- Checks for the existance of a user and responds with 404 in that case (fixes#6423)
- Allows retrieval of user by user id or email for add and update (consistent with the other endpoints)
- Improves the API docs for the store users endpoints
* Swagger: Reuse UserIdOrEmail parameter component
* Add details to store user data
* Histograms: Add Lightning data and API endpoints
Ported over from the mobile-working-branch.
Adds histogram data for Lightning and exposes the wallet/lightning histogram data via the API. It also add a dashboard graph for the Lightning balance.
Caveat: The Lightning histogram is calculated by using the current channel balance and going backwards through as much invoices and transactions as we have. The "start" of the LN graph data might not be accurate though. That's because we don't track (and not even have) the LN onchain data. It is calculated by using the current channel balance and going backwards through as much invoices and transactions as we have. So the historic graph data for LN is basically a best effort of trying to reconstruct it with what we have: The LN channel transactions.
* More timeframes
* Refactoring: Remove redundant WalletHistogram types
* Remove store property from dashboard tile view models
* JS error fixes
* Refactoring: Move AppItem to Client lib and use the class for item list
This makes it available for the app, which would otherwise have to replicate the model. Also uses the proper class for the item/perk list of the app models.
* Remove unused app item payment methods property
* Do not ignore nullable values in JSON
* Revert to use Newtonsoft types
* Store Branding: Apply brand color to backend as well
Closes#5990.
* Add adjustments for different theme scenarios
* Add description text
* Make it optional to apply the brand color to the backend
* Toggle color fixes
* Greenfield: Add file endpoints and upload
- Endpoints for server files
- File upload using `multipart/form-data`
Closes#6074.
Can also be tested using cURL:
- `curl --location 'https://localhost:14142/api/v1/files' --header 'Authorization: token MY_API_TOKEN' --form 'file=@"LOCAL_FILEPATH"'`
- `curl --location 'https://localhost:14142/api/v1/users/me/picture' --header 'Authorization: token MY_API_TOKEN' --form 'file=@"LOCAL_FILEPATH"'`
* Revert UnresolvedUri changes
* Add upload for store logo
* Rename filter to storeid for consistency with other filters
* Greenfield: Add storeId to notification
* Cleanups
* Greenfield: Allow filtering notifications by store id
* Greenfield: Refactor app endpoints
- Do not change unset data
- Clean up difference between request (template) and data (items/perks)
- Add missing properties (form id and custom tip percentage)
- Update docs
* Revert ToSettings changes in GreenfieldAppsController
* User: Add name and image URL
More personalization options, prerequisite for btcpayserver/app#3.
Additionally:
- Remove ambigious and read-only username from manage view.
- Improve email verification conditions and display.
- Greenfield: Update current user. Prerequisite for btcpayserver/app#13.
* Refactor UpdateCurrentUser
* Replace new columns by UserBlob
* Update email check and add test case for mailbox addresses
---------
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Allow overrides on all methods
* Add non-returning SendHttpRequest methods
* Use SendHttpRequest consistently
* Use file-scoped namespace
* Rates: Set default null value for currencyPair
* Ensure it works with instances which have BTCPAY_ROOTPATH set
* Remove deprecated CSS options
Closes#5945.
* Greenfield: Add brandColor to store APIs
Closes#5946.
* Migrate file IDs to URLs
Closes#5953.
* Greenfield: Add CSS and logo URL to store settings API
Closes#5945.
* Add migration test
* Store and Server branding can reference file's via fileid:ID
* Add PaymentSoundUrl to Store API
---------
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Add admin option to show item list for keypad view
* Refactor common POS Vue mixin
* Add item list to POS keypad
* Add recent transactions to cart
* Keypad: Pass tip and discount as cart does
* Keypad and cart tests
* Improve offcanvas button
---------
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* If pull payment opened in mobile, use deeplink to setup card
* Allow passing LNURLW to register boltcard
* debug
* debug
* debug
* Only show setup/reset when the page is fully loaded
* Apply suggestions from code review
---------
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* webhook tests
* fixes and add docs
* Do not update FormResponse and StoreId in update/create PullPayment
---------
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Users list: Cleanups
* Policies: Flip registration settings
* Policies: Add RequireUserApproval setting
* Add approval to user
* Require approval on login and for API key
* API handling
* AccountController cleanups
* Test fix
* Apply suggestions from code review
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
* Add missing imports
* Communicate login requirements to user on account creation
* Add login requirements to basic auth handler
* Cleanups and test fix
* Encapsulate approval logic in user service and log approval changes
* Send follow up "Account approved" email
Closes#5656.
* Add notification for admins
* Fix creating a user via the admin view
* Update list: Unify flags into status column, add approve action
* Adjust "Resend email" wording
* Incorporate feedback from code review
* Remove duplicate test server policy reset
---------
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>