@getpaidhq/sdk
Version:
TypeScript SDK for GetPaidHQ API - Comprehensive subscription billing platform
33 lines (30 loc) • 1.37 kB
text/typescript
import { AxiosError } from 'axios';
import { E as ErrorResponse } from '../common-DxOEZ2Dn.cjs';
declare class GetPaidHQError extends Error {
readonly statusCode?: number;
readonly errorCode?: string;
readonly details?: Record<string, any>;
readonly requestId?: string;
constructor(message: string, statusCode?: number, errorCode?: string, details?: Record<string, any>, requestId?: string);
}
declare class AuthenticationError extends GetPaidHQError {
constructor(message?: string, details?: Record<string, any>);
}
declare class AuthorizationError extends GetPaidHQError {
constructor(message?: string, details?: Record<string, any>);
}
declare class NotFoundError extends GetPaidHQError {
constructor(resource: string, id?: string);
}
declare class ValidationError extends GetPaidHQError {
constructor(message: string, details?: Record<string, any>);
}
declare class RateLimitError extends GetPaidHQError {
readonly retryAfter?: number;
constructor(message?: string, retryAfter?: number);
}
declare class ServerError extends GetPaidHQError {
constructor(message?: string, statusCode?: number);
}
declare function handleApiError(error: AxiosError<ErrorResponse>): never;
export { AuthenticationError, AuthorizationError, GetPaidHQError, NotFoundError, RateLimitError, ServerError, ValidationError, handleApiError };