{"_id":"@apiclient.xyz/zitadel","_rev":"2-1ee387e79570e692521b73ae72ad280b","name":"@apiclient.xyz/zitadel","dist-tags":{"latest":"1.1.0"},"versions":{"1.0.8":{"name":"@apiclient.xyz/zitadel","version":"1.0.8","keywords":["Zitadel","API client","TypeScript","authentication","user management","project management","unofficial client","node.js","access control","software development"],"author":{"name":"Task Venture Capital GmbH"},"license":"MIT","_id":"@apiclient.xyz/zitadel@1.0.8","maintainers":[{"name":"lossless","email":"hello@lossless.com"}],"homepage":"https://code.foss.global/apiclient.xyz/zitadel#readme","bugs":{"url":"https://code.foss.global/apiclient.xyz/zitadel/issues"},"dist":{"shasum":"dbfd27be5a82268ccaa3090d09a9e070ce3fab4e","tarball":"https://registry.npmjs.org/@apiclient.xyz/zitadel/-/zitadel-1.0.8.tgz","fileCount":27,"integrity":"sha512-67fLOX+THt+8VnYkPJiYzYM5JAZLQtcoBbNZtuXhx3WECsh0UzctTzM3AF5X5bF0GiFqiH3n9H3BvgSbk0IqOQ==","signatures":[{"sig":"MEQCIAozOXnF09oxwdCAOZhp+5EDQW9ogel/+HZAlPpzYq9lAiAjZ3nya5l1ysmcVmEC9opT/zwgnRrN7d0viFad1PYgcg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29560},"main":"dist_ts/index.js","type":"module","_from":"file:apiclient.xyz-zitadel-1.0.8.tgz","private":false,"scripts":{"test":"(tstest test/ --web)","build":"(tsbuild --web --allowimplicitany --skiplibcheck)","buildDocs":"(tsdoc)"},"typings":"dist_ts/index.d.ts","_npmUser":{"name":"lossless","email":"hello@lossless.com"},"_resolved":"/tmp/9b659c99ffc6f1ae2b1c55652c340613/apiclient.xyz-zitadel-1.0.8.tgz","_integrity":"sha512-67fLOX+THt+8VnYkPJiYzYM5JAZLQtcoBbNZtuXhx3WECsh0UzctTzM3AF5X5bF0GiFqiH3n9H3BvgSbk0IqOQ==","repository":{"url":"git+https://code.foss.global/apiclient.xyz/zitadel.git","type":"git"},"_npmVersion":"10.2.3","description":"An unofficial client for interacting with Zitadel API, enabling user and project management functionalities.","directories":{},"_nodeVersion":"21.2.0","browserslist":["last 1 chrome versions"],"dependencies":{"@zitadel/node":"^2.0.8","@tsclass/tsclass":"^4.0.54"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^20.8.7","@git.zone/tsrun":"^1.2.46","@git.zone/tstest":"^1.0.44","@push.rocks/qenv":"^6.0.5","@git.zone/tsbuild":"^2.1.25","@git.zone/tsbundle":"^2.0.5","@push.rocks/tapbundle":"^5.0.15"},"_npmOperationalInternal":{"tmp":"tmp/zitadel_1.0.8_1714726448170_0.6074227934909262","host":"s3://npm-registry-packages"}},"1.0.9":{"name":"@apiclient.xyz/zitadel","version":"1.0.9","keywords":["Zitadel","API client","TypeScript","authentication","user management","project management","unofficial client","node.js","access control","software development"],"author":{"name":"Task Venture Capital GmbH"},"license":"MIT","_id":"@apiclient.xyz/zitadel@1.0.9","maintainers":[{"name":"lossless","email":"hello@lossless.com"}],"homepage":"https://code.foss.global/apiclient.xyz/zitadel#readme","bugs":{"url":"https://code.foss.global/apiclient.xyz/zitadel/issues"},"dist":{"shasum":"ebc00d306f06316573e81331790b06cddcf5abf6","tarball":"https://registry.npmjs.org/@apiclient.xyz/zitadel/-/zitadel-1.0.9.tgz","fileCount":27,"integrity":"sha512-fi/xg9/NavFU4GzSydBUgCSiwuPPOcs7F28W6U6Urp2OD1DuRAkuM832iSyv32tanVODNdteGUQCBNK/KUUzPw==","signatures":[{"sig":"MEQCIC53cTHFEHbPk5VbqQRh6T1w5qTnhMHYEmIZ8MsCi7sxAiAGG02gOXVraH35M65DDuvFQFs3d9QjBfWdCEB0aEdfTw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29562},"main":"dist_ts/index.js","type":"module","_from":"file:apiclient.xyz-zitadel-1.0.9.tgz","private":false,"scripts":{"test":"(tstest test/ --web)","build":"(tsbuild --web --allowimplicitany --skiplibcheck)","buildDocs":"(tsdoc)"},"typings":"dist_ts/index.d.ts","_npmUser":{"name":"lossless","email":"hello@lossless.com"},"_resolved":"/tmp/39c3c97c27762cf598795a0ba4c81f27/apiclient.xyz-zitadel-1.0.9.tgz","_integrity":"sha512-fi/xg9/NavFU4GzSydBUgCSiwuPPOcs7F28W6U6Urp2OD1DuRAkuM832iSyv32tanVODNdteGUQCBNK/KUUzPw==","repository":{"url":"git+https://code.foss.global/apiclient.xyz/zitadel.git","type":"git"},"_npmVersion":"10.2.3","description":"An unofficial client for interacting with Zitadel API, enabling user and project management functionalities.","directories":{},"_nodeVersion":"21.2.0","browserslist":["last 1 chrome versions"],"dependencies":{"@zitadel/node":"2.0.17","@tsclass/tsclass":"^4.1.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/node":"^22.5.0","@git.zone/tsrun":"^1.2.49","@git.zone/tstest":"^1.0.44","@push.rocks/qenv":"^6.0.5","@git.zone/tsbuild":"^2.1.84","@git.zone/tsbundle":"^2.0.5","@push.rocks/tapbundle":"^5.0.24"},"_npmOperationalInternal":{"tmp":"tmp/zitadel_1.0.9_1724684483453_0.352546176468991","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@apiclient.xyz/zitadel","version":"1.1.0","private":false,"description":"An unofficial client for interacting with Zitadel API, enabling user and project management functionalities.","main":"dist_ts/index.js","typings":"dist_ts/index.d.ts","type":"module","author":{"name":"Task Venture Capital GmbH"},"license":"MIT","devDependencies":{"@git.zone/tsbuild":"^2.1.84","@git.zone/tsbundle":"^2.0.5","@git.zone/tsrun":"^1.2.49","@git.zone/tstest":"^1.0.44","@push.rocks/qenv":"^6.0.5","@push.rocks/tapbundle":"^5.0.24","@types/node":"^22.5.0"},"dependencies":{"@tsclass/tsclass":"^4.1.2","@zitadel/node":"2.0.17"},"repository":{"type":"git","url":"git+https://code.foss.global/apiclient.xyz/zitadel.git"},"bugs":{"url":"https://code.foss.global/apiclient.xyz/zitadel/issues"},"homepage":"https://code.foss.global/apiclient.xyz/zitadel#readme","browserslist":["last 1 chrome versions"],"keywords":["Zitadel","API client","TypeScript","authentication","user management","project management","unofficial client","node.js","access control","software development"],"scripts":{"test":"(tstest test/ --web)","build":"(tsbuild --web --allowimplicitany --skiplibcheck)","buildDocs":"(tsdoc)"},"_id":"@apiclient.xyz/zitadel@1.1.0","_integrity":"sha512-jWf215wxAPsfwGP8aywbVq3ThUNUD2YevIBAKMrIjdOpRWW+iUhDIY90aeSp37vJ+ZNbbneed7h/t5NNa8lZXg==","_resolved":"/tmp/ae8624c38ed9d8883521e25fe5dff5d3/apiclient.xyz-zitadel-1.1.0.tgz","_from":"file:apiclient.xyz-zitadel-1.1.0.tgz","_nodeVersion":"21.2.0","_npmVersion":"10.2.3","dist":{"integrity":"sha512-jWf215wxAPsfwGP8aywbVq3ThUNUD2YevIBAKMrIjdOpRWW+iUhDIY90aeSp37vJ+ZNbbneed7h/t5NNa8lZXg==","shasum":"2c4f1f4511bad42c36c5d291ca4da608d88aead4","tarball":"https://registry.npmjs.org/@apiclient.xyz/zitadel/-/zitadel-1.1.0.tgz","fileCount":27,"unpackedSize":30817,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAX+Cek/3QNDpucJIn9vVbSWASHEnf8SttVuW+QZLMsAAiEAhK4Oj3ivHCKSunYHnsLY2v9DseoKVAyiLQqABxxDnBM="}]},"_npmUser":{"name":"lossless","email":"hello@lossless.com"},"directories":{},"maintainers":[{"name":"lossless","email":"hello@lossless.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/zitadel_1.1.0_1724739249338_0.5989219384932014"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-03T08:54:08.037Z","modified":"2024-08-27T06:14:09.788Z","1.0.8":"2024-05-03T08:54:08.346Z","1.0.9":"2024-08-26T15:01:23.611Z","1.1.0":"2024-08-27T06:14:09.594Z"},"bugs":{"url":"https://code.foss.global/apiclient.xyz/zitadel/issues"},"author":{"name":"Task Venture Capital GmbH"},"license":"MIT","homepage":"https://code.foss.global/apiclient.xyz/zitadel#readme","keywords":["Zitadel","API client","TypeScript","authentication","user management","project management","unofficial client","node.js","access control","software development"],"repository":{"type":"git","url":"git+https://code.foss.global/apiclient.xyz/zitadel.git"},"description":"An unofficial client for interacting with Zitadel API, enabling user and project management functionalities.","maintainers":[{"name":"lossless","email":"hello@lossless.com"}],"readme":"# @apiclient.xyz/zitadel\n\nAn unofficial client for interacting with Zitadel API.\n\n## Install\n\nTo get started with `@apiclient.xyz/zitadel`, ensure you have Node.js installed on your machine. Then, you can add this package to your project by running:\n\n```bash\nnpm install @apiclient.xyz/zitadel --save\n```\n\nThis module is written in TypeScript to take advantage of type safety and autocompletion in IDEs. If you haven't installed TypeScript globally, you can do so by running:\n\n```bash\nnpm install -g typescript\n```\n\n## Usage\n\nThe `@apiclient.xyz/zitadel` package provides an unofficial TypeScript client for easy interaction with Zitadel's API, allowing for convenient management operations such as user and project management.\n\n### Getting Started\n\nFirst, ensure you import the core client class from the package:\n\n```typescript\nimport { ZitaldelClient } from '@apiclient.xyz/zitadel';\n```\n\nInitialize the `ZitaldelClient` with your Zitadel instance URL and access token:\n\n```typescript\nconst zitadelClient = new ZitaldelClient({\n  url: 'https://your-zitadel-instance.com', // Replace with your Zitadel instance URL.\n  accessToken: 'your_access_token_here' // Replace with your actual access token.\n});\n```\n\n### User Management\n\nThe library allows performing user operations such as listing all users, getting info of the current user, and creating new users.\n\n#### List All Users\n\n```typescript\nasync function listUsers() {\n  const users = await zitadelClient.listUsers();\n  console.log(users); // Outputs user list\n}\nlistUsers();\n```\n\n#### Get Current User Information\n\n```typescript\nasync function getCurrentUser() {\n  const user = await zitadelClient.listOwnUser();\n  console.log(user); // Outputs current user information.\n}\ngetCurrentUser();\n```\n\n#### Create a New User\n\n```typescript\nasync function createUser() {\n  await zitadelClient.createUser({\n    email: 'newuser@example.com',\n    firstName: 'First',\n    lastName: 'Last'\n  });\n  console.log('User created successfully.');\n}\ncreateUser();\n```\n\n### Project Management\n\nBeyond user management, the client also supports actions on projects—like listing and managing project roles.\n\n#### List Projects\n\n```typescript\nasync function listProjects() {\n  const projects = await zitadelClient.listProjects();\n  console.log(projects); // Outputs list of projects\n}\nlistProjects();\n```\n\n#### Project Roles\n\nEach project comes with roles that can be managed through the client.\n\n##### Listing Project Roles\n\nTo inspect roles within a project:\n\n```typescript\nasync function listProjectRoles(projectId: string) {\n  const projectRoles = await someProject.listProjectRoles(); // Assume `someProject` is an instance of `ZitadelProject`.\n  console.log(projectRoles);\n}\n```\n\nNote: The `ZitadelProject` object would typically be obtained as part of the list from `listProjects`.\n\n### Advanced Topics\n\nFor more complex scenarios, such as direct interaction with Zitadel's gRPC APIs, or detailed configuration, please refer to the comprehensive [official Zitadel documentation](https://docs.zitadel.ch/). This client offers a simplified abstraction over Zitadel's API functionalities but can be extended or used in conjunction with direct API calls to meet specific needs.\n\nFor instance, the `ZitaldelClient` class can be tweaked to support custom interceptors for logging, authentication flow enhancements, or to integrate with Zitadel's event system for real-time updates on resources.\n\n---\n\nThis is a basic introduction to `@apiclient.xyz/zitadel`. The client simplifies the interaction with Zitadel's API, focusing on core functionalities like user and project management. For specific use cases, detailed configurations, or advanced features, you may need to extend the client or use it as a foundation for more complex interactions with the Zitadel API.\nundefined","readmeFilename":"readme.md"}