"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSrpcMessageHandlerClass = exports.__ΩTSrpcMessageHandlerFnOrClass = exports.__ΩTSrpcMessageHandlerClass = exports.__ΩISrpcMessageHandler = exports.__ΩSrpcMessageHandlerFn = exports.__ΩSrpcStream = exports.__ΩISrpcServerOptions = exports.SrpcError = exports.__ΩIQueuedRequest = exports.__ΩSrpcDisconnectCause = exports.__ΩSrpcMessageFns = exports.__ΩBaseMessage = exports.__ΩSrpcMeta = exports.__ΩHandlerRequestData = exports.__ΩResponseData = exports.__ΩRequestData = exports.__ΩInvokePrefixes = exports.__ΩResponsePrefix = exports.__ΩRequestPrefix = exports.__ΩResponseKeys = exports.__ΩRequestKeys = void 0;
const tslib_1 = require("tslib");
const __ΩNonNullable = ['T', 'NonNullable', 'b!Pe"!PMKw"y'];
const __ΩRecord = ['K', 'T', 'Record', 'l\'e#"Rb!b"Pde"!N#!w#y'];
function __assignType(fn, args) {
    fn.__type = args;
    return fn;
}
/*@ts-ignore*/
var { __ΩScopedLogger } = require('@deepkit/logger');
const ws_1 = tslib_1.__importDefault(require("ws"));
const __ΩRequestKeys = ['T', 'Request', 'RequestKeys', 'lCe$!R!RPde#!Ph"!."Sqk#\'QRPde#!p)Rb!Pde"!gN;!e!!gfw#y'];
exports.__ΩRequestKeys = __ΩRequestKeys;
const __ΩResponseKeys = ['T', 'Response', 'ResponseKeys', 'lCe$!R!RPde#!Ph"!."Sqk#\'QRPde#!p)Rb!Pde"!gN;!e!!gfw#y'];
exports.__ΩResponseKeys = __ΩResponseKeys;
const __ΩRequestPrefix = ['K', 'Request', 'RequestPrefix', 'l;e"!R!RPde#!Ph"!."Sqk#\'QRb!Pde"!p)w#y'];
exports.__ΩRequestPrefix = __ΩRequestPrefix;
const __ΩResponsePrefix = ['K', 'Response', 'ResponsePrefix', 'l;e"!R!RPde#!Ph"!."Sqk#\'QRb!Pde"!p)w#y'];
exports.__ΩResponsePrefix = __ΩResponsePrefix;
const __ΩInvokePrefixes = ['TReq', 'TRes', 'Request', 'Response', 'InvokePrefixes', 'lle$!R!RPPe$!.$Se,"gqk#\'QR!RPde#!Ph"!.#Sqk);QRPde%!p=R!RPe#!&qkOWQRPde#!pYRb!b"Pde"!gNd!e!!gfw%y'];
exports.__ΩInvokePrefixes = __ΩInvokePrefixes;
const __ΩRequestData = ['TReq', 'P', 'Request', () => __ΩNonNullable, 'RequestData', 'l4e#!Pe$".#Sfo$"R!Rb!b"PPe#".#Se"!gqk#2Qw%y'];
exports.__ΩRequestData = __ΩRequestData;
const __ΩResponseData = ['TRes', 'P', 'Response', () => __ΩNonNullable, 'ResponseData', 'l4e#!Pe$".#Sfo$"R!Rb!b"PPe#".#Se"!gqk#2Qw%y'];
exports.__ΩResponseData = __ΩResponseData;
const __ΩHandlerRequestData = ['TReq', 'P', 'Request', () => __ΩNonNullable, 'HandlerRequestData', 'l4e#!Pe$".#Sfo$"R!Rb!b"PPe#".#Se"!gqk#2Qw%y'];
exports.__ΩHandlerRequestData = __ΩHandlerRequestData;
const __ΩSrpcMeta = [() => __ΩRecord, 'SrpcMeta', '&"o!#w"y'];
exports.__ΩSrpcMeta = __ΩSrpcMeta;
const __ΩBaseMessage = ['requestId', 'reply', 'error', 'userError', 'traceId', 'spanId', 'traceFlags', 'trace', 'pingPong', 'streamId', 'chunk', 'write', 'finish', 'destroy', 'byteStreamOperation', 'BaseMessage', 'P&4!8)4"8&4#8)4$8P&4%&4&\'4\'M4(8PM4)8P\'4*PW4+M4,8PM4-8P&4#8M4.8M4/8Mw0y'];
exports.__ΩBaseMessage = __ΩBaseMessage;
const __ΩSrpcMessageFns = ['T', 'message', 'BinaryWriter', 'writer', 'encode', 'BinaryReader', 'input', 'length', 'decode', 'SrpcMessageFns', 'b!PPe#!2""w#2$8"w#1%PP"w&WJ2\'\'2(8e#!1)Mw*y'];
exports.__ΩSrpcMessageFns = __ΩSrpcMessageFns;
const __ΩSrpcDisconnectCause = ["disconnect", "duplicate", "timeout", "badArg", 'SrpcDisconnectCause', 'P.!.".#.$Jw%y'];
exports.__ΩSrpcDisconnectCause = __ΩSrpcDisconnectCause;
const __ΩIQueuedRequest = ['exp', 'value', '', 'resolve', 'err', 'reject', 'IQueuedRequest', 'P\'4!P"2"$/#4$P"2%$/#4&Mw\'y'];
exports.__ΩIQueuedRequest = __ΩIQueuedRequest;
class SrpcError extends Error {
    constructor(message, isUserError) {
        super(message);
        this.message = message;
        this.isUserError = isUserError;
    }
}
exports.SrpcError = SrpcError;
SrpcError.__type = [() => Error, 'message', 'isUserError', 'constructor', 'SrpcError', 'P7!P&2":)2#8:"0$5w%'];
const __ΩISrpcServerOptions = ['TClientOutput', 'TServerOutput', () => __ΩScopedLogger, 'logger', () => __ΩSrpcMessageFns, 'clientMessage', () => __ΩSrpcMessageFns, 'serverMessage', 'wsPath', 'debug', "info", "debug", false, 'logLevel', 'ISrpcServerOptions', 'b!b"Pn#4$e"!o%"4&e""o\'"4(&4))4*8P.+.,.-J4.8Mw/y'];
exports.__ΩISrpcServerOptions = __ΩISrpcServerOptions;
const __ΩSrpcStream = [() => __ΩSrpcMeta, 'T', 'IByteStreamable', () => ws_1.default, '$ws', () => __ΩIQueuedRequest, '$queue', 'id', 'clientStreamId', 'address', 'clientId', 'appVersion', 'configureTs', 'meta', 'connectedAt', 'lastPingAt', 'SrpcStream', 'n!c"P"w#P7$4%&n&E4\'&4(9&4)9&4*9&4+9&4,9\'4-9e"!4.9\'4/9\'40Mw1y'];
exports.__ΩSrpcStream = __ΩSrpcStream;
const __ΩSrpcMessageHandlerFn = ['C', 'I', 'O', 'wrappedStream', 'data', '', 'SrpcMessageHandlerFn', 'b!b"b#Pe"!2$e""2%e"#`/&w\'y'];
exports.__ΩSrpcMessageHandlerFn = __ΩSrpcMessageHandlerFn;
const __ΩISrpcMessageHandler = ['C', 'I', 'O', () => __ΩSrpcMessageHandlerFn, 'handle', 'ISrpcMessageHandler', 'b!b"b#Pe"!e""e"#o$$4%Mw&y'];
exports.__ΩISrpcMessageHandler = __ΩISrpcMessageHandler;
const __ΩTSrpcMessageHandlerClass = ['C', 'I', 'O', 'ClassType', 'TSrpcMessageHandlerClass', 'b!b"b#"w$w%y'];
exports.__ΩTSrpcMessageHandlerClass = __ΩTSrpcMessageHandlerClass;
const __ΩTSrpcMessageHandlerFnOrClass = ['C', 'I', 'O', () => __ΩSrpcMessageHandlerFn, () => __ΩTSrpcMessageHandlerClass, 'TSrpcMessageHandlerFnOrClass', 'b!b"b#Pe"!e""e"#o$$e"!e""e"#o%$Jw&y'];
exports.__ΩTSrpcMessageHandlerFnOrClass = __ΩTSrpcMessageHandlerFnOrClass;
exports.isSrpcMessageHandlerClass = __assignType((handler) => {
    // eslint-disable-next-line @typescript-eslint/no-explicit-any
    return typeof handler === 'function' && typeof handler.prototype?.handle === 'function';
}, [() => __ΩTSrpcMessageHandlerFnOrClass, 'handler', '', 'P"""o!$2"!/#']);
//# sourceMappingURL=types.js.map