{"id":48836,"library":"open-event-sdk","title":"Open Event SDK","description":"Open Event SDK for Node.js (v1.0.1) enables WebSocket-based event subscription for open platforms, primarily targeting WPS KSO ecosystem. It supports automatic reconnection with exponential backoff, KSO-1 signature authentication, and two event handling modes: single handler and dispatcher with per-event-code registration. Ships TypeScript definitions with typed event handlers for common events. Requires Node.js >=18. Compared to alternatives, it provides a typed, configurable WebSocket client with built-in reconnection and signature auth.","status":"active","version":"1.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/GongchuangSu/open-event-sdk-node","tags":["javascript","open-event","websocket","event","sdk","wps","kso","typescript"],"install":[{"cmd":"npm install open-event-sdk","lang":"bash","label":"npm"},{"cmd":"yarn add open-event-sdk","lang":"bash","label":"yarn"},{"cmd":"pnpm add open-event-sdk","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only package. CommonJS require will fail.","wrong":"const { Client } = require('open-event-sdk')","symbol":"Client","correct":"import { Client } from 'open-event-sdk'"},{"note":"Named export from main entry, not from subpath.","wrong":"import { Dispatcher } from 'open-event-sdk/dispatcher'","symbol":"Dispatcher","correct":"import { Dispatcher } from 'open-event-sdk'"},{"note":"Type-only import from subpath model; is not exported from main entry.","wrong":"import { V7NotificationAppChatMessageCreateData } from 'open-event-sdk'","symbol":"V7NotificationAppChatMessageCreateData","correct":"import type { V7NotificationAppChatMessageCreateData } from 'open-event-sdk/event/model'"}],"quickstart":{"code":"import { Client, Dispatcher } from 'open-event-sdk';\n\nconst dispatcher = new Dispatcher()\n  .onV7AppChatMessageCreate((event) => {\n    console.log(`Message: ${event.parsedData.message.id}`);\n  })\n  .registerFunc('custom.event', (event) => {\n    const data = JSON.parse(event.data);\n    console.log('Custom event:', data);\n  });\n\nconst client = new Client({\n  appId: process.env.APP_ID ?? '',\n  appSecret: process.env.APP_SECRET ?? '',\n  dispatcher,\n});\n\nawait client.start();","lang":"typescript","description":"Creates a WebSocket client with a dispatcher that handles typed and custom events, then starts listening."},"warnings":[{"fix":"Use 'import' syntax and ensure Node.js >=18 or use dynamic import().","message":"The package is ESM-only and requires Node.js >=18. Using require() will throw an error.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Check documentation for list of supported onV7XXX methods, or use registerFunc for others.","message":"Not all events have onV7XXX methods; for unsupported events you must use registerFunc.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use registerFunc for new code; onV7XXX may be removed in future.","message":"The onV7XXX methods are deprecated in favor of registerFunc with typed Data? (SDK version unclear, but README shows both).","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'-1':32 '18':62 'altern':65 'auth':80 'authent':34 'automat':26 'backoff':30 'base':13 'built':75 'built-in':74 'client':72 'code':48 'common':58 'compar':63 'configur':70 'definit':52 'dispatch':43 'ecosystem':23 'enabl':10 'event':2,5,14,37,47,55,59,84,86 'exponenti':29 'handl':38 'handler':41,56 'javascript':81 'kso':22,31,89 'mode':39 'node.js':8,61 'open':1,4,17,83 'open-ev':82 'per':46 'per-event-cod':45 'platform':18 'primarili':19 'provid':67 'reconnect':27,77 'registr':49 'requir':60 'sdk':3,6,87 'ship':50 'signatur':33,79 'singl':40 'subscript':15 'support':25 'target':20 'two':36 'type':54,69 'typescript':51,90 'v1.0.1':9 'websocket':12,71,85 'websocket-bas':11 'wps':21,88","created_at":"2026-06-07T16:58:43.620013+00:00","updated_at":"2026-06-07T16:58:43.620013+00:00","problems":[{"fix":"Ensure import path is exact: 'open-event-sdk/event/model' (case-sensitive). For TypeScript, set moduleResolution to 'node' or 'node16'.","cause":"Typo in subpath import or TypeScript tsconfig not set to 'node' moduleResolution.","error":"Cannot find module 'open-event-sdk/event/model'"},{"fix":"Switch to 'import' syntax or use dynamic import(). Ensure package.json has 'type': 'module'.","cause":"Using require() to load an ESM-only package.","error":"ERR_REQUIRE_ESM"},{"fix":"Import { Dispatcher } from 'open-event-sdk' and instantiate with new Dispatcher() before calling methods.","cause":"Importing Dispatcher from wrong path or not instantiating correctly.","error":"TypeError: dispatcher.onV7AppChatMessageCreate is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/GongchuangSu/open-event-sdk-node#readme","github":"https://github.com/GongchuangSu/open-event-sdk-node","docs":null,"changelog":null,"pypi":null,"npm":"open-event-sdk","openapi_spec":null,"status_page":null,"smithery":null,"categories":["messaging"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}