@stashfin/grpc 1.2.879 → 1.2.880

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.879",
3
+ "version": "1.2.880",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -1,8 +1,17 @@
1
1
  import _m0 from "protobufjs/minimal";
2
2
  export declare const protobufPackage = "bbps.processwebhook";
3
- /** Request message */
3
+ export interface BDWebhookRequest {
4
+ order_id?: string | undefined;
5
+ transaction_id?: string | undefined;
6
+ auth_status?: string | undefined;
7
+ transaction_error_type?: string | undefined;
8
+ payment_method_type?: string | undefined;
9
+ transaction_date?: string | undefined;
10
+ transaction_error_desc?: string | undefined;
11
+ amount?: string | undefined;
12
+ }
4
13
  export interface BDTransactionRequest {
5
- metadata: string;
14
+ metadata: BDWebhookRequest | undefined;
6
15
  }
7
16
  /** Transaction response message */
8
17
  export interface TxnResponse {
@@ -38,6 +47,14 @@ export interface BDTransactionResponse {
38
47
  txnResponse: TxnResponse | undefined;
39
48
  authSessionResponse: AuthSessionResponse | undefined;
40
49
  }
50
+ export declare const BDWebhookRequest: {
51
+ encode(message: BDWebhookRequest, writer?: _m0.Writer): _m0.Writer;
52
+ decode(input: _m0.Reader | Uint8Array, length?: number): BDWebhookRequest;
53
+ fromJSON(object: any): BDWebhookRequest;
54
+ toJSON(message: BDWebhookRequest): unknown;
55
+ create<I extends Exact<DeepPartial<BDWebhookRequest>, I>>(base?: I): BDWebhookRequest;
56
+ fromPartial<I extends Exact<DeepPartial<BDWebhookRequest>, I>>(object: I): BDWebhookRequest;
57
+ };
41
58
  export declare const BDTransactionRequest: {
42
59
  encode(message: BDTransactionRequest, writer?: _m0.Writer): _m0.Writer;
43
60
  decode(input: _m0.Reader | Uint8Array, length?: number): BDTransactionRequest;
@@ -8,17 +8,182 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
8
8
  return (mod && mod.__esModule) ? mod : { "default": mod };
9
9
  };
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.BDTransactionResponse = exports.AuthSessionResponse = exports.TxnResponse = exports.BDTransactionRequest = exports.protobufPackage = void 0;
11
+ exports.BDTransactionResponse = exports.AuthSessionResponse = exports.TxnResponse = exports.BDTransactionRequest = exports.BDWebhookRequest = exports.protobufPackage = void 0;
12
12
  /* eslint-disable */
13
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
14
  exports.protobufPackage = "bbps.processwebhook";
15
+ function createBaseBDWebhookRequest() {
16
+ return {
17
+ order_id: undefined,
18
+ transaction_id: undefined,
19
+ auth_status: undefined,
20
+ transaction_error_type: undefined,
21
+ payment_method_type: undefined,
22
+ transaction_date: undefined,
23
+ transaction_error_desc: undefined,
24
+ amount: undefined,
25
+ };
26
+ }
27
+ exports.BDWebhookRequest = {
28
+ encode(message, writer = minimal_1.default.Writer.create()) {
29
+ if (message.order_id !== undefined) {
30
+ writer.uint32(10).string(message.order_id);
31
+ }
32
+ if (message.transaction_id !== undefined) {
33
+ writer.uint32(18).string(message.transaction_id);
34
+ }
35
+ if (message.auth_status !== undefined) {
36
+ writer.uint32(26).string(message.auth_status);
37
+ }
38
+ if (message.transaction_error_type !== undefined) {
39
+ writer.uint32(34).string(message.transaction_error_type);
40
+ }
41
+ if (message.payment_method_type !== undefined) {
42
+ writer.uint32(42).string(message.payment_method_type);
43
+ }
44
+ if (message.transaction_date !== undefined) {
45
+ writer.uint32(50).string(message.transaction_date);
46
+ }
47
+ if (message.transaction_error_desc !== undefined) {
48
+ writer.uint32(58).string(message.transaction_error_desc);
49
+ }
50
+ if (message.amount !== undefined) {
51
+ writer.uint32(66).string(message.amount);
52
+ }
53
+ return writer;
54
+ },
55
+ decode(input, length) {
56
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
57
+ let end = length === undefined ? reader.len : reader.pos + length;
58
+ const message = createBaseBDWebhookRequest();
59
+ while (reader.pos < end) {
60
+ const tag = reader.uint32();
61
+ switch (tag >>> 3) {
62
+ case 1:
63
+ if (tag !== 10) {
64
+ break;
65
+ }
66
+ message.order_id = reader.string();
67
+ continue;
68
+ case 2:
69
+ if (tag !== 18) {
70
+ break;
71
+ }
72
+ message.transaction_id = reader.string();
73
+ continue;
74
+ case 3:
75
+ if (tag !== 26) {
76
+ break;
77
+ }
78
+ message.auth_status = reader.string();
79
+ continue;
80
+ case 4:
81
+ if (tag !== 34) {
82
+ break;
83
+ }
84
+ message.transaction_error_type = reader.string();
85
+ continue;
86
+ case 5:
87
+ if (tag !== 42) {
88
+ break;
89
+ }
90
+ message.payment_method_type = reader.string();
91
+ continue;
92
+ case 6:
93
+ if (tag !== 50) {
94
+ break;
95
+ }
96
+ message.transaction_date = reader.string();
97
+ continue;
98
+ case 7:
99
+ if (tag !== 58) {
100
+ break;
101
+ }
102
+ message.transaction_error_desc = reader.string();
103
+ continue;
104
+ case 8:
105
+ if (tag !== 66) {
106
+ break;
107
+ }
108
+ message.amount = reader.string();
109
+ continue;
110
+ }
111
+ if ((tag & 7) === 4 || tag === 0) {
112
+ break;
113
+ }
114
+ reader.skipType(tag & 7);
115
+ }
116
+ return message;
117
+ },
118
+ fromJSON(object) {
119
+ return {
120
+ order_id: isSet(object.order_id) ? globalThis.String(object.order_id) : undefined,
121
+ transaction_id: isSet(object.transaction_id) ? globalThis.String(object.transaction_id) : undefined,
122
+ auth_status: isSet(object.auth_status) ? globalThis.String(object.auth_status) : undefined,
123
+ transaction_error_type: isSet(object.transaction_error_type)
124
+ ? globalThis.String(object.transaction_error_type)
125
+ : undefined,
126
+ payment_method_type: isSet(object.payment_method_type)
127
+ ? globalThis.String(object.payment_method_type)
128
+ : undefined,
129
+ transaction_date: isSet(object.transaction_date) ? globalThis.String(object.transaction_date) : undefined,
130
+ transaction_error_desc: isSet(object.transaction_error_desc)
131
+ ? globalThis.String(object.transaction_error_desc)
132
+ : undefined,
133
+ amount: isSet(object.amount) ? globalThis.String(object.amount) : undefined,
134
+ };
135
+ },
136
+ toJSON(message) {
137
+ const obj = {};
138
+ if (message.order_id !== undefined) {
139
+ obj.order_id = message.order_id;
140
+ }
141
+ if (message.transaction_id !== undefined) {
142
+ obj.transaction_id = message.transaction_id;
143
+ }
144
+ if (message.auth_status !== undefined) {
145
+ obj.auth_status = message.auth_status;
146
+ }
147
+ if (message.transaction_error_type !== undefined) {
148
+ obj.transaction_error_type = message.transaction_error_type;
149
+ }
150
+ if (message.payment_method_type !== undefined) {
151
+ obj.payment_method_type = message.payment_method_type;
152
+ }
153
+ if (message.transaction_date !== undefined) {
154
+ obj.transaction_date = message.transaction_date;
155
+ }
156
+ if (message.transaction_error_desc !== undefined) {
157
+ obj.transaction_error_desc = message.transaction_error_desc;
158
+ }
159
+ if (message.amount !== undefined) {
160
+ obj.amount = message.amount;
161
+ }
162
+ return obj;
163
+ },
164
+ create(base) {
165
+ return exports.BDWebhookRequest.fromPartial(base ?? {});
166
+ },
167
+ fromPartial(object) {
168
+ const message = createBaseBDWebhookRequest();
169
+ message.order_id = object.order_id ?? undefined;
170
+ message.transaction_id = object.transaction_id ?? undefined;
171
+ message.auth_status = object.auth_status ?? undefined;
172
+ message.transaction_error_type = object.transaction_error_type ?? undefined;
173
+ message.payment_method_type = object.payment_method_type ?? undefined;
174
+ message.transaction_date = object.transaction_date ?? undefined;
175
+ message.transaction_error_desc = object.transaction_error_desc ?? undefined;
176
+ message.amount = object.amount ?? undefined;
177
+ return message;
178
+ },
179
+ };
15
180
  function createBaseBDTransactionRequest() {
16
- return { metadata: "" };
181
+ return { metadata: undefined };
17
182
  }
18
183
  exports.BDTransactionRequest = {
19
184
  encode(message, writer = minimal_1.default.Writer.create()) {
20
- if (message.metadata !== "") {
21
- writer.uint32(10).string(message.metadata);
185
+ if (message.metadata !== undefined) {
186
+ exports.BDWebhookRequest.encode(message.metadata, writer.uint32(10).fork()).ldelim();
22
187
  }
23
188
  return writer;
24
189
  },
@@ -33,7 +198,7 @@ exports.BDTransactionRequest = {
33
198
  if (tag !== 10) {
34
199
  break;
35
200
  }
36
- message.metadata = reader.string();
201
+ message.metadata = exports.BDWebhookRequest.decode(reader, reader.uint32());
37
202
  continue;
38
203
  }
39
204
  if ((tag & 7) === 4 || tag === 0) {
@@ -44,12 +209,12 @@ exports.BDTransactionRequest = {
44
209
  return message;
45
210
  },
46
211
  fromJSON(object) {
47
- return { metadata: isSet(object.metadata) ? globalThis.String(object.metadata) : "" };
212
+ return { metadata: isSet(object.metadata) ? exports.BDWebhookRequest.fromJSON(object.metadata) : undefined };
48
213
  },
49
214
  toJSON(message) {
50
215
  const obj = {};
51
- if (message.metadata !== "") {
52
- obj.metadata = message.metadata;
216
+ if (message.metadata !== undefined) {
217
+ obj.metadata = exports.BDWebhookRequest.toJSON(message.metadata);
53
218
  }
54
219
  return obj;
55
220
  },
@@ -58,7 +223,9 @@ exports.BDTransactionRequest = {
58
223
  },
59
224
  fromPartial(object) {
60
225
  const message = createBaseBDTransactionRequest();
61
- message.metadata = object.metadata ?? "";
226
+ message.metadata = (object.metadata !== undefined && object.metadata !== null)
227
+ ? exports.BDWebhookRequest.fromPartial(object.metadata)
228
+ : undefined;
62
229
  return message;
63
230
  },
64
231
  };