add: add ldap protobuf
Some checks failed
Publish / Publish Job (push) Failing after 1m10s

This commit is contained in:
Дмитрий
2026-03-30 15:54:12 +03:00
parent d81e20c41a
commit 3ef32ab618
4 changed files with 32 additions and 5 deletions

View File

@@ -31,8 +31,8 @@ jobs:
- name: Build
run: npm run build
- name: Generate TS Protobuf
run: npm run generate
- name: Generate Protobuf
run: protoc -I ./proto ./proto/*.proto \ --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit \ --go_out=./gen --go_opt=paths=source_relative \ --go-grpc_out=./gen --go-grpc_opt=paths=source_relative
- name: Publish package
run: npm publish

View File

@@ -1,13 +1,12 @@
{
"name": "@lendry-erp/contracts",
"version": "1.0.8",
"version": "1.0.9",
"description": "Protobuf definitions and generated TypeScript types",
"type": "commonjs",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsc -p tsconfig.build.json",
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
"build": "tsc -p tsconfig.build.json"
},
"files": [
"dist",

27
proto/ldap.proto Normal file
View File

@@ -0,0 +1,27 @@
syntax = "proto3";
package ldap_service;
import "google/rpc/status.proto";
service LdapAuth {
rpc VerifyUser (VerifyRequest) returns (VerifyResponse);
}
message VerifyRequest {
string username = 1;
string password = 2;
}
message VerifyResponse {
bool success = 1;
string error_message = 2;
UserData user = 3;
}
message UserData {
string dn = 1;
string display_name = 2;
repeated string groups = 3;
bool is_active = 4;
}

View File

@@ -2,4 +2,5 @@ import { join } from "path";
export const PROTO_PATHS = {
AUTH: join(__dirname, "../../proto/identity.proto"),
LDAP: join(__dirname, "../../proto/ldap.proto"),
} as const;