@odata2ts/http-client-api 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [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)
7
+
8
+ **Note:** Version bump only for package @odata2ts/http-client-api
9
+
6
10
  # [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)
7
11
 
8
12
  ### Code Refactoring
@@ -3,16 +3,6 @@ import { ODataResponse } from "./ODataResponseModel";
3
3
  * Retrieves the configuration type for the given HTTP client.
4
4
  */
5
5
  export type ODataHttpClientConfig<ClientType extends ODataHttpClient> = ClientType extends ODataHttpClient<infer Config> ? Config : never;
6
- export interface InternalHttpClientConfig {
7
- /**
8
- * Additional headers set internally by services or HttpClient implementation.
9
- */
10
- headers?: Record<string, string>;
11
- /**
12
- * Very special option needed for FetchClient to not evaluate the response body in certain situations.
13
- */
14
- noBodyEvaluation?: boolean;
15
- }
16
6
  export interface ODataHttpClient<RequestConfig = any> {
17
7
  /**
18
8
  * Create a model or collection entry.
@@ -20,34 +10,34 @@ export interface ODataHttpClient<RequestConfig = any> {
20
10
  * @param url
21
11
  * @param data
22
12
  * @param requestConfig
23
- * @param config
13
+ * @param additionalHeaders
24
14
  */
25
- post<ResponseModel>(url: string, data: any, requestConfig?: RequestConfig, config?: InternalHttpClientConfig): ODataResponse<ResponseModel>;
26
- get<ResponseModel>(url: string, requestConfig?: RequestConfig, config?: InternalHttpClientConfig): ODataResponse<ResponseModel>;
15
+ post<ResponseModel>(url: string, data: any, requestConfig?: RequestConfig, additionalHeaders?: Record<string, string>): ODataResponse<ResponseModel>;
16
+ get<ResponseModel>(url: string, requestConfig?: RequestConfig, additionalHeaders?: Record<string, string>): ODataResponse<ResponseModel>;
27
17
  /**
28
18
  * Replace a model.
29
19
  *
30
20
  * @param url
31
21
  * @param data
32
22
  * @param requestConfig
33
- * @param config
23
+ * @param additionalHeaders
34
24
  */
35
- put<ResponseModel>(url: string, data: any, requestConfig?: RequestConfig, config?: InternalHttpClientConfig): ODataResponse<ResponseModel>;
25
+ put<ResponseModel>(url: string, data: any, requestConfig?: RequestConfig, additionalHeaders?: Record<string, string>): ODataResponse<ResponseModel>;
36
26
  /**
37
27
  * Partially update a model.
38
28
  *
39
29
  * @param url
40
30
  * @param data
41
31
  * @param requestConfig
42
- * @param config
32
+ * @param additionalHeaders
43
33
  */
44
- patch<ResponseModel>(url: string, data: any, requestConfig?: RequestConfig, config?: InternalHttpClientConfig): ODataResponse<ResponseModel>;
34
+ patch<ResponseModel>(url: string, data: any, requestConfig?: RequestConfig, additionalHeaders?: Record<string, string>): ODataResponse<ResponseModel>;
45
35
  /**
46
36
  * Delete a model or collection.
47
37
  *
48
38
  * @param url
49
39
  * @param requestConfig
50
- * @param config
40
+ * @param additionalHeaders
51
41
  */
52
- delete(url: string, requestConfig?: RequestConfig, config?: InternalHttpClientConfig): ODataResponse<void>;
42
+ delete(url: string, requestConfig?: RequestConfig, additionalHeaders?: Record<string, string>): ODataResponse<void>;
53
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ODataHttpClient.js","sourceRoot":"","sources":["../src/ODataHttpClient.ts"],"names":[],"mappings":"","sourcesContent":["import { ODataResponse } from \"./ODataResponseModel\";\r\n\r\n/**\r\n * Retrieves the configuration type for the given HTTP client.\r\n */\r\nexport type ODataHttpClientConfig<ClientType extends ODataHttpClient> = ClientType extends ODataHttpClient<infer Config>\r\n ? Config\r\n : never;\r\n\r\nexport interface InternalHttpClientConfig {\r\n /**\r\n * Additional headers set internally by services or HttpClient implementation.\r\n */\r\n headers?: Record<string, string>;\r\n /**\r\n * Very special option needed for FetchClient to not evaluate the response body in certain situations.\r\n */\r\n noBodyEvaluation?: boolean;\r\n}\r\n\r\nexport interface ODataHttpClient<RequestConfig = any> {\r\n /**\r\n * Create a model or collection entry.\r\n *\r\n * @param url\r\n * @param data\r\n * @param requestConfig\r\n * @param config\r\n */\r\n post<ResponseModel>(\r\n url: string,\r\n data: any,\r\n requestConfig?: RequestConfig,\r\n config?: InternalHttpClientConfig\r\n ): ODataResponse<ResponseModel>;\r\n\r\n get<ResponseModel>(\r\n url: string,\r\n requestConfig?: RequestConfig,\r\n config?: InternalHttpClientConfig\r\n ): ODataResponse<ResponseModel>;\r\n\r\n /**\r\n * Replace a model.\r\n *\r\n * @param url\r\n * @param data\r\n * @param requestConfig\r\n * @param config\r\n */\r\n put<ResponseModel>(\r\n url: string,\r\n data: any,\r\n requestConfig?: RequestConfig,\r\n config?: InternalHttpClientConfig\r\n ): ODataResponse<ResponseModel>;\r\n\r\n /**\r\n * Partially update a model.\r\n *\r\n * @param url\r\n * @param data\r\n * @param requestConfig\r\n * @param config\r\n */\r\n patch<ResponseModel>(\r\n url: string,\r\n data: any,\r\n requestConfig?: RequestConfig,\r\n config?: InternalHttpClientConfig\r\n ): ODataResponse<ResponseModel>;\r\n\r\n /**\r\n * Delete a model or collection.\r\n *\r\n * @param url\r\n * @param requestConfig\r\n * @param config\r\n */\r\n delete(url: string, requestConfig?: RequestConfig, config?: InternalHttpClientConfig): ODataResponse<void>;\r\n}\r\n"]}
1
+ {"version":3,"file":"ODataHttpClient.js","sourceRoot":"","sources":["../src/ODataHttpClient.ts"],"names":[],"mappings":"","sourcesContent":["import { ODataResponse } from \"./ODataResponseModel\";\r\n\r\n/**\r\n * Retrieves the configuration type for the given HTTP client.\r\n */\r\nexport type ODataHttpClientConfig<ClientType extends ODataHttpClient> = ClientType extends ODataHttpClient<infer Config>\r\n ? Config\r\n : never;\r\n\r\nexport interface ODataHttpClient<RequestConfig = any> {\r\n /**\r\n * Create a model or collection entry.\r\n *\r\n * @param url\r\n * @param data\r\n * @param requestConfig\r\n * @param additionalHeaders\r\n */\r\n post<ResponseModel>(\r\n url: string,\r\n data: any,\r\n requestConfig?: RequestConfig,\r\n additionalHeaders?: Record<string, string>\r\n ): ODataResponse<ResponseModel>;\r\n\r\n get<ResponseModel>(\r\n url: string,\r\n requestConfig?: RequestConfig,\r\n additionalHeaders?: Record<string, string>\r\n ): ODataResponse<ResponseModel>;\r\n\r\n /**\r\n * Replace a model.\r\n *\r\n * @param url\r\n * @param data\r\n * @param requestConfig\r\n * @param additionalHeaders\r\n */\r\n put<ResponseModel>(\r\n url: string,\r\n data: any,\r\n requestConfig?: RequestConfig,\r\n additionalHeaders?: Record<string, string>\r\n ): ODataResponse<ResponseModel>;\r\n\r\n /**\r\n * Partially update a model.\r\n *\r\n * @param url\r\n * @param data\r\n * @param requestConfig\r\n * @param additionalHeaders\r\n */\r\n patch<ResponseModel>(\r\n url: string,\r\n data: any,\r\n requestConfig?: RequestConfig,\r\n additionalHeaders?: Record<string, string>\r\n ): ODataResponse<ResponseModel>;\r\n\r\n /**\r\n * Delete a model or collection.\r\n *\r\n * @param url\r\n * @param requestConfig\r\n * @param additionalHeaders\r\n */\r\n delete(url: string, requestConfig?: RequestConfig, additionalHeaders?: Record<string, string>): ODataResponse<void>;\r\n}\r\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odata2ts/http-client-api",
3
- "version": "0.5.0",
3
+ "version": "0.5.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -39,5 +39,5 @@
39
39
  "typescript": "5.0.4"
40
40
  },
41
41
  "types": "./lib/index.d.ts",
42
- "gitHead": "67c7fc10f25461c33baf4e35694a457a03b81b78"
42
+ "gitHead": "0886c9e292a84560001d4c4e4503babf3809e1d7"
43
43
  }