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

312 lines 10.2 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 event_exports = {}; __export(event_exports, { AddedEvent: () => AddedEvent, ChangedEvent: () => ChangedEvent, Event: () => Event, RemovedEvent: () => RemovedEvent, protobufPackage: () => protobufPackage }); module.exports = __toCommonJS(event_exports); var import_wire = require("@bufbuild/protobuf/wire"); var import_duration = require("../../../../google/protobuf/duration.js"); const protobufPackage = "zitadel.resources.debug_events.v3alpha"; function createBaseEvent() { return { add: void 0, change: void 0, remove: void 0 }; } const Event = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.add !== void 0) { AddedEvent.encode(message.add, writer.uint32(10).fork()).join(); } if (message.change !== void 0) { ChangedEvent.encode(message.change, writer.uint32(18).fork()).join(); } if (message.remove !== void 0) { RemovedEvent.encode(message.remove, writer.uint32(26).fork()).join(); } 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 = createBaseEvent(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.add = AddedEvent.decode(reader, reader.uint32()); continue; } case 2: { if (tag !== 18) { break; } message.change = ChangedEvent.decode(reader, reader.uint32()); continue; } case 3: { if (tag !== 26) { break; } message.remove = RemovedEvent.decode(reader, reader.uint32()); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(object) { return { add: isSet(object.add) ? AddedEvent.fromJSON(object.add) : void 0, change: isSet(object.change) ? ChangedEvent.fromJSON(object.change) : void 0, remove: isSet(object.remove) ? RemovedEvent.fromJSON(object.remove) : void 0 }; }, toJSON(message) { const obj = {}; if (message.add !== void 0) { obj.add = AddedEvent.toJSON(message.add); } if (message.change !== void 0) { obj.change = ChangedEvent.toJSON(message.change); } if (message.remove !== void 0) { obj.remove = RemovedEvent.toJSON(message.remove); } return obj; }, create(base) { return Event.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseEvent(); message.add = object.add !== void 0 && object.add !== null ? AddedEvent.fromPartial(object.add) : void 0; message.change = object.change !== void 0 && object.change !== null ? ChangedEvent.fromPartial(object.change) : void 0; message.remove = object.remove !== void 0 && object.remove !== null ? RemovedEvent.fromPartial(object.remove) : void 0; return message; } }; function createBaseAddedEvent() { return { projectionSleep: void 0, blob: void 0 }; } const AddedEvent = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.projectionSleep !== void 0) { import_duration.Duration.encode(message.projectionSleep, writer.uint32(10).fork()).join(); } if (message.blob !== void 0) { writer.uint32(18).string(message.blob); } 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 = createBaseAddedEvent(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.projectionSleep = import_duration.Duration.decode(reader, reader.uint32()); continue; } case 2: { if (tag !== 18) { break; } message.blob = reader.string(); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(object) { return { projectionSleep: isSet(object.projectionSleep) ? import_duration.Duration.fromJSON(object.projectionSleep) : void 0, blob: isSet(object.blob) ? globalThis.String(object.blob) : void 0 }; }, toJSON(message) { const obj = {}; if (message.projectionSleep !== void 0) { obj.projectionSleep = import_duration.Duration.toJSON(message.projectionSleep); } if (message.blob !== void 0) { obj.blob = message.blob; } return obj; }, create(base) { return AddedEvent.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseAddedEvent(); message.projectionSleep = object.projectionSleep !== void 0 && object.projectionSleep !== null ? import_duration.Duration.fromPartial(object.projectionSleep) : void 0; message.blob = object.blob ?? void 0; return message; } }; function createBaseChangedEvent() { return { projectionSleep: void 0, blob: void 0 }; } const ChangedEvent = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.projectionSleep !== void 0) { import_duration.Duration.encode(message.projectionSleep, writer.uint32(10).fork()).join(); } if (message.blob !== void 0) { writer.uint32(18).string(message.blob); } 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 = createBaseChangedEvent(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.projectionSleep = import_duration.Duration.decode(reader, reader.uint32()); continue; } case 2: { if (tag !== 18) { break; } message.blob = reader.string(); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(object) { return { projectionSleep: isSet(object.projectionSleep) ? import_duration.Duration.fromJSON(object.projectionSleep) : void 0, blob: isSet(object.blob) ? globalThis.String(object.blob) : void 0 }; }, toJSON(message) { const obj = {}; if (message.projectionSleep !== void 0) { obj.projectionSleep = import_duration.Duration.toJSON(message.projectionSleep); } if (message.blob !== void 0) { obj.blob = message.blob; } return obj; }, create(base) { return ChangedEvent.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseChangedEvent(); message.projectionSleep = object.projectionSleep !== void 0 && object.projectionSleep !== null ? import_duration.Duration.fromPartial(object.projectionSleep) : void 0; message.blob = object.blob ?? void 0; return message; } }; function createBaseRemovedEvent() { return { projectionSleep: void 0 }; } const RemovedEvent = { encode(message, writer = new import_wire.BinaryWriter()) { if (message.projectionSleep !== void 0) { import_duration.Duration.encode(message.projectionSleep, writer.uint32(10).fork()).join(); } 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 = createBaseRemovedEvent(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (tag !== 10) { break; } message.projectionSleep = import_duration.Duration.decode(reader, reader.uint32()); continue; } } if ((tag & 7) === 4 || tag === 0) { break; } reader.skip(tag & 7); } return message; }, fromJSON(object) { return { projectionSleep: isSet(object.projectionSleep) ? import_duration.Duration.fromJSON(object.projectionSleep) : void 0 }; }, toJSON(message) { const obj = {}; if (message.projectionSleep !== void 0) { obj.projectionSleep = import_duration.Duration.toJSON(message.projectionSleep); } return obj; }, create(base) { return RemovedEvent.fromPartial(base ?? {}); }, fromPartial(object) { const message = createBaseRemovedEvent(); message.projectionSleep = object.projectionSleep !== void 0 && object.projectionSleep !== null ? import_duration.Duration.fromPartial(object.projectionSleep) : void 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 = { AddedEvent, ChangedEvent, Event, RemovedEvent, protobufPackage }); //# sourceMappingURL=event.js.map