@aneoconsultingfr/armonik.api
Version:
gRPC API to interact with ArmoniK built for the web
28 lines (19 loc) • 1.22 kB
JavaScript
;Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var _chunk5JKPXPO6js = require('./chunk-5JKPXPO6.js');
// src/generated/auth_service.ts
var _minimaljs = require('protobufjs/minimal.js'); var _minimaljs2 = _interopRequireDefault(_minimaljs);
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 = _chunk5JKPXPO6js.GetCurrentUserRequest.encode(request).finish();
const promise = this.rpc.request(this.service, "GetCurrentUser", data);
return promise.then((data2) => _chunk5JKPXPO6js.GetCurrentUserResponse.decode(_minimaljs2.default.Reader.create(data2)));
}
};
exports.protobufPackage = protobufPackage; exports.AuthenticationServiceName = AuthenticationServiceName; exports.AuthenticationClientImpl = AuthenticationClientImpl;