@stashfin/grpc 1.0.16 → 1.0.17
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 +3 -2
- package/proto/customer/sendotp.proto +12 -0
- package/proto/customer/verifyotp.proto +15 -0
- package/proto/customer.proto +11 -0
- package/ts/{gameengine/getcustomer.d.ts → customer/sendotp.d.ts} +18 -18
- package/ts/{gameengine/getcustomer.js → customer/sendotp.js} +27 -27
- package/ts/customer/verifyotp.d.ts +71 -0
- package/ts/customer/verifyotp.js +177 -0
- package/ts/customer.d.ts +43 -0
- package/ts/customer.js +34 -0
- package/proto/gameEngine.proto +0 -9
- package/proto/gameengine/getcustomer.proto +0 -12
- package/ts/gameEngine.d.ts +0 -29
- package/ts/gameEngine.js +0 -24
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stashfin/grpc",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"description": "Grpc proto manger",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prebuild": "rimraf src/ts && mkdirp src/ts",
|
|
7
7
|
"build": "npx protoc --plugin=$(npm root)/.bin/protoc-gen-ts_proto --ts_proto_out=src/ts --ts_proto_opt=outputServices=grpc-js --ts_proto_opt=esModuleInterop=true -I=src/proto/ src/**/*.proto",
|
|
8
8
|
"postbuild": "tsc --build && cp package.json dist/ && mkdirp dist/proto && cp -r src/proto/* dist/proto/",
|
|
9
9
|
"publish:patch": "npm version patch && npm run build && cd dist && npm publish --access public",
|
|
10
|
-
"publish:minor": "npm version minor && npm run build && cd dist && npm publish --access public"
|
|
10
|
+
"publish:minor": "npm version minor && npm run build && cd dist && npm publish --access public",
|
|
11
|
+
"publish:local": "npm run build && cd dist && npm link"
|
|
11
12
|
},
|
|
12
13
|
"author": "Yogesh Randive",
|
|
13
14
|
"license": "ISC",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package customer;
|
|
4
|
+
|
|
5
|
+
import "customer/sendotp.proto";
|
|
6
|
+
import "customer/verifyotp.proto";
|
|
7
|
+
|
|
8
|
+
service CustomerService {
|
|
9
|
+
rpc sendOtp(.customer.sendotp.request) returns (.customer.sendotp.response) {}
|
|
10
|
+
rpc verifyOtp(.customer.verifyotp.request) returns (.customer.verifyotp.response) {}
|
|
11
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import _m0 from "protobufjs/minimal";
|
|
2
|
-
export declare const protobufPackage = "
|
|
2
|
+
export declare const protobufPackage = "customer.sendotp";
|
|
3
3
|
export interface request {
|
|
4
|
-
|
|
4
|
+
mobile: string;
|
|
5
5
|
}
|
|
6
6
|
export interface response {
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
ismpin: boolean;
|
|
8
|
+
token: string;
|
|
9
9
|
}
|
|
10
10
|
export declare const request: {
|
|
11
11
|
encode(message: request, writer?: _m0.Writer): _m0.Writer;
|
|
@@ -13,15 +13,15 @@ export declare const request: {
|
|
|
13
13
|
fromJSON(object: any): request;
|
|
14
14
|
toJSON(message: request): unknown;
|
|
15
15
|
create<I extends {
|
|
16
|
-
|
|
16
|
+
mobile?: string | undefined;
|
|
17
17
|
} & {
|
|
18
|
-
|
|
19
|
-
} & { [K in Exclude<keyof I, "
|
|
18
|
+
mobile?: string | undefined;
|
|
19
|
+
} & { [K in Exclude<keyof I, "mobile">]: never; }>(base?: I): request;
|
|
20
20
|
fromPartial<I_1 extends {
|
|
21
|
-
|
|
21
|
+
mobile?: string | undefined;
|
|
22
22
|
} & {
|
|
23
|
-
|
|
24
|
-
} & { [K_1 in Exclude<keyof I_1, "
|
|
23
|
+
mobile?: string | undefined;
|
|
24
|
+
} & { [K_1 in Exclude<keyof I_1, "mobile">]: never; }>(object: I_1): request;
|
|
25
25
|
};
|
|
26
26
|
export declare const response: {
|
|
27
27
|
encode(message: response, writer?: _m0.Writer): _m0.Writer;
|
|
@@ -29,18 +29,18 @@ export declare const response: {
|
|
|
29
29
|
fromJSON(object: any): response;
|
|
30
30
|
toJSON(message: response): unknown;
|
|
31
31
|
create<I extends {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
ismpin?: boolean | undefined;
|
|
33
|
+
token?: string | undefined;
|
|
34
34
|
} & {
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
ismpin?: boolean | undefined;
|
|
36
|
+
token?: string | undefined;
|
|
37
37
|
} & { [K in Exclude<keyof I, keyof response>]: never; }>(base?: I): response;
|
|
38
38
|
fromPartial<I_1 extends {
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
ismpin?: boolean | undefined;
|
|
40
|
+
token?: string | undefined;
|
|
41
41
|
} & {
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
ismpin?: boolean | undefined;
|
|
43
|
+
token?: string | undefined;
|
|
44
44
|
} & { [K_1 in Exclude<keyof I_1, keyof response>]: never; }>(object: I_1): response;
|
|
45
45
|
};
|
|
46
46
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// versions:
|
|
4
4
|
// protoc-gen-ts_proto v1.178.0
|
|
5
5
|
// protoc v3.20.3
|
|
6
|
-
// source:
|
|
6
|
+
// source: customer/sendotp.proto
|
|
7
7
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
8
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
9
|
};
|
|
@@ -11,14 +11,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
11
11
|
exports.response = exports.request = exports.protobufPackage = void 0;
|
|
12
12
|
/* eslint-disable */
|
|
13
13
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
14
|
-
exports.protobufPackage = "
|
|
14
|
+
exports.protobufPackage = "customer.sendotp";
|
|
15
15
|
function createBaserequest() {
|
|
16
|
-
return {
|
|
16
|
+
return { mobile: "" };
|
|
17
17
|
}
|
|
18
18
|
exports.request = {
|
|
19
19
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
20
|
-
if (message.
|
|
21
|
-
writer.uint32(
|
|
20
|
+
if (message.mobile !== "") {
|
|
21
|
+
writer.uint32(10).string(message.mobile);
|
|
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 !==
|
|
33
|
+
if (tag !== 10) {
|
|
34
34
|
break;
|
|
35
35
|
}
|
|
36
|
-
message.
|
|
36
|
+
message.mobile = reader.string();
|
|
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 {
|
|
47
|
+
return { mobile: isSet(object.mobile) ? globalThis.String(object.mobile) : "" };
|
|
48
48
|
},
|
|
49
49
|
toJSON(message) {
|
|
50
50
|
const obj = {};
|
|
51
|
-
if (message.
|
|
52
|
-
obj.
|
|
51
|
+
if (message.mobile !== "") {
|
|
52
|
+
obj.mobile = message.mobile;
|
|
53
53
|
}
|
|
54
54
|
return obj;
|
|
55
55
|
},
|
|
@@ -58,20 +58,20 @@ exports.request = {
|
|
|
58
58
|
},
|
|
59
59
|
fromPartial(object) {
|
|
60
60
|
const message = createBaserequest();
|
|
61
|
-
message.
|
|
61
|
+
message.mobile = object.mobile ?? "";
|
|
62
62
|
return message;
|
|
63
63
|
},
|
|
64
64
|
};
|
|
65
65
|
function createBaseresponse() {
|
|
66
|
-
return {
|
|
66
|
+
return { ismpin: false, token: "" };
|
|
67
67
|
}
|
|
68
68
|
exports.response = {
|
|
69
69
|
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
70
|
-
if (message.
|
|
71
|
-
writer.uint32(
|
|
70
|
+
if (message.ismpin !== false) {
|
|
71
|
+
writer.uint32(8).bool(message.ismpin);
|
|
72
72
|
}
|
|
73
|
-
if (message.
|
|
74
|
-
writer.uint32(18).string(message.
|
|
73
|
+
if (message.token !== "") {
|
|
74
|
+
writer.uint32(18).string(message.token);
|
|
75
75
|
}
|
|
76
76
|
return writer;
|
|
77
77
|
},
|
|
@@ -83,16 +83,16 @@ exports.response = {
|
|
|
83
83
|
const tag = reader.uint32();
|
|
84
84
|
switch (tag >>> 3) {
|
|
85
85
|
case 1:
|
|
86
|
-
if (tag !==
|
|
86
|
+
if (tag !== 8) {
|
|
87
87
|
break;
|
|
88
88
|
}
|
|
89
|
-
message.
|
|
89
|
+
message.ismpin = reader.bool();
|
|
90
90
|
continue;
|
|
91
91
|
case 2:
|
|
92
92
|
if (tag !== 18) {
|
|
93
93
|
break;
|
|
94
94
|
}
|
|
95
|
-
message.
|
|
95
|
+
message.token = reader.string();
|
|
96
96
|
continue;
|
|
97
97
|
}
|
|
98
98
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -104,17 +104,17 @@ exports.response = {
|
|
|
104
104
|
},
|
|
105
105
|
fromJSON(object) {
|
|
106
106
|
return {
|
|
107
|
-
|
|
108
|
-
|
|
107
|
+
ismpin: isSet(object.ismpin) ? globalThis.Boolean(object.ismpin) : false,
|
|
108
|
+
token: isSet(object.token) ? globalThis.String(object.token) : "",
|
|
109
109
|
};
|
|
110
110
|
},
|
|
111
111
|
toJSON(message) {
|
|
112
112
|
const obj = {};
|
|
113
|
-
if (message.
|
|
114
|
-
obj.
|
|
113
|
+
if (message.ismpin !== false) {
|
|
114
|
+
obj.ismpin = message.ismpin;
|
|
115
115
|
}
|
|
116
|
-
if (message.
|
|
117
|
-
obj.
|
|
116
|
+
if (message.token !== "") {
|
|
117
|
+
obj.token = message.token;
|
|
118
118
|
}
|
|
119
119
|
return obj;
|
|
120
120
|
},
|
|
@@ -123,8 +123,8 @@ exports.response = {
|
|
|
123
123
|
},
|
|
124
124
|
fromPartial(object) {
|
|
125
125
|
const message = createBaseresponse();
|
|
126
|
-
message.
|
|
127
|
-
message.
|
|
126
|
+
message.ismpin = object.ismpin ?? false;
|
|
127
|
+
message.token = object.token ?? "";
|
|
128
128
|
return message;
|
|
129
129
|
},
|
|
130
130
|
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import _m0 from "protobufjs/minimal";
|
|
2
|
+
export declare const protobufPackage = "customer.verifyotp";
|
|
3
|
+
export interface request {
|
|
4
|
+
mobile: string;
|
|
5
|
+
otp: string;
|
|
6
|
+
tnc: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface response {
|
|
9
|
+
ismpin: boolean;
|
|
10
|
+
customerid: number;
|
|
11
|
+
token: string;
|
|
12
|
+
}
|
|
13
|
+
export declare const request: {
|
|
14
|
+
encode(message: request, writer?: _m0.Writer): _m0.Writer;
|
|
15
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): request;
|
|
16
|
+
fromJSON(object: any): request;
|
|
17
|
+
toJSON(message: request): unknown;
|
|
18
|
+
create<I extends {
|
|
19
|
+
mobile?: string | undefined;
|
|
20
|
+
otp?: string | undefined;
|
|
21
|
+
tnc?: boolean | undefined;
|
|
22
|
+
} & {
|
|
23
|
+
mobile?: string | undefined;
|
|
24
|
+
otp?: string | undefined;
|
|
25
|
+
tnc?: boolean | undefined;
|
|
26
|
+
} & { [K in Exclude<keyof I, keyof request>]: never; }>(base?: I): request;
|
|
27
|
+
fromPartial<I_1 extends {
|
|
28
|
+
mobile?: string | undefined;
|
|
29
|
+
otp?: string | undefined;
|
|
30
|
+
tnc?: boolean | undefined;
|
|
31
|
+
} & {
|
|
32
|
+
mobile?: string | undefined;
|
|
33
|
+
otp?: string | undefined;
|
|
34
|
+
tnc?: boolean | undefined;
|
|
35
|
+
} & { [K_1 in Exclude<keyof I_1, keyof request>]: never; }>(object: I_1): request;
|
|
36
|
+
};
|
|
37
|
+
export declare const response: {
|
|
38
|
+
encode(message: response, writer?: _m0.Writer): _m0.Writer;
|
|
39
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): response;
|
|
40
|
+
fromJSON(object: any): response;
|
|
41
|
+
toJSON(message: response): unknown;
|
|
42
|
+
create<I extends {
|
|
43
|
+
ismpin?: boolean | undefined;
|
|
44
|
+
customerid?: number | undefined;
|
|
45
|
+
token?: string | undefined;
|
|
46
|
+
} & {
|
|
47
|
+
ismpin?: boolean | undefined;
|
|
48
|
+
customerid?: number | undefined;
|
|
49
|
+
token?: string | undefined;
|
|
50
|
+
} & { [K in Exclude<keyof I, keyof response>]: never; }>(base?: I): response;
|
|
51
|
+
fromPartial<I_1 extends {
|
|
52
|
+
ismpin?: boolean | undefined;
|
|
53
|
+
customerid?: number | undefined;
|
|
54
|
+
token?: string | undefined;
|
|
55
|
+
} & {
|
|
56
|
+
ismpin?: boolean | undefined;
|
|
57
|
+
customerid?: number | undefined;
|
|
58
|
+
token?: string | undefined;
|
|
59
|
+
} & { [K_1 in Exclude<keyof I_1, keyof response>]: never; }>(object: I_1): response;
|
|
60
|
+
};
|
|
61
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
62
|
+
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 {} ? {
|
|
63
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
64
|
+
} : Partial<T>;
|
|
65
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
66
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
67
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
68
|
+
} & {
|
|
69
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
70
|
+
};
|
|
71
|
+
export {};
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v1.178.0
|
|
5
|
+
// protoc v3.20.3
|
|
6
|
+
// source: customer/verifyotp.proto
|
|
7
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
+
};
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
exports.response = exports.request = exports.protobufPackage = void 0;
|
|
12
|
+
/* eslint-disable */
|
|
13
|
+
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
14
|
+
exports.protobufPackage = "customer.verifyotp";
|
|
15
|
+
function createBaserequest() {
|
|
16
|
+
return { mobile: "", otp: "", tnc: false };
|
|
17
|
+
}
|
|
18
|
+
exports.request = {
|
|
19
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
20
|
+
if (message.mobile !== "") {
|
|
21
|
+
writer.uint32(10).string(message.mobile);
|
|
22
|
+
}
|
|
23
|
+
if (message.otp !== "") {
|
|
24
|
+
writer.uint32(18).string(message.otp);
|
|
25
|
+
}
|
|
26
|
+
if (message.tnc !== false) {
|
|
27
|
+
writer.uint32(24).bool(message.tnc);
|
|
28
|
+
}
|
|
29
|
+
return writer;
|
|
30
|
+
},
|
|
31
|
+
decode(input, length) {
|
|
32
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
33
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
34
|
+
const message = createBaserequest();
|
|
35
|
+
while (reader.pos < end) {
|
|
36
|
+
const tag = reader.uint32();
|
|
37
|
+
switch (tag >>> 3) {
|
|
38
|
+
case 1:
|
|
39
|
+
if (tag !== 10) {
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
message.mobile = reader.string();
|
|
43
|
+
continue;
|
|
44
|
+
case 2:
|
|
45
|
+
if (tag !== 18) {
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
message.otp = reader.string();
|
|
49
|
+
continue;
|
|
50
|
+
case 3:
|
|
51
|
+
if (tag !== 24) {
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
message.tnc = reader.bool();
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
reader.skipType(tag & 7);
|
|
61
|
+
}
|
|
62
|
+
return message;
|
|
63
|
+
},
|
|
64
|
+
fromJSON(object) {
|
|
65
|
+
return {
|
|
66
|
+
mobile: isSet(object.mobile) ? globalThis.String(object.mobile) : "",
|
|
67
|
+
otp: isSet(object.otp) ? globalThis.String(object.otp) : "",
|
|
68
|
+
tnc: isSet(object.tnc) ? globalThis.Boolean(object.tnc) : false,
|
|
69
|
+
};
|
|
70
|
+
},
|
|
71
|
+
toJSON(message) {
|
|
72
|
+
const obj = {};
|
|
73
|
+
if (message.mobile !== "") {
|
|
74
|
+
obj.mobile = message.mobile;
|
|
75
|
+
}
|
|
76
|
+
if (message.otp !== "") {
|
|
77
|
+
obj.otp = message.otp;
|
|
78
|
+
}
|
|
79
|
+
if (message.tnc !== false) {
|
|
80
|
+
obj.tnc = message.tnc;
|
|
81
|
+
}
|
|
82
|
+
return obj;
|
|
83
|
+
},
|
|
84
|
+
create(base) {
|
|
85
|
+
return exports.request.fromPartial(base ?? {});
|
|
86
|
+
},
|
|
87
|
+
fromPartial(object) {
|
|
88
|
+
const message = createBaserequest();
|
|
89
|
+
message.mobile = object.mobile ?? "";
|
|
90
|
+
message.otp = object.otp ?? "";
|
|
91
|
+
message.tnc = object.tnc ?? false;
|
|
92
|
+
return message;
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
function createBaseresponse() {
|
|
96
|
+
return { ismpin: false, customerid: 0, token: "" };
|
|
97
|
+
}
|
|
98
|
+
exports.response = {
|
|
99
|
+
encode(message, writer = minimal_1.default.Writer.create()) {
|
|
100
|
+
if (message.ismpin !== false) {
|
|
101
|
+
writer.uint32(8).bool(message.ismpin);
|
|
102
|
+
}
|
|
103
|
+
if (message.customerid !== 0) {
|
|
104
|
+
writer.uint32(16).int32(message.customerid);
|
|
105
|
+
}
|
|
106
|
+
if (message.token !== "") {
|
|
107
|
+
writer.uint32(26).string(message.token);
|
|
108
|
+
}
|
|
109
|
+
return writer;
|
|
110
|
+
},
|
|
111
|
+
decode(input, length) {
|
|
112
|
+
const reader = input instanceof minimal_1.default.Reader ? input : minimal_1.default.Reader.create(input);
|
|
113
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
114
|
+
const message = createBaseresponse();
|
|
115
|
+
while (reader.pos < end) {
|
|
116
|
+
const tag = reader.uint32();
|
|
117
|
+
switch (tag >>> 3) {
|
|
118
|
+
case 1:
|
|
119
|
+
if (tag !== 8) {
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
message.ismpin = reader.bool();
|
|
123
|
+
continue;
|
|
124
|
+
case 2:
|
|
125
|
+
if (tag !== 16) {
|
|
126
|
+
break;
|
|
127
|
+
}
|
|
128
|
+
message.customerid = reader.int32();
|
|
129
|
+
continue;
|
|
130
|
+
case 3:
|
|
131
|
+
if (tag !== 26) {
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
message.token = reader.string();
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
reader.skipType(tag & 7);
|
|
141
|
+
}
|
|
142
|
+
return message;
|
|
143
|
+
},
|
|
144
|
+
fromJSON(object) {
|
|
145
|
+
return {
|
|
146
|
+
ismpin: isSet(object.ismpin) ? globalThis.Boolean(object.ismpin) : false,
|
|
147
|
+
customerid: isSet(object.customerid) ? globalThis.Number(object.customerid) : 0,
|
|
148
|
+
token: isSet(object.token) ? globalThis.String(object.token) : "",
|
|
149
|
+
};
|
|
150
|
+
},
|
|
151
|
+
toJSON(message) {
|
|
152
|
+
const obj = {};
|
|
153
|
+
if (message.ismpin !== false) {
|
|
154
|
+
obj.ismpin = message.ismpin;
|
|
155
|
+
}
|
|
156
|
+
if (message.customerid !== 0) {
|
|
157
|
+
obj.customerid = Math.round(message.customerid);
|
|
158
|
+
}
|
|
159
|
+
if (message.token !== "") {
|
|
160
|
+
obj.token = message.token;
|
|
161
|
+
}
|
|
162
|
+
return obj;
|
|
163
|
+
},
|
|
164
|
+
create(base) {
|
|
165
|
+
return exports.response.fromPartial(base ?? {});
|
|
166
|
+
},
|
|
167
|
+
fromPartial(object) {
|
|
168
|
+
const message = createBaseresponse();
|
|
169
|
+
message.ismpin = object.ismpin ?? false;
|
|
170
|
+
message.customerid = object.customerid ?? 0;
|
|
171
|
+
message.token = object.token ?? "";
|
|
172
|
+
return message;
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
function isSet(value) {
|
|
176
|
+
return value !== null && value !== undefined;
|
|
177
|
+
}
|
package/ts/customer.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { type CallOptions, ChannelCredentials, Client, type ClientOptions, type ClientUnaryCall, type handleUnaryCall, Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
3
|
+
import { request, response } from "./customer/sendotp";
|
|
4
|
+
import { request as request1, response as response2 } from "./customer/verifyotp";
|
|
5
|
+
export declare const protobufPackage = "customer";
|
|
6
|
+
export type CustomerServiceService = typeof CustomerServiceService;
|
|
7
|
+
export declare const CustomerServiceService: {
|
|
8
|
+
readonly sendOtp: {
|
|
9
|
+
readonly path: "/customer.CustomerService/sendOtp";
|
|
10
|
+
readonly requestStream: false;
|
|
11
|
+
readonly responseStream: false;
|
|
12
|
+
readonly requestSerialize: (value: request) => Buffer;
|
|
13
|
+
readonly requestDeserialize: (value: Buffer) => request;
|
|
14
|
+
readonly responseSerialize: (value: response) => Buffer;
|
|
15
|
+
readonly responseDeserialize: (value: Buffer) => response;
|
|
16
|
+
};
|
|
17
|
+
readonly verifyOtp: {
|
|
18
|
+
readonly path: "/customer.CustomerService/verifyOtp";
|
|
19
|
+
readonly requestStream: false;
|
|
20
|
+
readonly responseStream: false;
|
|
21
|
+
readonly requestSerialize: (value: request1) => Buffer;
|
|
22
|
+
readonly requestDeserialize: (value: Buffer) => request1;
|
|
23
|
+
readonly responseSerialize: (value: response2) => Buffer;
|
|
24
|
+
readonly responseDeserialize: (value: Buffer) => response2;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export interface CustomerServiceServer extends UntypedServiceImplementation {
|
|
28
|
+
sendOtp: handleUnaryCall<request, response>;
|
|
29
|
+
verifyOtp: handleUnaryCall<request1, response2>;
|
|
30
|
+
}
|
|
31
|
+
export interface CustomerServiceClient extends Client {
|
|
32
|
+
sendOtp(request: request, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
|
|
33
|
+
sendOtp(request: request, metadata: Metadata, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
|
|
34
|
+
sendOtp(request: request, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
|
|
35
|
+
verifyOtp(request: request1, callback: (error: ServiceError | null, response: response2) => void): ClientUnaryCall;
|
|
36
|
+
verifyOtp(request: request1, metadata: Metadata, callback: (error: ServiceError | null, response: response2) => void): ClientUnaryCall;
|
|
37
|
+
verifyOtp(request: request1, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response2) => void): ClientUnaryCall;
|
|
38
|
+
}
|
|
39
|
+
export declare const CustomerServiceClient: {
|
|
40
|
+
new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): CustomerServiceClient;
|
|
41
|
+
service: typeof CustomerServiceService;
|
|
42
|
+
serviceName: string;
|
|
43
|
+
};
|
package/ts/customer.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
+
// versions:
|
|
4
|
+
// protoc-gen-ts_proto v1.178.0
|
|
5
|
+
// protoc v3.20.3
|
|
6
|
+
// source: customer.proto
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.CustomerServiceClient = exports.CustomerServiceService = exports.protobufPackage = void 0;
|
|
9
|
+
/* eslint-disable */
|
|
10
|
+
const grpc_js_1 = require("@grpc/grpc-js");
|
|
11
|
+
const sendotp_1 = require("./customer/sendotp");
|
|
12
|
+
const verifyotp_1 = require("./customer/verifyotp");
|
|
13
|
+
exports.protobufPackage = "customer";
|
|
14
|
+
exports.CustomerServiceService = {
|
|
15
|
+
sendOtp: {
|
|
16
|
+
path: "/customer.CustomerService/sendOtp",
|
|
17
|
+
requestStream: false,
|
|
18
|
+
responseStream: false,
|
|
19
|
+
requestSerialize: (value) => Buffer.from(sendotp_1.request.encode(value).finish()),
|
|
20
|
+
requestDeserialize: (value) => sendotp_1.request.decode(value),
|
|
21
|
+
responseSerialize: (value) => Buffer.from(sendotp_1.response.encode(value).finish()),
|
|
22
|
+
responseDeserialize: (value) => sendotp_1.response.decode(value),
|
|
23
|
+
},
|
|
24
|
+
verifyOtp: {
|
|
25
|
+
path: "/customer.CustomerService/verifyOtp",
|
|
26
|
+
requestStream: false,
|
|
27
|
+
responseStream: false,
|
|
28
|
+
requestSerialize: (value) => Buffer.from(verifyotp_1.request.encode(value).finish()),
|
|
29
|
+
requestDeserialize: (value) => verifyotp_1.request.decode(value),
|
|
30
|
+
responseSerialize: (value) => Buffer.from(verifyotp_1.response.encode(value).finish()),
|
|
31
|
+
responseDeserialize: (value) => verifyotp_1.response.decode(value),
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
exports.CustomerServiceClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.CustomerServiceService, "customer.CustomerService");
|
package/proto/gameEngine.proto
DELETED
package/ts/gameEngine.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { type CallOptions, ChannelCredentials, Client, type ClientOptions, type ClientUnaryCall, type handleUnaryCall, Metadata, type ServiceError, type UntypedServiceImplementation } from "@grpc/grpc-js";
|
|
3
|
-
import { request, response } from "./gameengine/getcustomer";
|
|
4
|
-
export declare const protobufPackage = "gameengine";
|
|
5
|
-
export type GameEngineService = typeof GameEngineService;
|
|
6
|
-
export declare const GameEngineService: {
|
|
7
|
-
readonly getCustmoer: {
|
|
8
|
-
readonly path: "/gameengine.GameEngine/getCustmoer";
|
|
9
|
-
readonly requestStream: false;
|
|
10
|
-
readonly responseStream: false;
|
|
11
|
-
readonly requestSerialize: (value: request) => Buffer;
|
|
12
|
-
readonly requestDeserialize: (value: Buffer) => request;
|
|
13
|
-
readonly responseSerialize: (value: response) => Buffer;
|
|
14
|
-
readonly responseDeserialize: (value: Buffer) => response;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export interface GameEngineServer extends UntypedServiceImplementation {
|
|
18
|
-
getCustmoer: handleUnaryCall<request, response>;
|
|
19
|
-
}
|
|
20
|
-
export interface GameEngineClient extends Client {
|
|
21
|
-
getCustmoer(request: request, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
|
|
22
|
-
getCustmoer(request: request, metadata: Metadata, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
|
|
23
|
-
getCustmoer(request: request, metadata: Metadata, options: Partial<CallOptions>, callback: (error: ServiceError | null, response: response) => void): ClientUnaryCall;
|
|
24
|
-
}
|
|
25
|
-
export declare const GameEngineClient: {
|
|
26
|
-
new (address: string, credentials: ChannelCredentials, options?: Partial<ClientOptions>): GameEngineClient;
|
|
27
|
-
service: typeof GameEngineService;
|
|
28
|
-
serviceName: string;
|
|
29
|
-
};
|
package/ts/gameEngine.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
|
-
// versions:
|
|
4
|
-
// protoc-gen-ts_proto v1.178.0
|
|
5
|
-
// protoc v3.20.3
|
|
6
|
-
// source: gameEngine.proto
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.GameEngineClient = exports.GameEngineService = exports.protobufPackage = void 0;
|
|
9
|
-
/* eslint-disable */
|
|
10
|
-
const grpc_js_1 = require("@grpc/grpc-js");
|
|
11
|
-
const getcustomer_1 = require("./gameengine/getcustomer");
|
|
12
|
-
exports.protobufPackage = "gameengine";
|
|
13
|
-
exports.GameEngineService = {
|
|
14
|
-
getCustmoer: {
|
|
15
|
-
path: "/gameengine.GameEngine/getCustmoer",
|
|
16
|
-
requestStream: false,
|
|
17
|
-
responseStream: false,
|
|
18
|
-
requestSerialize: (value) => Buffer.from(getcustomer_1.request.encode(value).finish()),
|
|
19
|
-
requestDeserialize: (value) => getcustomer_1.request.decode(value),
|
|
20
|
-
responseSerialize: (value) => Buffer.from(getcustomer_1.response.encode(value).finish()),
|
|
21
|
-
responseDeserialize: (value) => getcustomer_1.response.decode(value),
|
|
22
|
-
},
|
|
23
|
-
};
|
|
24
|
-
exports.GameEngineClient = (0, grpc_js_1.makeGenericClientConstructor)(exports.GameEngineService, "gameengine.GameEngine");
|