@botpress/api 0.7.0 → 0.7.2

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.
@@ -1197,6 +1197,130 @@ export declare const state: {
1197
1197
  };
1198
1198
  parameters: {};
1199
1199
  };
1200
+ listPersonalAccessTokens: {
1201
+ name: string;
1202
+ description: string;
1203
+ method: "get";
1204
+ path: string;
1205
+ section: "account";
1206
+ disableDefaultParameters: {
1207
+ "x-workspace-id": boolean;
1208
+ };
1209
+ response: {
1210
+ description: string;
1211
+ schema: {
1212
+ type: "object";
1213
+ properties: {
1214
+ pats: {
1215
+ type: "array";
1216
+ items: {
1217
+ type: "object";
1218
+ properties: {
1219
+ id: {
1220
+ type: "string";
1221
+ };
1222
+ createdAt: {
1223
+ type: "string";
1224
+ format: string;
1225
+ };
1226
+ note: {
1227
+ type: "string";
1228
+ };
1229
+ };
1230
+ required: string[];
1231
+ };
1232
+ };
1233
+ };
1234
+ required: string[];
1235
+ title: string;
1236
+ additionalProperties: false;
1237
+ };
1238
+ };
1239
+ parameters: {};
1240
+ };
1241
+ createPersonalAccessToken: {
1242
+ name: string;
1243
+ description: string;
1244
+ method: "post";
1245
+ path: string;
1246
+ section: "account";
1247
+ disableDefaultParameters: {
1248
+ "x-workspace-id": boolean;
1249
+ };
1250
+ requestBody: {
1251
+ description: string;
1252
+ schema: {
1253
+ type: "object";
1254
+ properties: {
1255
+ note: {
1256
+ type: "string";
1257
+ description: string;
1258
+ };
1259
+ };
1260
+ required: string[];
1261
+ title: string;
1262
+ additionalProperties: false;
1263
+ };
1264
+ };
1265
+ response: {
1266
+ description: string;
1267
+ schema: {
1268
+ type: "object";
1269
+ properties: {
1270
+ pat: {
1271
+ type: "object";
1272
+ properties: {
1273
+ id: {
1274
+ type: "string";
1275
+ };
1276
+ createdAt: {
1277
+ type: "string";
1278
+ format: string;
1279
+ };
1280
+ note: {
1281
+ type: "string";
1282
+ };
1283
+ value: {
1284
+ type: "string";
1285
+ description: string;
1286
+ };
1287
+ };
1288
+ required: string[];
1289
+ additionalProperties: false;
1290
+ };
1291
+ };
1292
+ required: string[];
1293
+ title: string;
1294
+ additionalProperties: false;
1295
+ };
1296
+ };
1297
+ parameters: {};
1298
+ };
1299
+ deletePersonalAccessToken: {
1300
+ name: string;
1301
+ description: string;
1302
+ method: "delete";
1303
+ path: string;
1304
+ section: "account";
1305
+ disableDefaultParameters: {
1306
+ "x-workspace-id": boolean;
1307
+ };
1308
+ parameters: {
1309
+ id: {
1310
+ type: "string";
1311
+ description: string;
1312
+ in: "path";
1313
+ };
1314
+ };
1315
+ response: {
1316
+ description: string;
1317
+ schema: {
1318
+ type: "object";
1319
+ title: string;
1320
+ additionalProperties: false;
1321
+ };
1322
+ };
1323
+ };
1200
1324
  listPublicIntegrations: {
1201
1325
  name: string;
1202
1326
  description: string;
@@ -2305,6 +2429,170 @@ export declare const state: {
2305
2429
  };
2306
2430
  };
2307
2431
  };
