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

@keyro/kl-sdk-directory

v0.2.6

Published

Centralized way to request kl-core-directory

Downloads

11

Readme

Install

yarn add @keyro/kl-sdk-directory

Usage

import { getUser } from '@keyro/kl-sdk-directory'

async foo() {
  const user = await getUser('xxxx-xxxxxx-xxxxx-xxxxxxxx') // You get all fields by default
}

async bar() {
  const user = await getUser('xxxx-xxxxxx-xxxxx-xxxxxxxx', `id avatar`) // You ask only what you want through graphql syntax
}

Doc

Features

function | description | returns ---------|-------------|-------- addResource(resourcesIds, teamId, fields) | Add resources to a team | Team createOrganization(organization, fields) | Create an organization | Organization createTeam(team, organizationId, fields) | Create a team | Team getAllResources(filters, fields) | Fetch all resources matching a given filter | [Resource] getOrganization(id, fields) | Fetch an organization with id | Organization getPublicOrganization(id, fields) | Fetch the public data of an organization with id | Organization getTeam(id, fields) | Fetch an team with id | Team getUser(id, fields) | Fetch an user with id | User joinOrganization(userId, organizationId, fields) | Make a user member of an organization | Organization joinTeam(userIds, teamId, fields) | Make a user member of a team | Team leaveOrganization(userId, organizationId, fields) | Kick a user from an organization | Organization leaveTeam(userId, teamId, fields) | Kick a user from a team | Team resourcesApps(fields) | List all available resourcesApps to be use as an enumeration | ResourceApp resourcesTypes(fields) | List all available resourcesTypes to be use as an enumeration | ResourceType saveProfile(user, fields) | Save changes to a user profile | User saveProfilePicture(avatarUrl, fields) | Specifically change the user avatar picture | User updateOrganization(organization, fields) | Save changes made to an organization | Organization

Objects

type Organization {
  id: ID
  name: String
  siteUri: String
  logoUri: String
  contracted: Boolean,
  description: String
  users: [User]
  paginatedUsers: PaginatedUser
  teams: [Team]
  owners: [User]
  admins: [User]
  employeesLength: Int
  employees: [User]
  createdAt: Datetime
  deletedAt: Datetime
}

input InputOrganizationFilter {
  id: ID
  name: String
}

input InputUserOrganizationCreate {
  name: String
  description: String
  contracted: Boolean,
  siteUri: String
  logoUri: String
}

input InputUserOrganizationUpdate {
  id: ID!
  name: String
  description: String
  contracted: Boolean,
  siteUri: String
  logoUri: String
}
input InputResource {
  id: ID
  name: String
  typeId: ID
  url: String
  appId: ID
}

input InputResourceFilters {
  id: ID
  appId: ID
  typeId: ID
  teamId: ID
  orgId: ID
  userId: ID
}

type Resource {
  id: ID
  name: String
  type: String
  url: String
  app: String
}

type ResourceType {
  id: ID!
  name: String!
}

type ResourceApp {
  id: ID!
  name: String!
}
input InputTeam {
  id: ID
  name: String
  organizationId: ID
}

type Team {
  id: ID
  name: String
  organizationId: ID
  members: [User]
}

type User @key(fields: "id") {
  id: ID!
  email: String!
  firstName: String
  lastName: String
  gender: Gender
  company: String
  birthdate: String
  phone: String
  zipcode: String
  city: String
  address: String
  avatar: String
  alias: String
  createdAt: Datetime
  deletedAt: Datetime
}

input InputUserProfileUpdate {
  email: String!
  firstName: String
  lastName: String
  gender: Gender
  company: String
  birthdate: String
  phone: String
  zipcode: String
  city: String
  address: String
  avatar: String
  alias: String!
}

enum Gender {
  FEMALE
  MALE
  UNKNOWN
}

type PaginatedUser {
  page: Int
  perPage: Int
  items: [User]
  count: Int
}