Skip to content
Open

Dash2 #993

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
116 changes: 116 additions & 0 deletions proto/autogenerated/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ The nostr server will send back a message response, and inside the body there wi
- input: [AssetsAndLiabilitiesReq](#AssetsAndLiabilitiesReq)
- output: [AssetsAndLiabilities](#AssetsAndLiabilities)

- GetAssetsAndLiabilitiesV2
- auth type: __Admin__
- input: [AssetsAndLiabilitiesReqV2](#AssetsAndLiabilitiesReqV2)
- output: [AssetsAndLiabilitiesV2](#AssetsAndLiabilitiesV2)

- GetBundleMetrics
- auth type: __Metrics__
- input: [LatestBundleMetricReq](#LatestBundleMetricReq)
Expand Down Expand Up @@ -253,6 +258,16 @@ The nostr server will send back a message response, and inside the body there wi
- input: [GetUserOperationsRequest](#GetUserOperationsRequest)
- output: [GetUserOperationsResponse](#GetUserOperationsResponse)

- GetUserOperationsFromAdmin
- auth type: __Admin__
- input: [GetUserOperationsRequest](#GetUserOperationsRequest)
- output: [GetUserOperationsResponse](#GetUserOperationsResponse)

- GetUsersAdminInfo
- auth type: __Admin__
- input: [UsersAdminInfoRequest](#UsersAdminInfoRequest)
- output: [UsersAdminInfo](#UsersAdminInfo)

- LinkNPubThroughToken
- auth type: __GuestWithPub__
- input: [LinkNPubThroughTokenRequest](#LinkNPubThroughTokenRequest)
Expand Down Expand Up @@ -626,6 +641,13 @@ The nostr server will send back a message response, and inside the body there wi
- input: [AssetsAndLiabilitiesReq](#AssetsAndLiabilitiesReq)
- output: [AssetsAndLiabilities](#AssetsAndLiabilities)

- GetAssetsAndLiabilitiesV2
- auth type: __Admin__
- http method: __post__
- http route: __/api/admin/assets/liabilities/v2__
- input: [AssetsAndLiabilitiesReqV2](#AssetsAndLiabilitiesReqV2)
- output: [AssetsAndLiabilitiesV2](#AssetsAndLiabilitiesV2)

- GetBundleMetrics
- auth type: __Metrics__
- http method: __post__
Expand Down Expand Up @@ -840,6 +862,20 @@ The nostr server will send back a message response, and inside the body there wi
- input: [GetUserOperationsRequest](#GetUserOperationsRequest)
- output: [GetUserOperationsResponse](#GetUserOperationsResponse)

- GetUserOperationsFromAdmin
- auth type: __Admin__
- http method: __post__
- http route: __/api/admin/user/operations__
- input: [GetUserOperationsRequest](#GetUserOperationsRequest)
- output: [GetUserOperationsResponse](#GetUserOperationsResponse)

- GetUsersAdminInfo
- auth type: __Admin__
- http method: __post__
- http route: __/api/admin/users/info__
- input: [UsersAdminInfoRequest](#UsersAdminInfoRequest)
- output: [UsersAdminInfo](#UsersAdminInfo)

- HandleLnurlAddress
- auth type: __Guest__
- http method: __get__
Expand Down Expand Up @@ -1196,6 +1232,12 @@ The nostr server will send back a message response, and inside the body there wi
- __info__: _[UserInfo](#UserInfo)_
- __max_withdrawable__: _number_

### AppUserAdminInfo
- __app_user_id__: _string_
- __has_callback_url__: _boolean_
- __has_topic_id__: _boolean_
- __npub__: _string_

### Application
- __balance__: _number_
- __id__: _string_
Expand Down Expand Up @@ -1225,6 +1267,15 @@ The nostr server will send back a message response, and inside the body there wi
- __limit_payments__: _number_ *this field is optional
- __limit_providers__: _number_ *this field is optional

### AssetsAndLiabilitiesReqV2
- __liquidity_providers__: ARRAY of: _[LiquidityProviderFilter](#LiquidityProviderFilter)_
- __lnd_providers__: ARRAY of: _[LndProviderFilter](#LndProviderFilter)_

### AssetsAndLiabilitiesV2
- __liquidity_providers__: ARRAY of: _[LiquidityAssetProviderV2](#LiquidityAssetProviderV2)_
- __lnds__: ARRAY of: _[LndAssetProviderV2](#LndAssetProviderV2)_
- __users_balance__: _number_

### AuthApp
- __app__: _[Application](#Application)_
- __auth_token__: _string_
Expand Down Expand Up @@ -1405,6 +1456,7 @@ The nostr server will send back a message response, and inside the body there wi
- __latestOutgoingTx__: _[OperationsCursor](#OperationsCursor)_
- __latestOutgoingUserToUserPayment__: _[OperationsCursor](#OperationsCursor)_
- __max_size__: _number_
- __user_id__: _string_ *this field is optional

### GetUserOperationsResponse
- __latestIncomingInvoiceOperations__: _[UserOperations](#UserOperations)_
Expand All @@ -1413,6 +1465,7 @@ The nostr server will send back a message response, and inside the body there wi
- __latestOutgoingInvoiceOperations__: _[UserOperations](#UserOperations)_
- __latestOutgoingTxOperations__: _[UserOperations](#UserOperations)_
- __latestOutgoingUserToUserPayemnts__: _[UserOperations](#UserOperations)_
- __user_id__: _string_ *this field is optional

### GraphPoint
- __x__: _number_
Expand Down Expand Up @@ -1468,10 +1521,25 @@ The nostr server will send back a message response, and inside the body there wi
### LinkNPubThroughTokenRequest
- __token__: _string_

### LiquidityAssetOperationsPage
- __has_more__: _boolean_
- __next_cursor__: _[OperationsCursor](#OperationsCursor)_ *this field is optional
- __operations__: ARRAY of: _[AssetOperation](#AssetOperation)_

### LiquidityAssetProvider
- __pubkey__: _string_
- __tracked__: _[TrackedLiquidityProvider](#TrackedLiquidityProvider)_ *this field is optional

### LiquidityAssetProviderV2
- __pubkey__: _string_
- __tracked__: _[TrackedLiquidityProviderV2](#TrackedLiquidityProviderV2)_ *this field is optional

### LiquidityProviderFilter
- __latestIncomingInvoice__: _[OperationsCursor](#OperationsCursor)_ *this field is optional
- __latestOutgoingInvoice__: _[OperationsCursor](#OperationsCursor)_ *this field is optional
- __limit__: _number_ *this field is optional
- __pubkey__: _string_

### LiveDebitRequest
- __debit__: _[LiveDebitRequest_debit](#LiveDebitRequest_debit)_
- __k1__: _string_ *this field is optional
Expand All @@ -1486,10 +1554,19 @@ The nostr server will send back a message response, and inside the body there wi
- __latest_balance__: _number_
- __operation__: _[UserOperation](#UserOperation)_

### LndAssetOperationsPage
- __has_more__: _boolean_
- __next_index_offset__: _number_ *this field is optional
- __operations__: ARRAY of: _[AssetOperation](#AssetOperation)_

### LndAssetProvider
- __pubkey__: _string_
- __tracked__: _[TrackedLndProvider](#TrackedLndProvider)_ *this field is optional

### LndAssetProviderV2
- __pubkey__: _string_
- __tracked__: _[TrackedLndProviderV2](#TrackedLndProviderV2)_ *this field is optional

### LndChannels
- __open_channels__: ARRAY of: _[OpenChannel](#OpenChannel)_

Expand Down Expand Up @@ -1535,6 +1612,15 @@ The nostr server will send back a message response, and inside the body there wi
- __pending_channels__: _number_
- __root_ops__: ARRAY of: _[RootOperation](#RootOperation)_

### LndProviderFilter
- __invoice_index_offset__: _number_ *this field is optional
- __limit_invoices__: _number_ *this field is optional
- __limit_payments__: _number_ *this field is optional
- __limit_transactions__: _number_ *this field is optional
- __payment_index_offset__: _number_ *this field is optional
- __pubkey__: _string_
- __tx_index_offset__: _number_ *this field is optional

### LndSeed
- __seed__: ARRAY of: _string_

Expand Down Expand Up @@ -1818,6 +1904,11 @@ The nostr server will send back a message response, and inside the body there wi
- __invoices__: ARRAY of: _[AssetOperation](#AssetOperation)_
- __payments__: ARRAY of: _[AssetOperation](#AssetOperation)_

### TrackedLiquidityProviderV2
- __balance__: _number_
- __invoices__: _[LiquidityAssetOperationsPage](#LiquidityAssetOperationsPage)_
- __payments__: _[LiquidityAssetOperationsPage](#LiquidityAssetOperationsPage)_

### TrackedLndProvider
- __channels_balance__: _number_
- __confirmed_balance__: _number_
Expand All @@ -1827,10 +1918,20 @@ The nostr server will send back a message response, and inside the body there wi
- __payments__: ARRAY of: _[AssetOperation](#AssetOperation)_
- __unconfirmed_balance__: _number_

### TrackedLndProviderV2
- __channels_balance__: _number_
- __confirmed_balance__: _number_
- __incoming_tx__: _[LndAssetOperationsPage](#LndAssetOperationsPage)_
- __invoices__: _[LndAssetOperationsPage](#LndAssetOperationsPage)_
- __outgoing_tx__: _[LndAssetOperationsPage](#LndAssetOperationsPage)_
- __payments__: _[LndAssetOperationsPage](#LndAssetOperationsPage)_
- __unconfirmed_balance__: _number_

### TrackedOperation
- __amount__: _number_
- __ts__: _number_
- __type__: _[TrackedOperationType](#TrackedOperationType)_
- __user_id__: _string_ *this field is optional

### TransactionSwapQuote
- __chain_fee_sats__: _number_
Expand Down Expand Up @@ -1888,6 +1989,13 @@ The nostr server will send back a message response, and inside the body there wi
### UseInviteLinkRequest
- __invite_token__: _string_

### UserAdminInfo
- __app_users__: ARRAY of: _[AppUserAdminInfo](#AppUserAdminInfo)_
- __balance__: _number_
- __locked__: _boolean_
- __owner_of_app_id__: _string_ *this field is optional
- __user_id__: _string_

### UserHealthState
- __downtime_reason__: _string_

Expand Down Expand Up @@ -1927,6 +2035,14 @@ The nostr server will send back a message response, and inside the body there wi
- __operations__: ARRAY of: _[UserOperation](#UserOperation)_
- __toIndex__: _[OperationsCursor](#OperationsCursor)_

### UsersAdminInfo
- __total__: _number_
- __users__: ARRAY of: _[UserAdminInfo](#UserAdminInfo)_

### UsersAdminInfoRequest
- __skip__: _number_ *this field is optional
- __take__: _number_ *this field is optional

### UsersInfo
- __always_been_inactive__: _number_
- __balance_avg__: _number_
Expand Down
90 changes: 90 additions & 0 deletions proto/autogenerated/go/http_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ type Client struct {
GetAppUserLNURLInfo func(req GetAppUserLNURLInfoRequest) (*LnurlPayInfoResponse, error)
GetAppsMetrics func(req AppsMetricsRequest) (*AppsMetrics, error)
GetAssetsAndLiabilities func(req AssetsAndLiabilitiesReq) (*AssetsAndLiabilities, error)
GetAssetsAndLiabilitiesV2 func(req AssetsAndLiabilitiesReqV2) (*AssetsAndLiabilitiesV2, error)
GetBundleMetrics func(req LatestBundleMetricReq) (*BundleMetrics, error)
GetDebitAuthorizations func() (*DebitAuthorizations, error)
GetErrorStats func() (*ErrorStats, error)
Expand Down Expand Up @@ -112,6 +113,8 @@ type Client struct {
GetUserOfferInvoices func(req GetUserOfferInvoicesReq) (*OfferInvoices, error)
GetUserOffers func() (*UserOffers, error)
GetUserOperations func(req GetUserOperationsRequest) (*GetUserOperationsResponse, error)
GetUserOperationsFromAdmin func(req GetUserOperationsRequest) (*GetUserOperationsResponse, error)
GetUsersAdminInfo func(req UsersAdminInfoRequest) (*UsersAdminInfo, error)
HandleLnurlAddress func(routeParams HandleLnurlAddress_RouteParams) (*LnurlPayInfoResponse, error)
HandleLnurlPay func(query HandleLnurlPay_Query) (*HandleLnurlPayResponse, error)
HandleLnurlWithdraw func(query HandleLnurlWithdraw_Query) error
Expand Down Expand Up @@ -897,6 +900,35 @@ func NewClient(params ClientParams) *Client {
}
return &res, nil
},
GetAssetsAndLiabilitiesV2: func(req AssetsAndLiabilitiesReqV2) (*AssetsAndLiabilitiesV2, error) {
auth, err := params.RetrieveAdminAuth()
if err != nil {
return nil, err
}
finalRoute := "/api/admin/assets/liabilities/v2"
body, err := json.Marshal(req)
if err != nil {
return nil, err
}
resBody, err := doPostRequest(params.BaseURL+finalRoute, body, auth)
if err != nil {
return nil, err
}
result := ResultError{}
err = json.Unmarshal(resBody, &result)
if err != nil {
return nil, err
}
if result.Status == "ERROR" {
return nil, fmt.Errorf(result.Reason)
}
res := AssetsAndLiabilitiesV2{}
err = json.Unmarshal(resBody, &res)
if err != nil {
return nil, err
}
return &res, nil
},
GetBundleMetrics: func(req LatestBundleMetricReq) (*BundleMetrics, error) {
auth, err := params.RetrieveMetricsAuth()
if err != nil {
Expand Down Expand Up @@ -1600,6 +1632,64 @@ func NewClient(params ClientParams) *Client {
}
return &res, nil
},
GetUserOperationsFromAdmin: func(req GetUserOperationsRequest) (*GetUserOperationsResponse, error) {
auth, err := params.RetrieveAdminAuth()
if err != nil {
return nil, err
}
finalRoute := "/api/admin/user/operations"
body, err := json.Marshal(req)
if err != nil {
return nil, err
}
resBody, err := doPostRequest(params.BaseURL+finalRoute, body, auth)
if err != nil {
return nil, err
}
result := ResultError{}
err = json.Unmarshal(resBody, &result)
if err != nil {
return nil, err
}
if result.Status == "ERROR" {
return nil, fmt.Errorf(result.Reason)
}
res := GetUserOperationsResponse{}
err = json.Unmarshal(resBody, &res)
if err != nil {
return nil, err
}
return &res, nil
},
GetUsersAdminInfo: func(req UsersAdminInfoRequest) (*UsersAdminInfo, error) {
auth, err := params.RetrieveAdminAuth()
if err != nil {
return nil, err
}
finalRoute := "/api/admin/users/info"
body, err := json.Marshal(req)
if err != nil {
return nil, err
}
resBody, err := doPostRequest(params.BaseURL+finalRoute, body, auth)
if err != nil {
return nil, err
}
result := ResultError{}
err = json.Unmarshal(resBody, &result)
if err != nil {
return nil, err
}
if result.Status == "ERROR" {
return nil, fmt.Errorf(result.Reason)
}
res := UsersAdminInfo{}
err = json.Unmarshal(resBody, &res)
if err != nil {
return nil, err
}
return &res, nil
},
HandleLnurlAddress: func(routeParams HandleLnurlAddress_RouteParams) (*LnurlPayInfoResponse, error) {
auth, err := params.RetrieveGuestAuth()
if err != nil {
Expand Down
Loading