BREAKING CHANGE(core): major architectural refactoring with cross-platform support and SmartRequest rename
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// Export the main client
|
||||
export { SmartRequestClient } from './smartrequestclient.js';
|
||||
export { SmartRequest } from './smartrequest.js';
|
||||
|
||||
// Export response type from core
|
||||
export { CoreResponse } from '../core/index.js';
|
||||
@@ -17,32 +17,32 @@ export {
|
||||
} from './types/pagination.js';
|
||||
|
||||
// Convenience factory functions
|
||||
import { SmartRequestClient } from './smartrequestclient.js';
|
||||
import { SmartRequest } from './smartrequest.js';
|
||||
|
||||
/**
|
||||
* Create a client pre-configured for JSON requests
|
||||
*/
|
||||
export function createJsonClient<T = any>() {
|
||||
return SmartRequestClient.create<T>();
|
||||
return SmartRequest.create<T>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a client pre-configured for form data requests
|
||||
*/
|
||||
export function createFormClient<T = any>() {
|
||||
return SmartRequestClient.create<T>();
|
||||
return SmartRequest.create<T>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a client pre-configured for binary data
|
||||
*/
|
||||
export function createBinaryClient<T = any>() {
|
||||
return SmartRequestClient.create<T>().accept('binary');
|
||||
return SmartRequest.create<T>().accept('binary');
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a client pre-configured for streaming
|
||||
*/
|
||||
export function createStreamClient() {
|
||||
return SmartRequestClient.create().accept('stream');
|
||||
return SmartRequest.create().accept('stream');
|
||||
}
|
Reference in New Issue
Block a user