724 lines
No EOL
26 KiB
Protocol Buffer
724 lines
No EOL
26 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package methods;
|
|
|
|
import "google/protobuf/descriptor.proto";
|
|
import "structs.proto";
|
|
|
|
option go_package = "github.com/shocknet/lightning.pub";
|
|
option (file_options) = {
|
|
supported_http_methods:["post", "get"];
|
|
supported_auths:[
|
|
{
|
|
id: "guest"
|
|
name: "Guest"
|
|
context:[]
|
|
},
|
|
{
|
|
id: "user"
|
|
name: "User",
|
|
context:[{
|
|
key:"user_id",
|
|
value:"string"
|
|
},{
|
|
key:"app_id",
|
|
value:"string"
|
|
},{
|
|
key:"app_user_id",
|
|
value:"string"
|
|
}]
|
|
},
|
|
{
|
|
id: "admin",
|
|
name: "Admin",
|
|
//encrypted:true,
|
|
context:{
|
|
key:"admin_id",
|
|
value:"string"
|
|
}
|
|
},
|
|
{
|
|
id: "metrics",
|
|
name: "Metrics",
|
|
//encrypted:true,
|
|
context:[{
|
|
key:"operator_id",
|
|
value:"string"
|
|
},{
|
|
key:"app_id",
|
|
value:"string"
|
|
}]
|
|
},
|
|
{
|
|
id:"app",
|
|
name:"App",
|
|
context:{
|
|
key:"app_id",
|
|
value: "string"
|
|
}
|
|
},
|
|
{
|
|
id: "guestPub",
|
|
name: "GuestWithPub",
|
|
context:[
|
|
{
|
|
key: "pub",
|
|
value:"string"
|
|
},
|
|
{
|
|
key: "app_id",
|
|
value: "string"
|
|
}
|
|
]
|
|
}
|
|
];
|
|
};
|
|
|
|
message MethodQueryOptions {
|
|
repeated string items = 1;
|
|
}
|
|
|
|
extend google.protobuf.MethodOptions { // TODO: move this stuff to dep repo?
|
|
string auth_type = 50003;
|
|
string http_method = 50004;
|
|
string http_route = 50005;
|
|
MethodQueryOptions query = 50006;
|
|
bool nostr = 50007;
|
|
bool batch = 50008;
|
|
|
|
}
|
|
|
|
message ProtoFileOptions {
|
|
message SupportedAuth {
|
|
string id = 1;
|
|
string name = 2;
|
|
bool encrypted = 3;
|
|
map<string,string> context = 4;
|
|
}
|
|
repeated SupportedAuth supported_auths = 1;
|
|
repeated string supported_http_methods = 2;
|
|
}
|
|
|
|
extend google.protobuf.FileOptions {
|
|
ProtoFileOptions file_options = 50004;
|
|
}
|
|
|
|
service LightningPub {
|
|
// <Admin>
|
|
rpc LndGetInfo(structs.LndGetInfoRequest) returns (structs.LndGetInfoResponse){
|
|
option (auth_type) = "Admin";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/admin/lnd/getinfo";
|
|
option (nostr) = true;
|
|
};
|
|
|
|
rpc AddApp(structs.AddAppRequest) returns (structs.AuthApp) {
|
|
option (auth_type) = "Admin";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/admin/app/add";
|
|
option (nostr) = true;
|
|
};
|
|
|
|
rpc AuthApp(structs.AuthAppRequest) returns (structs.AuthApp) {
|
|
option (auth_type) = "Admin";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/admin/app/auth";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc BanUser(structs.BanUserRequest) returns (structs.BanUserResponse) {
|
|
option (auth_type) = "Admin";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/admin/user/ban";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetSeed(structs.Empty) returns (structs.LndSeed) {
|
|
option (auth_type) = "Admin";
|
|
option (http_method) = "get";
|
|
option (http_route) = "/api/admin/seed";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc ListChannels(structs.Empty) returns (structs.LndChannels) {
|
|
option (auth_type) = "Admin";
|
|
option (http_method) = "get";
|
|
option (http_route) = "/api/admin/channels";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc AddPeer(structs.AddPeerRequest) returns (structs.Empty) {
|
|
option (auth_type) = "Admin";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/admin/peer";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc UpdateChannelPolicy (structs.UpdateChannelPolicyRequest) returns (structs.Empty) {
|
|
option (auth_type) = "Admin";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/admin/channel/policy/update";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc OpenChannel(structs.OpenChannelRequest) returns (structs.OpenChannelResponse) {
|
|
option (auth_type) = "Admin";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/admin/channel/open";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc CloseChannel(structs.CloseChannelRequest) returns (structs.CloseChannelResponse) {
|
|
option (auth_type) = "Admin";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/admin/channel/close";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetAdminTransactionSwapQuotes(structs.TransactionSwapRequest) returns (structs.TransactionSwapQuoteList) {
|
|
option (auth_type) = "Admin";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/admin/swap/transaction/quote";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc PayAdminTransactionSwap(structs.PayAdminTransactionSwapRequest) returns (structs.AdminSwapResponse) {
|
|
option (auth_type) = "Admin";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/admin/swap/transaction/pay";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc ListAdminSwaps(structs.Empty) returns (structs.SwapsList) {
|
|
option (auth_type) = "Admin";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/admin/swap/list";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetUsageMetrics(structs.LatestUsageMetricReq) returns (structs.UsageMetrics) {
|
|
option (auth_type) = "Metrics";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/reports/usage";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetBundleMetrics(structs.LatestBundleMetricReq) returns (structs.BundleMetrics) {
|
|
option (auth_type) = "Metrics";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/reports/bundle";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetSingleBundleMetrics(structs.SingleMetricReq) returns (structs.BundleData) {
|
|
option (auth_type) = "Metrics";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/reports/bundle/single";
|
|
option (nostr) = true;
|
|
}
|
|
rpc GetSingleUsageMetrics(structs.SingleMetricReq) returns (structs.UsageMetricTlv) {
|
|
option (auth_type) = "Metrics";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/reports/usage/single";
|
|
option (nostr) = true;
|
|
}
|
|
rpc GetErrorStats(structs.Empty) returns (structs.ErrorStats) {
|
|
option (auth_type) = "Metrics";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/reports/errors";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetAppsMetrics(structs.AppsMetricsRequest) returns (structs.AppsMetrics) {
|
|
option (auth_type) = "Metrics";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/reports/apps";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetLndMetrics(structs.LndMetricsRequest) returns (structs.LndMetrics) {
|
|
option (auth_type) = "Metrics";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/reports/lnd";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetLndForwardingMetrics(structs.LndMetricsRequest) returns (structs.LndForwardingMetrics) {
|
|
option (auth_type) = "Metrics";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/reports/lnd/forwarding";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
|
|
rpc SubmitWebRtcMessage(structs.WebRtcMessage) returns (structs.WebRtcAnswer) {
|
|
option (auth_type) = "Metrics";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/upgrade/wrtc";
|
|
option (nostr) = true;
|
|
}
|
|
rpc SubToWebRtcCandidates(structs.Empty) returns (stream structs.WebRtcCandidate) {
|
|
option (auth_type) = "Metrics";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/upgrade/wrtc/candidates";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc ZipMetricsStorages(structs.Empty) returns (structs.ZippedMetrics) {
|
|
option (auth_type) = "Metrics";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/metrics/zip";
|
|
option (nostr) = true;
|
|
}
|
|
rpc PingSubProcesses(structs.Empty) returns (structs.Empty) {
|
|
option (auth_type) = "Metrics";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/metrics/ping";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetProvidersDisruption(structs.Empty) returns (structs.ProvidersDisruption) {
|
|
option (auth_type) = "Metrics";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/metrics/providers/disruption";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc ResetMetricsStorages(structs.Empty) returns (structs.Empty) {
|
|
option (auth_type) = "Metrics";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/metrics/reset";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc CreateOneTimeInviteLink(structs.CreateOneTimeInviteLinkRequest) returns (structs.CreateOneTimeInviteLinkResponse) {
|
|
option (auth_type) = "Admin";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/admin/app/invite/create";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetInviteLinkState(structs.GetInviteTokenStateRequest) returns (structs.GetInviteTokenStateResponse) {
|
|
option (auth_type) = "Admin";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/admin/app/invite/get";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
|
|
// </Admin>
|
|
|
|
// <Guest>
|
|
rpc Health(structs.Empty) returns (structs.Empty){
|
|
option (auth_type) = "Guest";
|
|
option (http_method) = "get";
|
|
option (http_route) = "/api/health";
|
|
};
|
|
rpc EncryptionExchange(structs.EncryptionExchangeRequest) returns (structs.Empty){
|
|
option (auth_type) = "Guest";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/encryption/exchange";
|
|
};
|
|
|
|
rpc SetMockInvoiceAsPaid(structs.SetMockInvoiceAsPaidRequest) returns (structs.Empty) {
|
|
option (auth_type) = "Guest";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/lnd/mock/invoice/paid";
|
|
}
|
|
rpc GetLnurlWithdrawInfo(structs.Empty) returns (structs.LnurlWithdrawInfoResponse){
|
|
option (auth_type) = "Guest";
|
|
option (http_method) = "get";
|
|
option (http_route) = "/api/guest/lnurl_withdraw/info";
|
|
option (query) = {items: ["k1"]};
|
|
}
|
|
rpc HandleLnurlWithdraw(structs.Empty) returns (structs.Empty){
|
|
option (auth_type) = "Guest";
|
|
option (http_method) = "get";
|
|
option (http_route) = "/api/guest/lnurl_withdraw/handle";
|
|
option (query) = {items: ["k1", "pr"]};
|
|
}
|
|
rpc GetLnurlPayInfo(structs.Empty)returns (structs.LnurlPayInfoResponse) {
|
|
option (auth_type) = "Guest";
|
|
option (http_method) = "get";
|
|
option (http_route) = "/api/guest/lnurl_pay/info";
|
|
option (query) = {items: ["k1"]};
|
|
}
|
|
rpc HandleLnurlPay(structs.Empty)returns (structs.HandleLnurlPayResponse) {
|
|
option (auth_type) = "Guest";
|
|
option (http_method) = "get";
|
|
option (http_route) = "/api/guest/lnurl_pay/handle";
|
|
option (query) = {items: ["k1", "amount", "nostr", "lnurl"]};
|
|
}
|
|
rpc HandleLnurlAddress(structs.Empty)returns (structs.LnurlPayInfoResponse) {
|
|
option (auth_type) = "Guest";
|
|
option (http_method) = "get";
|
|
option (http_route) = "/.well-known/lnurlp/:address_name";
|
|
}
|
|
|
|
rpc EnrollAdminToken(structs.EnrollAdminTokenRequest) returns (structs.Empty) {
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/guest/npub/enroll/admin";
|
|
option (nostr) = true;
|
|
}
|
|
//</Guest>
|
|
|
|
|
|
//<GuestWithPub>
|
|
rpc LinkNPubThroughToken(structs.LinkNPubThroughTokenRequest) returns (structs.Empty) {
|
|
option (auth_type) = "GuestWithPub";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/guest/npub/link";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc UseInviteLink(structs.UseInviteLinkRequest) returns (structs.Empty) {
|
|
option (auth_type) = "GuestWithPub";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/guest/invite";
|
|
option (nostr) = true;
|
|
}
|
|
//<GuestWithPub>
|
|
|
|
// <App>
|
|
rpc GetApp(structs.Empty) returns (structs.Application) {
|
|
option (auth_type) = "App";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/app/get";
|
|
}
|
|
|
|
rpc AddAppUser(structs.AddAppUserRequest)returns (structs.AppUser) {
|
|
option (auth_type) = "App";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/app/user/add";
|
|
};
|
|
|
|
rpc AddAppInvoice(structs.AddAppInvoiceRequest) returns (structs.NewInvoiceResponse) {
|
|
option (auth_type) = "App";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/app/add/invoice";
|
|
}
|
|
|
|
rpc AddAppUserInvoice(structs.AddAppUserInvoiceRequest) returns (structs.NewInvoiceResponse) {
|
|
option (auth_type) = "App";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/app/user/add/invoice";
|
|
}
|
|
|
|
rpc GetAppUser(structs.GetAppUserRequest) returns (structs.AppUser) {
|
|
option (auth_type) = "App";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/app/user/get";
|
|
}
|
|
|
|
rpc PayAppUserInvoice(structs.PayAppUserInvoiceRequest) returns (structs.PayInvoiceResponse) {
|
|
option (auth_type) = "App";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/app/invoice/pay";
|
|
}
|
|
|
|
rpc SendAppUserToAppUserPayment(structs.SendAppUserToAppUserPaymentRequest) returns (structs.Empty) {
|
|
option (auth_type) = "App";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/app/user/internal/pay";
|
|
}
|
|
|
|
rpc SendAppUserToAppPayment(structs.SendAppUserToAppPaymentRequest) returns (structs.Empty) {
|
|
option (auth_type) = "App";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/app/internal/pay";
|
|
}
|
|
|
|
rpc GetAppUserLNURLInfo(structs.GetAppUserLNURLInfoRequest) returns (structs.LnurlPayInfoResponse) {
|
|
option (auth_type) = "App";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/app/user/lnurl/pay/info";
|
|
}
|
|
rpc SetMockAppUserBalance(structs.SetMockAppUserBalanceRequest) returns (structs.Empty) {
|
|
option (auth_type) = "App";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/app/mock/user/blance/set";
|
|
}
|
|
rpc SetMockAppBalance(structs.SetMockAppBalanceRequest) returns (structs.Empty) {
|
|
option (auth_type) = "App";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/app/mock/blance/set";
|
|
}
|
|
rpc GetNPubLinkingState(structs.GetNPubLinking) returns (structs.NPubLinking) {
|
|
option (auth_type) = "App";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/app/user/npub/state";
|
|
}
|
|
rpc RequestNPubLinkingToken(structs.RequestNPubLinkingTokenRequest) returns (structs.RequestNPubLinkingTokenResponse) {
|
|
option (auth_type) = "App";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/app/user/npub/token";
|
|
}
|
|
rpc ResetNPubLinkingToken(structs.RequestNPubLinkingTokenRequest) returns (structs.RequestNPubLinkingTokenResponse) {
|
|
option (auth_type) = "App";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/app/user/npub/token/reset";
|
|
}
|
|
// </App>
|
|
|
|
// <User>
|
|
rpc UserHealth(structs.Empty)returns(structs.UserHealthState){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/health";
|
|
option (nostr) = true;
|
|
}
|
|
rpc GetUserInfo(structs.Empty)returns(structs.UserInfo){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/info";
|
|
option (nostr) = true;
|
|
}
|
|
rpc UpdateCallbackUrl(structs.CallbackUrl)returns(structs.CallbackUrl){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/cb/update";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc AddProduct(structs.AddProductRequest) returns (structs.Product){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/product/add";
|
|
option (nostr) = true;
|
|
};
|
|
|
|
rpc NewProductInvoice(structs.Empty) returns (structs.NewInvoiceResponse){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "get";
|
|
option (http_route) = "/api/user/product/get/invoice";
|
|
option (query) = {items: ["id"]};
|
|
option (nostr) = true;
|
|
};
|
|
|
|
rpc GetUserOperations(structs.GetUserOperationsRequest) returns (structs.GetUserOperationsResponse) {
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/operations";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc NewAddress(structs.NewAddressRequest) returns (structs.NewAddressResponse) {
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/chain/new";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc PayAddress(structs.PayAddressRequest) returns (structs.PayAddressResponse){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/chain/pay";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetTransactionSwapQuotes(structs.TransactionSwapRequest) returns (structs.TransactionSwapQuoteList){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/swap/quote";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc ListSwaps(structs.Empty) returns (structs.SwapsList){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/swap/list";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc NewInvoice(structs.NewInvoiceRequest) returns (structs.NewInvoiceResponse){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/invoice/new";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc DecodeInvoice(structs.DecodeInvoiceRequest) returns (structs.DecodeInvoiceResponse){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/invoice/decode";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc PayInvoice(structs.PayInvoiceRequest) returns (structs.PayInvoiceResponse){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/invoice/pay";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetPaymentState(structs.GetPaymentStateRequest) returns (structs.PaymentState){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/payment/state";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetLnurlWithdrawLink(structs.Empty) returns (structs.LnurlLinkResponse){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "get";
|
|
option (http_route) = "/api/user/lnurl_withdraw/link";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetLnurlPayLink(structs.Empty) returns (structs.LnurlLinkResponse){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "get";
|
|
option (http_route) = "/api/user/lnurl_pay/link";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetLNURLChannelLink(structs.Empty) returns (structs.LnurlLinkResponse){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/lnurl_channel/url";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetUserOffers(structs.Empty) returns (structs.UserOffers){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "get";
|
|
option (http_route) = "/api/user/offers/get";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetUserOffer(structs.OfferId) returns (structs.OfferConfig){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/offer/get";
|
|
option (nostr) = true;
|
|
}
|
|
rpc GetUserOfferInvoices(structs.GetUserOfferInvoicesReq) returns (structs.OfferInvoices){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/offer/get/invoices";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc UpdateUserOffer(structs.OfferConfig) returns (structs.Empty){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/offer/update";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc DeleteUserOffer(structs.OfferId) returns (structs.Empty){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/offer/delete";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc AddUserOffer(structs.OfferConfig) returns (structs.OfferId){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/offer/add";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetDebitAuthorizations(structs.Empty) returns (structs.DebitAuthorizations){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "get";
|
|
option (http_route) = "/api/user/debit/get";
|
|
option (nostr) = true;
|
|
}
|
|
rpc GetManageAuthorizations(structs.Empty) returns (structs.ManageAuthorizations){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "get";
|
|
option (http_route) = "/api/user/manage/get";
|
|
option (nostr) = true;
|
|
}
|
|
rpc AuthorizeManage(structs.ManageAuthorizationRequest) returns (structs.ManageAuthorization){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/manage/authorize";
|
|
option (nostr) = true;
|
|
}
|
|
rpc ResetManage(structs.ManageOperation) returns (structs.Empty){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/manage/reset";
|
|
option (nostr) = true;
|
|
}
|
|
/* rpc AuthorizeDebit(structs.DebitAuthorizationRequest) returns (structs.DebitAuthorization){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/debit/authorize";
|
|
option (nostr) = true;
|
|
} */
|
|
rpc EditDebit(structs.DebitAuthorizationRequest) returns (structs.Empty){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/debit/edit";
|
|
option (nostr) = true;
|
|
}
|
|
rpc BanDebit(structs.DebitOperation) returns (structs.Empty){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/debit/ban";
|
|
option (nostr) = true;
|
|
}
|
|
rpc ResetDebit(structs.DebitOperation) returns (structs.Empty){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/debit/reset";
|
|
option (nostr) = true;
|
|
}
|
|
rpc RespondToDebit(structs.DebitResponse) returns (structs.Empty){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/debit/finish";
|
|
option (nostr) = true;
|
|
}
|
|
rpc GetLiveDebitRequests(structs.Empty) returns (stream structs.LiveDebitRequest){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/debit/sub";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetLiveManageRequests(structs.Empty) returns (stream structs.LiveManageRequest){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/manage/sub";
|
|
option (nostr) = true;
|
|
}
|
|
|
|
rpc GetLiveUserOperations(structs.Empty) returns (stream structs.LiveUserOperation){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/operations/sub";
|
|
option (nostr) = true;
|
|
}
|
|
rpc GetMigrationUpdate(structs.Empty) returns (stream structs.MigrationUpdate){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/migrations/sub";
|
|
option (nostr) = true;
|
|
}
|
|
rpc GetHttpCreds(structs.Empty) returns (structs.HttpCreds){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/http_creds";
|
|
option (nostr) = true;
|
|
}
|
|
rpc EnrollMessagingToken(structs.MessagingToken) returns (structs.Empty){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/messaging/enroll";
|
|
option (nostr) = true;
|
|
}
|
|
rpc BatchUser(structs.Empty) returns (structs.Empty){
|
|
option (auth_type) = "User";
|
|
option (http_method) = "post";
|
|
option (http_route) = "/api/user/batch";
|
|
option (nostr) = true;
|
|
option (batch) = true;
|
|
}
|
|
// </User>
|
|
} |