UNPKG

@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()!

139 lines 5.19 kB
"use strict"; 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 domain_settings_exports = {}; __export(domain_settings_exports, { DomainSettings: () => DomainSettings, protobufPackage: () => protobufPackage }); module.exports = __toCommonJS(domain_settings_exports); var import_wire = require("@bufbuild/protobuf/wire"); var import_settings = require("./settings.js"); const protobufPackage = "zitadel.settings.v2"; function createBaseDomainSettings() { return { loginNameIncludesDomain: false, requireOrgDomainVerification: false, smtpSenderAddressMatchesInstanceDomain: false, resourceOwnerType: 0 }; } const DomainSettings = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.loginNameIncludesDomain !== false) { writer.uint32(8).bool(message.loginNameIncludesDomain); } if (message.requireOrgDomainVerification !== false) { writer.uint32(16).bool(message.requireOrgDomainVerification); } if (message.smtpSenderAddressMatchesInstanceDomain !== false) { writer.uint32(24).bool(message.smtpSenderAddressMatchesInstanceDomain); } if (message.resourceOwnerType !== 0) { writer.uint32(48).int32(message.resourceOwnerType); } 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 = createBaseDomainSettings(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 8) { break; } message.loginNameIncludesDomain = reader.bool(); continue; } case 2: { if (tag !== 16) { break; } message.requireOrgDomainVerification = reader.bool(); continue; } case 3: { if (tag !== 24) { break; } message.smtpSenderAddressMatchesInstanceDomain = reader.bool(); continue; } case 6: { if (tag !== 48) { break; } message.resourceOwnerType = reader.int32(); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(object) { return { loginNameIncludesDomain: isSet(object.loginNameIncludesDomain) ? globalThis.Boolean(object.loginNameIncludesDomain) : false, requireOrgDomainVerification: isSet(object.requireOrgDomainVerification) ? globalThis.Boolean(object.requireOrgDomainVerification) : false, smtpSenderAddressMatchesInstanceDomain: isSet(object.smtpSenderAddressMatchesInstanceDomain) ? globalThis.Boolean(object.smtpSenderAddressMatchesInstanceDomain) : false, resourceOwnerType: isSet(object.resourceOwnerType) ? (0, import_settings.resourceOwnerTypeFromJSON)(object.resourceOwnerType) : 0 }; }, toJSON(message) { const obj = {}; if (message.loginNameIncludesDomain !== false) { obj.loginNameIncludesDomain = message.loginNameIncludesDomain; } if (message.requireOrgDomainVerification !== false) { obj.requireOrgDomainVerification = message.requireOrgDomainVerification; } if (message.smtpSenderAddressMatchesInstanceDomain !== false) { obj.smtpSenderAddressMatchesInstanceDomain = message.smtpSenderAddressMatchesInstanceDomain; } if (message.resourceOwnerType !== 0) { obj.resourceOwnerType = (0, import_settings.resourceOwnerTypeToJSON)(message.resourceOwnerType); } return obj; }, create(base) { return DomainSettings.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseDomainSettings(); message.loginNameIncludesDomain = object.loginNameIncludesDomain ?? false; message.requireOrgDomainVerification = object.requireOrgDomainVerification ?? false; message.smtpSenderAddressMatchesInstanceDomain = object.smtpSenderAddressMatchesInstanceDomain ?? false; message.resourceOwnerType = object.resourceOwnerType ?? 0; return message; } }; function isSet(value) { return value !== null && value !== void 0; } // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { DomainSettings, protobufPackage }); //# sourceMappingURL=domain_settings.js.map