npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@apiclient.xyz/zitadel

v1.1.0

Published

An unofficial client for interacting with Zitadel API, enabling user and project management functionalities.

Downloads

11

Readme

@apiclient.xyz/zitadel

An unofficial client for interacting with Zitadel API.

Install

To 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:

npm install @apiclient.xyz/zitadel --save

This 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:

npm install -g typescript

Usage

The @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.

Getting Started

First, ensure you import the core client class from the package:

import { ZitaldelClient } from '@apiclient.xyz/zitadel';

Initialize the ZitaldelClient with your Zitadel instance URL and access token:

const zitadelClient = new ZitaldelClient({
  url: 'https://your-zitadel-instance.com', // Replace with your Zitadel instance URL.
  accessToken: 'your_access_token_here' // Replace with your actual access token.
});

User Management

The library allows performing user operations such as listing all users, getting info of the current user, and creating new users.

List All Users

async function listUsers() {
  const users = await zitadelClient.listUsers();
  console.log(users); // Outputs user list
}
listUsers();

Get Current User Information

async function getCurrentUser() {
  const user = await zitadelClient.listOwnUser();
  console.log(user); // Outputs current user information.
}
getCurrentUser();

Create a New User

async function createUser() {
  await zitadelClient.createUser({
    email: '[email protected]',
    firstName: 'First',
    lastName: 'Last'
  });
  console.log('User created successfully.');
}
createUser();

Project Management

Beyond user management, the client also supports actions on projects—like listing and managing project roles.

List Projects

async function listProjects() {
  const projects = await zitadelClient.listProjects();
  console.log(projects); // Outputs list of projects
}
listProjects();

Project Roles

Each project comes with roles that can be managed through the client.

Listing Project Roles

To inspect roles within a project:

async function listProjectRoles(projectId: string) {
  const projectRoles = await someProject.listProjectRoles(); // Assume `someProject` is an instance of `ZitadelProject`.
  console.log(projectRoles);
}

Note: The ZitadelProject object would typically be obtained as part of the list from listProjects.

Advanced Topics

For more complex scenarios, such as direct interaction with Zitadel's gRPC APIs, or detailed configuration, please refer to the comprehensive official Zitadel documentation. 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.

For 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.


This 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. undefined