@botpress/api 0.15.0 → 0.15.3
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/gen/state.d.ts +36 -0
- package/dist/index.js +63 -7
- package/package.json +2 -2
- package/src/gen/openapi.json +1 -1
- package/src/gen/state.ts +45 -1
package/dist/gen/state.d.ts
CHANGED
|
@@ -2286,6 +2286,12 @@ export declare const state: {
|
|
|
2286
2286
|
method: "get";
|
|
2287
2287
|
path: string;
|
|
2288
2288
|
parameters: {
|
|
2289
|
+
dev: {
|
|
2290
|
+
in: "query";
|
|
2291
|
+
description: string;
|
|
2292
|
+
type: "boolean";
|
|
2293
|
+
required: false;
|
|
2294
|
+
};
|
|
2289
2295
|
nextToken: {
|
|
2290
2296
|
in: "query";
|
|
2291
2297
|
description: string;
|
|
@@ -3138,6 +3144,10 @@ export declare const state: {
|
|
|
3138
3144
|
type: "string";
|
|
3139
3145
|
enum: string[];
|
|
3140
3146
|
};
|
|
3147
|
+
billingVersion: {
|
|
3148
|
+
type: "string";
|
|
3149
|
+
enum: string[];
|
|
3150
|
+
};
|
|
3141
3151
|
plan: {
|
|
3142
3152
|
type: "string";
|
|
3143
3153
|
enum: string[];
|
|
@@ -3199,6 +3209,10 @@ export declare const state: {
|
|
|
3199
3209
|
type: "string";
|
|
3200
3210
|
enum: string[];
|
|
3201
3211
|
};
|
|
3212
|
+
billingVersion: {
|
|
3213
|
+
type: "string";
|
|
3214
|
+
enum: string[];
|
|
3215
|
+
};
|
|
3202
3216
|
plan: {
|
|
3203
3217
|
type: "string";
|
|
3204
3218
|
enum: string[];
|
|
@@ -3443,6 +3457,10 @@ export declare const state: {
|
|
|
3443
3457
|
type: "string";
|
|
3444
3458
|
enum: string[];
|
|
3445
3459
|
};
|
|
3460
|
+
billingVersion: {
|
|
3461
|
+
type: "string";
|
|
3462
|
+
enum: string[];
|
|
3463
|
+
};
|
|
3446
3464
|
plan: {
|
|
3447
3465
|
type: "string";
|
|
3448
3466
|
enum: string[];
|
|
@@ -3508,6 +3526,10 @@ export declare const state: {
|
|
|
3508
3526
|
type: "string";
|
|
3509
3527
|
enum: string[];
|
|
3510
3528
|
};
|
|
3529
|
+
billingVersion: {
|
|
3530
|
+
type: "string";
|
|
3531
|
+
enum: string[];
|
|
3532
|
+
};
|
|
3511
3533
|
plan: {
|
|
3512
3534
|
type: "string";
|
|
3513
3535
|
enum: string[];
|
|
@@ -3598,6 +3620,10 @@ export declare const state: {
|
|
|
3598
3620
|
type: "string";
|
|
3599
3621
|
enum: string[];
|
|
3600
3622
|
};
|
|
3623
|
+
billingVersion: {
|
|
3624
|
+
type: "string";
|
|
3625
|
+
enum: string[];
|
|
3626
|
+
};
|
|
3601
3627
|
plan: {
|
|
3602
3628
|
type: "string";
|
|
3603
3629
|
enum: string[];
|
|
@@ -4638,6 +4664,12 @@ export declare const state: {
|
|
|
4638
4664
|
description: string;
|
|
4639
4665
|
in: "query";
|
|
4640
4666
|
};
|
|
4667
|
+
dev: {
|
|
4668
|
+
in: "query";
|
|
4669
|
+
description: string;
|
|
4670
|
+
type: "boolean";
|
|
4671
|
+
required: false;
|
|
4672
|
+
};
|
|
4641
4673
|
};
|
|
4642
4674
|
response: {
|
|
4643
4675
|
description: string;
|
|
@@ -6085,6 +6117,10 @@ export declare const state: {
|
|
|
6085
6117
|
type: "string";
|
|
6086
6118
|
enum: string[];
|
|
6087
6119
|
};
|
|
6120
|
+
billingVersion: {
|
|
6121
|
+
type: "string";
|
|
6122
|
+
enum: string[];
|
|
6123
|
+
};
|
|
6088
6124
|
plan: {
|
|
6089
6125
|
type: "string";
|
|
6090
6126
|
enum: string[];
|
package/dist/index.js
CHANGED
|
@@ -259676,7 +259676,7 @@ __export(src_exports, {
|
|
|
259676
259676
|
});
|
|
259677
259677
|
module.exports = __toCommonJS(src_exports);
|
|
259678
259678
|
|
|
259679
|
-
// ../../node_modules/.pnpm/@bpinternal+opapi@0.6.
|
|
259679
|
+
// ../../node_modules/.pnpm/@bpinternal+opapi@0.6.2_openapi-types@12.1.0/node_modules/@bpinternal/opapi/dist/index.mjs
|
|
259680
259680
|
var import_zod_openapi = __toESM(require_src(), 1);
|
|
259681
259681
|
var import_zod_openapi2 = __toESM(require_src(), 1);
|
|
259682
259682
|
var import_chalk = __toESM(require_source(), 1);
|
|
@@ -259720,7 +259720,7 @@ var title = (str2) => {
|
|
|
259720
259720
|
return str2.split(/(?=[A-Z])|[\.\-\s_]/).map((s) => s.trim()).filter((s) => !!s).map((s) => capitalize(s.toLowerCase())).join(" ");
|
|
259721
259721
|
};
|
|
259722
259722
|
|
|
259723
|
-
// ../../node_modules/.pnpm/@bpinternal+opapi@0.6.
|
|
259723
|
+
// ../../node_modules/.pnpm/@bpinternal+opapi@0.6.2_openapi-types@12.1.0/node_modules/@bpinternal/opapi/dist/index.mjs
|
|
259724
259724
|
var import_decompress = __toESM(require_decompress(), 1);
|
|
259725
259725
|
var import_fs2 = __toESM(require("fs"), 1);
|
|
259726
259726
|
var import_promises = __toESM(require("fs/promises"), 1);
|
|
@@ -266709,7 +266709,7 @@ async function openapiTS(schema3, options = {}) {
|
|
|
266709
266709
|
}
|
|
266710
266710
|
var dist_default = openapiTS;
|
|
266711
266711
|
|
|
266712
|
-
// ../../node_modules/.pnpm/@bpinternal+opapi@0.6.
|
|
266712
|
+
// ../../node_modules/.pnpm/@bpinternal+opapi@0.6.2_openapi-types@12.1.0/node_modules/@bpinternal/opapi/dist/index.mjs
|
|
266713
266713
|
var import_zod_openapi3 = __toESM(require_src(), 1);
|
|
266714
266714
|
var import_openapi3_ts = __toESM(require_dist3(), 1);
|
|
266715
266715
|
var import_verror2 = __toESM(require_verror(), 1);
|
|
@@ -270304,7 +270304,7 @@ var z = /* @__PURE__ */ Object.freeze({
|
|
|
270304
270304
|
ZodError
|
|
270305
270305
|
});
|
|
270306
270306
|
|
|
270307
|
-
// ../../node_modules/.pnpm/@bpinternal+opapi@0.6.
|
|
270307
|
+
// ../../node_modules/.pnpm/@bpinternal+opapi@0.6.2_openapi-types@12.1.0/node_modules/@bpinternal/opapi/dist/index.mjs
|
|
270308
270308
|
var import_openapi_parser = __toESM(require_lib11(), 1);
|
|
270309
270309
|
var import_json_schema_to_typescript = __toESM(require_src3(), 1);
|
|
270310
270310
|
var import_zod_openapi4 = __toESM(require_src(), 1);
|
|
@@ -425457,6 +425457,9 @@ var generateTypeAnnotation = (parameter, required) => {
|
|
|
425457
425457
|
case "object":
|
|
425458
425458
|
typeAnnotation += " any";
|
|
425459
425459
|
break;
|
|
425460
|
+
case "boolean":
|
|
425461
|
+
typeAnnotation += " boolean";
|
|
425462
|
+
break;
|
|
425460
425463
|
default:
|
|
425461
425464
|
throw new Error(`Unsupported parameter type: ${parameterType}`);
|
|
425462
425465
|
}
|
|
@@ -425780,7 +425783,7 @@ abstract class BaseApiError<Code extends ErrorCode, Type extends string, Descrip
|
|
|
425780
425783
|
|
|
425781
425784
|
static generateId() {
|
|
425782
425785
|
const prefix = this.getPrefix();
|
|
425783
|
-
const timestamp = new Date().toISOString().replace(/[
|
|
425786
|
+
const timestamp = new Date().toISOString().replace(/[\\-:TZ]/g, "").split(".")[0] // UTC time in YYMMDDHHMMSS format
|
|
425784
425787
|
|
|
425785
425788
|
const randomSuffixByteLength = 4
|
|
425786
425789
|
const randomHexSuffix = Array.from(cryptoLib.getRandomValues(new Uint8Array(randomSuffixByteLength)))
|
|
@@ -426119,7 +426122,7 @@ var createOpenapi = (state2) => {
|
|
|
426119
426122
|
}
|
|
426120
426123
|
if (operationObject.parameters) {
|
|
426121
426124
|
objects.entries(operationObject.parameters).forEach(([parameterName, parameter]) => {
|
|
426122
|
-
var _a, _b, _c;
|
|
426125
|
+
var _a, _b, _c, _d;
|
|
426123
426126
|
const parameterType = parameter.type;
|
|
426124
426127
|
switch (parameterType) {
|
|
426125
426128
|
case "string":
|
|
@@ -426158,6 +426161,17 @@ var createOpenapi = (state2) => {
|
|
|
426158
426161
|
schema: parameter.schema
|
|
426159
426162
|
});
|
|
426160
426163
|
break;
|
|
426164
|
+
case "boolean":
|
|
426165
|
+
(_d = operation.parameters) == null ? void 0 : _d.push({
|
|
426166
|
+
name: parameterName,
|
|
426167
|
+
in: parameter.in,
|
|
426168
|
+
description: parameter.description,
|
|
426169
|
+
required: parameter.required,
|
|
426170
|
+
schema: {
|
|
426171
|
+
type: "boolean"
|
|
426172
|
+
}
|
|
426173
|
+
});
|
|
426174
|
+
break;
|
|
426161
426175
|
default:
|
|
426162
426176
|
throw new import_verror2.default(`Parameter type ${parameterType} is not supported`);
|
|
426163
426177
|
}
|
|
@@ -428995,6 +429009,12 @@ var state = {
|
|
|
428995
429009
|
method: "get",
|
|
428996
429010
|
path: "/v1/admin/bots",
|
|
428997
429011
|
parameters: {
|
|
429012
|
+
dev: {
|
|
429013
|
+
in: "query",
|
|
429014
|
+
description: "If true, only dev bots are returned. Otherwise, only production bots are returned.",
|
|
429015
|
+
type: "boolean",
|
|
429016
|
+
required: false
|
|
429017
|
+
},
|
|
428998
429018
|
nextToken: {
|
|
428999
429019
|
in: "query",
|
|
429000
429020
|
description: "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
|
|
@@ -429892,6 +429912,10 @@ var state = {
|
|
|
429892
429912
|
type: "string",
|
|
429893
429913
|
enum: ["free", "premium"]
|
|
429894
429914
|
},
|
|
429915
|
+
billingVersion: {
|
|
429916
|
+
type: "string",
|
|
429917
|
+
enum: ["v1", "v2"]
|
|
429918
|
+
},
|
|
429895
429919
|
plan: {
|
|
429896
429920
|
type: "string",
|
|
429897
429921
|
enum: ["community", "team", "enterprise"]
|
|
@@ -429911,6 +429935,7 @@ var state = {
|
|
|
429911
429935
|
"updatedAt",
|
|
429912
429936
|
"botCount",
|
|
429913
429937
|
"accountType",
|
|
429938
|
+
"billingVersion",
|
|
429914
429939
|
"plan",
|
|
429915
429940
|
"blocked",
|
|
429916
429941
|
"spendingLimit"
|
|
@@ -429964,6 +429989,10 @@ var state = {
|
|
|
429964
429989
|
type: "string",
|
|
429965
429990
|
enum: ["free", "premium"]
|
|
429966
429991
|
},
|
|
429992
|
+
billingVersion: {
|
|
429993
|
+
type: "string",
|
|
429994
|
+
enum: ["v1", "v2"]
|
|
429995
|
+
},
|
|
429967
429996
|
plan: {
|
|
429968
429997
|
type: "string",
|
|
429969
429998
|
enum: ["community", "team", "enterprise"]
|
|
@@ -429983,6 +430012,7 @@ var state = {
|
|
|
429983
430012
|
"updatedAt",
|
|
429984
430013
|
"botCount",
|
|
429985
430014
|
"accountType",
|
|
430015
|
+
"billingVersion",
|
|
429986
430016
|
"plan",
|
|
429987
430017
|
"blocked",
|
|
429988
430018
|
"spendingLimit"
|
|
@@ -430271,6 +430301,10 @@ var state = {
|
|
|
430271
430301
|
type: "string",
|
|
430272
430302
|
enum: ["free", "premium"]
|
|
430273
430303
|
},
|
|
430304
|
+
billingVersion: {
|
|
430305
|
+
type: "string",
|
|
430306
|
+
enum: ["v1", "v2"]
|
|
430307
|
+
},
|
|
430274
430308
|
plan: {
|
|
430275
430309
|
type: "string",
|
|
430276
430310
|
enum: ["community", "team", "enterprise"]
|
|
@@ -430290,6 +430324,7 @@ var state = {
|
|
|
430290
430324
|
"updatedAt",
|
|
430291
430325
|
"botCount",
|
|
430292
430326
|
"accountType",
|
|
430327
|
+
"billingVersion",
|
|
430293
430328
|
"plan",
|
|
430294
430329
|
"blocked",
|
|
430295
430330
|
"spendingLimit"
|
|
@@ -430347,6 +430382,10 @@ var state = {
|
|
|
430347
430382
|
type: "string",
|
|
430348
430383
|
enum: ["free", "premium"]
|
|
430349
430384
|
},
|
|
430385
|
+
billingVersion: {
|
|
430386
|
+
type: "string",
|
|
430387
|
+
enum: ["v1", "v2"]
|
|
430388
|
+
},
|
|
430350
430389
|
plan: {
|
|
430351
430390
|
type: "string",
|
|
430352
430391
|
enum: ["community", "team", "enterprise"]
|
|
@@ -430366,6 +430405,7 @@ var state = {
|
|
|
430366
430405
|
"updatedAt",
|
|
430367
430406
|
"botCount",
|
|
430368
430407
|
"accountType",
|
|
430408
|
+
"billingVersion",
|
|
430369
430409
|
"plan",
|
|
430370
430410
|
"blocked",
|
|
430371
430411
|
"spendingLimit"
|
|
@@ -430448,6 +430488,10 @@ var state = {
|
|
|
430448
430488
|
type: "string",
|
|
430449
430489
|
enum: ["free", "premium"]
|
|
430450
430490
|
},
|
|
430491
|
+
billingVersion: {
|
|
430492
|
+
type: "string",
|
|
430493
|
+
enum: ["v1", "v2"]
|
|
430494
|
+
},
|
|
430451
430495
|
plan: {
|
|
430452
430496
|
type: "string",
|
|
430453
430497
|
enum: ["community", "team", "enterprise"]
|
|
@@ -430467,6 +430511,7 @@ var state = {
|
|
|
430467
430511
|
"updatedAt",
|
|
430468
430512
|
"botCount",
|
|
430469
430513
|
"accountType",
|
|
430514
|
+
"billingVersion",
|
|
430470
430515
|
"plan",
|
|
430471
430516
|
"blocked",
|
|
430472
430517
|
"spendingLimit"
|
|
@@ -431559,6 +431604,12 @@ var state = {
|
|
|
431559
431604
|
type: "string",
|
|
431560
431605
|
description: 'Integration version. Either a semver version or tag "latest"',
|
|
431561
431606
|
in: "query"
|
|
431607
|
+
},
|
|
431608
|
+
dev: {
|
|
431609
|
+
in: "query",
|
|
431610
|
+
description: "If true, only dev integrations are returned. Otherwise, only production integrations are returned.",
|
|
431611
|
+
type: "boolean",
|
|
431612
|
+
required: false
|
|
431562
431613
|
}
|
|
431563
431614
|
},
|
|
431564
431615
|
response: {
|
|
@@ -432141,7 +432192,7 @@ var state = {
|
|
|
432141
432192
|
title: "Botpress API",
|
|
432142
432193
|
description: "API for Botpress Cloud",
|
|
432143
432194
|
server: "https://api.botpress.cloud",
|
|
432144
|
-
version: "0.15.
|
|
432195
|
+
version: "0.15.3",
|
|
432145
432196
|
prefix: "v1"
|
|
432146
432197
|
},
|
|
432147
432198
|
errors: [
|
|
@@ -433160,6 +433211,10 @@ var state = {
|
|
|
433160
433211
|
type: "string",
|
|
433161
433212
|
enum: ["free", "premium"]
|
|
433162
433213
|
},
|
|
433214
|
+
billingVersion: {
|
|
433215
|
+
type: "string",
|
|
433216
|
+
enum: ["v1", "v2"]
|
|
433217
|
+
},
|
|
433163
433218
|
plan: {
|
|
433164
433219
|
type: "string",
|
|
433165
433220
|
enum: ["community", "team", "enterprise"]
|
|
@@ -433179,6 +433234,7 @@ var state = {
|
|
|
433179
433234
|
"updatedAt",
|
|
433180
433235
|
"botCount",
|
|
433181
433236
|
"accountType",
|
|
433237
|
+
"billingVersion",
|
|
433182
433238
|
"plan",
|
|
433183
433239
|
"blocked",
|
|
433184
433240
|
"spendingLimit"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@botpress/api",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.3",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -22,6 +22,6 @@
|
|
|
22
22
|
"zod": "^3.20.6"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@bpinternal/opapi": "^0.6.
|
|
25
|
+
"@bpinternal/opapi": "^0.6.2"
|
|
26
26
|
}
|
|
27
27
|
}
|