@botpress/api 0.9.0 → 0.11.0

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.
@@ -2287,20 +2287,524 @@ export declare const state: {
2287
2287
  description: string;
2288
2288
  };
2289
2289
  returningUsers: {
2290
- type: "number";
2290
+ type: "integer";
2291
2291
  };
2292
2292
  newUsers: {
2293
- type: "number";
2293
+ type: "integer";
2294
2294
  };
2295
2295
  sessions: {
2296
- type: "number";
2296
+ type: "integer";
2297
2297
  };
2298
2298
  messages: {
2299
+ type: "integer";
2300
+ description: string;
2301
+ };
2302
+ userMessages: {
2303
+ type: "integer";
2304
+ };
2305
+ botMessages: {
2306
+ type: "integer";
2307
+ };
2308
+ events: {
2309
+ type: "integer";
2310
+ };
2311
+ eventTypes: {
2312
+ type: "object";
2313
+ additionalProperties: {
2314
+ type: "number";
2315
+ };
2316
+ };
2317
+ };
2318
+ required: string[];
2319
+ };
2320
+ };
2321
+ };
2322
+ required: string[];
2323
+ title: string;
2324
+ additionalProperties: false;
2325
+ };
2326
+ };
2327
+ };
2328
+ listBotIssues: {
2329
+ name: string;
2330
+ description: string;
2331
+ method: "get";
2332
+ path: string;
2333
+ section: "bot";
2334
+ parameters: {
2335
+ id: {
2336
+ type: "string";
2337
+ description: string;
2338
+ in: "path";
2339
+ };
2340
+ nextToken: {
2341
+ in: "query";
2342
+ description: string;
2343
+ type: "string";
2344
+ };
2345
+ };
2346
+ response: {
2347
+ description: string;
2348
+ schema: {
2349
+ type: "object";
2350
+ properties: {
2351
+ issues: {
2352
+ type: "array";
2353
+ items: {
2354
+ type: "object";
2355
+ properties: {
2356
+ id: {
2357
+ type: "string";
2358
+ };
2359
+ code: {
2360
+ type: "string";
2361
+ };
2362
+ createdAt: {
2363
+ type: "string";
2364
+ format: string;
2365
+ };
2366
+ lastSeenAt: {
2367
+ type: "string";
2368
+ format: string;
2369
+ };
2370
+ title: {
2371
+ type: "string";
2372
+ };
2373
+ description: {
2374
+ type: "string";
2375
+ };
2376
+ groupedData: {
2377
+ type: "object";
2378
+ properties: {};
2379
+ };
2380
+ eventsCount: {
2381
+ type: "number";
2382
+ };
2383
+ category: {
2384
+ type: "string";
2385
+ enum: string[];
2386
+ };
2387
+ resolutionLink: {
2388
+ type: "string";
2389
+ nullable: true;
2390
+ };
2391
+ };
2392
+ required: string[];
2393
+ };
2394
+ };
2395
+ meta: {
2396
+ type: "object";
2397
+ properties: {
2398
+ nextToken: {
2399
+ type: "string";
2400
+ description: string;
2401
+ };
2402
+ };
2403
+ additionalProperties: false;
2404
+ };
2405
+ };
2406
+ required: string[];
2407
+ title: string;
2408
+ additionalProperties: false;
2409
+ };
2410
+ };
2411
+ };
2412
+ deleteBotIssue: {
2413
+ name: string;
2414
+ description: string;
2415
+ method: "delete";
2416
+ path: string;
2417
+ section: "bot";
2418
+ parameters: {
2419
+ id: {
2420
+ type: "string";
2421
+ description: string;
2422
+ in: "path";
2423
+ };
2424
+ issueId: {
2425
+ in: "path";
2426
+ description: string;
2427
+ type: "string";
2428
+ };
2429
+ };
2430
+ response: {
2431
+ description: string;
2432
+ schema: {
2433
+ type: "object";
2434
+ title: string;
2435
+ additionalProperties: false;
2436
+ };
2437
+ };
2438
+ };
2439
+ listBotIssueEvents: {
2440
+ name: string;
2441
+ description: string;
2442
+ method: "get";
2443
+ path: string;
2444
+ section: "bot";
2445
+ parameters: {
2446
+ id: {
2447
+ type: "string";
2448
+ description: string;
2449
+ in: "path";
2450
+ };
2451
+ issueId: {
2452
+ in: "path";
2453
+ description: string;
2454
+ type: "string";
2455
+ };
2456
+ };
2457
+ response: {
2458
+ description: string;
2459
+ schema: {
2460
+ type: "object";
2461
+ properties: {
2462
+ issueEvents: {
2463
+ type: "array";
2464
+ items: {
2465
+ type: "object";
2466
+ properties: {
2467
+ id: {
2468
+ type: "string";
2469
+ };
2470
+ createdAt: {
2471
+ type: "string";
2472
+ format: string;
2473
+ };
2474
+ data: {
2475
+ type: "object";
2476
+ properties: {};
2477
+ };
2478
+ };
2479
+ required: string[];
2480
+ };
2481
+ };
2482
+ };
2483
+ required: string[];
2484
+ title: string;
2485
+ additionalProperties: false;
2486
+ };
2487
+ };
2488
+ };
2489
+ getWorkspaceBillingDetails: {
2490
+ name: string;
2491
+ description: string;
2492
+ method: "get";
2493
+ path: string;
2494
+ disableDefaultParameters: {
2495
+ "x-workspace-id": boolean;
2496
+ };
2497
+ parameters: {
2498
+ id: {
2499
+ type: "string";
2500
+ description: string;
2501
+ in: "path";
2502
+ };
2503
+ };
2504
+ section: "workspace";
2505
+ response: {
2506
+ description: string;
2507
+ schema: {
2508
+ type: "object";
2509
+ properties: {
2510
+ currentPeriod: {
2511
+ type: "object";
2512
+ properties: {
2513
+ start: {
2514
+ type: "string";
2515
+ };
2516
+ end: {
2517
+ type: "string";
2518
+ };
2519
+ usage: {
2520
+ type: "object";
2521
+ properties: {
2522
+ userMessages: {
2523
+ type: "object";
2524
+ properties: {
2525
+ status: {
2526
+ type: "string";
2527
+ enum: string[];
2528
+ };
2529
+ quantity: {
2530
+ type: "number";
2531
+ };
2532
+ price: {
2533
+ type: "number";
2534
+ };
2535
+ minimum: {
2536
+ type: "number";
2537
+ };
2538
+ maximum: {
2539
+ type: "number";
2540
+ };
2541
+ };
2542
+ required: string[];
2543
+ additionalProperties: false;
2544
+ };
2545
+ };
2546
+ required: string[];
2547
+ additionalProperties: false;
2548
+ };
2549
+ };
2550
+ required: string[];
2551
+ additionalProperties: false;
2552
+ };
2553
+ paymentMethod: {
2554
+ type: "object";
2555
+ properties: {
2556
+ type: {
2557
+ type: "string";
2558
+ };
2559
+ lastDigits: {
2560
+ type: "string";
2561
+ };
2562
+ };
2563
+ required: string[];
2564
+ nullable: true;
2565
+ additionalProperties: false;
2566
+ };
2567
+ };
2568
+ required: string[];
2569
+ title: string;
2570
+ additionalProperties: false;
2571
+ };
2572
+ };
2573
+ };
2574
+ setWorkspacePaymentMethod: {
2575
+ name: string;
2576
+ description: string;
2577
+ method: "put";
2578
+ path: string;
2579
+ disableDefaultParameters: {
2580
+ "x-workspace-id": boolean;
2581
+ };
2582
+ parameters: {
2583
+ id: {
2584
+ type: "string";
2585
+ description: string;
2586
+ in: "path";
2587
+ };
2588
+ };
2589
+ section: "workspace";
2590
+ requestBody: {
2591
+ description: string;
2592
+ schema: {
2593
+ type: "object";
2594
+ properties: {
2595
+ stripePaymentMethodId: {
2596
+ type: "string";
2597
+ description: string;
2598
+ };
2599
+ };
2600
+ required: string[];
2601
+ title: string;
2602
+ additionalProperties: false;
2603
+ };
2604
+ };
2605
+ response: {
2606
+ description: string;
2607
+ schema: {
2608
+ type: "object";
2609
+ properties: {
2610
+ stripePaymentMethodId: {
2611
+ type: "string";
2612
+ };
2613
+ paymentMethod: {
2614
+ type: "object";
2615
+ properties: {
2616
+ type: {
2617
+ type: "string";
2618
+ };
2619
+ lastDigits: {
2620
+ type: "string";
2621
+ };
2622
+ };
2623
+ required: string[];
2624
+ nullable: true;
2625
+ additionalProperties: false;
2626
+ };
2627
+ status: {
2628
+ type: "string";
2629
+ enum: string[];
2630
+ };
2631
+ nextAction: {
2632
+ type: "object";
2633
+ properties: {
2634
+ redirectToUrl: {
2635
+ type: "string";
2636
+ format: string;
2637
+ };
2638
+ };
2639
+ required: string[];
2640
+ description: string;
2641
+ additionalProperties: false;
2642
+ };
2643
+ };
2644
+ required: string[];
2645
+ title: string;
2646
+ additionalProperties: false;
2647
+ };
2648
+ };
2649
+ };
2650
+ listWorkspaceInvoices: {
2651
+ name: string;
2652
+ description: string;
2653
+ method: "get";
2654
+ path: string;
2655
+ disableDefaultParameters: {
2656
+ "x-workspace-id": boolean;
2657
+ };
2658
+ parameters: {
2659
+ id: {
2660
+ type: "string";
2661
+ description: string;
2662
+ in: "path";
2663
+ };
2664
+ };
2665
+ section: "workspace";
2666
+ response: {
2667
+ description: string;
2668
+ schema: {
2669
+ type: "object";
2670
+ properties: {
2671
+ invoices: {
2672
+ type: "array";
2673
+ items: {
2674
+ type: "object";
2675
+ properties: {
2676
+ id: {
2677
+ type: "string";
2678
+ };
2679
+ period: {
2680
+ type: "object";
2681
+ properties: {
2682
+ month: {
2683
+ type: "number";
2684
+ };
2685
+ year: {
2686
+ type: "number";
2687
+ };
2688
+ };
2689
+ required: string[];
2690
+ };
2691
+ date: {
2692
+ type: "string";
2693
+ format: string;
2694
+ description: string;
2695
+ };
2696
+ amount: {
2697
+ type: "number";
2698
+ description: string;
2699
+ };
2700
+ currency: {
2701
+ type: "string";
2702
+ maxLength: number;
2703
+ description: string;
2704
+ };
2705
+ paymentStatus: {
2706
+ type: "string";
2707
+ enum: string[];
2708
+ };
2709
+ paymentAttemptCount: {
2710
+ type: "number";
2711
+ description: string;
2712
+ nullable: true;
2713
+ };
2714
+ nextPaymentAttemptDate: {
2715
+ type: "string";
2716
+ format: string;
2717
+ description: string;
2718
+ nullable: true;
2719
+ };
2720
+ pdfUrl: {
2721
+ type: "string";
2722
+ format: string;
2723
+ description: string;
2724
+ };
2725
+ };
2726
+ required: string[];
2727
+ };
2728
+ };
2729
+ };
2730
+ required: string[];
2731
+ title: string;
2732
+ additionalProperties: false;
2733
+ };
2734
+ };
2735
+ };
2736
+ chargeWorkspaceUnpaidInvoices: {
2737
+ name: string;
2738
+ description: string;
2739
+ method: "post";
2740
+ path: string;
2741
+ disableDefaultParameters: {
2742
+ "x-workspace-id": boolean;
2743
+ };
2744
+ parameters: {
2745
+ id: {
2746
+ type: "string";
2747
+ description: string;
2748
+ in: "path";
2749
+ };
2750
+ };
2751
+ section: "workspace";
2752
+ requestBody: {
2753
+ description: string;
2754
+ schema: {
2755
+ type: "object";
2756
+ properties: {
2757
+ invoiceIds: {
2758
+ type: "array";
2759
+ items: {
2760
+ type: "string";
2761
+ };
2762
+ minItems: number;
2763
+ };
2764
+ };
2765
+ title: string;
2766
+ additionalProperties: false;
2767
+ };
2768
+ };
2769
+ response: {
2770
+ description: string;
2771
+ schema: {
2772
+ type: "object";
2773
+ properties: {
2774
+ chargedInvoices: {
2775
+ type: "array";
2776
+ items: {
2777
+ type: "object";
2778
+ properties: {
2779
+ id: {
2780
+ type: "string";
2781
+ };
2782
+ amount: {
2299
2783
  type: "number";
2300
2784
  };
2301
2785
  };
2302
2786
  required: string[];
2303
2787
  };
2788
+ description: string;
2789
+ };
2790
+ failedInvoices: {
2791
+ type: "array";
2792
+ items: {
2793
+ type: "object";
2794
+ properties: {
2795
+ id: {
2796
+ type: "string";
2797
+ };
2798
+ amount: {
2799
+ type: "number";
2800
+ };
2801
+ failedReason: {
2802
+ type: "string";
2803
+ };
2804
+ };
2805
+ required: string[];
2806
+ };
2807
+ description: string;
2304
2808
  };
2305
2809
  };
2306
2810
  required: string[];
@@ -4359,6 +4863,8 @@ export declare const state: {
4359
4863
  createBotBody: true;
4360
4864
  updateBotBody: true;
4361
4865
  transferBotBody: true;
4866
+ setWorkspacePaymentMethodBody: true;
4867
+ chargeWorkspaceUnpaidInvoicesBody: true;
4362
4868
  createWorkspaceBody: true;
4363
4869
  updateWorkspaceBody: true;
4364
4870
  changeWorkspacePlanBody: true;
@@ -4412,6 +4918,13 @@ export declare const state: {
4412
4918
  getBotLogsResponse: true;
4413
4919
  getBotWebchatResponse: true;
4414
4920
  getBotAnalyticsResponse: true;
4921
+ listBotIssuesResponse: true;
4922
+ deleteBotIssueResponse: true;
4923
+ listBotIssueEventsResponse: true;
4924
+ getWorkspaceBillingDetailsResponse: true;
4925
+ setWorkspacePaymentMethodResponse: true;
4926
+ listWorkspaceInvoicesResponse: true;
4927
+ chargeWorkspaceUnpaidInvoicesResponse: true;
4415
4928
  createWorkspaceResponse: true;
4416
4929
  getWorkspaceResponse: true;
4417
4930
  listWorkspaceUsagesResponse: true;
@@ -4449,6 +4962,8 @@ export declare const state: {
4449
4962
  WorkspaceMember: true;
4450
4963
  Account: true;
4451
4964
  Usage: true;
4965
+ Issue: true;
4966
+ IssueEvent: true;
4452
4967
  User: true;
4453
4968
  Conversation: true;
4454
4969
  Event: true;
@@ -4501,6 +5016,9 @@ export declare const state: {
4501
5016
  webhookUrl: {
4502
5017
  type: "string";
4503
5018
  };
5019
+ webhookId: {
5020
+ type: "string";
5021
+ };
4504
5022
  configuration: {
4505
5023
  type: "object";
4506
5024
  additionalProperties: true;
@@ -5199,6 +5717,72 @@ export declare const state: {
5199
5717
  additionalProperties: false;
5200
5718
  };
5201
5719
  };
5720
+ Issue: {
5721
+ section: "bot";
5722
+ schema: {
5723
+ type: "object";
5724
+ properties: {
5725
+ id: {
5726
+ type: "string";
5727
+ };
5728
+ code: {
5729
+ type: "string";
5730
+ };
5731
+ createdAt: {
5732
+ type: "string";
5733
+ format: string;
5734
+ };
5735
+ lastSeenAt: {
5736
+ type: "string";
5737
+ format: string;
5738
+ };
5739
+ title: {
5740
+ type: "string";
5741
+ };
5742
+ description: {
5743
+ type: "string";
5744
+ };
5745
+ groupedData: {
5746
+ type: "object";
5747
+ additionalProperties: false;
5748
+ };
5749
+ eventsCount: {
5750
+ type: "number";
5751
+ };
5752
+ category: {
5753
+ type: "string";
5754
+ enum: string[];
5755
+ };
5756
+ resolutionLink: {
5757
+ type: "string";
5758
+ nullable: true;
5759
+ };
5760
+ };
5761
+ required: string[];
5762
+ additionalProperties: false;
5763
+ };
5764
+ };
5765
+ IssueEvent: {
5766
+ section: "bot";
5767
+ schema: {
5768
+ type: "object";
5769
+ properties: {
5770
+ id: {
5771
+ type: "string";
5772
+ };
5773
+ createdAt: {
5774
+ type: "string";
5775
+ format: string;
5776
+ };
5777
+ data: {
5778
+ type: "object";
5779
+ additionalProperties: false;
5780
+ };
5781
+ };
5782
+ required: string[];
5783
+ additionalProperties: false;
5784
+ };
5785
+ };
5202
5786
  User: {
5203
5787
  section: "user";
5204
5788
  schema: {
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export declare const api: {
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;
2
+ getState: () => import("@bpinternal/opapi").State<"Bot" | "Integration" | "Workspace" | "WorkspaceMember" | "Account" | "Usage" | "Issue" | "IssueEvent" | "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" | "Issue" | "IssueEvent" | "User" | "Conversation" | "Event" | "Message" | "State" | "File") => import("@bpinternal/opapi").OpenApiZodAny;
4
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;
5
5
  exportClient: (dir: string | undefined, openapiGeneratorEndpoint: string, postProcessors?: import("@bpinternal/opapi").OpenApiPostProcessors | undefined) => Promise<void>;
6
6
  exportTypesBySection: (dir?: string | undefined) => Promise<void>;