@stashfin/grpc 1.0.26 → 1.0.28

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.0.26",
3
+ "version": "1.0.28",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -3,11 +3,9 @@ export declare const protobufPackage = "stashcash.creditsc";
3
3
  export interface request {
4
4
  customer_id: number;
5
5
  campaign_id: number;
6
- txn_id: number;
7
6
  amount: number;
8
- txn_type: string;
9
7
  sc_type: string;
10
- expiry: string;
8
+ expiry?: string | undefined;
11
9
  }
12
10
  export interface response {
13
11
  status: string;
@@ -14,7 +14,7 @@ const long_1 = __importDefault(require("long"));
14
14
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
15
15
  exports.protobufPackage = "stashcash.creditsc";
16
16
  function createBaserequest() {
17
- return { customer_id: 0, campaign_id: 0, txn_id: 0, amount: 0, txn_type: "", sc_type: "", expiry: "" };
17
+ return { customer_id: 0, campaign_id: 0, amount: 0, sc_type: "", expiry: undefined };
18
18
  }
19
19
  exports.request = {
20
20
  encode(message, writer = minimal_1.default.Writer.create()) {
@@ -24,20 +24,14 @@ exports.request = {
24
24
  if (message.campaign_id !== 0) {
25
25
  writer.uint32(16).int64(message.campaign_id);
26
26
  }
27
- if (message.txn_id !== 0) {
28
- writer.uint32(24).int64(message.txn_id);
29
- }
30
27
  if (message.amount !== 0) {
31
- writer.uint32(45).float(message.amount);
32
- }
33
- if (message.txn_type !== "") {
34
- writer.uint32(50).string(message.txn_type);
28
+ writer.uint32(29).float(message.amount);
35
29
  }
36
30
  if (message.sc_type !== "") {
37
- writer.uint32(58).string(message.sc_type);
31
+ writer.uint32(34).string(message.sc_type);
38
32
  }
39
- if (message.expiry !== "") {
40
- writer.uint32(66).string(message.expiry);
33
+ if (message.expiry !== undefined) {
34
+ writer.uint32(42).string(message.expiry);
41
35
  }
42
36
  return writer;
43
37
  },
@@ -61,31 +55,19 @@ exports.request = {
61
55
  message.campaign_id = longToNumber(reader.int64());
62
56
  continue;
63
57
  case 3:
64
- if (tag !== 24) {
65
- break;
66
- }
67
- message.txn_id = longToNumber(reader.int64());
68
- continue;
69
- case 5:
70
- if (tag !== 45) {
58
+ if (tag !== 29) {
71
59
  break;
72
60
  }
73
61
  message.amount = reader.float();
74
62
  continue;
75
- case 6:
76
- if (tag !== 50) {
77
- break;
78
- }
79
- message.txn_type = reader.string();
80
- continue;
81
- case 7:
82
- if (tag !== 58) {
63
+ case 4:
64
+ if (tag !== 34) {
83
65
  break;
84
66
  }
85
67
  message.sc_type = reader.string();
86
68
  continue;
87
- case 8:
88
- if (tag !== 66) {
69
+ case 5:
70
+ if (tag !== 42) {
89
71
  break;
90
72
  }
91
73
  message.expiry = reader.string();
@@ -102,11 +84,9 @@ exports.request = {
102
84
  return {
103
85
  customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
104
86
  campaign_id: isSet(object.campaign_id) ? globalThis.Number(object.campaign_id) : 0,
105
- txn_id: isSet(object.txn_id) ? globalThis.Number(object.txn_id) : 0,
106
87
  amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
107
- txn_type: isSet(object.txn_type) ? globalThis.String(object.txn_type) : "",
108
88
  sc_type: isSet(object.sc_type) ? globalThis.String(object.sc_type) : "",
109
- expiry: isSet(object.expiry) ? globalThis.String(object.expiry) : "",
89
+ expiry: isSet(object.expiry) ? globalThis.String(object.expiry) : undefined,
110
90
  };
111
91
  },
112
92
  toJSON(message) {
@@ -117,19 +97,13 @@ exports.request = {
117
97
  if (message.campaign_id !== 0) {
118
98
  obj.campaign_id = Math.round(message.campaign_id);
119
99
  }
120
- if (message.txn_id !== 0) {
121
- obj.txn_id = Math.round(message.txn_id);
122
- }
123
100
  if (message.amount !== 0) {
124
101
  obj.amount = message.amount;
125
102
  }
126
- if (message.txn_type !== "") {
127
- obj.txn_type = message.txn_type;
128
- }
129
103
  if (message.sc_type !== "") {
130
104
  obj.sc_type = message.sc_type;
131
105
  }
132
- if (message.expiry !== "") {
106
+ if (message.expiry !== undefined) {
133
107
  obj.expiry = message.expiry;
134
108
  }
135
109
  return obj;
@@ -141,11 +115,9 @@ exports.request = {
141
115
  const message = createBaserequest();
142
116
  message.customer_id = object.customer_id ?? 0;
143
117
  message.campaign_id = object.campaign_id ?? 0;
144
- message.txn_id = object.txn_id ?? 0;
145
118
  message.amount = object.amount ?? 0;
146
- message.txn_type = object.txn_type ?? "";
147
119
  message.sc_type = object.sc_type ?? "";
148
- message.expiry = object.expiry ?? "";
120
+ message.expiry = object.expiry ?? undefined;
149
121
  return message;
150
122
  },
151
123
  };
@@ -12,6 +12,7 @@ export interface response_Data {
12
12
  unlocked: number;
13
13
  balance: number;
14
14
  rupee_balance: number;
15
+ user_guide: boolean;
15
16
  }
16
17
  export declare const request: {
17
18
  encode(message: request, writer?: _m0.Writer): _m0.Writer;
@@ -132,7 +132,7 @@ exports.response = {
132
132
  },
133
133
  };
134
134
  function createBaseresponse_Data() {
135
- return { locked: 0, unlocked: 0, balance: 0, rupee_balance: 0 };
135
+ return { locked: 0, unlocked: 0, balance: 0, rupee_balance: 0, user_guide: false };
136
136
  }
137
137
  exports.response_Data = {
138
138
  encode(message, writer = minimal_1.default.Writer.create()) {
@@ -148,6 +148,9 @@ exports.response_Data = {
148
148
  if (message.rupee_balance !== 0) {
149
149
  writer.uint32(37).float(message.rupee_balance);
150
150
  }
151
+ if (message.user_guide !== false) {
152
+ writer.uint32(40).bool(message.user_guide);
153
+ }
151
154
  return writer;
152
155
  },
153
156
  decode(input, length) {
@@ -181,6 +184,12 @@ exports.response_Data = {
181
184
  }
182
185
  message.rupee_balance = reader.float();
183
186
  continue;
187
+ case 5:
188
+ if (tag !== 40) {
189
+ break;
190
+ }
191
+ message.user_guide = reader.bool();
192
+ continue;
184
193
  }
185
194
  if ((tag & 7) === 4 || tag === 0) {
186
195
  break;
@@ -195,6 +204,7 @@ exports.response_Data = {
195
204
  unlocked: isSet(object.unlocked) ? globalThis.Number(object.unlocked) : 0,
196
205
  balance: isSet(object.balance) ? globalThis.Number(object.balance) : 0,
197
206
  rupee_balance: isSet(object.rupee_balance) ? globalThis.Number(object.rupee_balance) : 0,
207
+ user_guide: isSet(object.user_guide) ? globalThis.Boolean(object.user_guide) : false,
198
208
  };
199
209
  },
200
210
  toJSON(message) {
@@ -211,6 +221,9 @@ exports.response_Data = {
211
221
  if (message.rupee_balance !== 0) {
212
222
  obj.rupee_balance = message.rupee_balance;
213
223
  }
224
+ if (message.user_guide !== false) {
225
+ obj.user_guide = message.user_guide;
226
+ }
214
227
  return obj;
215
228
  },
216
229
  create(base) {
@@ -222,6 +235,7 @@ exports.response_Data = {
222
235
  message.unlocked = object.unlocked ?? 0;
223
236
  message.balance = object.balance ?? 0;
224
237
  message.rupee_balance = object.rupee_balance ?? 0;
238
+ message.user_guide = object.user_guide ?? false;
225
239
  return message;
226
240
  },
227
241
  };
@@ -14,7 +14,7 @@ export interface SCtransaction {
14
14
  id: number;
15
15
  customer_id: number;
16
16
  campaign_id: number;
17
- txn_id: number;
17
+ txn_id: string;
18
18
  sc_type: string;
19
19
  amount: number;
20
20
  remaining: number;
@@ -22,7 +22,6 @@ export interface SCtransaction {
22
22
  status: string;
23
23
  expiry: string;
24
24
  created_at: string;
25
- updated_at: string;
26
25
  is_active: string;
27
26
  is_deleted: string;
28
27
  }
@@ -188,7 +188,7 @@ function createBaseSCtransaction() {
188
188
  id: 0,
189
189
  customer_id: 0,
190
190
  campaign_id: 0,
191
- txn_id: 0,
191
+ txn_id: "",
192
192
  sc_type: "",
193
193
  amount: 0,
194
194
  remaining: 0,
@@ -196,7 +196,6 @@ function createBaseSCtransaction() {
196
196
  status: "",
197
197
  expiry: "",
198
198
  created_at: "",
199
- updated_at: "",
200
199
  is_active: "",
201
200
  is_deleted: "",
202
201
  };
@@ -212,8 +211,8 @@ exports.SCtransaction = {
212
211
  if (message.campaign_id !== 0) {
213
212
  writer.uint32(24).int64(message.campaign_id);
214
213
  }
215
- if (message.txn_id !== 0) {
216
- writer.uint32(32).int64(message.txn_id);
214
+ if (message.txn_id !== "") {
215
+ writer.uint32(34).string(message.txn_id);
217
216
  }
218
217
  if (message.sc_type !== "") {
219
218
  writer.uint32(42).string(message.sc_type);
@@ -236,14 +235,11 @@ exports.SCtransaction = {
236
235
  if (message.created_at !== "") {
237
236
  writer.uint32(90).string(message.created_at);
238
237
  }
239
- if (message.updated_at !== "") {
240
- writer.uint32(98).string(message.updated_at);
241
- }
242
238
  if (message.is_active !== "") {
243
- writer.uint32(106).string(message.is_active);
239
+ writer.uint32(98).string(message.is_active);
244
240
  }
245
241
  if (message.is_deleted !== "") {
246
- writer.uint32(114).string(message.is_deleted);
242
+ writer.uint32(106).string(message.is_deleted);
247
243
  }
248
244
  return writer;
249
245
  },
@@ -273,10 +269,10 @@ exports.SCtransaction = {
273
269
  message.campaign_id = longToNumber(reader.int64());
274
270
  continue;
275
271
  case 4:
276
- if (tag !== 32) {
272
+ if (tag !== 34) {
277
273
  break;
278
274
  }
279
- message.txn_id = longToNumber(reader.int64());
275
+ message.txn_id = reader.string();
280
276
  continue;
281
277
  case 5:
282
278
  if (tag !== 42) {
@@ -324,18 +320,12 @@ exports.SCtransaction = {
324
320
  if (tag !== 98) {
325
321
  break;
326
322
  }
327
- message.updated_at = reader.string();
323
+ message.is_active = reader.string();
328
324
  continue;
329
325
  case 13:
330
326
  if (tag !== 106) {
331
327
  break;
332
328
  }
333
- message.is_active = reader.string();
334
- continue;
335
- case 14:
336
- if (tag !== 114) {
337
- break;
338
- }
339
329
  message.is_deleted = reader.string();
340
330
  continue;
341
331
  }
@@ -351,7 +341,7 @@ exports.SCtransaction = {
351
341
  id: isSet(object.id) ? globalThis.Number(object.id) : 0,
352
342
  customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
353
343
  campaign_id: isSet(object.campaign_id) ? globalThis.Number(object.campaign_id) : 0,
354
- txn_id: isSet(object.txn_id) ? globalThis.Number(object.txn_id) : 0,
344
+ txn_id: isSet(object.txn_id) ? globalThis.String(object.txn_id) : "",
355
345
  sc_type: isSet(object.sc_type) ? globalThis.String(object.sc_type) : "",
356
346
  amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
357
347
  remaining: isSet(object.remaining) ? globalThis.Number(object.remaining) : 0,
@@ -359,7 +349,6 @@ exports.SCtransaction = {
359
349
  status: isSet(object.status) ? globalThis.String(object.status) : "",
360
350
  expiry: isSet(object.expiry) ? globalThis.String(object.expiry) : "",
361
351
  created_at: isSet(object.created_at) ? globalThis.String(object.created_at) : "",
362
- updated_at: isSet(object.updated_at) ? globalThis.String(object.updated_at) : "",
363
352
  is_active: isSet(object.is_active) ? globalThis.String(object.is_active) : "",
364
353
  is_deleted: isSet(object.is_deleted) ? globalThis.String(object.is_deleted) : "",
365
354
  };
@@ -375,8 +364,8 @@ exports.SCtransaction = {
375
364
  if (message.campaign_id !== 0) {
376
365
  obj.campaign_id = Math.round(message.campaign_id);
377
366
  }
378
- if (message.txn_id !== 0) {
379
- obj.txn_id = Math.round(message.txn_id);
367
+ if (message.txn_id !== "") {
368
+ obj.txn_id = message.txn_id;
380
369
  }
381
370
  if (message.sc_type !== "") {
382
371
  obj.sc_type = message.sc_type;
@@ -399,9 +388,6 @@ exports.SCtransaction = {
399
388
  if (message.created_at !== "") {
400
389
  obj.created_at = message.created_at;
401
390
  }
402
- if (message.updated_at !== "") {
403
- obj.updated_at = message.updated_at;
404
- }
405
391
  if (message.is_active !== "") {
406
392
  obj.is_active = message.is_active;
407
393
  }
@@ -418,7 +404,7 @@ exports.SCtransaction = {
418
404
  message.id = object.id ?? 0;
419
405
  message.customer_id = object.customer_id ?? 0;
420
406
  message.campaign_id = object.campaign_id ?? 0;
421
- message.txn_id = object.txn_id ?? 0;
407
+ message.txn_id = object.txn_id ?? "";
422
408
  message.sc_type = object.sc_type ?? "";
423
409
  message.amount = object.amount ?? 0;
424
410
  message.remaining = object.remaining ?? 0;
@@ -426,7 +412,6 @@ exports.SCtransaction = {
426
412
  message.status = object.status ?? "";
427
413
  message.expiry = object.expiry ?? "";
428
414
  message.created_at = object.created_at ?? "";
429
- message.updated_at = object.updated_at ?? "";
430
415
  message.is_active = object.is_active ?? "";
431
416
  message.is_deleted = object.is_deleted ?? "";
432
417
  return message;