@companix/utils-js 0.0.19 → 0.0.20
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/dist/http-api.d.ts +2 -2
- package/package.json +1 -1
package/dist/http-api.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ export type IOpattern<T extends IOpattern<T>> = {
|
|
|
5
5
|
answer: T[key]['answer'];
|
|
6
6
|
};
|
|
7
7
|
};
|
|
8
|
-
export declare class HttpAPI
|
|
8
|
+
export declare class HttpAPI {
|
|
9
9
|
http: AxiosInstance;
|
|
10
10
|
constructor(config: CreateAxiosDefaults);
|
|
11
11
|
private request;
|
|
12
|
-
createClient(context?: string): {
|
|
12
|
+
createClient<T extends IOpattern<T>>(context?: string): {
|
|
13
13
|
post<K extends keyof T>(url: K, body: T[K]["params"], config?: AxiosRequestConfig): Promise<T[K]["answer"]>;
|
|
14
14
|
get<K extends keyof T>(url: K, body: T[K]["params"], config?: AxiosRequestConfig): Promise<T[K]["answer"]>;
|
|
15
15
|
blob<K extends keyof T>(url: K, body: T[K]["params"]): Promise<Blob>;
|