2432
+ listWorkspaceUsages: {
2433
+ name: string;
2434
+ description: string;
2435
+ section: "workspace";
2436
+ method: "get";
2437
+ path: string;
2438
+ disableDefaultParameters: {
2439
+ "x-workspace-id": boolean;
2440
+ };
2441
+ parameters: {
2442
+ id: {
2443
+ type: "string";
2444
+ description: string;
2445
+ in: "path";
2446
+ };
2447
+ type: {
2448
+ in: "query";
2449
+ description: string;
2450
+ type: "string";
2451
+ enum: string[];
2452
+ required: true;
2453
+ };
2454
+ period: {
2455
+ in: "query";
2456
+ description: string;
2457
+ type: "string";
2458
+ required: false;
2459
+ };
2460
+ };
2461
+ response: {
2462
+ description: string;
2463
+ schema: {
2464
+ type: "object";
2465
+ properties: {
2466
+ usages: {
2467
+ type: "array";
2468
+ items: {
2469
+ $ref: string;
2470
+ };
2471
+ };
2472
+ };
2473
+ required: string[];
2474
+ title: string;
2475
+ additionalProperties: false;
2476
+ };
2477
+ };
2478
+ };
2479
+ getWorkspaceQuota: {
2480
+ name: string;
2481
+ description: string;
2482
+ section: "workspace";
2483
+ method: "get";
2484
+ path: string;
2485
+ disableDefaultParameters: {
2486
+ "x-workspace-id": boolean;
2487
+ };
2488
+ parameters: {
2489
+ id: {
2490
+ type: "string";
2491
+ description: string;
2492
+ in: "path";
2493
+ };
2494
+ type: {
2495
+ in: "query";
2496
+ description: string;
2497
+ type: "string";
2498
+ enum: string[];
2499
+ required: true;
2500
+ };
2501
+ period: {
2502
+ in: "query";
2503
+ description: string;
2504
+ type: "string";
2505
+ required: false;
2506
+ };
2507
+ };
2508
+ response: {
2509
+ description: string;
2510
+ schema: {
2511
+ type: "object";
2512
+ properties: {
2513
+ quota: {
2514
+ type: "object";
2515
+ properties: {
2516
+ period: {
2517
+ type: "string";
2518
+ description: string;
2519
+ };
2520
+ value: {
2521
+ type: "number";
2522
+ description: string;
2523
+ };
2524
+ type: {
2525
+ type: "string";
2526
+ enum: string[];
2527
+ description: string;
2528
+ };
2529
+ };
2530
+ required: string[];
2531
+ additionalProperties: false;
2532
+ };
2533
+ };
2534
+ required: string[];
2535
+ title: string;
2536
+ additionalProperties: false;
2537
+ };
2538
+ };
2539
+ };
2540
+ listWorkspaceQuotas: {
2541
+ name: string;
2542
+ description: string;
2543
+ section: "workspace";
2544
+ method: "get";
2545
+ path: string;
2546
+ disableDefaultParameters: {
2547
+ "x-workspace-id": boolean;
2548
+ };
2549
+ parameters: {
2550
+ id: {
2551
+ type: "string";
2552
+ description: string;
2553
+ in: "path";
2554
+ };
2555
+ period: {
2556
+ in: "query";
2557
+ description: string;
2558
+ type: "string";
2559
+ required: false;
2560
+ };
2561
+ };
2562
+ response: {
2563
+ description: string;
2564
+ schema: {
2565
+ type: "object";
2566
+ properties: {
2567
+ quotas: {
2568
+ type: "array";
2569
+ items: {
2570
+ type: "object";
2571
+ properties: {
2572
+ period: {
2573
+ type: "string";
2574
+ description: string;
2575
+ };
2576
+ value: {
2577
+ type: "number";
2578
+ description: string;
2579
+ };
2580
+ type: {
2581
+ type: "string";
2582
+ enum: string[];
2583
+ description: string;
2584
+ };
2585
+ };
2586
+ required: string[];
2587
+ };
2588
+ };
2589
+ };
2590
+ required: string[];
2591
+ title: string;
2592
+ additionalProperties: false;
2593
+ };
2594
+ };
2595
+ };
2308
2596
  updateWorkspace: {
2309
2597
  name: string;
2310
2598
  description: string;
@@ -3708,6 +3996,84 @@ export declare const state: {
3708
3996
  };
3709
3997
  };
