@botpress/api 0.19.1 → 0.19.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/src/gen/state.ts CHANGED
@@ -2226,9 +2226,7 @@ export const state = {
2226
2226
  "schema": {
2227
2227
  "type": "object",
2228
2228
  "properties": {
2229
- "value": {
2230
- "nullable": true
2231
- }
2229
+ "value": {}
2232
2230
  },
2233
2231
  "title": "setAccountPreferenceBody",
2234
2232
  "additionalProperties": false
@@ -2349,6 +2347,26 @@ export const state = {
2349
2347
  "iconUrl": {
2350
2348
  "type": "string",
2351
2349
  "description": "URL of the icon of the integration. This is the icon that will be displayed in the UI"
2350
+ },
2351
+ "ownerWorkspace": {
2352
+ "type": "object",
2353
+ "properties": {
2354
+ "id": {
2355
+ "type": "string"
2356
+ },
2357
+ "handle": {
2358
+ "type": "string",
2359
+ "nullable": true
2360
+ },
2361
+ "name": {
2362
+ "type": "string"
2363
+ }
2364
+ },
2365
+ "required": [
2366
+ "id",
2367
+ "handle",
2368
+ "name"
2369
+ ]
2352
2370
  }
2353
2371
  },
2354
2372
  "required": [
@@ -2359,7 +2377,8 @@ export const state = {
2359
2377
  "updatedAt",
2360
2378
  "title",
2361
2379
  "description",
2362
- "iconUrl"
2380
+ "iconUrl",
2381
+ "ownerWorkspace"
2363
2382
  ]
2364
2383
  }
2365
2384
  },
@@ -2405,45 +2424,969 @@ export const state = {
2405
2424
  "type": "object",
2406
2425
  "properties": {
2407
2426
  "integration": {
2408
- "$ref": "#/components/schemas/Integration"
2409
- }
2410
- },
2411
- "required": [
2412
- "integration"
2413
- ],
2414
- "title": "getPublicIntegrationByIdResponse",
2415
- "additionalProperties": false
2416
- }
2417
- }
2418
- },
2419
- "getPublicIntegration": {
2420
- "name": "getPublicIntegration",
2421
- "description": "Get public integration by name and version",
2422
- "method": "get",
2423
- "section": "hub",
2424
- "path": "/v1/admin/hub/integrations/{name}/{version}",
2425
- "disableDefaultParameters": {
2426
- "x-workspace-id": true
2427
- },
2428
- "parameters": {
2429
- "name": {
2430
- "type": "string",
2431
- "description": "Integration Name",
2432
- "in": "path"
2433
- },
2434
- "version": {
2435
- "type": "string",
2436
- "description": "Integration version. Either a semver version or tag \"latest\"",
2437
- "in": "path"
2438
- }
2439
- },
2440
- "response": {
2441
- "description": "Success",
2442
- "schema": {
2443
- "type": "object",
2444
- "properties": {
2445
- "integration": {
2446
- "$ref": "#/components/schemas/Integration"
2427
+ "type": "object",
2428
+ "properties": {
2429
+ "id": {
2430
+ "type": "string",
2431
+ "minLength": 28,
2432
+ "maxLength": 36,
2433
+ "description": "User id"
2434
+ },
2435
+ "createdAt": {
2436
+ "type": "string",
2437
+ "format": "date-time",
2438
+ "description": "Creation date of the [Integration](#schema_integration) in ISO 8601 format"
2439
+ },
2440
+ "updatedAt": {
2441
+ "type": "string",
2442
+ "format": "date-time",
2443
+ "description": "Updating date of the [Integration](#schema_integration) in ISO 8601 format"
2444
+ },
2445
+ "identifier": {
2446
+ "type": "object",
2447
+ "properties": {
2448
+ "fallbackHandlerScript": {
2449
+ "type": "string",
2450
+ "maxLength": 2000,
2451
+ "description": "VRL Script of the [Integration](#schema_integration) to handle incoming requests for a request that doesn't have an identifier"
2452
+ },
2453
+ "extractScript": {
2454
+ "type": "string",
2455
+ "maxLength": 2000,
2456
+ "description": "VRL Script of the [Integration](#schema_integration) to extract the identifier from an incoming webhook often use for OAuth"
2457
+ }
2458
+ },
2459
+ "description": "Global identifier configuration of the [Integration](#schema_integration)",
2460
+ "additionalProperties": false
2461
+ },
2462
+ "name": {
2463
+ "type": "string",
2464
+ "maxLength": 200,
2465
+ "description": "Unique identifier of the integration that was installed on the bot"
2466
+ },
2467
+ "version": {
2468
+ "type": "string",
2469
+ "maxLength": 200,
2470
+ "description": "Unique identifier of the integration that was installed on the bot"
2471
+ },
2472
+ "configuration": {
2473
+ "type": "object",
2474
+ "properties": {
2475
+ "identifier": {
2476
+ "type": "object",
2477
+ "properties": {
2478
+ "linkTemplateScript": {
2479
+ "type": "string",
2480
+ "maxLength": 2000,
2481
+ "description": "Title describing the task"
2482
+ },
2483
+ "required": {
2484
+ "type": "boolean"
2485
+ }
2486
+ },
2487
+ "required": [
2488
+ "required"
2489
+ ],
2490
+ "description": "Identifier configuration of the [Integration](#schema_integration)",
2491
+ "additionalProperties": false
2492
+ },
2493
+ "schema": {
2494
+ "type": "object",
2495
+ "additionalProperties": true,
2496
+ "description": "Schema of the configuration in the `JSON schema` format. The configuration data is validated against this `JSON schema`."
2497
+ }
2498
+ },
2499
+ "required": [
2500
+ "identifier"
2501
+ ],
2502
+ "description": "Configuration definition",
2503
+ "additionalProperties": false
2504
+ },
2505
+ "channels": {
2506
+ "type": "object",
2507
+ "additionalProperties": {
2508
+ "type": "object",
2509
+ "properties": {
2510
+ "title": {
2511
+ "type": "string",
2512
+ "maxLength": 64,
2513
+ "description": "Title of the channel"
2514
+ },
2515
+ "description": {
2516
+ "type": "string",
2517
+ "maxLength": 256,
2518
+ "description": "Description of the channel"
2519
+ },
2520
+ "messages": {
2521
+ "type": "object",
2522
+ "additionalProperties": {
2523
+ "type": "object",
2524
+ "properties": {
2525
+ "schema": {
2526
+ "type": "object",
2527
+ "additionalProperties": true
2528
+ }
2529
+ },
2530
+ "required": [
2531
+ "schema"
2532
+ ],
2533
+ "description": "Message definition",
2534
+ "additionalProperties": false
2535
+ }
2536
+ },
2537
+ "conversation": {
2538
+ "type": "object",
2539
+ "properties": {
2540
+ "tags": {
2541
+ "type": "object",
2542
+ "additionalProperties": {
2543
+ "type": "object",
2544
+ "properties": {
2545
+ "title": {
2546
+ "type": "string",
2547
+ "maxLength": 64,
2548
+ "description": "Title of the tag"
2549
+ },
2550
+ "description": {
2551
+ "type": "string",
2552
+ "maxLength": 256,
2553
+ "description": "Description of the tag"
2554
+ }
2555
+ },
2556
+ "description": "Definition of a tag that can be provided on the object",
2557
+ "additionalProperties": false
2558
+ }
2559
+ },
2560
+ "creation": {
2561
+ "type": "object",
2562
+ "properties": {
2563
+ "enabled": {
2564
+ "type": "boolean",
2565
+ "description": "Enable conversation creation"
2566
+ },
2567
+ "requiredTags": {
2568
+ "type": "array",
2569
+ "items": {
2570
+ "type": "string"
2571
+ },
2572
+ "description": "The list of tags that are required to be specified when calling the API directly to create a conversation."
2573
+ }
2574
+ },
2575
+ "required": [
2576
+ "enabled",
2577
+ "requiredTags"
2578
+ ],
2579
+ "description": "The conversation creation setting determines how to create a conversation through the API directly. The integration will have to implement the `createConversation` functionality to support this setting.",
2580
+ "additionalProperties": false
2581
+ }
2582
+ },
2583
+ "required": [
2584
+ "tags",
2585
+ "creation"
2586
+ ],
2587
+ "description": "Conversation object configuration",
2588
+ "additionalProperties": false
2589
+ },
2590
+ "message": {
2591
+ "type": "object",
2592
+ "properties": {
2593
+ "tags": {
2594
+ "type": "object",
2595
+ "additionalProperties": {
2596
+ "type": "object",
2597
+ "properties": {
2598
+ "title": {
2599
+ "type": "string",
2600
+ "maxLength": 64,
2601
+ "description": "Title of the tag"
2602
+ },
2603
+ "description": {
2604
+ "type": "string",
2605
+ "maxLength": 256,
2606
+ "description": "Description of the tag"
2607
+ }
2608
+ },
2609
+ "description": "Definition of a tag that can be provided on the object",
2610
+ "additionalProperties": false
2611
+ }
2612
+ }
2613
+ },
2614
+ "required": [
2615
+ "tags"
2616
+ ],
2617
+ "description": "Message object configuration",
2618
+ "additionalProperties": false
2619
+ }
2620
+ },
2621
+ "required": [
2622
+ "messages",
2623
+ "conversation",
2624
+ "message"
2625
+ ],
2626
+ "description": "Channel definition",
2627
+ "additionalProperties": false
2628
+ }
2629
+ },
2630
+ "states": {
2631
+ "type": "object",
2632
+ "additionalProperties": {
2633
+ "type": "object",
2634
+ "properties": {
2635
+ "type": {
2636
+ "type": "string",
2637
+ "enum": [
2638
+ "conversation",
2639
+ "user",
2640
+ "integration"
2641
+ ],
2642
+ "description": "Type of the [State](#schema_state) (`conversation`, `user` or `integration`)"
2643
+ },
2644
+ "schema": {
2645
+ "type": "object",
2646
+ "additionalProperties": true,
2647
+ "description": "Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data."
2648
+ }
2649
+ },
2650
+ "required": [
2651
+ "type",
2652
+ "schema"
2653
+ ],
2654
+ "description": "State definition",
2655
+ "additionalProperties": false
2656
+ }
2657
+ },
2658
+ "events": {
2659
+ "type": "object",
2660
+ "additionalProperties": {
2661
+ "type": "object",
2662
+ "properties": {
2663
+ "title": {
2664
+ "type": "string",
2665
+ "maxLength": 64,
2666
+ "description": "Title of the event"
2667
+ },
2668
+ "description": {
2669
+ "type": "string",
2670
+ "maxLength": 256,
2671
+ "description": "Description of the event"
2672
+ },
2673
+ "schema": {
2674
+ "type": "object",
2675
+ "additionalProperties": true
2676
+ }
2677
+ },
2678
+ "required": [
2679
+ "schema"
2680
+ ],
2681
+ "description": "Event Definition",
2682
+ "additionalProperties": false
2683
+ }
2684
+ },
2685
+ "actions": {
2686
+ "type": "object",
2687
+ "additionalProperties": {
2688
+ "type": "object",
2689
+ "properties": {
2690
+ "title": {
2691
+ "type": "string",
2692
+ "maxLength": 64,
2693
+ "description": "Title of the action"
2694
+ },
2695
+ "description": {
2696
+ "type": "string",
2697
+ "maxLength": 256,
2698
+ "description": "Description of the action"
2699
+ },
2700
+ "input": {
2701
+ "type": "object",
2702
+ "properties": {
2703
+ "schema": {
2704
+ "type": "object",
2705
+ "additionalProperties": true
2706
+ }
2707
+ },
2708
+ "required": [
2709
+ "schema"
2710
+ ],
2711
+ "additionalProperties": false
2712
+ },
2713
+ "output": {
2714
+ "type": "object",
2715
+ "properties": {
2716
+ "schema": {
2717
+ "type": "object",
2718
+ "additionalProperties": true
2719
+ }
2720
+ },
2721
+ "required": [
2722
+ "schema"
2723
+ ],
2724
+ "additionalProperties": false
2725
+ }
2726
+ },
2727
+ "required": [
2728
+ "input",
2729
+ "output"
2730
+ ],
2731
+ "description": "Action definition",
2732
+ "additionalProperties": false
2733
+ }
2734
+ },
2735
+ "user": {
2736
+ "type": "object",
2737
+ "properties": {
2738
+ "tags": {
2739
+ "type": "object",
2740
+ "additionalProperties": {
2741
+ "type": "object",
2742
+ "properties": {
2743
+ "title": {
2744
+ "type": "string",
2745
+ "maxLength": 64,
2746
+ "description": "Title of the tag"
2747
+ },
2748
+ "description": {
2749
+ "type": "string",
2750
+ "maxLength": 256,
2751
+ "description": "Description of the tag"
2752
+ }
2753
+ },
2754
+ "description": "Definition of a tag that can be provided on the object",
2755
+ "additionalProperties": false
2756
+ }
2757
+ },
2758
+ "creation": {
2759
+ "type": "object",
2760
+ "properties": {
2761
+ "enabled": {
2762
+ "type": "boolean",
2763
+ "description": "Enable user creation"
2764
+ },
2765
+ "requiredTags": {
2766
+ "type": "array",
2767
+ "items": {
2768
+ "type": "string"
2769
+ },
2770
+ "description": "The list of tags that are required to be specified when calling the API directly to create a user."
2771
+ }
2772
+ },
2773
+ "required": [
2774
+ "enabled",
2775
+ "requiredTags"
2776
+ ],
2777
+ "description": "The user creation setting determines how to create a user through the API directly. The integration will have to implement the `createUser` functionality to support this setting.",
2778
+ "additionalProperties": false
2779
+ }
2780
+ },
2781
+ "required": [
2782
+ "tags",
2783
+ "creation"
2784
+ ],
2785
+ "description": "User object configuration",
2786
+ "additionalProperties": false
2787
+ },
2788
+ "entities": {
2789
+ "type": "object",
2790
+ "additionalProperties": {
2791
+ "type": "object",
2792
+ "properties": {
2793
+ "title": {
2794
+ "type": "string",
2795
+ "maxLength": 64,
2796
+ "description": "Title of the entity"
2797
+ },
2798
+ "description": {
2799
+ "type": "string",
2800
+ "maxLength": 256,
2801
+ "description": "Description of the entity"
2802
+ },
2803
+ "schema": {
2804
+ "type": "object",
2805
+ "additionalProperties": true
2806
+ }
2807
+ },
2808
+ "required": [
2809
+ "schema"
2810
+ ],
2811
+ "description": "Entity definition",
2812
+ "additionalProperties": false
2813
+ }
2814
+ },
2815
+ "dev": {
2816
+ "type": "boolean",
2817
+ "description": "Indicates if the integration is a development integration; Dev integrations run locally"
2818
+ },
2819
+ "title": {
2820
+ "type": "string",
2821
+ "minLength": 1,
2822
+ "maxLength": 64,
2823
+ "description": "Title of the integration. This is the name that will be displayed in the UI"
2824
+ },
2825
+ "description": {
2826
+ "type": "string",
2827
+ "maxLength": 256,
2828
+ "description": "Description of the integration. This is the description that will be displayed in the UI"
2829
+ },
2830
+ "iconUrl": {
2831
+ "type": "string",
2832
+ "description": "URL of the icon of the integration. This is the icon that will be displayed in the UI"
2833
+ },
2834
+ "readmeUrl": {
2835
+ "type": "string",
2836
+ "description": "URL of the readme of the integration. This is the readme that will be displayed in the UI"
2837
+ },
2838
+ "secrets": {
2839
+ "type": "array",
2840
+ "items": {
2841
+ "type": "string"
2842
+ },
2843
+ "description": "Secrets are integration-wide values available in the code via environment variables formatted with a SECRET_ prefix followed by your secret name. A secret name must respect SCREAMING_SNAKE casing."
2844
+ },
2845
+ "ownerWorkspace": {
2846
+ "type": "object",
2847
+ "properties": {
2848
+ "id": {
2849
+ "type": "string"
2850
+ },
2851
+ "handle": {
2852
+ "type": "string",
2853
+ "nullable": true
2854
+ },
2855
+ "name": {
2856
+ "type": "string"
2857
+ }
2858
+ },
2859
+ "required": [
2860
+ "id",
2861
+ "handle",
2862
+ "name"
2863
+ ],
2864
+ "additionalProperties": false
2865
+ }
2866
+ },
2867
+ "required": [
2868
+ "id",
2869
+ "createdAt",
2870
+ "updatedAt",
2871
+ "identifier",
2872
+ "name",
2873
+ "version",
2874
+ "configuration",
2875
+ "channels",
2876
+ "states",
2877
+ "events",
2878
+ "actions",
2879
+ "user",
2880
+ "entities",
2881
+ "dev",
2882
+ "title",
2883
+ "description",
2884
+ "iconUrl",
2885
+ "readmeUrl",
2886
+ "secrets",
2887
+ "ownerWorkspace"
2888
+ ],
2889
+ "additionalProperties": false
2890
+ }
2891
+ },
2892
+ "required": [
2893
+ "integration"
2894
+ ],
2895
+ "title": "getPublicIntegrationByIdResponse",
2896
+ "additionalProperties": false
2897
+ }
2898
+ }
2899
+ },
2900
+ "getPublicIntegration": {
2901
+ "name": "getPublicIntegration",
2902
+ "description": "Get public integration by name and version",
2903
+ "method": "get",
2904
+ "section": "hub",
2905
+ "path": "/v1/admin/hub/integrations/{name}/{version}",
2906
+ "disableDefaultParameters": {
2907
+ "x-workspace-id": true
2908
+ },
2909
+ "parameters": {
2910
+ "name": {
2911
+ "type": "string",
2912
+ "description": "Integration Name",
2913
+ "in": "path"
2914
+ },
2915
+ "version": {
2916
+ "type": "string",
2917
+ "description": "Integration version. Either a semver version or tag \"latest\"",
2918
+ "in": "path"
2919
+ }
2920
+ },
2921
+ "response": {
2922
+ "description": "Success",
2923
+ "schema": {
2924
+ "type": "object",
2925
+ "properties": {
2926
+ "integration": {
2927
+ "type": "object",
2928
+ "properties": {
2929
+ "id": {
2930
+ "type": "string",
2931
+ "minLength": 28,
2932
+ "maxLength": 36,
2933
+ "description": "User id"
2934
+ },
2935
+ "createdAt": {
2936
+ "type": "string",
2937
+ "format": "date-time",
2938
+ "description": "Creation date of the [Integration](#schema_integration) in ISO 8601 format"
2939
+ },
2940
+ "updatedAt": {
2941
+ "type": "string",
2942
+ "format": "date-time",
2943
+ "description": "Updating date of the [Integration](#schema_integration) in ISO 8601 format"
2944
+ },
2945
+ "identifier": {
2946
+ "type": "object",
2947
+ "properties": {
2948
+ "fallbackHandlerScript": {
2949
+ "type": "string",
2950
+ "maxLength": 2000,
2951
+ "description": "VRL Script of the [Integration](#schema_integration) to handle incoming requests for a request that doesn't have an identifier"
2952
+ },
2953
+ "extractScript": {
2954
+ "type": "string",
2955
+ "maxLength": 2000,
2956
+ "description": "VRL Script of the [Integration](#schema_integration) to extract the identifier from an incoming webhook often use for OAuth"
2957
+ }
2958
+ },
2959
+ "description": "Global identifier configuration of the [Integration](#schema_integration)",
2960
+ "additionalProperties": false
2961
+ },
2962
+ "name": {
2963
+ "type": "string",
2964
+ "maxLength": 200,
2965
+ "description": "Unique identifier of the integration that was installed on the bot"
2966
+ },
2967
+ "version": {
2968
+ "type": "string",
2969
+ "maxLength": 200,
2970
+ "description": "Unique identifier of the integration that was installed on the bot"
2971
+ },
2972
+ "configuration": {
2973
+ "type": "object",
2974
+ "properties": {
2975
+ "identifier": {
2976
+ "type": "object",
2977
+ "properties": {
2978
+ "linkTemplateScript": {
2979
+ "type": "string",
2980
+ "maxLength": 2000,
2981
+ "description": "Title describing the task"
2982
+ },
2983
+ "required": {
2984
+ "type": "boolean"
2985
+ }
2986
+ },
2987
+ "required": [
2988
+ "required"
2989
+ ],
2990
+ "description": "Identifier configuration of the [Integration](#schema_integration)",
2991
+ "additionalProperties": false
2992
+ },
2993
+ "schema": {
2994
+ "type": "object",
2995
+ "additionalProperties": true,
2996
+ "description": "Schema of the configuration in the `JSON schema` format. The configuration data is validated against this `JSON schema`."
2997
+ }
2998
+ },
2999
+ "required": [
3000
+ "identifier"
3001
+ ],
3002
+ "description": "Configuration definition",
3003
+ "additionalProperties": false
3004
+ },
3005
+ "channels": {
3006
+ "type": "object",
3007
+ "additionalProperties": {
3008
+ "type": "object",
3009
+ "properties": {
3010
+ "title": {
3011
+ "type": "string",
3012
+ "maxLength": 64,
3013
+ "description": "Title of the channel"
3014
+ },
3015
+ "description": {
3016
+ "type": "string",
3017
+ "maxLength": 256,
3018
+ "description": "Description of the channel"
3019
+ },
3020
+ "messages": {
3021
+ "type": "object",
3022
+ "additionalProperties": {
3023
+ "type": "object",
3024
+ "properties": {
3025
+ "schema": {
3026
+ "type": "object",
3027
+ "additionalProperties": true
3028
+ }
3029
+ },
3030
+ "required": [
3031
+ "schema"
3032
+ ],
3033
+ "description": "Message definition",
3034
+ "additionalProperties": false
3035
+ }
3036
+ },
3037
+ "conversation": {
3038
+ "type": "object",
3039
+ "properties": {
3040
+ "tags": {
3041
+ "type": "object",
3042
+ "additionalProperties": {
3043
+ "type": "object",
3044
+ "properties": {
3045
+ "title": {
3046
+ "type": "string",
3047
+ "maxLength": 64,
3048
+ "description": "Title of the tag"
3049
+ },
3050
+ "description": {
3051
+ "type": "string",
3052
+ "maxLength": 256,
3053
+ "description": "Description of the tag"
3054
+ }
3055
+ },
3056
+ "description": "Definition of a tag that can be provided on the object",
3057
+ "additionalProperties": false
3058
+ }
3059
+ },
3060
+ "creation": {
3061
+ "type": "object",
3062
+ "properties": {
3063
+ "enabled": {
3064
+ "type": "boolean",
3065
+ "description": "Enable conversation creation"
3066
+ },
3067
+ "requiredTags": {
3068
+ "type": "array",
3069
+ "items": {
3070
+ "type": "string"
3071
+ },
3072
+ "description": "The list of tags that are required to be specified when calling the API directly to create a conversation."
3073
+ }
3074
+ },
3075
+ "required": [
3076
+ "enabled",
3077
+ "requiredTags"
3078
+ ],
3079
+ "description": "The conversation creation setting determines how to create a conversation through the API directly. The integration will have to implement the `createConversation` functionality to support this setting.",
3080
+ "additionalProperties": false
3081
+ }
3082
+ },
3083
+ "required": [
3084
+ "tags",
3085
+ "creation"
3086
+ ],
3087
+ "description": "Conversation object configuration",
3088
+ "additionalProperties": false
3089
+ },
3090
+ "message": {
3091
+ "type": "object",
3092
+ "properties": {
3093
+ "tags": {
3094
+ "type": "object",
3095
+ "additionalProperties": {
3096
+ "type": "object",
3097
+ "properties": {
3098
+ "title": {
3099
+ "type": "string",
3100
+ "maxLength": 64,
3101
+ "description": "Title of the tag"
3102
+ },
3103
+ "description": {
3104
+ "type": "string",
3105
+ "maxLength": 256,
3106
+ "description": "Description of the tag"
3107
+ }
3108
+ },
3109
+ "description": "Definition of a tag that can be provided on the object",
3110
+ "additionalProperties": false
3111
+ }
3112
+ }
3113
+ },
3114
+ "required": [
3115
+ "tags"
3116
+ ],
3117
+ "description": "Message object configuration",
3118
+ "additionalProperties": false
3119
+ }
3120
+ },
3121
+ "required": [
3122
+ "messages",
3123
+ "conversation",
3124
+ "message"
3125
+ ],
3126
+ "description": "Channel definition",
3127
+ "additionalProperties": false
3128
+ }
3129
+ },
3130
+ "states": {
3131
+ "type": "object",
3132
+ "additionalProperties": {
3133
+ "type": "object",
3134
+ "properties": {
3135
+ "type": {
3136
+ "type": "string",
3137
+ "enum": [
3138
+ "conversation",
3139
+ "user",
3140
+ "integration"
3141
+ ],
3142
+ "description": "Type of the [State](#schema_state) (`conversation`, `user` or `integration`)"
3143
+ },
3144
+ "schema": {
3145
+ "type": "object",
3146
+ "additionalProperties": true,
3147
+ "description": "Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data."
3148
+ }
3149
+ },
3150
+ "required": [
3151
+ "type",
3152
+ "schema"
3153
+ ],
3154
+ "description": "State definition",
3155
+ "additionalProperties": false
3156
+ }
3157
+ },
3158
+ "events": {
3159
+ "type": "object",
3160
+ "additionalProperties": {
3161
+ "type": "object",
3162
+ "properties": {
3163
+ "title": {
3164
+ "type": "string",
3165
+ "maxLength": 64,
3166
+ "description": "Title of the event"
3167
+ },
3168
+ "description": {
3169
+ "type": "string",
3170
+ "maxLength": 256,
3171
+ "description": "Description of the event"
3172
+ },
3173
+ "schema": {
3174
+ "type": "object",
3175
+ "additionalProperties": true
3176
+ }
3177
+ },
3178
+ "required": [
3179
+ "schema"
3180
+ ],
3181
+ "description": "Event Definition",
3182
+ "additionalProperties": false
3183
+ }
3184
+ },
3185
+ "actions": {
3186
+ "type": "object",
3187
+ "additionalProperties": {
3188
+ "type": "object",
3189
+ "properties": {
3190
+ "title": {
3191
+ "type": "string",
3192
+ "maxLength": 64,
3193
+ "description": "Title of the action"
3194
+ },
3195
+ "description": {
3196
+ "type": "string",
3197
+ "maxLength": 256,
3198
+ "description": "Description of the action"
3199
+ },
3200
+ "input": {
3201
+ "type": "object",
3202
+ "properties": {
3203
+ "schema": {
3204
+ "type": "object",
3205
+ "additionalProperties": true
3206
+ }
3207
+ },
3208
+ "required": [
3209
+ "schema"
3210
+ ],
3211
+ "additionalProperties": false
3212
+ },
3213
+ "output": {
3214
+ "type": "object",
3215
+ "properties": {
3216
+ "schema": {
3217
+ "type": "object",
3218
+ "additionalProperties": true
3219
+ }
3220
+ },
3221
+ "required": [
3222
+ "schema"
3223
+ ],
3224
+ "additionalProperties": false
3225
+ }
3226
+ },
3227
+ "required": [
3228
+ "input",
3229
+ "output"
3230
+ ],
3231
+ "description": "Action definition",
3232
+ "additionalProperties": false
3233
+ }
3234
+ },
3235
+ "user": {
3236
+ "type": "object",
3237
+ "properties": {
3238
+ "tags": {
3239
+ "type": "object",
3240
+ "additionalProperties": {
3241
+ "type": "object",
3242
+ "properties": {
3243
+ "title": {
3244
+ "type": "string",
3245
+ "maxLength": 64,
3246
+ "description": "Title of the tag"
3247
+ },
3248
+ "description": {
3249
+ "type": "string",
3250
+ "maxLength": 256,
3251
+ "description": "Description of the tag"
3252
+ }
3253
+ },
3254
+ "description": "Definition of a tag that can be provided on the object",
3255
+ "additionalProperties": false
3256
+ }
3257
+ },
3258
+ "creation": {
3259
+ "type": "object",
3260
+ "properties": {
3261
+ "enabled": {
3262
+ "type": "boolean",
3263
+ "description": "Enable user creation"
3264
+ },
3265
+ "requiredTags": {
3266
+ "type": "array",
3267
+ "items": {
3268
+ "type": "string"
3269
+ },
3270
+ "description": "The list of tags that are required to be specified when calling the API directly to create a user."
3271
+ }
3272
+ },
3273
+ "required": [
3274
+ "enabled",
3275
+ "requiredTags"
3276
+ ],
3277
+ "description": "The user creation setting determines how to create a user through the API directly. The integration will have to implement the `createUser` functionality to support this setting.",
3278
+ "additionalProperties": false
3279
+ }
3280
+ },
3281
+ "required": [
3282
+ "tags",
3283
+ "creation"
3284
+ ],
3285
+ "description": "User object configuration",
3286
+ "additionalProperties": false
3287
+ },
3288
+ "entities": {
3289
+ "type": "object",
3290
+ "additionalProperties": {
3291
+ "type": "object",
3292
+ "properties": {
3293
+ "title": {
3294
+ "type": "string",
3295
+ "maxLength": 64,
3296
+ "description": "Title of the entity"
3297
+ },
3298
+ "description": {
3299
+ "type": "string",
3300
+ "maxLength": 256,
3301
+ "description": "Description of the entity"
3302
+ },
3303
+ "schema": {
3304
+ "type": "object",
3305
+ "additionalProperties": true
3306
+ }
3307
+ },
3308
+ "required": [
3309
+ "schema"
3310
+ ],
3311
+ "description": "Entity definition",
3312
+ "additionalProperties": false
3313
+ }
3314
+ },
3315
+ "dev": {
3316
+ "type": "boolean",
3317
+ "description": "Indicates if the integration is a development integration; Dev integrations run locally"
3318
+ },
3319
+ "title": {
3320
+ "type": "string",
3321
+ "minLength": 1,
3322
+ "maxLength": 64,
3323
+ "description": "Title of the integration. This is the name that will be displayed in the UI"
3324
+ },
3325
+ "description": {
3326
+ "type": "string",
3327
+ "maxLength": 256,
3328
+ "description": "Description of the integration. This is the description that will be displayed in the UI"
3329
+ },
3330
+ "iconUrl": {
3331
+ "type": "string",
3332
+ "description": "URL of the icon of the integration. This is the icon that will be displayed in the UI"
3333
+ },
3334
+ "readmeUrl": {
3335
+ "type": "string",
3336
+ "description": "URL of the readme of the integration. This is the readme that will be displayed in the UI"
3337
+ },
3338
+ "secrets": {
3339
+ "type": "array",
3340
+ "items": {
3341
+ "type": "string"
3342
+ },
3343
+ "description": "Secrets are integration-wide values available in the code via environment variables formatted with a SECRET_ prefix followed by your secret name. A secret name must respect SCREAMING_SNAKE casing."
3344
+ },
3345
+ "ownerWorkspace": {
3346
+ "type": "object",
3347
+ "properties": {
3348
+ "id": {
3349
+ "type": "string"
3350
+ },
3351
+ "handle": {
3352
+ "type": "string",
3353
+ "nullable": true
3354
+ },
3355
+ "name": {
3356
+ "type": "string"
3357
+ }
3358
+ },
3359
+ "required": [
3360
+ "id",
3361
+ "handle",
3362
+ "name"
3363
+ ],
3364
+ "additionalProperties": false
3365
+ }
3366
+ },
3367
+ "required": [
3368
+ "id",
3369
+ "createdAt",
3370
+ "updatedAt",
3371
+ "identifier",
3372
+ "name",
3373
+ "version",
3374
+ "configuration",
3375
+ "channels",
3376
+ "states",
3377
+ "events",
3378
+ "actions",
3379
+ "user",
3380
+ "entities",
3381
+ "dev",
3382
+ "title",
3383
+ "description",
3384
+ "iconUrl",
3385
+ "readmeUrl",
3386
+ "secrets",
3387
+ "ownerWorkspace"
3388
+ ],
3389
+ "additionalProperties": false
2447
3390
  }
2448
3391
  },
2449
3392
  "required": [
@@ -4915,7 +5858,7 @@ export const state = {
4915
5858
  "type": "string",
4916
5859
  "minLength": 1,
4917
5860
  "maxLength": 64,
4918
- "pattern": "^[0-9a-z][a-z0-9-]+[0-9a-z]$"
5861
+ "pattern": "^[0-9a-z][a-z0-9-_]+[0-9a-z]$"
4919
5862
  }
4920
5863
  },
4921
5864
  "additionalProperties": false,
@@ -7121,7 +8064,7 @@ export const state = {
7121
8064
  }
7122
8065
  },
7123
8066
  "parameters": {
7124
- "x-filename": {
8067
+ "x-name": {
7125
8068
  "type": "string",
7126
8069
  "description": "File name",
7127
8070
  "in": "header",
@@ -7134,42 +8077,23 @@ export const state = {
7134
8077
  },
7135
8078
  "x-access-policies": {
7136
8079
  "type": "string",
7137
- "description": "File access policies",
8080
+ "description": "File access policies, comma-separated. Add \"public_content\" to allow public access to the file content. Add \"integrations\" to allo read, search and list operations for any integration installed in the bot.",
8081
+ "in": "header"
8082
+ },
8083
+ "x-index": {
8084
+ "type": "string",
8085
+ "description": "Set to a value of \"true\" to index the file in vector storage. Only PDFs, Office documents, and text-based files are currently supported. Note that if a file is indexed, it will count towards the Vector Storage quota of the workspace rather than the File Storage quota.",
7138
8086
  "in": "header"
7139
8087
  },
7140
8088
  "Content-Type": {
7141
8089
  "type": "string",
7142
- "description": "File content type",
8090
+ "description": "File content type. If omitted, the content type will be inferred from the file extension. If a type cannot be inferred, the default is \"application/octet-stream\".",
7143
8091
  "in": "header"
7144
8092
  },
7145
8093
  "Content-Length": {
7146
8094
  "type": "string",
7147
8095
  "description": "File content length",
7148
8096
  "in": "header"
7149
- },
7150
- "x-bot-id": {
7151
- "in": "header",
7152
- "description": "Bot id",
7153
- "type": "string",
7154
- "required": true
7155
- },
7156
- "x-integration-id": {
7157
- "in": "header",
7158
- "description": "Integration id",
7159
- "type": "string",
7160
- "required": false
7161
- },
7162
- "x-user-id": {
7163
- "in": "header",
7164
- "description": "User id",
7165
- "type": "string",
7166
- "required": false
7167
- },
7168
- "x-user-role": {
7169
- "in": "header",
7170
- "description": "User role",
7171
- "type": "string",
7172
- "required": false
7173
8097
  }
7174
8098
  },
7175
8099
  "contentType": "*/*",
@@ -7188,13 +8112,16 @@ export const state = {
7188
8112
  "botId": {
7189
8113
  "type": "string"
7190
8114
  },
7191
- "filename": {
8115
+ "name": {
7192
8116
  "type": "string"
7193
8117
  },
7194
- "bytes": {
8118
+ "size": {
7195
8119
  "type": "number",
7196
8120
  "nullable": true
7197
8121
  },
8122
+ "contentType": {
8123
+ "type": "string"
8124
+ },
7198
8125
  "tags": {
7199
8126
  "type": "object",
7200
8127
  "additionalProperties": {
@@ -7214,13 +8141,26 @@ export const state = {
7214
8141
  "items": {
7215
8142
  "type": "string"
7216
8143
  }
8144
+ },
8145
+ "indexingStatus": {
8146
+ "type": "string",
8147
+ "enum": [
8148
+ "PENDING",
8149
+ "IN_PROGRESS",
8150
+ "COMPLETE",
8151
+ "FAILED"
8152
+ ]
8153
+ },
8154
+ "indexingFailureReason": {
8155
+ "type": "string"
7217
8156
  }
7218
8157
  },
7219
8158
  "required": [
7220
8159
  "id",
7221
8160
  "botId",
7222
- "filename",
7223
- "bytes",
8161
+ "name",
8162
+ "size",
8163
+ "contentType",
7224
8164
  "tags",
7225
8165
  "createdAt",
7226
8166
  "updatedAt",
@@ -7248,30 +8188,6 @@ export const state = {
7248
8188
  "type": "string",
7249
8189
  "description": "File ID",
7250
8190
  "in": "path"
7251
- },
7252
- "x-bot-id": {
7253
- "in": "header",
7254
- "description": "Bot id",
7255
- "type": "string",
7256
- "required": true
7257
- },
7258
- "x-integration-id": {
7259
- "in": "header",
7260
- "description": "Integration id",
7261
- "type": "string",
7262
- "required": false
7263
- },
7264
- "x-user-id": {
7265
- "in": "header",
7266
- "description": "User id",
7267
- "type": "string",
7268
- "required": false
7269
- },
7270
- "x-user-role": {
7271
- "in": "header",
7272
- "description": "User role",
7273
- "type": "string",
7274
- "required": false
7275
8191
  }
7276
8192
  },
7277
8193
  "response": {
@@ -7295,30 +8211,6 @@ export const state = {
7295
8211
  "description": "Provide the `meta.nextToken` value provided in the last API response to retrieve the next page of results",
7296
8212
  "type": "string"
7297
8213
  },
7298
- "x-bot-id": {
7299
- "in": "header",
7300
- "description": "Bot id",
7301
- "type": "string",
7302
- "required": true
7303
- },
7304
- "x-integration-id": {
7305
- "in": "header",
7306
- "description": "Integration id",
7307
- "type": "string",
7308
- "required": false
7309
- },
7310
- "x-user-id": {
7311
- "in": "header",
7312
- "description": "User id",
7313
- "type": "string",
7314
- "required": false
7315
- },
7316
- "x-user-role": {
7317
- "in": "header",
7318
- "description": "User role",
7319
- "type": "string",
7320
- "required": false
7321
- },
7322
8214
  "botId": {
7323
8215
  "type": "string",
7324
8216
  "description": "Bot ID",
@@ -7326,8 +8218,14 @@ export const state = {
7326
8218
  },
7327
8219
  "tags": {
7328
8220
  "in": "query",
7329
- "type": "string",
7330
- "description": "Tags to filter files by as a JSON string representing an object of key-value pairs to match files' tags against."
8221
+ "description": "Filter by tags",
8222
+ "type": "object",
8223
+ "schema": {
8224
+ "type": "object",
8225
+ "additionalProperties": {
8226
+ "type": "string"
8227
+ }
8228
+ }
7331
8229
  }
7332
8230
  },
7333
8231
  "response": {
@@ -7346,13 +8244,24 @@ export const state = {
7346
8244
  "botId": {
7347
8245
  "type": "string"
7348
8246
  },
7349
- "filename": {
8247
+ "name": {
7350
8248
  "type": "string"
7351
8249
  },
7352
- "bytes": {
8250
+ "size": {
7353
8251
  "type": "number",
7354
8252
  "nullable": true
7355
8253
  },
8254
+ "contentType": {
8255
+ "type": "string"
8256
+ },
8257
+ "tags": {
8258
+ "type": "object",
8259
+ "additionalProperties": {
8260
+ "type": "string",
8261
+ "maxLength": 1000
8262
+ },
8263
+ "description": "Set of tags that you can attach to a file. Individual keys can be unset by setting them to a `null` value."
8264
+ },
7356
8265
  "createdAt": {
7357
8266
  "type": "string"
7358
8267
  },
@@ -7364,13 +8273,27 @@ export const state = {
7364
8273
  "items": {
7365
8274
  "type": "string"
7366
8275
  }
8276
+ },
8277
+ "indexingStatus": {
8278
+ "type": "string",
8279
+ "enum": [
8280
+ "PENDING",
8281
+ "IN_PROGRESS",
8282
+ "COMPLETE",
8283
+ "FAILED"
8284
+ ]
8285
+ },
8286
+ "indexingFailureReason": {
8287
+ "type": "string"
7367
8288
  }
7368
8289
  },
7369
8290
  "required": [
7370
8291
  "id",
7371
8292
  "botId",
7372
- "filename",
7373
- "bytes",
8293
+ "name",
8294
+ "size",
8295
+ "contentType",
8296
+ "tags",
7374
8297
  "createdAt",
7375
8298
  "updatedAt",
7376
8299
  "accessPolicies"
@@ -7408,30 +8331,6 @@ export const state = {
7408
8331
  "type": "string",
7409
8332
  "description": "File ID",
7410
8333
  "in": "path"
7411
- },
7412
- "x-bot-id": {
7413
- "in": "header",
7414
- "description": "Bot id",
7415
- "type": "string",
7416
- "required": true
7417
- },
7418
- "x-integration-id": {
7419
- "in": "header",
7420
- "description": "Integration id",
7421
- "type": "string",
7422
- "required": false
7423
- },
7424
- "x-user-id": {
7425
- "in": "header",
7426
- "description": "User id",
7427
- "type": "string",
7428
- "required": false
7429
- },
7430
- "x-user-role": {
7431
- "in": "header",
7432
- "description": "User role",
7433
- "type": "string",
7434
- "required": false
7435
8334
  }
7436
8335
  },
7437
8336
  "response": {
@@ -7448,13 +8347,16 @@ export const state = {
7448
8347
  "botId": {
7449
8348
  "type": "string"
7450
8349
  },
7451
- "filename": {
8350
+ "name": {
7452
8351
  "type": "string"
7453
8352
  },
7454
- "bytes": {
8353
+ "size": {
7455
8354
  "type": "number",
7456
8355
  "nullable": true
7457
8356
  },
8357
+ "contentType": {
8358
+ "type": "string"
8359
+ },
7458
8360
  "tags": {
7459
8361
  "type": "object",
7460
8362
  "additionalProperties": {
@@ -7474,13 +8376,26 @@ export const state = {
7474
8376
  "items": {
7475
8377
  "type": "string"
7476
8378
  }
8379
+ },
8380
+ "indexingStatus": {
8381
+ "type": "string",
8382
+ "enum": [
8383
+ "PENDING",
8384
+ "IN_PROGRESS",
8385
+ "COMPLETE",
8386
+ "FAILED"
8387
+ ]
8388
+ },
8389
+ "indexingFailureReason": {
8390
+ "type": "string"
7477
8391
  }
7478
8392
  },
7479
8393
  "required": [
7480
8394
  "id",
7481
8395
  "botId",
7482
- "filename",
7483
- "bytes",
8396
+ "name",
8397
+ "size",
8398
+ "contentType",
7484
8399
  "tags",
7485
8400
  "createdAt",
7486
8401
  "updatedAt",
@@ -7508,30 +8423,6 @@ export const state = {
7508
8423
  "type": "string",
7509
8424
  "description": "File ID",
7510
8425
  "in": "path"
7511
- },
7512
- "x-bot-id": {
7513
- "in": "header",
7514
- "description": "Bot id",
7515
- "type": "string",
7516
- "required": true
7517
- },
7518
- "x-integration-id": {
7519
- "in": "header",
7520
- "description": "Integration id",
7521
- "type": "string",
7522
- "required": false
7523
- },
7524
- "x-user-id": {
7525
- "in": "header",
7526
- "description": "User id",
7527
- "type": "string",
7528
- "required": false
7529
- },
7530
- "x-user-role": {
7531
- "in": "header",
7532
- "description": "User role",
7533
- "type": "string",
7534
- "required": false
7535
8426
  }
7536
8427
  },
7537
8428
  "response": {
@@ -7563,30 +8454,6 @@ export const state = {
7563
8454
  "type": "string",
7564
8455
  "description": "File ID",
7565
8456
  "in": "path"
7566
- },
7567
- "x-bot-id": {
7568
- "in": "header",
7569
- "description": "Bot id",
7570
- "type": "string",
7571
- "required": true
7572
- },
7573
- "x-integration-id": {
7574
- "in": "header",
7575
- "description": "Integration id",
7576
- "type": "string",
7577
- "required": false
7578
- },
7579
- "x-user-id": {
7580
- "in": "header",
7581
- "description": "User id",
7582
- "type": "string",
7583
- "required": false
7584
- },
7585
- "x-user-role": {
7586
- "in": "header",
7587
- "description": "User role",
7588
- "type": "string",
7589
- "required": false
7590
8457
  }
7591
8458
  },
7592
8459
  "requestBody": {
@@ -7632,6 +8499,86 @@ export const state = {
7632
8499
  }
7633
8500
  }
7634
8501
  },
8502
+ "searchFiles": {
8503
+ "name": "searchFiles",
8504
+ "path": "/v1/files/bot/{botId}/search",
8505
+ "description": "Search files",
8506
+ "method": "get",
8507
+ "section": "files",
8508
+ "parameters": {
8509
+ "botId": {
8510
+ "type": "string",
8511
+ "description": "Bot ID",
8512
+ "in": "path"
8513
+ },
8514
+ "tags": {
8515
+ "in": "query",
8516
+ "description": "Filter by tags",
8517
+ "type": "object",
8518
+ "schema": {
8519
+ "type": "object",
8520
+ "additionalProperties": {
8521
+ "type": "string"
8522
+ }
8523
+ }
8524
+ },
8525
+ "query": {
8526
+ "in": "query",
8527
+ "type": "string",
8528
+ "description": "Query expressed in natural language to retrieve matching text passages within all files using semantical search.",
8529
+ "required": true
8530
+ },
8531
+ "limit": {
8532
+ "in": "query",
8533
+ "type": "string",
8534
+ "description": "The maximum number of passages to return."
8535
+ }
8536
+ },
8537
+ "response": {
8538
+ "description": "Returns the passages matching the query.",
8539
+ "schema": {
8540
+ "type": "object",
8541
+ "properties": {
8542
+ "passages": {
8543
+ "type": "array",
8544
+ "items": {
8545
+ "type": "object",
8546
+ "properties": {
8547
+ "fileId": {
8548
+ "type": "string"
8549
+ },
8550
+ "score": {
8551
+ "type": "number"
8552
+ },
8553
+ "content": {
8554
+ "type": "string"
8555
+ },
8556
+ "tags": {
8557
+ "type": "object",
8558
+ "additionalProperties": {
8559
+ "type": "string",
8560
+ "maxLength": 1000
8561
+ },
8562
+ "description": "Set of tags that you can attach to a file. Individual keys can be unset by setting them to a `null` value."
8563
+ }
8564
+ },
8565
+ "required": [
8566
+ "fileId",
8567
+ "score",
8568
+ "content",
8569
+ "tags"
8570
+ ]
8571
+ }
8572
+ }
8573
+ },
8574
+ "required": [
8575
+ "passages"
8576
+ ],
8577
+ "title": "searchFilesResponse",
8578
+ "additionalProperties": false
8579
+ }
8580
+ }
8581
+ },
7635
8582
  "listTables": {
7636
8583
  "name": "listTables",
7637
8584
  "path": "/v1/tables",
@@ -8340,7 +9287,7 @@ export const state = {
8340
9287
  "title": "Botpress API",
8341
9288
  "description": "API for Botpress Cloud",
8342
9289
  "server": "https://api.botpress.cloud",
8343
- "version": "0.19.1",
9290
+ "version": "0.19.3",
8344
9291
  "prefix": "v1"
8345
9292
  },
8346
9293
  "errors": [
@@ -8607,6 +9554,7 @@ export const state = {
8607
9554
  "getFileMetadataResponse": true,
8608
9555
  "getFileContentResponse": true,
8609
9556
  "updateFileMetadataResponse": true,
9557
+ "searchFilesResponse": true,
8610
9558
  "listTablesResponse": true,
8611
9559
  "getTableResponse": true,
8612
9560
  "createTableResponse": true,
@@ -10632,13 +11580,16 @@ export const state = {
10632
11580
  "botId": {
10633
11581
  "type": "string"
10634
11582
  },
10635
- "filename": {
11583
+ "name": {
10636
11584
  "type": "string"
10637
11585
  },
10638
- "bytes": {
11586
+ "size": {
10639
11587
  "type": "number",
10640
11588
  "nullable": true
10641
11589
  },
11590
+ "contentType": {
11591
+ "type": "string"
11592
+ },
10642
11593
  "tags": {
10643
11594
  "type": "object",
10644
11595
  "additionalProperties": {
@@ -10658,13 +11609,26 @@ export const state = {
10658
11609
  "items": {
10659
11610
  "type": "string"
10660
11611
  }
11612
+ },
11613
+ "indexingStatus": {
11614
+ "type": "string",
11615
+ "enum": [
11616
+ "PENDING",
11617
+ "IN_PROGRESS",
11618
+ "COMPLETE",
11619
+ "FAILED"
11620
+ ]
11621
+ },
11622
+ "indexingFailureReason": {
11623
+ "type": "string"
10661
11624
  }
10662
11625
  },
10663
11626
  "required": [
10664
11627
  "id",
10665
11628
  "botId",
10666
- "filename",
10667
- "bytes",
11629
+ "name",
11630
+ "size",
11631
+ "contentType",
10668
11632
  "tags",
10669
11633
  "createdAt",
10670
11634
  "updatedAt",
@@ -10934,7 +11898,8 @@ export const state = {
10934
11898
  "listFiles",
10935
11899
  "getFileMetadata",
10936
11900
  "getFileContent",
10937
- "updateFileMetadata"
11901
+ "updateFileMetadata",
11902
+ "searchFiles"
10938
11903
  ],
10939
11904
  "schema": "File"
10940
11905
  }