diff --git a/gen/rbax.ts b/gen/rbax.ts deleted file mode 100644 index 744863e..0000000 --- a/gen/rbax.ts +++ /dev/null @@ -1,76 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.11.6 -// protoc v3.21.12 -// source: rbax.proto - -/* eslint-disable */ -import type { Metadata } from "@grpc/grpc-js"; -import { GrpcMethod, GrpcStreamMethod } from "@nestjs/microservices"; -import { Observable } from "rxjs"; - -export const protobufPackage = "rbac.v1"; - -export interface GetAllPermissionsRequest { - userId: string; - sessionId: string; -} - -export interface GetAllPermissionsResponse { - id: string; - code: string; - description: string; - module: string; - roles: string[]; -} - -export interface GetAllRolesRequest { - userId: string; - sessionId: string; -} - -export interface GetAllRolesResponse { - id: string; - name: string; - level: number; - permissions: string[]; - ldapMapping: string[]; - accounts: string[]; -} - -export const RBAC_V1_PACKAGE_NAME = "rbac.v1"; - -export interface RbacServiceClient { - getAllPermissions(request: GetAllPermissionsRequest, metadata?: Metadata): Observable; - - getAllRoles(request: GetAllRolesRequest, metadata?: Metadata): Observable; -} - -export interface RbacServiceController { - getAllPermissions( - request: GetAllPermissionsRequest, - metadata?: Metadata, - ): Promise | Observable | GetAllPermissionsResponse; - - getAllRoles( - request: GetAllRolesRequest, - metadata?: Metadata, - ): Promise | Observable | GetAllRolesResponse; -} - -export function RbacServiceControllerMethods() { - return function (constructor: Function) { - const grpcMethods: string[] = ["getAllPermissions", "getAllRoles"]; - for (const method of grpcMethods) { - const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method); - GrpcMethod("RbacService", method)(constructor.prototype[method], method, descriptor); - } - const grpcStreamMethods: string[] = []; - for (const method of grpcStreamMethods) { - const descriptor: any = Reflect.getOwnPropertyDescriptor(constructor.prototype, method); - GrpcStreamMethod("RbacService", method)(constructor.prototype[method], method, descriptor); - } - }; -} - -export const RBAC_SERVICE_NAME = "RbacService"; diff --git a/package.json b/package.json index aaae1ab..a8eeef2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lendry-erp/contracts", - "version": "1.0.52", + "version": "1.0.53", "description": "Protobuf definitions and generated TypeScript types", "type": "commonjs", "main": "./dist/index.js",