@stashfin/grpc 1.2.786 → 1.2.787
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
11
|
exports.response = exports.request = exports.protobufPackage = void 0;
|
|
12
12
|
/* eslint-disable */
|
|
13
|
+
const long_1 = __importDefault(require("long"));
|
|
13
14
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
14
15
|
exports.protobufPackage = "payments.initiaterefund";
|
|
15
16
|
function createBaserequest() {
|
|
@@ -20,6 +21,9 @@ function createBaserequest() {
|
|
|
20
21
|
txn_amount: 0,
|
|
21
22
|
refund_amount: 0,
|
|
22
23
|
merc_refund_ref_no: "",
|
|
24
|
+
customer_id: 0,
|
|
25
|
+
client_id: "",
|
|
26
|
+
mode: "",
|
|
23
27
|
};
|
|
24
28
|
}
|
|
25
29
|
exports.request = {
|
|
@@ -42,6 +46,15 @@ exports.request = {
|
|
|
42
46
|
if (message.merc_refund_ref_no !== "") {
|
|
43
47
|
writer.uint32(50).string(message.merc_refund_ref_no);
|
|
44
48
|
}
|
|
49
|
+
if (message.customer_id !== 0) {
|
|
50
|
+
writer.uint32(56).int64(message.customer_id);
|
|
51
|
+
}
|
|
52
|
+
if (message.client_id !== "") {
|
|
53
|
+
writer.uint32(66).string(message.client_id);
|
|
54
|
+
}
|
|
55
|
+
if (message.mode !== "") {
|
|
56
|
+
writer.uint32(74).string(message.mode);
|
|
57
|
+
}
|
|
45
58
|
return writer;
|
|
46
59
|
},
|
|
47
60
|
decode(input, length) {
|
|
@@ -87,6 +100,24 @@ exports.request = {
|
|
|
87
100
|
}
|
|
88
101
|
message.merc_refund_ref_no = reader.string();
|
|
89
102
|
continue;
|
|
103
|
+
case 7:
|
|
104
|
+
if (tag !== 56) {
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
message.customer_id = longToNumber(reader.int64());
|
|
108
|
+
continue;
|
|
109
|
+
case 8:
|
|
110
|
+
if (tag !== 66) {
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
message.client_id = reader.string();
|
|
114
|
+
continue;
|
|
115
|
+
case 9:
|
|
116
|
+
if (tag !== 74) {
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
message.mode = reader.string();
|
|
120
|
+
continue;
|
|
90
121
|
}
|
|
91
122
|
if ((tag & 7) === 4 || tag === 0) {
|
|
92
123
|
break;
|
|
@@ -103,6 +134,9 @@ exports.request = {
|
|
|
103
134
|
txn_amount: isSet(object.txn_amount) ? globalThis.Number(object.txn_amount) : 0,
|
|
104
135
|
refund_amount: isSet(object.refund_amount) ? globalThis.Number(object.refund_amount) : 0,
|
|
105
136
|
merc_refund_ref_no: isSet(object.merc_refund_ref_no) ? globalThis.String(object.merc_refund_ref_no) : "",
|
|
137
|
+
customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
|
|
138
|
+
client_id: isSet(object.client_id) ? globalThis.String(object.client_id) : "",
|
|
139
|
+
mode: isSet(object.mode) ? globalThis.String(object.mode) : "",
|
|
106
140
|
};
|
|
107
141
|
},
|
|
108
142
|
toJSON(message) {
|
|
@@ -125,6 +159,15 @@ exports.request = {
|
|
|
125
159
|
if (message.merc_refund_ref_no !== "") {
|
|
126
160
|
obj.merc_refund_ref_no = message.merc_refund_ref_no;
|
|
127
161
|
}
|
|
162
|
+
if (message.customer_id !== 0) {
|
|
163
|
+
obj.customer_id = Math.round(message.customer_id);
|
|
164
|
+
}
|
|
165
|
+
if (message.client_id !== "") {
|
|
166
|
+
obj.client_id = message.client_id;
|
|
167
|
+
}
|
|
168
|
+
if (message.mode !== "") {
|
|
169
|
+
obj.mode = message.mode;
|
|
170
|
+
}
|
|
128
171
|
return obj;
|
|
129
172
|
},
|
|
130
173
|
create(base) {
|
|
@@ -138,6 +181,9 @@ exports.request = {
|
|
|
138
181
|
message.txn_amount = object.txn_amount ?? 0;
|
|
139
182
|
message.refund_amount = object.refund_amount ?? 0;
|
|
140
183
|
message.merc_refund_ref_no = object.merc_refund_ref_no ?? "";
|
|
184
|
+
message.customer_id = object.customer_id ?? 0;
|
|
185
|
+
message.client_id = object.client_id ?? "";
|
|
186
|
+
message.mode = object.mode ?? "";
|
|
141
187
|
return message;
|
|
142
188
|
},
|
|
143
189
|
};
|
|
@@ -207,6 +253,19 @@ exports.response = {
|
|
|
207
253
|
return message;
|
|
208
254
|
},
|
|
209
255
|
};
|
|
256
|
+
function longToNumber(long) {
|
|
257
|
+
if (long.gt(globalThis.Number.MAX_SAFE_INTEGER)) {
|
|
258
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
259
|
+
}
|
|
260
|
+
if (long.lt(globalThis.Number.MIN_SAFE_INTEGER)) {
|
|
261
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
262
|
+
}
|
|
263
|
+
return long.toNumber();
|
|
264
|
+
}
|
|
265
|
+
if (minimal_1.default.util.Long !== long_1.default) {
|
|
266
|
+
minimal_1.default.util.Long = long_1.default;
|
|
267
|
+
minimal_1.default.configure();
|
|
268
|
+
}
|
|
210
269
|
function isSet(value) {
|
|
211
270
|
return value !== null && value !== undefined;
|
|
212
271
|
}
|