{"_id":"@aethex.os/connect","_rev":"3-b4e97e2b75405f59304b12e557de8fc4","name":"@aethex.os/connect","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@aethex.os/connect","version":"1.0.0","keywords":["aethex","connect","sdk","api-client","messaging","calls","metaverse","social"],"author":{"name":"AeThex Corporation"},"license":"MIT","_id":"@aethex.os/connect@1.0.0","maintainers":[{"name":"mrpiglr","email":"mrpiglr@aethex.dev"}],"homepage":"https://aethex.dev","bugs":{"url":"https://github.com/AeThex-Corporation/AeThex-OS/issues"},"dist":{"shasum":"baad737f03cf74058c76285f718a70e01cc73ec7","tarball":"https://registry.npmjs.org/@aethex.os/connect/-/connect-1.0.0.tgz","fileCount":9,"integrity":"sha512-ZIEe/Bb6YOXp0+N0hHzRPPkEX37nhtC8O7IVo0UmILAtdPnGl9JeuN8toij/nay+7fgE9v3t+PqyHf//6Q0VDw==","signatures":[{"sig":"MEUCIQDGrWwXJkODe2xu1EkzzAMCej4gNqeJp3UL4LSbdb+ltgIgXPlH0hGVZKq7/N2Pfj6rEGDtCECkI3OnLVlkIHJUMZE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17687},"main":"lib/index.js","types":"lib/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"b094d5c032765a30612c2348ce0356d3a50d9feb","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc"},"_npmUser":{"name":"mrpiglr","email":"mrpiglr@aethex.dev"},"repository":{"url":"git+https://github.com/AeThex-Corporation/AeThex-OS.git","type":"git","directory":"packages/aethex-connect"},"_npmVersion":"11.12.1","description":"AeThex Connect SDK — typed API client for auth, messaging, calls, friends, and subscriptions with automatic token refresh","directories":{},"_nodeVersion":"22.22.0","dependencies":{"axios":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/connect_1.0.0_1777696867947_0.6169369051779874","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@aethex.os/connect","version":"1.0.1","keywords":["aethex","connect","sdk","api-client","messaging","calls","metaverse","social"],"author":{"name":"AeThex Corporation"},"license":"MIT","_id":"@aethex.os/connect@1.0.1","maintainers":[{"name":"mrpiglr","email":"mrpiglr@aethex.dev"}],"homepage":"https://aethex.dev","bugs":{"url":"https://github.com/AeThex-Corporation/AeThex-OS/issues"},"dist":{"shasum":"31b1b06d790c1a868e74dca56f8e9bde237a1154","tarball":"https://registry.npmjs.org/@aethex.os/connect/-/connect-1.0.1.tgz","fileCount":10,"integrity":"sha512-+6leuoBwAPmpK1wosJnUNx39JunZ8C3UmH0R9YM6P6xzgZwx4Dv7zP6dA1tDhKkQqx/NM7izqnuWv7lbLTPPyg==","signatures":[{"sig":"MEQCIBZ4Sig0NGfUTolvxwqLaYwHftDNkiDZ5xpRz/fXfsZrAiBA1aUdhzYOXmtksbus1y0ySbSb8emchnxzke/P08lOwQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19620},"main":"lib/index.js","types":"lib/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"b094d5c032765a30612c2348ce0356d3a50d9feb","scripts":{"dev":"tsc --watch","test":"jest","build":"tsc"},"_npmUser":{"name":"mrpiglr","email":"mrpiglr@aethex.dev"},"repository":{"url":"git+https://github.com/AeThex-Corporation/AeThex-OS.git","type":"git","directory":"packages/aethex-connect"},"_npmVersion":"11.12.1","description":"AeThex Connect SDK — typed API client for auth, messaging, calls, friends, and subscriptions with automatic token refresh","directories":{},"_nodeVersion":"22.22.0","dependencies":{"axios":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"_npmOperationalInternal":{"tmp":"tmp/connect_1.0.1_1777932467721_0.40012008827057843","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@aethex.os/connect","version":"1.0.2","description":"AeThex Connect SDK — typed API client for auth, messaging, calls, friends, and subscriptions with automatic token refresh","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"build":"tsc","dev":"tsc --watch","test":"jest"},"keywords":["aethex","connect","sdk","api-client","messaging","calls","metaverse","social"],"author":{"name":"AeThex Corporation"},"license":"MIT","homepage":"https://aethex.dev/docs","repository":{"type":"git","url":"git+https://git.aethex.tech/Labs/os.git","directory":"packages/aethex-connect"},"dependencies":{"axios":"^1.6.0"},"devDependencies":{"@types/node":"^20.0.0","typescript":"^5.3.0"},"engines":{"node":">=18.0.0"},"bugs":{"url":"https://git.aethex.tech/Labs/os/issues"},"_id":"@aethex.os/connect@1.0.2","gitHead":"6c77abd6440deb925777f64998d4c67a398236e0","_nodeVersion":"22.22.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-yjQRSDg4/GP3h+b54pSlUr+RYWFfG9i1lz6gzt23jCgZ4aTRAaCPqfEVLFzubodjlHBbEh3wgdSeE1LRZaT2qQ==","shasum":"439629dddbfa69c3d4ce8ed5d033ede99b5d88d8","tarball":"https://registry.npmjs.org/@aethex.os/connect/-/connect-1.0.2.tgz","fileCount":10,"unpackedSize":19682,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEd/l1euG1ndWHkiZUPm1Ps5sA8zNavFHujz8EPKr4oLAiEAzKAF0jQ3kmRtPAXtFvAsoOKHJ00zk19V6X0/DB2o6hs="}]},"_npmUser":{"name":"mrpiglr","email":"mrpiglr@aethex.dev"},"directories":{},"maintainers":[{"name":"mrpiglr","email":"mrpiglr@aethex.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/connect_1.0.2_1783400196565_0.20335873071603672"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-02T04:41:07.812Z","modified":"2026-07-07T04:56:36.802Z","1.0.0":"2026-05-02T04:41:08.086Z","1.0.1":"2026-05-04T22:07:47.856Z","1.0.2":"2026-07-07T04:56:36.688Z"},"bugs":{"url":"https://git.aethex.tech/Labs/os/issues"},"author":{"name":"AeThex Corporation"},"license":"MIT","homepage":"https://aethex.dev/docs","keywords":["aethex","connect","sdk","api-client","messaging","calls","metaverse","social"],"repository":{"type":"git","url":"git+https://git.aethex.tech/Labs/os.git","directory":"packages/aethex-connect"},"description":"AeThex Connect SDK — typed API client for auth, messaging, calls, friends, and subscriptions with automatic token refresh","maintainers":[{"name":"mrpiglr","email":"mrpiglr@aethex.dev"}],"readme":"# @aethex.os/connect\n\nTyped API client for AeThex Connect — messaging, friend requests, voice/video calls, and subscriptions. Auto-refreshes access tokens on 401.\n\n## Install\n\n```bash\nnpm install @aethex.os/connect\n```\n\n## Usage\n\n```ts\nimport { ConnectClient } from '@aethex.os/connect';\n\nconst client = new ConnectClient({ baseURL: 'https://api.aethex.network' });\n```\n\n### Auth\n\n```ts\nconst { user, tokens } = await client.login('user@example.com', 'password');\nclient.setTokens(tokens); // subsequent requests use these automatically\n\nconst me = await client.getCurrentUser();\n```\n\n### Messaging\n\n```ts\nconst conversations = await client.getConversations();\nconst messages = await client.getMessages('conv_123', 50);\nconst sent = await client.sendMessage('conv_123', 'hey!');\n```\n\n### Friends\n\n```ts\nconst friends = await client.getFriends();\nawait client.sendFriendRequest('user_456');\nawait client.acceptFriendRequest('req_789');\n\nconst pending = await client.getPendingFriendRequests();\n```\n\n### Calls\n\n```ts\nconst call = await client.initiateCall('user_456', 'voice');\nawait client.joinCall(call.id);\nawait client.leaveCall(call.id);\n```\n\n### Subscriptions\n\n```ts\nconst sub = await client.getSubscription();\nawait client.subscribe('pro', paymentMethodId, 'monthly');\n\nconst { available, price } = await client.checkDomainAvailability('myname.aethex');\n```\n\n### Custom requests\n\n```ts\n// Escape hatch for any endpoint\nconst data = await client.request<MyType>({\n  method: 'GET',\n  url: '/custom/endpoint',\n});\n```\n\n## Token refresh\n\nAccess tokens are refreshed automatically. On 401, the client retries with a new token using the stored `refreshToken`. If refresh fails, tokens are cleared.\n\n```ts\nclient.setTokens({ accessToken: '...', refreshToken: '...' });\nclient.clearTokens();\n```\n\n## Part of the @aethex.os ecosystem\n\nSee [@aethex.os/core](https://npmjs.com/package/@aethex.os/core) for the full package list.\n","readmeFilename":"README.md"}