@kcinema/contracts 1.0.6 → 1.0.8

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.
@@ -0,0 +1,29 @@
1
+ import { Observable } from "rxjs";
2
+ export declare const protobufPackage = "account.v1";
3
+ export declare enum Role {
4
+ USER = 0,
5
+ ADMIN = 1,
6
+ UNRECOGNIZED = -1
7
+ }
8
+ export interface GetAccountRequest {
9
+ id: string;
10
+ }
11
+ export interface GetAccountResponse {
12
+ id: string;
13
+ phone: string;
14
+ email: string;
15
+ isPhoneVerified: boolean;
16
+ isEmailVerified: boolean;
17
+ role: Role;
18
+ createdAt: string;
19
+ updatedAt: string;
20
+ }
21
+ export declare const ACCOUNT_V1_PACKAGE_NAME = "account.v1";
22
+ export interface AccountServiceClient {
23
+ getAccount(request: GetAccountRequest): Observable<GetAccountResponse>;
24
+ }
25
+ export interface AccountServiceController {
26
+ getAccount(request: GetAccountRequest): Promise<GetAccountResponse> | Observable<GetAccountResponse> | GetAccountResponse;
27
+ }
28
+ export declare function AccountServiceControllerMethods(): (constructor: Function) => void;
29
+ export declare const ACCOUNT_SERVICE_NAME = "AccountService";
@@ -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 v2.10.1
5
+ // protoc v3.21.12
6
+ // source: account.proto
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ACCOUNT_SERVICE_NAME = exports.ACCOUNT_V1_PACKAGE_NAME = exports.Role = exports.protobufPackage = void 0;
9
+ exports.AccountServiceControllerMethods = AccountServiceControllerMethods;
10
+ /* eslint-disable */
11
+ const microservices_1 = require("@nestjs/microservices");
12
+ exports.protobufPackage = "account.v1";
13
+ var Role;
14
+ (function (Role) {
15
+ Role[Role["USER"] = 0] = "USER";
16
+ Role[Role["ADMIN"] = 1] = "ADMIN";
17
+ Role[Role["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
18
+ })(Role || (exports.Role = Role = {}));
19
+ exports.ACCOUNT_V1_PACKAGE_NAME = "account.v1";
20
+ function AccountServiceControllerMethods() {
21
+ return function (constructor) {
22
+ const grpcMethods = ["getAccount"];
23
+ for (const method of grpcMethods) {
24
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
25
+ (0, microservices_1.GrpcMethod)("AccountService", method)(constructor.prototype[method], method, descriptor);
26
+ }
27
+ const grpcStreamMethods = [];
28
+ for (const method of grpcStreamMethods) {
29
+ const descriptor = Reflect.getOwnPropertyDescriptor(constructor.prototype, method);
30
+ (0, microservices_1.GrpcStreamMethod)("AccountService", method)(constructor.prototype[method], method, descriptor);
31
+ }
32
+ };
33
+ }
34
+ exports.ACCOUNT_SERVICE_NAME = "AccountService";
@@ -0,0 +1,38 @@
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 interface RefreshRequest {
20
+ refreshToken: string;
21
+ }
22
+ export interface RefreshResponse {
23
+ accessToken: string;
24
+ refreshToken: string;
25
+ }
26
+ export declare const AUTH_V1_PACKAGE_NAME = "auth.v1";
27
+ export interface AuthServiceClient {
28
+ sendOtp(request: SendOtpRequest): Observable<SendOtpResponse>;
29
+ verifyOtp(request: VerifyOtpRequest): Observable<VerifyOtpResponse>;
30
+ refresh(request: RefreshRequest): Observable<RefreshResponse>;
31
+ }
32
+ export interface AuthServiceController {
33
+ sendOtp(request: SendOtpRequest): Promise<SendOtpResponse> | Observable<SendOtpResponse> | SendOtpResponse;
34
+ verifyOtp(request: VerifyOtpRequest): Promise<VerifyOtpResponse> | Observable<VerifyOtpResponse> | VerifyOtpResponse;
35
+ refresh(request: RefreshRequest): Promise<RefreshResponse> | Observable<RefreshResponse> | RefreshResponse;
36
+ }
37
+ export declare function AuthServiceControllerMethods(): (constructor: Function) => void;
38
+ export declare const AUTH_SERVICE_NAME = "AuthService";
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ // Code generated by protoc-gen-ts_proto. DO NOT EDIT.
3
+ // versions:
4
+ // protoc-gen-ts_proto v2.10.1
5
+ // protoc v3.21.12
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", "refresh"];
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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kcinema/contracts",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Protobuf definitions and generated TypeScript types",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes