/*************************************************************************** * Sockular * * @author Nehonix * @license NOSL * * Copyright (c) 2025 Nehonix. All rights reserved. * * This License governs the use, modification, and distribution of software * provided by NEHONIX under its open source projects. * NEHONIX is committed to fostering collaborative innovation while strictly * protecting its intellectual property rights. * Violation of any term of this License will result in immediate termination of all granted rights * and may subject the violator to legal action. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, * AND NON-INFRINGEMENT. * IN NO EVENT SHALL NEHONIX BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, * OR CONSEQUENTIAL DAMAGES ARISING FROM THE USE OR INABILITY TO USE THE SOFTWARE, * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. * ***************************************************************************** */ import 'reflect-metadata'; import { SockularClient, SockularClientOptions } from './SockularClient'; /** * Internal Symbol to hide the Sockular instance from public API/autocompletion */ export declare const SOCKULAR_INTERNAL: unique symbol; /** * Type representing a class instance that has been decorated and initialized by Sockular */ export type DecoratedClient = T & { connect(options?: Partial): void; disconnect(): void; [SOCKULAR_INTERNAL]: SockularClient; }; /** * Client class providing decorative API for frontend/client-side usage. * This avoids naming conflicts with server-side decorators. */ export declare class Client { /** * @Client decorator * Marks a class as a Sockular client * @param url The server URL to connect to */ static SetUrl(url: string): ClassDecorator; /** * @Client.SetOptions decorator * Sets options for the Sockular client * @param options The options to pass to the SockularClient */ static SetOptions(options: SockularClientOptions): ClassDecorator; /** * @OnConnect decorator */ static OnConnect(): MethodDecorator; /** * @OnDisconnect decorator */ static OnDisconnect(): MethodDecorator; /** * @OnMessage decorator * @param service The name of the service * @param type The message type */ static OnMessage(service: string, type: string): MethodDecorator; /** * Create and initialize a decorative client instance * @param ClientClass The class decorated with @Client.Decorator */ static create(ClientClass: new (...args: any[]) => T): DecoratedClient; } //# sourceMappingURL=Client.d.ts.map