dochub-sdk 0.1.240 → 0.1.241
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/interfaces/protocols.ts +6 -4
- package/package.json +1 -1
package/interfaces/protocols.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { AxiosResponse, AxiosRequestConfig, ResponseType } from 'axios';
|
1
|
+
import { AxiosResponse, AxiosRequestConfig, ResponseType, Method } from 'axios';
|
2
2
|
import { IDocHubContext } from './contexts';
|
3
3
|
|
4
4
|
export enum ProtocolOptionsResponseTypes {
|
@@ -30,9 +30,11 @@ export interface IDocHubProtocolResponse extends AxiosResponse {
|
|
30
30
|
export type FDocHubProtocolResponseDecoder = (response: IDocHubProtocolResponse, options?: IProtocolResponseOptions) => Promise<IDocHubProtocolResponse>;
|
31
31
|
|
32
32
|
// Прослойка интерфейсов Axios для последующей кастомизации и поддержания совместимости
|
33
|
-
|
34
|
-
|
35
|
-
|
33
|
+
type Modify<T, R> = Omit<T, keyof R> & R;
|
34
|
+
export interface IDocHubProtocolRequestConfig extends Modify<AxiosRequestConfig, {
|
35
|
+
decoder?: FDocHubProtocolResponseDecoder; // Декодировщик ответа
|
36
|
+
method: Method | DocHubProtocolMethods // Метод запроса
|
37
|
+
}>{};
|
36
38
|
|
37
39
|
/**
|
38
40
|
* Тип ресурса
|