@hank.chat/types
Version:
60 lines (58 loc) • 1.97 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);
// src/channel/channel_kind.ts
var channel_kind_exports = {};
__export(channel_kind_exports, {
ChannelKind: () => ChannelKind,
channelKindFromJSON: () => channelKindFromJSON,
channelKindToJSON: () => channelKindToJSON
});
module.exports = __toCommonJS(channel_kind_exports);
var ChannelKind = /* @__PURE__ */ ((ChannelKind2) => {
ChannelKind2[ChannelKind2["CHAT_ROOM"] = 0] = "CHAT_ROOM";
ChannelKind2[ChannelKind2["DIRECT_MESSAGE"] = 1] = "DIRECT_MESSAGE";
ChannelKind2[ChannelKind2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
return ChannelKind2;
})(ChannelKind || {});
function channelKindFromJSON(object) {
switch (object) {
case 0:
case "CHAT_ROOM":
return 0 /* CHAT_ROOM */;
case 1:
case "DIRECT_MESSAGE":
return 1 /* DIRECT_MESSAGE */;
case -1:
case "UNRECOGNIZED":
default:
return -1 /* UNRECOGNIZED */;
}
}
function channelKindToJSON(object) {
switch (object) {
case 0 /* CHAT_ROOM */:
return "CHAT_ROOM";
case 1 /* DIRECT_MESSAGE */:
return "DIRECT_MESSAGE";
case -1 /* UNRECOGNIZED */:
default:
return "UNRECOGNIZED";
}
}
//# sourceMappingURL=channel_kind.js.map