diff --git a/dart/wallet/payment.pbgrpc.dart b/dart/wallet/payment.pbgrpc.dart index 47e17ac..6bbfd06 100644 --- a/dart/wallet/payment.pbgrpc.dart +++ b/dart/wallet/payment.pbgrpc.dart @@ -16,8 +16,8 @@ import 'dart:core' as $core; import 'package:grpc/service_api.dart' as $grpc; import 'package:protobuf/protobuf.dart' as $pb; -import 'blocks.pb.dart' as $1; -import 'payment.pb.dart' as $0; +import 'blocks.pb.dart' as $0; +import 'payment.pb.dart' as $1; export 'payment.pb.dart'; @@ -33,41 +33,48 @@ class PaymentClient extends $grpc.Client { PaymentClient(super.channel, {super.options, super.interceptors}); + $grpc.ResponseFuture<$1.PaymentReply> hello( + $0.Empty request, { + $grpc.CallOptions? options, + }) { + return $createUnaryCall(_$hello, request, options: options); + } + /// 获取平台支持的支付网关 - $grpc.ResponseFuture<$0.WayReply> way( - $0.WayRequest request, { + $grpc.ResponseFuture<$1.WayReply> way( + $1.WayRequest request, { $grpc.CallOptions? options, }) { return $createUnaryCall(_$way, request, options: options); } /// 获取支付的详情 - $grpc.ResponseFuture<$0.PaymentItem> get( - $1.IdentRequest request, { + $grpc.ResponseFuture<$1.PaymentItem> get( + $0.IdentRequest request, { $grpc.CallOptions? options, }) { return $createUnaryCall(_$get, request, options: options); } /// 支付-电商订单 - $grpc.ResponseFuture<$0.PaymentReply> byOrder( - $0.OrderRequest request, { + $grpc.ResponseFuture<$1.PaymentReply> byOrder( + $1.OrderRequest request, { $grpc.CallOptions? options, }) { return $createUnaryCall(_$byOrder, request, options: options); } /// 支付-充值 - $grpc.ResponseFuture<$0.PaymentReply> byCharge( - $0.ChargeRequest request, { + $grpc.ResponseFuture<$1.PaymentReply> byCharge( + $1.ChargeRequest request, { $grpc.CallOptions? options, }) { return $createUnaryCall(_$byCharge, request, options: options); } /// 回调更新支付的结果和状态 - $grpc.ResponseFuture<$1.StatusReply> callback( - $0.CallbackRequest request, { + $grpc.ResponseFuture<$0.StatusReply> callback( + $1.CallbackRequest request, { $grpc.CallOptions? options, }) { return $createUnaryCall(_$callback, request, options: options); @@ -75,28 +82,32 @@ class PaymentClient extends $grpc.Client { // method descriptors - static final _$way = $grpc.ClientMethod<$0.WayRequest, $0.WayReply>( + static final _$hello = $grpc.ClientMethod<$0.Empty, $1.PaymentReply>( + '/wallet.Payment/Hello', + ($0.Empty value) => value.writeToBuffer(), + $1.PaymentReply.fromBuffer); + static final _$way = $grpc.ClientMethod<$1.WayRequest, $1.WayReply>( '/wallet.Payment/Way', - ($0.WayRequest value) => value.writeToBuffer(), - $0.WayReply.fromBuffer); - static final _$get = $grpc.ClientMethod<$1.IdentRequest, $0.PaymentItem>( + ($1.WayRequest value) => value.writeToBuffer(), + $1.WayReply.fromBuffer); + static final _$get = $grpc.ClientMethod<$0.IdentRequest, $1.PaymentItem>( '/wallet.Payment/Get', - ($1.IdentRequest value) => value.writeToBuffer(), - $0.PaymentItem.fromBuffer); - static final _$byOrder = $grpc.ClientMethod<$0.OrderRequest, $0.PaymentReply>( + ($0.IdentRequest value) => value.writeToBuffer(), + $1.PaymentItem.fromBuffer); + static final _$byOrder = $grpc.ClientMethod<$1.OrderRequest, $1.PaymentReply>( '/wallet.Payment/ByOrder', - ($0.OrderRequest value) => value.writeToBuffer(), - $0.PaymentReply.fromBuffer); + ($1.OrderRequest value) => value.writeToBuffer(), + $1.PaymentReply.fromBuffer); static final _$byCharge = - $grpc.ClientMethod<$0.ChargeRequest, $0.PaymentReply>( + $grpc.ClientMethod<$1.ChargeRequest, $1.PaymentReply>( '/wallet.Payment/ByCharge', - ($0.ChargeRequest value) => value.writeToBuffer(), - $0.PaymentReply.fromBuffer); + ($1.ChargeRequest value) => value.writeToBuffer(), + $1.PaymentReply.fromBuffer); static final _$callback = - $grpc.ClientMethod<$0.CallbackRequest, $1.StatusReply>( + $grpc.ClientMethod<$1.CallbackRequest, $0.StatusReply>( '/wallet.Payment/Callback', - ($0.CallbackRequest value) => value.writeToBuffer(), - $1.StatusReply.fromBuffer); + ($1.CallbackRequest value) => value.writeToBuffer(), + $0.StatusReply.fromBuffer); } @$pb.GrpcServiceName('wallet.Payment') @@ -104,79 +115,94 @@ abstract class PaymentServiceBase extends $grpc.Service { $core.String get $name => 'wallet.Payment'; PaymentServiceBase() { - $addMethod($grpc.ServiceMethod<$0.WayRequest, $0.WayReply>( + $addMethod($grpc.ServiceMethod<$0.Empty, $1.PaymentReply>( + 'Hello', + hello_Pre, + false, + false, + ($core.List<$core.int> value) => $0.Empty.fromBuffer(value), + ($1.PaymentReply value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$1.WayRequest, $1.WayReply>( 'Way', way_Pre, false, false, - ($core.List<$core.int> value) => $0.WayRequest.fromBuffer(value), - ($0.WayReply value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$1.IdentRequest, $0.PaymentItem>( + ($core.List<$core.int> value) => $1.WayRequest.fromBuffer(value), + ($1.WayReply value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$0.IdentRequest, $1.PaymentItem>( 'Get', get_Pre, false, false, - ($core.List<$core.int> value) => $1.IdentRequest.fromBuffer(value), - ($0.PaymentItem value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$0.OrderRequest, $0.PaymentReply>( + ($core.List<$core.int> value) => $0.IdentRequest.fromBuffer(value), + ($1.PaymentItem value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$1.OrderRequest, $1.PaymentReply>( 'ByOrder', byOrder_Pre, false, false, - ($core.List<$core.int> value) => $0.OrderRequest.fromBuffer(value), - ($0.PaymentReply value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$0.ChargeRequest, $0.PaymentReply>( + ($core.List<$core.int> value) => $1.OrderRequest.fromBuffer(value), + ($1.PaymentReply value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$1.ChargeRequest, $1.PaymentReply>( 'ByCharge', byCharge_Pre, false, false, - ($core.List<$core.int> value) => $0.ChargeRequest.fromBuffer(value), - ($0.PaymentReply value) => value.writeToBuffer())); - $addMethod($grpc.ServiceMethod<$0.CallbackRequest, $1.StatusReply>( + ($core.List<$core.int> value) => $1.ChargeRequest.fromBuffer(value), + ($1.PaymentReply value) => value.writeToBuffer())); + $addMethod($grpc.ServiceMethod<$1.CallbackRequest, $0.StatusReply>( 'Callback', callback_Pre, false, false, - ($core.List<$core.int> value) => $0.CallbackRequest.fromBuffer(value), - ($1.StatusReply value) => value.writeToBuffer())); + ($core.List<$core.int> value) => $1.CallbackRequest.fromBuffer(value), + ($0.StatusReply value) => value.writeToBuffer())); } - $async.Future<$0.WayReply> way_Pre( - $grpc.ServiceCall $call, $async.Future<$0.WayRequest> $request) async { + $async.Future<$1.PaymentReply> hello_Pre( + $grpc.ServiceCall $call, $async.Future<$0.Empty> $request) async { + return hello($call, await $request); + } + + $async.Future<$1.PaymentReply> hello( + $grpc.ServiceCall call, $0.Empty request); + + $async.Future<$1.WayReply> way_Pre( + $grpc.ServiceCall $call, $async.Future<$1.WayRequest> $request) async { return way($call, await $request); } - $async.Future<$0.WayReply> way($grpc.ServiceCall call, $0.WayRequest request); + $async.Future<$1.WayReply> way($grpc.ServiceCall call, $1.WayRequest request); - $async.Future<$0.PaymentItem> get_Pre( - $grpc.ServiceCall $call, $async.Future<$1.IdentRequest> $request) async { + $async.Future<$1.PaymentItem> get_Pre( + $grpc.ServiceCall $call, $async.Future<$0.IdentRequest> $request) async { return get($call, await $request); } - $async.Future<$0.PaymentItem> get( - $grpc.ServiceCall call, $1.IdentRequest request); + $async.Future<$1.PaymentItem> get( + $grpc.ServiceCall call, $0.IdentRequest request); - $async.Future<$0.PaymentReply> byOrder_Pre( - $grpc.ServiceCall $call, $async.Future<$0.OrderRequest> $request) async { + $async.Future<$1.PaymentReply> byOrder_Pre( + $grpc.ServiceCall $call, $async.Future<$1.OrderRequest> $request) async { return byOrder($call, await $request); } - $async.Future<$0.PaymentReply> byOrder( - $grpc.ServiceCall call, $0.OrderRequest request); + $async.Future<$1.PaymentReply> byOrder( + $grpc.ServiceCall call, $1.OrderRequest request); - $async.Future<$0.PaymentReply> byCharge_Pre( - $grpc.ServiceCall $call, $async.Future<$0.ChargeRequest> $request) async { + $async.Future<$1.PaymentReply> byCharge_Pre( + $grpc.ServiceCall $call, $async.Future<$1.ChargeRequest> $request) async { return byCharge($call, await $request); } - $async.Future<$0.PaymentReply> byCharge( - $grpc.ServiceCall call, $0.ChargeRequest request); + $async.Future<$1.PaymentReply> byCharge( + $grpc.ServiceCall call, $1.ChargeRequest request); - $async.Future<$1.StatusReply> callback_Pre($grpc.ServiceCall $call, - $async.Future<$0.CallbackRequest> $request) async { + $async.Future<$0.StatusReply> callback_Pre($grpc.ServiceCall $call, + $async.Future<$1.CallbackRequest> $request) async { return callback($call, await $request); } - $async.Future<$1.StatusReply> callback( - $grpc.ServiceCall call, $0.CallbackRequest request); + $async.Future<$0.StatusReply> callback( + $grpc.ServiceCall call, $1.CallbackRequest request); } diff --git a/docs/wallet/index.html b/docs/wallet/index.html new file mode 100644 index 0000000..04d3623 --- /dev/null +++ b/docs/wallet/index.html @@ -0,0 +1,3091 @@ + + + + + Protocol Documentation + + + + + + + + + + +

Protocol Documentation

+ +

Table of Contents

+ +
+ +
+ + + +
+

alipay.proto

Top +
+

+ + +

AlipayTradeAppPayReply

+

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
pay_paramstring

调起支付的参数

+ + + + + +

AlipayTradeAppPayRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
user_identificationstring

用户唯一标识

amountint64

充值金额,单位:分

descriptionstring

商品描述

notify_urlstring

支付回调URL,公网域名须为HTTPS

+ + + + + +

AlipayTradePagePayReply

+

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
pay_urlstring

支付链接

+ + + + + +

AlipayTradePagePayRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
user_identificationstring

用户唯一标识

amountint64

充值金额,单位:分

descriptionstring

商品描述

notify_urlstring

支付回调URL,公网域名须为HTTPS

return_urlstring

支付成功时返回的URL

+ + + + + +

AlipayTradeWapPayReply

+

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
pay_urlstring

支付链接

+ + + + + +

AlipayTradeWapPayRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
user_identificationstring

用户唯一标识

amountint64

充值金额,单位:分

descriptionstring

商品描述

notify_urlstring

支付回调URL,公网域名须为HTTPS

quit_urlstring

退出支付时用户返回的URL

+ + + + + +

AlipayUniTransferReply

+

+ + + + + +

AlipayUniTransferRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
user_identificationstring

用户唯一标识

amountint64

提现金额,单位:分

feeint64

提现手续费,单位:分

descriptionstring

商品描述

+ + + + + + + + + + + +

Alipay

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method NameRequest TypeResponse TypeDescription
WapPayAlipayTradeWapPayRequestAlipayTradeWapPayReply

支付宝wap支付

PagePayAlipayTradePagePayRequestAlipayTradePagePayReply

支付宝电脑网站支付

AppPayAlipayTradeAppPayRequestAlipayTradeAppPayReply

支付宝APP支付

TransferAlipayUniTransferRequestAlipayUniTransferReply

支付宝转账到个人支付宝账户

+ + + + +
+

blocks.proto

Top +
+

+ + +

Empty

+

+ + + + + +

FetchRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
page_noint64

页数

page_sizeint64

每页记录数

paramsFetchRequest.ParamsEntryrepeated

条件参数,key=val,eg key:category_id=?,vlaue=11

+ + + + + +

FetchRequest.ParamsEntry

+

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
keystring

valuestring

+ + + + + +

IdentRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
idint64

唯一ID

identitystring

唯一码

+ + + + + +

SearchRequest

+

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
keywordstring

关键词

+ + + + + +

StatusReply

+

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
datastring

数据

timeseqint64

响应时间序列

+ + + + + +

VersionRequest

+

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
versionint64

时序版本号

+ + + + + + + + + + + + + +
+

payment.proto

Top +
+

+ + +

CallbackRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
idint64

唯一ID

identitystring

唯一码

callback_statusbool

支付回调状态

callback_msgstring

支付回调结果

+ + + + + +

ChargeRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
amountint64

充值金额 单位为分

remarkstring

备注

pay_channelint32

支付模型:WECHAT,ALIPAY

pay_typestring

支付类型 JSAPI:微信浏览器内支付 APP:app支付 MWEB:H5支付 NATIVE:Native支付,pc端生成二维码供用户扫码支付,QUICK_MSECURITY_PAY:app支付 QUICK_WAP_WAY:手机网站支付 FAST_INSTANT_TRADE_PAY:pc网站支付

descstring

支付描述

open_idstring

微信用户的OpenID

+ + + + + +

OrderRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
order_nostring

订单号

pay_channelint32

支付模型:WECHAT,ALIPAY,BALANCE

pay_typestring

支付类型 JSAPI:微信浏览器内支付 APP:app支付 MINI:小程序 NATIVE:Native支付,pc端生成二维码供用户扫码支付,QUICK_MSECURITY_PAY:app支付 QUICK_WAP_WAY:手机网站支付 FAST_INSTANT_TRADE_PAY:pc网站支付

passwordstring

支付密码

argsstring

相关参数

descstring

支付描述

open_idstring

微信用户的OpenID

+ + + + + +

PaymentItem

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
order_nostring

订单号

trade_nostring

第三方交易流水号

typeint32

类型:1充值;2支付电商订单

pay_channelint32

支付模型:WECHAT,ALIPAY,BALANCE

pay_typestring

支付类型 JSAPI:微信浏览器内支付 APP:app支付 MINI:小程序 NATIVE:Native支付,pc端生成二维码供用户扫码支付,QUICK_MSECURITY_PAY:app支付 QUICK_WAP_WAY:手机网站支付 FAST_INSTANT_TRADE_PAY:pc网站支付

amountint64

充值金额 单位为分

argsstring

相关参数

statusint32

支付状态

+ + + + + +

PaymentReply

+

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
codeint64

resultPaymentReply.ResultEntryrepeated

预支付返回

+ + + + + +

PaymentReply.ResultEntry

+

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
keystring

valuestring

+ + + + + +

WayItem

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
identstring

支付通道标识

titlestring

支付通道标题

introstring

支付通道说明

argsstring

支付通道相关参数

+ + + + + +

WayReply

+

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
wayWayItemrepeated

支付通道列表

+ + + + + +

WayRequest

+

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
platformstring

平台

+ + + + + + + + + + + +

Payment

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method NameRequest TypeResponse TypeDescription
HelloEmptyPaymentReply

WayWayRequestWayReply

获取平台支持的支付网关

GetIdentRequestPaymentItem

获取支付的详情

ByOrderOrderRequestPaymentReply

支付-电商订单

ByChargeChargeRequestPaymentReply

支付-充值

CallbackCallbackRequestStatusReply

回调更新支付的结果和状态

+ + + + +
+

wallet.proto

Top +
+

+ + +

AddBankCardRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
wallet_identitystring

钱包唯一标识

card_nostring

银行卡号

card_ownerstring

持卡人姓名

id_cardstring

持卡人身份证

phonestring

银行预留的手机号

+ + + + + +

ApplyCashRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
channelint32

提现的平台 1、微信 2、支付宝 3、银行卡

amountint64

提现金额 单位为分

remarkstring

备注

+ + + + + +

BankCardInfo

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
idint64

bank_numberstring

银行卡号

bank_namestring

银行名

card_ownerstring

持卡人姓名

id_cardstring

持卡人身份证号

phonestring

银行预留的手机号

bind_idstring

绑定银行卡返回的绑定id

bank_typestring

银行卡类型 DC为储蓄卡,CC为信用卡

bankstring

银行卡所属行

createdstring

添加日期

+ + + + + +

BindPaymentIDRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
pay_typeint32

支付类型:1:微信支付,2:支付宝

auth_codestring

微信授权码

+ + + + + +

CodeReply

+

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
codeint32

状态码

+ + + + + +

FinanceEmpty

+

+ + + + + +

GetBankCardReply

+

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
dataBankCardInforepeated

+ + + + + +

GetWalletReply

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
passport_identitystring

用户唯一标识

wallet_identitystring

钱包唯一标识

balanceint64

余额

withdrawal_balanceint64

可提现余额

statusint32

状态 -1禁用,1:正常

alipay_idstring

支付宝ID

alipay_namestring

支付宝账户名

wxpay_idstring

微信ID

wxpay_namestring

微信支付账户名

totalGetWalletReply.TotalEntryrepeated

统计数据输出

createdstring

创建时间

+ + + + + +

GetWalletReply.TotalEntry

+

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
keystring

valueint64

+ + + + + +

GetWalletRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
is_total_today_inbool

是否统计今日收入

is_total_today_outbool

是否统计今日支出

is_total_month_inbool

是否统计本月收入

is_total_month_outbool

是否统计本月支出

is_total_all_inbool

是否统计全部收入

is_total_all_outbool

是否统计全部支出

+ + + + + +

RefundReply

+

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
balanceint64

钱包剩余余额,单位:分

transactionTransaction

交易记录

+ + + + + +

RefundRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
user_identificationstring

用户唯一标识

amountint64

退款金额,单位:分

feeint64

手续费, 单位:分

remarkstring

交易备注

+ + + + + +

RmBankCardRequest

+

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
identitystring

银行卡Identity

+ + + + + +

SetPayPasswordRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
passport_identitystring

用户唯一标识

passwordstring

支付密码

+ + + + + +

Transaction

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
trans_typeint32

收支类型:-1支出,1:收入

trade_typeint32

交易类型:1:充值,2:提现,3:消费,4:退款,5:收益

in_trade_nostring

内部流水号

out_trade_nostring

外部流水号,eg:微信、支付宝、银行等

moneyint64

交易金额,单位:分

feeint64

手续费,单位:分

pay_channelint32

支付模型:WECHAT,ALIPAY,BALANCE

pay_typestring

支付类型 JSAPI:微信浏览器内支付 APP:app支付 MINI:小程序 NATIVE:Native支付,pc端生成二维码供用户扫码支付,QUICK_MSECURITY_PAY:app支付 QUICK_WAP_WAY:手机网站支付 FAST_INSTANT_TRADE_PAY:pc网站支付

createdstring

创建时间

remarkstring

备注信息

+ + + + + +

TransactionsReply

+

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
totalint64

总记录数

recordsTransactionrepeated

数据

+ + + + + +

TransactionsRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
trans_typeint64

收支类型:-1支出,1:收入

trade_typeint64

交易类型:1:充值,2:提现,3:消费,4:退款,5:收益

startstring

账单起始日期

endstring

账单截止日期

pageint64

分页

page_sizeint64

单页容量

+ + + + + + + + + + + +

Basic

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method NameRequest TypeResponse TypeDescription
GetWalletGetWalletRequestGetWalletReply

获取钱包信息

SetPayPasswordSetPayPasswordRequestCodeReply

设置支付密码

BindPaymentIdBindPaymentIDRequestCodeReply

绑定微信或支付宝账户

TransactionsTransactionsRequestTransactionsReply

查询交易记录

AddBankCardAddBankCardRequestCodeReply

添加银行卡

GetBankCardFinanceEmptyGetBankCardReply

获取用户银行卡列表

RmBankCardRmBankCardRequestCodeReply

删除银行卡

ApplyCashApplyCashRequestCodeReply

申请提现

+ + + + +
+

wechat.proto

Top +
+

+ + +

CallBackReply

+

+ + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
codestring

错误码,SUCCESS为清算机构接收成功,FAIL错误码为失败。

messagestring

返回信息

+ + + + + +

WxCallBackRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
idstring

create_timestring

resource_typestring

event_typestring

summarystring

resourceWxCallBackResource

SignInfoWxCallBackSignInfo

+ + + + + +

WxCallBackResource

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
original_typestring

algorithmstring

ciphertextstring

associated_datastring

noncestring

+ + + + + +

WxCallBackSignInfo

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
transaction_idstring

act_codestring

hall_codestring

hall_belong_mch_idint64

card_idstring

codestring

activity_idstring

+ + + + + +

WxpayAppPreOrderReply

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
prepay_idstring

预支付ID,两小时有效

app_idstring

微信app_id

mch_idstring

商户号,用以调起支付

+ + + + + +

WxpayAppPreOrderRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
user_identificationstring

用户唯一标识

amountint64

充值金额,单位:分

descriptionstring

商品描述

notify_urlstring

支付回调URL,公网域名须为HTTPS

+ + + + + +

WxpayJSAPIPreOrderReply

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
prepay_idstring

预支付ID,两小时有效

app_idstring

微信app_id

timestampstring

时间戳

nonce_strstring

随机字符串

sign_typestring

签名方式

signstring

签名串

+ + + + + +

WxpayJSAPIPreOrderRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
user_identificationstring

用户唯一标识

amountint64

充值金额,单位:分

auth_codestring

微信授权码

descriptionstring

商品描述

notify_urlstring

支付回调URL,公网域名须为HTTPS

orderNostring

订单唯一码

+ + + + + +

WxpayNativePreOrderReply

+

+ + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
code_urlstring

二维码URL

+ + + + + +

WxpayNativePreOrderRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
user_identificationstring

用户唯一标识

amountint64

充值金额,单位:分

descriptionstring

商品描述

notify_urlstring

支付回调URL,公网域名须为HTTPS

+ + + + + +

WxpayTransferReply

+

+ + + + + +

WxpayTransferRequest

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FieldTypeLabelDescription
user_identificationstring

用户唯一标识

amountint64

提现金额,单位:分

feeint64

提现手续费,单位:分

descriptionstring

商品描述

transfer_namestring

提现人真实姓名

+ + + + + + + + + + + +

Wechat

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Method NameRequest TypeResponse TypeDescription
JsapiPreOrderWxpayJSAPIPreOrderRequestWxpayJSAPIPreOrderReply

微信JSAPI下单

AppPreOrderWxpayAppPreOrderRequestWxpayAppPreOrderReply

微信APP支付下单

NativePreOrderWxpayNativePreOrderRequestWxpayNativePreOrderReply

微信native二维码支付下单

TransferWxpayTransferRequestWxpayTransferReply

微信转账到零钱

WxCallbackWxCallBackRequestCallBackReply

微信支付回调

+ + + + +

Scalar Value Types

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
.proto TypeNotesC++JavaPythonGoC#PHPRuby
doubledoubledoublefloatfloat64doublefloatFloat
floatfloatfloatfloatfloat32floatfloatFloat
int32Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.int32intintint32intintegerBignum or Fixnum (as required)
int64Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.int64longint/longint64longinteger/stringBignum
uint32Uses variable-length encoding.uint32intint/longuint32uintintegerBignum or Fixnum (as required)
uint64Uses variable-length encoding.uint64longint/longuint64ulonginteger/stringBignum or Fixnum (as required)
sint32Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.int32intintint32intintegerBignum or Fixnum (as required)
sint64Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.int64longint/longint64longinteger/stringBignum
fixed32Always four bytes. More efficient than uint32 if values are often greater than 2^28.uint32intintuint32uintintegerBignum or Fixnum (as required)
fixed64Always eight bytes. More efficient than uint64 if values are often greater than 2^56.uint64longint/longuint64ulonginteger/stringBignum
sfixed32Always four bytes.int32intintint32intintegerBignum or Fixnum (as required)
sfixed64Always eight bytes.int64longint/longint64longinteger/stringBignum
boolboolbooleanbooleanboolboolbooleanTrueClass/FalseClass
stringA string must always contain UTF-8 encoded or 7-bit ASCII text.stringStringstr/unicodestringstringstringString (UTF-8)
bytesMay contain any arbitrary sequence of bytes.stringByteStringstr[]byteByteStringstringString (ASCII-8BIT)
+ + + diff --git a/golnag/wallet/alipay.pb.go b/golnag/wallet/alipay.pb.go new file mode 100644 index 0000000..7850225 --- /dev/null +++ b/golnag/wallet/alipay.pb.go @@ -0,0 +1,586 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.9 +// protoc (unknown) +// source: alipay.proto + +package wallet + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type AlipayTradeWapPayRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserIdentification string `protobuf:"bytes,1,opt,name=user_identification,json=userIdentification,proto3" json:"user_identification,omitempty"` //用户唯一标识 + Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` //充值金额,单位:分 + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` //商品描述 + NotifyUrl string `protobuf:"bytes,4,opt,name=notify_url,json=notifyUrl,proto3" json:"notify_url,omitempty"` //支付回调URL,公网域名须为HTTPS + QuitUrl string `protobuf:"bytes,5,opt,name=quit_url,json=quitUrl,proto3" json:"quit_url,omitempty"` //退出支付时用户返回的URL + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AlipayTradeWapPayRequest) Reset() { + *x = AlipayTradeWapPayRequest{} + mi := &file_alipay_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AlipayTradeWapPayRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AlipayTradeWapPayRequest) ProtoMessage() {} + +func (x *AlipayTradeWapPayRequest) ProtoReflect() protoreflect.Message { + mi := &file_alipay_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AlipayTradeWapPayRequest.ProtoReflect.Descriptor instead. +func (*AlipayTradeWapPayRequest) Descriptor() ([]byte, []int) { + return file_alipay_proto_rawDescGZIP(), []int{0} +} + +func (x *AlipayTradeWapPayRequest) GetUserIdentification() string { + if x != nil { + return x.UserIdentification + } + return "" +} + +func (x *AlipayTradeWapPayRequest) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *AlipayTradeWapPayRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *AlipayTradeWapPayRequest) GetNotifyUrl() string { + if x != nil { + return x.NotifyUrl + } + return "" +} + +func (x *AlipayTradeWapPayRequest) GetQuitUrl() string { + if x != nil { + return x.QuitUrl + } + return "" +} + +type AlipayTradeWapPayReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + PayUrl string `protobuf:"bytes,1,opt,name=pay_url,json=payUrl,proto3" json:"pay_url,omitempty"` //支付链接 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AlipayTradeWapPayReply) Reset() { + *x = AlipayTradeWapPayReply{} + mi := &file_alipay_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AlipayTradeWapPayReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AlipayTradeWapPayReply) ProtoMessage() {} + +func (x *AlipayTradeWapPayReply) ProtoReflect() protoreflect.Message { + mi := &file_alipay_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AlipayTradeWapPayReply.ProtoReflect.Descriptor instead. +func (*AlipayTradeWapPayReply) Descriptor() ([]byte, []int) { + return file_alipay_proto_rawDescGZIP(), []int{1} +} + +func (x *AlipayTradeWapPayReply) GetPayUrl() string { + if x != nil { + return x.PayUrl + } + return "" +} + +type AlipayTradePagePayRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserIdentification string `protobuf:"bytes,1,opt,name=user_identification,json=userIdentification,proto3" json:"user_identification,omitempty"` //用户唯一标识 + Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` //充值金额,单位:分 + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` //商品描述 + NotifyUrl string `protobuf:"bytes,4,opt,name=notify_url,json=notifyUrl,proto3" json:"notify_url,omitempty"` //支付回调URL,公网域名须为HTTPS + ReturnUrl string `protobuf:"bytes,5,opt,name=return_url,json=returnUrl,proto3" json:"return_url,omitempty"` //支付成功时返回的URL + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AlipayTradePagePayRequest) Reset() { + *x = AlipayTradePagePayRequest{} + mi := &file_alipay_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AlipayTradePagePayRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AlipayTradePagePayRequest) ProtoMessage() {} + +func (x *AlipayTradePagePayRequest) ProtoReflect() protoreflect.Message { + mi := &file_alipay_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AlipayTradePagePayRequest.ProtoReflect.Descriptor instead. +func (*AlipayTradePagePayRequest) Descriptor() ([]byte, []int) { + return file_alipay_proto_rawDescGZIP(), []int{2} +} + +func (x *AlipayTradePagePayRequest) GetUserIdentification() string { + if x != nil { + return x.UserIdentification + } + return "" +} + +func (x *AlipayTradePagePayRequest) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *AlipayTradePagePayRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *AlipayTradePagePayRequest) GetNotifyUrl() string { + if x != nil { + return x.NotifyUrl + } + return "" +} + +func (x *AlipayTradePagePayRequest) GetReturnUrl() string { + if x != nil { + return x.ReturnUrl + } + return "" +} + +type AlipayTradePagePayReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + PayUrl string `protobuf:"bytes,1,opt,name=pay_url,json=payUrl,proto3" json:"pay_url,omitempty"` //支付链接 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AlipayTradePagePayReply) Reset() { + *x = AlipayTradePagePayReply{} + mi := &file_alipay_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AlipayTradePagePayReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AlipayTradePagePayReply) ProtoMessage() {} + +func (x *AlipayTradePagePayReply) ProtoReflect() protoreflect.Message { + mi := &file_alipay_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AlipayTradePagePayReply.ProtoReflect.Descriptor instead. +func (*AlipayTradePagePayReply) Descriptor() ([]byte, []int) { + return file_alipay_proto_rawDescGZIP(), []int{3} +} + +func (x *AlipayTradePagePayReply) GetPayUrl() string { + if x != nil { + return x.PayUrl + } + return "" +} + +type AlipayTradeAppPayRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserIdentification string `protobuf:"bytes,1,opt,name=user_identification,json=userIdentification,proto3" json:"user_identification,omitempty"` //用户唯一标识 + Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` //充值金额,单位:分 + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` //商品描述 + NotifyUrl string `protobuf:"bytes,4,opt,name=notify_url,json=notifyUrl,proto3" json:"notify_url,omitempty"` //支付回调URL,公网域名须为HTTPS + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AlipayTradeAppPayRequest) Reset() { + *x = AlipayTradeAppPayRequest{} + mi := &file_alipay_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AlipayTradeAppPayRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AlipayTradeAppPayRequest) ProtoMessage() {} + +func (x *AlipayTradeAppPayRequest) ProtoReflect() protoreflect.Message { + mi := &file_alipay_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AlipayTradeAppPayRequest.ProtoReflect.Descriptor instead. +func (*AlipayTradeAppPayRequest) Descriptor() ([]byte, []int) { + return file_alipay_proto_rawDescGZIP(), []int{4} +} + +func (x *AlipayTradeAppPayRequest) GetUserIdentification() string { + if x != nil { + return x.UserIdentification + } + return "" +} + +func (x *AlipayTradeAppPayRequest) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *AlipayTradeAppPayRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *AlipayTradeAppPayRequest) GetNotifyUrl() string { + if x != nil { + return x.NotifyUrl + } + return "" +} + +type AlipayTradeAppPayReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + PayParam string `protobuf:"bytes,1,opt,name=pay_param,json=payParam,proto3" json:"pay_param,omitempty"` //调起支付的参数 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AlipayTradeAppPayReply) Reset() { + *x = AlipayTradeAppPayReply{} + mi := &file_alipay_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AlipayTradeAppPayReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AlipayTradeAppPayReply) ProtoMessage() {} + +func (x *AlipayTradeAppPayReply) ProtoReflect() protoreflect.Message { + mi := &file_alipay_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AlipayTradeAppPayReply.ProtoReflect.Descriptor instead. +func (*AlipayTradeAppPayReply) Descriptor() ([]byte, []int) { + return file_alipay_proto_rawDescGZIP(), []int{5} +} + +func (x *AlipayTradeAppPayReply) GetPayParam() string { + if x != nil { + return x.PayParam + } + return "" +} + +type AlipayUniTransferRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserIdentification string `protobuf:"bytes,1,opt,name=user_identification,json=userIdentification,proto3" json:"user_identification,omitempty"` //用户唯一标识 + Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` //提现金额,单位:分 + Fee int64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"` //提现手续费,单位:分 + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` //商品描述 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AlipayUniTransferRequest) Reset() { + *x = AlipayUniTransferRequest{} + mi := &file_alipay_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AlipayUniTransferRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AlipayUniTransferRequest) ProtoMessage() {} + +func (x *AlipayUniTransferRequest) ProtoReflect() protoreflect.Message { + mi := &file_alipay_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AlipayUniTransferRequest.ProtoReflect.Descriptor instead. +func (*AlipayUniTransferRequest) Descriptor() ([]byte, []int) { + return file_alipay_proto_rawDescGZIP(), []int{6} +} + +func (x *AlipayUniTransferRequest) GetUserIdentification() string { + if x != nil { + return x.UserIdentification + } + return "" +} + +func (x *AlipayUniTransferRequest) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *AlipayUniTransferRequest) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +func (x *AlipayUniTransferRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +type AlipayUniTransferReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AlipayUniTransferReply) Reset() { + *x = AlipayUniTransferReply{} + mi := &file_alipay_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AlipayUniTransferReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AlipayUniTransferReply) ProtoMessage() {} + +func (x *AlipayUniTransferReply) ProtoReflect() protoreflect.Message { + mi := &file_alipay_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AlipayUniTransferReply.ProtoReflect.Descriptor instead. +func (*AlipayUniTransferReply) Descriptor() ([]byte, []int) { + return file_alipay_proto_rawDescGZIP(), []int{7} +} + +var File_alipay_proto protoreflect.FileDescriptor + +const file_alipay_proto_rawDesc = "" + + "\n" + + "\falipay.proto\x12\x06wallet\"\xbf\x01\n" + + "\x18AlipayTradeWapPayRequest\x12/\n" + + "\x13user_identification\x18\x01 \x01(\tR\x12userIdentification\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x03R\x06amount\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\x12\x1d\n" + + "\n" + + "notify_url\x18\x04 \x01(\tR\tnotifyUrl\x12\x19\n" + + "\bquit_url\x18\x05 \x01(\tR\aquitUrl\"1\n" + + "\x16AlipayTradeWapPayReply\x12\x17\n" + + "\apay_url\x18\x01 \x01(\tR\x06payUrl\"\xc4\x01\n" + + "\x19AlipayTradePagePayRequest\x12/\n" + + "\x13user_identification\x18\x01 \x01(\tR\x12userIdentification\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x03R\x06amount\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\x12\x1d\n" + + "\n" + + "notify_url\x18\x04 \x01(\tR\tnotifyUrl\x12\x1d\n" + + "\n" + + "return_url\x18\x05 \x01(\tR\treturnUrl\"2\n" + + "\x17AlipayTradePagePayReply\x12\x17\n" + + "\apay_url\x18\x01 \x01(\tR\x06payUrl\"\xa4\x01\n" + + "\x18AlipayTradeAppPayRequest\x12/\n" + + "\x13user_identification\x18\x01 \x01(\tR\x12userIdentification\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x03R\x06amount\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\x12\x1d\n" + + "\n" + + "notify_url\x18\x04 \x01(\tR\tnotifyUrl\"5\n" + + "\x16AlipayTradeAppPayReply\x12\x1b\n" + + "\tpay_param\x18\x01 \x01(\tR\bpayParam\"\x97\x01\n" + + "\x18AlipayUniTransferRequest\x12/\n" + + "\x13user_identification\x18\x01 \x01(\tR\x12userIdentification\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x03R\x06amount\x12\x10\n" + + "\x03fee\x18\x03 \x01(\x03R\x03fee\x12 \n" + + "\vdescription\x18\x04 \x01(\tR\vdescription\"\x18\n" + + "\x16AlipayUniTransferReply2\xc5\x02\n" + + "\x06Alipay\x12L\n" + + "\x06WapPay\x12 .wallet.AlipayTradeWapPayRequest\x1a\x1e.wallet.AlipayTradeWapPayReply\"\x00\x12O\n" + + "\aPagePay\x12!.wallet.AlipayTradePagePayRequest\x1a\x1f.wallet.AlipayTradePagePayReply\"\x00\x12L\n" + + "\x06AppPay\x12 .wallet.AlipayTradeAppPayRequest\x1a\x1e.wallet.AlipayTradeAppPayReply\"\x00\x12N\n" + + "\bTransfer\x12 .wallet.AlipayUniTransferRequest\x1a\x1e.wallet.AlipayUniTransferReply\"\x00B\n" + + "Z\b.;walletb\x06proto3" + +var ( + file_alipay_proto_rawDescOnce sync.Once + file_alipay_proto_rawDescData []byte +) + +func file_alipay_proto_rawDescGZIP() []byte { + file_alipay_proto_rawDescOnce.Do(func() { + file_alipay_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_alipay_proto_rawDesc), len(file_alipay_proto_rawDesc))) + }) + return file_alipay_proto_rawDescData +} + +var file_alipay_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_alipay_proto_goTypes = []any{ + (*AlipayTradeWapPayRequest)(nil), // 0: wallet.AlipayTradeWapPayRequest + (*AlipayTradeWapPayReply)(nil), // 1: wallet.AlipayTradeWapPayReply + (*AlipayTradePagePayRequest)(nil), // 2: wallet.AlipayTradePagePayRequest + (*AlipayTradePagePayReply)(nil), // 3: wallet.AlipayTradePagePayReply + (*AlipayTradeAppPayRequest)(nil), // 4: wallet.AlipayTradeAppPayRequest + (*AlipayTradeAppPayReply)(nil), // 5: wallet.AlipayTradeAppPayReply + (*AlipayUniTransferRequest)(nil), // 6: wallet.AlipayUniTransferRequest + (*AlipayUniTransferReply)(nil), // 7: wallet.AlipayUniTransferReply +} +var file_alipay_proto_depIdxs = []int32{ + 0, // 0: wallet.Alipay.WapPay:input_type -> wallet.AlipayTradeWapPayRequest + 2, // 1: wallet.Alipay.PagePay:input_type -> wallet.AlipayTradePagePayRequest + 4, // 2: wallet.Alipay.AppPay:input_type -> wallet.AlipayTradeAppPayRequest + 6, // 3: wallet.Alipay.Transfer:input_type -> wallet.AlipayUniTransferRequest + 1, // 4: wallet.Alipay.WapPay:output_type -> wallet.AlipayTradeWapPayReply + 3, // 5: wallet.Alipay.PagePay:output_type -> wallet.AlipayTradePagePayReply + 5, // 6: wallet.Alipay.AppPay:output_type -> wallet.AlipayTradeAppPayReply + 7, // 7: wallet.Alipay.Transfer:output_type -> wallet.AlipayUniTransferReply + 4, // [4:8] is the sub-list for method output_type + 0, // [0:4] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_alipay_proto_init() } +func file_alipay_proto_init() { + if File_alipay_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_alipay_proto_rawDesc), len(file_alipay_proto_rawDesc)), + NumEnums: 0, + NumMessages: 8, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_alipay_proto_goTypes, + DependencyIndexes: file_alipay_proto_depIdxs, + MessageInfos: file_alipay_proto_msgTypes, + }.Build() + File_alipay_proto = out.File + file_alipay_proto_goTypes = nil + file_alipay_proto_depIdxs = nil +} diff --git a/golnag/wallet/alipay_grpc.pb.go b/golnag/wallet/alipay_grpc.pb.go new file mode 100644 index 0000000..e8c7538 --- /dev/null +++ b/golnag/wallet/alipay_grpc.pb.go @@ -0,0 +1,243 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: alipay.proto + +package wallet + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Alipay_WapPay_FullMethodName = "/wallet.Alipay/WapPay" + Alipay_PagePay_FullMethodName = "/wallet.Alipay/PagePay" + Alipay_AppPay_FullMethodName = "/wallet.Alipay/AppPay" + Alipay_Transfer_FullMethodName = "/wallet.Alipay/Transfer" +) + +// AlipayClient is the client API for Alipay service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type AlipayClient interface { + //支付宝wap支付 + WapPay(ctx context.Context, in *AlipayTradeWapPayRequest, opts ...grpc.CallOption) (*AlipayTradeWapPayReply, error) + //支付宝电脑网站支付 + PagePay(ctx context.Context, in *AlipayTradePagePayRequest, opts ...grpc.CallOption) (*AlipayTradePagePayReply, error) + //支付宝APP支付 + AppPay(ctx context.Context, in *AlipayTradeAppPayRequest, opts ...grpc.CallOption) (*AlipayTradeAppPayReply, error) + //支付宝转账到个人支付宝账户 + Transfer(ctx context.Context, in *AlipayUniTransferRequest, opts ...grpc.CallOption) (*AlipayUniTransferReply, error) +} + +type alipayClient struct { + cc grpc.ClientConnInterface +} + +func NewAlipayClient(cc grpc.ClientConnInterface) AlipayClient { + return &alipayClient{cc} +} + +func (c *alipayClient) WapPay(ctx context.Context, in *AlipayTradeWapPayRequest, opts ...grpc.CallOption) (*AlipayTradeWapPayReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AlipayTradeWapPayReply) + err := c.cc.Invoke(ctx, Alipay_WapPay_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *alipayClient) PagePay(ctx context.Context, in *AlipayTradePagePayRequest, opts ...grpc.CallOption) (*AlipayTradePagePayReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AlipayTradePagePayReply) + err := c.cc.Invoke(ctx, Alipay_PagePay_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *alipayClient) AppPay(ctx context.Context, in *AlipayTradeAppPayRequest, opts ...grpc.CallOption) (*AlipayTradeAppPayReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AlipayTradeAppPayReply) + err := c.cc.Invoke(ctx, Alipay_AppPay_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *alipayClient) Transfer(ctx context.Context, in *AlipayUniTransferRequest, opts ...grpc.CallOption) (*AlipayUniTransferReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(AlipayUniTransferReply) + err := c.cc.Invoke(ctx, Alipay_Transfer_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// AlipayServer is the server API for Alipay service. +// All implementations must embed UnimplementedAlipayServer +// for forward compatibility. +type AlipayServer interface { + //支付宝wap支付 + WapPay(context.Context, *AlipayTradeWapPayRequest) (*AlipayTradeWapPayReply, error) + //支付宝电脑网站支付 + PagePay(context.Context, *AlipayTradePagePayRequest) (*AlipayTradePagePayReply, error) + //支付宝APP支付 + AppPay(context.Context, *AlipayTradeAppPayRequest) (*AlipayTradeAppPayReply, error) + //支付宝转账到个人支付宝账户 + Transfer(context.Context, *AlipayUniTransferRequest) (*AlipayUniTransferReply, error) + mustEmbedUnimplementedAlipayServer() +} + +// UnimplementedAlipayServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedAlipayServer struct{} + +func (UnimplementedAlipayServer) WapPay(context.Context, *AlipayTradeWapPayRequest) (*AlipayTradeWapPayReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method WapPay not implemented") +} +func (UnimplementedAlipayServer) PagePay(context.Context, *AlipayTradePagePayRequest) (*AlipayTradePagePayReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method PagePay not implemented") +} +func (UnimplementedAlipayServer) AppPay(context.Context, *AlipayTradeAppPayRequest) (*AlipayTradeAppPayReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method AppPay not implemented") +} +func (UnimplementedAlipayServer) Transfer(context.Context, *AlipayUniTransferRequest) (*AlipayUniTransferReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method Transfer not implemented") +} +func (UnimplementedAlipayServer) mustEmbedUnimplementedAlipayServer() {} +func (UnimplementedAlipayServer) testEmbeddedByValue() {} + +// UnsafeAlipayServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to AlipayServer will +// result in compilation errors. +type UnsafeAlipayServer interface { + mustEmbedUnimplementedAlipayServer() +} + +func RegisterAlipayServer(s grpc.ServiceRegistrar, srv AlipayServer) { + // If the following call pancis, it indicates UnimplementedAlipayServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Alipay_ServiceDesc, srv) +} + +func _Alipay_WapPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AlipayTradeWapPayRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AlipayServer).WapPay(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Alipay_WapPay_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AlipayServer).WapPay(ctx, req.(*AlipayTradeWapPayRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Alipay_PagePay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AlipayTradePagePayRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AlipayServer).PagePay(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Alipay_PagePay_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AlipayServer).PagePay(ctx, req.(*AlipayTradePagePayRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Alipay_AppPay_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AlipayTradeAppPayRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AlipayServer).AppPay(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Alipay_AppPay_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AlipayServer).AppPay(ctx, req.(*AlipayTradeAppPayRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Alipay_Transfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AlipayUniTransferRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AlipayServer).Transfer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Alipay_Transfer_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AlipayServer).Transfer(ctx, req.(*AlipayUniTransferRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Alipay_ServiceDesc is the grpc.ServiceDesc for Alipay service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Alipay_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "wallet.Alipay", + HandlerType: (*AlipayServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "WapPay", + Handler: _Alipay_WapPay_Handler, + }, + { + MethodName: "PagePay", + Handler: _Alipay_PagePay_Handler, + }, + { + MethodName: "AppPay", + Handler: _Alipay_AppPay_Handler, + }, + { + MethodName: "Transfer", + Handler: _Alipay_Transfer_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "alipay.proto", +} diff --git a/golnag/wallet/blocks.pb.go b/golnag/wallet/blocks.pb.go new file mode 100644 index 0000000..5cb00df --- /dev/null +++ b/golnag/wallet/blocks.pb.go @@ -0,0 +1,390 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.9 +// protoc (unknown) +// source: blocks.proto + +package wallet + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type FetchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PageNo int64 `protobuf:"varint,1,opt,name=page_no,json=pageNo,proto3" json:"page_no,omitempty"` // 页数 + PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // 每页记录数 + Params map[string]string `protobuf:"bytes,3,rep,name=params,proto3" json:"params,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` // 条件参数,key=val,eg key:category_id=?,vlaue=11 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FetchRequest) Reset() { + *x = FetchRequest{} + mi := &file_blocks_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FetchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchRequest) ProtoMessage() {} + +func (x *FetchRequest) ProtoReflect() protoreflect.Message { + mi := &file_blocks_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchRequest.ProtoReflect.Descriptor instead. +func (*FetchRequest) Descriptor() ([]byte, []int) { + return file_blocks_proto_rawDescGZIP(), []int{0} +} + +func (x *FetchRequest) GetPageNo() int64 { + if x != nil { + return x.PageNo + } + return 0 +} + +func (x *FetchRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +func (x *FetchRequest) GetParams() map[string]string { + if x != nil { + return x.Params + } + return nil +} + +type IdentRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 唯一ID + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一码 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *IdentRequest) Reset() { + *x = IdentRequest{} + mi := &file_blocks_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *IdentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*IdentRequest) ProtoMessage() {} + +func (x *IdentRequest) ProtoReflect() protoreflect.Message { + mi := &file_blocks_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use IdentRequest.ProtoReflect.Descriptor instead. +func (*IdentRequest) Descriptor() ([]byte, []int) { + return file_blocks_proto_rawDescGZIP(), []int{1} +} + +func (x *IdentRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *IdentRequest) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +type VersionRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"` // 时序版本号 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *VersionRequest) Reset() { + *x = VersionRequest{} + mi := &file_blocks_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *VersionRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*VersionRequest) ProtoMessage() {} + +func (x *VersionRequest) ProtoReflect() protoreflect.Message { + mi := &file_blocks_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead. +func (*VersionRequest) Descriptor() ([]byte, []int) { + return file_blocks_proto_rawDescGZIP(), []int{2} +} + +func (x *VersionRequest) GetVersion() int64 { + if x != nil { + return x.Version + } + return 0 +} + +type SearchRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Keyword string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"` //关键词 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SearchRequest) Reset() { + *x = SearchRequest{} + mi := &file_blocks_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SearchRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SearchRequest) ProtoMessage() {} + +func (x *SearchRequest) ProtoReflect() protoreflect.Message { + mi := &file_blocks_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead. +func (*SearchRequest) Descriptor() ([]byte, []int) { + return file_blocks_proto_rawDescGZIP(), []int{3} +} + +func (x *SearchRequest) GetKeyword() string { + if x != nil { + return x.Keyword + } + return "" +} + +type StatusReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` // 数据 + Timeseq int64 `protobuf:"varint,2,opt,name=timeseq,proto3" json:"timeseq,omitempty"` // 响应时间序列 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *StatusReply) Reset() { + *x = StatusReply{} + mi := &file_blocks_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *StatusReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StatusReply) ProtoMessage() {} + +func (x *StatusReply) ProtoReflect() protoreflect.Message { + mi := &file_blocks_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StatusReply.ProtoReflect.Descriptor instead. +func (*StatusReply) Descriptor() ([]byte, []int) { + return file_blocks_proto_rawDescGZIP(), []int{4} +} + +func (x *StatusReply) GetData() string { + if x != nil { + return x.Data + } + return "" +} + +func (x *StatusReply) GetTimeseq() int64 { + if x != nil { + return x.Timeseq + } + return 0 +} + +type Empty struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Empty) Reset() { + *x = Empty{} + mi := &file_blocks_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Empty) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Empty) ProtoMessage() {} + +func (x *Empty) ProtoReflect() protoreflect.Message { + mi := &file_blocks_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Empty.ProtoReflect.Descriptor instead. +func (*Empty) Descriptor() ([]byte, []int) { + return file_blocks_proto_rawDescGZIP(), []int{5} +} + +var File_blocks_proto protoreflect.FileDescriptor + +const file_blocks_proto_rawDesc = "" + + "\n" + + "\fblocks.proto\x12\x06wallet\"\xb9\x01\n" + + "\fFetchRequest\x12\x17\n" + + "\apage_no\x18\x01 \x01(\x03R\x06pageNo\x12\x1b\n" + + "\tpage_size\x18\x02 \x01(\x03R\bpageSize\x128\n" + + "\x06params\x18\x03 \x03(\v2 .wallet.FetchRequest.ParamsEntryR\x06params\x1a9\n" + + "\vParamsEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x01\":\n" + + "\fIdentRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + + "\bidentity\x18\x02 \x01(\tR\bidentity\"*\n" + + "\x0eVersionRequest\x12\x18\n" + + "\aversion\x18\x01 \x01(\x03R\aversion\")\n" + + "\rSearchRequest\x12\x18\n" + + "\akeyword\x18\x01 \x01(\tR\akeyword\";\n" + + "\vStatusReply\x12\x12\n" + + "\x04data\x18\x01 \x01(\tR\x04data\x12\x18\n" + + "\atimeseq\x18\x02 \x01(\x03R\atimeseq\"\a\n" + + "\x05EmptyB\n" + + "Z\b.;walletb\x06proto3" + +var ( + file_blocks_proto_rawDescOnce sync.Once + file_blocks_proto_rawDescData []byte +) + +func file_blocks_proto_rawDescGZIP() []byte { + file_blocks_proto_rawDescOnce.Do(func() { + file_blocks_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc))) + }) + return file_blocks_proto_rawDescData +} + +var file_blocks_proto_msgTypes = make([]protoimpl.MessageInfo, 7) +var file_blocks_proto_goTypes = []any{ + (*FetchRequest)(nil), // 0: wallet.FetchRequest + (*IdentRequest)(nil), // 1: wallet.IdentRequest + (*VersionRequest)(nil), // 2: wallet.VersionRequest + (*SearchRequest)(nil), // 3: wallet.SearchRequest + (*StatusReply)(nil), // 4: wallet.StatusReply + (*Empty)(nil), // 5: wallet.Empty + nil, // 6: wallet.FetchRequest.ParamsEntry +} +var file_blocks_proto_depIdxs = []int32{ + 6, // 0: wallet.FetchRequest.params:type_name -> wallet.FetchRequest.ParamsEntry + 1, // [1:1] is the sub-list for method output_type + 1, // [1:1] is the sub-list for method input_type + 1, // [1:1] is the sub-list for extension type_name + 1, // [1:1] is the sub-list for extension extendee + 0, // [0:1] is the sub-list for field type_name +} + +func init() { file_blocks_proto_init() } +func file_blocks_proto_init() { + if File_blocks_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_blocks_proto_rawDesc), len(file_blocks_proto_rawDesc)), + NumEnums: 0, + NumMessages: 7, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_blocks_proto_goTypes, + DependencyIndexes: file_blocks_proto_depIdxs, + MessageInfos: file_blocks_proto_msgTypes, + }.Build() + File_blocks_proto = out.File + file_blocks_proto_goTypes = nil + file_blocks_proto_depIdxs = nil +} diff --git a/golnag/wallet/payment.pb.go b/golnag/wallet/payment.pb.go new file mode 100644 index 0000000..530a2d6 --- /dev/null +++ b/golnag/wallet/payment.pb.go @@ -0,0 +1,710 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.9 +// protoc (unknown) +// source: payment.proto + +package wallet + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type WayRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Platform string `protobuf:"bytes,1,opt,name=platform,proto3" json:"platform,omitempty"` //平台 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WayRequest) Reset() { + *x = WayRequest{} + mi := &file_payment_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WayRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WayRequest) ProtoMessage() {} + +func (x *WayRequest) ProtoReflect() protoreflect.Message { + mi := &file_payment_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WayRequest.ProtoReflect.Descriptor instead. +func (*WayRequest) Descriptor() ([]byte, []int) { + return file_payment_proto_rawDescGZIP(), []int{0} +} + +func (x *WayRequest) GetPlatform() string { + if x != nil { + return x.Platform + } + return "" +} + +type WayReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Way []*WayItem `protobuf:"bytes,1,rep,name=way,proto3" json:"way,omitempty"` //支付通道列表 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WayReply) Reset() { + *x = WayReply{} + mi := &file_payment_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WayReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WayReply) ProtoMessage() {} + +func (x *WayReply) ProtoReflect() protoreflect.Message { + mi := &file_payment_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WayReply.ProtoReflect.Descriptor instead. +func (*WayReply) Descriptor() ([]byte, []int) { + return file_payment_proto_rawDescGZIP(), []int{1} +} + +func (x *WayReply) GetWay() []*WayItem { + if x != nil { + return x.Way + } + return nil +} + +type WayItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + Ident string `protobuf:"bytes,1,opt,name=ident,proto3" json:"ident,omitempty"` //支付通道标识 + Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` //支付通道标题 + Intro string `protobuf:"bytes,3,opt,name=intro,proto3" json:"intro,omitempty"` //支付通道说明 + Args string `protobuf:"bytes,4,opt,name=args,proto3" json:"args,omitempty"` //支付通道相关参数 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WayItem) Reset() { + *x = WayItem{} + mi := &file_payment_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WayItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WayItem) ProtoMessage() {} + +func (x *WayItem) ProtoReflect() protoreflect.Message { + mi := &file_payment_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WayItem.ProtoReflect.Descriptor instead. +func (*WayItem) Descriptor() ([]byte, []int) { + return file_payment_proto_rawDescGZIP(), []int{2} +} + +func (x *WayItem) GetIdent() string { + if x != nil { + return x.Ident + } + return "" +} + +func (x *WayItem) GetTitle() string { + if x != nil { + return x.Title + } + return "" +} + +func (x *WayItem) GetIntro() string { + if x != nil { + return x.Intro + } + return "" +} + +func (x *WayItem) GetArgs() string { + if x != nil { + return x.Args + } + return "" +} + +type PaymentItem struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrderNo string `protobuf:"bytes,1,opt,name=order_no,json=orderNo,proto3" json:"order_no,omitempty"` // 订单号 + TradeNo string `protobuf:"bytes,2,opt,name=trade_no,json=tradeNo,proto3" json:"trade_no,omitempty"` // 第三方交易流水号 + Type int32 `protobuf:"varint,3,opt,name=type,proto3" json:"type,omitempty"` // 类型:1充值;2支付电商订单 + PayChannel int32 `protobuf:"varint,4,opt,name=pay_channel,json=payChannel,proto3" json:"pay_channel,omitempty"` // 支付模型:WECHAT,ALIPAY,BALANCE + PayType string `protobuf:"bytes,5,opt,name=pay_type,json=payType,proto3" json:"pay_type,omitempty"` // 支付类型 JSAPI:微信浏览器内支付 APP:app支付 MINI:小程序 NATIVE:Native支付,pc端生成二维码供用户扫码支付,QUICK_MSECURITY_PAY:app支付 QUICK_WAP_WAY:手机网站支付 FAST_INSTANT_TRADE_PAY:pc网站支付 + Amount int64 `protobuf:"varint,6,opt,name=amount,proto3" json:"amount,omitempty"` //充值金额 单位为分 + Args string `protobuf:"bytes,7,opt,name=args,proto3" json:"args,omitempty"` // 相关参数 + Status int32 `protobuf:"varint,8,opt,name=status,proto3" json:"status,omitempty"` // 支付状态 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PaymentItem) Reset() { + *x = PaymentItem{} + mi := &file_payment_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PaymentItem) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaymentItem) ProtoMessage() {} + +func (x *PaymentItem) ProtoReflect() protoreflect.Message { + mi := &file_payment_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PaymentItem.ProtoReflect.Descriptor instead. +func (*PaymentItem) Descriptor() ([]byte, []int) { + return file_payment_proto_rawDescGZIP(), []int{3} +} + +func (x *PaymentItem) GetOrderNo() string { + if x != nil { + return x.OrderNo + } + return "" +} + +func (x *PaymentItem) GetTradeNo() string { + if x != nil { + return x.TradeNo + } + return "" +} + +func (x *PaymentItem) GetType() int32 { + if x != nil { + return x.Type + } + return 0 +} + +func (x *PaymentItem) GetPayChannel() int32 { + if x != nil { + return x.PayChannel + } + return 0 +} + +func (x *PaymentItem) GetPayType() string { + if x != nil { + return x.PayType + } + return "" +} + +func (x *PaymentItem) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *PaymentItem) GetArgs() string { + if x != nil { + return x.Args + } + return "" +} + +func (x *PaymentItem) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +type ChargeRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` //充值金额 单位为分 + Remark string `protobuf:"bytes,2,opt,name=remark,proto3" json:"remark,omitempty"` //备注 + PayChannel int32 `protobuf:"varint,3,opt,name=pay_channel,json=payChannel,proto3" json:"pay_channel,omitempty"` //支付模型:WECHAT,ALIPAY + PayType string `protobuf:"bytes,4,opt,name=pay_type,json=payType,proto3" json:"pay_type,omitempty"` //支付类型 JSAPI:微信浏览器内支付 APP:app支付 MWEB:H5支付 NATIVE:Native支付,pc端生成二维码供用户扫码支付,QUICK_MSECURITY_PAY:app支付 QUICK_WAP_WAY:手机网站支付 FAST_INSTANT_TRADE_PAY:pc网站支付 + Desc string `protobuf:"bytes,5,opt,name=desc,proto3" json:"desc,omitempty"` //支付描述 + OpenId string `protobuf:"bytes,6,opt,name=open_id,json=openId,proto3" json:"open_id,omitempty"` //微信用户的OpenID + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ChargeRequest) Reset() { + *x = ChargeRequest{} + mi := &file_payment_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ChargeRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChargeRequest) ProtoMessage() {} + +func (x *ChargeRequest) ProtoReflect() protoreflect.Message { + mi := &file_payment_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ChargeRequest.ProtoReflect.Descriptor instead. +func (*ChargeRequest) Descriptor() ([]byte, []int) { + return file_payment_proto_rawDescGZIP(), []int{4} +} + +func (x *ChargeRequest) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *ChargeRequest) GetRemark() string { + if x != nil { + return x.Remark + } + return "" +} + +func (x *ChargeRequest) GetPayChannel() int32 { + if x != nil { + return x.PayChannel + } + return 0 +} + +func (x *ChargeRequest) GetPayType() string { + if x != nil { + return x.PayType + } + return "" +} + +func (x *ChargeRequest) GetDesc() string { + if x != nil { + return x.Desc + } + return "" +} + +func (x *ChargeRequest) GetOpenId() string { + if x != nil { + return x.OpenId + } + return "" +} + +type OrderRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + OrderNo string `protobuf:"bytes,1,opt,name=order_no,json=orderNo,proto3" json:"order_no,omitempty"` //订单号 + PayChannel int32 `protobuf:"varint,2,opt,name=pay_channel,json=payChannel,proto3" json:"pay_channel,omitempty"` //支付模型:WECHAT,ALIPAY,BALANCE + PayType string `protobuf:"bytes,3,opt,name=pay_type,json=payType,proto3" json:"pay_type,omitempty"` //支付类型 JSAPI:微信浏览器内支付 APP:app支付 MINI:小程序 NATIVE:Native支付,pc端生成二维码供用户扫码支付,QUICK_MSECURITY_PAY:app支付 QUICK_WAP_WAY:手机网站支付 FAST_INSTANT_TRADE_PAY:pc网站支付 + Password string `protobuf:"bytes,4,opt,name=password,proto3" json:"password,omitempty"` //支付密码 + Args string `protobuf:"bytes,5,opt,name=args,proto3" json:"args,omitempty"` //相关参数 + Desc string `protobuf:"bytes,6,opt,name=desc,proto3" json:"desc,omitempty"` //支付描述 + OpenId string `protobuf:"bytes,7,opt,name=open_id,json=openId,proto3" json:"open_id,omitempty"` //微信用户的OpenID + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *OrderRequest) Reset() { + *x = OrderRequest{} + mi := &file_payment_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *OrderRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OrderRequest) ProtoMessage() {} + +func (x *OrderRequest) ProtoReflect() protoreflect.Message { + mi := &file_payment_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OrderRequest.ProtoReflect.Descriptor instead. +func (*OrderRequest) Descriptor() ([]byte, []int) { + return file_payment_proto_rawDescGZIP(), []int{5} +} + +func (x *OrderRequest) GetOrderNo() string { + if x != nil { + return x.OrderNo + } + return "" +} + +func (x *OrderRequest) GetPayChannel() int32 { + if x != nil { + return x.PayChannel + } + return 0 +} + +func (x *OrderRequest) GetPayType() string { + if x != nil { + return x.PayType + } + return "" +} + +func (x *OrderRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +func (x *OrderRequest) GetArgs() string { + if x != nil { + return x.Args + } + return "" +} + +func (x *OrderRequest) GetDesc() string { + if x != nil { + return x.Desc + } + return "" +} + +func (x *OrderRequest) GetOpenId() string { + if x != nil { + return x.OpenId + } + return "" +} + +type CallbackRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 唯一ID + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` // 唯一码 + CallbackStatus bool `protobuf:"varint,3,opt,name=callback_status,json=callbackStatus,proto3" json:"callback_status,omitempty"` // 支付回调状态 + CallbackMsg string `protobuf:"bytes,4,opt,name=callback_msg,json=callbackMsg,proto3" json:"callback_msg,omitempty"` // 支付回调结果 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CallbackRequest) Reset() { + *x = CallbackRequest{} + mi := &file_payment_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CallbackRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CallbackRequest) ProtoMessage() {} + +func (x *CallbackRequest) ProtoReflect() protoreflect.Message { + mi := &file_payment_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CallbackRequest.ProtoReflect.Descriptor instead. +func (*CallbackRequest) Descriptor() ([]byte, []int) { + return file_payment_proto_rawDescGZIP(), []int{6} +} + +func (x *CallbackRequest) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *CallbackRequest) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +func (x *CallbackRequest) GetCallbackStatus() bool { + if x != nil { + return x.CallbackStatus + } + return false +} + +func (x *CallbackRequest) GetCallbackMsg() string { + if x != nil { + return x.CallbackMsg + } + return "" +} + +type PaymentReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` + Result map[string]string `protobuf:"bytes,2,rep,name=result,proto3" json:"result,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"` //预支付返回 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *PaymentReply) Reset() { + *x = PaymentReply{} + mi := &file_payment_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *PaymentReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PaymentReply) ProtoMessage() {} + +func (x *PaymentReply) ProtoReflect() protoreflect.Message { + mi := &file_payment_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PaymentReply.ProtoReflect.Descriptor instead. +func (*PaymentReply) Descriptor() ([]byte, []int) { + return file_payment_proto_rawDescGZIP(), []int{7} +} + +func (x *PaymentReply) GetCode() int64 { + if x != nil { + return x.Code + } + return 0 +} + +func (x *PaymentReply) GetResult() map[string]string { + if x != nil { + return x.Result + } + return nil +} + +var File_payment_proto protoreflect.FileDescriptor + +const file_payment_proto_rawDesc = "" + + "\n" + + "\rpayment.proto\x12\x06wallet\x1a\fblocks.proto\"(\n" + + "\n" + + "WayRequest\x12\x1a\n" + + "\bplatform\x18\x01 \x01(\tR\bplatform\"-\n" + + "\bWayReply\x12!\n" + + "\x03way\x18\x01 \x03(\v2\x0f.wallet.WayItemR\x03way\"_\n" + + "\aWayItem\x12\x14\n" + + "\x05ident\x18\x01 \x01(\tR\x05ident\x12\x14\n" + + "\x05title\x18\x02 \x01(\tR\x05title\x12\x14\n" + + "\x05intro\x18\x03 \x01(\tR\x05intro\x12\x12\n" + + "\x04args\x18\x04 \x01(\tR\x04args\"\xd7\x01\n" + + "\vPaymentItem\x12\x19\n" + + "\border_no\x18\x01 \x01(\tR\aorderNo\x12\x19\n" + + "\btrade_no\x18\x02 \x01(\tR\atradeNo\x12\x12\n" + + "\x04type\x18\x03 \x01(\x05R\x04type\x12\x1f\n" + + "\vpay_channel\x18\x04 \x01(\x05R\n" + + "payChannel\x12\x19\n" + + "\bpay_type\x18\x05 \x01(\tR\apayType\x12\x16\n" + + "\x06amount\x18\x06 \x01(\x03R\x06amount\x12\x12\n" + + "\x04args\x18\a \x01(\tR\x04args\x12\x16\n" + + "\x06status\x18\b \x01(\x05R\x06status\"\xa8\x01\n" + + "\rChargeRequest\x12\x16\n" + + "\x06amount\x18\x01 \x01(\x03R\x06amount\x12\x16\n" + + "\x06remark\x18\x02 \x01(\tR\x06remark\x12\x1f\n" + + "\vpay_channel\x18\x03 \x01(\x05R\n" + + "payChannel\x12\x19\n" + + "\bpay_type\x18\x04 \x01(\tR\apayType\x12\x12\n" + + "\x04desc\x18\x05 \x01(\tR\x04desc\x12\x17\n" + + "\aopen_id\x18\x06 \x01(\tR\x06openId\"\xc2\x01\n" + + "\fOrderRequest\x12\x19\n" + + "\border_no\x18\x01 \x01(\tR\aorderNo\x12\x1f\n" + + "\vpay_channel\x18\x02 \x01(\x05R\n" + + "payChannel\x12\x19\n" + + "\bpay_type\x18\x03 \x01(\tR\apayType\x12\x1a\n" + + "\bpassword\x18\x04 \x01(\tR\bpassword\x12\x12\n" + + "\x04args\x18\x05 \x01(\tR\x04args\x12\x12\n" + + "\x04desc\x18\x06 \x01(\tR\x04desc\x12\x17\n" + + "\aopen_id\x18\a \x01(\tR\x06openId\"\x89\x01\n" + + "\x0fCallbackRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1a\n" + + "\bidentity\x18\x02 \x01(\tR\bidentity\x12'\n" + + "\x0fcallback_status\x18\x03 \x01(\bR\x0ecallbackStatus\x12!\n" + + "\fcallback_msg\x18\x04 \x01(\tR\vcallbackMsg\"\x97\x01\n" + + "\fPaymentReply\x12\x12\n" + + "\x04code\x18\x01 \x01(\x03R\x04code\x128\n" + + "\x06result\x18\x02 \x03(\v2 .wallet.PaymentReply.ResultEntryR\x06result\x1a9\n" + + "\vResultEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\tR\x05value:\x028\x012\xcc\x02\n" + + "\aPayment\x12.\n" + + "\x05Hello\x12\r.wallet.Empty\x1a\x14.wallet.PaymentReply\"\x00\x12-\n" + + "\x03Way\x12\x12.wallet.WayRequest\x1a\x10.wallet.WayReply\"\x00\x122\n" + + "\x03Get\x12\x14.wallet.IdentRequest\x1a\x13.wallet.PaymentItem\"\x00\x127\n" + + "\aByOrder\x12\x14.wallet.OrderRequest\x1a\x14.wallet.PaymentReply\"\x00\x129\n" + + "\bByCharge\x12\x15.wallet.ChargeRequest\x1a\x14.wallet.PaymentReply\"\x00\x12:\n" + + "\bCallback\x12\x17.wallet.CallbackRequest\x1a\x13.wallet.StatusReply\"\x00B\n" + + "Z\b.;walletb\x06proto3" + +var ( + file_payment_proto_rawDescOnce sync.Once + file_payment_proto_rawDescData []byte +) + +func file_payment_proto_rawDescGZIP() []byte { + file_payment_proto_rawDescOnce.Do(func() { + file_payment_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_payment_proto_rawDesc), len(file_payment_proto_rawDesc))) + }) + return file_payment_proto_rawDescData +} + +var file_payment_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_payment_proto_goTypes = []any{ + (*WayRequest)(nil), // 0: wallet.WayRequest + (*WayReply)(nil), // 1: wallet.WayReply + (*WayItem)(nil), // 2: wallet.WayItem + (*PaymentItem)(nil), // 3: wallet.PaymentItem + (*ChargeRequest)(nil), // 4: wallet.ChargeRequest + (*OrderRequest)(nil), // 5: wallet.OrderRequest + (*CallbackRequest)(nil), // 6: wallet.CallbackRequest + (*PaymentReply)(nil), // 7: wallet.PaymentReply + nil, // 8: wallet.PaymentReply.ResultEntry + (*Empty)(nil), // 9: wallet.Empty + (*IdentRequest)(nil), // 10: wallet.IdentRequest + (*StatusReply)(nil), // 11: wallet.StatusReply +} +var file_payment_proto_depIdxs = []int32{ + 2, // 0: wallet.WayReply.way:type_name -> wallet.WayItem + 8, // 1: wallet.PaymentReply.result:type_name -> wallet.PaymentReply.ResultEntry + 9, // 2: wallet.Payment.Hello:input_type -> wallet.Empty + 0, // 3: wallet.Payment.Way:input_type -> wallet.WayRequest + 10, // 4: wallet.Payment.Get:input_type -> wallet.IdentRequest + 5, // 5: wallet.Payment.ByOrder:input_type -> wallet.OrderRequest + 4, // 6: wallet.Payment.ByCharge:input_type -> wallet.ChargeRequest + 6, // 7: wallet.Payment.Callback:input_type -> wallet.CallbackRequest + 7, // 8: wallet.Payment.Hello:output_type -> wallet.PaymentReply + 1, // 9: wallet.Payment.Way:output_type -> wallet.WayReply + 3, // 10: wallet.Payment.Get:output_type -> wallet.PaymentItem + 7, // 11: wallet.Payment.ByOrder:output_type -> wallet.PaymentReply + 7, // 12: wallet.Payment.ByCharge:output_type -> wallet.PaymentReply + 11, // 13: wallet.Payment.Callback:output_type -> wallet.StatusReply + 8, // [8:14] is the sub-list for method output_type + 2, // [2:8] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_payment_proto_init() } +func file_payment_proto_init() { + if File_payment_proto != nil { + return + } + file_blocks_proto_init() + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_payment_proto_rawDesc), len(file_payment_proto_rawDesc)), + NumEnums: 0, + NumMessages: 9, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_payment_proto_goTypes, + DependencyIndexes: file_payment_proto_depIdxs, + MessageInfos: file_payment_proto_msgTypes, + }.Build() + File_payment_proto = out.File + file_payment_proto_goTypes = nil + file_payment_proto_depIdxs = nil +} diff --git a/golnag/wallet/payment_grpc.pb.go b/golnag/wallet/payment_grpc.pb.go new file mode 100644 index 0000000..932219b --- /dev/null +++ b/golnag/wallet/payment_grpc.pb.go @@ -0,0 +1,321 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: payment.proto + +package wallet + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Payment_Hello_FullMethodName = "/wallet.Payment/Hello" + Payment_Way_FullMethodName = "/wallet.Payment/Way" + Payment_Get_FullMethodName = "/wallet.Payment/Get" + Payment_ByOrder_FullMethodName = "/wallet.Payment/ByOrder" + Payment_ByCharge_FullMethodName = "/wallet.Payment/ByCharge" + Payment_Callback_FullMethodName = "/wallet.Payment/Callback" +) + +// PaymentClient is the client API for Payment service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type PaymentClient interface { + Hello(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PaymentReply, error) + //获取平台支持的支付网关 + Way(ctx context.Context, in *WayRequest, opts ...grpc.CallOption) (*WayReply, error) + //获取支付的详情 + Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*PaymentItem, error) + //支付-电商订单 + ByOrder(ctx context.Context, in *OrderRequest, opts ...grpc.CallOption) (*PaymentReply, error) + //支付-充值 + ByCharge(ctx context.Context, in *ChargeRequest, opts ...grpc.CallOption) (*PaymentReply, error) + //回调更新支付的结果和状态 + Callback(ctx context.Context, in *CallbackRequest, opts ...grpc.CallOption) (*StatusReply, error) +} + +type paymentClient struct { + cc grpc.ClientConnInterface +} + +func NewPaymentClient(cc grpc.ClientConnInterface) PaymentClient { + return &paymentClient{cc} +} + +func (c *paymentClient) Hello(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PaymentReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PaymentReply) + err := c.cc.Invoke(ctx, Payment_Hello_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *paymentClient) Way(ctx context.Context, in *WayRequest, opts ...grpc.CallOption) (*WayReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(WayReply) + err := c.cc.Invoke(ctx, Payment_Way_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *paymentClient) Get(ctx context.Context, in *IdentRequest, opts ...grpc.CallOption) (*PaymentItem, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PaymentItem) + err := c.cc.Invoke(ctx, Payment_Get_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *paymentClient) ByOrder(ctx context.Context, in *OrderRequest, opts ...grpc.CallOption) (*PaymentReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PaymentReply) + err := c.cc.Invoke(ctx, Payment_ByOrder_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *paymentClient) ByCharge(ctx context.Context, in *ChargeRequest, opts ...grpc.CallOption) (*PaymentReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(PaymentReply) + err := c.cc.Invoke(ctx, Payment_ByCharge_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *paymentClient) Callback(ctx context.Context, in *CallbackRequest, opts ...grpc.CallOption) (*StatusReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(StatusReply) + err := c.cc.Invoke(ctx, Payment_Callback_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// PaymentServer is the server API for Payment service. +// All implementations must embed UnimplementedPaymentServer +// for forward compatibility. +type PaymentServer interface { + Hello(context.Context, *Empty) (*PaymentReply, error) + //获取平台支持的支付网关 + Way(context.Context, *WayRequest) (*WayReply, error) + //获取支付的详情 + Get(context.Context, *IdentRequest) (*PaymentItem, error) + //支付-电商订单 + ByOrder(context.Context, *OrderRequest) (*PaymentReply, error) + //支付-充值 + ByCharge(context.Context, *ChargeRequest) (*PaymentReply, error) + //回调更新支付的结果和状态 + Callback(context.Context, *CallbackRequest) (*StatusReply, error) + mustEmbedUnimplementedPaymentServer() +} + +// UnimplementedPaymentServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedPaymentServer struct{} + +func (UnimplementedPaymentServer) Hello(context.Context, *Empty) (*PaymentReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method Hello not implemented") +} +func (UnimplementedPaymentServer) Way(context.Context, *WayRequest) (*WayReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method Way not implemented") +} +func (UnimplementedPaymentServer) Get(context.Context, *IdentRequest) (*PaymentItem, error) { + return nil, status.Errorf(codes.Unimplemented, "method Get not implemented") +} +func (UnimplementedPaymentServer) ByOrder(context.Context, *OrderRequest) (*PaymentReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method ByOrder not implemented") +} +func (UnimplementedPaymentServer) ByCharge(context.Context, *ChargeRequest) (*PaymentReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method ByCharge not implemented") +} +func (UnimplementedPaymentServer) Callback(context.Context, *CallbackRequest) (*StatusReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method Callback not implemented") +} +func (UnimplementedPaymentServer) mustEmbedUnimplementedPaymentServer() {} +func (UnimplementedPaymentServer) testEmbeddedByValue() {} + +// UnsafePaymentServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to PaymentServer will +// result in compilation errors. +type UnsafePaymentServer interface { + mustEmbedUnimplementedPaymentServer() +} + +func RegisterPaymentServer(s grpc.ServiceRegistrar, srv PaymentServer) { + // If the following call pancis, it indicates UnimplementedPaymentServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Payment_ServiceDesc, srv) +} + +func _Payment_Hello_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PaymentServer).Hello(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_Hello_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PaymentServer).Hello(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_Way_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WayRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PaymentServer).Way(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_Way_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PaymentServer).Way(ctx, req.(*WayRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(IdentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PaymentServer).Get(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_Get_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PaymentServer).Get(ctx, req.(*IdentRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_ByOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(OrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PaymentServer).ByOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_ByOrder_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PaymentServer).ByOrder(ctx, req.(*OrderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_ByCharge_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ChargeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PaymentServer).ByCharge(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_ByCharge_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PaymentServer).ByCharge(ctx, req.(*ChargeRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Payment_Callback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CallbackRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(PaymentServer).Callback(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Payment_Callback_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(PaymentServer).Callback(ctx, req.(*CallbackRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Payment_ServiceDesc is the grpc.ServiceDesc for Payment service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Payment_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "wallet.Payment", + HandlerType: (*PaymentServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Hello", + Handler: _Payment_Hello_Handler, + }, + { + MethodName: "Way", + Handler: _Payment_Way_Handler, + }, + { + MethodName: "Get", + Handler: _Payment_Get_Handler, + }, + { + MethodName: "ByOrder", + Handler: _Payment_ByOrder_Handler, + }, + { + MethodName: "ByCharge", + Handler: _Payment_ByCharge_Handler, + }, + { + MethodName: "Callback", + Handler: _Payment_Callback_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "payment.proto", +} diff --git a/golnag/wallet/wallet.pb.go b/golnag/wallet/wallet.pb.go new file mode 100644 index 0000000..229d8ee --- /dev/null +++ b/golnag/wallet/wallet.pb.go @@ -0,0 +1,1327 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.9 +// protoc (unknown) +// source: wallet.proto + +package wallet + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type GetWalletRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + IsTotalTodayIn bool `protobuf:"varint,1,opt,name=is_total_today_in,json=isTotalTodayIn,proto3" json:"is_total_today_in,omitempty"` // 是否统计今日收入 + IsTotalTodayOut bool `protobuf:"varint,2,opt,name=is_total_today_out,json=isTotalTodayOut,proto3" json:"is_total_today_out,omitempty"` // 是否统计今日支出 + IsTotalMonthIn bool `protobuf:"varint,3,opt,name=is_total_month_in,json=isTotalMonthIn,proto3" json:"is_total_month_in,omitempty"` // 是否统计本月收入 + IsTotalMonthOut bool `protobuf:"varint,4,opt,name=is_total_month_out,json=isTotalMonthOut,proto3" json:"is_total_month_out,omitempty"` // 是否统计本月支出 + IsTotalAllIn bool `protobuf:"varint,5,opt,name=is_total_all_in,json=isTotalAllIn,proto3" json:"is_total_all_in,omitempty"` // 是否统计全部收入 + IsTotalAllOut bool `protobuf:"varint,6,opt,name=is_total_all_out,json=isTotalAllOut,proto3" json:"is_total_all_out,omitempty"` // 是否统计全部支出 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetWalletRequest) Reset() { + *x = GetWalletRequest{} + mi := &file_wallet_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetWalletRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWalletRequest) ProtoMessage() {} + +func (x *GetWalletRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWalletRequest.ProtoReflect.Descriptor instead. +func (*GetWalletRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{0} +} + +func (x *GetWalletRequest) GetIsTotalTodayIn() bool { + if x != nil { + return x.IsTotalTodayIn + } + return false +} + +func (x *GetWalletRequest) GetIsTotalTodayOut() bool { + if x != nil { + return x.IsTotalTodayOut + } + return false +} + +func (x *GetWalletRequest) GetIsTotalMonthIn() bool { + if x != nil { + return x.IsTotalMonthIn + } + return false +} + +func (x *GetWalletRequest) GetIsTotalMonthOut() bool { + if x != nil { + return x.IsTotalMonthOut + } + return false +} + +func (x *GetWalletRequest) GetIsTotalAllIn() bool { + if x != nil { + return x.IsTotalAllIn + } + return false +} + +func (x *GetWalletRequest) GetIsTotalAllOut() bool { + if x != nil { + return x.IsTotalAllOut + } + return false +} + +type GetWalletReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + PassportIdentity string `protobuf:"bytes,1,opt,name=passport_identity,json=passportIdentity,proto3" json:"passport_identity,omitempty"` //用户唯一标识 + WalletIdentity string `protobuf:"bytes,2,opt,name=wallet_identity,json=walletIdentity,proto3" json:"wallet_identity,omitempty"` //钱包唯一标识 + Balance int64 `protobuf:"varint,3,opt,name=balance,proto3" json:"balance,omitempty"` //余额 + WithdrawalBalance int64 `protobuf:"varint,4,opt,name=withdrawal_balance,json=withdrawalBalance,proto3" json:"withdrawal_balance,omitempty"` //可提现余额 + Status int32 `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"` //状态 -1禁用,1:正常 + AlipayId string `protobuf:"bytes,6,opt,name=alipay_id,json=alipayId,proto3" json:"alipay_id,omitempty"` //支付宝ID + AlipayName string `protobuf:"bytes,7,opt,name=alipay_name,json=alipayName,proto3" json:"alipay_name,omitempty"` //支付宝账户名 + WxpayId string `protobuf:"bytes,8,opt,name=wxpay_id,json=wxpayId,proto3" json:"wxpay_id,omitempty"` //微信ID + WxpayName string `protobuf:"bytes,9,opt,name=wxpay_name,json=wxpayName,proto3" json:"wxpay_name,omitempty"` //微信支付账户名 + Total map[string]int64 `protobuf:"bytes,10,rep,name=total,proto3" json:"total,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"varint,2,opt,name=value"` //统计数据输出 + Created string `protobuf:"bytes,11,opt,name=created,proto3" json:"created,omitempty"` //创建时间 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetWalletReply) Reset() { + *x = GetWalletReply{} + mi := &file_wallet_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetWalletReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetWalletReply) ProtoMessage() {} + +func (x *GetWalletReply) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetWalletReply.ProtoReflect.Descriptor instead. +func (*GetWalletReply) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{1} +} + +func (x *GetWalletReply) GetPassportIdentity() string { + if x != nil { + return x.PassportIdentity + } + return "" +} + +func (x *GetWalletReply) GetWalletIdentity() string { + if x != nil { + return x.WalletIdentity + } + return "" +} + +func (x *GetWalletReply) GetBalance() int64 { + if x != nil { + return x.Balance + } + return 0 +} + +func (x *GetWalletReply) GetWithdrawalBalance() int64 { + if x != nil { + return x.WithdrawalBalance + } + return 0 +} + +func (x *GetWalletReply) GetStatus() int32 { + if x != nil { + return x.Status + } + return 0 +} + +func (x *GetWalletReply) GetAlipayId() string { + if x != nil { + return x.AlipayId + } + return "" +} + +func (x *GetWalletReply) GetAlipayName() string { + if x != nil { + return x.AlipayName + } + return "" +} + +func (x *GetWalletReply) GetWxpayId() string { + if x != nil { + return x.WxpayId + } + return "" +} + +func (x *GetWalletReply) GetWxpayName() string { + if x != nil { + return x.WxpayName + } + return "" +} + +func (x *GetWalletReply) GetTotal() map[string]int64 { + if x != nil { + return x.Total + } + return nil +} + +func (x *GetWalletReply) GetCreated() string { + if x != nil { + return x.Created + } + return "" +} + +type TransactionsRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + TransType int64 `protobuf:"varint,1,opt,name=trans_type,json=transType,proto3" json:"trans_type,omitempty"` //收支类型:-1支出,1:收入 + TradeType int64 `protobuf:"varint,2,opt,name=trade_type,json=tradeType,proto3" json:"trade_type,omitempty"` //交易类型:1:充值,2:提现,3:消费,4:退款,5:收益 + Start string `protobuf:"bytes,3,opt,name=start,proto3" json:"start,omitempty"` //账单起始日期 + End string `protobuf:"bytes,4,opt,name=end,proto3" json:"end,omitempty"` //账单截止日期 + Page int64 `protobuf:"varint,5,opt,name=page,proto3" json:"page,omitempty"` //分页 + PageSize int64 `protobuf:"varint,6,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` //单页容量 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionsRequest) Reset() { + *x = TransactionsRequest{} + mi := &file_wallet_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionsRequest) ProtoMessage() {} + +func (x *TransactionsRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionsRequest.ProtoReflect.Descriptor instead. +func (*TransactionsRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{2} +} + +func (x *TransactionsRequest) GetTransType() int64 { + if x != nil { + return x.TransType + } + return 0 +} + +func (x *TransactionsRequest) GetTradeType() int64 { + if x != nil { + return x.TradeType + } + return 0 +} + +func (x *TransactionsRequest) GetStart() string { + if x != nil { + return x.Start + } + return "" +} + +func (x *TransactionsRequest) GetEnd() string { + if x != nil { + return x.End + } + return "" +} + +func (x *TransactionsRequest) GetPage() int64 { + if x != nil { + return x.Page + } + return 0 +} + +func (x *TransactionsRequest) GetPageSize() int64 { + if x != nil { + return x.PageSize + } + return 0 +} + +type TransactionsReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Total int64 `protobuf:"varint,1,opt,name=total,proto3" json:"total,omitempty"` //总记录数 + Records []*Transaction `protobuf:"bytes,2,rep,name=records,proto3" json:"records,omitempty"` //数据 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *TransactionsReply) Reset() { + *x = TransactionsReply{} + mi := &file_wallet_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *TransactionsReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TransactionsReply) ProtoMessage() {} + +func (x *TransactionsReply) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TransactionsReply.ProtoReflect.Descriptor instead. +func (*TransactionsReply) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{3} +} + +func (x *TransactionsReply) GetTotal() int64 { + if x != nil { + return x.Total + } + return 0 +} + +func (x *TransactionsReply) GetRecords() []*Transaction { + if x != nil { + return x.Records + } + return nil +} + +type Transaction struct { + state protoimpl.MessageState `protogen:"open.v1"` + TransType int32 `protobuf:"varint,1,opt,name=trans_type,json=transType,proto3" json:"trans_type,omitempty"` //收支类型:-1支出,1:收入 + TradeType int32 `protobuf:"varint,2,opt,name=trade_type,json=tradeType,proto3" json:"trade_type,omitempty"` //交易类型:1:充值,2:提现,3:消费,4:退款,5:收益 + InTradeNo string `protobuf:"bytes,3,opt,name=in_trade_no,json=inTradeNo,proto3" json:"in_trade_no,omitempty"` //内部流水号 + OutTradeNo string `protobuf:"bytes,4,opt,name=out_trade_no,json=outTradeNo,proto3" json:"out_trade_no,omitempty"` //外部流水号,eg:微信、支付宝、银行等 + Money int64 `protobuf:"varint,5,opt,name=money,proto3" json:"money,omitempty"` //交易金额,单位:分 + Fee int64 `protobuf:"varint,6,opt,name=fee,proto3" json:"fee,omitempty"` //手续费,单位:分 + PayChannel int32 `protobuf:"varint,7,opt,name=pay_channel,json=payChannel,proto3" json:"pay_channel,omitempty"` //支付模型:WECHAT,ALIPAY,BALANCE + PayType string `protobuf:"bytes,8,opt,name=pay_type,json=payType,proto3" json:"pay_type,omitempty"` //支付类型 JSAPI:微信浏览器内支付 APP:app支付 MINI:小程序 NATIVE:Native支付,pc端生成二维码供用户扫码支付,QUICK_MSECURITY_PAY:app支付 QUICK_WAP_WAY:手机网站支付 FAST_INSTANT_TRADE_PAY:pc网站支付 + Created string `protobuf:"bytes,9,opt,name=created,proto3" json:"created,omitempty"` //创建时间 + Remark string `protobuf:"bytes,10,opt,name=remark,proto3" json:"remark,omitempty"` //备注信息 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *Transaction) Reset() { + *x = Transaction{} + mi := &file_wallet_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *Transaction) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Transaction) ProtoMessage() {} + +func (x *Transaction) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Transaction.ProtoReflect.Descriptor instead. +func (*Transaction) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{4} +} + +func (x *Transaction) GetTransType() int32 { + if x != nil { + return x.TransType + } + return 0 +} + +func (x *Transaction) GetTradeType() int32 { + if x != nil { + return x.TradeType + } + return 0 +} + +func (x *Transaction) GetInTradeNo() string { + if x != nil { + return x.InTradeNo + } + return "" +} + +func (x *Transaction) GetOutTradeNo() string { + if x != nil { + return x.OutTradeNo + } + return "" +} + +func (x *Transaction) GetMoney() int64 { + if x != nil { + return x.Money + } + return 0 +} + +func (x *Transaction) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +func (x *Transaction) GetPayChannel() int32 { + if x != nil { + return x.PayChannel + } + return 0 +} + +func (x *Transaction) GetPayType() string { + if x != nil { + return x.PayType + } + return "" +} + +func (x *Transaction) GetCreated() string { + if x != nil { + return x.Created + } + return "" +} + +func (x *Transaction) GetRemark() string { + if x != nil { + return x.Remark + } + return "" +} + +type SetPayPasswordRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PassportIdentity string `protobuf:"bytes,1,opt,name=passport_identity,json=passportIdentity,proto3" json:"passport_identity,omitempty"` //用户唯一标识 + Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` //支付密码 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *SetPayPasswordRequest) Reset() { + *x = SetPayPasswordRequest{} + mi := &file_wallet_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *SetPayPasswordRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetPayPasswordRequest) ProtoMessage() {} + +func (x *SetPayPasswordRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetPayPasswordRequest.ProtoReflect.Descriptor instead. +func (*SetPayPasswordRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{5} +} + +func (x *SetPayPasswordRequest) GetPassportIdentity() string { + if x != nil { + return x.PassportIdentity + } + return "" +} + +func (x *SetPayPasswordRequest) GetPassword() string { + if x != nil { + return x.Password + } + return "" +} + +type BindPaymentIDRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + PayType int32 `protobuf:"varint,1,opt,name=pay_type,json=payType,proto3" json:"pay_type,omitempty"` //支付类型:1:微信支付,2:支付宝 + AuthCode string `protobuf:"bytes,2,opt,name=auth_code,json=authCode,proto3" json:"auth_code,omitempty"` //微信授权码 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BindPaymentIDRequest) Reset() { + *x = BindPaymentIDRequest{} + mi := &file_wallet_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BindPaymentIDRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BindPaymentIDRequest) ProtoMessage() {} + +func (x *BindPaymentIDRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BindPaymentIDRequest.ProtoReflect.Descriptor instead. +func (*BindPaymentIDRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{6} +} + +func (x *BindPaymentIDRequest) GetPayType() int32 { + if x != nil { + return x.PayType + } + return 0 +} + +func (x *BindPaymentIDRequest) GetAuthCode() string { + if x != nil { + return x.AuthCode + } + return "" +} + +type RefundRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserIdentification string `protobuf:"bytes,1,opt,name=user_identification,json=userIdentification,proto3" json:"user_identification,omitempty"` //用户唯一标识 + Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` //退款金额,单位:分 + Fee int64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"` //手续费, 单位:分 + Remark string `protobuf:"bytes,4,opt,name=remark,proto3" json:"remark,omitempty"` //交易备注 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RefundRequest) Reset() { + *x = RefundRequest{} + mi := &file_wallet_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RefundRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefundRequest) ProtoMessage() {} + +func (x *RefundRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefundRequest.ProtoReflect.Descriptor instead. +func (*RefundRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{7} +} + +func (x *RefundRequest) GetUserIdentification() string { + if x != nil { + return x.UserIdentification + } + return "" +} + +func (x *RefundRequest) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *RefundRequest) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +func (x *RefundRequest) GetRemark() string { + if x != nil { + return x.Remark + } + return "" +} + +type RefundReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Balance int64 `protobuf:"varint,1,opt,name=balance,proto3" json:"balance,omitempty"` //钱包剩余余额,单位:分 + Transaction *Transaction `protobuf:"bytes,2,opt,name=transaction,proto3" json:"transaction,omitempty"` //交易记录 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RefundReply) Reset() { + *x = RefundReply{} + mi := &file_wallet_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RefundReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RefundReply) ProtoMessage() {} + +func (x *RefundReply) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RefundReply.ProtoReflect.Descriptor instead. +func (*RefundReply) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{8} +} + +func (x *RefundReply) GetBalance() int64 { + if x != nil { + return x.Balance + } + return 0 +} + +func (x *RefundReply) GetTransaction() *Transaction { + if x != nil { + return x.Transaction + } + return nil +} + +type AddBankCardRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + WalletIdentity string `protobuf:"bytes,1,opt,name=wallet_identity,json=walletIdentity,proto3" json:"wallet_identity,omitempty"` //钱包唯一标识 + CardNo string `protobuf:"bytes,2,opt,name=card_no,json=cardNo,proto3" json:"card_no,omitempty"` //银行卡号 + CardOwner string `protobuf:"bytes,3,opt,name=card_owner,json=cardOwner,proto3" json:"card_owner,omitempty"` //持卡人姓名 + IdCard string `protobuf:"bytes,4,opt,name=id_card,json=idCard,proto3" json:"id_card,omitempty"` //持卡人身份证 + Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone,omitempty"` //银行预留的手机号 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *AddBankCardRequest) Reset() { + *x = AddBankCardRequest{} + mi := &file_wallet_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *AddBankCardRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AddBankCardRequest) ProtoMessage() {} + +func (x *AddBankCardRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AddBankCardRequest.ProtoReflect.Descriptor instead. +func (*AddBankCardRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{9} +} + +func (x *AddBankCardRequest) GetWalletIdentity() string { + if x != nil { + return x.WalletIdentity + } + return "" +} + +func (x *AddBankCardRequest) GetCardNo() string { + if x != nil { + return x.CardNo + } + return "" +} + +func (x *AddBankCardRequest) GetCardOwner() string { + if x != nil { + return x.CardOwner + } + return "" +} + +func (x *AddBankCardRequest) GetIdCard() string { + if x != nil { + return x.IdCard + } + return "" +} + +func (x *AddBankCardRequest) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +type FinanceEmpty struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *FinanceEmpty) Reset() { + *x = FinanceEmpty{} + mi := &file_wallet_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *FinanceEmpty) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FinanceEmpty) ProtoMessage() {} + +func (x *FinanceEmpty) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FinanceEmpty.ProtoReflect.Descriptor instead. +func (*FinanceEmpty) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{10} +} + +type RmBankCardRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Identity string `protobuf:"bytes,2,opt,name=identity,proto3" json:"identity,omitempty"` //银行卡Identity + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *RmBankCardRequest) Reset() { + *x = RmBankCardRequest{} + mi := &file_wallet_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *RmBankCardRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*RmBankCardRequest) ProtoMessage() {} + +func (x *RmBankCardRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use RmBankCardRequest.ProtoReflect.Descriptor instead. +func (*RmBankCardRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{11} +} + +func (x *RmBankCardRequest) GetIdentity() string { + if x != nil { + return x.Identity + } + return "" +} + +type GetBankCardReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Data []*BankCardInfo `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *GetBankCardReply) Reset() { + *x = GetBankCardReply{} + mi := &file_wallet_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *GetBankCardReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetBankCardReply) ProtoMessage() {} + +func (x *GetBankCardReply) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[12] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use GetBankCardReply.ProtoReflect.Descriptor instead. +func (*GetBankCardReply) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{12} +} + +func (x *GetBankCardReply) GetData() []*BankCardInfo { + if x != nil { + return x.Data + } + return nil +} + +type BankCardInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + BankNumber string `protobuf:"bytes,2,opt,name=bank_number,json=bankNumber,proto3" json:"bank_number,omitempty"` //银行卡号 + BankName string `protobuf:"bytes,3,opt,name=bank_name,json=bankName,proto3" json:"bank_name,omitempty"` //银行名 + CardOwner string `protobuf:"bytes,4,opt,name=card_owner,json=cardOwner,proto3" json:"card_owner,omitempty"` //持卡人姓名 + IdCard string `protobuf:"bytes,5,opt,name=id_card,json=idCard,proto3" json:"id_card,omitempty"` //持卡人身份证号 + Phone string `protobuf:"bytes,6,opt,name=phone,proto3" json:"phone,omitempty"` //银行预留的手机号 + BindId string `protobuf:"bytes,7,opt,name=bind_id,json=bindId,proto3" json:"bind_id,omitempty"` //绑定银行卡返回的绑定id + BankType string `protobuf:"bytes,8,opt,name=bank_type,json=bankType,proto3" json:"bank_type,omitempty"` //银行卡类型 DC为储蓄卡,CC为信用卡 + Bank string `protobuf:"bytes,9,opt,name=bank,proto3" json:"bank,omitempty"` //银行卡所属行 + Created string `protobuf:"bytes,10,opt,name=created,proto3" json:"created,omitempty"` //添加日期 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *BankCardInfo) Reset() { + *x = BankCardInfo{} + mi := &file_wallet_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *BankCardInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*BankCardInfo) ProtoMessage() {} + +func (x *BankCardInfo) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[13] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use BankCardInfo.ProtoReflect.Descriptor instead. +func (*BankCardInfo) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{13} +} + +func (x *BankCardInfo) GetId() int64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *BankCardInfo) GetBankNumber() string { + if x != nil { + return x.BankNumber + } + return "" +} + +func (x *BankCardInfo) GetBankName() string { + if x != nil { + return x.BankName + } + return "" +} + +func (x *BankCardInfo) GetCardOwner() string { + if x != nil { + return x.CardOwner + } + return "" +} + +func (x *BankCardInfo) GetIdCard() string { + if x != nil { + return x.IdCard + } + return "" +} + +func (x *BankCardInfo) GetPhone() string { + if x != nil { + return x.Phone + } + return "" +} + +func (x *BankCardInfo) GetBindId() string { + if x != nil { + return x.BindId + } + return "" +} + +func (x *BankCardInfo) GetBankType() string { + if x != nil { + return x.BankType + } + return "" +} + +func (x *BankCardInfo) GetBank() string { + if x != nil { + return x.Bank + } + return "" +} + +func (x *BankCardInfo) GetCreated() string { + if x != nil { + return x.Created + } + return "" +} + +type ApplyCashRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Channel int32 `protobuf:"varint,1,opt,name=channel,proto3" json:"channel,omitempty"` //提现的平台 1、微信 2、支付宝 3、银行卡 + Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` //提现金额 单位为分 + Remark string `protobuf:"bytes,3,opt,name=remark,proto3" json:"remark,omitempty"` //备注 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *ApplyCashRequest) Reset() { + *x = ApplyCashRequest{} + mi := &file_wallet_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *ApplyCashRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ApplyCashRequest) ProtoMessage() {} + +func (x *ApplyCashRequest) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[14] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ApplyCashRequest.ProtoReflect.Descriptor instead. +func (*ApplyCashRequest) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{14} +} + +func (x *ApplyCashRequest) GetChannel() int32 { + if x != nil { + return x.Channel + } + return 0 +} + +func (x *ApplyCashRequest) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *ApplyCashRequest) GetRemark() string { + if x != nil { + return x.Remark + } + return "" +} + +type CodeReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` //状态码 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CodeReply) Reset() { + *x = CodeReply{} + mi := &file_wallet_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CodeReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CodeReply) ProtoMessage() {} + +func (x *CodeReply) ProtoReflect() protoreflect.Message { + mi := &file_wallet_proto_msgTypes[15] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CodeReply.ProtoReflect.Descriptor instead. +func (*CodeReply) Descriptor() ([]byte, []int) { + return file_wallet_proto_rawDescGZIP(), []int{15} +} + +func (x *CodeReply) GetCode() int32 { + if x != nil { + return x.Code + } + return 0 +} + +var File_wallet_proto protoreflect.FileDescriptor + +const file_wallet_proto_rawDesc = "" + + "\n" + + "\fwallet.proto\x12\x06wallet\"\x92\x02\n" + + "\x10GetWalletRequest\x12)\n" + + "\x11is_total_today_in\x18\x01 \x01(\bR\x0eisTotalTodayIn\x12+\n" + + "\x12is_total_today_out\x18\x02 \x01(\bR\x0fisTotalTodayOut\x12)\n" + + "\x11is_total_month_in\x18\x03 \x01(\bR\x0eisTotalMonthIn\x12+\n" + + "\x12is_total_month_out\x18\x04 \x01(\bR\x0fisTotalMonthOut\x12%\n" + + "\x0fis_total_all_in\x18\x05 \x01(\bR\fisTotalAllIn\x12'\n" + + "\x10is_total_all_out\x18\x06 \x01(\bR\risTotalAllOut\"\xcc\x03\n" + + "\x0eGetWalletReply\x12+\n" + + "\x11passport_identity\x18\x01 \x01(\tR\x10passportIdentity\x12'\n" + + "\x0fwallet_identity\x18\x02 \x01(\tR\x0ewalletIdentity\x12\x18\n" + + "\abalance\x18\x03 \x01(\x03R\abalance\x12-\n" + + "\x12withdrawal_balance\x18\x04 \x01(\x03R\x11withdrawalBalance\x12\x16\n" + + "\x06status\x18\x05 \x01(\x05R\x06status\x12\x1b\n" + + "\talipay_id\x18\x06 \x01(\tR\balipayId\x12\x1f\n" + + "\valipay_name\x18\a \x01(\tR\n" + + "alipayName\x12\x19\n" + + "\bwxpay_id\x18\b \x01(\tR\awxpayId\x12\x1d\n" + + "\n" + + "wxpay_name\x18\t \x01(\tR\twxpayName\x127\n" + + "\x05total\x18\n" + + " \x03(\v2!.wallet.GetWalletReply.TotalEntryR\x05total\x12\x18\n" + + "\acreated\x18\v \x01(\tR\acreated\x1a8\n" + + "\n" + + "TotalEntry\x12\x10\n" + + "\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" + + "\x05value\x18\x02 \x01(\x03R\x05value:\x028\x01\"\xac\x01\n" + + "\x13TransactionsRequest\x12\x1d\n" + + "\n" + + "trans_type\x18\x01 \x01(\x03R\ttransType\x12\x1d\n" + + "\n" + + "trade_type\x18\x02 \x01(\x03R\ttradeType\x12\x14\n" + + "\x05start\x18\x03 \x01(\tR\x05start\x12\x10\n" + + "\x03end\x18\x04 \x01(\tR\x03end\x12\x12\n" + + "\x04page\x18\x05 \x01(\x03R\x04page\x12\x1b\n" + + "\tpage_size\x18\x06 \x01(\x03R\bpageSize\"X\n" + + "\x11TransactionsReply\x12\x14\n" + + "\x05total\x18\x01 \x01(\x03R\x05total\x12-\n" + + "\arecords\x18\x02 \x03(\v2\x13.wallet.TransactionR\arecords\"\xa3\x02\n" + + "\vTransaction\x12\x1d\n" + + "\n" + + "trans_type\x18\x01 \x01(\x05R\ttransType\x12\x1d\n" + + "\n" + + "trade_type\x18\x02 \x01(\x05R\ttradeType\x12\x1e\n" + + "\vin_trade_no\x18\x03 \x01(\tR\tinTradeNo\x12 \n" + + "\fout_trade_no\x18\x04 \x01(\tR\n" + + "outTradeNo\x12\x14\n" + + "\x05money\x18\x05 \x01(\x03R\x05money\x12\x10\n" + + "\x03fee\x18\x06 \x01(\x03R\x03fee\x12\x1f\n" + + "\vpay_channel\x18\a \x01(\x05R\n" + + "payChannel\x12\x19\n" + + "\bpay_type\x18\b \x01(\tR\apayType\x12\x18\n" + + "\acreated\x18\t \x01(\tR\acreated\x12\x16\n" + + "\x06remark\x18\n" + + " \x01(\tR\x06remark\"`\n" + + "\x15SetPayPasswordRequest\x12+\n" + + "\x11passport_identity\x18\x01 \x01(\tR\x10passportIdentity\x12\x1a\n" + + "\bpassword\x18\x02 \x01(\tR\bpassword\"N\n" + + "\x14BindPaymentIDRequest\x12\x19\n" + + "\bpay_type\x18\x01 \x01(\x05R\apayType\x12\x1b\n" + + "\tauth_code\x18\x02 \x01(\tR\bauthCode\"\x82\x01\n" + + "\rRefundRequest\x12/\n" + + "\x13user_identification\x18\x01 \x01(\tR\x12userIdentification\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x03R\x06amount\x12\x10\n" + + "\x03fee\x18\x03 \x01(\x03R\x03fee\x12\x16\n" + + "\x06remark\x18\x04 \x01(\tR\x06remark\"^\n" + + "\vRefundReply\x12\x18\n" + + "\abalance\x18\x01 \x01(\x03R\abalance\x125\n" + + "\vtransaction\x18\x02 \x01(\v2\x13.wallet.TransactionR\vtransaction\"\xa4\x01\n" + + "\x12AddBankCardRequest\x12'\n" + + "\x0fwallet_identity\x18\x01 \x01(\tR\x0ewalletIdentity\x12\x17\n" + + "\acard_no\x18\x02 \x01(\tR\x06cardNo\x12\x1d\n" + + "\n" + + "card_owner\x18\x03 \x01(\tR\tcardOwner\x12\x17\n" + + "\aid_card\x18\x04 \x01(\tR\x06idCard\x12\x14\n" + + "\x05phone\x18\x05 \x01(\tR\x05phone\"\x0e\n" + + "\fFinanceEmpty\"/\n" + + "\x11RmBankCardRequest\x12\x1a\n" + + "\bidentity\x18\x02 \x01(\tR\bidentity\"<\n" + + "\x10GetBankCardReply\x12(\n" + + "\x04data\x18\x01 \x03(\v2\x14.wallet.BankCardInfoR\x04data\"\x8e\x02\n" + + "\fBankCardInfo\x12\x0e\n" + + "\x02id\x18\x01 \x01(\x03R\x02id\x12\x1f\n" + + "\vbank_number\x18\x02 \x01(\tR\n" + + "bankNumber\x12\x1b\n" + + "\tbank_name\x18\x03 \x01(\tR\bbankName\x12\x1d\n" + + "\n" + + "card_owner\x18\x04 \x01(\tR\tcardOwner\x12\x17\n" + + "\aid_card\x18\x05 \x01(\tR\x06idCard\x12\x14\n" + + "\x05phone\x18\x06 \x01(\tR\x05phone\x12\x17\n" + + "\abind_id\x18\a \x01(\tR\x06bindId\x12\x1b\n" + + "\tbank_type\x18\b \x01(\tR\bbankType\x12\x12\n" + + "\x04bank\x18\t \x01(\tR\x04bank\x12\x18\n" + + "\acreated\x18\n" + + " \x01(\tR\acreated\"\\\n" + + "\x10ApplyCashRequest\x12\x18\n" + + "\achannel\x18\x01 \x01(\x05R\achannel\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x03R\x06amount\x12\x16\n" + + "\x06remark\x18\x03 \x01(\tR\x06remark\"\x1f\n" + + "\tCodeReply\x12\x12\n" + + "\x04code\x18\x01 \x01(\x05R\x04code2\x97\x04\n" + + "\x05Basic\x12?\n" + + "\tGetWallet\x12\x18.wallet.GetWalletRequest\x1a\x16.wallet.GetWalletReply\"\x00\x12D\n" + + "\x0eSetPayPassword\x12\x1d.wallet.SetPayPasswordRequest\x1a\x11.wallet.CodeReply\"\x00\x12B\n" + + "\rBindPaymentId\x12\x1c.wallet.BindPaymentIDRequest\x1a\x11.wallet.CodeReply\"\x00\x12H\n" + + "\fTransactions\x12\x1b.wallet.TransactionsRequest\x1a\x19.wallet.TransactionsReply\"\x00\x12>\n" + + "\vAddBankCard\x12\x1a.wallet.AddBankCardRequest\x1a\x11.wallet.CodeReply\"\x00\x12?\n" + + "\vGetBankCard\x12\x14.wallet.FinanceEmpty\x1a\x18.wallet.GetBankCardReply\"\x00\x12<\n" + + "\n" + + "RmBankCard\x12\x19.wallet.RmBankCardRequest\x1a\x11.wallet.CodeReply\"\x00\x12:\n" + + "\tApplyCash\x12\x18.wallet.ApplyCashRequest\x1a\x11.wallet.CodeReply\"\x00B\n" + + "Z\b.;walletb\x06proto3" + +var ( + file_wallet_proto_rawDescOnce sync.Once + file_wallet_proto_rawDescData []byte +) + +func file_wallet_proto_rawDescGZIP() []byte { + file_wallet_proto_rawDescOnce.Do(func() { + file_wallet_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_wallet_proto_rawDesc), len(file_wallet_proto_rawDesc))) + }) + return file_wallet_proto_rawDescData +} + +var file_wallet_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_wallet_proto_goTypes = []any{ + (*GetWalletRequest)(nil), // 0: wallet.GetWalletRequest + (*GetWalletReply)(nil), // 1: wallet.GetWalletReply + (*TransactionsRequest)(nil), // 2: wallet.TransactionsRequest + (*TransactionsReply)(nil), // 3: wallet.TransactionsReply + (*Transaction)(nil), // 4: wallet.Transaction + (*SetPayPasswordRequest)(nil), // 5: wallet.SetPayPasswordRequest + (*BindPaymentIDRequest)(nil), // 6: wallet.BindPaymentIDRequest + (*RefundRequest)(nil), // 7: wallet.RefundRequest + (*RefundReply)(nil), // 8: wallet.RefundReply + (*AddBankCardRequest)(nil), // 9: wallet.AddBankCardRequest + (*FinanceEmpty)(nil), // 10: wallet.FinanceEmpty + (*RmBankCardRequest)(nil), // 11: wallet.RmBankCardRequest + (*GetBankCardReply)(nil), // 12: wallet.GetBankCardReply + (*BankCardInfo)(nil), // 13: wallet.BankCardInfo + (*ApplyCashRequest)(nil), // 14: wallet.ApplyCashRequest + (*CodeReply)(nil), // 15: wallet.CodeReply + nil, // 16: wallet.GetWalletReply.TotalEntry +} +var file_wallet_proto_depIdxs = []int32{ + 16, // 0: wallet.GetWalletReply.total:type_name -> wallet.GetWalletReply.TotalEntry + 4, // 1: wallet.TransactionsReply.records:type_name -> wallet.Transaction + 4, // 2: wallet.RefundReply.transaction:type_name -> wallet.Transaction + 13, // 3: wallet.GetBankCardReply.data:type_name -> wallet.BankCardInfo + 0, // 4: wallet.Basic.GetWallet:input_type -> wallet.GetWalletRequest + 5, // 5: wallet.Basic.SetPayPassword:input_type -> wallet.SetPayPasswordRequest + 6, // 6: wallet.Basic.BindPaymentId:input_type -> wallet.BindPaymentIDRequest + 2, // 7: wallet.Basic.Transactions:input_type -> wallet.TransactionsRequest + 9, // 8: wallet.Basic.AddBankCard:input_type -> wallet.AddBankCardRequest + 10, // 9: wallet.Basic.GetBankCard:input_type -> wallet.FinanceEmpty + 11, // 10: wallet.Basic.RmBankCard:input_type -> wallet.RmBankCardRequest + 14, // 11: wallet.Basic.ApplyCash:input_type -> wallet.ApplyCashRequest + 1, // 12: wallet.Basic.GetWallet:output_type -> wallet.GetWalletReply + 15, // 13: wallet.Basic.SetPayPassword:output_type -> wallet.CodeReply + 15, // 14: wallet.Basic.BindPaymentId:output_type -> wallet.CodeReply + 3, // 15: wallet.Basic.Transactions:output_type -> wallet.TransactionsReply + 15, // 16: wallet.Basic.AddBankCard:output_type -> wallet.CodeReply + 12, // 17: wallet.Basic.GetBankCard:output_type -> wallet.GetBankCardReply + 15, // 18: wallet.Basic.RmBankCard:output_type -> wallet.CodeReply + 15, // 19: wallet.Basic.ApplyCash:output_type -> wallet.CodeReply + 12, // [12:20] is the sub-list for method output_type + 4, // [4:12] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name +} + +func init() { file_wallet_proto_init() } +func file_wallet_proto_init() { + if File_wallet_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_wallet_proto_rawDesc), len(file_wallet_proto_rawDesc)), + NumEnums: 0, + NumMessages: 17, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_wallet_proto_goTypes, + DependencyIndexes: file_wallet_proto_depIdxs, + MessageInfos: file_wallet_proto_msgTypes, + }.Build() + File_wallet_proto = out.File + file_wallet_proto_goTypes = nil + file_wallet_proto_depIdxs = nil +} diff --git a/golnag/wallet/wallet_grpc.pb.go b/golnag/wallet/wallet_grpc.pb.go new file mode 100644 index 0000000..26802b7 --- /dev/null +++ b/golnag/wallet/wallet_grpc.pb.go @@ -0,0 +1,403 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: wallet.proto + +package wallet + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Basic_GetWallet_FullMethodName = "/wallet.Basic/GetWallet" + Basic_SetPayPassword_FullMethodName = "/wallet.Basic/SetPayPassword" + Basic_BindPaymentId_FullMethodName = "/wallet.Basic/BindPaymentId" + Basic_Transactions_FullMethodName = "/wallet.Basic/Transactions" + Basic_AddBankCard_FullMethodName = "/wallet.Basic/AddBankCard" + Basic_GetBankCard_FullMethodName = "/wallet.Basic/GetBankCard" + Basic_RmBankCard_FullMethodName = "/wallet.Basic/RmBankCard" + Basic_ApplyCash_FullMethodName = "/wallet.Basic/ApplyCash" +) + +// BasicClient is the client API for Basic service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type BasicClient interface { + //获取钱包信息 + GetWallet(ctx context.Context, in *GetWalletRequest, opts ...grpc.CallOption) (*GetWalletReply, error) + //设置支付密码 + SetPayPassword(ctx context.Context, in *SetPayPasswordRequest, opts ...grpc.CallOption) (*CodeReply, error) + //绑定微信或支付宝账户 + BindPaymentId(ctx context.Context, in *BindPaymentIDRequest, opts ...grpc.CallOption) (*CodeReply, error) + //查询交易记录 + Transactions(ctx context.Context, in *TransactionsRequest, opts ...grpc.CallOption) (*TransactionsReply, error) + //添加银行卡 + AddBankCard(ctx context.Context, in *AddBankCardRequest, opts ...grpc.CallOption) (*CodeReply, error) + //获取用户银行卡列表 + GetBankCard(ctx context.Context, in *FinanceEmpty, opts ...grpc.CallOption) (*GetBankCardReply, error) + //删除银行卡 + RmBankCard(ctx context.Context, in *RmBankCardRequest, opts ...grpc.CallOption) (*CodeReply, error) + //申请提现 + ApplyCash(ctx context.Context, in *ApplyCashRequest, opts ...grpc.CallOption) (*CodeReply, error) +} + +type basicClient struct { + cc grpc.ClientConnInterface +} + +func NewBasicClient(cc grpc.ClientConnInterface) BasicClient { + return &basicClient{cc} +} + +func (c *basicClient) GetWallet(ctx context.Context, in *GetWalletRequest, opts ...grpc.CallOption) (*GetWalletReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetWalletReply) + err := c.cc.Invoke(ctx, Basic_GetWallet_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *basicClient) SetPayPassword(ctx context.Context, in *SetPayPasswordRequest, opts ...grpc.CallOption) (*CodeReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CodeReply) + err := c.cc.Invoke(ctx, Basic_SetPayPassword_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *basicClient) BindPaymentId(ctx context.Context, in *BindPaymentIDRequest, opts ...grpc.CallOption) (*CodeReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CodeReply) + err := c.cc.Invoke(ctx, Basic_BindPaymentId_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *basicClient) Transactions(ctx context.Context, in *TransactionsRequest, opts ...grpc.CallOption) (*TransactionsReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(TransactionsReply) + err := c.cc.Invoke(ctx, Basic_Transactions_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *basicClient) AddBankCard(ctx context.Context, in *AddBankCardRequest, opts ...grpc.CallOption) (*CodeReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CodeReply) + err := c.cc.Invoke(ctx, Basic_AddBankCard_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *basicClient) GetBankCard(ctx context.Context, in *FinanceEmpty, opts ...grpc.CallOption) (*GetBankCardReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetBankCardReply) + err := c.cc.Invoke(ctx, Basic_GetBankCard_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *basicClient) RmBankCard(ctx context.Context, in *RmBankCardRequest, opts ...grpc.CallOption) (*CodeReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CodeReply) + err := c.cc.Invoke(ctx, Basic_RmBankCard_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *basicClient) ApplyCash(ctx context.Context, in *ApplyCashRequest, opts ...grpc.CallOption) (*CodeReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CodeReply) + err := c.cc.Invoke(ctx, Basic_ApplyCash_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// BasicServer is the server API for Basic service. +// All implementations must embed UnimplementedBasicServer +// for forward compatibility. +type BasicServer interface { + //获取钱包信息 + GetWallet(context.Context, *GetWalletRequest) (*GetWalletReply, error) + //设置支付密码 + SetPayPassword(context.Context, *SetPayPasswordRequest) (*CodeReply, error) + //绑定微信或支付宝账户 + BindPaymentId(context.Context, *BindPaymentIDRequest) (*CodeReply, error) + //查询交易记录 + Transactions(context.Context, *TransactionsRequest) (*TransactionsReply, error) + //添加银行卡 + AddBankCard(context.Context, *AddBankCardRequest) (*CodeReply, error) + //获取用户银行卡列表 + GetBankCard(context.Context, *FinanceEmpty) (*GetBankCardReply, error) + //删除银行卡 + RmBankCard(context.Context, *RmBankCardRequest) (*CodeReply, error) + //申请提现 + ApplyCash(context.Context, *ApplyCashRequest) (*CodeReply, error) + mustEmbedUnimplementedBasicServer() +} + +// UnimplementedBasicServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedBasicServer struct{} + +func (UnimplementedBasicServer) GetWallet(context.Context, *GetWalletRequest) (*GetWalletReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetWallet not implemented") +} +func (UnimplementedBasicServer) SetPayPassword(context.Context, *SetPayPasswordRequest) (*CodeReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetPayPassword not implemented") +} +func (UnimplementedBasicServer) BindPaymentId(context.Context, *BindPaymentIDRequest) (*CodeReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method BindPaymentId not implemented") +} +func (UnimplementedBasicServer) Transactions(context.Context, *TransactionsRequest) (*TransactionsReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method Transactions not implemented") +} +func (UnimplementedBasicServer) AddBankCard(context.Context, *AddBankCardRequest) (*CodeReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method AddBankCard not implemented") +} +func (UnimplementedBasicServer) GetBankCard(context.Context, *FinanceEmpty) (*GetBankCardReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetBankCard not implemented") +} +func (UnimplementedBasicServer) RmBankCard(context.Context, *RmBankCardRequest) (*CodeReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method RmBankCard not implemented") +} +func (UnimplementedBasicServer) ApplyCash(context.Context, *ApplyCashRequest) (*CodeReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method ApplyCash not implemented") +} +func (UnimplementedBasicServer) mustEmbedUnimplementedBasicServer() {} +func (UnimplementedBasicServer) testEmbeddedByValue() {} + +// UnsafeBasicServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to BasicServer will +// result in compilation errors. +type UnsafeBasicServer interface { + mustEmbedUnimplementedBasicServer() +} + +func RegisterBasicServer(s grpc.ServiceRegistrar, srv BasicServer) { + // If the following call pancis, it indicates UnimplementedBasicServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Basic_ServiceDesc, srv) +} + +func _Basic_GetWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetWalletRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BasicServer).GetWallet(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Basic_GetWallet_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BasicServer).GetWallet(ctx, req.(*GetWalletRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Basic_SetPayPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetPayPasswordRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BasicServer).SetPayPassword(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Basic_SetPayPassword_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BasicServer).SetPayPassword(ctx, req.(*SetPayPasswordRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Basic_BindPaymentId_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(BindPaymentIDRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BasicServer).BindPaymentId(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Basic_BindPaymentId_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BasicServer).BindPaymentId(ctx, req.(*BindPaymentIDRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Basic_Transactions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(TransactionsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BasicServer).Transactions(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Basic_Transactions_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BasicServer).Transactions(ctx, req.(*TransactionsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Basic_AddBankCard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AddBankCardRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BasicServer).AddBankCard(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Basic_AddBankCard_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BasicServer).AddBankCard(ctx, req.(*AddBankCardRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Basic_GetBankCard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FinanceEmpty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BasicServer).GetBankCard(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Basic_GetBankCard_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BasicServer).GetBankCard(ctx, req.(*FinanceEmpty)) + } + return interceptor(ctx, in, info, handler) +} + +func _Basic_RmBankCard_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(RmBankCardRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BasicServer).RmBankCard(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Basic_RmBankCard_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BasicServer).RmBankCard(ctx, req.(*RmBankCardRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Basic_ApplyCash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ApplyCashRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(BasicServer).ApplyCash(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Basic_ApplyCash_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(BasicServer).ApplyCash(ctx, req.(*ApplyCashRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Basic_ServiceDesc is the grpc.ServiceDesc for Basic service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Basic_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "wallet.Basic", + HandlerType: (*BasicServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetWallet", + Handler: _Basic_GetWallet_Handler, + }, + { + MethodName: "SetPayPassword", + Handler: _Basic_SetPayPassword_Handler, + }, + { + MethodName: "BindPaymentId", + Handler: _Basic_BindPaymentId_Handler, + }, + { + MethodName: "Transactions", + Handler: _Basic_Transactions_Handler, + }, + { + MethodName: "AddBankCard", + Handler: _Basic_AddBankCard_Handler, + }, + { + MethodName: "GetBankCard", + Handler: _Basic_GetBankCard_Handler, + }, + { + MethodName: "RmBankCard", + Handler: _Basic_RmBankCard_Handler, + }, + { + MethodName: "ApplyCash", + Handler: _Basic_ApplyCash_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "wallet.proto", +} diff --git a/golnag/wallet/wechat.pb.go b/golnag/wallet/wechat.pb.go new file mode 100644 index 0000000..b84343e --- /dev/null +++ b/golnag/wallet/wechat.pb.go @@ -0,0 +1,1009 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.36.9 +// protoc (unknown) +// source: wechat.proto + +package wallet + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" + unsafe "unsafe" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +type WxpayJSAPIPreOrderRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserIdentification string `protobuf:"bytes,1,opt,name=user_identification,json=userIdentification,proto3" json:"user_identification,omitempty"` //用户唯一标识 + Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` //充值金额,单位:分 + AuthCode string `protobuf:"bytes,3,opt,name=auth_code,json=authCode,proto3" json:"auth_code,omitempty"` //微信授权码 + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` //商品描述 + NotifyUrl string `protobuf:"bytes,5,opt,name=notify_url,json=notifyUrl,proto3" json:"notify_url,omitempty"` //支付回调URL,公网域名须为HTTPS + OrderNo string `protobuf:"bytes,6,opt,name=orderNo,proto3" json:"orderNo,omitempty"` // 订单唯一码 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WxpayJSAPIPreOrderRequest) Reset() { + *x = WxpayJSAPIPreOrderRequest{} + mi := &file_wechat_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WxpayJSAPIPreOrderRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WxpayJSAPIPreOrderRequest) ProtoMessage() {} + +func (x *WxpayJSAPIPreOrderRequest) ProtoReflect() protoreflect.Message { + mi := &file_wechat_proto_msgTypes[0] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WxpayJSAPIPreOrderRequest.ProtoReflect.Descriptor instead. +func (*WxpayJSAPIPreOrderRequest) Descriptor() ([]byte, []int) { + return file_wechat_proto_rawDescGZIP(), []int{0} +} + +func (x *WxpayJSAPIPreOrderRequest) GetUserIdentification() string { + if x != nil { + return x.UserIdentification + } + return "" +} + +func (x *WxpayJSAPIPreOrderRequest) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *WxpayJSAPIPreOrderRequest) GetAuthCode() string { + if x != nil { + return x.AuthCode + } + return "" +} + +func (x *WxpayJSAPIPreOrderRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *WxpayJSAPIPreOrderRequest) GetNotifyUrl() string { + if x != nil { + return x.NotifyUrl + } + return "" +} + +func (x *WxpayJSAPIPreOrderRequest) GetOrderNo() string { + if x != nil { + return x.OrderNo + } + return "" +} + +type WxpayJSAPIPreOrderReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + PrepayId string `protobuf:"bytes,1,opt,name=prepay_id,json=prepayId,proto3" json:"prepay_id,omitempty"` //预支付ID,两小时有效 + AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` //微信app_id + Timestamp string `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"` //时间戳 + NonceStr string `protobuf:"bytes,4,opt,name=nonce_str,json=nonceStr,proto3" json:"nonce_str,omitempty"` //随机字符串 + SignType string `protobuf:"bytes,5,opt,name=sign_type,json=signType,proto3" json:"sign_type,omitempty"` //签名方式 + Sign string `protobuf:"bytes,6,opt,name=sign,proto3" json:"sign,omitempty"` //签名串 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WxpayJSAPIPreOrderReply) Reset() { + *x = WxpayJSAPIPreOrderReply{} + mi := &file_wechat_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WxpayJSAPIPreOrderReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WxpayJSAPIPreOrderReply) ProtoMessage() {} + +func (x *WxpayJSAPIPreOrderReply) ProtoReflect() protoreflect.Message { + mi := &file_wechat_proto_msgTypes[1] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WxpayJSAPIPreOrderReply.ProtoReflect.Descriptor instead. +func (*WxpayJSAPIPreOrderReply) Descriptor() ([]byte, []int) { + return file_wechat_proto_rawDescGZIP(), []int{1} +} + +func (x *WxpayJSAPIPreOrderReply) GetPrepayId() string { + if x != nil { + return x.PrepayId + } + return "" +} + +func (x *WxpayJSAPIPreOrderReply) GetAppId() string { + if x != nil { + return x.AppId + } + return "" +} + +func (x *WxpayJSAPIPreOrderReply) GetTimestamp() string { + if x != nil { + return x.Timestamp + } + return "" +} + +func (x *WxpayJSAPIPreOrderReply) GetNonceStr() string { + if x != nil { + return x.NonceStr + } + return "" +} + +func (x *WxpayJSAPIPreOrderReply) GetSignType() string { + if x != nil { + return x.SignType + } + return "" +} + +func (x *WxpayJSAPIPreOrderReply) GetSign() string { + if x != nil { + return x.Sign + } + return "" +} + +type WxpayAppPreOrderRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserIdentification string `protobuf:"bytes,1,opt,name=user_identification,json=userIdentification,proto3" json:"user_identification,omitempty"` //用户唯一标识 + Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` //充值金额,单位:分 + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` //商品描述 + NotifyUrl string `protobuf:"bytes,4,opt,name=notify_url,json=notifyUrl,proto3" json:"notify_url,omitempty"` //支付回调URL,公网域名须为HTTPS + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WxpayAppPreOrderRequest) Reset() { + *x = WxpayAppPreOrderRequest{} + mi := &file_wechat_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WxpayAppPreOrderRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WxpayAppPreOrderRequest) ProtoMessage() {} + +func (x *WxpayAppPreOrderRequest) ProtoReflect() protoreflect.Message { + mi := &file_wechat_proto_msgTypes[2] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WxpayAppPreOrderRequest.ProtoReflect.Descriptor instead. +func (*WxpayAppPreOrderRequest) Descriptor() ([]byte, []int) { + return file_wechat_proto_rawDescGZIP(), []int{2} +} + +func (x *WxpayAppPreOrderRequest) GetUserIdentification() string { + if x != nil { + return x.UserIdentification + } + return "" +} + +func (x *WxpayAppPreOrderRequest) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *WxpayAppPreOrderRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *WxpayAppPreOrderRequest) GetNotifyUrl() string { + if x != nil { + return x.NotifyUrl + } + return "" +} + +type WxpayAppPreOrderReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + PrepayId string `protobuf:"bytes,1,opt,name=prepay_id,json=prepayId,proto3" json:"prepay_id,omitempty"` //预支付ID,两小时有效 + AppId string `protobuf:"bytes,2,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"` //微信app_id + MchId string `protobuf:"bytes,3,opt,name=mch_id,json=mchId,proto3" json:"mch_id,omitempty"` //商户号,用以调起支付 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WxpayAppPreOrderReply) Reset() { + *x = WxpayAppPreOrderReply{} + mi := &file_wechat_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WxpayAppPreOrderReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WxpayAppPreOrderReply) ProtoMessage() {} + +func (x *WxpayAppPreOrderReply) ProtoReflect() protoreflect.Message { + mi := &file_wechat_proto_msgTypes[3] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WxpayAppPreOrderReply.ProtoReflect.Descriptor instead. +func (*WxpayAppPreOrderReply) Descriptor() ([]byte, []int) { + return file_wechat_proto_rawDescGZIP(), []int{3} +} + +func (x *WxpayAppPreOrderReply) GetPrepayId() string { + if x != nil { + return x.PrepayId + } + return "" +} + +func (x *WxpayAppPreOrderReply) GetAppId() string { + if x != nil { + return x.AppId + } + return "" +} + +func (x *WxpayAppPreOrderReply) GetMchId() string { + if x != nil { + return x.MchId + } + return "" +} + +type WxpayNativePreOrderRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserIdentification string `protobuf:"bytes,1,opt,name=user_identification,json=userIdentification,proto3" json:"user_identification,omitempty"` //用户唯一标识 + Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` //充值金额,单位:分 + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` //商品描述 + NotifyUrl string `protobuf:"bytes,4,opt,name=notify_url,json=notifyUrl,proto3" json:"notify_url,omitempty"` //支付回调URL,公网域名须为HTTPS + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WxpayNativePreOrderRequest) Reset() { + *x = WxpayNativePreOrderRequest{} + mi := &file_wechat_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WxpayNativePreOrderRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WxpayNativePreOrderRequest) ProtoMessage() {} + +func (x *WxpayNativePreOrderRequest) ProtoReflect() protoreflect.Message { + mi := &file_wechat_proto_msgTypes[4] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WxpayNativePreOrderRequest.ProtoReflect.Descriptor instead. +func (*WxpayNativePreOrderRequest) Descriptor() ([]byte, []int) { + return file_wechat_proto_rawDescGZIP(), []int{4} +} + +func (x *WxpayNativePreOrderRequest) GetUserIdentification() string { + if x != nil { + return x.UserIdentification + } + return "" +} + +func (x *WxpayNativePreOrderRequest) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *WxpayNativePreOrderRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *WxpayNativePreOrderRequest) GetNotifyUrl() string { + if x != nil { + return x.NotifyUrl + } + return "" +} + +type WxpayNativePreOrderReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + CodeUrl string `protobuf:"bytes,1,opt,name=code_url,json=codeUrl,proto3" json:"code_url,omitempty"` //二维码URL + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WxpayNativePreOrderReply) Reset() { + *x = WxpayNativePreOrderReply{} + mi := &file_wechat_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WxpayNativePreOrderReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WxpayNativePreOrderReply) ProtoMessage() {} + +func (x *WxpayNativePreOrderReply) ProtoReflect() protoreflect.Message { + mi := &file_wechat_proto_msgTypes[5] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WxpayNativePreOrderReply.ProtoReflect.Descriptor instead. +func (*WxpayNativePreOrderReply) Descriptor() ([]byte, []int) { + return file_wechat_proto_rawDescGZIP(), []int{5} +} + +func (x *WxpayNativePreOrderReply) GetCodeUrl() string { + if x != nil { + return x.CodeUrl + } + return "" +} + +type WxpayTransferRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + UserIdentification string `protobuf:"bytes,1,opt,name=user_identification,json=userIdentification,proto3" json:"user_identification,omitempty"` //用户唯一标识 + Amount int64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"` //提现金额,单位:分 + Fee int64 `protobuf:"varint,3,opt,name=fee,proto3" json:"fee,omitempty"` //提现手续费,单位:分 + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` //商品描述 + TransferName string `protobuf:"bytes,5,opt,name=transfer_name,json=transferName,proto3" json:"transfer_name,omitempty"` //提现人真实姓名 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WxpayTransferRequest) Reset() { + *x = WxpayTransferRequest{} + mi := &file_wechat_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WxpayTransferRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WxpayTransferRequest) ProtoMessage() {} + +func (x *WxpayTransferRequest) ProtoReflect() protoreflect.Message { + mi := &file_wechat_proto_msgTypes[6] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WxpayTransferRequest.ProtoReflect.Descriptor instead. +func (*WxpayTransferRequest) Descriptor() ([]byte, []int) { + return file_wechat_proto_rawDescGZIP(), []int{6} +} + +func (x *WxpayTransferRequest) GetUserIdentification() string { + if x != nil { + return x.UserIdentification + } + return "" +} + +func (x *WxpayTransferRequest) GetAmount() int64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *WxpayTransferRequest) GetFee() int64 { + if x != nil { + return x.Fee + } + return 0 +} + +func (x *WxpayTransferRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *WxpayTransferRequest) GetTransferName() string { + if x != nil { + return x.TransferName + } + return "" +} + +type WxpayTransferReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WxpayTransferReply) Reset() { + *x = WxpayTransferReply{} + mi := &file_wechat_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WxpayTransferReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WxpayTransferReply) ProtoMessage() {} + +func (x *WxpayTransferReply) ProtoReflect() protoreflect.Message { + mi := &file_wechat_proto_msgTypes[7] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WxpayTransferReply.ProtoReflect.Descriptor instead. +func (*WxpayTransferReply) Descriptor() ([]byte, []int) { + return file_wechat_proto_rawDescGZIP(), []int{7} +} + +type WxCallBackResource struct { + state protoimpl.MessageState `protogen:"open.v1"` + OriginalType string `protobuf:"bytes,1,opt,name=original_type,json=originalType,proto3" json:"original_type,omitempty"` + Algorithm string `protobuf:"bytes,2,opt,name=algorithm,proto3" json:"algorithm,omitempty"` + Ciphertext string `protobuf:"bytes,3,opt,name=ciphertext,proto3" json:"ciphertext,omitempty"` + AssociatedData string `protobuf:"bytes,4,opt,name=associated_data,json=associatedData,proto3" json:"associated_data,omitempty"` + Nonce string `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WxCallBackResource) Reset() { + *x = WxCallBackResource{} + mi := &file_wechat_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WxCallBackResource) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WxCallBackResource) ProtoMessage() {} + +func (x *WxCallBackResource) ProtoReflect() protoreflect.Message { + mi := &file_wechat_proto_msgTypes[8] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WxCallBackResource.ProtoReflect.Descriptor instead. +func (*WxCallBackResource) Descriptor() ([]byte, []int) { + return file_wechat_proto_rawDescGZIP(), []int{8} +} + +func (x *WxCallBackResource) GetOriginalType() string { + if x != nil { + return x.OriginalType + } + return "" +} + +func (x *WxCallBackResource) GetAlgorithm() string { + if x != nil { + return x.Algorithm + } + return "" +} + +func (x *WxCallBackResource) GetCiphertext() string { + if x != nil { + return x.Ciphertext + } + return "" +} + +func (x *WxCallBackResource) GetAssociatedData() string { + if x != nil { + return x.AssociatedData + } + return "" +} + +func (x *WxCallBackResource) GetNonce() string { + if x != nil { + return x.Nonce + } + return "" +} + +type WxCallBackSignInfo struct { + state protoimpl.MessageState `protogen:"open.v1"` + TransactionId string `protobuf:"bytes,1,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty"` + ActCode string `protobuf:"bytes,2,opt,name=act_code,json=actCode,proto3" json:"act_code,omitempty"` + HallCode string `protobuf:"bytes,3,opt,name=hall_code,json=hallCode,proto3" json:"hall_code,omitempty"` + HallBelongMchId int64 `protobuf:"varint,4,opt,name=hall_belong_mch_id,json=hallBelongMchId,proto3" json:"hall_belong_mch_id,omitempty"` + CardId string `protobuf:"bytes,5,opt,name=card_id,json=cardId,proto3" json:"card_id,omitempty"` + Code string `protobuf:"bytes,6,opt,name=code,proto3" json:"code,omitempty"` + ActivityId string `protobuf:"bytes,7,opt,name=activity_id,json=activityId,proto3" json:"activity_id,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WxCallBackSignInfo) Reset() { + *x = WxCallBackSignInfo{} + mi := &file_wechat_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WxCallBackSignInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WxCallBackSignInfo) ProtoMessage() {} + +func (x *WxCallBackSignInfo) ProtoReflect() protoreflect.Message { + mi := &file_wechat_proto_msgTypes[9] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WxCallBackSignInfo.ProtoReflect.Descriptor instead. +func (*WxCallBackSignInfo) Descriptor() ([]byte, []int) { + return file_wechat_proto_rawDescGZIP(), []int{9} +} + +func (x *WxCallBackSignInfo) GetTransactionId() string { + if x != nil { + return x.TransactionId + } + return "" +} + +func (x *WxCallBackSignInfo) GetActCode() string { + if x != nil { + return x.ActCode + } + return "" +} + +func (x *WxCallBackSignInfo) GetHallCode() string { + if x != nil { + return x.HallCode + } + return "" +} + +func (x *WxCallBackSignInfo) GetHallBelongMchId() int64 { + if x != nil { + return x.HallBelongMchId + } + return 0 +} + +func (x *WxCallBackSignInfo) GetCardId() string { + if x != nil { + return x.CardId + } + return "" +} + +func (x *WxCallBackSignInfo) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *WxCallBackSignInfo) GetActivityId() string { + if x != nil { + return x.ActivityId + } + return "" +} + +type WxCallBackRequest struct { + state protoimpl.MessageState `protogen:"open.v1"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + CreateTime string `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"` + ResourceType string `protobuf:"bytes,3,opt,name=resource_type,json=resourceType,proto3" json:"resource_type,omitempty"` + EventType string `protobuf:"bytes,4,opt,name=event_type,json=eventType,proto3" json:"event_type,omitempty"` + Summary string `protobuf:"bytes,5,opt,name=summary,proto3" json:"summary,omitempty"` + Resource *WxCallBackResource `protobuf:"bytes,6,opt,name=resource,proto3" json:"resource,omitempty"` + SignInfo *WxCallBackSignInfo `protobuf:"bytes,7,opt,name=SignInfo,proto3" json:"SignInfo,omitempty"` + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *WxCallBackRequest) Reset() { + *x = WxCallBackRequest{} + mi := &file_wechat_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *WxCallBackRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WxCallBackRequest) ProtoMessage() {} + +func (x *WxCallBackRequest) ProtoReflect() protoreflect.Message { + mi := &file_wechat_proto_msgTypes[10] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WxCallBackRequest.ProtoReflect.Descriptor instead. +func (*WxCallBackRequest) Descriptor() ([]byte, []int) { + return file_wechat_proto_rawDescGZIP(), []int{10} +} + +func (x *WxCallBackRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *WxCallBackRequest) GetCreateTime() string { + if x != nil { + return x.CreateTime + } + return "" +} + +func (x *WxCallBackRequest) GetResourceType() string { + if x != nil { + return x.ResourceType + } + return "" +} + +func (x *WxCallBackRequest) GetEventType() string { + if x != nil { + return x.EventType + } + return "" +} + +func (x *WxCallBackRequest) GetSummary() string { + if x != nil { + return x.Summary + } + return "" +} + +func (x *WxCallBackRequest) GetResource() *WxCallBackResource { + if x != nil { + return x.Resource + } + return nil +} + +func (x *WxCallBackRequest) GetSignInfo() *WxCallBackSignInfo { + if x != nil { + return x.SignInfo + } + return nil +} + +type CallBackReply struct { + state protoimpl.MessageState `protogen:"open.v1"` + Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` // 错误码,SUCCESS为清算机构接收成功,FAIL错误码为失败。 + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // 返回信息 + unknownFields protoimpl.UnknownFields + sizeCache protoimpl.SizeCache +} + +func (x *CallBackReply) Reset() { + *x = CallBackReply{} + mi := &file_wechat_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) +} + +func (x *CallBackReply) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CallBackReply) ProtoMessage() {} + +func (x *CallBackReply) ProtoReflect() protoreflect.Message { + mi := &file_wechat_proto_msgTypes[11] + if x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use CallBackReply.ProtoReflect.Descriptor instead. +func (*CallBackReply) Descriptor() ([]byte, []int) { + return file_wechat_proto_rawDescGZIP(), []int{11} +} + +func (x *CallBackReply) GetCode() string { + if x != nil { + return x.Code + } + return "" +} + +func (x *CallBackReply) GetMessage() string { + if x != nil { + return x.Message + } + return "" +} + +var File_wechat_proto protoreflect.FileDescriptor + +const file_wechat_proto_rawDesc = "" + + "\n" + + "\fwechat.proto\x12\x06wallet\"\xdc\x01\n" + + "\x19WxpayJSAPIPreOrderRequest\x12/\n" + + "\x13user_identification\x18\x01 \x01(\tR\x12userIdentification\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x03R\x06amount\x12\x1b\n" + + "\tauth_code\x18\x03 \x01(\tR\bauthCode\x12 \n" + + "\vdescription\x18\x04 \x01(\tR\vdescription\x12\x1d\n" + + "\n" + + "notify_url\x18\x05 \x01(\tR\tnotifyUrl\x12\x18\n" + + "\aorderNo\x18\x06 \x01(\tR\aorderNo\"\xb9\x01\n" + + "\x17WxpayJSAPIPreOrderReply\x12\x1b\n" + + "\tprepay_id\x18\x01 \x01(\tR\bprepayId\x12\x15\n" + + "\x06app_id\x18\x02 \x01(\tR\x05appId\x12\x1c\n" + + "\ttimestamp\x18\x03 \x01(\tR\ttimestamp\x12\x1b\n" + + "\tnonce_str\x18\x04 \x01(\tR\bnonceStr\x12\x1b\n" + + "\tsign_type\x18\x05 \x01(\tR\bsignType\x12\x12\n" + + "\x04sign\x18\x06 \x01(\tR\x04sign\"\xa3\x01\n" + + "\x17WxpayAppPreOrderRequest\x12/\n" + + "\x13user_identification\x18\x01 \x01(\tR\x12userIdentification\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x03R\x06amount\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\x12\x1d\n" + + "\n" + + "notify_url\x18\x04 \x01(\tR\tnotifyUrl\"b\n" + + "\x15WxpayAppPreOrderReply\x12\x1b\n" + + "\tprepay_id\x18\x01 \x01(\tR\bprepayId\x12\x15\n" + + "\x06app_id\x18\x02 \x01(\tR\x05appId\x12\x15\n" + + "\x06mch_id\x18\x03 \x01(\tR\x05mchId\"\xa6\x01\n" + + "\x1aWxpayNativePreOrderRequest\x12/\n" + + "\x13user_identification\x18\x01 \x01(\tR\x12userIdentification\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x03R\x06amount\x12 \n" + + "\vdescription\x18\x03 \x01(\tR\vdescription\x12\x1d\n" + + "\n" + + "notify_url\x18\x04 \x01(\tR\tnotifyUrl\"5\n" + + "\x18WxpayNativePreOrderReply\x12\x19\n" + + "\bcode_url\x18\x01 \x01(\tR\acodeUrl\"\xb8\x01\n" + + "\x14WxpayTransferRequest\x12/\n" + + "\x13user_identification\x18\x01 \x01(\tR\x12userIdentification\x12\x16\n" + + "\x06amount\x18\x02 \x01(\x03R\x06amount\x12\x10\n" + + "\x03fee\x18\x03 \x01(\x03R\x03fee\x12 \n" + + "\vdescription\x18\x04 \x01(\tR\vdescription\x12#\n" + + "\rtransfer_name\x18\x05 \x01(\tR\ftransferName\"\x14\n" + + "\x12WxpayTransferReply\"\xb6\x01\n" + + "\x12WxCallBackResource\x12#\n" + + "\roriginal_type\x18\x01 \x01(\tR\foriginalType\x12\x1c\n" + + "\talgorithm\x18\x02 \x01(\tR\talgorithm\x12\x1e\n" + + "\n" + + "ciphertext\x18\x03 \x01(\tR\n" + + "ciphertext\x12'\n" + + "\x0fassociated_data\x18\x04 \x01(\tR\x0eassociatedData\x12\x14\n" + + "\x05nonce\x18\x05 \x01(\tR\x05nonce\"\xee\x01\n" + + "\x12WxCallBackSignInfo\x12%\n" + + "\x0etransaction_id\x18\x01 \x01(\tR\rtransactionId\x12\x19\n" + + "\bact_code\x18\x02 \x01(\tR\aactCode\x12\x1b\n" + + "\thall_code\x18\x03 \x01(\tR\bhallCode\x12+\n" + + "\x12hall_belong_mch_id\x18\x04 \x01(\x03R\x0fhallBelongMchId\x12\x17\n" + + "\acard_id\x18\x05 \x01(\tR\x06cardId\x12\x12\n" + + "\x04code\x18\x06 \x01(\tR\x04code\x12\x1f\n" + + "\vactivity_id\x18\a \x01(\tR\n" + + "activityId\"\x92\x02\n" + + "\x11WxCallBackRequest\x12\x0e\n" + + "\x02id\x18\x01 \x01(\tR\x02id\x12\x1f\n" + + "\vcreate_time\x18\x02 \x01(\tR\n" + + "createTime\x12#\n" + + "\rresource_type\x18\x03 \x01(\tR\fresourceType\x12\x1d\n" + + "\n" + + "event_type\x18\x04 \x01(\tR\teventType\x12\x18\n" + + "\asummary\x18\x05 \x01(\tR\asummary\x126\n" + + "\bresource\x18\x06 \x01(\v2\x1a.wallet.WxCallBackResourceR\bresource\x126\n" + + "\bSignInfo\x18\a \x01(\v2\x1a.wallet.WxCallBackSignInfoR\bSignInfo\"=\n" + + "\rCallBackReply\x12\x12\n" + + "\x04code\x18\x01 \x01(\tR\x04code\x12\x18\n" + + "\amessage\x18\x02 \x01(\tR\amessage2\x94\x03\n" + + "\x06Wechat\x12U\n" + + "\rJsapiPreOrder\x12!.wallet.WxpayJSAPIPreOrderRequest\x1a\x1f.wallet.WxpayJSAPIPreOrderReply\"\x00\x12O\n" + + "\vAppPreOrder\x12\x1f.wallet.WxpayAppPreOrderRequest\x1a\x1d.wallet.WxpayAppPreOrderReply\"\x00\x12X\n" + + "\x0eNativePreOrder\x12\".wallet.WxpayNativePreOrderRequest\x1a .wallet.WxpayNativePreOrderReply\"\x00\x12F\n" + + "\bTransfer\x12\x1c.wallet.WxpayTransferRequest\x1a\x1a.wallet.WxpayTransferReply\"\x00\x12@\n" + + "\n" + + "WxCallback\x12\x19.wallet.WxCallBackRequest\x1a\x15.wallet.CallBackReply\"\x00B\n" + + "Z\b.;walletb\x06proto3" + +var ( + file_wechat_proto_rawDescOnce sync.Once + file_wechat_proto_rawDescData []byte +) + +func file_wechat_proto_rawDescGZIP() []byte { + file_wechat_proto_rawDescOnce.Do(func() { + file_wechat_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_wechat_proto_rawDesc), len(file_wechat_proto_rawDesc))) + }) + return file_wechat_proto_rawDescData +} + +var file_wechat_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_wechat_proto_goTypes = []any{ + (*WxpayJSAPIPreOrderRequest)(nil), // 0: wallet.WxpayJSAPIPreOrderRequest + (*WxpayJSAPIPreOrderReply)(nil), // 1: wallet.WxpayJSAPIPreOrderReply + (*WxpayAppPreOrderRequest)(nil), // 2: wallet.WxpayAppPreOrderRequest + (*WxpayAppPreOrderReply)(nil), // 3: wallet.WxpayAppPreOrderReply + (*WxpayNativePreOrderRequest)(nil), // 4: wallet.WxpayNativePreOrderRequest + (*WxpayNativePreOrderReply)(nil), // 5: wallet.WxpayNativePreOrderReply + (*WxpayTransferRequest)(nil), // 6: wallet.WxpayTransferRequest + (*WxpayTransferReply)(nil), // 7: wallet.WxpayTransferReply + (*WxCallBackResource)(nil), // 8: wallet.WxCallBackResource + (*WxCallBackSignInfo)(nil), // 9: wallet.WxCallBackSignInfo + (*WxCallBackRequest)(nil), // 10: wallet.WxCallBackRequest + (*CallBackReply)(nil), // 11: wallet.CallBackReply +} +var file_wechat_proto_depIdxs = []int32{ + 8, // 0: wallet.WxCallBackRequest.resource:type_name -> wallet.WxCallBackResource + 9, // 1: wallet.WxCallBackRequest.SignInfo:type_name -> wallet.WxCallBackSignInfo + 0, // 2: wallet.Wechat.JsapiPreOrder:input_type -> wallet.WxpayJSAPIPreOrderRequest + 2, // 3: wallet.Wechat.AppPreOrder:input_type -> wallet.WxpayAppPreOrderRequest + 4, // 4: wallet.Wechat.NativePreOrder:input_type -> wallet.WxpayNativePreOrderRequest + 6, // 5: wallet.Wechat.Transfer:input_type -> wallet.WxpayTransferRequest + 10, // 6: wallet.Wechat.WxCallback:input_type -> wallet.WxCallBackRequest + 1, // 7: wallet.Wechat.JsapiPreOrder:output_type -> wallet.WxpayJSAPIPreOrderReply + 3, // 8: wallet.Wechat.AppPreOrder:output_type -> wallet.WxpayAppPreOrderReply + 5, // 9: wallet.Wechat.NativePreOrder:output_type -> wallet.WxpayNativePreOrderReply + 7, // 10: wallet.Wechat.Transfer:output_type -> wallet.WxpayTransferReply + 11, // 11: wallet.Wechat.WxCallback:output_type -> wallet.CallBackReply + 7, // [7:12] is the sub-list for method output_type + 2, // [2:7] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name +} + +func init() { file_wechat_proto_init() } +func file_wechat_proto_init() { + if File_wechat_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: unsafe.Slice(unsafe.StringData(file_wechat_proto_rawDesc), len(file_wechat_proto_rawDesc)), + NumEnums: 0, + NumMessages: 12, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_wechat_proto_goTypes, + DependencyIndexes: file_wechat_proto_depIdxs, + MessageInfos: file_wechat_proto_msgTypes, + }.Build() + File_wechat_proto = out.File + file_wechat_proto_goTypes = nil + file_wechat_proto_depIdxs = nil +} diff --git a/golnag/wallet/wechat_grpc.pb.go b/golnag/wallet/wechat_grpc.pb.go new file mode 100644 index 0000000..0b17bcf --- /dev/null +++ b/golnag/wallet/wechat_grpc.pb.go @@ -0,0 +1,283 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. +// versions: +// - protoc-gen-go-grpc v1.5.1 +// - protoc (unknown) +// source: wechat.proto + +package wallet + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.64.0 or later. +const _ = grpc.SupportPackageIsVersion9 + +const ( + Wechat_JsapiPreOrder_FullMethodName = "/wallet.Wechat/JsapiPreOrder" + Wechat_AppPreOrder_FullMethodName = "/wallet.Wechat/AppPreOrder" + Wechat_NativePreOrder_FullMethodName = "/wallet.Wechat/NativePreOrder" + Wechat_Transfer_FullMethodName = "/wallet.Wechat/Transfer" + Wechat_WxCallback_FullMethodName = "/wallet.Wechat/WxCallback" +) + +// WechatClient is the client API for Wechat service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type WechatClient interface { + //微信JSAPI下单 + JsapiPreOrder(ctx context.Context, in *WxpayJSAPIPreOrderRequest, opts ...grpc.CallOption) (*WxpayJSAPIPreOrderReply, error) + //微信APP支付下单 + AppPreOrder(ctx context.Context, in *WxpayAppPreOrderRequest, opts ...grpc.CallOption) (*WxpayAppPreOrderReply, error) + //微信native二维码支付下单 + NativePreOrder(ctx context.Context, in *WxpayNativePreOrderRequest, opts ...grpc.CallOption) (*WxpayNativePreOrderReply, error) + //微信转账到零钱 + Transfer(ctx context.Context, in *WxpayTransferRequest, opts ...grpc.CallOption) (*WxpayTransferReply, error) + //微信支付回调 + WxCallback(ctx context.Context, in *WxCallBackRequest, opts ...grpc.CallOption) (*CallBackReply, error) +} + +type wechatClient struct { + cc grpc.ClientConnInterface +} + +func NewWechatClient(cc grpc.ClientConnInterface) WechatClient { + return &wechatClient{cc} +} + +func (c *wechatClient) JsapiPreOrder(ctx context.Context, in *WxpayJSAPIPreOrderRequest, opts ...grpc.CallOption) (*WxpayJSAPIPreOrderReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(WxpayJSAPIPreOrderReply) + err := c.cc.Invoke(ctx, Wechat_JsapiPreOrder_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *wechatClient) AppPreOrder(ctx context.Context, in *WxpayAppPreOrderRequest, opts ...grpc.CallOption) (*WxpayAppPreOrderReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(WxpayAppPreOrderReply) + err := c.cc.Invoke(ctx, Wechat_AppPreOrder_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *wechatClient) NativePreOrder(ctx context.Context, in *WxpayNativePreOrderRequest, opts ...grpc.CallOption) (*WxpayNativePreOrderReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(WxpayNativePreOrderReply) + err := c.cc.Invoke(ctx, Wechat_NativePreOrder_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *wechatClient) Transfer(ctx context.Context, in *WxpayTransferRequest, opts ...grpc.CallOption) (*WxpayTransferReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(WxpayTransferReply) + err := c.cc.Invoke(ctx, Wechat_Transfer_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *wechatClient) WxCallback(ctx context.Context, in *WxCallBackRequest, opts ...grpc.CallOption) (*CallBackReply, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(CallBackReply) + err := c.cc.Invoke(ctx, Wechat_WxCallback_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + +// WechatServer is the server API for Wechat service. +// All implementations must embed UnimplementedWechatServer +// for forward compatibility. +type WechatServer interface { + //微信JSAPI下单 + JsapiPreOrder(context.Context, *WxpayJSAPIPreOrderRequest) (*WxpayJSAPIPreOrderReply, error) + //微信APP支付下单 + AppPreOrder(context.Context, *WxpayAppPreOrderRequest) (*WxpayAppPreOrderReply, error) + //微信native二维码支付下单 + NativePreOrder(context.Context, *WxpayNativePreOrderRequest) (*WxpayNativePreOrderReply, error) + //微信转账到零钱 + Transfer(context.Context, *WxpayTransferRequest) (*WxpayTransferReply, error) + //微信支付回调 + WxCallback(context.Context, *WxCallBackRequest) (*CallBackReply, error) + mustEmbedUnimplementedWechatServer() +} + +// UnimplementedWechatServer must be embedded to have +// forward compatible implementations. +// +// NOTE: this should be embedded by value instead of pointer to avoid a nil +// pointer dereference when methods are called. +type UnimplementedWechatServer struct{} + +func (UnimplementedWechatServer) JsapiPreOrder(context.Context, *WxpayJSAPIPreOrderRequest) (*WxpayJSAPIPreOrderReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method JsapiPreOrder not implemented") +} +func (UnimplementedWechatServer) AppPreOrder(context.Context, *WxpayAppPreOrderRequest) (*WxpayAppPreOrderReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method AppPreOrder not implemented") +} +func (UnimplementedWechatServer) NativePreOrder(context.Context, *WxpayNativePreOrderRequest) (*WxpayNativePreOrderReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method NativePreOrder not implemented") +} +func (UnimplementedWechatServer) Transfer(context.Context, *WxpayTransferRequest) (*WxpayTransferReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method Transfer not implemented") +} +func (UnimplementedWechatServer) WxCallback(context.Context, *WxCallBackRequest) (*CallBackReply, error) { + return nil, status.Errorf(codes.Unimplemented, "method WxCallback not implemented") +} +func (UnimplementedWechatServer) mustEmbedUnimplementedWechatServer() {} +func (UnimplementedWechatServer) testEmbeddedByValue() {} + +// UnsafeWechatServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to WechatServer will +// result in compilation errors. +type UnsafeWechatServer interface { + mustEmbedUnimplementedWechatServer() +} + +func RegisterWechatServer(s grpc.ServiceRegistrar, srv WechatServer) { + // If the following call pancis, it indicates UnimplementedWechatServer was + // embedded by pointer and is nil. This will cause panics if an + // unimplemented method is ever invoked, so we test this at initialization + // time to prevent it from happening at runtime later due to I/O. + if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { + t.testEmbeddedByValue() + } + s.RegisterService(&Wechat_ServiceDesc, srv) +} + +func _Wechat_JsapiPreOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WxpayJSAPIPreOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WechatServer).JsapiPreOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Wechat_JsapiPreOrder_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WechatServer).JsapiPreOrder(ctx, req.(*WxpayJSAPIPreOrderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Wechat_AppPreOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WxpayAppPreOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WechatServer).AppPreOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Wechat_AppPreOrder_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WechatServer).AppPreOrder(ctx, req.(*WxpayAppPreOrderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Wechat_NativePreOrder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WxpayNativePreOrderRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WechatServer).NativePreOrder(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Wechat_NativePreOrder_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WechatServer).NativePreOrder(ctx, req.(*WxpayNativePreOrderRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Wechat_Transfer_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WxpayTransferRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WechatServer).Transfer(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Wechat_Transfer_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WechatServer).Transfer(ctx, req.(*WxpayTransferRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Wechat_WxCallback_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WxCallBackRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(WechatServer).WxCallback(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Wechat_WxCallback_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(WechatServer).WxCallback(ctx, req.(*WxCallBackRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// Wechat_ServiceDesc is the grpc.ServiceDesc for Wechat service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Wechat_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "wallet.Wechat", + HandlerType: (*WechatServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "JsapiPreOrder", + Handler: _Wechat_JsapiPreOrder_Handler, + }, + { + MethodName: "AppPreOrder", + Handler: _Wechat_AppPreOrder_Handler, + }, + { + MethodName: "NativePreOrder", + Handler: _Wechat_NativePreOrder_Handler, + }, + { + MethodName: "Transfer", + Handler: _Wechat_Transfer_Handler, + }, + { + MethodName: "WxCallback", + Handler: _Wechat_WxCallback_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "wechat.proto", +} diff --git a/typescript/alipay.ts b/typescript/alipay.ts new file mode 100644 index 0000000..cd44754 --- /dev/null +++ b/typescript/alipay.ts @@ -0,0 +1,926 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 0.0.0 + * source: alipay.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace wallet { + export class AlipayTradeWapPayRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + user_identification?: string; + amount?: number; + description?: string; + notify_url?: string; + quit_url?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("user_identification" in data && data.user_identification != undefined) { + this.user_identification = data.user_identification; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("notify_url" in data && data.notify_url != undefined) { + this.notify_url = data.notify_url; + } + if ("quit_url" in data && data.quit_url != undefined) { + this.quit_url = data.quit_url; + } + } + } + get user_identification() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set user_identification(value: string) { + pb_1.Message.setField(this, 1, value); + } + get amount() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set amount(value: number) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get notify_url() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set notify_url(value: string) { + pb_1.Message.setField(this, 4, value); + } + get quit_url() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set quit_url(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + user_identification?: string; + amount?: number; + description?: string; + notify_url?: string; + quit_url?: string; + }): AlipayTradeWapPayRequest { + const message = new AlipayTradeWapPayRequest({}); + if (data.user_identification != null) { + message.user_identification = data.user_identification; + } + if (data.amount != null) { + message.amount = data.amount; + } + if (data.description != null) { + message.description = data.description; + } + if (data.notify_url != null) { + message.notify_url = data.notify_url; + } + if (data.quit_url != null) { + message.quit_url = data.quit_url; + } + return message; + } + toObject() { + const data: { + user_identification?: string; + amount?: number; + description?: string; + notify_url?: string; + quit_url?: string; + } = {}; + if (this.user_identification != null) { + data.user_identification = this.user_identification; + } + if (this.amount != null) { + data.amount = this.amount; + } + if (this.description != null) { + data.description = this.description; + } + if (this.notify_url != null) { + data.notify_url = this.notify_url; + } + if (this.quit_url != null) { + data.quit_url = this.quit_url; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.user_identification.length) + writer.writeString(1, this.user_identification); + if (this.amount != 0) + writer.writeInt64(2, this.amount); + if (this.description.length) + writer.writeString(3, this.description); + if (this.notify_url.length) + writer.writeString(4, this.notify_url); + if (this.quit_url.length) + writer.writeString(5, this.quit_url); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AlipayTradeWapPayRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AlipayTradeWapPayRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.user_identification = reader.readString(); + break; + case 2: + message.amount = reader.readInt64(); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + message.notify_url = reader.readString(); + break; + case 5: + message.quit_url = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AlipayTradeWapPayRequest { + return AlipayTradeWapPayRequest.deserialize(bytes); + } + } + export class AlipayTradeWapPayReply extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pay_url?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("pay_url" in data && data.pay_url != undefined) { + this.pay_url = data.pay_url; + } + } + } + get pay_url() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set pay_url(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + pay_url?: string; + }): AlipayTradeWapPayReply { + const message = new AlipayTradeWapPayReply({}); + if (data.pay_url != null) { + message.pay_url = data.pay_url; + } + return message; + } + toObject() { + const data: { + pay_url?: string; + } = {}; + if (this.pay_url != null) { + data.pay_url = this.pay_url; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.pay_url.length) + writer.writeString(1, this.pay_url); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AlipayTradeWapPayReply { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AlipayTradeWapPayReply(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.pay_url = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AlipayTradeWapPayReply { + return AlipayTradeWapPayReply.deserialize(bytes); + } + } + export class AlipayTradePagePayRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + user_identification?: string; + amount?: number; + description?: string; + notify_url?: string; + return_url?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("user_identification" in data && data.user_identification != undefined) { + this.user_identification = data.user_identification; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("notify_url" in data && data.notify_url != undefined) { + this.notify_url = data.notify_url; + } + if ("return_url" in data && data.return_url != undefined) { + this.return_url = data.return_url; + } + } + } + get user_identification() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set user_identification(value: string) { + pb_1.Message.setField(this, 1, value); + } + get amount() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set amount(value: number) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get notify_url() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set notify_url(value: string) { + pb_1.Message.setField(this, 4, value); + } + get return_url() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set return_url(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + user_identification?: string; + amount?: number; + description?: string; + notify_url?: string; + return_url?: string; + }): AlipayTradePagePayRequest { + const message = new AlipayTradePagePayRequest({}); + if (data.user_identification != null) { + message.user_identification = data.user_identification; + } + if (data.amount != null) { + message.amount = data.amount; + } + if (data.description != null) { + message.description = data.description; + } + if (data.notify_url != null) { + message.notify_url = data.notify_url; + } + if (data.return_url != null) { + message.return_url = data.return_url; + } + return message; + } + toObject() { + const data: { + user_identification?: string; + amount?: number; + description?: string; + notify_url?: string; + return_url?: string; + } = {}; + if (this.user_identification != null) { + data.user_identification = this.user_identification; + } + if (this.amount != null) { + data.amount = this.amount; + } + if (this.description != null) { + data.description = this.description; + } + if (this.notify_url != null) { + data.notify_url = this.notify_url; + } + if (this.return_url != null) { + data.return_url = this.return_url; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.user_identification.length) + writer.writeString(1, this.user_identification); + if (this.amount != 0) + writer.writeInt64(2, this.amount); + if (this.description.length) + writer.writeString(3, this.description); + if (this.notify_url.length) + writer.writeString(4, this.notify_url); + if (this.return_url.length) + writer.writeString(5, this.return_url); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AlipayTradePagePayRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AlipayTradePagePayRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.user_identification = reader.readString(); + break; + case 2: + message.amount = reader.readInt64(); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + message.notify_url = reader.readString(); + break; + case 5: + message.return_url = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AlipayTradePagePayRequest { + return AlipayTradePagePayRequest.deserialize(bytes); + } + } + export class AlipayTradePagePayReply extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pay_url?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("pay_url" in data && data.pay_url != undefined) { + this.pay_url = data.pay_url; + } + } + } + get pay_url() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set pay_url(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + pay_url?: string; + }): AlipayTradePagePayReply { + const message = new AlipayTradePagePayReply({}); + if (data.pay_url != null) { + message.pay_url = data.pay_url; + } + return message; + } + toObject() { + const data: { + pay_url?: string; + } = {}; + if (this.pay_url != null) { + data.pay_url = this.pay_url; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.pay_url.length) + writer.writeString(1, this.pay_url); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AlipayTradePagePayReply { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AlipayTradePagePayReply(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.pay_url = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AlipayTradePagePayReply { + return AlipayTradePagePayReply.deserialize(bytes); + } + } + export class AlipayTradeAppPayRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + user_identification?: string; + amount?: number; + description?: string; + notify_url?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("user_identification" in data && data.user_identification != undefined) { + this.user_identification = data.user_identification; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("notify_url" in data && data.notify_url != undefined) { + this.notify_url = data.notify_url; + } + } + } + get user_identification() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set user_identification(value: string) { + pb_1.Message.setField(this, 1, value); + } + get amount() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set amount(value: number) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get notify_url() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set notify_url(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + user_identification?: string; + amount?: number; + description?: string; + notify_url?: string; + }): AlipayTradeAppPayRequest { + const message = new AlipayTradeAppPayRequest({}); + if (data.user_identification != null) { + message.user_identification = data.user_identification; + } + if (data.amount != null) { + message.amount = data.amount; + } + if (data.description != null) { + message.description = data.description; + } + if (data.notify_url != null) { + message.notify_url = data.notify_url; + } + return message; + } + toObject() { + const data: { + user_identification?: string; + amount?: number; + description?: string; + notify_url?: string; + } = {}; + if (this.user_identification != null) { + data.user_identification = this.user_identification; + } + if (this.amount != null) { + data.amount = this.amount; + } + if (this.description != null) { + data.description = this.description; + } + if (this.notify_url != null) { + data.notify_url = this.notify_url; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.user_identification.length) + writer.writeString(1, this.user_identification); + if (this.amount != 0) + writer.writeInt64(2, this.amount); + if (this.description.length) + writer.writeString(3, this.description); + if (this.notify_url.length) + writer.writeString(4, this.notify_url); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AlipayTradeAppPayRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AlipayTradeAppPayRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.user_identification = reader.readString(); + break; + case 2: + message.amount = reader.readInt64(); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + message.notify_url = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AlipayTradeAppPayRequest { + return AlipayTradeAppPayRequest.deserialize(bytes); + } + } + export class AlipayTradeAppPayReply extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pay_param?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("pay_param" in data && data.pay_param != undefined) { + this.pay_param = data.pay_param; + } + } + } + get pay_param() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set pay_param(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + pay_param?: string; + }): AlipayTradeAppPayReply { + const message = new AlipayTradeAppPayReply({}); + if (data.pay_param != null) { + message.pay_param = data.pay_param; + } + return message; + } + toObject() { + const data: { + pay_param?: string; + } = {}; + if (this.pay_param != null) { + data.pay_param = this.pay_param; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.pay_param.length) + writer.writeString(1, this.pay_param); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AlipayTradeAppPayReply { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AlipayTradeAppPayReply(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.pay_param = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AlipayTradeAppPayReply { + return AlipayTradeAppPayReply.deserialize(bytes); + } + } + export class AlipayUniTransferRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + user_identification?: string; + amount?: number; + fee?: number; + description?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("user_identification" in data && data.user_identification != undefined) { + this.user_identification = data.user_identification; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("fee" in data && data.fee != undefined) { + this.fee = data.fee; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + } + } + get user_identification() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set user_identification(value: string) { + pb_1.Message.setField(this, 1, value); + } + get amount() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set amount(value: number) { + pb_1.Message.setField(this, 2, value); + } + get fee() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set fee(value: number) { + pb_1.Message.setField(this, 3, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + user_identification?: string; + amount?: number; + fee?: number; + description?: string; + }): AlipayUniTransferRequest { + const message = new AlipayUniTransferRequest({}); + if (data.user_identification != null) { + message.user_identification = data.user_identification; + } + if (data.amount != null) { + message.amount = data.amount; + } + if (data.fee != null) { + message.fee = data.fee; + } + if (data.description != null) { + message.description = data.description; + } + return message; + } + toObject() { + const data: { + user_identification?: string; + amount?: number; + fee?: number; + description?: string; + } = {}; + if (this.user_identification != null) { + data.user_identification = this.user_identification; + } + if (this.amount != null) { + data.amount = this.amount; + } + if (this.fee != null) { + data.fee = this.fee; + } + if (this.description != null) { + data.description = this.description; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.user_identification.length) + writer.writeString(1, this.user_identification); + if (this.amount != 0) + writer.writeInt64(2, this.amount); + if (this.fee != 0) + writer.writeInt64(3, this.fee); + if (this.description.length) + writer.writeString(4, this.description); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AlipayUniTransferRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AlipayUniTransferRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.user_identification = reader.readString(); + break; + case 2: + message.amount = reader.readInt64(); + break; + case 3: + message.fee = reader.readInt64(); + break; + case 4: + message.description = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AlipayUniTransferRequest { + return AlipayUniTransferRequest.deserialize(bytes); + } + } + export class AlipayUniTransferReply extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | {}) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { } + } + static fromObject(data: {}): AlipayUniTransferReply { + const message = new AlipayUniTransferReply({}); + return message; + } + toObject() { + const data: {} = {}; + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AlipayUniTransferReply { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AlipayUniTransferReply(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AlipayUniTransferReply { + return AlipayUniTransferReply.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedAlipayService { + static definition = { + WapPay: { + path: "/wallet.Alipay/WapPay", + requestStream: false, + responseStream: false, + requestSerialize: (message: AlipayTradeWapPayRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => AlipayTradeWapPayRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: AlipayTradeWapPayReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => AlipayTradeWapPayReply.deserialize(new Uint8Array(bytes)) + }, + PagePay: { + path: "/wallet.Alipay/PagePay", + requestStream: false, + responseStream: false, + requestSerialize: (message: AlipayTradePagePayRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => AlipayTradePagePayRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: AlipayTradePagePayReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => AlipayTradePagePayReply.deserialize(new Uint8Array(bytes)) + }, + AppPay: { + path: "/wallet.Alipay/AppPay", + requestStream: false, + responseStream: false, + requestSerialize: (message: AlipayTradeAppPayRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => AlipayTradeAppPayRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: AlipayTradeAppPayReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => AlipayTradeAppPayReply.deserialize(new Uint8Array(bytes)) + }, + Transfer: { + path: "/wallet.Alipay/Transfer", + requestStream: false, + responseStream: false, + requestSerialize: (message: AlipayUniTransferRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => AlipayUniTransferRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: AlipayUniTransferReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => AlipayUniTransferReply.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract WapPay(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract PagePay(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract AppPay(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Transfer(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class AlipayClient extends grpc_1.makeGenericClientConstructor(UnimplementedAlipayService.definition, "Alipay", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + WapPay: GrpcUnaryServiceInterface = (message: AlipayTradeWapPayRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.WapPay(message, metadata, options, callback); + }; + PagePay: GrpcUnaryServiceInterface = (message: AlipayTradePagePayRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.PagePay(message, metadata, options, callback); + }; + AppPay: GrpcUnaryServiceInterface = (message: AlipayTradeAppPayRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.AppPay(message, metadata, options, callback); + }; + Transfer: GrpcUnaryServiceInterface = (message: AlipayUniTransferRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Transfer(message, metadata, options, callback); + }; + } +} diff --git a/typescript/blocks.ts b/typescript/blocks.ts new file mode 100644 index 0000000..65a4044 --- /dev/null +++ b/typescript/blocks.ts @@ -0,0 +1,485 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 0.0.0 + * source: blocks.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +export namespace wallet { + export class FetchRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + page_no?: number; + page_size?: number; + params?: Map; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("page_no" in data && data.page_no != undefined) { + this.page_no = data.page_no; + } + if ("page_size" in data && data.page_size != undefined) { + this.page_size = data.page_size; + } + if ("params" in data && data.params != undefined) { + this.params = data.params; + } + } + if (!this.params) + this.params = new Map(); + } + get page_no() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set page_no(value: number) { + pb_1.Message.setField(this, 1, value); + } + get page_size() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set page_size(value: number) { + pb_1.Message.setField(this, 2, value); + } + get params() { + return pb_1.Message.getField(this, 3) as any as Map; + } + set params(value: Map) { + pb_1.Message.setField(this, 3, value as any); + } + static fromObject(data: { + page_no?: number; + page_size?: number; + params?: { + [key: string]: string; + }; + }): FetchRequest { + const message = new FetchRequest({}); + if (data.page_no != null) { + message.page_no = data.page_no; + } + if (data.page_size != null) { + message.page_size = data.page_size; + } + if (typeof data.params == "object") { + message.params = new Map(Object.entries(data.params)); + } + return message; + } + toObject() { + const data: { + page_no?: number; + page_size?: number; + params?: { + [key: string]: string; + }; + } = {}; + if (this.page_no != null) { + data.page_no = this.page_no; + } + if (this.page_size != null) { + data.page_size = this.page_size; + } + if (this.params != null) { + data.params = (Object.fromEntries)(this.params); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.page_no != 0) + writer.writeInt64(1, this.page_no); + if (this.page_size != 0) + writer.writeInt64(2, this.page_size); + for (const [key, value] of this.params) { + writer.writeMessage(3, this.params, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FetchRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FetchRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.page_no = reader.readInt64(); + break; + case 2: + message.page_size = reader.readInt64(); + break; + case 3: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.params as any, reader, reader.readString, reader.readString)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FetchRequest { + return FetchRequest.deserialize(bytes); + } + } + export class IdentRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: number; + identity?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("identity" in data && data.identity != undefined) { + this.identity = data.identity; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get identity() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set identity(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + id?: number; + identity?: string; + }): IdentRequest { + const message = new IdentRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (data.identity != null) { + message.identity = data.identity; + } + return message; + } + toObject() { + const data: { + id?: number; + identity?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.identity != null) { + data.identity = this.identity; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != 0) + writer.writeInt64(1, this.id); + if (this.identity.length) + writer.writeString(2, this.identity); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): IdentRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new IdentRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readInt64(); + break; + case 2: + message.identity = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): IdentRequest { + return IdentRequest.deserialize(bytes); + } + } + export class VersionRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + version?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("version" in data && data.version != undefined) { + this.version = data.version; + } + } + } + get version() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set version(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + version?: number; + }): VersionRequest { + const message = new VersionRequest({}); + if (data.version != null) { + message.version = data.version; + } + return message; + } + toObject() { + const data: { + version?: number; + } = {}; + if (this.version != null) { + data.version = this.version; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.version != 0) + writer.writeInt64(1, this.version); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): VersionRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new VersionRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.version = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): VersionRequest { + return VersionRequest.deserialize(bytes); + } + } + export class SearchRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + keyword?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("keyword" in data && data.keyword != undefined) { + this.keyword = data.keyword; + } + } + } + get keyword() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set keyword(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + keyword?: string; + }): SearchRequest { + const message = new SearchRequest({}); + if (data.keyword != null) { + message.keyword = data.keyword; + } + return message; + } + toObject() { + const data: { + keyword?: string; + } = {}; + if (this.keyword != null) { + data.keyword = this.keyword; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.keyword.length) + writer.writeString(1, this.keyword); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SearchRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SearchRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.keyword = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SearchRequest { + return SearchRequest.deserialize(bytes); + } + } + export class StatusReply extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + data?: string; + timeseq?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + if ("timeseq" in data && data.timeseq != undefined) { + this.timeseq = data.timeseq; + } + } + } + get data() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set data(value: string) { + pb_1.Message.setField(this, 1, value); + } + get timeseq() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set timeseq(value: number) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + data?: string; + timeseq?: number; + }): StatusReply { + const message = new StatusReply({}); + if (data.data != null) { + message.data = data.data; + } + if (data.timeseq != null) { + message.timeseq = data.timeseq; + } + return message; + } + toObject() { + const data: { + data?: string; + timeseq?: number; + } = {}; + if (this.data != null) { + data.data = this.data; + } + if (this.timeseq != null) { + data.timeseq = this.timeseq; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.data.length) + writer.writeString(1, this.data); + if (this.timeseq != 0) + writer.writeInt64(2, this.timeseq); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): StatusReply { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new StatusReply(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.data = reader.readString(); + break; + case 2: + message.timeseq = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): StatusReply { + return StatusReply.deserialize(bytes); + } + } + export class Empty extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | {}) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { } + } + static fromObject(data: {}): Empty { + const message = new Empty({}); + return message; + } + toObject() { + const data: {} = {}; + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Empty { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Empty(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Empty { + return Empty.deserialize(bytes); + } + } +} diff --git a/typescript/payment.ts b/typescript/payment.ts new file mode 100644 index 0000000..b2bfb5c --- /dev/null +++ b/typescript/payment.ts @@ -0,0 +1,1243 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 0.0.0 + * source: payment.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as dependency_1 from "./blocks"; +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace wallet { + export class WayRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + platform?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("platform" in data && data.platform != undefined) { + this.platform = data.platform; + } + } + } + get platform() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set platform(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + platform?: string; + }): WayRequest { + const message = new WayRequest({}); + if (data.platform != null) { + message.platform = data.platform; + } + return message; + } + toObject() { + const data: { + platform?: string; + } = {}; + if (this.platform != null) { + data.platform = this.platform; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.platform.length) + writer.writeString(1, this.platform); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WayRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WayRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.platform = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): WayRequest { + return WayRequest.deserialize(bytes); + } + } + export class WayReply extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + way?: WayItem[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("way" in data && data.way != undefined) { + this.way = data.way; + } + } + } + get way() { + return pb_1.Message.getRepeatedWrapperField(this, WayItem, 1) as WayItem[]; + } + set way(value: WayItem[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + way?: ReturnType[]; + }): WayReply { + const message = new WayReply({}); + if (data.way != null) { + message.way = data.way.map(item => WayItem.fromObject(item)); + } + return message; + } + toObject() { + const data: { + way?: ReturnType[]; + } = {}; + if (this.way != null) { + data.way = this.way.map((item: WayItem) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.way.length) + writer.writeRepeatedMessage(1, this.way, (item: WayItem) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WayReply { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WayReply(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.way, () => pb_1.Message.addToRepeatedWrapperField(message, 1, WayItem.deserialize(reader), WayItem)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): WayReply { + return WayReply.deserialize(bytes); + } + } + export class WayItem extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + ident?: string; + title?: string; + intro?: string; + args?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("ident" in data && data.ident != undefined) { + this.ident = data.ident; + } + if ("title" in data && data.title != undefined) { + this.title = data.title; + } + if ("intro" in data && data.intro != undefined) { + this.intro = data.intro; + } + if ("args" in data && data.args != undefined) { + this.args = data.args; + } + } + } + get ident() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set ident(value: string) { + pb_1.Message.setField(this, 1, value); + } + get title() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set title(value: string) { + pb_1.Message.setField(this, 2, value); + } + get intro() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set intro(value: string) { + pb_1.Message.setField(this, 3, value); + } + get args() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set args(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + ident?: string; + title?: string; + intro?: string; + args?: string; + }): WayItem { + const message = new WayItem({}); + if (data.ident != null) { + message.ident = data.ident; + } + if (data.title != null) { + message.title = data.title; + } + if (data.intro != null) { + message.intro = data.intro; + } + if (data.args != null) { + message.args = data.args; + } + return message; + } + toObject() { + const data: { + ident?: string; + title?: string; + intro?: string; + args?: string; + } = {}; + if (this.ident != null) { + data.ident = this.ident; + } + if (this.title != null) { + data.title = this.title; + } + if (this.intro != null) { + data.intro = this.intro; + } + if (this.args != null) { + data.args = this.args; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.ident.length) + writer.writeString(1, this.ident); + if (this.title.length) + writer.writeString(2, this.title); + if (this.intro.length) + writer.writeString(3, this.intro); + if (this.args.length) + writer.writeString(4, this.args); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WayItem { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WayItem(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.ident = reader.readString(); + break; + case 2: + message.title = reader.readString(); + break; + case 3: + message.intro = reader.readString(); + break; + case 4: + message.args = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): WayItem { + return WayItem.deserialize(bytes); + } + } + export class PaymentItem extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + order_no?: string; + trade_no?: string; + type?: number; + pay_channel?: number; + pay_type?: string; + amount?: number; + args?: string; + status?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("order_no" in data && data.order_no != undefined) { + this.order_no = data.order_no; + } + if ("trade_no" in data && data.trade_no != undefined) { + this.trade_no = data.trade_no; + } + if ("type" in data && data.type != undefined) { + this.type = data.type; + } + if ("pay_channel" in data && data.pay_channel != undefined) { + this.pay_channel = data.pay_channel; + } + if ("pay_type" in data && data.pay_type != undefined) { + this.pay_type = data.pay_type; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("args" in data && data.args != undefined) { + this.args = data.args; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + } + } + get order_no() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set order_no(value: string) { + pb_1.Message.setField(this, 1, value); + } + get trade_no() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set trade_no(value: string) { + pb_1.Message.setField(this, 2, value); + } + get type() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set type(value: number) { + pb_1.Message.setField(this, 3, value); + } + get pay_channel() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set pay_channel(value: number) { + pb_1.Message.setField(this, 4, value); + } + get pay_type() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set pay_type(value: string) { + pb_1.Message.setField(this, 5, value); + } + get amount() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set amount(value: number) { + pb_1.Message.setField(this, 6, value); + } + get args() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set args(value: string) { + pb_1.Message.setField(this, 7, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 8, 0) as number; + } + set status(value: number) { + pb_1.Message.setField(this, 8, value); + } + static fromObject(data: { + order_no?: string; + trade_no?: string; + type?: number; + pay_channel?: number; + pay_type?: string; + amount?: number; + args?: string; + status?: number; + }): PaymentItem { + const message = new PaymentItem({}); + if (data.order_no != null) { + message.order_no = data.order_no; + } + if (data.trade_no != null) { + message.trade_no = data.trade_no; + } + if (data.type != null) { + message.type = data.type; + } + if (data.pay_channel != null) { + message.pay_channel = data.pay_channel; + } + if (data.pay_type != null) { + message.pay_type = data.pay_type; + } + if (data.amount != null) { + message.amount = data.amount; + } + if (data.args != null) { + message.args = data.args; + } + if (data.status != null) { + message.status = data.status; + } + return message; + } + toObject() { + const data: { + order_no?: string; + trade_no?: string; + type?: number; + pay_channel?: number; + pay_type?: string; + amount?: number; + args?: string; + status?: number; + } = {}; + if (this.order_no != null) { + data.order_no = this.order_no; + } + if (this.trade_no != null) { + data.trade_no = this.trade_no; + } + if (this.type != null) { + data.type = this.type; + } + if (this.pay_channel != null) { + data.pay_channel = this.pay_channel; + } + if (this.pay_type != null) { + data.pay_type = this.pay_type; + } + if (this.amount != null) { + data.amount = this.amount; + } + if (this.args != null) { + data.args = this.args; + } + if (this.status != null) { + data.status = this.status; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.order_no.length) + writer.writeString(1, this.order_no); + if (this.trade_no.length) + writer.writeString(2, this.trade_no); + if (this.type != 0) + writer.writeInt32(3, this.type); + if (this.pay_channel != 0) + writer.writeInt32(4, this.pay_channel); + if (this.pay_type.length) + writer.writeString(5, this.pay_type); + if (this.amount != 0) + writer.writeInt64(6, this.amount); + if (this.args.length) + writer.writeString(7, this.args); + if (this.status != 0) + writer.writeInt32(8, this.status); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PaymentItem { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PaymentItem(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.order_no = reader.readString(); + break; + case 2: + message.trade_no = reader.readString(); + break; + case 3: + message.type = reader.readInt32(); + break; + case 4: + message.pay_channel = reader.readInt32(); + break; + case 5: + message.pay_type = reader.readString(); + break; + case 6: + message.amount = reader.readInt64(); + break; + case 7: + message.args = reader.readString(); + break; + case 8: + message.status = reader.readInt32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PaymentItem { + return PaymentItem.deserialize(bytes); + } + } + export class ChargeRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + amount?: number; + remark?: string; + pay_channel?: number; + pay_type?: string; + desc?: string; + open_id?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("remark" in data && data.remark != undefined) { + this.remark = data.remark; + } + if ("pay_channel" in data && data.pay_channel != undefined) { + this.pay_channel = data.pay_channel; + } + if ("pay_type" in data && data.pay_type != undefined) { + this.pay_type = data.pay_type; + } + if ("desc" in data && data.desc != undefined) { + this.desc = data.desc; + } + if ("open_id" in data && data.open_id != undefined) { + this.open_id = data.open_id; + } + } + } + get amount() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set amount(value: number) { + pb_1.Message.setField(this, 1, value); + } + get remark() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set remark(value: string) { + pb_1.Message.setField(this, 2, value); + } + get pay_channel() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set pay_channel(value: number) { + pb_1.Message.setField(this, 3, value); + } + get pay_type() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set pay_type(value: string) { + pb_1.Message.setField(this, 4, value); + } + get desc() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set desc(value: string) { + pb_1.Message.setField(this, 5, value); + } + get open_id() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set open_id(value: string) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + amount?: number; + remark?: string; + pay_channel?: number; + pay_type?: string; + desc?: string; + open_id?: string; + }): ChargeRequest { + const message = new ChargeRequest({}); + if (data.amount != null) { + message.amount = data.amount; + } + if (data.remark != null) { + message.remark = data.remark; + } + if (data.pay_channel != null) { + message.pay_channel = data.pay_channel; + } + if (data.pay_type != null) { + message.pay_type = data.pay_type; + } + if (data.desc != null) { + message.desc = data.desc; + } + if (data.open_id != null) { + message.open_id = data.open_id; + } + return message; + } + toObject() { + const data: { + amount?: number; + remark?: string; + pay_channel?: number; + pay_type?: string; + desc?: string; + open_id?: string; + } = {}; + if (this.amount != null) { + data.amount = this.amount; + } + if (this.remark != null) { + data.remark = this.remark; + } + if (this.pay_channel != null) { + data.pay_channel = this.pay_channel; + } + if (this.pay_type != null) { + data.pay_type = this.pay_type; + } + if (this.desc != null) { + data.desc = this.desc; + } + if (this.open_id != null) { + data.open_id = this.open_id; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.amount != 0) + writer.writeInt64(1, this.amount); + if (this.remark.length) + writer.writeString(2, this.remark); + if (this.pay_channel != 0) + writer.writeInt32(3, this.pay_channel); + if (this.pay_type.length) + writer.writeString(4, this.pay_type); + if (this.desc.length) + writer.writeString(5, this.desc); + if (this.open_id.length) + writer.writeString(6, this.open_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ChargeRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ChargeRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.amount = reader.readInt64(); + break; + case 2: + message.remark = reader.readString(); + break; + case 3: + message.pay_channel = reader.readInt32(); + break; + case 4: + message.pay_type = reader.readString(); + break; + case 5: + message.desc = reader.readString(); + break; + case 6: + message.open_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ChargeRequest { + return ChargeRequest.deserialize(bytes); + } + } + export class OrderRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + order_no?: string; + pay_channel?: number; + pay_type?: string; + password?: string; + args?: string; + desc?: string; + open_id?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("order_no" in data && data.order_no != undefined) { + this.order_no = data.order_no; + } + if ("pay_channel" in data && data.pay_channel != undefined) { + this.pay_channel = data.pay_channel; + } + if ("pay_type" in data && data.pay_type != undefined) { + this.pay_type = data.pay_type; + } + if ("password" in data && data.password != undefined) { + this.password = data.password; + } + if ("args" in data && data.args != undefined) { + this.args = data.args; + } + if ("desc" in data && data.desc != undefined) { + this.desc = data.desc; + } + if ("open_id" in data && data.open_id != undefined) { + this.open_id = data.open_id; + } + } + } + get order_no() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set order_no(value: string) { + pb_1.Message.setField(this, 1, value); + } + get pay_channel() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set pay_channel(value: number) { + pb_1.Message.setField(this, 2, value); + } + get pay_type() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set pay_type(value: string) { + pb_1.Message.setField(this, 3, value); + } + get password() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set password(value: string) { + pb_1.Message.setField(this, 4, value); + } + get args() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set args(value: string) { + pb_1.Message.setField(this, 5, value); + } + get desc() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set desc(value: string) { + pb_1.Message.setField(this, 6, value); + } + get open_id() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set open_id(value: string) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + order_no?: string; + pay_channel?: number; + pay_type?: string; + password?: string; + args?: string; + desc?: string; + open_id?: string; + }): OrderRequest { + const message = new OrderRequest({}); + if (data.order_no != null) { + message.order_no = data.order_no; + } + if (data.pay_channel != null) { + message.pay_channel = data.pay_channel; + } + if (data.pay_type != null) { + message.pay_type = data.pay_type; + } + if (data.password != null) { + message.password = data.password; + } + if (data.args != null) { + message.args = data.args; + } + if (data.desc != null) { + message.desc = data.desc; + } + if (data.open_id != null) { + message.open_id = data.open_id; + } + return message; + } + toObject() { + const data: { + order_no?: string; + pay_channel?: number; + pay_type?: string; + password?: string; + args?: string; + desc?: string; + open_id?: string; + } = {}; + if (this.order_no != null) { + data.order_no = this.order_no; + } + if (this.pay_channel != null) { + data.pay_channel = this.pay_channel; + } + if (this.pay_type != null) { + data.pay_type = this.pay_type; + } + if (this.password != null) { + data.password = this.password; + } + if (this.args != null) { + data.args = this.args; + } + if (this.desc != null) { + data.desc = this.desc; + } + if (this.open_id != null) { + data.open_id = this.open_id; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.order_no.length) + writer.writeString(1, this.order_no); + if (this.pay_channel != 0) + writer.writeInt32(2, this.pay_channel); + if (this.pay_type.length) + writer.writeString(3, this.pay_type); + if (this.password.length) + writer.writeString(4, this.password); + if (this.args.length) + writer.writeString(5, this.args); + if (this.desc.length) + writer.writeString(6, this.desc); + if (this.open_id.length) + writer.writeString(7, this.open_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): OrderRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new OrderRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.order_no = reader.readString(); + break; + case 2: + message.pay_channel = reader.readInt32(); + break; + case 3: + message.pay_type = reader.readString(); + break; + case 4: + message.password = reader.readString(); + break; + case 5: + message.args = reader.readString(); + break; + case 6: + message.desc = reader.readString(); + break; + case 7: + message.open_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): OrderRequest { + return OrderRequest.deserialize(bytes); + } + } + export class CallbackRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: number; + identity?: string; + callback_status?: boolean; + callback_msg?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("identity" in data && data.identity != undefined) { + this.identity = data.identity; + } + if ("callback_status" in data && data.callback_status != undefined) { + this.callback_status = data.callback_status; + } + if ("callback_msg" in data && data.callback_msg != undefined) { + this.callback_msg = data.callback_msg; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get identity() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set identity(value: string) { + pb_1.Message.setField(this, 2, value); + } + get callback_status() { + return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean; + } + set callback_status(value: boolean) { + pb_1.Message.setField(this, 3, value); + } + get callback_msg() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set callback_msg(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + id?: number; + identity?: string; + callback_status?: boolean; + callback_msg?: string; + }): CallbackRequest { + const message = new CallbackRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (data.identity != null) { + message.identity = data.identity; + } + if (data.callback_status != null) { + message.callback_status = data.callback_status; + } + if (data.callback_msg != null) { + message.callback_msg = data.callback_msg; + } + return message; + } + toObject() { + const data: { + id?: number; + identity?: string; + callback_status?: boolean; + callback_msg?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.identity != null) { + data.identity = this.identity; + } + if (this.callback_status != null) { + data.callback_status = this.callback_status; + } + if (this.callback_msg != null) { + data.callback_msg = this.callback_msg; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != 0) + writer.writeInt64(1, this.id); + if (this.identity.length) + writer.writeString(2, this.identity); + if (this.callback_status != false) + writer.writeBool(3, this.callback_status); + if (this.callback_msg.length) + writer.writeString(4, this.callback_msg); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CallbackRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CallbackRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readInt64(); + break; + case 2: + message.identity = reader.readString(); + break; + case 3: + message.callback_status = reader.readBool(); + break; + case 4: + message.callback_msg = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CallbackRequest { + return CallbackRequest.deserialize(bytes); + } + } + export class PaymentReply extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + result?: Map; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("result" in data && data.result != undefined) { + this.result = data.result; + } + } + if (!this.result) + this.result = new Map(); + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + get result() { + return pb_1.Message.getField(this, 2) as any as Map; + } + set result(value: Map) { + pb_1.Message.setField(this, 2, value as any); + } + static fromObject(data: { + code?: number; + result?: { + [key: string]: string; + }; + }): PaymentReply { + const message = new PaymentReply({}); + if (data.code != null) { + message.code = data.code; + } + if (typeof data.result == "object") { + message.result = new Map(Object.entries(data.result)); + } + return message; + } + toObject() { + const data: { + code?: number; + result?: { + [key: string]: string; + }; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.result != null) { + data.result = (Object.fromEntries)(this.result); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt64(1, this.code); + for (const [key, value] of this.result) { + writer.writeMessage(2, this.result, () => { + writer.writeString(1, key); + writer.writeString(2, value); + }); + } + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): PaymentReply { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new PaymentReply(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt64(); + break; + case 2: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.result as any, reader, reader.readString, reader.readString)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): PaymentReply { + return PaymentReply.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedPaymentService { + static definition = { + Hello: { + path: "/wallet.Payment/Hello", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_1.wallet.Empty) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_1.wallet.Empty.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: PaymentReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => PaymentReply.deserialize(new Uint8Array(bytes)) + }, + Way: { + path: "/wallet.Payment/Way", + requestStream: false, + responseStream: false, + requestSerialize: (message: WayRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => WayRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: WayReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => WayReply.deserialize(new Uint8Array(bytes)) + }, + Get: { + path: "/wallet.Payment/Get", + requestStream: false, + responseStream: false, + requestSerialize: (message: dependency_1.wallet.IdentRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => dependency_1.wallet.IdentRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: PaymentItem) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => PaymentItem.deserialize(new Uint8Array(bytes)) + }, + ByOrder: { + path: "/wallet.Payment/ByOrder", + requestStream: false, + responseStream: false, + requestSerialize: (message: OrderRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => OrderRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: PaymentReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => PaymentReply.deserialize(new Uint8Array(bytes)) + }, + ByCharge: { + path: "/wallet.Payment/ByCharge", + requestStream: false, + responseStream: false, + requestSerialize: (message: ChargeRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ChargeRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: PaymentReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => PaymentReply.deserialize(new Uint8Array(bytes)) + }, + Callback: { + path: "/wallet.Payment/Callback", + requestStream: false, + responseStream: false, + requestSerialize: (message: CallbackRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => CallbackRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: dependency_1.wallet.StatusReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => dependency_1.wallet.StatusReply.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract Hello(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Way(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Get(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ByOrder(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ByCharge(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Callback(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class PaymentClient extends grpc_1.makeGenericClientConstructor(UnimplementedPaymentService.definition, "Payment", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + Hello: GrpcUnaryServiceInterface = (message: dependency_1.wallet.Empty, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Hello(message, metadata, options, callback); + }; + Way: GrpcUnaryServiceInterface = (message: WayRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Way(message, metadata, options, callback); + }; + Get: GrpcUnaryServiceInterface = (message: dependency_1.wallet.IdentRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Get(message, metadata, options, callback); + }; + ByOrder: GrpcUnaryServiceInterface = (message: OrderRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ByOrder(message, metadata, options, callback); + }; + ByCharge: GrpcUnaryServiceInterface = (message: ChargeRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ByCharge(message, metadata, options, callback); + }; + Callback: GrpcUnaryServiceInterface = (message: CallbackRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Callback(message, metadata, options, callback); + }; + } +} diff --git a/typescript/wallet.ts b/typescript/wallet.ts new file mode 100644 index 0000000..d05c38f --- /dev/null +++ b/typescript/wallet.ts @@ -0,0 +1,2378 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 0.0.0 + * source: wallet.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace wallet { + export class GetWalletRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + is_total_today_in?: boolean; + is_total_today_out?: boolean; + is_total_month_in?: boolean; + is_total_month_out?: boolean; + is_total_all_in?: boolean; + is_total_all_out?: boolean; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("is_total_today_in" in data && data.is_total_today_in != undefined) { + this.is_total_today_in = data.is_total_today_in; + } + if ("is_total_today_out" in data && data.is_total_today_out != undefined) { + this.is_total_today_out = data.is_total_today_out; + } + if ("is_total_month_in" in data && data.is_total_month_in != undefined) { + this.is_total_month_in = data.is_total_month_in; + } + if ("is_total_month_out" in data && data.is_total_month_out != undefined) { + this.is_total_month_out = data.is_total_month_out; + } + if ("is_total_all_in" in data && data.is_total_all_in != undefined) { + this.is_total_all_in = data.is_total_all_in; + } + if ("is_total_all_out" in data && data.is_total_all_out != undefined) { + this.is_total_all_out = data.is_total_all_out; + } + } + } + get is_total_today_in() { + return pb_1.Message.getFieldWithDefault(this, 1, false) as boolean; + } + set is_total_today_in(value: boolean) { + pb_1.Message.setField(this, 1, value); + } + get is_total_today_out() { + return pb_1.Message.getFieldWithDefault(this, 2, false) as boolean; + } + set is_total_today_out(value: boolean) { + pb_1.Message.setField(this, 2, value); + } + get is_total_month_in() { + return pb_1.Message.getFieldWithDefault(this, 3, false) as boolean; + } + set is_total_month_in(value: boolean) { + pb_1.Message.setField(this, 3, value); + } + get is_total_month_out() { + return pb_1.Message.getFieldWithDefault(this, 4, false) as boolean; + } + set is_total_month_out(value: boolean) { + pb_1.Message.setField(this, 4, value); + } + get is_total_all_in() { + return pb_1.Message.getFieldWithDefault(this, 5, false) as boolean; + } + set is_total_all_in(value: boolean) { + pb_1.Message.setField(this, 5, value); + } + get is_total_all_out() { + return pb_1.Message.getFieldWithDefault(this, 6, false) as boolean; + } + set is_total_all_out(value: boolean) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + is_total_today_in?: boolean; + is_total_today_out?: boolean; + is_total_month_in?: boolean; + is_total_month_out?: boolean; + is_total_all_in?: boolean; + is_total_all_out?: boolean; + }): GetWalletRequest { + const message = new GetWalletRequest({}); + if (data.is_total_today_in != null) { + message.is_total_today_in = data.is_total_today_in; + } + if (data.is_total_today_out != null) { + message.is_total_today_out = data.is_total_today_out; + } + if (data.is_total_month_in != null) { + message.is_total_month_in = data.is_total_month_in; + } + if (data.is_total_month_out != null) { + message.is_total_month_out = data.is_total_month_out; + } + if (data.is_total_all_in != null) { + message.is_total_all_in = data.is_total_all_in; + } + if (data.is_total_all_out != null) { + message.is_total_all_out = data.is_total_all_out; + } + return message; + } + toObject() { + const data: { + is_total_today_in?: boolean; + is_total_today_out?: boolean; + is_total_month_in?: boolean; + is_total_month_out?: boolean; + is_total_all_in?: boolean; + is_total_all_out?: boolean; + } = {}; + if (this.is_total_today_in != null) { + data.is_total_today_in = this.is_total_today_in; + } + if (this.is_total_today_out != null) { + data.is_total_today_out = this.is_total_today_out; + } + if (this.is_total_month_in != null) { + data.is_total_month_in = this.is_total_month_in; + } + if (this.is_total_month_out != null) { + data.is_total_month_out = this.is_total_month_out; + } + if (this.is_total_all_in != null) { + data.is_total_all_in = this.is_total_all_in; + } + if (this.is_total_all_out != null) { + data.is_total_all_out = this.is_total_all_out; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.is_total_today_in != false) + writer.writeBool(1, this.is_total_today_in); + if (this.is_total_today_out != false) + writer.writeBool(2, this.is_total_today_out); + if (this.is_total_month_in != false) + writer.writeBool(3, this.is_total_month_in); + if (this.is_total_month_out != false) + writer.writeBool(4, this.is_total_month_out); + if (this.is_total_all_in != false) + writer.writeBool(5, this.is_total_all_in); + if (this.is_total_all_out != false) + writer.writeBool(6, this.is_total_all_out); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetWalletRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetWalletRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.is_total_today_in = reader.readBool(); + break; + case 2: + message.is_total_today_out = reader.readBool(); + break; + case 3: + message.is_total_month_in = reader.readBool(); + break; + case 4: + message.is_total_month_out = reader.readBool(); + break; + case 5: + message.is_total_all_in = reader.readBool(); + break; + case 6: + message.is_total_all_out = reader.readBool(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetWalletRequest { + return GetWalletRequest.deserialize(bytes); + } + } + export class GetWalletReply extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + passport_identity?: string; + wallet_identity?: string; + balance?: number; + withdrawal_balance?: number; + status?: number; + alipay_id?: string; + alipay_name?: string; + wxpay_id?: string; + wxpay_name?: string; + total?: Map; + created?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("passport_identity" in data && data.passport_identity != undefined) { + this.passport_identity = data.passport_identity; + } + if ("wallet_identity" in data && data.wallet_identity != undefined) { + this.wallet_identity = data.wallet_identity; + } + if ("balance" in data && data.balance != undefined) { + this.balance = data.balance; + } + if ("withdrawal_balance" in data && data.withdrawal_balance != undefined) { + this.withdrawal_balance = data.withdrawal_balance; + } + if ("status" in data && data.status != undefined) { + this.status = data.status; + } + if ("alipay_id" in data && data.alipay_id != undefined) { + this.alipay_id = data.alipay_id; + } + if ("alipay_name" in data && data.alipay_name != undefined) { + this.alipay_name = data.alipay_name; + } + if ("wxpay_id" in data && data.wxpay_id != undefined) { + this.wxpay_id = data.wxpay_id; + } + if ("wxpay_name" in data && data.wxpay_name != undefined) { + this.wxpay_name = data.wxpay_name; + } + if ("total" in data && data.total != undefined) { + this.total = data.total; + } + if ("created" in data && data.created != undefined) { + this.created = data.created; + } + } + if (!this.total) + this.total = new Map(); + } + get passport_identity() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set passport_identity(value: string) { + pb_1.Message.setField(this, 1, value); + } + get wallet_identity() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set wallet_identity(value: string) { + pb_1.Message.setField(this, 2, value); + } + get balance() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set balance(value: number) { + pb_1.Message.setField(this, 3, value); + } + get withdrawal_balance() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set withdrawal_balance(value: number) { + pb_1.Message.setField(this, 4, value); + } + get status() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set status(value: number) { + pb_1.Message.setField(this, 5, value); + } + get alipay_id() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set alipay_id(value: string) { + pb_1.Message.setField(this, 6, value); + } + get alipay_name() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set alipay_name(value: string) { + pb_1.Message.setField(this, 7, value); + } + get wxpay_id() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set wxpay_id(value: string) { + pb_1.Message.setField(this, 8, value); + } + get wxpay_name() { + return pb_1.Message.getFieldWithDefault(this, 9, "") as string; + } + set wxpay_name(value: string) { + pb_1.Message.setField(this, 9, value); + } + get total() { + return pb_1.Message.getField(this, 10) as any as Map; + } + set total(value: Map) { + pb_1.Message.setField(this, 10, value as any); + } + get created() { + return pb_1.Message.getFieldWithDefault(this, 11, "") as string; + } + set created(value: string) { + pb_1.Message.setField(this, 11, value); + } + static fromObject(data: { + passport_identity?: string; + wallet_identity?: string; + balance?: number; + withdrawal_balance?: number; + status?: number; + alipay_id?: string; + alipay_name?: string; + wxpay_id?: string; + wxpay_name?: string; + total?: { + [key: string]: number; + }; + created?: string; + }): GetWalletReply { + const message = new GetWalletReply({}); + if (data.passport_identity != null) { + message.passport_identity = data.passport_identity; + } + if (data.wallet_identity != null) { + message.wallet_identity = data.wallet_identity; + } + if (data.balance != null) { + message.balance = data.balance; + } + if (data.withdrawal_balance != null) { + message.withdrawal_balance = data.withdrawal_balance; + } + if (data.status != null) { + message.status = data.status; + } + if (data.alipay_id != null) { + message.alipay_id = data.alipay_id; + } + if (data.alipay_name != null) { + message.alipay_name = data.alipay_name; + } + if (data.wxpay_id != null) { + message.wxpay_id = data.wxpay_id; + } + if (data.wxpay_name != null) { + message.wxpay_name = data.wxpay_name; + } + if (typeof data.total == "object") { + message.total = new Map(Object.entries(data.total)); + } + if (data.created != null) { + message.created = data.created; + } + return message; + } + toObject() { + const data: { + passport_identity?: string; + wallet_identity?: string; + balance?: number; + withdrawal_balance?: number; + status?: number; + alipay_id?: string; + alipay_name?: string; + wxpay_id?: string; + wxpay_name?: string; + total?: { + [key: string]: number; + }; + created?: string; + } = {}; + if (this.passport_identity != null) { + data.passport_identity = this.passport_identity; + } + if (this.wallet_identity != null) { + data.wallet_identity = this.wallet_identity; + } + if (this.balance != null) { + data.balance = this.balance; + } + if (this.withdrawal_balance != null) { + data.withdrawal_balance = this.withdrawal_balance; + } + if (this.status != null) { + data.status = this.status; + } + if (this.alipay_id != null) { + data.alipay_id = this.alipay_id; + } + if (this.alipay_name != null) { + data.alipay_name = this.alipay_name; + } + if (this.wxpay_id != null) { + data.wxpay_id = this.wxpay_id; + } + if (this.wxpay_name != null) { + data.wxpay_name = this.wxpay_name; + } + if (this.total != null) { + data.total = (Object.fromEntries)(this.total); + } + if (this.created != null) { + data.created = this.created; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.passport_identity.length) + writer.writeString(1, this.passport_identity); + if (this.wallet_identity.length) + writer.writeString(2, this.wallet_identity); + if (this.balance != 0) + writer.writeInt64(3, this.balance); + if (this.withdrawal_balance != 0) + writer.writeInt64(4, this.withdrawal_balance); + if (this.status != 0) + writer.writeInt32(5, this.status); + if (this.alipay_id.length) + writer.writeString(6, this.alipay_id); + if (this.alipay_name.length) + writer.writeString(7, this.alipay_name); + if (this.wxpay_id.length) + writer.writeString(8, this.wxpay_id); + if (this.wxpay_name.length) + writer.writeString(9, this.wxpay_name); + for (const [key, value] of this.total) { + writer.writeMessage(10, this.total, () => { + writer.writeString(1, key); + writer.writeInt64(2, value); + }); + } + if (this.created.length) + writer.writeString(11, this.created); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetWalletReply { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetWalletReply(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.passport_identity = reader.readString(); + break; + case 2: + message.wallet_identity = reader.readString(); + break; + case 3: + message.balance = reader.readInt64(); + break; + case 4: + message.withdrawal_balance = reader.readInt64(); + break; + case 5: + message.status = reader.readInt32(); + break; + case 6: + message.alipay_id = reader.readString(); + break; + case 7: + message.alipay_name = reader.readString(); + break; + case 8: + message.wxpay_id = reader.readString(); + break; + case 9: + message.wxpay_name = reader.readString(); + break; + case 10: + reader.readMessage(message, () => pb_1.Map.deserializeBinary(message.total as any, reader, reader.readString, reader.readInt64)); + break; + case 11: + message.created = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetWalletReply { + return GetWalletReply.deserialize(bytes); + } + } + export class TransactionsRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + trans_type?: number; + trade_type?: number; + start?: string; + end?: string; + page?: number; + page_size?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("trans_type" in data && data.trans_type != undefined) { + this.trans_type = data.trans_type; + } + if ("trade_type" in data && data.trade_type != undefined) { + this.trade_type = data.trade_type; + } + if ("start" in data && data.start != undefined) { + this.start = data.start; + } + if ("end" in data && data.end != undefined) { + this.end = data.end; + } + if ("page" in data && data.page != undefined) { + this.page = data.page; + } + if ("page_size" in data && data.page_size != undefined) { + this.page_size = data.page_size; + } + } + } + get trans_type() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set trans_type(value: number) { + pb_1.Message.setField(this, 1, value); + } + get trade_type() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set trade_type(value: number) { + pb_1.Message.setField(this, 2, value); + } + get start() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set start(value: string) { + pb_1.Message.setField(this, 3, value); + } + get end() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set end(value: string) { + pb_1.Message.setField(this, 4, value); + } + get page() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set page(value: number) { + pb_1.Message.setField(this, 5, value); + } + get page_size() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set page_size(value: number) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + trans_type?: number; + trade_type?: number; + start?: string; + end?: string; + page?: number; + page_size?: number; + }): TransactionsRequest { + const message = new TransactionsRequest({}); + if (data.trans_type != null) { + message.trans_type = data.trans_type; + } + if (data.trade_type != null) { + message.trade_type = data.trade_type; + } + if (data.start != null) { + message.start = data.start; + } + if (data.end != null) { + message.end = data.end; + } + if (data.page != null) { + message.page = data.page; + } + if (data.page_size != null) { + message.page_size = data.page_size; + } + return message; + } + toObject() { + const data: { + trans_type?: number; + trade_type?: number; + start?: string; + end?: string; + page?: number; + page_size?: number; + } = {}; + if (this.trans_type != null) { + data.trans_type = this.trans_type; + } + if (this.trade_type != null) { + data.trade_type = this.trade_type; + } + if (this.start != null) { + data.start = this.start; + } + if (this.end != null) { + data.end = this.end; + } + if (this.page != null) { + data.page = this.page; + } + if (this.page_size != null) { + data.page_size = this.page_size; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.trans_type != 0) + writer.writeInt64(1, this.trans_type); + if (this.trade_type != 0) + writer.writeInt64(2, this.trade_type); + if (this.start.length) + writer.writeString(3, this.start); + if (this.end.length) + writer.writeString(4, this.end); + if (this.page != 0) + writer.writeInt64(5, this.page); + if (this.page_size != 0) + writer.writeInt64(6, this.page_size); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TransactionsRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TransactionsRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.trans_type = reader.readInt64(); + break; + case 2: + message.trade_type = reader.readInt64(); + break; + case 3: + message.start = reader.readString(); + break; + case 4: + message.end = reader.readString(); + break; + case 5: + message.page = reader.readInt64(); + break; + case 6: + message.page_size = reader.readInt64(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TransactionsRequest { + return TransactionsRequest.deserialize(bytes); + } + } + export class TransactionsReply extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + total?: number; + records?: Transaction[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [2], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("total" in data && data.total != undefined) { + this.total = data.total; + } + if ("records" in data && data.records != undefined) { + this.records = data.records; + } + } + } + get total() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set total(value: number) { + pb_1.Message.setField(this, 1, value); + } + get records() { + return pb_1.Message.getRepeatedWrapperField(this, Transaction, 2) as Transaction[]; + } + set records(value: Transaction[]) { + pb_1.Message.setRepeatedWrapperField(this, 2, value); + } + static fromObject(data: { + total?: number; + records?: ReturnType[]; + }): TransactionsReply { + const message = new TransactionsReply({}); + if (data.total != null) { + message.total = data.total; + } + if (data.records != null) { + message.records = data.records.map(item => Transaction.fromObject(item)); + } + return message; + } + toObject() { + const data: { + total?: number; + records?: ReturnType[]; + } = {}; + if (this.total != null) { + data.total = this.total; + } + if (this.records != null) { + data.records = this.records.map((item: Transaction) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.total != 0) + writer.writeInt64(1, this.total); + if (this.records.length) + writer.writeRepeatedMessage(2, this.records, (item: Transaction) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): TransactionsReply { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new TransactionsReply(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.total = reader.readInt64(); + break; + case 2: + reader.readMessage(message.records, () => pb_1.Message.addToRepeatedWrapperField(message, 2, Transaction.deserialize(reader), Transaction)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): TransactionsReply { + return TransactionsReply.deserialize(bytes); + } + } + export class Transaction extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + trans_type?: number; + trade_type?: number; + in_trade_no?: string; + out_trade_no?: string; + money?: number; + fee?: number; + pay_channel?: number; + pay_type?: string; + created?: string; + remark?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("trans_type" in data && data.trans_type != undefined) { + this.trans_type = data.trans_type; + } + if ("trade_type" in data && data.trade_type != undefined) { + this.trade_type = data.trade_type; + } + if ("in_trade_no" in data && data.in_trade_no != undefined) { + this.in_trade_no = data.in_trade_no; + } + if ("out_trade_no" in data && data.out_trade_no != undefined) { + this.out_trade_no = data.out_trade_no; + } + if ("money" in data && data.money != undefined) { + this.money = data.money; + } + if ("fee" in data && data.fee != undefined) { + this.fee = data.fee; + } + if ("pay_channel" in data && data.pay_channel != undefined) { + this.pay_channel = data.pay_channel; + } + if ("pay_type" in data && data.pay_type != undefined) { + this.pay_type = data.pay_type; + } + if ("created" in data && data.created != undefined) { + this.created = data.created; + } + if ("remark" in data && data.remark != undefined) { + this.remark = data.remark; + } + } + } + get trans_type() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set trans_type(value: number) { + pb_1.Message.setField(this, 1, value); + } + get trade_type() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set trade_type(value: number) { + pb_1.Message.setField(this, 2, value); + } + get in_trade_no() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set in_trade_no(value: string) { + pb_1.Message.setField(this, 3, value); + } + get out_trade_no() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set out_trade_no(value: string) { + pb_1.Message.setField(this, 4, value); + } + get money() { + return pb_1.Message.getFieldWithDefault(this, 5, 0) as number; + } + set money(value: number) { + pb_1.Message.setField(this, 5, value); + } + get fee() { + return pb_1.Message.getFieldWithDefault(this, 6, 0) as number; + } + set fee(value: number) { + pb_1.Message.setField(this, 6, value); + } + get pay_channel() { + return pb_1.Message.getFieldWithDefault(this, 7, 0) as number; + } + set pay_channel(value: number) { + pb_1.Message.setField(this, 7, value); + } + get pay_type() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set pay_type(value: string) { + pb_1.Message.setField(this, 8, value); + } + get created() { + return pb_1.Message.getFieldWithDefault(this, 9, "") as string; + } + set created(value: string) { + pb_1.Message.setField(this, 9, value); + } + get remark() { + return pb_1.Message.getFieldWithDefault(this, 10, "") as string; + } + set remark(value: string) { + pb_1.Message.setField(this, 10, value); + } + static fromObject(data: { + trans_type?: number; + trade_type?: number; + in_trade_no?: string; + out_trade_no?: string; + money?: number; + fee?: number; + pay_channel?: number; + pay_type?: string; + created?: string; + remark?: string; + }): Transaction { + const message = new Transaction({}); + if (data.trans_type != null) { + message.trans_type = data.trans_type; + } + if (data.trade_type != null) { + message.trade_type = data.trade_type; + } + if (data.in_trade_no != null) { + message.in_trade_no = data.in_trade_no; + } + if (data.out_trade_no != null) { + message.out_trade_no = data.out_trade_no; + } + if (data.money != null) { + message.money = data.money; + } + if (data.fee != null) { + message.fee = data.fee; + } + if (data.pay_channel != null) { + message.pay_channel = data.pay_channel; + } + if (data.pay_type != null) { + message.pay_type = data.pay_type; + } + if (data.created != null) { + message.created = data.created; + } + if (data.remark != null) { + message.remark = data.remark; + } + return message; + } + toObject() { + const data: { + trans_type?: number; + trade_type?: number; + in_trade_no?: string; + out_trade_no?: string; + money?: number; + fee?: number; + pay_channel?: number; + pay_type?: string; + created?: string; + remark?: string; + } = {}; + if (this.trans_type != null) { + data.trans_type = this.trans_type; + } + if (this.trade_type != null) { + data.trade_type = this.trade_type; + } + if (this.in_trade_no != null) { + data.in_trade_no = this.in_trade_no; + } + if (this.out_trade_no != null) { + data.out_trade_no = this.out_trade_no; + } + if (this.money != null) { + data.money = this.money; + } + if (this.fee != null) { + data.fee = this.fee; + } + if (this.pay_channel != null) { + data.pay_channel = this.pay_channel; + } + if (this.pay_type != null) { + data.pay_type = this.pay_type; + } + if (this.created != null) { + data.created = this.created; + } + if (this.remark != null) { + data.remark = this.remark; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.trans_type != 0) + writer.writeInt32(1, this.trans_type); + if (this.trade_type != 0) + writer.writeInt32(2, this.trade_type); + if (this.in_trade_no.length) + writer.writeString(3, this.in_trade_no); + if (this.out_trade_no.length) + writer.writeString(4, this.out_trade_no); + if (this.money != 0) + writer.writeInt64(5, this.money); + if (this.fee != 0) + writer.writeInt64(6, this.fee); + if (this.pay_channel != 0) + writer.writeInt32(7, this.pay_channel); + if (this.pay_type.length) + writer.writeString(8, this.pay_type); + if (this.created.length) + writer.writeString(9, this.created); + if (this.remark.length) + writer.writeString(10, this.remark); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): Transaction { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new Transaction(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.trans_type = reader.readInt32(); + break; + case 2: + message.trade_type = reader.readInt32(); + break; + case 3: + message.in_trade_no = reader.readString(); + break; + case 4: + message.out_trade_no = reader.readString(); + break; + case 5: + message.money = reader.readInt64(); + break; + case 6: + message.fee = reader.readInt64(); + break; + case 7: + message.pay_channel = reader.readInt32(); + break; + case 8: + message.pay_type = reader.readString(); + break; + case 9: + message.created = reader.readString(); + break; + case 10: + message.remark = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): Transaction { + return Transaction.deserialize(bytes); + } + } + export class SetPayPasswordRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + passport_identity?: string; + password?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("passport_identity" in data && data.passport_identity != undefined) { + this.passport_identity = data.passport_identity; + } + if ("password" in data && data.password != undefined) { + this.password = data.password; + } + } + } + get passport_identity() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set passport_identity(value: string) { + pb_1.Message.setField(this, 1, value); + } + get password() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set password(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + passport_identity?: string; + password?: string; + }): SetPayPasswordRequest { + const message = new SetPayPasswordRequest({}); + if (data.passport_identity != null) { + message.passport_identity = data.passport_identity; + } + if (data.password != null) { + message.password = data.password; + } + return message; + } + toObject() { + const data: { + passport_identity?: string; + password?: string; + } = {}; + if (this.passport_identity != null) { + data.passport_identity = this.passport_identity; + } + if (this.password != null) { + data.password = this.password; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.passport_identity.length) + writer.writeString(1, this.passport_identity); + if (this.password.length) + writer.writeString(2, this.password); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): SetPayPasswordRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new SetPayPasswordRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.passport_identity = reader.readString(); + break; + case 2: + message.password = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): SetPayPasswordRequest { + return SetPayPasswordRequest.deserialize(bytes); + } + } + export class BindPaymentIDRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + pay_type?: number; + auth_code?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("pay_type" in data && data.pay_type != undefined) { + this.pay_type = data.pay_type; + } + if ("auth_code" in data && data.auth_code != undefined) { + this.auth_code = data.auth_code; + } + } + } + get pay_type() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set pay_type(value: number) { + pb_1.Message.setField(this, 1, value); + } + get auth_code() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set auth_code(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + pay_type?: number; + auth_code?: string; + }): BindPaymentIDRequest { + const message = new BindPaymentIDRequest({}); + if (data.pay_type != null) { + message.pay_type = data.pay_type; + } + if (data.auth_code != null) { + message.auth_code = data.auth_code; + } + return message; + } + toObject() { + const data: { + pay_type?: number; + auth_code?: string; + } = {}; + if (this.pay_type != null) { + data.pay_type = this.pay_type; + } + if (this.auth_code != null) { + data.auth_code = this.auth_code; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.pay_type != 0) + writer.writeInt32(1, this.pay_type); + if (this.auth_code.length) + writer.writeString(2, this.auth_code); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BindPaymentIDRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BindPaymentIDRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.pay_type = reader.readInt32(); + break; + case 2: + message.auth_code = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): BindPaymentIDRequest { + return BindPaymentIDRequest.deserialize(bytes); + } + } + export class RefundRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + user_identification?: string; + amount?: number; + fee?: number; + remark?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("user_identification" in data && data.user_identification != undefined) { + this.user_identification = data.user_identification; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("fee" in data && data.fee != undefined) { + this.fee = data.fee; + } + if ("remark" in data && data.remark != undefined) { + this.remark = data.remark; + } + } + } + get user_identification() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set user_identification(value: string) { + pb_1.Message.setField(this, 1, value); + } + get amount() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set amount(value: number) { + pb_1.Message.setField(this, 2, value); + } + get fee() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set fee(value: number) { + pb_1.Message.setField(this, 3, value); + } + get remark() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set remark(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + user_identification?: string; + amount?: number; + fee?: number; + remark?: string; + }): RefundRequest { + const message = new RefundRequest({}); + if (data.user_identification != null) { + message.user_identification = data.user_identification; + } + if (data.amount != null) { + message.amount = data.amount; + } + if (data.fee != null) { + message.fee = data.fee; + } + if (data.remark != null) { + message.remark = data.remark; + } + return message; + } + toObject() { + const data: { + user_identification?: string; + amount?: number; + fee?: number; + remark?: string; + } = {}; + if (this.user_identification != null) { + data.user_identification = this.user_identification; + } + if (this.amount != null) { + data.amount = this.amount; + } + if (this.fee != null) { + data.fee = this.fee; + } + if (this.remark != null) { + data.remark = this.remark; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.user_identification.length) + writer.writeString(1, this.user_identification); + if (this.amount != 0) + writer.writeInt64(2, this.amount); + if (this.fee != 0) + writer.writeInt64(3, this.fee); + if (this.remark.length) + writer.writeString(4, this.remark); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RefundRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RefundRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.user_identification = reader.readString(); + break; + case 2: + message.amount = reader.readInt64(); + break; + case 3: + message.fee = reader.readInt64(); + break; + case 4: + message.remark = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RefundRequest { + return RefundRequest.deserialize(bytes); + } + } + export class RefundReply extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + balance?: number; + transaction?: Transaction; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("balance" in data && data.balance != undefined) { + this.balance = data.balance; + } + if ("transaction" in data && data.transaction != undefined) { + this.transaction = data.transaction; + } + } + } + get balance() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set balance(value: number) { + pb_1.Message.setField(this, 1, value); + } + get transaction() { + return pb_1.Message.getWrapperField(this, Transaction, 2) as Transaction; + } + set transaction(value: Transaction) { + pb_1.Message.setWrapperField(this, 2, value); + } + get has_transaction() { + return pb_1.Message.getField(this, 2) != null; + } + static fromObject(data: { + balance?: number; + transaction?: ReturnType; + }): RefundReply { + const message = new RefundReply({}); + if (data.balance != null) { + message.balance = data.balance; + } + if (data.transaction != null) { + message.transaction = Transaction.fromObject(data.transaction); + } + return message; + } + toObject() { + const data: { + balance?: number; + transaction?: ReturnType; + } = {}; + if (this.balance != null) { + data.balance = this.balance; + } + if (this.transaction != null) { + data.transaction = this.transaction.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.balance != 0) + writer.writeInt64(1, this.balance); + if (this.has_transaction) + writer.writeMessage(2, this.transaction, () => this.transaction.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RefundReply { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RefundReply(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.balance = reader.readInt64(); + break; + case 2: + reader.readMessage(message.transaction, () => message.transaction = Transaction.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RefundReply { + return RefundReply.deserialize(bytes); + } + } + export class AddBankCardRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + wallet_identity?: string; + card_no?: string; + card_owner?: string; + id_card?: string; + phone?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("wallet_identity" in data && data.wallet_identity != undefined) { + this.wallet_identity = data.wallet_identity; + } + if ("card_no" in data && data.card_no != undefined) { + this.card_no = data.card_no; + } + if ("card_owner" in data && data.card_owner != undefined) { + this.card_owner = data.card_owner; + } + if ("id_card" in data && data.id_card != undefined) { + this.id_card = data.id_card; + } + if ("phone" in data && data.phone != undefined) { + this.phone = data.phone; + } + } + } + get wallet_identity() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set wallet_identity(value: string) { + pb_1.Message.setField(this, 1, value); + } + get card_no() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set card_no(value: string) { + pb_1.Message.setField(this, 2, value); + } + get card_owner() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set card_owner(value: string) { + pb_1.Message.setField(this, 3, value); + } + get id_card() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set id_card(value: string) { + pb_1.Message.setField(this, 4, value); + } + get phone() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set phone(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + wallet_identity?: string; + card_no?: string; + card_owner?: string; + id_card?: string; + phone?: string; + }): AddBankCardRequest { + const message = new AddBankCardRequest({}); + if (data.wallet_identity != null) { + message.wallet_identity = data.wallet_identity; + } + if (data.card_no != null) { + message.card_no = data.card_no; + } + if (data.card_owner != null) { + message.card_owner = data.card_owner; + } + if (data.id_card != null) { + message.id_card = data.id_card; + } + if (data.phone != null) { + message.phone = data.phone; + } + return message; + } + toObject() { + const data: { + wallet_identity?: string; + card_no?: string; + card_owner?: string; + id_card?: string; + phone?: string; + } = {}; + if (this.wallet_identity != null) { + data.wallet_identity = this.wallet_identity; + } + if (this.card_no != null) { + data.card_no = this.card_no; + } + if (this.card_owner != null) { + data.card_owner = this.card_owner; + } + if (this.id_card != null) { + data.id_card = this.id_card; + } + if (this.phone != null) { + data.phone = this.phone; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.wallet_identity.length) + writer.writeString(1, this.wallet_identity); + if (this.card_no.length) + writer.writeString(2, this.card_no); + if (this.card_owner.length) + writer.writeString(3, this.card_owner); + if (this.id_card.length) + writer.writeString(4, this.id_card); + if (this.phone.length) + writer.writeString(5, this.phone); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): AddBankCardRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new AddBankCardRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.wallet_identity = reader.readString(); + break; + case 2: + message.card_no = reader.readString(); + break; + case 3: + message.card_owner = reader.readString(); + break; + case 4: + message.id_card = reader.readString(); + break; + case 5: + message.phone = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): AddBankCardRequest { + return AddBankCardRequest.deserialize(bytes); + } + } + export class FinanceEmpty extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | {}) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { } + } + static fromObject(data: {}): FinanceEmpty { + const message = new FinanceEmpty({}); + return message; + } + toObject() { + const data: {} = {}; + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): FinanceEmpty { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new FinanceEmpty(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): FinanceEmpty { + return FinanceEmpty.deserialize(bytes); + } + } + export class RmBankCardRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + identity?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("identity" in data && data.identity != undefined) { + this.identity = data.identity; + } + } + } + get identity() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set identity(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + identity?: string; + }): RmBankCardRequest { + const message = new RmBankCardRequest({}); + if (data.identity != null) { + message.identity = data.identity; + } + return message; + } + toObject() { + const data: { + identity?: string; + } = {}; + if (this.identity != null) { + data.identity = this.identity; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.identity.length) + writer.writeString(2, this.identity); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): RmBankCardRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new RmBankCardRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 2: + message.identity = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): RmBankCardRequest { + return RmBankCardRequest.deserialize(bytes); + } + } + export class GetBankCardReply extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + data?: BankCardInfo[]; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [1], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("data" in data && data.data != undefined) { + this.data = data.data; + } + } + } + get data() { + return pb_1.Message.getRepeatedWrapperField(this, BankCardInfo, 1) as BankCardInfo[]; + } + set data(value: BankCardInfo[]) { + pb_1.Message.setRepeatedWrapperField(this, 1, value); + } + static fromObject(data: { + data?: ReturnType[]; + }): GetBankCardReply { + const message = new GetBankCardReply({}); + if (data.data != null) { + message.data = data.data.map(item => BankCardInfo.fromObject(item)); + } + return message; + } + toObject() { + const data: { + data?: ReturnType[]; + } = {}; + if (this.data != null) { + data.data = this.data.map((item: BankCardInfo) => item.toObject()); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.data.length) + writer.writeRepeatedMessage(1, this.data, (item: BankCardInfo) => item.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): GetBankCardReply { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new GetBankCardReply(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + reader.readMessage(message.data, () => pb_1.Message.addToRepeatedWrapperField(message, 1, BankCardInfo.deserialize(reader), BankCardInfo)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): GetBankCardReply { + return GetBankCardReply.deserialize(bytes); + } + } + export class BankCardInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: number; + bank_number?: string; + bank_name?: string; + card_owner?: string; + id_card?: string; + phone?: string; + bind_id?: string; + bank_type?: string; + bank?: string; + created?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("bank_number" in data && data.bank_number != undefined) { + this.bank_number = data.bank_number; + } + if ("bank_name" in data && data.bank_name != undefined) { + this.bank_name = data.bank_name; + } + if ("card_owner" in data && data.card_owner != undefined) { + this.card_owner = data.card_owner; + } + if ("id_card" in data && data.id_card != undefined) { + this.id_card = data.id_card; + } + if ("phone" in data && data.phone != undefined) { + this.phone = data.phone; + } + if ("bind_id" in data && data.bind_id != undefined) { + this.bind_id = data.bind_id; + } + if ("bank_type" in data && data.bank_type != undefined) { + this.bank_type = data.bank_type; + } + if ("bank" in data && data.bank != undefined) { + this.bank = data.bank; + } + if ("created" in data && data.created != undefined) { + this.created = data.created; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set id(value: number) { + pb_1.Message.setField(this, 1, value); + } + get bank_number() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set bank_number(value: string) { + pb_1.Message.setField(this, 2, value); + } + get bank_name() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set bank_name(value: string) { + pb_1.Message.setField(this, 3, value); + } + get card_owner() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set card_owner(value: string) { + pb_1.Message.setField(this, 4, value); + } + get id_card() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set id_card(value: string) { + pb_1.Message.setField(this, 5, value); + } + get phone() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set phone(value: string) { + pb_1.Message.setField(this, 6, value); + } + get bind_id() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set bind_id(value: string) { + pb_1.Message.setField(this, 7, value); + } + get bank_type() { + return pb_1.Message.getFieldWithDefault(this, 8, "") as string; + } + set bank_type(value: string) { + pb_1.Message.setField(this, 8, value); + } + get bank() { + return pb_1.Message.getFieldWithDefault(this, 9, "") as string; + } + set bank(value: string) { + pb_1.Message.setField(this, 9, value); + } + get created() { + return pb_1.Message.getFieldWithDefault(this, 10, "") as string; + } + set created(value: string) { + pb_1.Message.setField(this, 10, value); + } + static fromObject(data: { + id?: number; + bank_number?: string; + bank_name?: string; + card_owner?: string; + id_card?: string; + phone?: string; + bind_id?: string; + bank_type?: string; + bank?: string; + created?: string; + }): BankCardInfo { + const message = new BankCardInfo({}); + if (data.id != null) { + message.id = data.id; + } + if (data.bank_number != null) { + message.bank_number = data.bank_number; + } + if (data.bank_name != null) { + message.bank_name = data.bank_name; + } + if (data.card_owner != null) { + message.card_owner = data.card_owner; + } + if (data.id_card != null) { + message.id_card = data.id_card; + } + if (data.phone != null) { + message.phone = data.phone; + } + if (data.bind_id != null) { + message.bind_id = data.bind_id; + } + if (data.bank_type != null) { + message.bank_type = data.bank_type; + } + if (data.bank != null) { + message.bank = data.bank; + } + if (data.created != null) { + message.created = data.created; + } + return message; + } + toObject() { + const data: { + id?: number; + bank_number?: string; + bank_name?: string; + card_owner?: string; + id_card?: string; + phone?: string; + bind_id?: string; + bank_type?: string; + bank?: string; + created?: string; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.bank_number != null) { + data.bank_number = this.bank_number; + } + if (this.bank_name != null) { + data.bank_name = this.bank_name; + } + if (this.card_owner != null) { + data.card_owner = this.card_owner; + } + if (this.id_card != null) { + data.id_card = this.id_card; + } + if (this.phone != null) { + data.phone = this.phone; + } + if (this.bind_id != null) { + data.bind_id = this.bind_id; + } + if (this.bank_type != null) { + data.bank_type = this.bank_type; + } + if (this.bank != null) { + data.bank = this.bank; + } + if (this.created != null) { + data.created = this.created; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id != 0) + writer.writeInt64(1, this.id); + if (this.bank_number.length) + writer.writeString(2, this.bank_number); + if (this.bank_name.length) + writer.writeString(3, this.bank_name); + if (this.card_owner.length) + writer.writeString(4, this.card_owner); + if (this.id_card.length) + writer.writeString(5, this.id_card); + if (this.phone.length) + writer.writeString(6, this.phone); + if (this.bind_id.length) + writer.writeString(7, this.bind_id); + if (this.bank_type.length) + writer.writeString(8, this.bank_type); + if (this.bank.length) + writer.writeString(9, this.bank); + if (this.created.length) + writer.writeString(10, this.created); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): BankCardInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new BankCardInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readInt64(); + break; + case 2: + message.bank_number = reader.readString(); + break; + case 3: + message.bank_name = reader.readString(); + break; + case 4: + message.card_owner = reader.readString(); + break; + case 5: + message.id_card = reader.readString(); + break; + case 6: + message.phone = reader.readString(); + break; + case 7: + message.bind_id = reader.readString(); + break; + case 8: + message.bank_type = reader.readString(); + break; + case 9: + message.bank = reader.readString(); + break; + case 10: + message.created = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): BankCardInfo { + return BankCardInfo.deserialize(bytes); + } + } + export class ApplyCashRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + channel?: number; + amount?: number; + remark?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("channel" in data && data.channel != undefined) { + this.channel = data.channel; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("remark" in data && data.remark != undefined) { + this.remark = data.remark; + } + } + } + get channel() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set channel(value: number) { + pb_1.Message.setField(this, 1, value); + } + get amount() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set amount(value: number) { + pb_1.Message.setField(this, 2, value); + } + get remark() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set remark(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + channel?: number; + amount?: number; + remark?: string; + }): ApplyCashRequest { + const message = new ApplyCashRequest({}); + if (data.channel != null) { + message.channel = data.channel; + } + if (data.amount != null) { + message.amount = data.amount; + } + if (data.remark != null) { + message.remark = data.remark; + } + return message; + } + toObject() { + const data: { + channel?: number; + amount?: number; + remark?: string; + } = {}; + if (this.channel != null) { + data.channel = this.channel; + } + if (this.amount != null) { + data.amount = this.amount; + } + if (this.remark != null) { + data.remark = this.remark; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.channel != 0) + writer.writeInt32(1, this.channel); + if (this.amount != 0) + writer.writeInt64(2, this.amount); + if (this.remark.length) + writer.writeString(3, this.remark); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): ApplyCashRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new ApplyCashRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.channel = reader.readInt32(); + break; + case 2: + message.amount = reader.readInt64(); + break; + case 3: + message.remark = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): ApplyCashRequest { + return ApplyCashRequest.deserialize(bytes); + } + } + export class CodeReply extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: number; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, 0) as number; + } + set code(value: number) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + code?: number; + }): CodeReply { + const message = new CodeReply({}); + if (data.code != null) { + message.code = data.code; + } + return message; + } + toObject() { + const data: { + code?: number; + } = {}; + if (this.code != null) { + data.code = this.code; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code != 0) + writer.writeInt32(1, this.code); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CodeReply { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CodeReply(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readInt32(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CodeReply { + return CodeReply.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedBasicService { + static definition = { + GetWallet: { + path: "/wallet.Basic/GetWallet", + requestStream: false, + responseStream: false, + requestSerialize: (message: GetWalletRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => GetWalletRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetWalletReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetWalletReply.deserialize(new Uint8Array(bytes)) + }, + SetPayPassword: { + path: "/wallet.Basic/SetPayPassword", + requestStream: false, + responseStream: false, + requestSerialize: (message: SetPayPasswordRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => SetPayPasswordRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CodeReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CodeReply.deserialize(new Uint8Array(bytes)) + }, + BindPaymentId: { + path: "/wallet.Basic/BindPaymentId", + requestStream: false, + responseStream: false, + requestSerialize: (message: BindPaymentIDRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => BindPaymentIDRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CodeReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CodeReply.deserialize(new Uint8Array(bytes)) + }, + Transactions: { + path: "/wallet.Basic/Transactions", + requestStream: false, + responseStream: false, + requestSerialize: (message: TransactionsRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => TransactionsRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: TransactionsReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => TransactionsReply.deserialize(new Uint8Array(bytes)) + }, + AddBankCard: { + path: "/wallet.Basic/AddBankCard", + requestStream: false, + responseStream: false, + requestSerialize: (message: AddBankCardRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => AddBankCardRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CodeReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CodeReply.deserialize(new Uint8Array(bytes)) + }, + GetBankCard: { + path: "/wallet.Basic/GetBankCard", + requestStream: false, + responseStream: false, + requestSerialize: (message: FinanceEmpty) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => FinanceEmpty.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: GetBankCardReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => GetBankCardReply.deserialize(new Uint8Array(bytes)) + }, + RmBankCard: { + path: "/wallet.Basic/RmBankCard", + requestStream: false, + responseStream: false, + requestSerialize: (message: RmBankCardRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => RmBankCardRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CodeReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CodeReply.deserialize(new Uint8Array(bytes)) + }, + ApplyCash: { + path: "/wallet.Basic/ApplyCash", + requestStream: false, + responseStream: false, + requestSerialize: (message: ApplyCashRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => ApplyCashRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CodeReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CodeReply.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract GetWallet(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract SetPayPassword(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract BindPaymentId(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Transactions(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract AddBankCard(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract GetBankCard(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract RmBankCard(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract ApplyCash(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class BasicClient extends grpc_1.makeGenericClientConstructor(UnimplementedBasicService.definition, "Basic", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + GetWallet: GrpcUnaryServiceInterface = (message: GetWalletRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetWallet(message, metadata, options, callback); + }; + SetPayPassword: GrpcUnaryServiceInterface = (message: SetPayPasswordRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.SetPayPassword(message, metadata, options, callback); + }; + BindPaymentId: GrpcUnaryServiceInterface = (message: BindPaymentIDRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.BindPaymentId(message, metadata, options, callback); + }; + Transactions: GrpcUnaryServiceInterface = (message: TransactionsRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Transactions(message, metadata, options, callback); + }; + AddBankCard: GrpcUnaryServiceInterface = (message: AddBankCardRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.AddBankCard(message, metadata, options, callback); + }; + GetBankCard: GrpcUnaryServiceInterface = (message: FinanceEmpty, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.GetBankCard(message, metadata, options, callback); + }; + RmBankCard: GrpcUnaryServiceInterface = (message: RmBankCardRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.RmBankCard(message, metadata, options, callback); + }; + ApplyCash: GrpcUnaryServiceInterface = (message: ApplyCashRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.ApplyCash(message, metadata, options, callback); + }; + } +} diff --git a/typescript/wechat.ts b/typescript/wechat.ts new file mode 100644 index 0000000..3ae7e6f --- /dev/null +++ b/typescript/wechat.ts @@ -0,0 +1,1788 @@ +/** + * Generated by the protoc-gen-ts. DO NOT EDIT! + * compiler version: 0.0.0 + * source: wechat.proto + * git: https://github.com/thesayyn/protoc-gen-ts */ +import * as pb_1 from "google-protobuf"; +import * as grpc_1 from "@grpc/grpc-js"; +export namespace wallet { + export class WxpayJSAPIPreOrderRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + user_identification?: string; + amount?: number; + auth_code?: string; + description?: string; + notify_url?: string; + orderNo?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("user_identification" in data && data.user_identification != undefined) { + this.user_identification = data.user_identification; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("auth_code" in data && data.auth_code != undefined) { + this.auth_code = data.auth_code; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("notify_url" in data && data.notify_url != undefined) { + this.notify_url = data.notify_url; + } + if ("orderNo" in data && data.orderNo != undefined) { + this.orderNo = data.orderNo; + } + } + } + get user_identification() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set user_identification(value: string) { + pb_1.Message.setField(this, 1, value); + } + get amount() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set amount(value: number) { + pb_1.Message.setField(this, 2, value); + } + get auth_code() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set auth_code(value: string) { + pb_1.Message.setField(this, 3, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 4, value); + } + get notify_url() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set notify_url(value: string) { + pb_1.Message.setField(this, 5, value); + } + get orderNo() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set orderNo(value: string) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + user_identification?: string; + amount?: number; + auth_code?: string; + description?: string; + notify_url?: string; + orderNo?: string; + }): WxpayJSAPIPreOrderRequest { + const message = new WxpayJSAPIPreOrderRequest({}); + if (data.user_identification != null) { + message.user_identification = data.user_identification; + } + if (data.amount != null) { + message.amount = data.amount; + } + if (data.auth_code != null) { + message.auth_code = data.auth_code; + } + if (data.description != null) { + message.description = data.description; + } + if (data.notify_url != null) { + message.notify_url = data.notify_url; + } + if (data.orderNo != null) { + message.orderNo = data.orderNo; + } + return message; + } + toObject() { + const data: { + user_identification?: string; + amount?: number; + auth_code?: string; + description?: string; + notify_url?: string; + orderNo?: string; + } = {}; + if (this.user_identification != null) { + data.user_identification = this.user_identification; + } + if (this.amount != null) { + data.amount = this.amount; + } + if (this.auth_code != null) { + data.auth_code = this.auth_code; + } + if (this.description != null) { + data.description = this.description; + } + if (this.notify_url != null) { + data.notify_url = this.notify_url; + } + if (this.orderNo != null) { + data.orderNo = this.orderNo; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.user_identification.length) + writer.writeString(1, this.user_identification); + if (this.amount != 0) + writer.writeInt64(2, this.amount); + if (this.auth_code.length) + writer.writeString(3, this.auth_code); + if (this.description.length) + writer.writeString(4, this.description); + if (this.notify_url.length) + writer.writeString(5, this.notify_url); + if (this.orderNo.length) + writer.writeString(6, this.orderNo); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WxpayJSAPIPreOrderRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WxpayJSAPIPreOrderRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.user_identification = reader.readString(); + break; + case 2: + message.amount = reader.readInt64(); + break; + case 3: + message.auth_code = reader.readString(); + break; + case 4: + message.description = reader.readString(); + break; + case 5: + message.notify_url = reader.readString(); + break; + case 6: + message.orderNo = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): WxpayJSAPIPreOrderRequest { + return WxpayJSAPIPreOrderRequest.deserialize(bytes); + } + } + export class WxpayJSAPIPreOrderReply extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + prepay_id?: string; + app_id?: string; + timestamp?: string; + nonce_str?: string; + sign_type?: string; + sign?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("prepay_id" in data && data.prepay_id != undefined) { + this.prepay_id = data.prepay_id; + } + if ("app_id" in data && data.app_id != undefined) { + this.app_id = data.app_id; + } + if ("timestamp" in data && data.timestamp != undefined) { + this.timestamp = data.timestamp; + } + if ("nonce_str" in data && data.nonce_str != undefined) { + this.nonce_str = data.nonce_str; + } + if ("sign_type" in data && data.sign_type != undefined) { + this.sign_type = data.sign_type; + } + if ("sign" in data && data.sign != undefined) { + this.sign = data.sign; + } + } + } + get prepay_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set prepay_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get app_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set app_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get timestamp() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set timestamp(value: string) { + pb_1.Message.setField(this, 3, value); + } + get nonce_str() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set nonce_str(value: string) { + pb_1.Message.setField(this, 4, value); + } + get sign_type() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set sign_type(value: string) { + pb_1.Message.setField(this, 5, value); + } + get sign() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set sign(value: string) { + pb_1.Message.setField(this, 6, value); + } + static fromObject(data: { + prepay_id?: string; + app_id?: string; + timestamp?: string; + nonce_str?: string; + sign_type?: string; + sign?: string; + }): WxpayJSAPIPreOrderReply { + const message = new WxpayJSAPIPreOrderReply({}); + if (data.prepay_id != null) { + message.prepay_id = data.prepay_id; + } + if (data.app_id != null) { + message.app_id = data.app_id; + } + if (data.timestamp != null) { + message.timestamp = data.timestamp; + } + if (data.nonce_str != null) { + message.nonce_str = data.nonce_str; + } + if (data.sign_type != null) { + message.sign_type = data.sign_type; + } + if (data.sign != null) { + message.sign = data.sign; + } + return message; + } + toObject() { + const data: { + prepay_id?: string; + app_id?: string; + timestamp?: string; + nonce_str?: string; + sign_type?: string; + sign?: string; + } = {}; + if (this.prepay_id != null) { + data.prepay_id = this.prepay_id; + } + if (this.app_id != null) { + data.app_id = this.app_id; + } + if (this.timestamp != null) { + data.timestamp = this.timestamp; + } + if (this.nonce_str != null) { + data.nonce_str = this.nonce_str; + } + if (this.sign_type != null) { + data.sign_type = this.sign_type; + } + if (this.sign != null) { + data.sign = this.sign; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.prepay_id.length) + writer.writeString(1, this.prepay_id); + if (this.app_id.length) + writer.writeString(2, this.app_id); + if (this.timestamp.length) + writer.writeString(3, this.timestamp); + if (this.nonce_str.length) + writer.writeString(4, this.nonce_str); + if (this.sign_type.length) + writer.writeString(5, this.sign_type); + if (this.sign.length) + writer.writeString(6, this.sign); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WxpayJSAPIPreOrderReply { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WxpayJSAPIPreOrderReply(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.prepay_id = reader.readString(); + break; + case 2: + message.app_id = reader.readString(); + break; + case 3: + message.timestamp = reader.readString(); + break; + case 4: + message.nonce_str = reader.readString(); + break; + case 5: + message.sign_type = reader.readString(); + break; + case 6: + message.sign = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): WxpayJSAPIPreOrderReply { + return WxpayJSAPIPreOrderReply.deserialize(bytes); + } + } + export class WxpayAppPreOrderRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + user_identification?: string; + amount?: number; + description?: string; + notify_url?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("user_identification" in data && data.user_identification != undefined) { + this.user_identification = data.user_identification; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("notify_url" in data && data.notify_url != undefined) { + this.notify_url = data.notify_url; + } + } + } + get user_identification() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set user_identification(value: string) { + pb_1.Message.setField(this, 1, value); + } + get amount() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set amount(value: number) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get notify_url() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set notify_url(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + user_identification?: string; + amount?: number; + description?: string; + notify_url?: string; + }): WxpayAppPreOrderRequest { + const message = new WxpayAppPreOrderRequest({}); + if (data.user_identification != null) { + message.user_identification = data.user_identification; + } + if (data.amount != null) { + message.amount = data.amount; + } + if (data.description != null) { + message.description = data.description; + } + if (data.notify_url != null) { + message.notify_url = data.notify_url; + } + return message; + } + toObject() { + const data: { + user_identification?: string; + amount?: number; + description?: string; + notify_url?: string; + } = {}; + if (this.user_identification != null) { + data.user_identification = this.user_identification; + } + if (this.amount != null) { + data.amount = this.amount; + } + if (this.description != null) { + data.description = this.description; + } + if (this.notify_url != null) { + data.notify_url = this.notify_url; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.user_identification.length) + writer.writeString(1, this.user_identification); + if (this.amount != 0) + writer.writeInt64(2, this.amount); + if (this.description.length) + writer.writeString(3, this.description); + if (this.notify_url.length) + writer.writeString(4, this.notify_url); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WxpayAppPreOrderRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WxpayAppPreOrderRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.user_identification = reader.readString(); + break; + case 2: + message.amount = reader.readInt64(); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + message.notify_url = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): WxpayAppPreOrderRequest { + return WxpayAppPreOrderRequest.deserialize(bytes); + } + } + export class WxpayAppPreOrderReply extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + prepay_id?: string; + app_id?: string; + mch_id?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("prepay_id" in data && data.prepay_id != undefined) { + this.prepay_id = data.prepay_id; + } + if ("app_id" in data && data.app_id != undefined) { + this.app_id = data.app_id; + } + if ("mch_id" in data && data.mch_id != undefined) { + this.mch_id = data.mch_id; + } + } + } + get prepay_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set prepay_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get app_id() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set app_id(value: string) { + pb_1.Message.setField(this, 2, value); + } + get mch_id() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set mch_id(value: string) { + pb_1.Message.setField(this, 3, value); + } + static fromObject(data: { + prepay_id?: string; + app_id?: string; + mch_id?: string; + }): WxpayAppPreOrderReply { + const message = new WxpayAppPreOrderReply({}); + if (data.prepay_id != null) { + message.prepay_id = data.prepay_id; + } + if (data.app_id != null) { + message.app_id = data.app_id; + } + if (data.mch_id != null) { + message.mch_id = data.mch_id; + } + return message; + } + toObject() { + const data: { + prepay_id?: string; + app_id?: string; + mch_id?: string; + } = {}; + if (this.prepay_id != null) { + data.prepay_id = this.prepay_id; + } + if (this.app_id != null) { + data.app_id = this.app_id; + } + if (this.mch_id != null) { + data.mch_id = this.mch_id; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.prepay_id.length) + writer.writeString(1, this.prepay_id); + if (this.app_id.length) + writer.writeString(2, this.app_id); + if (this.mch_id.length) + writer.writeString(3, this.mch_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WxpayAppPreOrderReply { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WxpayAppPreOrderReply(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.prepay_id = reader.readString(); + break; + case 2: + message.app_id = reader.readString(); + break; + case 3: + message.mch_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): WxpayAppPreOrderReply { + return WxpayAppPreOrderReply.deserialize(bytes); + } + } + export class WxpayNativePreOrderRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + user_identification?: string; + amount?: number; + description?: string; + notify_url?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("user_identification" in data && data.user_identification != undefined) { + this.user_identification = data.user_identification; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("notify_url" in data && data.notify_url != undefined) { + this.notify_url = data.notify_url; + } + } + } + get user_identification() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set user_identification(value: string) { + pb_1.Message.setField(this, 1, value); + } + get amount() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set amount(value: number) { + pb_1.Message.setField(this, 2, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 3, value); + } + get notify_url() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set notify_url(value: string) { + pb_1.Message.setField(this, 4, value); + } + static fromObject(data: { + user_identification?: string; + amount?: number; + description?: string; + notify_url?: string; + }): WxpayNativePreOrderRequest { + const message = new WxpayNativePreOrderRequest({}); + if (data.user_identification != null) { + message.user_identification = data.user_identification; + } + if (data.amount != null) { + message.amount = data.amount; + } + if (data.description != null) { + message.description = data.description; + } + if (data.notify_url != null) { + message.notify_url = data.notify_url; + } + return message; + } + toObject() { + const data: { + user_identification?: string; + amount?: number; + description?: string; + notify_url?: string; + } = {}; + if (this.user_identification != null) { + data.user_identification = this.user_identification; + } + if (this.amount != null) { + data.amount = this.amount; + } + if (this.description != null) { + data.description = this.description; + } + if (this.notify_url != null) { + data.notify_url = this.notify_url; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.user_identification.length) + writer.writeString(1, this.user_identification); + if (this.amount != 0) + writer.writeInt64(2, this.amount); + if (this.description.length) + writer.writeString(3, this.description); + if (this.notify_url.length) + writer.writeString(4, this.notify_url); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WxpayNativePreOrderRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WxpayNativePreOrderRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.user_identification = reader.readString(); + break; + case 2: + message.amount = reader.readInt64(); + break; + case 3: + message.description = reader.readString(); + break; + case 4: + message.notify_url = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): WxpayNativePreOrderRequest { + return WxpayNativePreOrderRequest.deserialize(bytes); + } + } + export class WxpayNativePreOrderReply extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code_url?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code_url" in data && data.code_url != undefined) { + this.code_url = data.code_url; + } + } + } + get code_url() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set code_url(value: string) { + pb_1.Message.setField(this, 1, value); + } + static fromObject(data: { + code_url?: string; + }): WxpayNativePreOrderReply { + const message = new WxpayNativePreOrderReply({}); + if (data.code_url != null) { + message.code_url = data.code_url; + } + return message; + } + toObject() { + const data: { + code_url?: string; + } = {}; + if (this.code_url != null) { + data.code_url = this.code_url; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code_url.length) + writer.writeString(1, this.code_url); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WxpayNativePreOrderReply { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WxpayNativePreOrderReply(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code_url = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): WxpayNativePreOrderReply { + return WxpayNativePreOrderReply.deserialize(bytes); + } + } + export class WxpayTransferRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + user_identification?: string; + amount?: number; + fee?: number; + description?: string; + transfer_name?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("user_identification" in data && data.user_identification != undefined) { + this.user_identification = data.user_identification; + } + if ("amount" in data && data.amount != undefined) { + this.amount = data.amount; + } + if ("fee" in data && data.fee != undefined) { + this.fee = data.fee; + } + if ("description" in data && data.description != undefined) { + this.description = data.description; + } + if ("transfer_name" in data && data.transfer_name != undefined) { + this.transfer_name = data.transfer_name; + } + } + } + get user_identification() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set user_identification(value: string) { + pb_1.Message.setField(this, 1, value); + } + get amount() { + return pb_1.Message.getFieldWithDefault(this, 2, 0) as number; + } + set amount(value: number) { + pb_1.Message.setField(this, 2, value); + } + get fee() { + return pb_1.Message.getFieldWithDefault(this, 3, 0) as number; + } + set fee(value: number) { + pb_1.Message.setField(this, 3, value); + } + get description() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set description(value: string) { + pb_1.Message.setField(this, 4, value); + } + get transfer_name() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set transfer_name(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + user_identification?: string; + amount?: number; + fee?: number; + description?: string; + transfer_name?: string; + }): WxpayTransferRequest { + const message = new WxpayTransferRequest({}); + if (data.user_identification != null) { + message.user_identification = data.user_identification; + } + if (data.amount != null) { + message.amount = data.amount; + } + if (data.fee != null) { + message.fee = data.fee; + } + if (data.description != null) { + message.description = data.description; + } + if (data.transfer_name != null) { + message.transfer_name = data.transfer_name; + } + return message; + } + toObject() { + const data: { + user_identification?: string; + amount?: number; + fee?: number; + description?: string; + transfer_name?: string; + } = {}; + if (this.user_identification != null) { + data.user_identification = this.user_identification; + } + if (this.amount != null) { + data.amount = this.amount; + } + if (this.fee != null) { + data.fee = this.fee; + } + if (this.description != null) { + data.description = this.description; + } + if (this.transfer_name != null) { + data.transfer_name = this.transfer_name; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.user_identification.length) + writer.writeString(1, this.user_identification); + if (this.amount != 0) + writer.writeInt64(2, this.amount); + if (this.fee != 0) + writer.writeInt64(3, this.fee); + if (this.description.length) + writer.writeString(4, this.description); + if (this.transfer_name.length) + writer.writeString(5, this.transfer_name); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WxpayTransferRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WxpayTransferRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.user_identification = reader.readString(); + break; + case 2: + message.amount = reader.readInt64(); + break; + case 3: + message.fee = reader.readInt64(); + break; + case 4: + message.description = reader.readString(); + break; + case 5: + message.transfer_name = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): WxpayTransferRequest { + return WxpayTransferRequest.deserialize(bytes); + } + } + export class WxpayTransferReply extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | {}) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { } + } + static fromObject(data: {}): WxpayTransferReply { + const message = new WxpayTransferReply({}); + return message; + } + toObject() { + const data: {} = {}; + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WxpayTransferReply { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WxpayTransferReply(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): WxpayTransferReply { + return WxpayTransferReply.deserialize(bytes); + } + } + export class WxCallBackResource extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + original_type?: string; + algorithm?: string; + ciphertext?: string; + associated_data?: string; + nonce?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("original_type" in data && data.original_type != undefined) { + this.original_type = data.original_type; + } + if ("algorithm" in data && data.algorithm != undefined) { + this.algorithm = data.algorithm; + } + if ("ciphertext" in data && data.ciphertext != undefined) { + this.ciphertext = data.ciphertext; + } + if ("associated_data" in data && data.associated_data != undefined) { + this.associated_data = data.associated_data; + } + if ("nonce" in data && data.nonce != undefined) { + this.nonce = data.nonce; + } + } + } + get original_type() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set original_type(value: string) { + pb_1.Message.setField(this, 1, value); + } + get algorithm() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set algorithm(value: string) { + pb_1.Message.setField(this, 2, value); + } + get ciphertext() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set ciphertext(value: string) { + pb_1.Message.setField(this, 3, value); + } + get associated_data() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set associated_data(value: string) { + pb_1.Message.setField(this, 4, value); + } + get nonce() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set nonce(value: string) { + pb_1.Message.setField(this, 5, value); + } + static fromObject(data: { + original_type?: string; + algorithm?: string; + ciphertext?: string; + associated_data?: string; + nonce?: string; + }): WxCallBackResource { + const message = new WxCallBackResource({}); + if (data.original_type != null) { + message.original_type = data.original_type; + } + if (data.algorithm != null) { + message.algorithm = data.algorithm; + } + if (data.ciphertext != null) { + message.ciphertext = data.ciphertext; + } + if (data.associated_data != null) { + message.associated_data = data.associated_data; + } + if (data.nonce != null) { + message.nonce = data.nonce; + } + return message; + } + toObject() { + const data: { + original_type?: string; + algorithm?: string; + ciphertext?: string; + associated_data?: string; + nonce?: string; + } = {}; + if (this.original_type != null) { + data.original_type = this.original_type; + } + if (this.algorithm != null) { + data.algorithm = this.algorithm; + } + if (this.ciphertext != null) { + data.ciphertext = this.ciphertext; + } + if (this.associated_data != null) { + data.associated_data = this.associated_data; + } + if (this.nonce != null) { + data.nonce = this.nonce; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.original_type.length) + writer.writeString(1, this.original_type); + if (this.algorithm.length) + writer.writeString(2, this.algorithm); + if (this.ciphertext.length) + writer.writeString(3, this.ciphertext); + if (this.associated_data.length) + writer.writeString(4, this.associated_data); + if (this.nonce.length) + writer.writeString(5, this.nonce); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WxCallBackResource { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WxCallBackResource(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.original_type = reader.readString(); + break; + case 2: + message.algorithm = reader.readString(); + break; + case 3: + message.ciphertext = reader.readString(); + break; + case 4: + message.associated_data = reader.readString(); + break; + case 5: + message.nonce = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): WxCallBackResource { + return WxCallBackResource.deserialize(bytes); + } + } + export class WxCallBackSignInfo extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + transaction_id?: string; + act_code?: string; + hall_code?: string; + hall_belong_mch_id?: number; + card_id?: string; + code?: string; + activity_id?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("transaction_id" in data && data.transaction_id != undefined) { + this.transaction_id = data.transaction_id; + } + if ("act_code" in data && data.act_code != undefined) { + this.act_code = data.act_code; + } + if ("hall_code" in data && data.hall_code != undefined) { + this.hall_code = data.hall_code; + } + if ("hall_belong_mch_id" in data && data.hall_belong_mch_id != undefined) { + this.hall_belong_mch_id = data.hall_belong_mch_id; + } + if ("card_id" in data && data.card_id != undefined) { + this.card_id = data.card_id; + } + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("activity_id" in data && data.activity_id != undefined) { + this.activity_id = data.activity_id; + } + } + } + get transaction_id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set transaction_id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get act_code() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set act_code(value: string) { + pb_1.Message.setField(this, 2, value); + } + get hall_code() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set hall_code(value: string) { + pb_1.Message.setField(this, 3, value); + } + get hall_belong_mch_id() { + return pb_1.Message.getFieldWithDefault(this, 4, 0) as number; + } + set hall_belong_mch_id(value: number) { + pb_1.Message.setField(this, 4, value); + } + get card_id() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set card_id(value: string) { + pb_1.Message.setField(this, 5, value); + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 6, "") as string; + } + set code(value: string) { + pb_1.Message.setField(this, 6, value); + } + get activity_id() { + return pb_1.Message.getFieldWithDefault(this, 7, "") as string; + } + set activity_id(value: string) { + pb_1.Message.setField(this, 7, value); + } + static fromObject(data: { + transaction_id?: string; + act_code?: string; + hall_code?: string; + hall_belong_mch_id?: number; + card_id?: string; + code?: string; + activity_id?: string; + }): WxCallBackSignInfo { + const message = new WxCallBackSignInfo({}); + if (data.transaction_id != null) { + message.transaction_id = data.transaction_id; + } + if (data.act_code != null) { + message.act_code = data.act_code; + } + if (data.hall_code != null) { + message.hall_code = data.hall_code; + } + if (data.hall_belong_mch_id != null) { + message.hall_belong_mch_id = data.hall_belong_mch_id; + } + if (data.card_id != null) { + message.card_id = data.card_id; + } + if (data.code != null) { + message.code = data.code; + } + if (data.activity_id != null) { + message.activity_id = data.activity_id; + } + return message; + } + toObject() { + const data: { + transaction_id?: string; + act_code?: string; + hall_code?: string; + hall_belong_mch_id?: number; + card_id?: string; + code?: string; + activity_id?: string; + } = {}; + if (this.transaction_id != null) { + data.transaction_id = this.transaction_id; + } + if (this.act_code != null) { + data.act_code = this.act_code; + } + if (this.hall_code != null) { + data.hall_code = this.hall_code; + } + if (this.hall_belong_mch_id != null) { + data.hall_belong_mch_id = this.hall_belong_mch_id; + } + if (this.card_id != null) { + data.card_id = this.card_id; + } + if (this.code != null) { + data.code = this.code; + } + if (this.activity_id != null) { + data.activity_id = this.activity_id; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.transaction_id.length) + writer.writeString(1, this.transaction_id); + if (this.act_code.length) + writer.writeString(2, this.act_code); + if (this.hall_code.length) + writer.writeString(3, this.hall_code); + if (this.hall_belong_mch_id != 0) + writer.writeInt64(4, this.hall_belong_mch_id); + if (this.card_id.length) + writer.writeString(5, this.card_id); + if (this.code.length) + writer.writeString(6, this.code); + if (this.activity_id.length) + writer.writeString(7, this.activity_id); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WxCallBackSignInfo { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WxCallBackSignInfo(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.transaction_id = reader.readString(); + break; + case 2: + message.act_code = reader.readString(); + break; + case 3: + message.hall_code = reader.readString(); + break; + case 4: + message.hall_belong_mch_id = reader.readInt64(); + break; + case 5: + message.card_id = reader.readString(); + break; + case 6: + message.code = reader.readString(); + break; + case 7: + message.activity_id = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): WxCallBackSignInfo { + return WxCallBackSignInfo.deserialize(bytes); + } + } + export class WxCallBackRequest extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + id?: string; + create_time?: string; + resource_type?: string; + event_type?: string; + summary?: string; + resource?: WxCallBackResource; + SignInfo?: WxCallBackSignInfo; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("id" in data && data.id != undefined) { + this.id = data.id; + } + if ("create_time" in data && data.create_time != undefined) { + this.create_time = data.create_time; + } + if ("resource_type" in data && data.resource_type != undefined) { + this.resource_type = data.resource_type; + } + if ("event_type" in data && data.event_type != undefined) { + this.event_type = data.event_type; + } + if ("summary" in data && data.summary != undefined) { + this.summary = data.summary; + } + if ("resource" in data && data.resource != undefined) { + this.resource = data.resource; + } + if ("SignInfo" in data && data.SignInfo != undefined) { + this.SignInfo = data.SignInfo; + } + } + } + get id() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set id(value: string) { + pb_1.Message.setField(this, 1, value); + } + get create_time() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set create_time(value: string) { + pb_1.Message.setField(this, 2, value); + } + get resource_type() { + return pb_1.Message.getFieldWithDefault(this, 3, "") as string; + } + set resource_type(value: string) { + pb_1.Message.setField(this, 3, value); + } + get event_type() { + return pb_1.Message.getFieldWithDefault(this, 4, "") as string; + } + set event_type(value: string) { + pb_1.Message.setField(this, 4, value); + } + get summary() { + return pb_1.Message.getFieldWithDefault(this, 5, "") as string; + } + set summary(value: string) { + pb_1.Message.setField(this, 5, value); + } + get resource() { + return pb_1.Message.getWrapperField(this, WxCallBackResource, 6) as WxCallBackResource; + } + set resource(value: WxCallBackResource) { + pb_1.Message.setWrapperField(this, 6, value); + } + get has_resource() { + return pb_1.Message.getField(this, 6) != null; + } + get SignInfo() { + return pb_1.Message.getWrapperField(this, WxCallBackSignInfo, 7) as WxCallBackSignInfo; + } + set SignInfo(value: WxCallBackSignInfo) { + pb_1.Message.setWrapperField(this, 7, value); + } + get has_SignInfo() { + return pb_1.Message.getField(this, 7) != null; + } + static fromObject(data: { + id?: string; + create_time?: string; + resource_type?: string; + event_type?: string; + summary?: string; + resource?: ReturnType; + SignInfo?: ReturnType; + }): WxCallBackRequest { + const message = new WxCallBackRequest({}); + if (data.id != null) { + message.id = data.id; + } + if (data.create_time != null) { + message.create_time = data.create_time; + } + if (data.resource_type != null) { + message.resource_type = data.resource_type; + } + if (data.event_type != null) { + message.event_type = data.event_type; + } + if (data.summary != null) { + message.summary = data.summary; + } + if (data.resource != null) { + message.resource = WxCallBackResource.fromObject(data.resource); + } + if (data.SignInfo != null) { + message.SignInfo = WxCallBackSignInfo.fromObject(data.SignInfo); + } + return message; + } + toObject() { + const data: { + id?: string; + create_time?: string; + resource_type?: string; + event_type?: string; + summary?: string; + resource?: ReturnType; + SignInfo?: ReturnType; + } = {}; + if (this.id != null) { + data.id = this.id; + } + if (this.create_time != null) { + data.create_time = this.create_time; + } + if (this.resource_type != null) { + data.resource_type = this.resource_type; + } + if (this.event_type != null) { + data.event_type = this.event_type; + } + if (this.summary != null) { + data.summary = this.summary; + } + if (this.resource != null) { + data.resource = this.resource.toObject(); + } + if (this.SignInfo != null) { + data.SignInfo = this.SignInfo.toObject(); + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.id.length) + writer.writeString(1, this.id); + if (this.create_time.length) + writer.writeString(2, this.create_time); + if (this.resource_type.length) + writer.writeString(3, this.resource_type); + if (this.event_type.length) + writer.writeString(4, this.event_type); + if (this.summary.length) + writer.writeString(5, this.summary); + if (this.has_resource) + writer.writeMessage(6, this.resource, () => this.resource.serialize(writer)); + if (this.has_SignInfo) + writer.writeMessage(7, this.SignInfo, () => this.SignInfo.serialize(writer)); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): WxCallBackRequest { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new WxCallBackRequest(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.id = reader.readString(); + break; + case 2: + message.create_time = reader.readString(); + break; + case 3: + message.resource_type = reader.readString(); + break; + case 4: + message.event_type = reader.readString(); + break; + case 5: + message.summary = reader.readString(); + break; + case 6: + reader.readMessage(message.resource, () => message.resource = WxCallBackResource.deserialize(reader)); + break; + case 7: + reader.readMessage(message.SignInfo, () => message.SignInfo = WxCallBackSignInfo.deserialize(reader)); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): WxCallBackRequest { + return WxCallBackRequest.deserialize(bytes); + } + } + export class CallBackReply extends pb_1.Message { + #one_of_decls: number[][] = []; + constructor(data?: any[] | { + code?: string; + message?: string; + }) { + super(); + pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls); + if (!Array.isArray(data) && typeof data == "object") { + if ("code" in data && data.code != undefined) { + this.code = data.code; + } + if ("message" in data && data.message != undefined) { + this.message = data.message; + } + } + } + get code() { + return pb_1.Message.getFieldWithDefault(this, 1, "") as string; + } + set code(value: string) { + pb_1.Message.setField(this, 1, value); + } + get message() { + return pb_1.Message.getFieldWithDefault(this, 2, "") as string; + } + set message(value: string) { + pb_1.Message.setField(this, 2, value); + } + static fromObject(data: { + code?: string; + message?: string; + }): CallBackReply { + const message = new CallBackReply({}); + if (data.code != null) { + message.code = data.code; + } + if (data.message != null) { + message.message = data.message; + } + return message; + } + toObject() { + const data: { + code?: string; + message?: string; + } = {}; + if (this.code != null) { + data.code = this.code; + } + if (this.message != null) { + data.message = this.message; + } + return data; + } + serialize(): Uint8Array; + serialize(w: pb_1.BinaryWriter): void; + serialize(w?: pb_1.BinaryWriter): Uint8Array | void { + const writer = w || new pb_1.BinaryWriter(); + if (this.code.length) + writer.writeString(1, this.code); + if (this.message.length) + writer.writeString(2, this.message); + if (!w) + return writer.getResultBuffer(); + } + static deserialize(bytes: Uint8Array | pb_1.BinaryReader): CallBackReply { + const reader = bytes instanceof pb_1.BinaryReader ? bytes : new pb_1.BinaryReader(bytes), message = new CallBackReply(); + while (reader.nextField()) { + if (reader.isEndGroup()) + break; + switch (reader.getFieldNumber()) { + case 1: + message.code = reader.readString(); + break; + case 2: + message.message = reader.readString(); + break; + default: reader.skipField(); + } + } + return message; + } + serializeBinary(): Uint8Array { + return this.serialize(); + } + static deserializeBinary(bytes: Uint8Array): CallBackReply { + return CallBackReply.deserialize(bytes); + } + } + interface GrpcUnaryServiceInterface { + (message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + (message: P, callback: grpc_1.requestCallback): grpc_1.ClientUnaryCall; + } + interface GrpcStreamServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + (message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream; + } + interface GrpWritableServiceInterface { + (metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (metadata: grpc_1.Metadata, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (options: grpc_1.CallOptions, callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + (callback: grpc_1.requestCallback): grpc_1.ClientWritableStream

; + } + interface GrpcChunkServiceInterface { + (metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + (options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream; + } + interface GrpcPromiseServiceInterface { + (message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise; + (message: P, options?: grpc_1.CallOptions): Promise; + } + export abstract class UnimplementedWechatService { + static definition = { + JsapiPreOrder: { + path: "/wallet.Wechat/JsapiPreOrder", + requestStream: false, + responseStream: false, + requestSerialize: (message: WxpayJSAPIPreOrderRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => WxpayJSAPIPreOrderRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: WxpayJSAPIPreOrderReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => WxpayJSAPIPreOrderReply.deserialize(new Uint8Array(bytes)) + }, + AppPreOrder: { + path: "/wallet.Wechat/AppPreOrder", + requestStream: false, + responseStream: false, + requestSerialize: (message: WxpayAppPreOrderRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => WxpayAppPreOrderRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: WxpayAppPreOrderReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => WxpayAppPreOrderReply.deserialize(new Uint8Array(bytes)) + }, + NativePreOrder: { + path: "/wallet.Wechat/NativePreOrder", + requestStream: false, + responseStream: false, + requestSerialize: (message: WxpayNativePreOrderRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => WxpayNativePreOrderRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: WxpayNativePreOrderReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => WxpayNativePreOrderReply.deserialize(new Uint8Array(bytes)) + }, + Transfer: { + path: "/wallet.Wechat/Transfer", + requestStream: false, + responseStream: false, + requestSerialize: (message: WxpayTransferRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => WxpayTransferRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: WxpayTransferReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => WxpayTransferReply.deserialize(new Uint8Array(bytes)) + }, + WxCallback: { + path: "/wallet.Wechat/WxCallback", + requestStream: false, + responseStream: false, + requestSerialize: (message: WxCallBackRequest) => Buffer.from(message.serialize()), + requestDeserialize: (bytes: Buffer) => WxCallBackRequest.deserialize(new Uint8Array(bytes)), + responseSerialize: (message: CallBackReply) => Buffer.from(message.serialize()), + responseDeserialize: (bytes: Buffer) => CallBackReply.deserialize(new Uint8Array(bytes)) + } + }; + [method: string]: grpc_1.UntypedHandleCall; + abstract JsapiPreOrder(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract AppPreOrder(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract NativePreOrder(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract Transfer(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + abstract WxCallback(call: grpc_1.ServerUnaryCall, callback: grpc_1.sendUnaryData): void; + } + export class WechatClient extends grpc_1.makeGenericClientConstructor(UnimplementedWechatService.definition, "Wechat", {}) { + constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial) { + super(address, credentials, options); + } + JsapiPreOrder: GrpcUnaryServiceInterface = (message: WxpayJSAPIPreOrderRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.JsapiPreOrder(message, metadata, options, callback); + }; + AppPreOrder: GrpcUnaryServiceInterface = (message: WxpayAppPreOrderRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.AppPreOrder(message, metadata, options, callback); + }; + NativePreOrder: GrpcUnaryServiceInterface = (message: WxpayNativePreOrderRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.NativePreOrder(message, metadata, options, callback); + }; + Transfer: GrpcUnaryServiceInterface = (message: WxpayTransferRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.Transfer(message, metadata, options, callback); + }; + WxCallback: GrpcUnaryServiceInterface = (message: WxCallBackRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback, options?: grpc_1.CallOptions | grpc_1.requestCallback, callback?: grpc_1.requestCallback): grpc_1.ClientUnaryCall => { + return super.WxCallback(message, metadata, options, callback); + }; + } +}