@nemma-training/contracts 1.0.3 → 1.0.5
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/gen/auth.ts +1 -33
- package/package.json +3 -3
package/gen/auth.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
2
|
// versions:
|
|
3
3
|
// protoc-gen-ts_proto v2.11.1
|
|
4
|
-
// protoc v3.
|
|
4
|
+
// protoc v3.12.4
|
|
5
5
|
// source: auth.proto
|
|
6
6
|
|
|
7
7
|
/* eslint-disable */
|
|
@@ -358,38 +358,6 @@ export const VerifyOtpResponse: MessageFns<VerifyOtpResponse> = {
|
|
|
358
358
|
},
|
|
359
359
|
};
|
|
360
360
|
|
|
361
|
-
export interface AuthService {
|
|
362
|
-
SendOtp(request: SendOtpRequest): Promise<SendOtpResponse>;
|
|
363
|
-
VerifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse>;
|
|
364
|
-
}
|
|
365
|
-
|
|
366
|
-
export const AuthServiceServiceName = "auth.v1.AuthService";
|
|
367
|
-
export class AuthServiceClientImpl implements AuthService {
|
|
368
|
-
private readonly rpc: Rpc;
|
|
369
|
-
private readonly service: string;
|
|
370
|
-
constructor(rpc: Rpc, opts?: { service?: string }) {
|
|
371
|
-
this.service = opts?.service || AuthServiceServiceName;
|
|
372
|
-
this.rpc = rpc;
|
|
373
|
-
this.SendOtp = this.SendOtp.bind(this);
|
|
374
|
-
this.VerifyOtp = this.VerifyOtp.bind(this);
|
|
375
|
-
}
|
|
376
|
-
SendOtp(request: SendOtpRequest): Promise<SendOtpResponse> {
|
|
377
|
-
const data = SendOtpRequest.encode(request).finish();
|
|
378
|
-
const promise = this.rpc.request(this.service, "SendOtp", data);
|
|
379
|
-
return promise.then((data) => SendOtpResponse.decode(new BinaryReader(data)));
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
VerifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse> {
|
|
383
|
-
const data = VerifyOtpRequest.encode(request).finish();
|
|
384
|
-
const promise = this.rpc.request(this.service, "VerifyOtp", data);
|
|
385
|
-
return promise.then((data) => VerifyOtpResponse.decode(new BinaryReader(data)));
|
|
386
|
-
}
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
interface Rpc {
|
|
390
|
-
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
391
|
-
}
|
|
392
|
-
|
|
393
361
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
394
362
|
|
|
395
363
|
export type DeepPartial<T> = T extends Builtin ? T
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nemma-training/contracts",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Protobuf contract definitions for Nemma microservices",
|
|
3
|
+
"version": "1.0.5",
|
|
4
|
+
"description": "Protobuf contract definitions for Nemma microservices ecosystem",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"generate": "mkdir -p gen && protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestjs=true,
|
|
8
|
+
"generate": "mkdir -p gen && protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestjs=true,outputServices=observables,addGrpcMetadata=true,addNestjsRestParameter=true",
|
|
9
9
|
"build": "tsc -p tsconfig.build.json"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|