@botpress/api 0.67.1 → 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 +45 -50
- package/dist/src/gen/state.d.ts +30 -36
- package/package.json +2 -2
- package/src/gen/openapi.json +1 -1
- package/src/gen/state.ts +35 -44
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
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,
|
|
@@ -292533,24 +292537,6 @@ var state = {
|
|
|
292533
292537
|
"description": "Conversation object configuration",
|
|
292534
292538
|
"additionalProperties": false
|
|
292535
292539
|
},
|
|
292536
|
-
"code": {
|
|
292537
|
-
"type": "object",
|
|
292538
|
-
"properties": {
|
|
292539
|
-
"node": {
|
|
292540
|
-
"type": "string",
|
|
292541
|
-
"description": "Code of plugin bundled for Node.JS"
|
|
292542
|
-
},
|
|
292543
|
-
"browser": {
|
|
292544
|
-
"type": "string",
|
|
292545
|
-
"description": "Code of plugin bundled for the browser"
|
|
292546
|
-
}
|
|
292547
|
-
},
|
|
292548
|
-
"required": [
|
|
292549
|
-
"node",
|
|
292550
|
-
"browser"
|
|
292551
|
-
],
|
|
292552
|
-
"additionalProperties": false
|
|
292553
|
-
},
|
|
292554
292540
|
"dependencies": {
|
|
292555
292541
|
"type": "object",
|
|
292556
292542
|
"properties": {
|
|
@@ -292586,6 +292572,24 @@ var state = {
|
|
|
292586
292572
|
}
|
|
292587
292573
|
},
|
|
292588
292574
|
"additionalProperties": false
|
|
292575
|
+
},
|
|
292576
|
+
"code": {
|
|
292577
|
+
"type": "object",
|
|
292578
|
+
"properties": {
|
|
292579
|
+
"node": {
|
|
292580
|
+
"type": "string",
|
|
292581
|
+
"description": "Code of plugin bundled for Node.JS"
|
|
292582
|
+
},
|
|
292583
|
+
"browser": {
|
|
292584
|
+
"type": "string",
|
|
292585
|
+
"description": "Code of plugin bundled for the browser"
|
|
292586
|
+
}
|
|
292587
|
+
},
|
|
292588
|
+
"required": [
|
|
292589
|
+
"node",
|
|
292590
|
+
"browser"
|
|
292591
|
+
],
|
|
292592
|
+
"additionalProperties": false
|
|
292589
292593
|
}
|
|
292590
292594
|
},
|
|
292591
292595
|
"required": [
|
|
@@ -292902,24 +292906,6 @@ var state = {
|
|
|
292902
292906
|
],
|
|
292903
292907
|
"additionalProperties": false
|
|
292904
292908
|
},
|
|
292905
|
-
"code": {
|
|
292906
|
-
"type": "object",
|
|
292907
|
-
"properties": {
|
|
292908
|
-
"node": {
|
|
292909
|
-
"type": "string",
|
|
292910
|
-
"description": "Code of plugin bundled for Node.JS"
|
|
292911
|
-
},
|
|
292912
|
-
"browser": {
|
|
292913
|
-
"type": "string",
|
|
292914
|
-
"description": "Code of plugin bundled for the browser"
|
|
292915
|
-
}
|
|
292916
|
-
},
|
|
292917
|
-
"required": [
|
|
292918
|
-
"node",
|
|
292919
|
-
"browser"
|
|
292920
|
-
],
|
|
292921
|
-
"additionalProperties": false
|
|
292922
|
-
},
|
|
292923
292909
|
"dependencies": {
|
|
292924
292910
|
"type": "object",
|
|
292925
292911
|
"properties": {
|
|
@@ -292957,6 +292943,20 @@ var state = {
|
|
|
292957
292943
|
}
|
|
292958
292944
|
},
|
|
292959
292945
|
"additionalProperties": false
|
|
292946
|
+
},
|
|
292947
|
+
"code": {
|
|
292948
|
+
"type": "object",
|
|
292949
|
+
"properties": {
|
|
292950
|
+
"node": {
|
|
292951
|
+
"type": "string",
|
|
292952
|
+
"description": "Code of plugin bundled for Node.JS"
|
|
292953
|
+
},
|
|
292954
|
+
"browser": {
|
|
292955
|
+
"type": "string",
|
|
292956
|
+
"description": "Code of plugin bundled for the browser"
|
|
292957
|
+
}
|
|
292958
|
+
},
|
|
292959
|
+
"additionalProperties": false
|
|
292960
292960
|
}
|
|
292961
292961
|
},
|
|
292962
292962
|
"title": "updatePluginBody",
|
|
@@ -293094,15 +293094,10 @@ var state = {
|
|
|
293094
293094
|
"path": "/v1/admin/plugins/{id}/code/{platform}",
|
|
293095
293095
|
"section": "plugin",
|
|
293096
293096
|
"parameters": {
|
|
293097
|
-
"nextToken": {
|
|
293098
|
-
"in": "query",
|
|
293099
|
-
"description": "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
|
|
293100
|
-
"type": "string"
|
|
293101
|
-
},
|
|
293102
293097
|
"id": {
|
|
293103
|
-
"in": "path",
|
|
293104
293098
|
"type": "string",
|
|
293105
|
-
"description": "
|
|
293099
|
+
"description": "Bot ID",
|
|
293100
|
+
"in": "path"
|
|
293106
293101
|
},
|
|
293107
293102
|
"platform": {
|
|
293108
293103
|
"in": "path",
|
|
@@ -296134,7 +296129,7 @@ var state = {
|
|
|
296134
296129
|
"title": "Botpress API",
|
|
296135
296130
|
"description": "API for Botpress Cloud",
|
|
296136
296131
|
"server": "https://api.botpress.cloud",
|
|
296137
|
-
"version": "0.
|
|
296132
|
+
"version": "0.68.1",
|
|
296138
296133
|
"prefix": "v1"
|
|
296139
296134
|
},
|
|
296140
296135
|
"errors": [
|
package/dist/src/gen/state.d.ts
CHANGED
|
@@ -9267,21 +9267,6 @@ export declare const state: {
|
|
|
9267
9267
|
description: string;
|
|
9268
9268
|
additionalProperties: false;
|
|
9269
9269
|
};
|
|
9270
|
-
code: {
|
|
9271
|
-
type: "object";
|
|
9272
|
-
properties: {
|
|
9273
|
-
node: {
|
|
9274
|
-
type: "string";
|
|
9275
|
-
description: string;
|
|
9276
|
-
};
|
|
9277
|
-
browser: {
|
|
9278
|
-
type: "string";
|
|
9279
|
-
description: string;
|
|
9280
|
-
};
|
|
9281
|
-
};
|
|
9282
|
-
required: string[];
|
|
9283
|
-
additionalProperties: false;
|
|
9284
|
-
};
|
|
9285
9270
|
dependencies: {
|
|
9286
9271
|
type: "object";
|
|
9287
9272
|
properties: {
|
|
@@ -9314,6 +9299,21 @@ export declare const state: {
|
|
|
9314
9299
|
};
|
|
9315
9300
|
additionalProperties: false;
|
|
9316
9301
|
};
|
|
9302
|
+
code: {
|
|
9303
|
+
type: "object";
|
|
9304
|
+
properties: {
|
|
9305
|
+
node: {
|
|
9306
|
+
type: "string";
|
|
9307
|
+
description: string;
|
|
9308
|
+
};
|
|
9309
|
+
browser: {
|
|
9310
|
+
type: "string";
|
|
9311
|
+
description: string;
|
|
9312
|
+
};
|
|
9313
|
+
};
|
|
9314
|
+
required: string[];
|
|
9315
|
+
additionalProperties: false;
|
|
9316
|
+
};
|
|
9317
9317
|
};
|
|
9318
9318
|
required: string[];
|
|
9319
9319
|
title: string;
|
|
@@ -9596,21 +9596,6 @@ export declare const state: {
|
|
|
9596
9596
|
required: string[];
|
|
9597
9597
|
additionalProperties: false;
|
|
9598
9598
|
};
|
|
9599
|
-
code: {
|
|
9600
|
-
type: "object";
|
|
9601
|
-
properties: {
|
|
9602
|
-
node: {
|
|
9603
|
-
type: "string";
|
|
9604
|
-
description: string;
|
|
9605
|
-
};
|
|
9606
|
-
browser: {
|
|
9607
|
-
type: "string";
|
|
9608
|
-
description: string;
|
|
9609
|
-
};
|
|
9610
|
-
};
|
|
9611
|
-
required: string[];
|
|
9612
|
-
additionalProperties: false;
|
|
9613
|
-
};
|
|
9614
9599
|
dependencies: {
|
|
9615
9600
|
type: "object";
|
|
9616
9601
|
properties: {
|
|
@@ -9645,6 +9630,20 @@ export declare const state: {
|
|
|
9645
9630
|
};
|
|
9646
9631
|
additionalProperties: false;
|
|
9647
9632
|
};
|
|
9633
|
+
code: {
|
|
9634
|
+
type: "object";
|
|
9635
|
+
properties: {
|
|
9636
|
+
node: {
|
|
9637
|
+
type: "string";
|
|
9638
|
+
description: string;
|
|
9639
|
+
};
|
|
9640
|
+
browser: {
|
|
9641
|
+
type: "string";
|
|
9642
|
+
description: string;
|
|
9643
|
+
};
|
|
9644
|
+
};
|
|
9645
|
+
additionalProperties: false;
|
|
9646
|
+
};
|
|
9648
9647
|
};
|
|
9649
9648
|
title: string;
|
|
9650
9649
|
additionalProperties: false;
|
|
@@ -9770,15 +9769,10 @@ export declare const state: {
|
|
|
9770
9769
|
path: string;
|
|
9771
9770
|
section: "plugin";
|
|
9772
9771
|
parameters: {
|
|
9773
|
-
nextToken: {
|
|
9774
|
-
in: "query";
|
|
9775
|
-
description: string;
|
|
9776
|
-
type: "string";
|
|
9777
|
-
};
|
|
9778
9772
|
id: {
|
|
9779
|
-
in: "path";
|
|
9780
9773
|
type: "string";
|
|
9781
9774
|
description: string;
|
|
9775
|
+
in: "path";
|
|
9782
9776
|
};
|
|
9783
9777
|
platform: {
|
|
9784
9778
|
in: "path";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botpress/api",
|
|
3
|
-
"version": "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.
|
|
26
|
+
"@bpinternal/opapi": "0.12.1"
|
|
27
27
|
}
|
|
28
28
|
}
|