@odata2ts/http-client-api
Advanced tools
Comparing version
@@ -6,2 +6,6 @@ # Change Log | ||
## [0.5.1](https://github.com/odata2ts/http-client/compare/@odata2ts/http-client-api@0.5.0...@odata2ts/http-client-api@0.5.1) (2023-09-13) | ||
**Note:** Version bump only for package @odata2ts/http-client-api | ||
# [0.5.0](https://github.com/odata2ts/http-client/compare/@odata2ts/http-client-api@0.4.0...@odata2ts/http-client-api@0.5.0) (2023-09-13) | ||
@@ -8,0 +12,0 @@ |
@@ -6,12 +6,2 @@ import { ODataResponse } from "./ODataResponseModel"; | ||
export type ODataHttpClientConfig<ClientType extends ODataHttpClient> = ClientType extends ODataHttpClient<infer Config> ? Config : never; | ||
export interface InternalHttpClientConfig { | ||
/** | ||
* Additional headers set internally by services or HttpClient implementation. | ||
*/ | ||
headers?: Record<string, string>; | ||
/** | ||
* Very special option needed for FetchClient to not evaluate the response body in certain situations. | ||
*/ | ||
noBodyEvaluation?: boolean; | ||
} | ||
export interface ODataHttpClient<RequestConfig = any> { | ||
@@ -24,6 +14,6 @@ /** | ||
* @param requestConfig | ||
* @param config | ||
* @param additionalHeaders | ||
*/ | ||
post<ResponseModel>(url: string, data: any, requestConfig?: RequestConfig, config?: InternalHttpClientConfig): ODataResponse<ResponseModel>; | ||
get<ResponseModel>(url: string, requestConfig?: RequestConfig, config?: InternalHttpClientConfig): ODataResponse<ResponseModel>; | ||
post<ResponseModel>(url: string, data: any, requestConfig?: RequestConfig, additionalHeaders?: Record<string, string>): ODataResponse<ResponseModel>; | ||
get<ResponseModel>(url: string, requestConfig?: RequestConfig, additionalHeaders?: Record<string, string>): ODataResponse<ResponseModel>; | ||
/** | ||
@@ -35,5 +25,5 @@ * Replace a model. | ||
* @param requestConfig | ||
* @param config | ||
* @param additionalHeaders | ||
*/ | ||
put<ResponseModel>(url: string, data: any, requestConfig?: RequestConfig, config?: InternalHttpClientConfig): ODataResponse<ResponseModel>; | ||
put<ResponseModel>(url: string, data: any, requestConfig?: RequestConfig, additionalHeaders?: Record<string, string>): ODataResponse<ResponseModel>; | ||
/** | ||
@@ -45,5 +35,5 @@ * Partially update a model. | ||
* @param requestConfig | ||
* @param config | ||
* @param additionalHeaders | ||
*/ | ||
patch<ResponseModel>(url: string, data: any, requestConfig?: RequestConfig, config?: InternalHttpClientConfig): ODataResponse<ResponseModel>; | ||
patch<ResponseModel>(url: string, data: any, requestConfig?: RequestConfig, additionalHeaders?: Record<string, string>): ODataResponse<ResponseModel>; | ||
/** | ||
@@ -54,5 +44,5 @@ * Delete a model or collection. | ||
* @param requestConfig | ||
* @param config | ||
* @param additionalHeaders | ||
*/ | ||
delete(url: string, requestConfig?: RequestConfig, config?: InternalHttpClientConfig): ODataResponse<void>; | ||
delete(url: string, requestConfig?: RequestConfig, additionalHeaders?: Record<string, string>): ODataResponse<void>; | ||
} |
{ | ||
"name": "@odata2ts/http-client-api", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"publishConfig": { | ||
@@ -42,3 +42,3 @@ "access": "public" | ||
"types": "./lib/index.d.ts", | ||
"gitHead": "67c7fc10f25461c33baf4e35694a457a03b81b78" | ||
"gitHead": "0886c9e292a84560001d4c4e4503babf3809e1d7" | ||
} |
Sorry, the diff of this file is not supported yet
13118
-2.3%84
-10.64%