@stashfin/grpc 1.0.27 → 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.27",
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",
@@ -5,7 +5,7 @@ export interface request {
5
5
  campaign_id: number;
6
6
  amount: number;
7
7
  sc_type: string;
8
- expiry: string;
8
+ expiry?: string | undefined;
9
9
  }
10
10
  export interface response {
11
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, amount: 0, 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()) {
@@ -30,7 +30,7 @@ exports.request = {
30
30
  if (message.sc_type !== "") {
31
31
  writer.uint32(34).string(message.sc_type);
32
32
  }
33
- if (message.expiry !== "") {
33
+ if (message.expiry !== undefined) {
34
34
  writer.uint32(42).string(message.expiry);
35
35
  }
36
36
  return writer;
@@ -86,7 +86,7 @@ exports.request = {
86
86
  campaign_id: isSet(object.campaign_id) ? globalThis.Number(object.campaign_id) : 0,
87
87
  amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
88
88
  sc_type: isSet(object.sc_type) ? globalThis.String(object.sc_type) : "",
89
- expiry: isSet(object.expiry) ? globalThis.String(object.expiry) : "",
89
+ expiry: isSet(object.expiry) ? globalThis.String(object.expiry) : undefined,
90
90
  };
91
91
  },
92
92
  toJSON(message) {
@@ -103,7 +103,7 @@ exports.request = {
103
103
  if (message.sc_type !== "") {
104
104
  obj.sc_type = message.sc_type;
105
105
  }
106
- if (message.expiry !== "") {
106
+ if (message.expiry !== undefined) {
107
107
  obj.expiry = message.expiry;
108
108
  }
109
109
  return obj;
@@ -117,7 +117,7 @@ exports.request = {
117
117
  message.campaign_id = object.campaign_id ?? 0;
118
118
  message.amount = object.amount ?? 0;
119
119
  message.sc_type = object.sc_type ?? "";
120
- message.expiry = object.expiry ?? "";
120
+ message.expiry = object.expiry ?? undefined;
121
121
  return message;
122
122
  },
123
123
  };
@@ -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;
@@ -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,
@@ -211,8 +211,8 @@ exports.SCtransaction = {
211
211
  if (message.campaign_id !== 0) {
212
212
  writer.uint32(24).int64(message.campaign_id);
213
213
  }
214
- if (message.txn_id !== 0) {
215
- writer.uint32(32).int64(message.txn_id);
214
+ if (message.txn_id !== "") {
215
+ writer.uint32(34).string(message.txn_id);
216
216
  }
217
217
  if (message.sc_type !== "") {
218
218
  writer.uint32(42).string(message.sc_type);
@@ -236,10 +236,10 @@ exports.SCtransaction = {
236
236
  writer.uint32(90).string(message.created_at);
237
237
  }
238
238
  if (message.is_active !== "") {
239
- writer.uint32(106).string(message.is_active);
239
+ writer.uint32(98).string(message.is_active);
240
240
  }
241
241
  if (message.is_deleted !== "") {
242
- writer.uint32(114).string(message.is_deleted);
242
+ writer.uint32(106).string(message.is_deleted);
243
243
  }
244
244
  return writer;
245
245
  },
@@ -269,10 +269,10 @@ exports.SCtransaction = {
269
269
  message.campaign_id = longToNumber(reader.int64());
270
270
  continue;
271
271
  case 4:
272
- if (tag !== 32) {
272
+ if (tag !== 34) {
273
273
  break;
274
274
  }
275
- message.txn_id = longToNumber(reader.int64());
275
+ message.txn_id = reader.string();
276
276
  continue;
277
277
  case 5:
278
278
  if (tag !== 42) {
@@ -316,14 +316,14 @@ exports.SCtransaction = {
316
316
  }
317
317
  message.created_at = reader.string();
318
318
  continue;
319
- case 13:
320
- if (tag !== 106) {
319
+ case 12:
320
+ if (tag !== 98) {
321
321
  break;
322
322
  }
323
323
  message.is_active = reader.string();
324
324
  continue;
325
- case 14:
326
- if (tag !== 114) {
325
+ case 13:
326
+ if (tag !== 106) {
327
327
  break;
328
328
  }
329
329
  message.is_deleted = reader.string();
@@ -341,7 +341,7 @@ exports.SCtransaction = {
341
341
  id: isSet(object.id) ? globalThis.Number(object.id) : 0,
342
342
  customer_id: isSet(object.customer_id) ? globalThis.Number(object.customer_id) : 0,
343
343
  campaign_id: isSet(object.campaign_id) ? globalThis.Number(object.campaign_id) : 0,
344
- txn_id: isSet(object.txn_id) ? globalThis.Number(object.txn_id) : 0,
344
+ txn_id: isSet(object.txn_id) ? globalThis.String(object.txn_id) : "",
345
345
  sc_type: isSet(object.sc_type) ? globalThis.String(object.sc_type) : "",
346
346
  amount: isSet(object.amount) ? globalThis.Number(object.amount) : 0,
347
347
  remaining: isSet(object.remaining) ? globalThis.Number(object.remaining) : 0,
@@ -364,8 +364,8 @@ exports.SCtransaction = {
364
364
  if (message.campaign_id !== 0) {
365
365
  obj.campaign_id = Math.round(message.campaign_id);
366
366
  }
367
- if (message.txn_id !== 0) {
368
- obj.txn_id = Math.round(message.txn_id);
367
+ if (message.txn_id !== "") {
368
+ obj.txn_id = message.txn_id;
369
369
  }
370
370
  if (message.sc_type !== "") {
371
371
  obj.sc_type = message.sc_type;
@@ -404,7 +404,7 @@ exports.SCtransaction = {
404
404
  message.id = object.id ?? 0;
405
405
  message.customer_id = object.customer_id ?? 0;
406
406
  message.campaign_id = object.campaign_id ?? 0;
407
- message.txn_id = object.txn_id ?? 0;
407
+ message.txn_id = object.txn_id ?? "";
408
408
  message.sc_type = object.sc_type ?? "";
409
409
  message.amount = object.amount ?? 0;
410
410
  message.remaining = object.remaining ?? 0;