@botpress/api 0.2.2 → 0.3.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.
package/src/gen/state.ts CHANGED
@@ -1466,34 +1466,6 @@ export const state = {
1466
1466
  },
1467
1467
  description: "A mapping of states to their definition",
1468
1468
  },
1469
- tags: {
1470
- type: "object",
1471
- properties: {
1472
- messages: {
1473
- default: [],
1474
- type: "array",
1475
- items: {
1476
- type: "string",
1477
- },
1478
- },
1479
- conversations: {
1480
- default: [],
1481
- type: "array",
1482
- items: {
1483
- type: "string",
1484
- },
1485
- },
1486
- users: {
1487
- default: [],
1488
- type: "array",
1489
- items: {
1490
- type: "string",
1491
- },
1492
- },
1493
- },
1494
- description: "Tags of the bot",
1495
- additionalProperties: false,
1496
- },
1497
1469
  events: {
1498
1470
  type: "object",
1499
1471
  additionalProperties: {
@@ -1505,7 +1477,7 @@ export const state = {
1505
1477
  },
1506
1478
  },
1507
1479
  required: ["schema"],
1508
- description: "Event schema",
1480
+ description: "Event Definition",
1509
1481
  additionalProperties: false,
1510
1482
  },
1511
1483
  description: "Events definition",
@@ -1555,6 +1527,81 @@ export const state = {
1555
1527
  },
1556
1528
  additionalProperties: false,
1557
1529
  },
