@davecinema/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 ADDED
@@ -0,0 +1,62 @@
1
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
2
+ // versions:
3
+ // protoc-gen-ts_proto v2.11.8
4
+ // protoc v4.25.9
5
+ // source: auth.proto
6
+
7
+ /* eslint-disable */
8
+ import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices";
9
+ import { Observable } from "rxjs";
10
+
11
+ export const protobufPackage = "auth.v1";
12
+
13
+ export interface SendOtpRequest {
14
+ identifier: string;
15
+ type: string;
16
+ }
17
+
18
+ export interface SendOtpResponse {
19
+ ok: boolean;
20
+ }
21
+
22
+ export interface VerifyOtpRequest {
23
+ identifier: string;
24
+ type: string;
25
+ code: string;
26
+ }
27
+
28
+ export interface VerifyOtpResponse {
29
+ accessToken: string;
30
+ refreshToken: string;
31
+ }
32
+
33
+ export const AUTH_V1_PACKAGE_NAME = "auth.v1";
34
+
35
+ export interface AuthServiceClient {
36
+ sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
37
+
38
+ verifyOtp(request: VerifyOtpRequest): Observable<VerifyOtpResponse>;
39
+ }
40
+
41
+ export interface AuthServiceController {
42
+ sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
43
+
44
+ verifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse> | Observable<VerifyOtpResponse> | VerifyOtpResponse;
45
+ }
46
+
47
+ export function AuthServiceControllerMethods() {
48
+ return function (constructor: Function) {
49
+ const grpcMethods: string[] = ["sendOtp", "verifyOtp"];
50
+ for (const method of grpcMethods) {
51
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
52
+ GrpcMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
53
+ }
54
+ const grpcStreamMethods: string[] = [];
55
+ for (const method of grpcStreamMethods) {
56
+ const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
57
+ GrpcStreamMethod("AuthService", method)(constructor.prototype[method], method, descriptor);
58
+ }
59
+ };
60
+ }
61
+
62
+ export const AUTH_SERVICE_NAME = "AuthService";
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@davecinema/contracts",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Protobuf defenitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "scripts": {
8
8
  "build": "npx tsc -p tsconfig.build.json",
9
- "generate": "npx protoc -I ./proto ./proto/*.proto --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./src/gen --ts_proto_opt=nestJs=true,package=omit"
9
+ "generate": "npx protoc -I ./proto ./proto/*.proto --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
10
10
  },
11
11
  "files": [
12
12
  "proto",
@@ -1,29 +0,0 @@
1
- import { Observable } from "rxjs";
2
- export declare const protobufPackage = "auth.v1";
3
- export interface SendOtpRequest {
4
- identifier: string;
5
- type: string;
6
- }
7
- export interface SendOtpResponse {
8
- ok: boolean;
9
- }
10
- export interface VerifyOtpRequest {
11
- identifier: string;
12
- type: string;
13
- code: string;
14
- }
15
- export interface VerifyOtpResponse {
16
- accessToken: string;
17
- refreshToken: string;
18
- }
19
- export declare const AUTH_V1_PACKAGE_NAME = "auth.v1";
20
- export interface AuthServiceClient {
21
- sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
22
- verifyOtp(request: VerifyOtpRequest): Observable<VerifyOtpResponse>;
23
- }
24
- export interface AuthServiceController {
25
- sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
26
- verifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse> | Observable<VerifyOtpResponse> | VerifyOtpResponse;
27
- }
28
- export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
29
- export declare const AUTH_SERVICE_NAME = "AuthService";
package/dist/gen/auth.js DELETED
@@ -1,28 +0,0 @@
1
- "use strict";
2
- // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
- // versions:
4
- // protoc-gen-ts_proto v2.11.8
5
- // protoc v4.25.9
6
- // source: auth.proto
7
- Object.defineProperty(exports, "__esModule", { value: true });
8
- exports.AUTH_SERVICE_NAME = exports.AUTH_V1_PACKAGE_NAME = exports.protobufPackage = void 0;
9
- exports.AuthServiceControllerMethods = AuthServiceControllerMethods;
10
- /* eslint-disable */
11
- const microservices_1 = require("@nestjs/microservices");
12
- exports.protobufPackage = "auth.v1";
13
- exports.AUTH_V1_PACKAGE_NAME = "auth.v1";
14
- function AuthServiceControllerMethods() {
15
- return function (constructor) {
16
- const grpcMethods = ["sendOtp", "verifyOtp"];
17
- for (const method of grpcMethods) {
18
- const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
19
- (0, microservices_1.GrpcMethod)("AuthService", method)(constructor.prototype[method], method, descriptor);
20
- }
21
- const grpcStreamMethods = [];
22
- for (const method of grpcStreamMethods) {
23
- const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
24
- (0, microservices_1.GrpcStreamMethod)("AuthService", method)(constructor.prototype[method], method, descriptor);
25
- }
26
- };
27
- }
28
- exports.AUTH_SERVICE_NAME = "AuthService";