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

203 lines 6.56 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 legal_settings_exports = {}; __export(legal_settings_exports, { LegalAndSupportSettings: () => LegalAndSupportSettings, protobufPackage: () => protobufPackage }); module.exports = __toCommonJS(legal_settings_exports); var import_wire = require("@bufbuild/protobuf/wire"); var import_settings = require("./settings.js"); const protobufPackage = "zitadel.settings.v2"; function createBaseLegalAndSupportSettings() { return { tosLink: "", privacyPolicyLink: "", helpLink: "", supportEmail: "", resourceOwnerType: 0, docsLink: "", customLink: "", customLinkText: "" }; } const LegalAndSupportSettings = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.tosLink !== "") { writer.uint32(10).string(message.tosLink); } if (message.privacyPolicyLink !== "") { writer.uint32(18).string(message.privacyPolicyLink); } if (message.helpLink !== "") { writer.uint32(26).string(message.helpLink); } if (message.supportEmail !== "") { writer.uint32(34).string(message.supportEmail); } if (message.resourceOwnerType !== 0) { writer.uint32(40).int32(message.resourceOwnerType); } if (message.docsLink !== "") { writer.uint32(50).string(message.docsLink); } if (message.customLink !== "") { writer.uint32(58).string(message.customLink); } if (message.customLinkText !== "") { writer.uint32(66).string(message.customLinkText); } 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 = createBaseLegalAndSupportSettings(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.tosLink = reader.string(); continue; } case 2: { if (tag !== 18) { break; } message.privacyPolicyLink = reader.string(); continue; } case 3: { if (tag !== 26) { break; } message.helpLink = reader.string(); continue; } case 4: { if (tag !== 34) { break; } message.supportEmail = reader.string(); continue; } case 5: { if (tag !== 40) { break; } message.resourceOwnerType = reader.int32(); continue; } case 6: { if (tag !== 50) { break; } message.docsLink = reader.string(); continue; } case 7: { if (tag !== 58) { break; } message.customLink = reader.string(); continue; } case 8: { if (tag !== 66) { break; } message.customLinkText = reader.string(); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(object) { return { tosLink: isSet(object.tosLink) ? globalThis.String(object.tosLink) : "", privacyPolicyLink: isSet(object.privacyPolicyLink) ? globalThis.String(object.privacyPolicyLink) : "", helpLink: isSet(object.helpLink) ? globalThis.String(object.helpLink) : "", supportEmail: isSet(object.supportEmail) ? globalThis.String(object.supportEmail) : "", resourceOwnerType: isSet(object.resourceOwnerType) ? (0, import_settings.resourceOwnerTypeFromJSON)(object.resourceOwnerType) : 0, docsLink: isSet(object.docsLink) ? globalThis.String(object.docsLink) : "", customLink: isSet(object.customLink) ? globalThis.String(object.customLink) : "", customLinkText: isSet(object.customLinkText) ? globalThis.String(object.customLinkText) : "" }; }, toJSON(message) { const obj = {}; if (message.tosLink !== "") { obj.tosLink = message.tosLink; } if (message.privacyPolicyLink !== "") { obj.privacyPolicyLink = message.privacyPolicyLink; } if (message.helpLink !== "") { obj.helpLink = message.helpLink; } if (message.supportEmail !== "") { obj.supportEmail = message.supportEmail; } if (message.resourceOwnerType !== 0) { obj.resourceOwnerType = (0, import_settings.resourceOwnerTypeToJSON)(message.resourceOwnerType); } if (message.docsLink !== "") { obj.docsLink = message.docsLink; } if (message.customLink !== "") { obj.customLink = message.customLink; } if (message.customLinkText !== "") { obj.customLinkText = message.customLinkText; } return obj; }, create(base) { return LegalAndSupportSettings.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseLegalAndSupportSettings(); message.tosLink = object.tosLink ?? ""; message.privacyPolicyLink = object.privacyPolicyLink ?? ""; message.helpLink = object.helpLink ?? ""; message.supportEmail = object.supportEmail ?? ""; message.resourceOwnerType = object.resourceOwnerType ?? 0; message.docsLink = object.docsLink ?? ""; message.customLink = object.customLink ?? ""; message.customLinkText = object.customLinkText ?? ""; return message; } }; function isSet(value) { return value !== null && value !== void 0; } // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { LegalAndSupportSettings, protobufPackage }); //# sourceMappingURL=legal_settings.js.map