1789 lines
72 KiB
TypeScript
1789 lines
72 KiB
TypeScript
/**
|
|
* 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<typeof WxCallBackResource.prototype.toObject>;
|
|
SignInfo?: ReturnType<typeof WxCallBackSignInfo.prototype.toObject>;
|
|
}): 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<typeof WxCallBackResource.prototype.toObject>;
|
|
SignInfo?: ReturnType<typeof WxCallBackSignInfo.prototype.toObject>;
|
|
} = {};
|
|
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<P, R> {
|
|
(message: P, metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
|
|
(message: P, metadata: grpc_1.Metadata, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
|
|
(message: P, options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
|
|
(message: P, callback: grpc_1.requestCallback<R>): grpc_1.ClientUnaryCall;
|
|
}
|
|
interface GrpcStreamServiceInterface<P, R> {
|
|
(message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream<R>;
|
|
(message: P, options?: grpc_1.CallOptions): grpc_1.ClientReadableStream<R>;
|
|
}
|
|
interface GrpWritableServiceInterface<P, R> {
|
|
(metadata: grpc_1.Metadata, options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
|
|
(metadata: grpc_1.Metadata, callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
|
|
(options: grpc_1.CallOptions, callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
|
|
(callback: grpc_1.requestCallback<R>): grpc_1.ClientWritableStream<P>;
|
|
}
|
|
interface GrpcChunkServiceInterface<P, R> {
|
|
(metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream<P, R>;
|
|
(options?: grpc_1.CallOptions): grpc_1.ClientDuplexStream<P, R>;
|
|
}
|
|
interface GrpcPromiseServiceInterface<P, R> {
|
|
(message: P, metadata: grpc_1.Metadata, options?: grpc_1.CallOptions): Promise<R>;
|
|
(message: P, options?: grpc_1.CallOptions): Promise<R>;
|
|
}
|
|
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<WxpayJSAPIPreOrderRequest, WxpayJSAPIPreOrderReply>, callback: grpc_1.sendUnaryData<WxpayJSAPIPreOrderReply>): void;
|
|
abstract AppPreOrder(call: grpc_1.ServerUnaryCall<WxpayAppPreOrderRequest, WxpayAppPreOrderReply>, callback: grpc_1.sendUnaryData<WxpayAppPreOrderReply>): void;
|
|
abstract NativePreOrder(call: grpc_1.ServerUnaryCall<WxpayNativePreOrderRequest, WxpayNativePreOrderReply>, callback: grpc_1.sendUnaryData<WxpayNativePreOrderReply>): void;
|
|
abstract Transfer(call: grpc_1.ServerUnaryCall<WxpayTransferRequest, WxpayTransferReply>, callback: grpc_1.sendUnaryData<WxpayTransferReply>): void;
|
|
abstract WxCallback(call: grpc_1.ServerUnaryCall<WxCallBackRequest, CallBackReply>, callback: grpc_1.sendUnaryData<CallBackReply>): void;
|
|
}
|
|
export class WechatClient extends grpc_1.makeGenericClientConstructor(UnimplementedWechatService.definition, "Wechat", {}) {
|
|
constructor(address: string, credentials: grpc_1.ChannelCredentials, options?: Partial<grpc_1.ChannelOptions>) {
|
|
super(address, credentials, options);
|
|
}
|
|
JsapiPreOrder: GrpcUnaryServiceInterface<WxpayJSAPIPreOrderRequest, WxpayJSAPIPreOrderReply> = (message: WxpayJSAPIPreOrderRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<WxpayJSAPIPreOrderReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<WxpayJSAPIPreOrderReply>, callback?: grpc_1.requestCallback<WxpayJSAPIPreOrderReply>): grpc_1.ClientUnaryCall => {
|
|
return super.JsapiPreOrder(message, metadata, options, callback);
|
|
};
|
|
AppPreOrder: GrpcUnaryServiceInterface<WxpayAppPreOrderRequest, WxpayAppPreOrderReply> = (message: WxpayAppPreOrderRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<WxpayAppPreOrderReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<WxpayAppPreOrderReply>, callback?: grpc_1.requestCallback<WxpayAppPreOrderReply>): grpc_1.ClientUnaryCall => {
|
|
return super.AppPreOrder(message, metadata, options, callback);
|
|
};
|
|
NativePreOrder: GrpcUnaryServiceInterface<WxpayNativePreOrderRequest, WxpayNativePreOrderReply> = (message: WxpayNativePreOrderRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<WxpayNativePreOrderReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<WxpayNativePreOrderReply>, callback?: grpc_1.requestCallback<WxpayNativePreOrderReply>): grpc_1.ClientUnaryCall => {
|
|
return super.NativePreOrder(message, metadata, options, callback);
|
|
};
|
|
Transfer: GrpcUnaryServiceInterface<WxpayTransferRequest, WxpayTransferReply> = (message: WxpayTransferRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<WxpayTransferReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<WxpayTransferReply>, callback?: grpc_1.requestCallback<WxpayTransferReply>): grpc_1.ClientUnaryCall => {
|
|
return super.Transfer(message, metadata, options, callback);
|
|
};
|
|
WxCallback: GrpcUnaryServiceInterface<WxCallBackRequest, CallBackReply> = (message: WxCallBackRequest, metadata: grpc_1.Metadata | grpc_1.CallOptions | grpc_1.requestCallback<CallBackReply>, options?: grpc_1.CallOptions | grpc_1.requestCallback<CallBackReply>, callback?: grpc_1.requestCallback<CallBackReply>): grpc_1.ClientUnaryCall => {
|
|
return super.WxCallback(message, metadata, options, callback);
|
|
};
|
|
}
|
|
}
|