@stashfin/grpc 1.2.1 → 1.2.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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stashfin/grpc",
3
- "version": "1.2.1",
3
+ "version": "1.2.3",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -3,9 +3,10 @@ export declare const protobufPackage = "stashcash.debitsc";
3
3
  export interface request {
4
4
  customer_id: number;
5
5
  flag: number;
6
- campaign_id?: number | undefined;
7
- amount?: number | undefined;
6
+ campaign_id: number;
7
+ amount: number;
8
8
  sc_type?: string | undefined;
9
+ txn_id?: string | undefined;
9
10
  }
10
11
  export interface response {
11
12
  status: string;
@@ -18,6 +19,7 @@ export interface response_Data {
18
19
  rupee_balance: number;
19
20
  txn_id: number;
20
21
  conversion_factor: number;
22
+ txn_status: string;
21
23
  }
22
24
  export declare const request: {
23
25
  encode(message: request, writer?: _m0.Writer): _m0.Writer;
@@ -14,7 +14,7 @@ const long_1 = __importDefault(require("long"));
14
14
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
15
15
  exports.protobufPackage = "stashcash.debitsc";
16
16
  function createBaserequest() {
17
- return { customer_id: 0, flag: 0, campaign_id: undefined, amount: undefined, sc_type: undefined };
17
+ return { customer_id: 0, flag: 0, campaign_id: 0, amount: 0, sc_type: undefined, txn_id: undefined };
18
18
  }
19
19
  exports.request = {
20
20
  encode(message, writer = minimal_1.default.Writer.create()) {
@@ -24,15 +24,18 @@ exports.request = {
24
24
  if (message.flag !== 0) {
25
25
  writer.uint32(16).int32(message.flag);
26
26
  }
27
- if (message.campaign_id !== undefined) {
27
+ if (message.campaign_id !== 0) {
28
28
  writer.uint32(24).int64(message.campaign_id);
29
29
  }
30
- if (message.amount !== undefined) {
30
+ if (message.amount !== 0) {
31
31
  writer.uint32(37).float(message.amount);
32
32
  }
33
33
  if (message.sc_type !== undefined) {
34
34
  writer.uint32(42).string(message.sc_type);
35
35
  }
36
+ if (message.txn_id !== undefined) {
37
+ writer.uint32(50).string(message.txn_id);
38
+ }
36
39
  return writer;
37
40
  },
38
41
  decode(input, length) {
@@ -72,6 +75,12 @@ exports.request = {
72
75
  }
73
76
  message.sc_type = reader.string();
74
77
  continue;
78
+ case 6:
79
+ if (tag !== 50) {
80
+ break;
81
+ }
82
+ message.txn_id = reader.string();
83
+ continue;
75
84
  }
76
85
  if ((tag & 7) === 4 || tag === 0) {
77
86
  break;
@@ -84,9 +93,10 @@ exports.request = {
84
93
  return {
85
94
  customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
86
95
  flag: isSet(object.flag) ? globalThis.Number(object.flag) : 0,
87
- campaign_id: isSet(object.campaign_id) ? globalThis.Number(object.campaign_id) : undefined,
88
- amount: isSet(object.amount) ? globalThis.Number(object.amount) : undefined,
96
+ campaign_id: isSet(object.campaign_id) ? globalThis.Number(object.campaign_id) : 0,
97
+ amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
89
98
  sc_type: isSet(object.sc_type) ? globalThis.String(object.sc_type) : undefined,
99
+ txn_id: isSet(object.txn_id) ? globalThis.String(object.txn_id) : undefined,
90
100
  };
91
101
  },
92
102
  toJSON(message) {
@@ -97,15 +107,18 @@ exports.request = {
97
107
  if (message.flag !== 0) {
98
108
  obj.flag = Math.round(message.flag);
99
109
  }
100
- if (message.campaign_id !== undefined) {
110
+ if (message.campaign_id !== 0) {
101
111
  obj.campaign_id = Math.round(message.campaign_id);
102
112
  }
103
- if (message.amount !== undefined) {
113
+ if (message.amount !== 0) {
104
114
  obj.amount = message.amount;
105
115
  }
106
116
  if (message.sc_type !== undefined) {
107
117
  obj.sc_type = message.sc_type;
108
118
  }
119
+ if (message.txn_id !== undefined) {
120
+ obj.txn_id = message.txn_id;
121
+ }
109
122
  return obj;
110
123
  },
111
124
  create(base) {
@@ -115,9 +128,10 @@ exports.request = {
115
128
  const message = createBaserequest();
116
129
  message.customer_id = object.customer_id ?? 0;
117
130
  message.flag = object.flag ?? 0;
118
- message.campaign_id = object.campaign_id ?? undefined;
119
- message.amount = object.amount ?? undefined;
131
+ message.campaign_id = object.campaign_id ?? 0;
132
+ message.amount = object.amount ?? 0;
120
133
  message.sc_type = object.sc_type ?? undefined;
134
+ message.txn_id = object.txn_id ?? undefined;
121
135
  return message;
122
136
  },
123
137
  };
@@ -190,7 +204,7 @@ exports.response = {
190
204
  },
191
205
  };
192
206
  function createBaseresponse_Data() {
193
- return { locked: 0, unlocked: 0, balance: 0, rupee_balance: 0, txn_id: 0, conversion_factor: 0 };
207
+ return { locked: 0, unlocked: 0, balance: 0, rupee_balance: 0, txn_id: 0, conversion_factor: 0, txn_status: "" };
194
208
  }
195
209
  exports.response_Data = {
196
210
  encode(message, writer = minimal_1.default.Writer.create()) {
@@ -212,6 +226,9 @@ exports.response_Data = {
212
226
  if (message.conversion_factor !== 0) {
213
227
  writer.uint32(48).int32(message.conversion_factor);
214
228
  }
229
+ if (message.txn_status !== "") {
230
+ writer.uint32(58).string(message.txn_status);
231
+ }
215
232
  return writer;
216
233
  },
217
234
  decode(input, length) {
@@ -257,6 +274,12 @@ exports.response_Data = {
257
274
  }
258
275
  message.conversion_factor = reader.int32();
259
276
  continue;
277
+ case 7:
278
+ if (tag !== 58) {
279
+ break;
280
+ }
281
+ message.txn_status = reader.string();
282
+ continue;
260
283
  }
261
284
  if ((tag & 7) === 4 || tag === 0) {
262
285
  break;
@@ -273,6 +296,7 @@ exports.response_Data = {
273
296
  rupee_balance: isSet(object.rupee_balance) ? globalThis.Number(object.rupee_balance) : 0,
274
297
  txn_id: isSet(object.txn_id) ? globalThis.Number(object.txn_id) : 0,
275
298
  conversion_factor: isSet(object.conversion_factor) ? globalThis.Number(object.conversion_factor) : 0,
299
+ txn_status: isSet(object.txn_status) ? globalThis.String(object.txn_status) : "",
276
300
  };
277
301
  },
278
302
  toJSON(message) {
@@ -295,6 +319,9 @@ exports.response_Data = {
295
319
  if (message.conversion_factor !== 0) {
296
320
  obj.conversion_factor = Math.round(message.conversion_factor);
297
321
  }
322
+ if (message.txn_status !== "") {
323
+ obj.txn_status = message.txn_status;
324
+ }
298
325
  return obj;
299
326
  },
300
327
  create(base) {
@@ -308,6 +335,7 @@ exports.response_Data = {
308
335
  message.rupee_balance = object.rupee_balance ?? 0;
309
336
  message.txn_id = object.txn_id ?? 0;
310
337
  message.conversion_factor = object.conversion_factor ?? 0;
338
+ message.txn_status = object.txn_status ?? "";
311
339
  return message;
312
340
  },
313
341
  };