@ragnaraven/zitadel-node-dual
Version:
Library for API access to ZITADEL with modern ES import syntax. Works everywhere - NestJS, Node.js, any TypeScript environment. No more require()!
103 lines • 3.23 kB
JavaScript
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var options_exports = {};
__export(options_exports, {
AuthOption: () => AuthOption,
protobufPackage: () => protobufPackage
});
module.exports = __toCommonJS(options_exports);
var import_wire = require("@bufbuild/protobuf/wire");
const protobufPackage = "zitadel.v1";
function createBaseAuthOption() {
return { permission: "", checkFieldName: "" };
}
const AuthOption = {
encode(message, writer = new import_wire.BinaryWriter()) {
if (message.permission !== "") {
writer.uint32(10).string(message.permission);
}
if (message.checkFieldName !== "") {
writer.uint32(18).string(message.checkFieldName);
}
return writer;
},
decode(input, length) {
const reader = input instanceof import_wire.BinaryReader ? input : new import_wire.BinaryReader(input);
const end = length === void 0 ? reader.len : reader.pos + length;
const message = createBaseAuthOption();
while (reader.pos < end) {
const tag = reader.uint32();
switch (tag >>> 3) {
case 1: {
if (tag !== 10) {
break;
}
message.permission = reader.string();
continue;
}
case 2: {
if (tag !== 18) {
break;
}
message.checkFieldName = reader.string();
continue;
}
}
if ((tag & 7) === 4 || tag === 0) {
break;
}
reader.skip(tag & 7);
}
return message;
},
fromJSON(object) {
return {
permission: isSet(object.permission) ? globalThis.String(object.permission) : "",
checkFieldName: isSet(object.checkFieldName) ? globalThis.String(object.checkFieldName) : ""
};
},
toJSON(message) {
const obj = {};
if (message.permission !== "") {
obj.permission = message.permission;
}
if (message.checkFieldName !== "") {
obj.checkFieldName = message.checkFieldName;
}
return obj;
},
create(base) {
return AuthOption.fromPartial(base ?? {});
},
fromPartial(object) {
const message = createBaseAuthOption();
message.permission = object.permission ?? "";
message.checkFieldName = object.checkFieldName ?? "";
return message;
}
};
function isSet(value) {
return value !== null && value !== void 0;
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
AuthOption,
protobufPackage
});
//# sourceMappingURL=options.js.map