@stashfin/grpc 1.2.485 → 1.2.487

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.485",
3
+ "version": "1.2.487",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -1,7 +1,8 @@
1
1
  import _m0 from "protobufjs/minimal";
2
2
  export declare const protobufPackage = "upi.getTransactions";
3
3
  export interface getTransactionsRequest {
4
- txn_status?: string | undefined;
4
+ txn_status: string[];
5
+ txn_type: string[];
5
6
  limit?: number | undefined;
6
7
  off_set?: number | undefined;
7
8
  }
@@ -13,18 +13,21 @@ exports.getTransactionsResponse = exports.Data = exports.Transactions = exports.
13
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
14
  exports.protobufPackage = "upi.getTransactions";
15
15
  function createBasegetTransactionsRequest() {
16
- return { txn_status: undefined, limit: undefined, off_set: undefined };
16
+ return { txn_status: [], txn_type: [], limit: undefined, off_set: undefined };
17
17
  }
18
18
  exports.getTransactionsRequest = {
19
19
  encode(message, writer = minimal_1.default.Writer.create()) {
20
- if (message.txn_status !== undefined) {
21
- writer.uint32(10).string(message.txn_status);
20
+ for (const v of message.txn_status) {
21
+ writer.uint32(10).string(v);
22
+ }
23
+ for (const v of message.txn_type) {
24
+ writer.uint32(18).string(v);
22
25
  }
23
26
  if (message.limit !== undefined) {
24
- writer.uint32(16).int32(message.limit);
27
+ writer.uint32(24).int32(message.limit);
25
28
  }
26
29
  if (message.off_set !== undefined) {
27
- writer.uint32(24).int32(message.off_set);
30
+ writer.uint32(32).int32(message.off_set);
28
31
  }
29
32
  return writer;
30
33
  },
@@ -39,18 +42,24 @@ exports.getTransactionsRequest = {
39
42
  if (tag !== 10) {
40
43
  break;
41
44
  }
42
- message.txn_status = reader.string();
45
+ message.txn_status.push(reader.string());
43
46
  continue;
44
47
  case 2:
45
- if (tag !== 16) {
48
+ if (tag !== 18) {
46
49
  break;
47
50
  }
48
- message.limit = reader.int32();
51
+ message.txn_type.push(reader.string());
49
52
  continue;
50
53
  case 3:
51
54
  if (tag !== 24) {
52
55
  break;
53
56
  }
57
+ message.limit = reader.int32();
58
+ continue;
59
+ case 4:
60
+ if (tag !== 32) {
61
+ break;
62
+ }
54
63
  message.off_set = reader.int32();
55
64
  continue;
56
65
  }
@@ -63,16 +72,22 @@ exports.getTransactionsRequest = {
63
72
  },
64
73
  fromJSON(object) {
65
74
  return {
66
- txn_status: isSet(object.txn_status) ? globalThis.String(object.txn_status) : undefined,
75
+ txn_status: globalThis.Array.isArray(object?.txn_status)
76
+ ? object.txn_status.map((e) => globalThis.String(e))
77
+ : [],
78
+ txn_type: globalThis.Array.isArray(object?.txn_type) ? object.txn_type.map((e) => globalThis.String(e)) : [],
67
79
  limit: isSet(object.limit) ? globalThis.Number(object.limit) : undefined,
68
80
  off_set: isSet(object.off_set) ? globalThis.Number(object.off_set) : undefined,
69
81
  };
70
82
  },
71
83
  toJSON(message) {
72
84
  const obj = {};
73
- if (message.txn_status !== undefined) {
85
+ if (message.txn_status?.length) {
74
86
  obj.txn_status = message.txn_status;
75
87
  }
88
+ if (message.txn_type?.length) {
89
+ obj.txn_type = message.txn_type;
90
+ }
76
91
  if (message.limit !== undefined) {
77
92
  obj.limit = Math.round(message.limit);
78
93
  }
@@ -86,7 +101,8 @@ exports.getTransactionsRequest = {
86
101
  },
87
102
  fromPartial(object) {
88
103
  const message = createBasegetTransactionsRequest();
89
- message.txn_status = object.txn_status ?? undefined;
104
+ message.txn_status = object.txn_status?.map((e) => e) || [];
105
+ message.txn_type = object.txn_type?.map((e) => e) || [];
90
106
  message.limit = object.limit ?? undefined;
91
107
  message.off_set = object.off_set ?? undefined;
92
108
  return message;