Commit Graph

400 Commits

Author SHA1 Message Date
nicolas.dorier
b7524e3587 Improve doc of payment requests 2025-04-09 19:22:44 +09:00
Nicolas Dorier
ce83e4d96d Fix: PaymentRequests created via API never expires (#6657) 2025-04-08 14:17:31 +09:00
nicolas.dorier
ead74a985f Remove deprecated properties 2025-04-04 16:28:44 +09:00
d11n
a916ae81be Greenfield: Expand user data (#6649) 2025-04-04 16:15:33 +09:00
Nicolas Dorier
658ddd1f27 Fix: Refunds through API were ignoring BOLT11 expiration at store level (#6644) 2025-03-31 09:32:12 +09:00
rockstardev
42878f23a6 Code cleanup and commenting 2025-03-26 23:08:48 -05:00
nicolas.dorier
be8ecb823e Refactor email endpoints 2025-03-05 22:49:06 -06:00
rockstardev
a7e3cbb105 Adding endpoint to set server email settings (#6601)
* Adding endpoint in Greenfield to allow server email settings

* Adding related swagger file

* Refactoring EmailSettingsData to be more readable

* Adding server email masking

* Adding tests

* Update BTCPayServer/wwwroot/swagger/v1/swagger.template.serveremail.json

Co-authored-by: d11n <mail@dennisreimann.de>

* Masking smtp server email returned over greenfield api and test

* Retaining password if password mask is used

* Remove magic string *****

* Flatten request for server's settings. Fix bug on shared setting instances

* Remove useless doc

* Simplify code

* Fix Store Email settings page

---------

Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2025-02-27 15:59:17 +09:00
d11n
4e2684b917 Remove app models and hub classes from client lib (#6567) 2025-01-21 15:42:30 +09:00
d11n
ef8071ba93 App: SignalR-related updates (#6537)
Adds Newtonsoft JSON converters for the SignalR connection, which we need to pass data back and forth.
2025-01-16 14:36:23 +09:00
d11n
2e458af4fb App: Authentication updates (#6536)
- Updates API key extraction to also accept "Bearer" auth header. This is necessary for non-cookie based SignalR connections.
- Adds authentication related models to the client lib
- Succeeds and replaces #6484.
2025-01-16 14:34:57 +09:00
Nicolas Dorier
92a92a7fff Rename and add to greenfield HtmlTags and HtmlMetaTags for apps (#6557) 2025-01-15 23:48:10 +09:00
Nicolas Dorier
5a8c959b6b Server hanging in debug mode if altcoin node is unavailable (#6545) 2025-01-11 00:15:04 +09:00
d11n
898f0f4481 Greenfield: Improve store users API (#6427)
* 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
2024-12-02 15:35:33 +01:00
rockstardev
9fce9fcb7b Bumping Lightning.Common and NBitcoin 2024-11-29 20:47:26 -06:00
d11n
d3315c2fa6 Integrate mobile-working-branch part 1 (#6428) 2024-11-26 14:17:40 +09:00
nicolas.dorier
558f45a48c Bump btcpay lib 2024-11-14 22:21:06 +09:00
nicolas.dorier
6a76167637 Bump NBitcoin libraries 2024-11-14 22:19:10 +09:00
nicolas.dorier
8e688b7f28 Fix: Getting notifications via API would crash 2024-11-14 21:53:37 +09:00
nicolas.dorier
6d737ce119 Bump Libraries 2024-11-14 21:46:15 +09:00
nicolas.dorier
2075e16767 bump libs 2024-11-14 21:17:55 +09:00
nicolas.dorier
bbba7551b7 Minor forgotten dispose in tests 2024-11-07 10:47:02 +09:00
d11n
a129114603 Greenfield: Add image upload for app items (#6226)
Upload endpoints for app item images. Follow-up to #6075.
Tested to work with the app item editor.

Uses UploadImage consistently in API and UI.
2024-11-07 10:43:22 +09:00
d11n
641bdcff31 Histograms: Add Lightning data and API endpoints (#6217)
* 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
2024-11-05 21:40:37 +09:00
d11n
ff79a31066 Refactoring: Move AppItem to Client lib and use the class for item list (#6258)
* 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
2024-11-05 11:49:30 +09:00
nicolas.dorier
d7fd90c4c3 Bump client lib 2024-10-17 16:41:36 +09:00
nicolas.dorier
e4f79f046a Remove unused field from automated payout settings 2024-10-09 13:13:10 +09:00
nicolas.dorier
c0aa9a8bd4 Prevent double BOLT11 payment with LNUrlWithdraw 2024-10-09 13:10:04 +09:00
Nicolas Dorier
2e114d7c29 Remove references to cryptoCode in SyncStatus (#6275) 2024-10-04 16:58:31 +09:00
Nicolas Dorier
9ba4b030ed Fix: Do not expose xpub without modify store permission (#6212) 2024-09-27 15:27:04 +09:00
Nicolas Dorier
363b60385b Renaming various properties in the Payouts API (#6246)
* Rename Payouts Currency/OriginalCurrency

* Rename Payout Processor PayoutMethodIds

* Rename paymentMethods to payoutMethodIds

* Rename payoutMethodIds to payoutMethods
2024-09-26 11:25:45 +09:00
d11n
7348a6a62f Store Branding: Apply brand color to backend as well (#5992)
* 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
2024-09-13 21:39:21 +09:00
d11n
666445e8f7 Greenfield: App endpoints for sales statistics (#6103) 2024-09-12 16:17:16 +09:00
Nicolas Dorier
36bada8feb Uniformize Wallet API's path (#6209)
* Uniformize Wallet API's path

* Rewrite old API path to new API

* Rename routes
2024-09-12 15:19:10 +09:00
d11n
3342122be2 Make Role Permissions more human legible (#6191)
Had to rename `CanModifyStoreWebhooks` to `CanModifyWebhooks` for this, but the value stayed the same, so I don't think it's a big deal.

Closes #6183.
2024-09-12 12:29:10 +09:00
Nicolas Dorier
c93497af10 Rename PaymentMethod => PaymentMethodId (#6198)
* Rename PaymentMethod => PaymentMethodId

* Rename DB Columns
2024-09-06 13:24:33 +09:00
Nicolas Dorier
1c027be106 Greenfield: Can set the label when generating a wallet for store (#6186) 2024-09-02 18:54:15 +09:00
Nicolas Dorier
a3cfb9e5e4 Removal of the Altcoins build (#6177)
* Remove some useless #if ALTCOINS

* Removal of the Altcoins build
2024-08-30 08:34:23 +09:00
nicolas.dorier
10977e6750 Move AdditionalData to AppBaseData 2024-07-11 21:43:30 +09:00
nicolas.dorier
66d8dda0f5 Timespan in API should be parsed with invariant culture 2024-07-11 21:41:19 +09:00
d11n
25ae6df095 Greenfield: Add file endpoints and upload (#6075)
* 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
2024-07-11 09:28:24 +09:00
d11n
a4a1fa0746 Greenfield: Add store id for notifications (#6093)
* Rename filter to storeid for consistency with other filters

* Greenfield: Add storeId to notification

* Cleanups

* Greenfield: Allow filtering notifications by store id
2024-07-11 00:12:22 +09:00
d11n
f7569b715d Greenfield: Add missing invoice metadata to Lightning Address (#6084)
* Greenfield: Add missing invoice metadata to Lightning Address

Closes #6067.

* Update BTCPayServer/wwwroot/swagger/v1/swagger.template.stores-lightning-addresses.json
2024-07-04 22:42:02 +09:00
nicolas.dorier
fa080ce0a4 Add AdditionalData to PointOfSaleBaseData 2024-06-26 17:43:56 +09:00
d11n
2482b9df74 Greenfield: Refactor app endpoints (#6051)
* 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
2024-06-26 17:42:22 +09:00
d11n
bf66b54c9a User: Add name and image URL (#6008)
* 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>
2024-06-26 17:39:22 +09:00
d11n
feffbbd980 Greenfield: Manage notifications (#6058)
Prerequisite for btcpayserver/app#12.
2024-06-25 20:01:11 +02:00
d11n
cf7bb8cff7 Fix tests (#6060)
* docker-compose: Add missing restart for merchant CLN container

* Upgrade ChromeDriver

* Fix path and test
2024-06-20 10:48:23 +02:00
d11n
b898fd0ec1 TimeSpan JSON Converter: Parse strings (#6012)
Something I came across while working in the app: Without this, the [TimeSpan default values of the StoreBlob](https://github.com/btcpayserver/btcpayserver/blob/master/BTCPayServer/Data/StoreBlob.cs#L84) cannot be parsed and don't get applied properly.
2024-06-19 15:31:13 +02:00
d11n
f8f98ab7f0 BTCPayServerClient refactoring (#6024)
* 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
2024-06-19 15:25:33 +02:00