@technova-tech/olive-proto-lib 2.3.1 → 2.3.3
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
|
@@ -61,7 +61,7 @@ var com;
|
|
|
61
61
|
ServiceProvider[ServiceProvider["PAYSTACK"] = 3] = "PAYSTACK";
|
|
62
62
|
})(ServiceProvider = terminalCardTransactions.ServiceProvider || (terminalCardTransactions.ServiceProvider = {}));
|
|
63
63
|
class InitializeCardTransactionRequest extends pb_1.Message {
|
|
64
|
-
#one_of_decls = [];
|
|
64
|
+
#one_of_decls = [[9]];
|
|
65
65
|
constructor(data) {
|
|
66
66
|
super();
|
|
67
67
|
pb_1.Message.initialize(this, Array.isArray(data) ? data : [], 0, -1, [], this.#one_of_decls);
|
|
@@ -90,6 +90,9 @@ var com;
|
|
|
90
90
|
if ("accountName" in data && data.accountName != undefined) {
|
|
91
91
|
this.accountName = data.accountName;
|
|
92
92
|
}
|
|
93
|
+
if ("cardNumber" in data && data.cardNumber != undefined) {
|
|
94
|
+
this.cardNumber = data.cardNumber;
|
|
95
|
+
}
|
|
93
96
|
}
|
|
94
97
|
}
|
|
95
98
|
get accountId() {
|
|
@@ -143,6 +146,22 @@ var com;
|
|
|
143
146
|
set accountName(value) {
|
|
144
147
|
pb_1.Message.setField(this, 8, value);
|
|
145
148
|
}
|
|
149
|
+
get cardNumber() {
|
|
150
|
+
return pb_1.Message.getFieldWithDefault(this, 9, "");
|
|
151
|
+
}
|
|
152
|
+
set cardNumber(value) {
|
|
153
|
+
pb_1.Message.setOneofField(this, 9, this.#one_of_decls[0], value);
|
|
154
|
+
}
|
|
155
|
+
get hasCardNumber() {
|
|
156
|
+
return pb_1.Message.getField(this, 9) != null;
|
|
157
|
+
}
|
|
158
|
+
get _cardNumber() {
|
|
159
|
+
const cases = {
|
|
160
|
+
0: "none",
|
|
161
|
+
9: "cardNumber"
|
|
162
|
+
};
|
|
163
|
+
return cases[pb_1.Message.computeOneofCase(this, [9])];
|
|
164
|
+
}
|
|
146
165
|
static fromObject(data) {
|
|
147
166
|
const message = new InitializeCardTransactionRequest({});
|
|
148
167
|
if (data.accountId != null) {
|
|
@@ -169,6 +188,9 @@ var com;
|
|
|
169
188
|
if (data.accountName != null) {
|
|
170
189
|
message.accountName = data.accountName;
|
|
171
190
|
}
|
|
191
|
+
if (data.cardNumber != null) {
|
|
192
|
+
message.cardNumber = data.cardNumber;
|
|
193
|
+
}
|
|
172
194
|
return message;
|
|
173
195
|
}
|
|
174
196
|
toObject() {
|
|
@@ -197,6 +219,9 @@ var com;
|
|
|
197
219
|
if (this.accountName != null) {
|
|
198
220
|
data.accountName = this.accountName;
|
|
199
221
|
}
|
|
222
|
+
if (this.cardNumber != null) {
|
|
223
|
+
data.cardNumber = this.cardNumber;
|
|
224
|
+
}
|
|
200
225
|
return data;
|
|
201
226
|
}
|
|
202
227
|
serialize(w) {
|
|
@@ -217,6 +242,8 @@ var com;
|
|
|
217
242
|
writer.writeMessage(7, this.cardData, () => this.cardData.serialize(writer));
|
|
218
243
|
if (this.accountName.length)
|
|
219
244
|
writer.writeString(8, this.accountName);
|
|
245
|
+
if (this.hasCardNumber)
|
|
246
|
+
writer.writeString(9, this.cardNumber);
|
|
220
247
|
if (!w)
|
|
221
248
|
return writer.getResultBuffer();
|
|
222
249
|
}
|
|
@@ -250,6 +277,9 @@ var com;
|
|
|
250
277
|
case 8:
|
|
251
278
|
message.accountName = reader.readString();
|
|
252
279
|
break;
|
|
280
|
+
case 9:
|
|
281
|
+
message.cardNumber = reader.readString();
|
|
282
|
+
break;
|
|
253
283
|
default: reader.skipField();
|
|
254
284
|
}
|
|
255
285
|
}
|
package/pos.v1/transactions.js
CHANGED
|
@@ -80,8 +80,8 @@ var com;
|
|
|
80
80
|
if ("reference" in data && data.reference != undefined) {
|
|
81
81
|
this.reference = data.reference;
|
|
82
82
|
}
|
|
83
|
-
if ("
|
|
84
|
-
this.
|
|
83
|
+
if ("cardNumber" in data && data.cardNumber != undefined) {
|
|
84
|
+
this.cardNumber = data.cardNumber;
|
|
85
85
|
}
|
|
86
86
|
if ("cardExpiry" in data && data.cardExpiry != undefined) {
|
|
87
87
|
this.cardExpiry = data.cardExpiry;
|
|
@@ -133,10 +133,10 @@ var com;
|
|
|
133
133
|
set reference(value) {
|
|
134
134
|
pb_1.Message.setField(this, 6, value);
|
|
135
135
|
}
|
|
136
|
-
get
|
|
136
|
+
get cardNumber() {
|
|
137
137
|
return pb_1.Message.getFieldWithDefault(this, 7, "");
|
|
138
138
|
}
|
|
139
|
-
set
|
|
139
|
+
set cardNumber(value) {
|
|
140
140
|
pb_1.Message.setField(this, 7, value);
|
|
141
141
|
}
|
|
142
142
|
get cardExpiry() {
|
|
@@ -186,8 +186,8 @@ var com;
|
|
|
186
186
|
if (data.reference != null) {
|
|
187
187
|
message.reference = data.reference;
|
|
188
188
|
}
|
|
189
|
-
if (data.
|
|
190
|
-
message.
|
|
189
|
+
if (data.cardNumber != null) {
|
|
190
|
+
message.cardNumber = data.cardNumber;
|
|
191
191
|
}
|
|
192
192
|
if (data.cardExpiry != null) {
|
|
193
193
|
message.cardExpiry = data.cardExpiry;
|
|
@@ -223,8 +223,8 @@ var com;
|
|
|
223
223
|
if (this.reference != null) {
|
|
224
224
|
data.reference = this.reference;
|
|
225
225
|
}
|
|
226
|
-
if (this.
|
|
227
|
-
data.
|
|
226
|
+
if (this.cardNumber != null) {
|
|
227
|
+
data.cardNumber = this.cardNumber;
|
|
228
228
|
}
|
|
229
229
|
if (this.cardExpiry != null) {
|
|
230
230
|
data.cardExpiry = this.cardExpiry;
|
|
@@ -254,8 +254,8 @@ var com;
|
|
|
254
254
|
writer.writeString(5, this.transactionType);
|
|
255
255
|
if (this.reference.length)
|
|
256
256
|
writer.writeString(6, this.reference);
|
|
257
|
-
if (this.
|
|
258
|
-
writer.writeString(7, this.
|
|
257
|
+
if (this.cardNumber.length)
|
|
258
|
+
writer.writeString(7, this.cardNumber);
|
|
259
259
|
if (this.cardExpiry.length)
|
|
260
260
|
writer.writeString(8, this.cardExpiry);
|
|
261
261
|
if (this.cvv.length)
|
|
@@ -292,7 +292,7 @@ var com;
|
|
|
292
292
|
message.reference = reader.readString();
|
|
293
293
|
break;
|
|
294
294
|
case 7:
|
|
295
|
-
message.
|
|
295
|
+
message.cardNumber = reader.readString();
|
|
296
296
|
break;
|
|
297
297
|
case 8:
|
|
298
298
|
message.cardExpiry = reader.readString();
|
|
@@ -27,7 +27,7 @@ export declare namespace com.pkg.posv1.terminalCardTransactions {
|
|
|
27
27
|
}
|
|
28
28
|
export class InitializeCardTransactionRequest extends pb_1.Message {
|
|
29
29
|
#private;
|
|
30
|
-
constructor(data?: any[] | {
|
|
30
|
+
constructor(data?: any[] | ({
|
|
31
31
|
accountId?: string;
|
|
32
32
|
businessId?: string;
|
|
33
33
|
terminalId?: string;
|
|
@@ -36,7 +36,9 @@ export declare namespace com.pkg.posv1.terminalCardTransactions {
|
|
|
36
36
|
type?: string;
|
|
37
37
|
cardData?: CardData;
|
|
38
38
|
accountName?: string;
|
|
39
|
-
}
|
|
39
|
+
} & (({
|
|
40
|
+
cardNumber?: string;
|
|
41
|
+
}))));
|
|
40
42
|
get accountId(): string;
|
|
41
43
|
set accountId(value: string);
|
|
42
44
|
get businessId(): string;
|
|
@@ -54,6 +56,10 @@ export declare namespace com.pkg.posv1.terminalCardTransactions {
|
|
|
54
56
|
get hasCardData(): boolean;
|
|
55
57
|
get accountName(): string;
|
|
56
58
|
set accountName(value: string);
|
|
59
|
+
get cardNumber(): string;
|
|
60
|
+
set cardNumber(value: string);
|
|
61
|
+
get hasCardNumber(): boolean;
|
|
62
|
+
get _cardNumber(): "none" | "cardNumber";
|
|
57
63
|
static fromObject(data: {
|
|
58
64
|
accountId?: string;
|
|
59
65
|
businessId?: string;
|
|
@@ -63,6 +69,7 @@ export declare namespace com.pkg.posv1.terminalCardTransactions {
|
|
|
63
69
|
type?: string;
|
|
64
70
|
cardData?: ReturnType<typeof CardData.prototype.toObject>;
|
|
65
71
|
accountName?: string;
|
|
72
|
+
cardNumber?: string;
|
|
66
73
|
}): InitializeCardTransactionRequest;
|
|
67
74
|
toObject(): {
|
|
68
75
|
accountId?: string | undefined;
|
|
@@ -79,6 +86,7 @@ export declare namespace com.pkg.posv1.terminalCardTransactions {
|
|
|
79
86
|
cardHolderName?: string | undefined;
|
|
80
87
|
} | undefined;
|
|
81
88
|
accountName?: string | undefined;
|
|
89
|
+
cardNumber?: string | undefined;
|
|
82
90
|
};
|
|
83
91
|
serialize(): Uint8Array;
|
|
84
92
|
serialize(w: pb_1.BinaryWriter): void;
|
|
@@ -30,7 +30,7 @@ export declare namespace com.pkg.posv1.transactions {
|
|
|
30
30
|
currency?: string;
|
|
31
31
|
transactionType?: string;
|
|
32
32
|
reference?: string;
|
|
33
|
-
|
|
33
|
+
cardNumber?: string;
|
|
34
34
|
cardExpiry?: string;
|
|
35
35
|
cvv?: string;
|
|
36
36
|
pin?: string;
|
|
@@ -48,8 +48,8 @@ export declare namespace com.pkg.posv1.transactions {
|
|
|
48
48
|
set transactionType(value: string);
|
|
49
49
|
get reference(): string;
|
|
50
50
|
set reference(value: string);
|
|
51
|
-
get
|
|
52
|
-
set
|
|
51
|
+
get cardNumber(): string;
|
|
52
|
+
set cardNumber(value: string);
|
|
53
53
|
get cardExpiry(): string;
|
|
54
54
|
set cardExpiry(value: string);
|
|
55
55
|
get cvv(): string;
|
|
@@ -66,7 +66,7 @@ export declare namespace com.pkg.posv1.transactions {
|
|
|
66
66
|
currency?: string;
|
|
67
67
|
transactionType?: string;
|
|
68
68
|
reference?: string;
|
|
69
|
-
|
|
69
|
+
cardNumber?: string;
|
|
70
70
|
cardExpiry?: string;
|
|
71
71
|
cvv?: string;
|
|
72
72
|
pin?: string;
|
|
@@ -79,7 +79,7 @@ export declare namespace com.pkg.posv1.transactions {
|
|
|
79
79
|
currency?: string | undefined;
|
|
80
80
|
transactionType?: string | undefined;
|
|
81
81
|
reference?: string | undefined;
|
|
82
|
-
|
|
82
|
+
cardNumber?: string | undefined;
|
|
83
83
|
cardExpiry?: string | undefined;
|
|
84
84
|
cvv?: string | undefined;
|
|
85
85
|
pin?: string | undefined;
|