1530
+ user: {
1531
+ type: "object",
1532
+ properties: {
1533
+ tags: {
1534
+ type: "object",
1535
+ additionalProperties: {
1536
+ type: "object",
1537
+ properties: {
1538
+ title: {
1539
+ type: "string",
1540
+ description: "Title of the tag",
1541
+ },
1542
+ description: {
1543
+ type: "string",
1544
+ description: "Description of the tag",
1545
+ },
1546
+ },
1547
+ description:
1548
+ "Definition of a tag that can be provided on the object",
1549
+ additionalProperties: false,
1550
+ },
1551
+ },
1552
+ },
1553
+ additionalProperties: false,
1554
+ },
1555
+ conversation: {
1556
+ type: "object",
1557
+ properties: {
1558
+ tags: {
1559
+ type: "object",
1560
+ additionalProperties: {
1561
+ type: "object",
1562
+ properties: {
1563
+ title: {
1564
+ type: "string",
1565
+ description: "Title of the tag",
1566
+ },
1567
+ description: {
1568
+ type: "string",
1569
+ description: "Description of the tag",
1570
+ },
1571
+ },
1572
+ description:
1573
+ "Definition of a tag that can be provided on the object",
1574
+ additionalProperties: false,
1575
+ },
1576
+ },
1577
+ },
1578
+ additionalProperties: false,
1579
+ },
1580
+ message: {
1581
+ type: "object",
1582
+ properties: {
1583
+ tags: {
1584
+ type: "object",
1585
+ additionalProperties: {
1586
+ type: "object",
1587
+ properties: {
1588
+ title: {
1589
+ type: "string",
1590
+ description: "Title of the tag",
1591
+ },
1592
+ description: {
1593
+ type: "string",
1594
+ description: "Description of the tag",
1595
+ },
1596
+ },
1597
+ description:
1598
+ "Definition of a tag that can be provided on the object",
1599
+ additionalProperties: false,
1600
+ },
1601
+ },
1602
+ },
1603
+ additionalProperties: false,
1604
+ },
1558
1605
  code: {
1559
1606
  type: "string",
1560
1607
  description: "JavaScript code of the bot",
@@ -1641,61 +1688,102 @@ export const state = {
1641
1688
  description:
1642
1689
  "Type of the [Bot](#schema_bot) authentication (`iam`)",
1643
1690
  },
1644
- states: {
1691
+ configuration: {
1645
1692
  type: "object",
1646
- additionalProperties: {
1647
- type: "object",
1648
- properties: {
1649
- type: {
1650
- type: "string",
1651
- enum: ["conversation", "user", "bot"],
1652
- description:
1653
- "Type of the [State](#schema_state) (`conversation`, `user` or `bot`)",
1654
- },
1655
- schema: {
1693
+ properties: {
1694
+ data: {
1695
+ type: "object",
1696
+ additionalProperties: true,
1697
+ description: "Configuration data",
1698
+ },
1699
+ schema: {
1700
+ type: "object",
1701
+ additionalProperties: true,
1702
+ description:
1703
+ "Schema of the configuration in the `JSON schema` format. The configuration data is validated against this `JSON schema`.",
1704
+ },
1705
+ },
1706
+ additionalProperties: false,
1707
+ },
1708
+ blocked: {
1709
+ type: "boolean",
1710
+ },
1711
+ user: {
1712
+ type: "object",
1713
+ properties: {
1714
+ tags: {
1715
+ type: "object",
1716
+ additionalProperties: {
1656
1717
  type: "object",
1657
- additionalProperties: true,
1658
- description:
1659
- "Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.",
1660
- },
1661
- expiry: {
1662
- type: "number",
1663
- minimum: 1,
1718
+ properties: {
1719
+ title: {
1720
+ type: "string",
1721
+ description: "Title of the tag",
1722
+ },
1723
+ description: {
1724
+ type: "string",
1725
+ description: "Description of the tag",
1726
+ },
1727
+ },
1664
1728
  description:
1665
- "Expiry of the [State](#schema_state) in milliseconds. The state will expire if it is idle for the configured value. By default, a state doesn't expire.",
1729
+ "Definition of a tag that can be provided on the object",
1730
+ nullable: true,
1731
+ additionalProperties: false,
1666
1732
  },
1667
1733
  },
1668
- required: ["type", "schema"],
1669
- additionalProperties: false,
1670
1734
  },
1671
- description: "A mapping of states to their definition",
1735
+ additionalProperties: false,
1672
1736
  },
1673
- tags: {
1737
+ message: {
1674
1738
  type: "object",
1675
1739
  properties: {
1676
- messages: {
1677
- default: [],
1678
- type: "array",
1679
- items: {
1680
- type: "string",
1681
- },
1682
- },
1683
- conversations: {
1684
- default: [],
1685
- type: "array",
1686
- items: {
1687
- type: "string",
1740
+ tags: {
1741
+ type: "object",
1742
+ additionalProperties: {
1743
+ type: "object",
1744
+ properties: {
1745
+ title: {
1746
+ type: "string",
1747
+ description: "Title of the tag",
1748
+ },
1749
+ description: {
1750
+ type: "string",
1751
+ description: "Description of the tag",
1752
+ },
1753
+ },
1754
+ description:
1755
+ "Definition of a tag that can be provided on the object",
1756
+ nullable: true,
1757
+ additionalProperties: false,
1688
1758
  },
1689
1759
  },
1690
- users: {
1691
- default: [],
1692
- type: "array",
1693
- items: {
1694
- type: "string",
1760
+ },
1761
+ additionalProperties: false,
1762
+ },
1763
+ conversation: {
1764
+ type: "object",
1765
+ properties: {
1766
+ tags: {
1767
+ type: "object",
1768
+ additionalProperties: {
1769
+ type: "object",
1770
+ properties: {
1771
+ title: {
1772
+ type: "string",
1773
+ description: "Title of the tag",
1774
+ },
1775
+ description: {
1776
+ type: "string",
1777
+ description: "Description of the tag",
1778
+ },
1779
+ },
1780
+ description:
1781
+ "Definition of a tag that can be provided on the object",
1782
+ nullable: true,
1783
+ additionalProperties: false,
1695
1784
  },
1696
1785
  },
1697
1786
  },
1698
- description: "Tags of the bot",
1699
1787
  additionalProperties: false,
1700
1788
  },
1701
1789
  events: {
@@ -1709,10 +1797,39 @@ export const state = {
1709
1797
  },
1710
1798
  },
1711
1799
  required: ["schema"],
1712
- description: "Event schema",
1800
+ description: "Event Definition",
1801
+ nullable: true,
1802
+ additionalProperties: false,
1803
+ },
1804
+ },
1805
+ states: {
1806
+ type: "object",
1807
+ additionalProperties: {
1808
+ type: "object",
1809
+ properties: {
1810
+ type: {
1811
+ type: "string",
1812
+ enum: ["conversation", "user", "bot"],
1813
+ description:
1814
+ "Type of the [State](#schema_state) (`conversation`, `user` or `bot`)",
1815
+ },
1816
+ schema: {
1817
+ type: "object",
1818
+ additionalProperties: true,
1819
+ description:
1820
+ "Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.",
1821
+ },
1822
+ expiry: {
1823
+ type: "number",
1824
+ minimum: 1,
1825
+ description:
1826
+ "Expiry of the [State](#schema_state) in milliseconds. The state will expire if it is idle for the configured value. By default, a state doesn't expire.",
1827
+ },
1828
+ },
1829
+ required: ["type", "schema"],
1830
+ nullable: true,
1713
1831
  additionalProperties: false,
1714
1832
  },
1715
- description: "Events definition",
1716
1833
  },
1717
1834
  recurringEvents: {
1718
1835
  type: "object",
@@ -1738,29 +1855,9 @@ export const state = {
1738
1855
  },
1739
1856
  },
1740
1857
  required: ["schedule", "type", "payload"],
1858
+ nullable: true,
1741
1859
  additionalProperties: false,
1742
1860
  },
1743
- description: "Recurring events",
1744
- },
1745
- configuration: {
1746
- type: "object",
1747
- properties: {
1748
- data: {
1749
- type: "object",
1750
- additionalProperties: true,
1751
- description: "Configuration data",
1752
- },
1753
- schema: {
1754
- type: "object",
1755
- additionalProperties: true,
1756
- description:
1757
- "Schema of the configuration in the `JSON schema` format. The configuration data is validated against this `JSON schema`.",
1758
- },
1759
- },
1760
- additionalProperties: false,
1761
- },
1762
- blocked: {
1763
- type: "boolean",
1764
1861
  },
1765
1862
  integrations: {
1766
1863
  type: "object",
@@ -2281,93 +2378,20 @@ export const state = {
2281
2378
  type: "string",
2282
2379
  description: "Version of the [Integration](#schema_integration)",
2283
2380
  },
2284
- tags: {
2381
+ configuration: {
2285
2382
  type: "object",
2286
2383
  properties: {
2287
- users: {
2288
- default: [],
2289
- type: "array",
2290
- items: {
2291
- type: "string",
2292
- },
2384
+ schema: {
2385
+ type: "object",
2386
+ additionalProperties: true,
2387
+ description:
2388
+ "Schema of the configuration in the `JSON schema` format. The configuration data is validated against this `JSON schema`.",
2293
2389
  },
2294
2390
  },
2295
- description: "Tags of the [Integration](#schema_integration)",
2391
+ required: ["schema"],
2392
+ description: "Configuration definition",
2296
2393
  additionalProperties: false,
2297
2394
  },
2298
- channels: {
2299
- type: "object",
2300
- additionalProperties: {
2301
- type: "object",
2302
- properties: {
2303
- tags: {
2304
- type: "object",
2305
- properties: {
2306
- messages: {
2307
- default: [],
2308
- type: "array",
2309
- items: {
2310
- type: "string",
2311
- },
2312
- },
2313
- conversations: {
2314
- default: [],
2315
- type: "array",
2316
- items: {
2317
- type: "string",
2318
- },
2319
- },
2320
- },
2321
- additionalProperties: false,
2322
- },
2323
- messages: {
2324
- type: "object",
2325
- additionalProperties: {
2326
- type: "object",
2327
- properties: {
2328
- schema: {
2329
- type: "object",
2330
- additionalProperties: true,
2331
- },
2332
- },
2333
- required: ["schema"],
2334
- additionalProperties: false,
2335
- },
2336
- },
2337
- conversation: {
2338
- type: "object",
2339
- properties: {
2340
- creation: {
2341
- type: "object",
2342
- properties: {
2343
- enabled: {
2344
- type: "boolean",
2345
- description: "Enable conversation creation",
2346
- },
2347
- requiredTags: {
2348
- type: "array",
2349
- items: {
2350
- type: "string",
2351
- },
2352
- description:
2353
- "The list of tags that are required to be specified when calling the API directly to create a conversation.",
2354
- },
2355
- },
2356
- required: ["enabled", "requiredTags"],
2357
- description:
2358
- "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.",
2359
- additionalProperties: false,
2360
- },
2361
- },
2362
- required: ["creation"],
2363
- additionalProperties: false,
2364
- },
2365
- },
2366
- required: ["messages"],
2367
- additionalProperties: false,
2368
- },
2369
- description: "Channels definition",
2370
- },
2371
2395
  states: {
2372
2396
  type: "object",
2373
2397
  additionalProperties: {
@@ -2387,22 +2411,9 @@ export const state = {
2387
2411
  },
2388
2412
  },
2389
2413
  required: ["type", "schema"],
2414
+ description: "State definition",
2390
2415
  additionalProperties: false,
2391
2416
  },
2392
- description: "States definition",
2393
- },
2394
- configuration: {
2395
- type: "object",
2396
- properties: {
2397
- schema: {
2398
- type: "object",
2399
- additionalProperties: true,
2400
- description: "Schema for the configuration",
2401
- },
2402
- },
2403
- required: ["schema"],
2404
- description: "Configuration definition",
2405
- additionalProperties: false,
2406
2417
  },
2407
2418
  events: {
2408
2419
  type: "object",
@@ -2415,10 +2426,9 @@ export const state = {
2415
2426
  },
2416
2427
  },
2417
2428
  required: ["schema"],
2418
- description: "Event schema",
2429
+ description: "Event Definition",
2419
2430
  additionalProperties: false,
2420
2431
  },
2421
- description: "Events definition",
2422
2432
  },
2423
2433
  actions: {
2424
2434
  type: "object",
@@ -2449,9 +2459,105 @@ export const state = {
2449
2459
  },
2450
2460
  },
2451
2461
  required: ["input", "output"],
2462
+ description: "Action definition",
2463
+ additionalProperties: false,
2464
+ },
2465
+ },
2466
+ channels: {
2467
+ type: "object",
2468
+ additionalProperties: {
2469
+ type: "object",
2470
+ properties: {
2471
+ messages: {
2472
+ type: "object",
2473
+ additionalProperties: {
2474
+ type: "object",
2475
+ properties: {
2476
+ schema: {
2477
+ type: "object",
2478
+ additionalProperties: true,
2479
+ },
2480
+ },
2481
+ required: ["schema"],
2482
+ description: "Message definition",
2483
+ additionalProperties: false,
2484
+ },
2485
+ },
2486
+ conversation: {
2487
+ type: "object",
2488
+ properties: {
2489
+ creation: {
2490
+ type: "object",
2491
+ properties: {
2492
+ enabled: {
2493
+ type: "boolean",
2494
+ description: "Enable conversation creation",
2495
+ },
2496
+ requiredTags: {
2497
+ type: "array",
2498
+ items: {
2499
+ type: "string",
2500
+ },
2501
+ description:
2502
+ "The list of tags that are required to be specified when calling the API directly to create a conversation.",
2503
+ },
2504
+ },
2505
+ required: ["enabled", "requiredTags"],
2506
+ description:
2507
+ "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.",
2508
+ additionalProperties: false,
2509
+ },
2510
+ tags: {
2511
+ type: "object",
2512
+ additionalProperties: {
2513
+ type: "object",
2514
+ properties: {
2515
+ title: {
2516
+ type: "string",
2517
+ description: "Title of the tag",
2518
+ },
2519
+ description: {
2520
+ type: "string",
2521
+ description: "Description of the tag",
2522
+ },
2523
+ },
2524
+ description:
2525
+ "Definition of a tag that can be provided on the object",
2526
+ additionalProperties: false,
2527
+ },
2528
+ },
2529
+ },
2530
+ additionalProperties: false,
2531
+ },
2532
+ message: {
2533
+ type: "object",
2534
+ properties: {
2535
+ tags: {
2536
+ type: "object",
2537
+ additionalProperties: {
2538
+ type: "object",
2539
+ properties: {
2540
+ title: {
2541
+ type: "string",
2542
+ description: "Title of the tag",
2543
+ },
2544
+ description: {
2545
+ type: "string",
2546
+ description: "Description of the tag",
2547
+ },
2548
+ },
2549
+ description:
2550
+ "Definition of a tag that can be provided on the object",
2551
+ additionalProperties: false,
2552
+ },
2553
+ },
2554
+ },
2555
+ additionalProperties: false,
2556
+ },
2557
+ },
2558
+ required: ["messages"],
2452
2559
  additionalProperties: false,
2453
2560
  },
2454
- description: "Action definition",
2455
2561
  },
2456
2562
  user: {
2457
2563
  type: "object",
@@ -2477,18 +2583,32 @@ export const state = {
2477
2583
  "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.",
2478
2584
  additionalProperties: false,
2479
2585
  },
2586
+ tags: {
2587
+ type: "object",
2588
+ additionalProperties: {
2589
+ type: "object",
2590
+ properties: {
2591
+ title: {
2592
+ type: "string",
2593
+ description: "Title of the tag",
2594
+ },
2595
+ description: {
2596
+ type: "string",
2597
+ description: "Description of the tag",
2598
+ },
2599
+ },
2600
+ description:
2601
+ "Definition of a tag that can be provided on the object",
2602
+ additionalProperties: false,
2603
+ },
2604
+ },
2480
2605
  },
2481
- required: ["creation"],
2482
2606
  additionalProperties: false,
2483
2607
  },
2484
2608
  code: {
2485
2609
  type: "string",
2486
2610
  description: "JavaScript code of the integration",
2487
2611
  },
2488
- public: {
2489
- type: "boolean",
2490
- description: "Whether the integration is public",
2491
- },
2492
2612
  url: {
2493
2613
  type: "string",
2494
2614
  description:
@@ -2562,18 +2682,18 @@ export const state = {
2562
2682
  schema: {
2563
2683
  type: "object",
2564
2684
  properties: {
2565
- tags: {
2685
+ configuration: {
2566
2686
  type: "object",
2567
2687
  properties: {
2568
- users: {
2569
- default: [],
2570
- type: "array",
2571
- items: {
2572
- type: "string",
2573
- },
2688
+ schema: {
2689
+ type: "object",
2690
+ additionalProperties: true,
2691
+ description:
2692
+ "Schema of the configuration in the `JSON schema` format. The configuration data is validated against this `JSON schema`.",
2574
2693
  },
2575
2694
  },
2576
- description: "Tags of the [Integration](#schema_integration)",
2695
+ required: ["schema"],
2696
+ description: "Configuration definition",
2577
2697
  additionalProperties: false,
2578
2698
  },
2579
2699
  channels: {
@@ -2581,26 +2701,6 @@ export const state = {
2581
2701
  additionalProperties: {
2582
2702
  type: "object",
2583
2703
  properties: {
2584
- tags: {
2585
- type: "object",
2586
- properties: {
2587
- messages: {
2588
- default: [],
2589
- type: "array",
2590
- items: {
2591
- type: "string",
2592
- },
2593
- },
2594
- conversations: {
2595
- default: [],
2596
- type: "array",
2597
- items: {
2598
- type: "string",
2599
- },
2600
- },
2601
- },
2602
- additionalProperties: false,
2603
- },
2604
2704
  messages: {
2605
2705
  type: "object",
2606
2706
  additionalProperties: {
@@ -2612,6 +2712,8 @@ export const state = {
2612
2712
  },
2613
2713
  },
2614
2714
  required: ["schema"],
2715
+ description: "Message definition",
2716
+ nullable: true,
2615
2717
  additionalProperties: false,
2616
2718
  },
2617
2719
  },
@@ -2636,70 +2738,61 @@ export const state = {
2636
2738
  },
2637
2739
  required: ["enabled", "requiredTags"],
2638
2740
  description:
2639
- "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.",
2640
- additionalProperties: false,
2641
- },
2642
- },
2643
- required: ["creation"],
2644
- additionalProperties: false,
2645
- },
2646
- },
2647
- required: ["messages"],
2648
- additionalProperties: false,
2649
- },
2650
- description: "Channels definition",
2651
- },
2652
- states: {
2653
- type: "object",
2654
- additionalProperties: {
2655
- type: "object",
2656
- properties: {
2657
- type: {
2658
- type: "string",
2659
- enum: ["conversation", "user", "integration"],
2660
- description:
2661
- "Type of the [State](#schema_state) (`conversation`, `user` or `integration`)",
2662
- },
2663
- schema: {
2664
- type: "object",
2665
- additionalProperties: true,
2666
- description:
2667
- "Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.",
2668
- },
2669
- },
2670
- required: ["type", "schema"],
2671
- additionalProperties: false,
2672
- },
2673
- description: "States definition",
2674
- },
2675
- configuration: {
2676
- type: "object",
2677
- properties: {
2678
- schema: {
2679
- type: "object",
2680
- additionalProperties: true,
2681
- description: "Schema for the configuration",
2682
- },
2683
- },
2684
- required: ["schema"],
2685
- description: "Configuration definition",
2686
- additionalProperties: false,
2687
- },
2688
- events: {
2689
- type: "object",
2690
- additionalProperties: {
2691
- type: "object",
2692
- properties: {
2693
- schema: {
2741
+ "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.",
2742
+ additionalProperties: false,
2743
+ },
2744
+ tags: {
2745
+ type: "object",
2746
+ additionalProperties: {
2747
+ type: "object",
2748
+ properties: {
2749
+ title: {
2750
+ type: "string",
2751
+ description: "Title of the tag",
2752
+ },
2753
+ description: {
2754
+ type: "string",
2755
+ description: "Description of the tag",
2756
+ },
2757
+ },
2758
+ description:
2759
+ "Definition of a tag that can be provided on the object",
2760
+ nullable: true,
2761
+ additionalProperties: false,
2762
+ },
2763
+ },
2764
+ },
2765
+ additionalProperties: false,
2766
+ },
2767
+ message: {
2694
2768
  type: "object",
2695
- additionalProperties: true,
2769
+ properties: {
2770
+ tags: {
2771
+ type: "object",
2772
+ additionalProperties: {
2773
+ type: "object",
2774
+ properties: {
2775
+ title: {
2776
+ type: "string",
2777
+ description: "Title of the tag",
2778
+ },
2779
+ description: {
2780
+ type: "string",
2781
+ description: "Description of the tag",
2782
+ },
2783
+ },
2784
+ description:
2785
+ "Definition of a tag that can be provided on the object",
2786
+ nullable: true,
2787
+ additionalProperties: false,
2788
+ },
2789
+ },
2790
+ },
2791
+ additionalProperties: false,
2696
2792
  },
2697
2793
  },
2698
- required: ["schema"],
2699
- description: "Event schema",
2700
2794
  additionalProperties: false,
2701
2795
  },
2702
- description: "Events definition",
2703
2796
  },
2704
2797
  actions: {
2705
2798
  type: "object",
@@ -2730,9 +2823,50 @@ export const state = {
2730
2823
  },
2731
2824
  },
2732
2825
  required: ["input", "output"],
2826
+ description: "Action definition",
2827
+ nullable: true,
2828
+ additionalProperties: false,
2829
+ },
2830
+ },
2831
+ events: {
2832
+ type: "object",
2833
+ additionalProperties: {
2834
+ type: "object",
2835
+ properties: {
2836
+ schema: {
2837
+ type: "object",
2838
+ additionalProperties: true,
2839
+ },
2840
+ },
2841
+ required: ["schema"],
2842
+ description: "Event Definition",
2843
+ nullable: true,
2844
+ additionalProperties: false,
2845
+ },
2846
+ },
2847
+ states: {
2848
+ type: "object",
2849
+ additionalProperties: {
2850
+ type: "object",
2851
+ properties: {
2852
+ type: {
2853
+ type: "string",
2854
+ enum: ["conversation", "user", "integration"],
2855
+ description:
2856
+ "Type of the [State](#schema_state) (`conversation`, `user` or `integration`)",
2857
+ },
2858
+ schema: {
2859
+ type: "object",
2860
+ additionalProperties: true,
2861
+ description:
2862
+ "Schema of the [State](#schema_state) in the `JSON schema` format. This `JSON schema` is going to be used for validating the state data.",
2863
+ },
2864
+ },
2865
+ required: ["type", "schema"],
2866
+ description: "State definition",
2867
+ nullable: true,
2733
2868
  additionalProperties: false,
2734
2869
  },
2735
- description: "Action definition",
2736
2870
  },
2737
2871
  user: {
2738
2872
  type: "object",
@@ -2758,23 +2892,33 @@ export const state = {
2758
2892
  "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.",
2759
2893
  additionalProperties: false,
2760
2894
  },
2895
+ tags: {
2896
+ type: "object",
2897
+ additionalProperties: {
2898
+ type: "object",
2899
+ properties: {
2900
+ title: {
2901
+ type: "string",
2902
+ description: "Title of the tag",
2903
+ },
2904
+ description: {
2905
+ type: "string",
2906
+ description: "Description of the tag",
2907
+ },
2908
+ },
2909
+ description:
2910
+ "Definition of a tag that can be provided on the object",
2911
+ nullable: true,
2912
+ additionalProperties: false,
2913
+ },
2914
+ },
2761
2915
  },
2762
- required: ["creation"],
2763
2916
  additionalProperties: false,
2764
2917
  },
2765
2918
  code: {
2766
2919
  type: "string",
2767
2920
  description: "JavaScript code of the integration",
2768
2921
  },
2769
- public: {
2770
- type: "boolean",
2771
- description: "Whether the integration is public",
2772
- },
2773
- url: {
2774
- type: "string",
2775
- description:
2776
- "URL of the integration; Only available for dev integrations",
2777
- },
2778
2922
  icon: {
2779
2923
  type: "string",
2780
2924
  description:
@@ -2798,6 +2942,11 @@ export const state = {
2798
2942
  description:
2799
2943
  "Description of the integration. This is the description that will be displayed in the UI",
2800
2944
  },
2945
+ url: {
2946
+ type: "string",
2947
+ description:
2948
+ "URL of the integration; Only available for dev integrations",
2949
+ },
2801
2950
  },
2802
2951
  title: "updateIntegrationBody",
2803
2952
  additionalProperties: false,
@@ -3276,7 +3425,7 @@ export const state = {
3276
3425
  title: "Botpress API",
3277
3426
  description: "API for Botpress Cloud",
3278
3427
  server: "https://api.botpress.cloud",
3279
- version: "0.2.0",
3428
+ version: "0.2.2",
3280
3429
  prefix: "v1",
3281
3430
  },
3282
3431
  errors: [
@@ -3532,6 +3681,87 @@ export const state = {
3532
3681
  },
3533
3682
  description: "A mapping of integrations to their configuration",
3534
3683
  },
3684
+ user: {
3685
+ type: "object",
3686
+ properties: {
3687
+ tags: {
3688
+ type: "object",
3689
+ additionalProperties: {
3690
+ type: "object",
3691
+ properties: {
3692
+ title: {
3693
+ type: "string",
3694
+ description: "Title of the tag",
3695
+ },
3696
+ description: {
3697
+ type: "string",
3698
+ description: "Description of the tag",
3699
+ },
3700
+ },
3701
+ description:
3702
+ "Definition of a tag that can be provided on the object",
3703
+ additionalProperties: false,
3704
+ },
3705
+ },
3706
+ },
3707
+ required: ["tags"],
3708
+ description: "User object configuration",
3709
+ additionalProperties: false,
3710
+ },
3711
+ conversation: {
3712
+ type: "object",
3713
+ properties: {
3714
+ tags: {
3715
+ type: "object",
3716
+ additionalProperties: {
3717
+ type: "object",
3718
+ properties: {
3719
+ title: {
3720
+ type: "string",
3721
+ description: "Title of the tag",
3722
+ },
3723
+ description: {
3724
+ type: "string",
3725
+ description: "Description of the tag",
3726
+ },
3727
+ },
3728
+ description:
3729
+ "Definition of a tag that can be provided on the object",
3730
+ additionalProperties: false,
3731
+ },
3732
+ },
3733
+ },
3734
+ required: ["tags"],
3735
+ description: "Conversation object configuration",
3736
+ additionalProperties: false,
3737
+ },
3738
+ message: {
3739
+ type: "object",
3740
+ properties: {
3741
+ tags: {
3742
+ type: "object",
3743
+ additionalProperties: {
3744
+ type: "object",
3745
+ properties: {
3746
+ title: {
3747
+ type: "string",
3748
+ description: "Title of the tag",
3749
+ },
3750
+ description: {
3751
+ type: "string",
3752
+ description: "Description of the tag",
3753
+ },
3754
+ },
3755
+ description:
3756
+ "Definition of a tag that can be provided on the object",
3757
+ additionalProperties: false,
3758
+ },
3759
+ },
3760
+ },
3761
+ required: ["tags"],
3762
+ description: "Message object configuration",
3763
+ additionalProperties: false,
3764
+ },
3535
3765
  states: {
3536
3766
  type: "object",
3537
3767
  additionalProperties: {
@@ -3561,34 +3791,6 @@ export const state = {
3561
3791
  },
3562
3792
  description: "A mapping of states to their definition",
3563
3793
  },
3564
- tags: {
3565
- type: "object",
3566
- properties: {
3567
- messages: {
3568
- default: [],
3569
- type: "array",
3570
- items: {
3571
- type: "string",
3572
- },
3573
- },
3574
- conversations: {
3575
- default: [],
3576
- type: "array",
3577
- items: {
3578
- type: "string",
3579
- },
3580
- },
3581
- users: {
3582
- default: [],
3583
- type: "array",
3584
- items: {
3585
- type: "string",
3586
- },
3587
- },
3588
- },
3589
- description: "Tags of the bot",
3590
- additionalProperties: false,
3591
- },
3592
3794
  configuration: {
3593
3795
  type: "object",
3594
3796
  properties: {
@@ -3619,7 +3821,7 @@ export const state = {
3619
3821
  },
3620
3822
  },
3621
3823
  required: ["schema"],
3622
- description: "Event schema",
3824
+ description: "Event Definition",
3623
3825
  additionalProperties: false,
3624
3826
  },
3625
3827
  description: "Events definition",
@@ -3696,8 +3898,10 @@ export const state = {
3696
3898
  "updatedAt",
3697
3899
  "signingSecret",
3698
3900
  "integrations",
3901
+ "user",
3902
+ "conversation",
3903
+ "message",
3699
3904
  "states",
3700
- "tags",
3701
3905
  "configuration",
3702
3906
  "events",
3703
3907
  "recurringEvents",
@@ -3737,31 +3941,25 @@ export const state = {
3737
3941
  type: "string",
3738
3942
  description: "Version of the [Integration](#schema_integration)",
3739
3943
  },
3944
+ configuration: {
3945
+ type: "object",
3946
+ properties: {
3947
+ schema: {
3948
+ type: "object",
3949
+ additionalProperties: true,
3950
+ description:
3951
+ "Schema of the configuration in the `JSON schema` format. The configuration data is validated against this `JSON schema`.",
3952
+ },
3953
+ },
3954
+ required: ["schema"],
3955
+ description: "Configuration definition",
3956
+ additionalProperties: false,
3957
+ },
3740
3958
  channels: {
3741
3959
  type: "object",
3742
3960
  additionalProperties: {
3743
3961
  type: "object",
3744
3962
  properties: {
3745
- tags: {
3746
- type: "object",
3747
- properties: {
3748
- messages: {
3749
- default: [],
3750
- type: "array",
3751
- items: {
3752
- type: "string",
3753
- },
3754
- },
3755
- conversations: {
3756
- default: [],
3757
- type: "array",
3758
- items: {
3759
- type: "string",
3760
- },
3761
- },
3762
- },
3763
- additionalProperties: false,
3764
- },
3765
3963
  messages: {
3766
3964
  type: "object",
3767
3965
  additionalProperties: {
@@ -3773,12 +3971,32 @@ export const state = {
3773
3971
  },
3774
3972
  },
3775
3973
  required: ["schema"],
3974
+ description: "Message definition",
3776
3975
  additionalProperties: false,
3777
3976
  },
3778
3977
  },
3779
3978
  conversation: {
3780
3979
  type: "object",
3781
3980
  properties: {
3981
+ tags: {
3982
+ type: "object",
3983
+ additionalProperties: {
3984
+ type: "object",
3985
+ properties: {
3986
+ title: {
3987
+ type: "string",
3988
+ description: "Title of the tag",
3989
+ },
3990
+ description: {
3991
+ type: "string",
3992
+ description: "Description of the tag",
3993
+ },
3994
+ },
3995
+ description:
3996
+ "Definition of a tag that can be provided on the object",
3997
+ additionalProperties: false,
3998
+ },
3999
+ },
3782
4000
  creation: {
3783
4001
  type: "object",
3784
4002
  properties: {
@@ -3801,17 +4019,44 @@ export const state = {
3801
4019
  additionalProperties: false,
3802
4020
  },
3803
4021
  },
3804
- required: ["creation"],
4022
+ required: ["tags", "creation"],
4023
+ description: "Conversation object configuration",
4024
+ additionalProperties: false,
4025
+ },
4026
+ message: {
4027
+ type: "object",
4028
+ properties: {
4029
+ tags: {
4030
+ type: "object",
4031
+ additionalProperties: {
4032
+ type: "object",
4033
+ properties: {
4034
+ title: {
4035
+ type: "string",
4036
+ description: "Title of the tag",
4037
+ },
4038
+ description: {
4039
+ type: "string",
4040
+ description: "Description of the tag",
4041
+ },
4042
+ },
4043
+ description:
4044
+ "Definition of a tag that can be provided on the object",
4045
+ additionalProperties: false,
4046
+ },
4047
+ },
4048
+ },
4049
+ required: ["tags"],
4050
+ description: "Message object configuration",
3805
4051
  additionalProperties: false,
3806
4052
  },
3807
4053
  },
3808
- required: ["tags", "messages", "conversation"],
4054
+ required: ["messages", "conversation", "message"],
4055
+ description: "Channel definition",
3809
4056
  additionalProperties: false,
3810
4057
  },
3811
- description: "Channels definition",
3812
4058
  },
3813
4059
  states: {
3814
- default: {},
3815
4060
  type: "object",
3816
4061
  additionalProperties: {
3817
4062
  type: "object",
@@ -3830,22 +4075,9 @@ export const state = {
3830
4075
  },
3831
4076
  },
3832
4077
  required: ["type", "schema"],
4078
+ description: "State definition",
3833
4079
  additionalProperties: false,
3834
4080
  },
3835
- description: "States definition",
3836
- },
3837
- configuration: {
3838
- type: "object",
3839
- properties: {
3840
- schema: {
3841
- type: "object",
3842
- additionalProperties: true,
3843
- description: "Schema for the configuration",
3844
- },
3845
- },
3846
- required: ["schema"],
3847
- description: "Configuration definition",
3848
- additionalProperties: false,
3849
4081
  },
3850
4082
  events: {
3851
4083
  type: "object",
@@ -3858,10 +4090,9 @@ export const state = {
3858
4090
  },
3859
4091
  },
3860
4092
  required: ["schema"],
3861
- description: "Event schema",
4093
+ description: "Event Definition",
3862
4094
  additionalProperties: false,
3863
4095
  },
3864
- description: "Events definition",
3865
4096
  },
3866
4097
  actions: {
3867
4098
  type: "object",
@@ -3892,13 +4123,32 @@ export const state = {
3892
4123
  },
3893
4124
  },
3894
4125
  required: ["input", "output"],
4126
+ description: "Action definition",
3895
4127
  additionalProperties: false,
3896
4128
  },
