@botpress/api 0.7.1 → 0.7.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.
@@ -2429,6 +2429,170 @@ export declare const state: {
2429
2429
  };
2430
2430
  };
2431
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
+ };
2432
2596
  updateWorkspace: {
2433
2597
  name: string;
2434
2598
  description: string;
@@ -3832,6 +3996,84 @@ export declare const state: {
3832
3996
  };
3833
3997
  };
3834
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
+ };
3835
4077
  introspect: {
3836
4078
  name: string;
3837
4079
  description: string;
@@ -4174,6 +4416,9 @@ export declare const state: {
4174
4416
  getBotAnalyticsResponse: true;
4175
4417
  createWorkspaceResponse: true;
4176
4418
  getWorkspaceResponse: true;
4419
+ listWorkspaceUsagesResponse: true;
4420
+ getWorkspaceQuotaResponse: true;
4421
+ listWorkspaceQuotasResponse: true;
4177
4422
  updateWorkspaceResponse: true;
4178
4423
  listWorkspacesResponse: true;
4179
4424
  changeWorkspacePlanResponse: true;
@@ -4190,6 +4435,8 @@ export declare const state: {
4190
4435
  getIntegrationLogsResponse: true;
4191
4436
  getIntegrationByNameResponse: true;
4192
4437
  deleteIntegrationResponse: true;
4438
+ getUsageResponse: true;
4439
+ listUsageHistoryResponse: true;
4193
4440
  introspectResponse: true;
4194
4441
  createFileResponse: true;
4195
4442
  getFileResponse: true;
@@ -4203,6 +4450,7 @@ export declare const state: {
4203
4450
  Workspace: true;
4204
4451
  WorkspaceMember: true;
4205
4452
  Account: true;
4453
+ Usage: true;
4206
4454
  User: true;
4207
4455
  Conversation: true;
4208
4456
  Event: true;
@@ -4922,6 +5170,37 @@ export declare const state: {
4922
5170
  additionalProperties: false;
4923
5171
  };
4924
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
+ };
4925
5204
  User: {
4926
5205
  section: "user";
4927
5206
  schema: {
@@ -5242,5 +5521,14 @@ export declare const state: {
5242
5521
  name: "account";
5243
5522
  operations: string[];
5244
5523
  schema: string;
5524
+ } | {
5525
+ description: string;
5526
+ title: string;
5527
+ name: "usage";
5528
+ operations: string[];
5529
+ schema: string;
5245
5530
  })[];
5531
+ options: {
5532
+ allowUnions: false;
5533
+ };
5246
5534
  };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
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
+ getState: () => import("@bpinternal/opapi").State<"Bot" | "Integration" | "Workspace" | "WorkspaceMember" | "Account" | "Usage" | "User" | "Conversation" | "Event" | "Message" | "State" | "File", "x-workspace-id", "user" | "conversation" | "event" | "message" | "file" | "state" | "hub" | "action" | "bot" | "integration" | "workspace" | "workspaceMember" | "account" | "usage">;
3
+ getModelRef: (name: "Bot" | "Integration" | "Workspace" | "WorkspaceMember" | "Account" | "Usage" | "User" | "Conversation" | "Event" | "Message" | "State" | "File") => import("@bpinternal/opapi").OpenApiZodAny;
4
+ 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
5
  exportClient: (dir: string | undefined, openapiGeneratorEndpoint: string, postProcessors?: import("@bpinternal/opapi").OpenApiPostProcessors | undefined) => Promise<void>;
5
6
  exportTypesBySection: (dir?: string | undefined) => Promise<void>;
6
7
  exportServer: (dir: string | undefined, useExpressTypes: boolean) => Promise<void>;