@aracna/telegram-bot 1.9.3 → 1.9.4

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 { API as CoreAPI, APIConfig, FetchError, RequestMethod } from '@aracna/core';
1
+ import { APIConfig, API as CoreAPI, FetchError, RequestMethod } from '@aracna/core';
2
2
  export declare class API extends CoreAPI {
3
3
  post<V, W, X = undefined>(path: string, body?: W, config?: APIConfig<void>): Promise<V | FetchError<X>>;
4
4
  transformBody<V>(method: RequestMethod, path: string, body: V, config: APIConfig<void>): Promise<FormData>;
package/modules/api.js CHANGED
@@ -5,15 +5,15 @@ const core_1 = require("@aracna/core");
5
5
  class API extends core_1.API {
6
6
  async post(path, body, config) {
7
7
  let response;
8
- response = await this.handle(core_1.RequestMethod.POST, path, body, config);
8
+ response = await this.handle('POST', path, body, config);
9
9
  if (response instanceof Error)
10
10
  return response;
11
11
  return response.data.result;
12
12
  }
13
13
  async transformBody(method, path, body, config) {
14
14
  switch (method) {
15
- case core_1.RequestMethod.GET:
16
- case core_1.RequestMethod.POST:
15
+ case 'GET':
16
+ case 'POST':
17
17
  await core_1.Polyfill.blob();
18
18
  await core_1.Polyfill.file();
19
19
  await core_1.Polyfill.formData();
package/package.json CHANGED
@@ -24,5 +24,5 @@
24
24
  "tarball": "yarn version && cp LICENSE package.json README.md dist/. && cd dist && yarn pack",
25
25
  "deploy": "yarn test && yarn build && yarn tarball && yarn publish dist/*.tgz && git push"
26
26
  },
27
- "version": "1.9.3"
27
+ "version": "1.9.4"
28
28
  }