@koine/api 1.0.93 → 1.0.95

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/createApi.js CHANGED
@@ -47,7 +47,7 @@ export var createApi = function (apiName, baseUrl, options) {
47
47
  }
48
48
  }
49
49
  timeoutNumber = Number(timeout);
50
- if (method !== "get" && json) {
50
+ if (json) {
51
51
  requestInit.body = JSON.stringify(json);
52
52
  }
53
53
  if (timeoutNumber > 0) {
package/node/createApi.js CHANGED
@@ -50,7 +50,7 @@ var createApi = function (apiName, baseUrl, options) {
50
50
  }
51
51
  }
52
52
  timeoutNumber = Number(timeout);
53
- if (method !== "get" && json) {
53
+ if (json) {
54
54
  requestInit.body = JSON.stringify(json);
55
55
  }
56
56
  if (timeoutNumber > 0) {
package/package.json CHANGED
@@ -4,14 +4,14 @@
4
4
  "main": "./node/index.js",
5
5
  "typings": "./index.d.ts",
6
6
  "dependencies": {
7
- "@koine/utils": "1.0.93",
7
+ "@koine/utils": "1.0.95",
8
8
  "ts-debounce": "^4.0.0",
9
9
  "swr": "^2.0.0-beta.6",
10
10
  "next": "^12.3.1",
11
11
  "tslib": "^2.4.0"
12
12
  },
13
13
  "peerDependencies": {},
14
- "version": "1.0.93",
14
+ "version": "1.0.95",
15
15
  "module": "./index.js",
16
16
  "types": "./index.d.ts"
17
17
  }
package/typings.d.ts CHANGED
@@ -258,26 +258,9 @@ declare namespace Koine.Api {
258
258
  query?: TQuery;
259
259
  /**
260
260
  * JSON request body
261
- *
262
- * FIXME: this should be `undefined` with `get` request mehod
263
261
  */
264
262
  json?: TJson;
265
263
  };
266
- // } & ([TMethod] extends ["get"]
267
- // ? {
268
- // /**
269
- // * JSON request body
270
- // */
271
- // json?: TJson;
272
- // }
273
- // : {
274
- // /**
275
- // * JSON request body
276
- // *
277
- // * @default {}
278
- // */
279
- // json?: TJson;
280
- // });
281
264
 
282
265
  //////////////////////////////////////////////////////////////////////////////
283
266
  //