UNPKG

@mindmakr/gs-websdk

Version:

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

48 lines 1.76 kB
"use strict"; /** * Core types and interfaces for the Guru SaaS Web SDK */ Object.defineProperty(exports, "__esModule", { value: true }); exports.NetworkError = exports.ValidationError = exports.PermissionError = exports.AuthenticationError = exports.SDKError = void 0; // ============================================================================ // ERROR TYPES // ============================================================================ class SDKError extends Error { constructor(message, code = 'SDK_ERROR', statusCode, details) { super(message); this.name = 'SDKError'; this.code = code; this.statusCode = statusCode; this.details = details; } } exports.SDKError = SDKError; class AuthenticationError extends SDKError { constructor(message = 'Authentication failed', details) { super(message, 'AUTH_ERROR', 401, details); this.name = 'AuthenticationError'; } } exports.AuthenticationError = AuthenticationError; class PermissionError extends SDKError { constructor(message = 'Permission denied', details) { super(message, 'PERMISSION_ERROR', 403, details); this.name = 'PermissionError'; } } exports.PermissionError = PermissionError; class ValidationError extends SDKError { constructor(message = 'Validation failed', details) { super(message, 'VALIDATION_ERROR', 400, details); this.name = 'ValidationError'; } } exports.ValidationError = ValidationError; class NetworkError extends SDKError { constructor(message = 'Network request failed', details) { super(message, 'NETWORK_ERROR', 0, details); this.name = 'NetworkError'; } } exports.NetworkError = NetworkError; //# sourceMappingURL=index.js.map