@botpress/api 0.68.0 → 0.68.1

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/index.js CHANGED
@@ -268177,7 +268177,7 @@ __export(src_exports, {
268177
268177
  });
268178
268178
  module.exports = __toCommonJS(src_exports);
268179
268179
 
268180
- // ../../node_modules/.pnpm/@bpinternal+opapi@0.12.0_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
268180
+ // ../../node_modules/.pnpm/@bpinternal+opapi@0.12.1_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
268181
268181
  var import_zod_openapi = __toESM(require_src(), 1);
268182
268182
  var import_zod_openapi2 = __toESM(require_src(), 1);
268183
268183
  var import_path = __toESM(require("path"), 1);
@@ -268223,7 +268223,7 @@ var title = (str2) => {
268223
268223
  return str2.split(/(?=[A-Z])|[\.\-\s_]/).map((s2) => s2.trim()).filter((s2) => !!s2).map((s2) => capitalize(s2.toLowerCase())).join(" ");
268224
268224
  };
268225
268225
 
268226
- // ../../node_modules/.pnpm/@bpinternal+opapi@0.12.0_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
268226
+ // ../../node_modules/.pnpm/@bpinternal+opapi@0.12.1_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
268227
268227
  var import_decompress = __toESM(require_decompress(), 1);
268228
268228
  var import_fs3 = __toESM(require("fs"), 1);
268229
268229
  var import_promises = __toESM(require("fs/promises"), 1);
@@ -271459,7 +271459,7 @@ var {
271459
271459
  mergeConfig: mergeConfig2
271460
271460
  } = axios_default;
271461
271461
 
271462
- // ../../node_modules/.pnpm/@bpinternal+opapi@0.12.0_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
271462
+ // ../../node_modules/.pnpm/@bpinternal+opapi@0.12.1_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
271463
271463
  var import_json_schema_to_typescript = __toESM(require_src3(), 1);
271464
271464
  var import_fs4 = __toESM(require("fs"), 1);
271465
271465
  var import_path3 = __toESM(require("path"), 1);
@@ -275795,7 +275795,7 @@ async function openapiTS(schema3, options = {}) {
275795
275795
  }
275796
275796
  var dist_default = openapiTS;
275797
275797
 
275798
- // ../../node_modules/.pnpm/@bpinternal+opapi@0.12.0_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
275798
+ // ../../node_modules/.pnpm/@bpinternal+opapi@0.12.1_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
275799
275799
  var import_openapi3_ts = __toESM(require_dist3(), 1);
275800
275800
  var import_verror2 = __toESM(require_verror(), 1);
275801
275801
  var import_verror3 = __toESM(require_verror(), 1);
@@ -279436,7 +279436,7 @@ var z = /* @__PURE__ */ Object.freeze({
279436
279436
  ZodError
279437
279437
  });
279438
279438
 
279439
- // ../../node_modules/.pnpm/@bpinternal+opapi@0.12.0_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
279439
+ // ../../node_modules/.pnpm/@bpinternal+opapi@0.12.1_openapi-types@12.1.3/node_modules/@bpinternal/opapi/dist/index.mjs
279440
279440
  var import_openapi_parser = __toESM(require_lib9(), 1);
279441
279441
  var import_json_schema_to_typescript2 = __toESM(require_src3(), 1);
279442
279442
  var import_zod_openapi4 = __toESM(require_src(), 1);
@@ -280286,7 +280286,7 @@ export type ParsedRequest = {
280286
280286
  const isDefined = <T>(pair: [string, T | undefined]): pair is [string, T] => pair[1] !== undefined
280287
280287
 
280288
280288
  export const toAxiosRequest = (req: ParsedRequest): AxiosRequestConfig => {
280289
- const { method, path, query, headers: headerParams, body: data } = req
280289
+ const { method, path, query, headers: headerParams, body } = req
280290
280290
 
280291
280291
  // prepare headers
280292
280292
  const headerEntries: [string, string][] = Object.entries(headerParams).filter(isDefined)
@@ -280296,6 +280296,10 @@ export const toAxiosRequest = (req: ParsedRequest): AxiosRequestConfig => {
280296
280296
  const queryString = qs.stringify(query, { encode: true, arrayFormat: 'repeat', allowDots: true })
280297
280297
 
280298
280298
  const url = queryString ? [path, queryString].join('?') : path
280299
+ const data =
280300
+ ['put', 'post', 'delete', 'patch'].includes(method.toLowerCase())
280301
+ ? body
280302
+ : undefined
280299
280303
 
280300
280304
  return {
280301
280305
  method,
@@ -296125,7 +296129,7 @@ var state = {
296125
296129
  "title": "Botpress API",
296126
296130
  "description": "API for Botpress Cloud",
296127
296131
  "server": "https://api.botpress.cloud",
296128
- "version": "0.68.0",
296132
+ "version": "0.68.1",
296129
296133
  "prefix": "v1"
296130
296134
  },
296131
296135
  "errors": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@botpress/api",
3
- "version": "0.68.0",
3
+ "version": "0.68.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "scripts": {
@@ -23,6 +23,6 @@
23
23
  "zod": "^3.22.4"
24
24
  },
25
25
  "dependencies": {
26
- "@bpinternal/opapi": "0.12.0"
26
+ "@bpinternal/opapi": "0.12.1"
27
27
  }
28
28
  }