🚀 DAY 5 OF LAUNCH WEEK:Introducing Webhook Events for Alert Changes.Learn more →
Socket
Book a DemoInstallSign in
Socket

@teamboks/core

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teamboks/core

Teamboks Core SDK - Framework-agnostic permission management

latest
Source
npmnpm
Version
0.3.0
Version published
Maintainers
1
Created
Source

@teamboks/core

Framework-agnostic core SDK for Teamboks.

Overview

This package contains the shared business logic, API communication, constants, and types that are used across all Teamboks framework-specific SDKs (React, Vue, Angular, Svelte, etc.).

Features

  • âś… Framework-agnostic
  • âś… API key management
  • âś… TypeScript support
  • âś… Shared constants and configuration

Installation

npm install @teamboks/core
# or
pnpm add @teamboks/core
# or  
yarn add @teamboks/core

Usage

Basic Setup

import { init, permissions } from '@teamboks/core';

// Initialize with your API key
init('your-api-key-here');

// Check permissions
const result = await permissions.check({
  feature: 'dashboard',
  action: 'read',
  role: 'admin',
});

console.log('Permission status:', result.status);

API Reference

init(apiKey: string)

Initialize the SDK with your API key.

permissions.check(params: PermissionCheckParams)

Check if a permission is granted.

Parameters:

  • feature: string - The feature to check
  • action: string - The action to perform
  • role: string - The user's role
  • apiKey?: string - Optional API key override

Returns: Promise<PermissionCheckResponse>

Types

import type { PermissionCheckParams, PermissionCheckResponse } from '@teamboks/core';

Framework-Specific Packages

This core package is used by:

  • @teamboks/react - React hooks and components
  • @teamboks/vue - Vue composables and components
  • @teamboks/angular - Angular services and directives
  • @teamboks/svelte - Svelte stores and components

License

MIT

Keywords

permissions

FAQs

Package last updated on 17 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts