@aneoconsultingfr/armonik.api
Version:
gRPC API to interact with ArmoniK built for the web
28 lines (25 loc) • 883 B
JavaScript
import {
GetCurrentUserRequest,
GetCurrentUserResponse
} from "./chunk-GNFF22R7.mjs";
// src/generated/auth_service.ts
import _m0 from "protobufjs/minimal.js";
var protobufPackage = "armonik.api.grpc.v1.auth";
var AuthenticationServiceName = "armonik.api.grpc.v1.auth.Authentication";
var AuthenticationClientImpl = class {
constructor(rpc, opts) {
this.service = (opts == null ? void 0 : opts.service) || AuthenticationServiceName;
this.rpc = rpc;
this.GetCurrentUser = this.GetCurrentUser.bind(this);
}
GetCurrentUser(request) {
const data = GetCurrentUserRequest.encode(request).finish();
const promise = this.rpc.request(this.service, "GetCurrentUser", data);
return promise.then((data2) => GetCurrentUserResponse.decode(_m0.Reader.create(data2)));
}
};
export {
protobufPackage,
AuthenticationServiceName,
AuthenticationClientImpl
};