@stashfin/grpc 1.2.793 → 1.2.795

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.793",
3
+ "version": "1.2.795",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts && mkdirp dist",
@@ -13,6 +13,10 @@ export interface request {
13
13
  }
14
14
  export interface response {
15
15
  status: string;
16
+ status_code: number;
17
+ data?: response_Data | undefined;
18
+ }
19
+ export interface response_Data {
16
20
  refundResponse: string;
17
21
  }
18
22
  export declare const request: {
@@ -31,6 +35,14 @@ export declare const response: {
31
35
  create<I extends Exact<DeepPartial<response>, I>>(base?: I): response;
32
36
  fromPartial<I extends Exact<DeepPartial<response>, I>>(object: I): response;
33
37
  };
38
+ export declare const response_Data: {
39
+ encode(message: response_Data, writer?: _m0.Writer): _m0.Writer;
40
+ decode(input: _m0.Reader | Uint8Array, length?: number): response_Data;
41
+ fromJSON(object: any): response_Data;
42
+ toJSON(message: response_Data): unknown;
43
+ create<I extends Exact<DeepPartial<response_Data>, I>>(base?: I): response_Data;
44
+ fromPartial<I extends Exact<DeepPartial<response_Data>, I>>(object: I): response_Data;
45
+ };
34
46
  type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
35
47
  export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
36
48
  [K in keyof T]?: DeepPartial<T[K]>;
@@ -8,7 +8,7 @@ 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.response = exports.request = exports.protobufPackage = void 0;
11
+ exports.response_Data = exports.response = exports.request = exports.protobufPackage = void 0;
12
12
  /* eslint-disable */
13
13
  const long_1 = __importDefault(require("long"));
14
14
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
@@ -188,15 +188,18 @@ exports.request = {
188
188
  },
189
189
  };
190
190
  function createBaseresponse() {
191
- return { status: "", refundResponse: "" };
191
+ return { status: "", status_code: 0, data: undefined };
192
192
  }
193
193
  exports.response = {
194
194
  encode(message, writer = minimal_1.default.Writer.create()) {
195
195
  if (message.status !== "") {
196
196
  writer.uint32(10).string(message.status);
197
197
  }
198
- if (message.refundResponse !== "") {
199
- writer.uint32(18).string(message.refundResponse);
198
+ if (message.status_code !== 0) {
199
+ writer.uint32(16).int32(message.status_code);
200
+ }
201
+ if (message.data !== undefined) {
202
+ exports.response_Data.encode(message.data, writer.uint32(26).fork()).ldelim();
200
203
  }
201
204
  return writer;
202
205
  },
@@ -214,10 +217,16 @@ exports.response = {
214
217
  message.status = reader.string();
215
218
  continue;
216
219
  case 2:
217
- if (tag !== 18) {
220
+ if (tag !== 16) {
218
221
  break;
219
222
  }
220
- message.refundResponse = reader.string();
223
+ message.status_code = reader.int32();
224
+ continue;
225
+ case 3:
226
+ if (tag !== 26) {
227
+ break;
228
+ }
229
+ message.data = exports.response_Data.decode(reader, reader.uint32());
221
230
  continue;
222
231
  }
223
232
  if ((tag & 7) === 4 || tag === 0) {
@@ -230,7 +239,8 @@ exports.response = {
230
239
  fromJSON(object) {
231
240
  return {
232
241
  status: isSet(object.status) ? globalThis.String(object.status) : "",
233
- refundResponse: isSet(object.refundResponse) ? globalThis.String(object.refundResponse) : "",
242
+ status_code: isSet(object.status_code) ? globalThis.Number(object.status_code) : 0,
243
+ data: isSet(object.data) ? exports.response_Data.fromJSON(object.data) : undefined,
234
244
  };
235
245
  },
236
246
  toJSON(message) {
@@ -238,8 +248,11 @@ exports.response = {
238
248
  if (message.status !== "") {
239
249
  obj.status = message.status;
240
250
  }
241
- if (message.refundResponse !== "") {
242
- obj.refundResponse = message.refundResponse;
251
+ if (message.status_code !== 0) {
252
+ obj.status_code = Math.round(message.status_code);
253
+ }
254
+ if (message.data !== undefined) {
255
+ obj.data = exports.response_Data.toJSON(message.data);
243
256
  }
244
257
  return obj;
245
258
  },
@@ -249,6 +262,59 @@ exports.response = {
249
262
  fromPartial(object) {
250
263
  const message = createBaseresponse();
251
264
  message.status = object.status ?? "";
265
+ message.status_code = object.status_code ?? 0;
266
+ message.data = (object.data !== undefined && object.data !== null)
267
+ ? exports.response_Data.fromPartial(object.data)
268
+ : undefined;
269
+ return message;
270
+ },
271
+ };
272
+ function createBaseresponse_Data() {
273
+ return { refundResponse: "" };
274
+ }
275
+ exports.response_Data = {
276
+ encode(message, writer = minimal_1.default.Writer.create()) {
277
+ if (message.refundResponse !== "") {
278
+ writer.uint32(10).string(message.refundResponse);
279
+ }
280
+ return writer;
281
+ },
282
+ decode(input, length) {
283
+ const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
284
+ let end = length === undefined ? reader.len : reader.pos + length;
285
+ const message = createBaseresponse_Data();
286
+ while (reader.pos < end) {
287
+ const tag = reader.uint32();
288
+ switch (tag >>> 3) {
289
+ case 1:
290
+ if (tag !== 10) {
291
+ break;
292
+ }
293
+ message.refundResponse = reader.string();
294
+ continue;
295
+ }
296
+ if ((tag & 7) === 4 || tag === 0) {
297
+ break;
298
+ }
299
+ reader.skipType(tag & 7);
300
+ }
301
+ return message;
302
+ },
303
+ fromJSON(object) {
304
+ return { refundResponse: isSet(object.refundResponse) ? globalThis.String(object.refundResponse) : "" };
305
+ },
306
+ toJSON(message) {
307
+ const obj = {};
308
+ if (message.refundResponse !== "") {
309
+ obj.refundResponse = message.refundResponse;
310
+ }
311
+ return obj;
312
+ },
313
+ create(base) {
314
+ return exports.response_Data.fromPartial(base ?? {});
315
+ },
316
+ fromPartial(object) {
317
+ const message = createBaseresponse_Data();
252
318
  message.refundResponse = object.refundResponse ?? "";
253
319
  return message;
254
320
  },