{"version":3,"file":"WebSocketService-method-action-types.mjs","sourceRoot":"","sources":["../../src/websocket/WebSocketService-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { WebSocketService } from './WebSocketService';\n\n/**\n * Open a WebSocket connection.\n *\n * @param snapId - The Snap ID.\n * @param url - The URL for the WebSocket connection.\n * @param protocols - An optional parameter for protocols.\n * @returns The identifier for the opened connection.\n * @throws If the connection fails.\n */\nexport type WebSocketServiceOpenAction = {\n  type: `WebSocketService:open`;\n  handler: WebSocketService['open'];\n};\n\n/**\n * Close a given WebSocket connection.\n *\n * @param snapId - The Snap ID.\n * @param id - The identifier for the WebSocket connection.\n */\nexport type WebSocketServiceCloseAction = {\n  type: `WebSocketService:close`;\n  handler: WebSocketService['close'];\n};\n\n/**\n * Send a message from a given Snap ID to a WebSocket connection.\n *\n * @param snapId - The Snap ID.\n * @param id - The identifier for the WebSocket connection.\n * @param data - The message to send.\n */\nexport type WebSocketServiceSendMessageAction = {\n  type: `WebSocketService:sendMessage`;\n  handler: WebSocketService['sendMessage'];\n};\n\n/**\n * Get a list of all open WebSocket connections for a Snap ID.\n *\n * @param snapId - The Snap ID.\n * @returns A list of WebSocket connections.\n */\nexport type WebSocketServiceGetAllAction = {\n  type: `WebSocketService:getAll`;\n  handler: WebSocketService['getAll'];\n};\n\n/**\n * Union of all WebSocketService action types.\n */\nexport type WebSocketServiceMethodActions =\n  | WebSocketServiceOpenAction\n  | WebSocketServiceCloseAction\n  | WebSocketServiceSendMessageAction\n  | WebSocketServiceGetAllAction;\n"]}