{"_id":"@aimform/identity-sdk","_rev":"2-4e27e04a816058426fab946f455cf88d","name":"@aimform/identity-sdk","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@aimform/identity-sdk","version":"0.1.0","keywords":["aimform","identity","auth","sdk","api","organizations","profiles","permissions"],"author":{"name":"Universal Reason LLC"},"license":"MIT","_id":"@aimform/identity-sdk@0.1.0","maintainers":[{"name":"adamhalasz","email":"mail@adamhalasz.com"}],"homepage":"https://aimform-landing.pages.dev","bugs":{"url":"https://github.com/adamhalasz/aimform/issues"},"dist":{"shasum":"bd3fc5a46473e496e567bb8b048ad282810615be","tarball":"https://registry.npmjs.org/@aimform/identity-sdk/-/identity-sdk-0.1.0.tgz","fileCount":7,"integrity":"sha512-miqVkkR7UfXcS+5OWVGxrCfeHGQlmiC12luY24fLj578aCU33vOLE9v/LgQvrm2ZCDhGAvBSeBytmn+0FO2O0g==","signatures":[{"sig":"MEUCIFBSGnVC8o6Hi3U6pMtX+80OgVQ7CM2YzaV5k1gWyiEKAiEAkCwaHu/bwFSotSVpx9QoyckxSyR8vN5UKSb9z+gA+U4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":17228},"type":"module","exports":{".":{"types":"./src/index.ts","import":"./src/index.ts"},"./client":{"types":"./src/client/index.ts","import":"./src/client/index.ts"},"./server":{"types":"./src/server/index.ts","import":"./src/server/index.ts"}},"gitHead":"c6111dfac54208c920905b2bce2bee3d32d10f4f","scripts":{"typecheck":"tsc --noEmit"},"_npmUser":{"name":"adamhalasz","email":"mail@adamhalasz.com"},"repository":{"url":"git+https://github.com/adamhalasz/aimform.git","type":"git","directory":"packages/identity-sdk"},"_npmVersion":"11.8.0","description":"Aimform Identity SDK — Auth, organizations, profiles, permissions, spaces, entities, workflows. Server RPC client and browser client for the Aimform Identity Service.","directories":{},"sideEffects":false,"_nodeVersion":"25.6.0","dependencies":{"zod":"^3.24.0","hono":"^4.7.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.0"},"_npmOperationalInternal":{"tmp":"tmp/identity-sdk_0.1.0_1785168301735_0.8507034908177675","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@aimform/identity-sdk","version":"0.2.0","description":"Aimform Identity — Auth, Organizations, Profiles, Spaces, Entities, Conversations, Tools, Workflows, Permissions. Clean namespace API.","type":"module","license":"MIT","sideEffects":false,"exports":{".":{"types":"./src/index.ts","import":"./src/index.ts"},"./client":{"types":"./src/client.ts","import":"./src/client.ts"},"./server":{"types":"./src/index.ts","import":"./src/index.ts"}},"scripts":{"typecheck":"tsc --noEmit"},"dependencies":{"hono":"^4.7.0","zod":"^3.24.0"},"devDependencies":{"typescript":"^5.7.0"},"repository":{"type":"git","url":"git+https://github.com/adamhalasz/aimform.git","directory":"packages/identity-sdk"},"keywords":["aimform","identity","auth","sdk","api","organizations","profiles","permissions"],"author":{"name":"Universal Reason LLC"},"bugs":{"url":"https://github.com/adamhalasz/aimform/issues"},"homepage":"https://aimform-landing.pages.dev","gitHead":"c6111dfac54208c920905b2bce2bee3d32d10f4f","_id":"@aimform/identity-sdk@0.2.0","_nodeVersion":"25.6.0","_npmVersion":"11.8.0","dist":{"integrity":"sha512-1c8zDXEYgrQ92hLAqFQbtAgjs3tXLDPO0a1x75g3is6LMM3po0MmwENV/bRVu5IRG+g6QqQ4R8cn0DwWO9MiSg==","shasum":"9a12e6db7472756759a33ee30601250c76272aea","tarball":"https://registry.npmjs.org/@aimform/identity-sdk/-/identity-sdk-0.2.0.tgz","fileCount":20,"unpackedSize":26860,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEMCIDLmPVwjpc2JCBFyKNds3Sf4jsKoaGLn0sT35z9HFq1QAh8IKQoiIZS4Y2DFP3Z9TxPQFRhMJLuijROQZUrE7tGU"}]},"_npmUser":{"name":"adamhalasz","email":"mail@adamhalasz.com"},"directories":{},"maintainers":[{"name":"adamhalasz","email":"mail@adamhalasz.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/identity-sdk_0.2.0_1785168820978_0.6409726106745697"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-27T16:05:01.555Z","modified":"2026-07-27T16:13:41.334Z","0.1.0":"2026-07-27T16:05:01.897Z","0.2.0":"2026-07-27T16:13:41.157Z"},"bugs":{"url":"https://github.com/adamhalasz/aimform/issues"},"author":{"name":"Universal Reason LLC"},"license":"MIT","homepage":"https://aimform-landing.pages.dev","keywords":["aimform","identity","auth","sdk","api","organizations","profiles","permissions"],"repository":{"type":"git","url":"git+https://github.com/adamhalasz/aimform.git","directory":"packages/identity-sdk"},"description":"Aimform Identity — Auth, Organizations, Profiles, Spaces, Entities, Conversations, Tools, Workflows, Permissions. Clean namespace API.","maintainers":[{"name":"adamhalasz","email":"mail@adamhalasz.com"}],"readme":"# @aimform/identity-sdk\n\nAimform Identity SDK — clean namespace API for the Aimform Identity Service.\n\n```bash\nnpm install @aimform/identity-sdk\n```\n\n## Quick Start\n\n```typescript\nimport { Identity, Organizations, Spaces, Entities, Conversations, Auth } from \"@aimform/identity-sdk\";\n\n// Configure once\nIdentity.configure({\n  baseUrl: \"https://identity.aimform.com\",\n  token: \"your-session-token\",\n});\n\n// Organizations\nconst orgs = await Organizations.list();\nconst org = await Organizations.create({ name: \"My Company\", slug: \"my-co\" });\n\n// Spaces\nconst spaces = await Spaces.list(org.id);\nconst space = await Spaces.create(org.id, { name: \"General\", slug: \"general\" });\n\n// Entities\nconst entities = await Entities.list(org.id, space.id);\nconst entity = await Entities.create(org.id, space.id, {\n  entity_type: \"case\",\n  properties: { status: \"active\", priority: \"high\" },\n});\n\n// Conversations\nconst conversations = await Conversations.list(org.id);\nconst conversation = await Conversations.create(org.id, { title: \"Support chat\" });\nawait Conversations.send(org.id, conversation.id, { role: \"user\", content: \"Hello!\" });\n\n// Tools\nconst tools = await Tools.list(org.id);\nawait Tools.create(org.id, { name: \"search_docs\", description: \"Search documents\", implementation: \"external_call\" });\n```\n\n### Browser Client (Auth + localStorage)\n\n```typescript\nimport { Identity, Auth, Organizations } from \"@aimform/identity-sdk/client\";\n\nIdentity.configure({ baseUrl: \"https://identity.aimform.com\" });\n\n// Auth auto-manages token in localStorage\nawait Auth.register(\"user@example.com\", \"password123\", \"Jane Doe\");\nawait Auth.login(\"user@example.com\", \"password123\");\nAuth.logout();\n\n// Use any module — token is attached automatically\nconst orgs = await Organizations.list();\n```\n\n## API Reference\n\n### `Identity`\n\n| Method | Description |\n|--------|-------------|\n| `Identity.configure({ baseUrl, token? })` | Set base URL and token |\n\n### `Auth` (client only)\n\n| Method | Description |\n|--------|-------------|\n| `Auth.register(email, password, name?)` | Register → auto-login |\n| `Auth.login(email, password)` | Login → stores token |\n| `Auth.logout()` | Logout → clears token |\n| `Auth.validate()` | Check session validity |\n| `Auth.me()` | Current user + organizations |\n\n### `Organizations`\n\n| Method | Description |\n|--------|-------------|\n| `Organizations.list()` | List user's organizations |\n| `Organizations.get(orgId)` | Get org + members |\n| `Organizations.create({ name, slug })` | Create new org |\n| `Organizations.update(orgId, { name?, slug? })` | Update org |\n\n### `Members`\n\n| Method | Description |\n|--------|-------------|\n| `Members.list(orgId)` | List org members |\n| `Members.invite(orgId, { email, role? })` | Invite a member |\n| `Members.remove(orgId, memberId)` | Remove a member |\n\n### `Spaces`\n\n| Method | Description |\n|--------|-------------|\n| `Spaces.list(orgId)` | List spaces |\n| `Spaces.get(orgId, spaceId)` | Get space + entity count |\n| `Spaces.create(orgId, { name, slug })` | Create space |\n| `Spaces.update(orgId, spaceId, data)` | Update space |\n| `Spaces.remove(orgId, spaceId)` | Delete space |\n\n### `Entities`\n\n| Method | Description |\n|--------|-------------|\n| `Entities.list(orgId, spaceId, entityType?)` | List entities |\n| `Entities.get(orgId, spaceId, entityId)` | Get entity + blocks |\n| `Entities.create(orgId, spaceId, data)` | Create entity |\n| `Entities.update(orgId, spaceId, entityId, data)` | Update entity |\n| `Entities.remove(orgId, spaceId, entityId)` | Delete entity |\n\n### `Blocks`\n\n| Method | Description |\n|--------|-------------|\n| `Blocks.add(orgId, spaceId, entityId, data)` | Add block to entity |\n| `Blocks.update(orgId, spaceId, entityId, blockId, data)` | Update block |\n\n### `Conversations`\n\n| Method | Description |\n|--------|-------------|\n| `Conversations.list(orgId)` | List conversations |\n| `Conversations.get(orgId, conversationId)` | Get conversation + messages |\n| `Conversations.create(orgId, { title? })` | Create conversation |\n| `Conversations.send(orgId, conversationId, { role, content, tool_calls? })` | Append message |\n\n### `Tools`\n\n| Method | Description |\n|--------|-------------|\n| `Tools.list(orgId)` | List tool definitions |\n| `Tools.get(orgId, toolId)` | Get tool |\n| `Tools.create(orgId, data)` | Create tool |\n| `Tools.update(orgId, toolId, data)` | Update tool |\n| `Tools.remove(orgId, toolId)` | Delete tool |\n\n### `Workflows`\n\n| Method | Description |\n|--------|-------------|\n| `Workflows.list(orgId)` | List workflows |\n| `Workflows.get(orgId, workflowId)` | Get workflow |\n| `Workflows.create(orgId, data)` | Create workflow |\n| `Workflows.update(orgId, workflowId, data)` | Update workflow |\n| `Workflows.remove(orgId, workflowId)` | Delete workflow |\n\n### `Permissions`\n\n| Method | Description |\n|--------|-------------|\n| `Permissions.check(orgId, { action, entity_type, entity_id? })` | Check permission |\n| `Permissions.listPolicies(orgId)` | List policies |\n| `Permissions.createPolicy(orgId, data)` | Create policy |\n| `Permissions.assignRole(orgId, { profileId, role })` | Assign role |\n\n### `Connections`\n\n| Method | Description |\n|--------|-------------|\n| `Connections.list(orgId)` | List connections |\n| `Connections.create(orgId, data)` | Create connection |\n| `Connections.remove(orgId, connectionId)` | Delete connection |\n\n### `Profiles`\n\n| Method | Description |\n|--------|-------------|\n| `Profiles.get(orgId)` | Get current user's profile |\n| `Profiles.update(orgId, data)` | Update profile |\n\n### `Files`\n\n| Method | Description |\n|--------|-------------|\n| `Files.list(orgId)` | List files |\n| `Files.getUploadUrl(orgId, { filename, contentType })` | Get presigned upload URL |\n| `Files.remove(orgId, fileId)` | Delete file |\n\n## Types\n\n```typescript\nimport type {\n  Organization, Space, Entity, Block, Profile,\n  Conversation, ConversationMessage, Connection,\n  ToolDefinition, Workflow, PermissionPolicy,\n} from \"@aimform/identity-sdk\";\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md"}