3710
3998
  };
3999
+ getUsage: {
4000
+ name: string;
4001
+ path: string;
4002
+ description: string;
4003
+ method: "get";
4004
+ section: "usage";
4005
+ parameters: {
4006
+ type: {
4007
+ in: "query";
4008
+ description: string;
4009
+ type: "string";
4010
+ enum: string[];
4011
+ required: true;
4012
+ };
4013
+ period: {
4014
+ in: "query";
4015
+ description: string;
4016
+ type: "string";
4017
+ required: false;
4018
+ };
4019
+ id: {
4020
+ type: "string";
4021
+ description: string;
4022
+ in: "path";
4023
+ };
4024
+ };
4025
+ response: {
4026
+ description: string;
4027
+ schema: {
4028
+ type: "object";
4029
+ properties: {
4030
+ usage: {
4031
+ $ref: string;
4032
+ };
4033
+ };
4034
+ required: string[];
4035
+ title: string;
4036
+ additionalProperties: false;
4037
+ };
4038
+ };
4039
+ };
4040
+ listUsageHistory: {
4041
+ name: string;
4042
+ path: string;
4043
+ method: "get";
4044
+ description: string;
4045
+ parameters: {
4046
+ type: {
4047
+ in: "query";
4048
+ description: string;
4049
+ type: "string";
4050
+ enum: string[];
4051
+ required: true;
4052
+ };
4053
+ id: {
4054
+ type: "string";
4055
+ description: string;
4056
+ in: "path";
4057
+ };
4058
+ };
4059
+ response: {
4060
+ description: string;
4061
+ schema: {
4062
+ type: "object";
4063
+ properties: {
4064
+ usages: {
4065
+ type: "array";
4066
+ items: {
4067
+ $ref: string;
4068
+ };
4069
+ };
4070
+ };
4071
+ required: string[];
4072
+ title: string;
4073
+ additionalProperties: false;
4074
+ };
4075
+ };
4076
+ };
3711
4077
  introspect: {
3712
4078
  name: string;
3713
4079
  description: string;
@@ -3991,6 +4357,7 @@ export declare const state: {
3991
4357
  patchStateBody: true;
3992
4358
  callActionBody: true;
3993
4359
  configureIntegrationBody: true;
4360
+ createPersonalAccessTokenBody: true;
3994
4361
  createBotBody: true;
3995
4362
  updateBotBody: true;
3996
4363
  transferBotBody: true;
@@ -4032,6 +4399,9 @@ export declare const state: {
4032
4399
  callActionResponse: true;
4033
4400
  configureIntegrationResponse: true;
4034
4401
  getAccountResponse: true;
4402
+ listPersonalAccessTokensResponse: true;
4403
+ createPersonalAccessTokenResponse: true;
4404
+ deletePersonalAccessTokenResponse: true;
4035
4405
  listPublicIntegrationsResponse: true;
4036
4406
  getPublicIntegrationByIdResponse: true;
4037
4407
  getPublicIntegrationResponse: true;
@@ -4046,6 +4416,9 @@ export declare const state: {
4046
4416
  getBotAnalyticsResponse: true;
4047
4417
  createWorkspaceResponse: true;
4048
4418
  getWorkspaceResponse: true;
4419
+ listWorkspaceUsagesResponse: true;
4420
+ getWorkspaceQuotaResponse: true;
4421
+ listWorkspaceQuotasResponse: true;
4049
4422
  updateWorkspaceResponse: true;
4050
4423
  listWorkspacesResponse: true;
4051
4424
  changeWorkspacePlanResponse: true;
@@ -4062,6 +4435,8 @@ export declare const state: {
4062
4435
  getIntegrationLogsResponse: true;
4063
4436
  getIntegrationByNameResponse: true;
4064
4437
  deleteIntegrationResponse: true;
4438
+ getUsageResponse: true;
4439
+ listUsageHistoryResponse: true;
4065
4440
  introspectResponse: true;
4066
4441
  createFileResponse: true;
4067
4442
  getFileResponse: true;
@@ -4075,6 +4450,7 @@ export declare const state: {
4075
4450
  Workspace: true;
4076
4451
  WorkspaceMember: true;
4077
4452
  Account: true;
4453
+ Usage: true;
4078
4454
  User: true;
4079
4455
  Conversation: true;
4080
4456
  Event: true;
@@ -4794,6 +5170,37 @@ export declare const state: {
4794
5170
  additionalProperties: false;
4795
5171
  };
4796
5172
  };
5173
+ Usage: {
5174
+ section: "usage";
5175
+ schema: {
5176
+ type: "object";
5177
+ properties: {
5178
+ id: {
5179
+ type: "string";
5180
+ description: string;
5181
+ };
5182
+ period: {
5183
+ type: "string";
5184
+ description: string;
5185
+ };
5186
+ value: {
5187
+ type: "number";
5188
+ description: string;
5189
+ };
5190
+ quota: {
5191
+ type: "number";
5192
+ description: string;
5193
+ };
5194
+ type: {
5195
+ type: "string";
5196
+ enum: string[];
5197
+ description: string;
5198
+ };
5199
+ };
5200
+ required: string[];
5201
+ additionalProperties: false;
5202
+ };
5203
+ };
4797
5204
  User: {
4798
5205
  section: "user";
4799
5206
  schema: {
@@ -5114,5 +5521,11 @@ export declare const state: {
5114
5521
  name: "account";
5115
5522
  operations: string[];
5116
5523
  schema: string;
5524
+ } | {
5525
+ description: string;
5526
+ title: string;
5527
+ name: "usage";
5528
+ operations: string[];
5529
+ schema: string;
5117
5530
  })[];
5118
5531
  };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  export declare const api: {
2
- getModelRef: (name: "Bot" | "Integration" | "Workspace" | "WorkspaceMember" | "Account" | "User" | "Conversation" | "Event" | "Message" | "State" | "File") => import("@bpinternal/opapi").OpenApiZodAny;
3
- addOperation: <Path extends string>(operationProps: import("@bpinternal/opapi").Operation<"x-workspace-id", "user" | "conversation" | "event" | "message" | "file" | "state" | "hub" | "action" | "bot" | "integration" | "workspace" | "workspaceMember" | "account", Path, "zod-schema">) => void;
2
+ getModelRef: (name: "Bot" | "Integration" | "Workspace" | "WorkspaceMember" | "Account" | "Usage" | "User" | "Conversation" | "Event" | "Message" | "State" | "File") => import("@bpinternal/opapi").OpenApiZodAny;
3
+ addOperation: <Path extends string>(operationProps: import("@bpinternal/opapi").Operation<"x-workspace-id", "user" | "conversation" | "event" | "message" | "file" | "state" | "hub" | "action" | "bot" | "integration" | "workspace" | "workspaceMember" | "account" | "usage", Path, "zod-schema">) => void;
4
4
  exportClient: (dir: string | undefined, openapiGeneratorEndpoint: string, postProcessors?: import("@bpinternal/opapi").OpenApiPostProcessors | undefined) => Promise<void>;
5
5
  exportTypesBySection: (dir?: string | undefined) => Promise<void>;
6
6
  exportServer: (dir: string | undefined, useExpressTypes: boolean) => Promise<void>;
7
7
  exportOpenapi: (dir?: string | undefined) => void;
8
8
  exportState: (dir?: string | undefined) => void;
9
+ exportErrors: (dir?: string | undefined) => void;
9
10
  };