JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q38248F
  • License MIT

Web SDK for Guru SaaS System - Complete JavaScript/TypeScript SDK for building applications with dynamic schema management

Package Exports

  • @mindmakr/gs-websdk
  • @mindmakr/gs-websdk/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@mindmakr/gs-websdk) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Guru SaaS Web SDK

npm version TypeScript Tests

A comprehensive TypeScript SDK for the Guru SaaS platform, providing seamless integration with authentication, schema management, AI services, and notifications.

โœจ Features

  • ๐Ÿ” Complete Authentication - User management, RBAC, permissions
  • ๐Ÿ“‹ Dynamic Schemas - Create and manage flexible data structures
  • ๐Ÿค– AI-Powered - Schema generation and field enhancement
  • ๐Ÿ“ง Notifications - Email templates and delivery tracking
  • ๐Ÿ”’ Type-Safe - Full TypeScript support with comprehensive types
  • โšก Production Ready - 100% test coverage with real backend validation
  • ๐Ÿ› ๏ธ Developer Friendly - Intuitive API with excellent documentation

๐Ÿš€ Quick Start

Installation

npm install @mindmakr/gs-websdk

Basic Usage

import { GuruSaaS } from '@mindmakr/gs-websdk';

// Initialize the SDK
const client = new GuruSaaS({
  baseUrl: 'https://your-api-domain.com',
  debug: true // Enable debug mode for development
});

// Login
const { user, tokens } = await client.login('user@example.com', 'password');
console.log(`Welcome ${user.name}!`);

// Use services
const users = await client.auth.getUsers({ page: 1, limit: 10 });
const templates = await client.schema.getSchemaTemplates({ is_active: true });
const healthStatus = await client.ai.getHealthStatus();

๐Ÿ—๏ธ Core Services

๐Ÿ” Authentication Service

// User management
const users = await client.auth.getUsers();
const user = await client.auth.createUser({
  email: 'new@example.com',
  password: 'secure123',
  name: 'New User'
});

// Role-based access control
const roles = await client.auth.getRoles();
await client.auth.addRoleToUser(user.id, roleId);

๐Ÿ“‹ Schema Service

// Create schema template
const template = await client.schema.createSchemaTemplate({
  name: 'Customer Profile',
  code: 'customer_profile',
  schema_definition: {
    type: 'object',
    properties: {
      firstName: { type: 'string', title: 'First Name' },
      email: { type: 'string', format: 'email', title: 'Email' }
    }
  }
});

๐Ÿค– AI Service

// Get AI field suggestions
const suggestions = await client.ai.getFieldNameSuggestions({
  context: 'customer management',
  existing_fields: ['firstName', 'lastName']
});

๐Ÿ“ง Notification Service

// Send email
const result = await client.notification.sendEmail({
  to: 'user@example.com',
  subject: 'Welcome!',
  html: '<h1>Welcome to our platform!</h1>'
});

๐Ÿ“š Documentation

For Frontend Developers

For DevOps Teams

Reference Materials

๐Ÿงช Testing

# Run all tests
npm test

# Run integration tests (requires backend services)
npm run test:integration

# Generate coverage report
npm run test:coverage

Test Results: โœ… 65/65 tests passing (100% success rate)

๐Ÿ“ฆ NPM Publishing & Usage

Installation

# Install from npm
npm install @mindmakr/gs-websdk

# Or with yarn
yarn add @mindmakr/gs-websdk

# Or with pnpm
pnpm add @mindmakr/gs-websdk

CDN Usage

<script src="https://unpkg.com/@mindmakr/gs-websdk@latest/dist/index.js"></script>

Publishing (DevOps)

For build and release instructions, see our DevOps Guide.

Quick Release:

# Patch release (1.0.0 -> 1.0.1)
npm run release:patch

# Minor release (1.0.0 -> 1.1.0)
npm run release:minor

# Major release (1.0.0 -> 2.0.0)
npm run release:major

๐Ÿค Contributing

We welcome contributions! Please see our Developer Guide for details.

๐Ÿ“„ License

MIT License - see LICENSE file for details.

๐Ÿ†˜ Support


Ready to get started? Install the SDK and check out our Developer Guide! ๐Ÿš€