@stashfin/grpc 1.0.10 → 1.0.11

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.10",
3
+ "version": "1.0.11",
4
4
  "description": "Grpc proto manger",
5
5
  "scripts": {
6
6
  "prebuild": "rimraf src/ts && mkdirp src/ts",
package/user/getUser.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import _m0 from "protobufjs/minimal";
2
2
  export declare const protobufPackage = "user.get";
3
3
  export interface request {
4
- id: string;
4
+ id: number;
5
5
  }
6
6
  export interface response {
7
7
  id: number;
@@ -14,14 +14,14 @@ export declare const request: {
14
14
  fromJSON(object: any): request;
15
15
  toJSON(message: request): unknown;
16
16
  create<I extends {
17
- id?: string | undefined;
17
+ id?: number | undefined;
18
18
  } & {
19
- id?: string | undefined;
19
+ id?: number | undefined;
20
20
  } & { [K in Exclude<keyof I, "id">]: never; }>(base?: I): request;
21
21
  fromPartial<I_1 extends {
22
- id?: string | undefined;
22
+ id?: number | undefined;
23
23
  } & {
24
- id?: string | undefined;
24
+ id?: number | undefined;
25
25
  } & { [K_1 in Exclude<keyof I_1, "id">]: never; }>(object: I_1): request;
26
26
  };
27
27
  export declare const response: {
package/user/getUser.js CHANGED
@@ -13,12 +13,12 @@ exports.response = exports.request = exports.protobufPackage = void 0;
13
13
  const minimal_1 = __importDefault(require("protobufjs/minimal"));
14
14
  exports.protobufPackage = "user.get";
15
15
  function createBaserequest() {
16
- return { id: "" };
16
+ return { id: 0 };
17
17
  }
18
18
  exports.request = {
19
19
  encode(message, writer = minimal_1.default.Writer.create()) {
20
- if (message.id !== "") {
21
- writer.uint32(10).string(message.id);
20
+ if (message.id !== 0) {
21
+ writer.uint32(8).int32(message.id);
22
22
  }
23
23
  return writer;
24
24
  },
@@ -30,10 +30,10 @@ exports.request = {
30
30
  const tag = reader.uint32();
31
31
  switch (tag >>> 3) {
32
32
  case 1:
33
- if (tag !== 10) {
33
+ if (tag !== 8) {
34
34
  break;
35
35
  }
36
- message.id = reader.string();
36
+ message.id = reader.int32();
37
37
  continue;
38
38
  }
39
39
  if ((tag & 7) === 4 || tag === 0) {
@@ -44,12 +44,12 @@ exports.request = {
44
44
  return message;
45
45
  },
46
46
  fromJSON(object) {
47
- return { id: isSet(object.id) ? globalThis.String(object.id) : "" };
47
+ return { id: isSet(object.id) ? globalThis.Number(object.id) : 0 };
48
48
  },
49
49
  toJSON(message) {
50
50
  const obj = {};
51
- if (message.id !== "") {
52
- obj.id = message.id;
51
+ if (message.id !== 0) {
52
+ obj.id = Math.round(message.id);
53
53
  }
54
54
  return obj;
55
55
  },
@@ -58,7 +58,7 @@ exports.request = {
58
58
  },
59
59
  fromPartial(object) {
60
60
  const message = createBaserequest();
61
- message.id = object.id ?? "";
61
+ message.id = object.id ?? 0;
62
62
  return message;
63
63
  },
64
64
  };