Commit Graph

139 Commits

Author SHA1 Message Date
Kukks
e3e65878aa
Allow invoice to be marked even when new
fixes #2019
2021-02-26 11:17:03 +09:00
Kukks
ebc46eb7d2 fix swagger docs missing query param
fixes #2268
2021-02-15 10:05:54 +01:00
nicolas.dorier
df52d01a1d
Revert "GreenField API: Configure Store Lightning Payment Method"
This reverts commit b40095f603.
2021-01-17 21:40:16 +09:00
nicolas.dorier
07de4af581
Revert "Apply suggestions from code review"
This reverts commit 48b2e682bf.
2021-01-17 21:39:20 +09:00
Andrew Camilleri
48b2e682bf
Apply suggestions from code review
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2021-01-14 09:19:16 +01:00
Kukks
b40095f603 GreenField API: Configure Store Lightning Payment Method 2021-01-12 09:25:35 +01:00
Andrew Camilleri
91cb9129ab
FGreenField: Add DefaultPaymentMethod to Stores API (#2171) 2020-12-29 18:33:44 +09:00
Andrew Camilleri
5803512820
Remove Default from OnChainPayment Method (#2170)
Makes more sense to do it on the Store endpoint after thinking about it.
2020-12-29 17:38:31 +09:00
Nicolas Dorier
623347bc48
Add Label and accountKeyPath to the on chain payment methods (#2166) 2020-12-28 13:59:01 +01:00
Andrew Camilleri
69eaaef963
GreenField: Store OnChain Payment Method (#2157)
* GreenField: Store set payment methods

* add swagger docs

* fix swagger
2020-12-23 14:00:38 +09:00
Nicolas Dorier
282d0abb62
Remove bitpay translator (#2130) 2020-12-12 15:17:44 +09:00
Andrew Camilleri
034b732e7c
GreenField: Update invoice metadata (#2095)
* GreenField: Update invoice metadata

* add swagger

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2020-12-12 15:15:34 +09:00
Nicolas Dorier
b2855e74ef
Document miscallenous features in the swagger doc (#2128) 2020-12-12 14:07:25 +09:00
Andrew Camilleri
0652e30c30
GreenField: Notifications API (#2055)
* GreenField: Notifications API

This refactors notifications so that we dont have a bunch of duplicated direct access to db contexts in controllers and then introduces new endpoints to fetch/toggle seen/remove  notifications of the current user.

* add tests + docs

* fix test

* pr changes

* fix permission json
2020-12-11 23:11:08 +09:00
nicolas.dorier
798cf66e3f
Add checkoutLink and defaultLanguage to GreenField invoice 2020-12-11 12:04:18 +09:00
nicolas.dorier
e65d42bd61
Add redirectURL to create invoice on Greenfield 2020-12-09 23:20:13 +09:00
nicolas.dorier
febf8ac5b3
Fix doc for create invoice request 2020-12-09 22:55:00 +09:00
Andrew Camilleri
c7209df7e2
Fix swagger docs for pull payments (#2105)
* Fix swagger docs for pull payments

fixes #2097

* Update BTCPayServer/wwwroot/swagger/v1/swagger.template.pull-payments.json

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

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2020-12-04 12:03:27 +01:00
nicolas.dorier
b12c6289d0
Fix link for webhooks 2020-12-02 20:37:38 +09:00
Andrew Camilleri
88aa34747b
Automatically generate permissions docs for GreenField (#2043)
* Automatically generate permissions docs for GreenField

* Do a test instead
2020-11-24 10:10:32 +01:00
nicolas.dorier
18e68d04f9
Rename invoice states and payment states 2020-11-23 18:28:35 +09:00
Dennis Reimann
ff87319a74
API: Handle lightning invoice creation errors (#2070)
Catches LightningClient exceptions and responds with a detailed API error (400) instead of a generic server failure (503).
2020-11-23 06:40:13 +01:00
Nicolas Dorier
f9b86a6b2e
Merge pull request #1901 from btcpayserver/api/invoice-extras
GreenField: Add Invoice Payment methods endpoints
2020-11-20 10:25:00 +09:00
Nicolas Dorier
9c5fd1b478
Merge pull request #2058 from NicolasDorier/webhook2
Add Webhooks in store's settings
2020-11-19 12:17:34 +09:00
nicolas.dorier
07c5c2972d
Add callback doc 2020-11-16 12:13:27 +09:00
nicolas.dorier
df79c2cf48
Improve tests of webhooks 2020-11-14 13:39:44 +09:00
nicolas.dorier
94bcbeb604
Add Greenfield API 2020-11-13 14:15:03 +09:00
rockstardev
13cb2c695f Adding onChainWithLnInvoiceFallback parameter to swagger doc 2020-11-09 23:08:07 -06:00
Dennis Reimann
1ba0685596
API Docs: Fix lightning invoice for store payload (#2052) 2020-11-06 14:00:10 +01:00
Kukks
1d82c3779b Remove AwaitingConfirmation 2020-10-27 09:49:35 +01:00
Kukks
abc9d07977 fix swagger format for dates 2020-10-27 09:47:22 +01:00
Kukks
8962bf00f6 GreenField: Add Invoice Payment methods endpoints
lets you fetch all active payment methods data + payments made
2020-10-27 09:47:21 +01:00
Kukks
3d2b4cbfa8 Add Created date to user, add verified column in list and make user list use same model as modern lists 2020-10-05 13:00:15 +02:00
Dennis Reimann
7e60328cff
Greenfield: Rename API key redirect params; switch to POST body (#1898)
* Rename user param to userId in API key redirect

This way it is clearer what to expect and it also make the parameteer easier to consume.

* Post redirect: Allow form url and prettify page

- Form URL as alternative to controller/action for external URLs
- Making it look nice and add explanation for non-JS case

* APIKeys: Minor view updates

fix

* APIKeys: Use POST redirect for confirmation

fix

* UI: Minor update to confirm view

Tidies it up and adapts to the newly added ConfirmAPIKeys view.

* APIKeys: Update delete view

Structures the information in title and description better.

* APIKeys: Distinguish authorize and confirm (reuse)

* Upgrade ChromeDriver

* Test fixes

* Clean up PostRedirect view

By adding missing forgery token

* Re-add tests for callback post values

* Rename key param to apiKey in API key redirect

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

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>

* Use DEBUG conditional for postredirect-callback-test route

* Remove unnecessary ChromeDriver references

* Add debug flag

* Remove debug flags

Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
2020-09-17 11:37:49 +02:00
Dennis Reimann
8ba852084e
Users API: Add roles (#1914)
* API: Fix create user response model

* API: Add roles to user data
2020-09-16 14:17:33 +02:00
Kukks
0e07fcc706 fixes and adapt 2020-08-28 09:00:14 +02:00
nicolas.dorier
709b06baa3
Remove invoices/email for this PR 2020-08-27 11:00:04 +09:00
nicolas.dorier
f900d520da
Add InvoiceTime, Expiration and monitoring to Invoice greenfield API 2020-08-26 21:36:32 +09:00
nicolas.dorier
f2e94e6819
Use nicer representation of payment methods in the Greenfield API 2020-08-26 21:36:32 +09:00
nicolas.dorier
be21e7d253
Remove PaymentMethodData from invoice entity 2020-08-26 21:36:32 +09:00
nicolas.dorier
8f0cc9de03
Update swagger 2020-08-26 21:36:32 +09:00
Kukks
8dea7df82a
make individual action items 2020-08-26 21:36:31 +09:00
Kukks
5f6f54db36
Remove old props 2020-08-26 21:36:31 +09:00
Kukks
41bebfedc4
add swagger docs 2020-08-26 21:36:31 +09:00
nicolas.dorier
25d08c1a71 Fix swagger doc for approve payout 2020-07-19 15:56:15 -05:00
Kukks
f1e8b4b6e6 fix json 2020-06-30 08:54:57 +02:00
Kukks
82af723f1f Enable CORS and fix small doc error 2020-06-30 08:26:19 +02:00
nicolas.dorier
d03124dfba
Add an approval state to pull payments 2020-06-25 13:35:10 +09:00
Nicolas Dorier
8230a408ac
Add pull payment feature (#1639) 2020-06-24 10:34:09 +09:00
Dennis Reimann
b066cfd904
Update and fix documentation links 2020-06-11 16:09:33 +02:00
nicolas.dorier
8dd6ecc0b8
Fix lightning implementation, docs and tests 2020-06-09 17:24:34 +09:00
Kukks
cf00784096 fix swagger 2020-06-07 08:30:04 +02:00
Kukks
f313a5f221 GreenField: Handle status codes, error models consistently 2020-06-07 08:21:45 +02:00
nicolas.dorier
ec4c346e0a
[Greenfield] Document store API 2020-05-31 12:04:23 +09:00
nicolas.dorier
048dff7e9e
Always use second based TimeSpan in Greenfield 2020-05-31 08:52:32 +09:00
nicolas.dorier
d9a93f996f
Merge branch 'master' of https://github.com/btcpayserver/btcpayserver 2020-05-29 18:47:40 +09:00
Kukks
4947fa4d45 Add also money json converter 2020-05-29 10:15:01 +02:00
Kukks
37f4b34b5e Add Lightmoney json converter + do swagger defs for ln api 2020-05-29 10:04:28 +02:00
nicolas.dorier
66206399e1
Rename LightningPrivateRouteHint =>privateRouteHints 2020-05-29 09:03:07 +09:00
Andrew Camilleri
1e3f62718d
GreenField: Cross-implemenation Lightning Node API (#1566)
* GreenField: Cross-implemenation Lightning Node API

* switch to hard unrsstricted check

* fix

* set LightningPrivateRouteHints in swagger + stores api

* add priv route hint

* rename models and add swagger defs to models
2020-05-29 09:00:13 +09:00
Kukks
7db8d52624 add missing title in swagger payment request def 2020-05-28 16:53:50 +02:00
Kukks
77073fa78c fix swagger schema 2020-05-28 16:42:47 +02:00
Andrew Camilleri
79b034b505
GreenField: Add properties to Store API (#1573)
* GreenField: Add properties to Store API

* Update StoreBaseData.cs

* fix api

* fix swagger
2020-05-24 04:13:18 +09:00
nicolas.dorier
1d092a15fb
Refactor server info data structure 2020-05-20 03:27:06 +09:00
Andrew Camilleri
5b3b96b372
GreenField: Payment Requests CRUD (#1430)
* GreenField: Payment Requests CRUD

* fixes

* fix swagger

* fix swag

* rebase fixes

* Add new permissions for payment requests

* Adapt PR to archive

* fix tst

* add to contains policxy

* make decimals returned as string due to avoid shitty language parsing issues

* do not register decimal json converter as global

* fix cultureinfo for json covnerter

* pr changes

* add json convertet test

* fix json test

* fix rebase
2020-05-20 02:59:23 +09:00
Dennis Reimann
e3b348b55c
GreenField: Add Server Info API basics 2020-05-18 15:29:04 +02:00
Andrew Camilleri
c784144a07
Greenfield: Add update store API (#1495)
* Greenfield: Add update store API

* update update store model

* change greenfield controller name to stop conflict
2020-04-27 20:13:20 +09:00
Nicolas Dorier
7adaa146dc
Merge pull request #1471 from dennisreimann/api-health-endpoint
GreenField: Add health check endpoint
2020-04-23 02:44:11 +09:00
Kukks
aeef160d0b separate store swagger 2020-04-22 15:05:13 +02:00
Dennis Reimann
22e39998e2
Updates from code review
Thanks @kukks!
2020-04-21 16:43:14 +02:00
Dennis Reimann
70d1056d48
API: Health endpoint returns synchronized state 2020-04-21 16:29:54 +02:00
Dennis Reimann
3bd5c3e1b5
API: Add health check endpoint 2020-04-21 14:59:33 +02:00
Kukks
41cc79600a Swagger Generator: Merge multiple documents
It's becoming very hard to edit the swagger file as it grows (especially with multiple PRs altering it). This PR allows the swagger file to be generated from multiple jsons instead which are merged in the controller.
2020-04-04 14:22:07 +02:00
nicolas.dorier
6d7b57ea3b
A api key can always revoke itself, add a route to delete any api key 2020-03-27 14:46:51 +09:00
nicolas.dorier
39a8c3fe47
GreenField: Create API Key 2020-03-27 14:17:31 +09:00
nicolas.dorier
49be370e51
Rename GreenField auth to APIKey auth in swagger doc 2020-03-27 12:43:06 +09:00
Kukks
f8f358ebdb add to client, fix tests and doc 2020-03-20 17:14:47 +01:00
Kukks
9d99c32305 add basic auth for greenfield 2020-03-20 14:07:31 +01:00
nicolas.dorier
478b1463ff
Improve documentation 2020-03-20 20:26:36 +09:00
nicolas.dorier
7e7f0053e2
Improve documentation 2020-03-20 20:25:10 +09:00
nicolas.dorier
d2864ccd7c
Make sure ApiKeyData set all the fields, remove UserId 2020-03-20 20:00:05 +09:00
nicolas.dorier
4666238e38
Fix build 2020-03-20 18:38:21 +09:00
nicolas.dorier
432d6bb261
Update documentation 2020-03-20 14:33:11 +09:00
nicolas.dorier
65d26ad8a1
improve redoc documentation 2020-03-18 23:35:17 +09:00
nicolas.dorier
0a0d8d53a4
Improve redoc 2020-03-18 23:30:27 +09:00
nicolas.dorier
e50e3f662d
Can create user without authentication if there is no admin 2020-03-18 23:10:15 +09:00
nicolas.dorier
540a31207e
Properly validate create user input 2020-03-18 20:51:50 +09:00
nicolas.dorier
132c36df7b
Remove useless routes and info in swagger 2020-03-18 20:25:54 +09:00
nicolas.dorier
e351e0c9ea
Remove dependency on NSwag 2020-03-18 20:08:09 +09:00