@remnawave/xtls-sdk 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +104 -0
- package/build/index.d.ts +8 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +13 -0
- package/build/scripts/export-protos.d.ts +2 -0
- package/build/scripts/export-protos.d.ts.map +1 -0
- package/build/scripts/export-protos.js +122 -0
- package/build/src/common/errors/index.d.ts +2 -0
- package/build/src/common/errors/index.d.ts.map +1 -0
- package/build/src/common/errors/index.js +17 -0
- package/build/src/common/errors/stats/index.d.ts +2 -0
- package/build/src/common/errors/stats/index.d.ts.map +1 -0
- package/build/src/common/errors/stats/index.js +17 -0
- package/build/src/common/errors/stats/stats.errors.d.ts +39 -0
- package/build/src/common/errors/stats/stats.errors.d.ts.map +1 -0
- package/build/src/common/errors/stats/stats.errors.js +38 -0
- package/build/src/common/types/index.d.ts +2 -0
- package/build/src/common/types/index.d.ts.map +1 -0
- package/build/src/common/types/index.js +17 -0
- package/build/src/common/types/sdk-response.d.ts +6 -0
- package/build/src/common/types/sdk-response.d.ts.map +1 -0
- package/build/src/common/types/sdk-response.js +2 -0
- package/build/src/handler/handler.service.d.ts +1 -0
- package/build/src/handler/handler.service.d.ts.map +1 -0
- package/build/src/handler/handler.service.js +1 -0
- package/build/src/stats/models/get-all-inbounds-stats/get-all-inbounds-stats.response.model.d.ts +21 -0
- package/build/src/stats/models/get-all-inbounds-stats/get-all-inbounds-stats.response.model.d.ts.map +1 -0
- package/build/src/stats/models/get-all-inbounds-stats/get-all-inbounds-stats.response.model.js +42 -0
- package/build/src/stats/models/get-all-inbounds-stats/index.d.ts +2 -0
- package/build/src/stats/models/get-all-inbounds-stats/index.d.ts.map +1 -0
- package/build/src/stats/models/get-all-inbounds-stats/index.js +17 -0
- package/build/src/stats/models/get-all-inbounds-stats/interfaces/inbound.interface.d.ts +6 -0
- package/build/src/stats/models/get-all-inbounds-stats/interfaces/inbound.interface.d.ts.map +1 -0
- package/build/src/stats/models/get-all-inbounds-stats/interfaces/inbound.interface.js +2 -0
- package/build/src/stats/models/get-all-inbounds-stats/interfaces/index.d.ts +2 -0
- package/build/src/stats/models/get-all-inbounds-stats/interfaces/index.d.ts.map +1 -0
- package/build/src/stats/models/get-all-inbounds-stats/interfaces/index.js +17 -0
- package/build/src/stats/models/get-all-outbounds-stats/get-all-outbounds-stats.response.model.d.ts +21 -0
- package/build/src/stats/models/get-all-outbounds-stats/get-all-outbounds-stats.response.model.d.ts.map +1 -0
- package/build/src/stats/models/get-all-outbounds-stats/get-all-outbounds-stats.response.model.js +42 -0
- package/build/src/stats/models/get-all-outbounds-stats/index.d.ts +2 -0
- package/build/src/stats/models/get-all-outbounds-stats/index.d.ts.map +1 -0
- package/build/src/stats/models/get-all-outbounds-stats/index.js +17 -0
- package/build/src/stats/models/get-all-outbounds-stats/interfaces/index.d.ts +2 -0
- package/build/src/stats/models/get-all-outbounds-stats/interfaces/index.d.ts.map +1 -0
- package/build/src/stats/models/get-all-outbounds-stats/interfaces/index.js +17 -0
- package/build/src/stats/models/get-all-outbounds-stats/interfaces/outbound.interface.d.ts +6 -0
- package/build/src/stats/models/get-all-outbounds-stats/interfaces/outbound.interface.d.ts.map +1 -0
- package/build/src/stats/models/get-all-outbounds-stats/interfaces/outbound.interface.js +2 -0
- package/build/src/stats/models/get-all-users-stats/get-all-users-stats.response.model.d.ts +21 -0
- package/build/src/stats/models/get-all-users-stats/get-all-users-stats.response.model.d.ts.map +1 -0
- package/build/src/stats/models/get-all-users-stats/get-all-users-stats.response.model.js +42 -0
- package/build/src/stats/models/get-all-users-stats/index.d.ts +2 -0
- package/build/src/stats/models/get-all-users-stats/index.d.ts.map +1 -0
- package/build/src/stats/models/get-all-users-stats/index.js +17 -0
- package/build/src/stats/models/get-all-users-stats/interfaces/index.d.ts +2 -0
- package/build/src/stats/models/get-all-users-stats/interfaces/index.d.ts.map +1 -0
- package/build/src/stats/models/get-all-users-stats/interfaces/index.js +17 -0
- package/build/src/stats/models/get-all-users-stats/interfaces/user.interface.d.ts +6 -0
- package/build/src/stats/models/get-all-users-stats/interfaces/user.interface.d.ts.map +1 -0
- package/build/src/stats/models/get-all-users-stats/interfaces/user.interface.js +2 -0
- package/build/src/stats/models/get-inbound-stats/get-inbound-stats.response.model.d.ts +27 -0
- package/build/src/stats/models/get-inbound-stats/get-inbound-stats.response.model.d.ts.map +1 -0
- package/build/src/stats/models/get-inbound-stats/get-inbound-stats.response.model.js +46 -0
- package/build/src/stats/models/get-inbound-stats/index.d.ts +2 -0
- package/build/src/stats/models/get-inbound-stats/index.d.ts.map +1 -0
- package/build/src/stats/models/get-inbound-stats/index.js +17 -0
- package/build/src/stats/models/get-inbound-stats/interfaces/inbound.interface.d.ts +6 -0
- package/build/src/stats/models/get-inbound-stats/interfaces/inbound.interface.d.ts.map +1 -0
- package/build/src/stats/models/get-inbound-stats/interfaces/inbound.interface.js +2 -0
- package/build/src/stats/models/get-inbound-stats/interfaces/index.d.ts +2 -0
- package/build/src/stats/models/get-inbound-stats/interfaces/index.d.ts.map +1 -0
- package/build/src/stats/models/get-inbound-stats/interfaces/index.js +17 -0
- package/build/src/stats/models/get-outbound-stats/get-outbound-stats.response.model.d.ts +27 -0
- package/build/src/stats/models/get-outbound-stats/get-outbound-stats.response.model.d.ts.map +1 -0
- package/build/src/stats/models/get-outbound-stats/get-outbound-stats.response.model.js +46 -0
- package/build/src/stats/models/get-outbound-stats/index.d.ts +2 -0
- package/build/src/stats/models/get-outbound-stats/index.d.ts.map +1 -0
- package/build/src/stats/models/get-outbound-stats/index.js +17 -0
- package/build/src/stats/models/get-outbound-stats/interfaces/index.d.ts +2 -0
- package/build/src/stats/models/get-outbound-stats/interfaces/index.d.ts.map +1 -0
- package/build/src/stats/models/get-outbound-stats/interfaces/index.js +17 -0
- package/build/src/stats/models/get-outbound-stats/interfaces/outbound.d.ts +6 -0
- package/build/src/stats/models/get-outbound-stats/interfaces/outbound.d.ts.map +1 -0
- package/build/src/stats/models/get-outbound-stats/interfaces/outbound.js +2 -0
- package/build/src/stats/models/get-sys-stats/get-sys-stats.response.model.d.ts +15 -0
- package/build/src/stats/models/get-sys-stats/get-sys-stats.response.model.d.ts.map +1 -0
- package/build/src/stats/models/get-sys-stats/get-sys-stats.response.model.js +22 -0
- package/build/src/stats/models/get-sys-stats/index.d.ts +2 -0
- package/build/src/stats/models/get-sys-stats/index.d.ts.map +1 -0
- package/build/src/stats/models/get-sys-stats/index.js +17 -0
- package/build/src/stats/models/get-user-online-status/get-user-online-status.response.model.d.ts +5 -0
- package/build/src/stats/models/get-user-online-status/get-user-online-status.response.model.d.ts.map +1 -0
- package/build/src/stats/models/get-user-online-status/get-user-online-status.response.model.js +9 -0
- package/build/src/stats/models/get-user-online-status/index.d.ts +2 -0
- package/build/src/stats/models/get-user-online-status/index.d.ts.map +1 -0
- package/build/src/stats/models/get-user-online-status/index.js +17 -0
- package/build/src/stats/models/get-user-stats/get-user-stats.response.model.d.ts +26 -0
- package/build/src/stats/models/get-user-stats/get-user-stats.response.model.d.ts.map +1 -0
- package/build/src/stats/models/get-user-stats/get-user-stats.response.model.js +46 -0
- package/build/src/stats/models/get-user-stats/index.d.ts +2 -0
- package/build/src/stats/models/get-user-stats/index.d.ts.map +1 -0
- package/build/src/stats/models/get-user-stats/index.js +17 -0
- package/build/src/stats/models/get-user-stats/interfaces/index.d.ts +2 -0
- package/build/src/stats/models/get-user-stats/interfaces/index.d.ts.map +1 -0
- package/build/src/stats/models/get-user-stats/interfaces/index.js +17 -0
- package/build/src/stats/models/get-user-stats/interfaces/user.interface.d.ts +6 -0
- package/build/src/stats/models/get-user-stats/interfaces/user.interface.d.ts.map +1 -0
- package/build/src/stats/models/get-user-stats/interfaces/user.interface.js +2 -0
- package/build/src/stats/models/index.d.ts +9 -0
- package/build/src/stats/models/index.d.ts.map +1 -0
- package/build/src/stats/models/index.js +24 -0
- package/build/src/stats/stats.service.d.ts +227 -0
- package/build/src/stats/stats.service.d.ts.map +1 -0
- package/build/src/stats/stats.service.js +399 -0
- package/build/src/xray-protos/app/commander/config.d.ts +37 -0
- package/build/src/xray-protos/app/commander/config.d.ts.map +1 -0
- package/build/src/xray-protos/app/commander/config.js +143 -0
- package/build/src/xray-protos/app/dispatcher/config.d.ts +26 -0
- package/build/src/xray-protos/app/dispatcher/config.d.ts.map +1 -0
- package/build/src/xray-protos/app/dispatcher/config.js +112 -0
- package/build/src/xray-protos/app/dns/config.d.ts +93 -0
- package/build/src/xray-protos/app/dns/config.d.ts.map +1 -0
- package/build/src/xray-protos/app/dns/config.js +707 -0
- package/build/src/xray-protos/app/dns/fakedns/fakedns.d.ts +30 -0
- package/build/src/xray-protos/app/dns/fakedns/fakedns.d.ts.map +1 -0
- package/build/src/xray-protos/app/dns/fakedns/fakedns.js +152 -0
- package/build/src/xray-protos/app/log/command/config.d.ts +51 -0
- package/build/src/xray-protos/app/log/command/config.d.ts.map +1 -0
- package/build/src/xray-protos/app/log/command/config.js +143 -0
- package/build/src/xray-protos/app/log/config.d.ts +38 -0
- package/build/src/xray-protos/app/log/config.d.ts.map +1 -0
- package/build/src/xray-protos/app/log/config.js +216 -0
- package/build/src/xray-protos/app/metrics/config.d.ts +24 -0
- package/build/src/xray-protos/app/metrics/config.d.ts.map +1 -0
- package/build/src/xray-protos/app/metrics/config.js +68 -0
- package/build/src/xray-protos/app/observatory/burst/config.d.ts +41 -0
- package/build/src/xray-protos/app/observatory/burst/config.d.ts.map +1 -0
- package/build/src/xray-protos/app/observatory/burst/config.js +223 -0
- package/build/src/xray-protos/app/observatory/command/command.d.ts +53 -0
- package/build/src/xray-protos/app/observatory/command/command.d.ts.map +1 -0
- package/build/src/xray-protos/app/observatory/command/command.js +166 -0
- package/build/src/xray-protos/app/observatory/config.d.ts +106 -0
- package/build/src/xray-protos/app/observatory/config.d.ts.map +1 -0
- package/build/src/xray-protos/app/observatory/config.js +628 -0
- package/build/src/xray-protos/app/policy/config.d.ts +78 -0
- package/build/src/xray-protos/app/policy/config.d.ts.map +1 -0
- package/build/src/xray-protos/app/policy/config.js +750 -0
- package/build/src/xray-protos/app/proxyman/command/command.d.ts +198 -0
- package/build/src/xray-protos/app/proxyman/command/command.d.ts.map +1 -0
- package/build/src/xray-protos/app/proxyman/command/command.js +1028 -0
- package/build/src/xray-protos/app/proxyman/config.d.ts +125 -0
- package/build/src/xray-protos/app/proxyman/config.d.ts.map +1 -0
- package/build/src/xray-protos/app/proxyman/config.js +958 -0
- package/build/src/xray-protos/app/reverse/config.d.ts +48 -0
- package/build/src/xray-protos/app/reverse/config.d.ts.map +1 -0
- package/build/src/xray-protos/app/reverse/config.js +361 -0
- package/build/src/xray-protos/app/router/command/command.d.ts +222 -0
- package/build/src/xray-protos/app/router/command/command.d.ts.map +1 -0
- package/build/src/xray-protos/app/router/command/command.js +1235 -0
- package/build/src/xray-protos/app/router/config.d.ts +176 -0
- package/build/src/xray-protos/app/router/config.d.ts.map +1 -0
- package/build/src/xray-protos/app/router/config.js +1484 -0
- package/build/src/xray-protos/app/stats/command/command.d.ts +121 -0
- package/build/src/xray-protos/app/stats/command/command.d.ts.map +1 -0
- package/build/src/xray-protos/app/stats/command/command.js +666 -0
- package/build/src/xray-protos/app/stats/config.d.ts +28 -0
- package/build/src/xray-protos/app/stats/config.d.ts.map +1 -0
- package/build/src/xray-protos/app/stats/config.js +140 -0
- package/build/src/xray-protos/common/log/log.d.ts +12 -0
- package/build/src/xray-protos/common/log/log.d.ts.map +1 -0
- package/build/src/xray-protos/common/log/log.js +61 -0
- package/build/src/xray-protos/common/net/address.d.ts +29 -0
- package/build/src/xray-protos/common/net/address.d.ts.map +1 -0
- package/build/src/xray-protos/common/net/address.js +111 -0
- package/build/src/xray-protos/common/net/destination.d.ts +27 -0
- package/build/src/xray-protos/common/net/destination.d.ts.map +1 -0
- package/build/src/xray-protos/common/net/destination.js +105 -0
- package/build/src/xray-protos/common/net/network.d.ts +32 -0
- package/build/src/xray-protos/common/net/network.d.ts.map +1 -0
- package/build/src/xray-protos/common/net/network.js +122 -0
- package/build/src/xray-protos/common/net/port.d.ts +32 -0
- package/build/src/xray-protos/common/net/port.d.ts.map +1 -0
- package/build/src/xray-protos/common/net/port.js +142 -0
- package/build/src/xray-protos/common/protocol/headers.d.ts +34 -0
- package/build/src/xray-protos/common/protocol/headers.d.ts.map +1 -0
- package/build/src/xray-protos/common/protocol/headers.js +126 -0
- package/build/src/xray-protos/common/protocol/server_spec.d.ts +26 -0
- package/build/src/xray-protos/common/protocol/server_spec.d.ts.map +1 -0
- package/build/src/xray-protos/common/protocol/server_spec.js +105 -0
- package/build/src/xray-protos/common/protocol/user.d.ts +30 -0
- package/build/src/xray-protos/common/protocol/user.d.ts.map +1 -0
- package/build/src/xray-protos/common/protocol/user.js +104 -0
- package/build/src/xray-protos/common/serial/typed_message.d.ts +26 -0
- package/build/src/xray-protos/common/serial/typed_message.d.ts.map +1 -0
- package/build/src/xray-protos/common/serial/typed_message.js +111 -0
- package/build/src/xray-protos/core/config.d.ts +74 -0
- package/build/src/xray-protos/core/config.d.ts.map +1 -0
- package/build/src/xray-protos/core/config.js +350 -0
- package/build/src/xray-protos/proxy/blackhole/config.d.ts +31 -0
- package/build/src/xray-protos/proxy/blackhole/config.d.ts.map +1 -0
- package/build/src/xray-protos/proxy/blackhole/config.js +152 -0
- package/build/src/xray-protos/proxy/dns/config.d.ts +30 -0
- package/build/src/xray-protos/proxy/dns/config.d.ts.map +1 -0
- package/build/src/xray-protos/proxy/dns/config.js +130 -0
- package/build/src/xray-protos/proxy/dokodemo/config.d.ts +29 -0
- package/build/src/xray-protos/proxy/dokodemo/config.d.ts.map +1 -0
- package/build/src/xray-protos/proxy/dokodemo/config.js +151 -0
- package/build/src/xray-protos/proxy/freedom/config.d.ts +68 -0
- package/build/src/xray-protos/proxy/freedom/config.d.ts.map +1 -0
- package/build/src/xray-protos/proxy/freedom/config.js +603 -0
- package/build/src/xray-protos/proxy/http/config.d.ts +54 -0
- package/build/src/xray-protos/proxy/http/config.d.ts.map +1 -0
- package/build/src/xray-protos/proxy/http/config.js +408 -0
- package/build/src/xray-protos/proxy/loopback/config.d.ts +22 -0
- package/build/src/xray-protos/proxy/loopback/config.d.ts.map +1 -0
- package/build/src/xray-protos/proxy/loopback/config.js +68 -0
- package/build/src/xray-protos/proxy/shadowsocks/config.d.ts +49 -0
- package/build/src/xray-protos/proxy/shadowsocks/config.d.ts.map +1 -0
- package/build/src/xray-protos/proxy/shadowsocks/config.js +297 -0
- package/build/src/xray-protos/proxy/shadowsocks_2022/config.d.ts +69 -0
- package/build/src/xray-protos/proxy/shadowsocks_2022/config.d.ts.map +1 -0
- package/build/src/xray-protos/proxy/shadowsocks_2022/config.js +684 -0
- package/build/src/xray-protos/proxy/socks/config.d.ts +61 -0
- package/build/src/xray-protos/proxy/socks/config.d.ts.map +1 -0
- package/build/src/xray-protos/proxy/socks/config.js +402 -0
- package/build/src/xray-protos/proxy/trojan/config.d.ts +45 -0
- package/build/src/xray-protos/proxy/trojan/config.d.ts.map +1 -0
- package/build/src/xray-protos/proxy/trojan/config.js +340 -0
- package/build/src/xray-protos/proxy/vless/account.d.ts +27 -0
- package/build/src/xray-protos/proxy/vless/account.d.ts.map +1 -0
- package/build/src/xray-protos/proxy/vless/account.js +101 -0
- package/build/src/xray-protos/proxy/vless/encoding/addons.d.ts +23 -0
- package/build/src/xray-protos/proxy/vless/encoding/addons.d.ts.map +1 -0
- package/build/src/xray-protos/proxy/vless/encoding/addons.js +111 -0
- package/build/src/xray-protos/proxy/vless/inbound/config.d.ts +39 -0
- package/build/src/xray-protos/proxy/vless/inbound/config.d.ts.map +1 -0
- package/build/src/xray-protos/proxy/vless/inbound/config.js +245 -0
- package/build/src/xray-protos/proxy/vless/outbound/config.d.ts +23 -0
- package/build/src/xray-protos/proxy/vless/outbound/config.d.ts.map +1 -0
- package/build/src/xray-protos/proxy/vless/outbound/config.js +69 -0
- package/build/src/xray-protos/proxy/vmess/account.d.ts +31 -0
- package/build/src/xray-protos/proxy/vmess/account.d.ts.map +1 -0
- package/build/src/xray-protos/proxy/vmess/account.js +104 -0
- package/build/src/xray-protos/proxy/vmess/inbound/config.d.ts +36 -0
- package/build/src/xray-protos/proxy/vmess/inbound/config.d.ts.map +1 -0
- package/build/src/xray-protos/proxy/vmess/inbound/config.js +212 -0
- package/build/src/xray-protos/proxy/vmess/outbound/config.d.ts +23 -0
- package/build/src/xray-protos/proxy/vmess/outbound/config.d.ts.map +1 -0
- package/build/src/xray-protos/proxy/vmess/outbound/config.js +71 -0
- package/build/src/xray-protos/proxy/wireguard/config.d.ts +49 -0
- package/build/src/xray-protos/proxy/wireguard/config.d.ts.map +1 -0
- package/build/src/xray-protos/proxy/wireguard/config.js +403 -0
- package/build/src/xray-protos/transport/internet/config.d.ts +114 -0
- package/build/src/xray-protos/transport/internet/config.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/config.js +946 -0
- package/build/src/xray-protos/transport/internet/grpc/config.d.ts +29 -0
- package/build/src/xray-protos/transport/internet/grpc/config.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/grpc/config.js +186 -0
- package/build/src/xray-protos/transport/internet/grpc/encoding/stream.d.ts +62 -0
- package/build/src/xray-protos/transport/internet/grpc/encoding/stream.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/grpc/encoding/stream.js +164 -0
- package/build/src/xray-protos/transport/internet/headers/dns/config.d.ts +22 -0
- package/build/src/xray-protos/transport/internet/headers/dns/config.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/headers/dns/config.js +68 -0
- package/build/src/xray-protos/transport/internet/headers/http/config.d.ts +80 -0
- package/build/src/xray-protos/transport/internet/headers/http/config.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/headers/http/config.js +544 -0
- package/build/src/xray-protos/transport/internet/headers/noop/config.d.ts +25 -0
- package/build/src/xray-protos/transport/internet/headers/noop/config.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/headers/noop/config.js +90 -0
- package/build/src/xray-protos/transport/internet/headers/srtp/config.d.ts +27 -0
- package/build/src/xray-protos/transport/internet/headers/srtp/config.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/headers/srtp/config.js +154 -0
- package/build/src/xray-protos/transport/internet/headers/tls/config.d.ts +21 -0
- package/build/src/xray-protos/transport/internet/headers/tls/config.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/headers/tls/config.js +51 -0
- package/build/src/xray-protos/transport/internet/headers/utp/config.d.ts +22 -0
- package/build/src/xray-protos/transport/internet/headers/utp/config.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/headers/utp/config.js +68 -0
- package/build/src/xray-protos/transport/internet/headers/wechat/config.d.ts +21 -0
- package/build/src/xray-protos/transport/internet/headers/wechat/config.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/headers/wechat/config.js +51 -0
- package/build/src/xray-protos/transport/internet/headers/wireguard/config.d.ts +21 -0
- package/build/src/xray-protos/transport/internet/headers/wireguard/config.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/headers/wireguard/config.js +51 -0
- package/build/src/xray-protos/transport/internet/http/config.d.ts +28 -0
- package/build/src/xray-protos/transport/internet/http/config.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/http/config.js +155 -0
- package/build/src/xray-protos/transport/internet/httpupgrade/config.d.ts +34 -0
- package/build/src/xray-protos/transport/internet/httpupgrade/config.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/httpupgrade/config.js +235 -0
- package/build/src/xray-protos/transport/internet/kcp/config.d.ts +82 -0
- package/build/src/xray-protos/transport/internet/kcp/config.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/kcp/config.js +639 -0
- package/build/src/xray-protos/transport/internet/reality/config.d.ts +38 -0
- package/build/src/xray-protos/transport/internet/reality/config.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/reality/config.js +376 -0
- package/build/src/xray-protos/transport/internet/splithttp/config.d.ts +55 -0
- package/build/src/xray-protos/transport/internet/splithttp/config.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/splithttp/config.js +536 -0
- package/build/src/xray-protos/transport/internet/tcp/config.d.ts +24 -0
- package/build/src/xray-protos/transport/internet/tcp/config.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/tcp/config.js +89 -0
- package/build/src/xray-protos/transport/internet/tls/config.d.ts +87 -0
- package/build/src/xray-protos/transport/internet/tls/config.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/tls/config.js +555 -0
- package/build/src/xray-protos/transport/internet/udp/config.d.ts +21 -0
- package/build/src/xray-protos/transport/internet/udp/config.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/udp/config.js +51 -0
- package/build/src/xray-protos/transport/internet/websocket/config.d.ts +35 -0
- package/build/src/xray-protos/transport/internet/websocket/config.d.ts.map +1 -0
- package/build/src/xray-protos/transport/internet/websocket/config.js +235 -0
- package/build/src/xray-protos/typeRegistry.d.ts +19 -0
- package/build/src/xray-protos/typeRegistry.d.ts.map +1 -0
- package/build/src/xray-protos/typeRegistry.js +8 -0
- package/package.json +28 -0
package/build/src/stats/models/get-user-online-status/get-user-online-status.response.model.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetUserOnlineStatusResponseModel = void 0;
|
|
4
|
+
class GetUserOnlineStatusResponseModel {
|
|
5
|
+
constructor(data) {
|
|
6
|
+
this.online = data;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
exports.GetUserOnlineStatusResponseModel = GetUserOnlineStatusResponseModel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/stats/models/get-user-online-status/index.ts"],"names":[],"mappings":"AAAA,cAAc,yCAAyC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./get-user-online-status.response.model"), exports);
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { QueryStatsResponse } from '../../../xray-protos/app/stats/command/command';
|
|
2
|
+
import { IUserStat } from './interfaces';
|
|
3
|
+
/**
|
|
4
|
+
* Model class for handling user statistics response data from the Xray server.
|
|
5
|
+
*/
|
|
6
|
+
export declare class GetUserStatsResponseModel {
|
|
7
|
+
/**
|
|
8
|
+
* The user statistics data, or null if no data is available.
|
|
9
|
+
*/
|
|
10
|
+
user: IUserStat | null;
|
|
11
|
+
/**
|
|
12
|
+
* Creates a new GetUserStatsResponseModel instance.
|
|
13
|
+
*
|
|
14
|
+
* @param data - The raw query stats response from the Xray server
|
|
15
|
+
*/
|
|
16
|
+
constructor(data: QueryStatsResponse);
|
|
17
|
+
/**
|
|
18
|
+
* Parses the raw stats response data into formatted user statistics.
|
|
19
|
+
*
|
|
20
|
+
* @param data - The raw query stats response to parse
|
|
21
|
+
* @returns An array of formatted user statistics
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
private parseData;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=get-user-stats.response.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-user-stats.response.model.d.ts","sourceRoot":"","sources":["../../../../../src/stats/models/get-user-stats/get-user-stats.response.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAQ,MAAM,gDAAgD,CAAC;AAC1F,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC;;GAEG;AACH,qBAAa,yBAAyB;IAClC;;OAEG;IACI,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IAE9B;;;;OAIG;gBACS,IAAI,EAAE,kBAAkB;IAKpC;;;;;;OAMG;IACH,OAAO,CAAC,SAAS;CAyBpB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetUserStatsResponseModel = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Model class for handling user statistics response data from the Xray server.
|
|
6
|
+
*/
|
|
7
|
+
class GetUserStatsResponseModel {
|
|
8
|
+
/**
|
|
9
|
+
* Creates a new GetUserStatsResponseModel instance.
|
|
10
|
+
*
|
|
11
|
+
* @param data - The raw query stats response from the Xray server
|
|
12
|
+
*/
|
|
13
|
+
constructor(data) {
|
|
14
|
+
const users = this.parseData(data);
|
|
15
|
+
this.user = users[0] ?? null;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Parses the raw stats response data into formatted user statistics.
|
|
19
|
+
*
|
|
20
|
+
* @param data - The raw query stats response to parse
|
|
21
|
+
* @returns An array of formatted user statistics
|
|
22
|
+
* @private
|
|
23
|
+
*/
|
|
24
|
+
parseData(data) {
|
|
25
|
+
const formattedStats = data.stat.reduce((acc, curr) => {
|
|
26
|
+
const nameParts = curr.name.split('>>>');
|
|
27
|
+
const username = nameParts[1];
|
|
28
|
+
const type = nameParts[3];
|
|
29
|
+
const value = curr.value;
|
|
30
|
+
let user = acc.find((item) => item.username === username);
|
|
31
|
+
if (!user) {
|
|
32
|
+
user = { username, uplink: 0, downlink: 0 };
|
|
33
|
+
acc.push(user);
|
|
34
|
+
}
|
|
35
|
+
if (type === 'uplink') {
|
|
36
|
+
user.uplink += value;
|
|
37
|
+
}
|
|
38
|
+
else if (type === 'downlink') {
|
|
39
|
+
user.downlink += value;
|
|
40
|
+
}
|
|
41
|
+
return acc;
|
|
42
|
+
}, []);
|
|
43
|
+
return formattedStats;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.GetUserStatsResponseModel = GetUserStatsResponseModel;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/stats/models/get-user-stats/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./get-user-stats.response.model"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/stats/models/get-user-stats/interfaces/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./user.interface"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.interface.d.ts","sourceRoot":"","sources":["../../../../../../src/stats/models/get-user-stats/interfaces/user.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CACpB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './get-sys-stats';
|
|
2
|
+
export * from './get-all-users-stats';
|
|
3
|
+
export * from './get-user-stats';
|
|
4
|
+
export * from './get-user-online-status';
|
|
5
|
+
export * from './get-all-inbounds-stats';
|
|
6
|
+
export * from './get-inbound-stats';
|
|
7
|
+
export * from './get-all-outbounds-stats';
|
|
8
|
+
export * from './get-outbound-stats';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/stats/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./get-sys-stats"), exports);
|
|
18
|
+
__exportStar(require("./get-all-users-stats"), exports);
|
|
19
|
+
__exportStar(require("./get-user-stats"), exports);
|
|
20
|
+
__exportStar(require("./get-user-online-status"), exports);
|
|
21
|
+
__exportStar(require("./get-all-inbounds-stats"), exports);
|
|
22
|
+
__exportStar(require("./get-inbound-stats"), exports);
|
|
23
|
+
__exportStar(require("./get-all-outbounds-stats"), exports);
|
|
24
|
+
__exportStar(require("./get-outbound-stats"), exports);
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
import { Channel } from 'nice-grpc';
|
|
2
|
+
import { ISdkResponse } from '../common/types';
|
|
3
|
+
import { GetAllUsersStatsResponseModel, GetUserStatsResponseModel, GetSysStatsResponseModel, GetUserOnlineStatusResponseModel, GetAllInboundsStatsResponseModel, GetInboundStatsResponseModel, GetAllOutboundsStatsResponseModel, GetOutboundStatsResponseModel } from './models';
|
|
4
|
+
/**
|
|
5
|
+
* Service class for interacting with Xray server statistics.
|
|
6
|
+
* Provides methods to retrieve system and user statistics.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* // Create a new StatsService instance
|
|
11
|
+
* const stats = new StatsService(channel);
|
|
12
|
+
*
|
|
13
|
+
* // Get system stats
|
|
14
|
+
* const sysStats = await stats.getSysStats();
|
|
15
|
+
*
|
|
16
|
+
* // Get all users stats
|
|
17
|
+
* const allUsersStats = await stats.getAllUsersStats();
|
|
18
|
+
*
|
|
19
|
+
* // Get specific user stats
|
|
20
|
+
* const userStats = await stats.getUserStats('username123');
|
|
21
|
+
*
|
|
22
|
+
* // Check if user is online
|
|
23
|
+
* const isOnline = await stats.getUserOnlineStatus('username123');
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
export declare class StatsService {
|
|
27
|
+
private readonly channel;
|
|
28
|
+
/**
|
|
29
|
+
* The gRPC client instance for making stats-related requests to the Xray server
|
|
30
|
+
* @private
|
|
31
|
+
*/
|
|
32
|
+
private readonly client;
|
|
33
|
+
/**
|
|
34
|
+
* Creates a new StatsService instance
|
|
35
|
+
* @param channel - The gRPC channel to use for communication with the Xray server
|
|
36
|
+
*/
|
|
37
|
+
constructor(channel: Channel);
|
|
38
|
+
/**
|
|
39
|
+
* Retrieves system statistics from the Xray server.
|
|
40
|
+
* This includes information about the system's overall performance and resource usage.
|
|
41
|
+
*
|
|
42
|
+
* @returns {Promise<ISdkResponse<GetSysStatsResponseModel>>} A promise that resolves to:
|
|
43
|
+
* - On success: An object with `isOk: true` and `data` containing the system stats
|
|
44
|
+
* - On failure: An object with `isOk: false` and error details from STATS_ERRORS
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
* const stats = new StatsService(channel);
|
|
49
|
+
* const response = await stats.getSysStats();
|
|
50
|
+
*
|
|
51
|
+
* if (response.isOk) {
|
|
52
|
+
* console.log(response.data); // GetSysStatsResponseModel
|
|
53
|
+
* } else {
|
|
54
|
+
* console.error(response.message); // Error message
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
58
|
+
getSysStats(): Promise<ISdkResponse<GetSysStatsResponseModel>>;
|
|
59
|
+
/**
|
|
60
|
+
* Retrieves statistics for all users from the Xray server.
|
|
61
|
+
* This provides a comprehensive view of all user activities and their resource usage.
|
|
62
|
+
*
|
|
63
|
+
* @param {boolean} reset - Whether to reset the statistics after retrieving them. Defaults to false.
|
|
64
|
+
* @returns {Promise<ISdkResponse<GetAllUsersStatsResponseModel>>} A promise that resolves to:
|
|
65
|
+
* - On success: An object with `isOk: true` and `data` containing user stats
|
|
66
|
+
* - On failure: An object with `isOk: false` and error details from STATS_ERRORS
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```typescript
|
|
70
|
+
* const stats = new StatsService(channel);
|
|
71
|
+
*
|
|
72
|
+
* // Get stats without resetting
|
|
73
|
+
* const response = await stats.getAllUsersStats();
|
|
74
|
+
*
|
|
75
|
+
* // Get stats and reset them
|
|
76
|
+
* const responseWithReset = await stats.getAllUsersStats(true);
|
|
77
|
+
*
|
|
78
|
+
* if (response.isOk) {
|
|
79
|
+
* console.log(response.data.users); // Array of user statistics
|
|
80
|
+
* } else {
|
|
81
|
+
* console.error(response.message); // Error message
|
|
82
|
+
* }
|
|
83
|
+
* ```
|
|
84
|
+
*/
|
|
85
|
+
getAllUsersStats(reset?: boolean): Promise<ISdkResponse<GetAllUsersStatsResponseModel>>;
|
|
86
|
+
/**
|
|
87
|
+
* Retrieves statistics for a specific user from the Xray server.
|
|
88
|
+
* This includes detailed information about the user's network usage, connections, and other metrics.
|
|
89
|
+
*
|
|
90
|
+
* @param {string} username - The username to get statistics for
|
|
91
|
+
* @param {boolean} reset - Whether to reset the statistics after retrieving them. Defaults to false.
|
|
92
|
+
* @returns {Promise<ISdkResponse<GetUserStatsResponseModel>>} A promise that resolves to:
|
|
93
|
+
* - On success: An object with `isOk: true` and `data` containing the user's stats
|
|
94
|
+
* - On failure: An object with `isOk: false` and error details from STATS_ERRORS
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* ```typescript
|
|
98
|
+
* const stats = new StatsService(channel);
|
|
99
|
+
*
|
|
100
|
+
* // Get user stats without resetting
|
|
101
|
+
* const response = await stats.getUserStats('username123');
|
|
102
|
+
*
|
|
103
|
+
* // Get user stats and reset them
|
|
104
|
+
* const responseWithReset = await stats.getUserStats('username123', true);
|
|
105
|
+
*
|
|
106
|
+
* if (response.isOk) {
|
|
107
|
+
* console.log(response.data.user); // User statistics
|
|
108
|
+
* } else {
|
|
109
|
+
* console.error(response.message); // Error message
|
|
110
|
+
* }
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
getUserStats(username: string, reset?: boolean): Promise<ISdkResponse<GetUserStatsResponseModel>>;
|
|
114
|
+
/**
|
|
115
|
+
* Checks if a specific user is currently online on the Xray server.
|
|
116
|
+
* This method queries the server's real-time connection status for the specified user.
|
|
117
|
+
*
|
|
118
|
+
* @param {string} username - The username to check online status for
|
|
119
|
+
* @returns {Promise<ISdkResponse<GetUserOnlineStatusResponseModel>>} A promise that resolves to:
|
|
120
|
+
* - On success: An object with `isOk: true` and `data` containing the user's online status (`data.online`)
|
|
121
|
+
* - On failure: An object with `isOk: false` and error details from STATS_ERRORS
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* ```typescript
|
|
125
|
+
* const stats = new StatsService(channel);
|
|
126
|
+
* const response = await stats.getUserOnlineStatus('username123');
|
|
127
|
+
*
|
|
128
|
+
* if (response.isOk) {
|
|
129
|
+
* if (response.data.online) {
|
|
130
|
+
* console.log('User is online');
|
|
131
|
+
* } else {
|
|
132
|
+
* console.log('User is offline');
|
|
133
|
+
* }
|
|
134
|
+
* } else {
|
|
135
|
+
* console.error(response.message); // Error message
|
|
136
|
+
* }
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
getUserOnlineStatus(username: string): Promise<ISdkResponse<GetUserOnlineStatusResponseModel>>;
|
|
140
|
+
/**
|
|
141
|
+
* Gets statistics for all inbound connections.
|
|
142
|
+
*
|
|
143
|
+
* @param reset - Whether to reset the statistics after retrieving them. Defaults to false.
|
|
144
|
+
* @returns A promise that resolves to an ISdkResponse containing:
|
|
145
|
+
* - On success: An object with `isOk: true` and data containing an array of inbound stats
|
|
146
|
+
* - On failure: An object with `isOk: false` and error details from STATS_ERRORS
|
|
147
|
+
*
|
|
148
|
+
* @example
|
|
149
|
+
* ```typescript
|
|
150
|
+
* const stats = new StatsService(channel);
|
|
151
|
+
* const response = await stats.getAllInboundsStats();
|
|
152
|
+
*
|
|
153
|
+
* if (response.isOk) {
|
|
154
|
+
* console.log('Inbound stats:', response.data.inbounds);
|
|
155
|
+
* } else {
|
|
156
|
+
* console.error(response.message); // Error message
|
|
157
|
+
* }
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
getAllInboundsStats(reset?: boolean): Promise<ISdkResponse<GetAllInboundsStatsResponseModel>>;
|
|
161
|
+
/**
|
|
162
|
+
* Gets statistics for a specific inbound connection.
|
|
163
|
+
*
|
|
164
|
+
* @param inbound - The name/tag of the inbound connection to get stats for
|
|
165
|
+
* @param reset - Whether to reset the statistics after retrieving them. Defaults to false.
|
|
166
|
+
* @returns A promise that resolves to an ISdkResponse containing:
|
|
167
|
+
* - On success: An object with `isOk: true` and data containing the inbound stats
|
|
168
|
+
* - On failure: An object with `isOk: false` and error details from STATS_ERRORS
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```typescript
|
|
172
|
+
* const stats = new StatsService(channel);
|
|
173
|
+
* const response = await stats.getInboundStats('http_in');
|
|
174
|
+
*
|
|
175
|
+
* if (response.isOk) {
|
|
176
|
+
* console.log('Inbound stats:', response.data.stats);
|
|
177
|
+
* } else {
|
|
178
|
+
* console.error(response.message); // Error message
|
|
179
|
+
* }
|
|
180
|
+
* ```
|
|
181
|
+
*/
|
|
182
|
+
getInboundStats(inbound: string, reset?: boolean): Promise<ISdkResponse<GetInboundStatsResponseModel>>;
|
|
183
|
+
/**
|
|
184
|
+
* Gets statistics for all outbound connections.
|
|
185
|
+
*
|
|
186
|
+
* @param reset - Whether to reset the statistics after retrieving them. Defaults to false.
|
|
187
|
+
* @returns A promise that resolves to an ISdkResponse containing:
|
|
188
|
+
* - On success: An object with `isOk: true` and data containing an array of outbound stats
|
|
189
|
+
* - On failure: An object with `isOk: false` and error details from STATS_ERRORS
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* ```typescript
|
|
193
|
+
* const stats = new StatsService(channel);
|
|
194
|
+
* const response = await stats.getAllOutboundsStats();
|
|
195
|
+
*
|
|
196
|
+
* if (response.isOk) {
|
|
197
|
+
* console.log('Outbound stats:', response.data.outbounds);
|
|
198
|
+
* } else {
|
|
199
|
+
* console.error(response.message); // Error message
|
|
200
|
+
* }
|
|
201
|
+
* ```
|
|
202
|
+
*/
|
|
203
|
+
getAllOutboundsStats(reset?: boolean): Promise<ISdkResponse<GetAllOutboundsStatsResponseModel>>;
|
|
204
|
+
/**
|
|
205
|
+
* Gets statistics for a specific outbound connection.
|
|
206
|
+
*
|
|
207
|
+
* @param outbound - The name/tag of the outbound connection to get stats for
|
|
208
|
+
* @param reset - Whether to reset the statistics after retrieving them. Defaults to false.
|
|
209
|
+
* @returns A promise that resolves to an ISdkResponse containing:
|
|
210
|
+
* - On success: An object with `isOk: true` and data containing the outbound stats
|
|
211
|
+
* - On failure: An object with `isOk: false` and error details from STATS_ERRORS
|
|
212
|
+
*
|
|
213
|
+
* @example
|
|
214
|
+
* ```typescript
|
|
215
|
+
* const stats = new StatsService(channel);
|
|
216
|
+
* const response = await stats.getOutboundStats('http_out');
|
|
217
|
+
*
|
|
218
|
+
* if (response.isOk) {
|
|
219
|
+
* console.log('Outbound stats:', response.data.stats);
|
|
220
|
+
* } else {
|
|
221
|
+
* console.error(response.message); // Error message
|
|
222
|
+
* }
|
|
223
|
+
* ```
|
|
224
|
+
*/
|
|
225
|
+
getOutboundStats(outbound: string, reset?: boolean): Promise<ISdkResponse<GetOutboundStatsResponseModel>>;
|
|
226
|
+
}
|
|
227
|
+
//# sourceMappingURL=stats.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stats.service.d.ts","sourceRoot":"","sources":["../../../src/stats/stats.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAgB,MAAM,WAAW,CAAC;AAKlD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EACH,6BAA6B,EAC7B,yBAAyB,EACzB,wBAAwB,EACxB,gCAAgC,EAChC,gCAAgC,EAChC,4BAA4B,EAC5B,iCAAiC,EACjC,6BAA6B,EAChC,MAAM,UAAU,CAAC;AAElB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,qBAAa,YAAY;IAWT,OAAO,CAAC,QAAQ,CAAC,OAAO;IAVpC;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqB;IAE5C;;;OAGG;gBAC0B,OAAO,EAAE,OAAO;IAI7C;;;;;;;;;;;;;;;;;;;OAmBG;IACU,WAAW,IAAI,OAAO,CAAC,YAAY,CAAC,wBAAwB,CAAC,CAAC;IAoB3E;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACU,gBAAgB,CACzB,KAAK,GAAE,OAAe,GACvB,OAAO,CAAC,YAAY,CAAC,6BAA6B,CAAC,CAAC;IAuBvD;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACU,YAAY,CACrB,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE,OAAe,GACvB,OAAO,CAAC,YAAY,CAAC,yBAAyB,CAAC,CAAC;IAuBnD;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACU,mBAAmB,CAC5B,QAAQ,EAAE,MAAM,GACjB,OAAO,CAAC,YAAY,CAAC,gCAAgC,CAAC,CAAC;IA8B1D;;;;;;;;;;;;;;;;;;;OAmBG;IACU,mBAAmB,CAC5B,KAAK,GAAE,OAAe,GACvB,OAAO,CAAC,YAAY,CAAC,gCAAgC,CAAC,CAAC;IAuB1D;;;;;;;;;;;;;;;;;;;;OAoBG;IACU,eAAe,CACxB,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,OAAe,GACvB,OAAO,CAAC,YAAY,CAAC,4BAA4B,CAAC,CAAC;IAuBtD;;;;;;;;;;;;;;;;;;;OAmBG;IACU,oBAAoB,CAC7B,KAAK,GAAE,OAAe,GACvB,OAAO,CAAC,YAAY,CAAC,iCAAiC,CAAC,CAAC;IAuB3D;;;;;;;;;;;;;;;;;;;;OAoBG;IACU,gBAAgB,CACzB,QAAQ,EAAE,MAAM,EAChB,KAAK,GAAE,OAAe,GACvB,OAAO,CAAC,YAAY,CAAC,6BAA6B,CAAC,CAAC;CAsB1D"}
|