0.0.40 • Published 10 months ago

keyhippo v0.0.40

Weekly downloads
-
License
MIT
Repository
github
Last release
10 months ago

KeyHippo Client

This package provides the client-side implementation for KeyHippo, enabling seamless API key management in Supabase applications.

Installation

npm install keyhippo

Basic Usage

import { KeyHippo } from "keyhippo";

// Initialize KeyHippo with your Supabase client
const keyHippo = new KeyHippo(supabaseClient);

// Create a new API key
const result = await keyHippo.createApiKey(userId, "Primary API Key");

// Revoke an API key
await keyHippo.revokeApiKey(apiKeyId);

// Load all API keys' information for a specific user
const keyInfos = await keyHippo.loadApiKeyInfo(userId);
// Returns an array of `ApiKeyInfo` objects containing basic details about each API key associated with the user,
// such as the key's ID and description. If no keys are found, an empty array is returned.

// Get metadata for all API keys associated with a user
const metadata = await keyHippo.getAllKeyMetadata(userId);
// Returns an array of `ApiKeyMetadata` objects, which include detailed metadata for each API key,
// such as usage statistics, creation date, and revocation status. If no keys are found, an empty array is returned.

Documentation

For complete documentation, including detailed API references and advanced usage, please refer to our main documentation.

Contributing

We welcome contributions! Please see our Contributing Guide for more information.

License

This package is part of the KeyHippo project and is distributed under the MIT license. See the LICENSE file for details.

0.0.40

10 months ago

0.0.37

10 months ago

0.0.38

10 months ago

0.0.39

10 months ago

0.0.30

10 months ago

0.0.31

10 months ago

0.0.32

10 months ago

0.0.33

10 months ago

0.0.34

10 months ago

0.0.35

10 months ago

0.0.36

10 months ago

0.0.26

10 months ago

0.0.27

10 months ago

0.0.28

10 months ago

0.0.29

10 months ago

0.0.25

11 months ago

0.0.24

11 months ago

0.0.23

11 months ago

0.0.22

11 months ago

0.0.21

11 months ago

0.0.20

11 months ago

0.0.19

11 months ago

0.0.18

11 months ago

0.0.17

11 months ago

0.0.16

11 months ago

0.0.15

11 months ago

0.0.14

11 months ago

0.0.13

11 months ago

0.0.12

11 months ago

0.0.10

11 months ago

0.0.5

11 months ago

0.0.4

11 months ago