3897
- description: "Action definition",
3898
4129
  },
3899
4130
  user: {
3900
4131
  type: "object",
3901
4132
  properties: {
4133
+ tags: {
4134
+ type: "object",
4135
+ additionalProperties: {
4136
+ type: "object",
4137
+ properties: {
4138
+ title: {
4139
+ type: "string",
4140
+ description: "Title of the tag",
4141
+ },
4142
+ description: {
4143
+ type: "string",
4144
+ description: "Description of the tag",
4145
+ },
4146
+ },
4147
+ description:
4148
+ "Definition of a tag that can be provided on the object",
4149
+ additionalProperties: false,
4150
+ },
4151
+ },
3902
4152
  creation: {
3903
4153
  type: "object",
3904
4154
  properties: {
@@ -3921,7 +4171,8 @@ export const state = {
3921
4171
  additionalProperties: false,
3922
4172
  },
3923
4173
  },
3924
- required: ["creation"],
4174
+ required: ["tags", "creation"],
4175
+ description: "User object configuration",
3925
4176
  additionalProperties: false,
3926
4177
  },
3927
4178
  dev: {
@@ -3959,8 +4210,9 @@ export const state = {
3959
4210
  "updatedAt",
3960
4211
  "name",
3961
4212
  "version",
3962
- "channels",
3963
4213
  "configuration",
4214
+ "channels",
4215
+ "states",
3964
4216
  "events",
3965
4217
  "actions",
3966
4218
  "user",