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.
@@ -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
- export interface IDocHubProtocolRequestConfig extends AxiosRequestConfig {
34
- decoder?: FDocHubProtocolResponseDecoder; // Декодировщик ответа
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
  * Тип ресурса
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dochub-sdk",
3
- "version": "0.1.240",
3
+ "version": "0.1.241",
4
4
  "description": "The DocHub System Development Kit.",
5
5
  "private": false,
6
6
  "main": "index.ts",