56 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
			
		
		
	
	
			56 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			TypeScript
		
	
	
	
	
	
| // Export the main client
 | |
| export { SmartRequest } from './smartrequest.js';
 | |
| 
 | |
| // Export response type from core
 | |
| export { CoreResponse } from '../core/index.js';
 | |
| 
 | |
| // Export types
 | |
| export type {
 | |
|   HttpMethod,
 | |
|   ResponseType,
 | |
|   FormField,
 | |
|   RetryConfig,
 | |
|   TimeoutConfig,
 | |
|   RateLimitConfig,
 | |
| } from './types/common.js';
 | |
| export {
 | |
|   PaginationStrategy,
 | |
|   type TPaginationConfig as PaginationConfig,
 | |
|   type OffsetPaginationConfig,
 | |
|   type CursorPaginationConfig,
 | |
|   type LinkPaginationConfig,
 | |
|   type CustomPaginationConfig,
 | |
|   type TPaginatedResponse as PaginatedResponse,
 | |
| } from './types/pagination.js';
 | |
| 
 | |
| // Convenience factory functions
 | |
| import { SmartRequest } from './smartrequest.js';
 | |
| 
 | |
| /**
 | |
|  * Create a client pre-configured for JSON requests
 | |
|  */
 | |
| export function createJsonClient<T = any>() {
 | |
|   return SmartRequest.create<T>();
 | |
| }
 | |
| 
 | |
| /**
 | |
|  * Create a client pre-configured for form data requests
 | |
|  */
 | |
| export function createFormClient<T = any>() {
 | |
|   return SmartRequest.create<T>();
 | |
| }
 | |
| 
 | |
| /**
 | |
|  * Create a client pre-configured for binary data
 | |
|  */
 | |
| export function createBinaryClient<T = any>() {
 | |
|   return SmartRequest.create<T>().accept('binary');
 | |
| }
 | |
| 
 | |
| /**
 | |
|  * Create a client pre-configured for streaming
 | |
|  */
 | |
| export function createStreamClient() {
 | |
|   return SmartRequest.create().accept('stream');
 | |
| }
 |