@qlever-llc/trellis 0.10.16 → 0.10.18-rc.1

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.
Files changed (60) hide show
  1. package/esm/auth/mod.d.ts +1 -1
  2. package/esm/auth/mod.d.ts.map +1 -1
  3. package/esm/auth/mod.js +1 -1
  4. package/esm/auth/protocol.d.ts +361 -398
  5. package/esm/auth/protocol.d.ts.map +1 -1
  6. package/esm/auth/protocol.js +35 -33
  7. package/esm/generated-sdk/auth/api.d.ts +4 -1
  8. package/esm/generated-sdk/auth/api.d.ts.map +1 -1
  9. package/esm/generated-sdk/auth/api.js +6 -1
  10. package/esm/generated-sdk/auth/client.d.ts +15 -0
  11. package/esm/generated-sdk/auth/client.d.ts.map +1 -1
  12. package/esm/generated-sdk/auth/contract.d.ts +1 -1
  13. package/esm/generated-sdk/auth/contract.d.ts.map +1 -1
  14. package/esm/generated-sdk/auth/contract.js +1231 -1077
  15. package/esm/generated-sdk/auth/schemas.d.ts +1428 -1578
  16. package/esm/generated-sdk/auth/schemas.d.ts.map +1 -1
  17. package/esm/generated-sdk/auth/schemas.js +725 -669
  18. package/esm/generated-sdk/auth/types.d.ts +239 -281
  19. package/esm/generated-sdk/auth/types.d.ts.map +1 -1
  20. package/esm/generated-sdk/auth/types.js +1 -1
  21. package/esm/generated-sdk/trellis-core/api.d.ts +4 -1
  22. package/esm/generated-sdk/trellis-core/api.d.ts.map +1 -1
  23. package/esm/generated-sdk/trellis-core/api.js +6 -1
  24. package/esm/generated-sdk/trellis-core/client.d.ts +28 -3
  25. package/esm/generated-sdk/trellis-core/client.d.ts.map +1 -1
  26. package/package.json +3 -2
  27. package/script/auth/mod.d.ts +1 -1
  28. package/script/auth/mod.d.ts.map +1 -1
  29. package/script/auth/mod.js +12 -3
  30. package/script/auth/protocol.d.ts +361 -398
  31. package/script/auth/protocol.d.ts.map +1 -1
  32. package/script/auth/protocol.js +40 -37
  33. package/script/generated-sdk/auth/api.d.ts +4 -1
  34. package/script/generated-sdk/auth/api.d.ts.map +1 -1
  35. package/script/generated-sdk/auth/api.js +6 -1
  36. package/script/generated-sdk/auth/client.d.ts +15 -0
  37. package/script/generated-sdk/auth/client.d.ts.map +1 -1
  38. package/script/generated-sdk/auth/contract.d.ts +1 -1
  39. package/script/generated-sdk/auth/contract.d.ts.map +1 -1
  40. package/script/generated-sdk/auth/contract.js +1231 -1077
  41. package/script/generated-sdk/auth/schemas.d.ts +1428 -1578
  42. package/script/generated-sdk/auth/schemas.d.ts.map +1 -1
  43. package/script/generated-sdk/auth/schemas.js +725 -669
  44. package/script/generated-sdk/auth/types.d.ts +239 -281
  45. package/script/generated-sdk/auth/types.d.ts.map +1 -1
  46. package/script/generated-sdk/auth/types.js +1 -1
  47. package/script/generated-sdk/trellis-core/api.d.ts +4 -1
  48. package/script/generated-sdk/trellis-core/api.d.ts.map +1 -1
  49. package/script/generated-sdk/trellis-core/api.js +6 -1
  50. package/script/generated-sdk/trellis-core/client.d.ts +28 -3
  51. package/script/generated-sdk/trellis-core/client.d.ts.map +1 -1
  52. package/src/auth/mod.ts +21 -2
  53. package/src/auth/protocol.ts +72 -37
  54. package/src/sdk/_generated/auth/api.ts +9 -2
  55. package/src/sdk/_generated/auth/client.ts +37 -0
  56. package/src/sdk/_generated/auth/contract.ts +1496 -1342
  57. package/src/sdk/_generated/auth/schemas.ts +919 -863
  58. package/src/sdk/_generated/auth/types.ts +242 -304
  59. package/src/sdk/_generated/core/api.ts +9 -2
  60. package/src/sdk/_generated/core/client.ts +41 -2
@@ -1,7 +1,7 @@
1
1
  import { API } from "./api.js";
2
2
  const CONTRACT_MODULE_METADATA = Symbol.for("@qlever-llc/trellis/contracts/contract-module");
3
3
  export const CONTRACT_ID = "trellis.auth@v1";
4
- export const CONTRACT_DIGEST = "XdqgSxkrIhWOu1ODbOk6-QHLTlI52ZP-6qhYJpIdCMc";
4
+ export const CONTRACT_DIGEST = "U-Y6P1smzJB4MeG6NdhDuZ0CTT2BWOud9iL1zIQktMM";
5
5
  export const CONTRACT = {
6
6
  "capabilities": {
7
7
  "trellis.auth::device.review": {
@@ -1624,83 +1624,87 @@ export const CONTRACT = {
1624
1624
  "type": "array",
1625
1625
  },
1626
1626
  "needs": {
1627
- "items": {
1628
- "anyOf": [{
1627
+ "properties": {
1628
+ "capabilities": {
1629
+ "items": {
1629
1630
  "properties": {
1630
- "contractId": { "minLength": 1, "type": "string" },
1631
- "kind": { "const": "contract", "type": "string" },
1631
+ "capability": { "minLength": 1, "type": "string" },
1632
1632
  "required": { "type": "boolean" },
1633
1633
  },
1634
- "required": ["kind", "contractId", "required"],
1634
+ "required": ["capability", "required"],
1635
1635
  "type": "object",
1636
- }, {
1636
+ },
1637
+ "type": "array",
1638
+ },
1639
+ "contracts": {
1640
+ "items": {
1637
1641
  "properties": {
1638
- "kind": { "const": "surface", "type": "string" },
1642
+ "contractId": { "minLength": 1, "type": "string" },
1639
1643
  "required": { "type": "boolean" },
1640
- "surface": {
1641
- "properties": {
1642
- "action": {
1643
- "anyOf": [
1644
- { "const": "call", "type": "string" },
1645
- { "const": "publish", "type": "string" },
1646
- { "const": "subscribe", "type": "string" },
1647
- { "const": "observe", "type": "string" },
1648
- { "const": "cancel", "type": "string" },
1649
- ],
1650
- },
1651
- "contractId": { "minLength": 1, "type": "string" },
1652
- "kind": {
1653
- "anyOf": [
1654
- { "const": "rpc", "type": "string" },
1655
- { "const": "operation", "type": "string" },
1656
- { "const": "event", "type": "string" },
1657
- { "const": "feed", "type": "string" },
1658
- ],
1659
- },
1660
- "name": { "minLength": 1, "type": "string" },
1661
- },
1662
- "required": ["contractId", "kind", "name"],
1663
- "type": "object",
1664
- },
1665
1644
  },
1666
- "required": ["kind", "surface", "required"],
1645
+ "required": ["contractId", "required"],
1667
1646
  "type": "object",
1668
- }, {
1647
+ },
1648
+ "type": "array",
1649
+ },
1650
+ "resources": {
1651
+ "items": {
1669
1652
  "properties": {
1670
- "capability": { "minLength": 1, "type": "string" },
1671
- "kind": { "const": "capability", "type": "string" },
1653
+ "alias": { "minLength": 1, "type": "string" },
1654
+ "definition": { "type": "object" },
1655
+ "kind": {
1656
+ "anyOf": [
1657
+ { "const": "kv", "type": "string" },
1658
+ { "const": "store", "type": "string" },
1659
+ { "const": "jobs", "type": "string" },
1660
+ { "const": "event-consumer", "type": "string" },
1661
+ { "const": "transfer", "type": "string" },
1662
+ ],
1663
+ },
1672
1664
  "required": { "type": "boolean" },
1673
1665
  },
1674
- "required": ["kind", "capability", "required"],
1666
+ "required": ["kind", "alias", "required"],
1675
1667
  "type": "object",
1676
- }, {
1668
+ },
1669
+ "type": "array",
1670
+ },
1671
+ "surfaces": {
1672
+ "items": {
1677
1673
  "properties": {
1678
- "kind": { "const": "resource", "type": "string" },
1679
- "required": { "type": "boolean" },
1680
- "resource": {
1681
- "properties": {
1682
- "alias": { "minLength": 1, "type": "string" },
1683
- "definition": { "type": "object" },
1684
- "kind": {
1685
- "anyOf": [
1686
- { "const": "kv", "type": "string" },
1687
- { "const": "store", "type": "string" },
1688
- { "const": "jobs", "type": "string" },
1689
- { "const": "event-consumer", "type": "string" },
1690
- { "const": "transfer", "type": "string" },
1691
- ],
1692
- },
1693
- "required": { "type": "boolean" },
1694
- },
1695
- "required": ["kind", "alias", "required"],
1696
- "type": "object",
1674
+ "action": {
1675
+ "anyOf": [
1676
+ { "const": "call", "type": "string" },
1677
+ { "const": "publish", "type": "string" },
1678
+ { "const": "subscribe", "type": "string" },
1679
+ { "const": "observe", "type": "string" },
1680
+ { "const": "cancel", "type": "string" },
1681
+ ],
1682
+ },
1683
+ "contractId": { "minLength": 1, "type": "string" },
1684
+ "kind": {
1685
+ "anyOf": [
1686
+ { "const": "rpc", "type": "string" },
1687
+ { "const": "operation", "type": "string" },
1688
+ { "const": "event", "type": "string" },
1689
+ { "const": "feed", "type": "string" },
1690
+ ],
1697
1691
  },
1692
+ "name": { "minLength": 1, "type": "string" },
1693
+ "required": { "type": "boolean" },
1698
1694
  },
1699
- "required": ["kind", "resource", "required"],
1695
+ "required": ["contractId", "kind", "name", "required"],
1700
1696
  "type": "object",
1701
- }],
1697
+ },
1698
+ "type": "array",
1699
+ },
1702
1700
  },
1703
- "type": "array",
1701
+ "required": [
1702
+ "contracts",
1703
+ "surfaces",
1704
+ "capabilities",
1705
+ "resources",
1706
+ ],
1707
+ "type": "object",
1704
1708
  },
1705
1709
  "resources": {
1706
1710
  "items": {
@@ -1810,83 +1814,87 @@ export const CONTRACT = {
1810
1814
  "type": "array",
1811
1815
  },
1812
1816
  "needs": {
1813
- "items": {
1814
- "anyOf": [{
1817
+ "properties": {
1818
+ "capabilities": {
1819
+ "items": {
1815
1820
  "properties": {
1816
- "contractId": { "minLength": 1, "type": "string" },
1817
- "kind": { "const": "contract", "type": "string" },
1821
+ "capability": { "minLength": 1, "type": "string" },
1818
1822
  "required": { "type": "boolean" },
1819
1823
  },
1820
- "required": ["kind", "contractId", "required"],
1824
+ "required": ["capability", "required"],
1821
1825
  "type": "object",
1822
- }, {
1826
+ },
1827
+ "type": "array",
1828
+ },
1829
+ "contracts": {
1830
+ "items": {
1823
1831
  "properties": {
1824
- "kind": { "const": "surface", "type": "string" },
1832
+ "contractId": { "minLength": 1, "type": "string" },
1825
1833
  "required": { "type": "boolean" },
1826
- "surface": {
1827
- "properties": {
1828
- "action": {
1829
- "anyOf": [
1830
- { "const": "call", "type": "string" },
1831
- { "const": "publish", "type": "string" },
1832
- { "const": "subscribe", "type": "string" },
1833
- { "const": "observe", "type": "string" },
1834
- { "const": "cancel", "type": "string" },
1835
- ],
1836
- },
1837
- "contractId": { "minLength": 1, "type": "string" },
1838
- "kind": {
1839
- "anyOf": [
1840
- { "const": "rpc", "type": "string" },
1841
- { "const": "operation", "type": "string" },
1842
- { "const": "event", "type": "string" },
1843
- { "const": "feed", "type": "string" },
1844
- ],
1845
- },
1846
- "name": { "minLength": 1, "type": "string" },
1847
- },
1848
- "required": ["contractId", "kind", "name"],
1849
- "type": "object",
1850
- },
1851
1834
  },
1852
- "required": ["kind", "surface", "required"],
1835
+ "required": ["contractId", "required"],
1853
1836
  "type": "object",
1854
- }, {
1837
+ },
1838
+ "type": "array",
1839
+ },
1840
+ "resources": {
1841
+ "items": {
1855
1842
  "properties": {
1856
- "capability": { "minLength": 1, "type": "string" },
1857
- "kind": { "const": "capability", "type": "string" },
1843
+ "alias": { "minLength": 1, "type": "string" },
1844
+ "definition": { "type": "object" },
1845
+ "kind": {
1846
+ "anyOf": [
1847
+ { "const": "kv", "type": "string" },
1848
+ { "const": "store", "type": "string" },
1849
+ { "const": "jobs", "type": "string" },
1850
+ { "const": "event-consumer", "type": "string" },
1851
+ { "const": "transfer", "type": "string" },
1852
+ ],
1853
+ },
1858
1854
  "required": { "type": "boolean" },
1859
1855
  },
1860
- "required": ["kind", "capability", "required"],
1856
+ "required": ["kind", "alias", "required"],
1861
1857
  "type": "object",
1862
- }, {
1858
+ },
1859
+ "type": "array",
1860
+ },
1861
+ "surfaces": {
1862
+ "items": {
1863
1863
  "properties": {
1864
- "kind": { "const": "resource", "type": "string" },
1865
- "required": { "type": "boolean" },
1866
- "resource": {
1867
- "properties": {
1868
- "alias": { "minLength": 1, "type": "string" },
1869
- "definition": { "type": "object" },
1870
- "kind": {
1871
- "anyOf": [
1872
- { "const": "kv", "type": "string" },
1873
- { "const": "store", "type": "string" },
1874
- { "const": "jobs", "type": "string" },
1875
- { "const": "event-consumer", "type": "string" },
1876
- { "const": "transfer", "type": "string" },
1877
- ],
1878
- },
1879
- "required": { "type": "boolean" },
1880
- },
1881
- "required": ["kind", "alias", "required"],
1882
- "type": "object",
1864
+ "action": {
1865
+ "anyOf": [
1866
+ { "const": "call", "type": "string" },
1867
+ { "const": "publish", "type": "string" },
1868
+ { "const": "subscribe", "type": "string" },
1869
+ { "const": "observe", "type": "string" },
1870
+ { "const": "cancel", "type": "string" },
1871
+ ],
1872
+ },
1873
+ "contractId": { "minLength": 1, "type": "string" },
1874
+ "kind": {
1875
+ "anyOf": [
1876
+ { "const": "rpc", "type": "string" },
1877
+ { "const": "operation", "type": "string" },
1878
+ { "const": "event", "type": "string" },
1879
+ { "const": "feed", "type": "string" },
1880
+ ],
1883
1881
  },
1882
+ "name": { "minLength": 1, "type": "string" },
1883
+ "required": { "type": "boolean" },
1884
1884
  },
1885
- "required": ["kind", "resource", "required"],
1885
+ "required": ["contractId", "kind", "name", "required"],
1886
1886
  "type": "object",
1887
- }],
1887
+ },
1888
+ "type": "array",
1889
+ },
1888
1890
  },
1889
- "type": "array",
1891
+ "required": [
1892
+ "contracts",
1893
+ "surfaces",
1894
+ "capabilities",
1895
+ "resources",
1896
+ ],
1897
+ "type": "object",
1890
1898
  },
1891
1899
  "resources": {
1892
1900
  "items": {
@@ -2067,40 +2075,19 @@ export const CONTRACT = {
2067
2075
  "desiredVersion": { "minLength": 1, "type": "string" },
2068
2076
  "error": { "minLength": 1, "type": "string" },
2069
2077
  "grants": {
2070
- "items": {
2071
- "anyOf": [{
2078
+ "properties": {
2079
+ "capabilities": {
2080
+ "items": {
2072
2081
  "properties": {
2073
2082
  "capability": { "minLength": 1, "type": "string" },
2074
- "kind": { "const": "capability", "type": "string" },
2075
- },
2076
- "required": ["kind", "capability"],
2077
- "type": "object",
2078
- }, {
2079
- "properties": {
2080
- "action": {
2081
- "anyOf": [
2082
- { "const": "call", "type": "string" },
2083
- { "const": "publish", "type": "string" },
2084
- { "const": "subscribe", "type": "string" },
2085
- { "const": "observe", "type": "string" },
2086
- { "const": "cancel", "type": "string" },
2087
- ],
2088
- },
2089
- "contractId": { "minLength": 1, "type": "string" },
2090
- "kind": { "const": "surface", "type": "string" },
2091
- "name": { "minLength": 1, "type": "string" },
2092
- "surfaceKind": {
2093
- "anyOf": [
2094
- { "const": "rpc", "type": "string" },
2095
- { "const": "operation", "type": "string" },
2096
- { "const": "event", "type": "string" },
2097
- { "const": "feed", "type": "string" },
2098
- ],
2099
- },
2100
2083
  },
2101
- "required": ["kind", "contractId", "surfaceKind", "name"],
2084
+ "required": ["capability"],
2102
2085
  "type": "object",
2103
- }, {
2086
+ },
2087
+ "type": "array",
2088
+ },
2089
+ "nats": {
2090
+ "items": {
2104
2091
  "properties": {
2105
2092
  "direction": {
2106
2093
  "anyOf": [{ "const": "publish", "type": "string" }, {
@@ -2117,7 +2104,6 @@ export const CONTRACT = {
2117
2104
  { "const": "transfer", "type": "string" },
2118
2105
  ],
2119
2106
  },
2120
- "kind": { "const": "nats", "type": "string" },
2121
2107
  "requiredCapabilities": {
2122
2108
  "items": { "minLength": 1, "type": "string" },
2123
2109
  "type": "array",
@@ -2150,38 +2136,68 @@ export const CONTRACT = {
2150
2136
  },
2151
2137
  },
2152
2138
  "required": [
2153
- "kind",
2154
2139
  "direction",
2155
2140
  "subject",
2156
2141
  "requiredCapabilities",
2157
2142
  "grantSource",
2158
2143
  ],
2159
2144
  "type": "object",
2160
- }],
2161
- },
2162
- "type": "array",
2163
- },
2164
- "reconciledAt": {
2165
- "anyOf": [{ "format": "date-time", "type": "string" }, {
2166
- "type": "null",
2167
- }],
2168
- },
2169
- "resourceBindings": {
2170
- "items": {
2171
- "properties": {
2172
- "alias": { "minLength": 1, "type": "string" },
2173
- "binding": {
2174
- "patternProperties": { "^.*$": {} },
2175
- "type": "object",
2176
2145
  },
2177
- "createdAt": { "format": "date-time", "type": "string" },
2178
- "deploymentId": { "minLength": 1, "type": "string" },
2179
- "kind": {
2180
- "anyOf": [
2181
- { "const": "kv", "type": "string" },
2182
- { "const": "store", "type": "string" },
2183
- { "const": "jobs", "type": "string" },
2184
- { "const": "event-consumer", "type": "string" },
2146
+ "type": "array",
2147
+ },
2148
+ "surfaces": {
2149
+ "items": {
2150
+ "properties": {
2151
+ "action": {
2152
+ "anyOf": [
2153
+ { "const": "call", "type": "string" },
2154
+ { "const": "publish", "type": "string" },
2155
+ { "const": "subscribe", "type": "string" },
2156
+ { "const": "observe", "type": "string" },
2157
+ { "const": "cancel", "type": "string" },
2158
+ ],
2159
+ },
2160
+ "contractId": { "minLength": 1, "type": "string" },
2161
+ "name": { "minLength": 1, "type": "string" },
2162
+ "surfaceKind": {
2163
+ "anyOf": [
2164
+ { "const": "rpc", "type": "string" },
2165
+ { "const": "operation", "type": "string" },
2166
+ { "const": "event", "type": "string" },
2167
+ { "const": "feed", "type": "string" },
2168
+ ],
2169
+ },
2170
+ },
2171
+ "required": ["contractId", "surfaceKind", "name"],
2172
+ "type": "object",
2173
+ },
2174
+ "type": "array",
2175
+ },
2176
+ },
2177
+ "required": ["capabilities", "surfaces", "nats"],
2178
+ "type": "object",
2179
+ },
2180
+ "reconciledAt": {
2181
+ "anyOf": [{ "format": "date-time", "type": "string" }, {
2182
+ "type": "null",
2183
+ }],
2184
+ },
2185
+ "resourceBindings": {
2186
+ "items": {
2187
+ "properties": {
2188
+ "alias": { "minLength": 1, "type": "string" },
2189
+ "binding": {
2190
+ "patternProperties": { "^.*$": {} },
2191
+ "type": "object",
2192
+ },
2193
+ "createdAt": { "format": "date-time", "type": "string" },
2194
+ "deploymentId": { "minLength": 1, "type": "string" },
2195
+ "kind": {
2196
+ "anyOf": [
2197
+ { "const": "kv", "type": "string" },
2198
+ { "const": "store", "type": "string" },
2199
+ { "const": "jobs", "type": "string" },
2200
+ { "const": "event-consumer", "type": "string" },
2185
2201
  { "const": "transfer", "type": "string" },
2186
2202
  ],
2187
2203
  },
@@ -2710,89 +2726,92 @@ export const CONTRACT = {
2710
2726
  "type": "array",
2711
2727
  },
2712
2728
  "needs": {
2713
- "items": {
2714
- "anyOf": [{
2729
+ "properties": {
2730
+ "capabilities": {
2731
+ "items": {
2715
2732
  "properties": {
2716
- "contractId": { "minLength": 1, "type": "string" },
2717
- "kind": { "const": "contract", "type": "string" },
2733
+ "capability": { "minLength": 1, "type": "string" },
2718
2734
  "required": { "type": "boolean" },
2719
2735
  },
2720
- "required": ["kind", "contractId", "required"],
2736
+ "required": ["capability", "required"],
2721
2737
  "type": "object",
2722
- }, {
2738
+ },
2739
+ "type": "array",
2740
+ },
2741
+ "contracts": {
2742
+ "items": {
2723
2743
  "properties": {
2724
- "kind": { "const": "surface", "type": "string" },
2744
+ "contractId": { "minLength": 1, "type": "string" },
2725
2745
  "required": { "type": "boolean" },
2726
- "surface": {
2727
- "properties": {
2728
- "action": {
2729
- "anyOf": [
2730
- { "const": "call", "type": "string" },
2731
- { "const": "publish", "type": "string" },
2732
- { "const": "subscribe", "type": "string" },
2733
- { "const": "observe", "type": "string" },
2734
- { "const": "cancel", "type": "string" },
2735
- ],
2736
- },
2737
- "contractId": {
2738
- "minLength": 1,
2739
- "type": "string",
2740
- },
2741
- "kind": {
2742
- "anyOf": [
2743
- { "const": "rpc", "type": "string" },
2744
- { "const": "operation", "type": "string" },
2745
- { "const": "event", "type": "string" },
2746
- { "const": "feed", "type": "string" },
2747
- ],
2748
- },
2749
- "name": { "minLength": 1, "type": "string" },
2750
- },
2751
- "required": ["contractId", "kind", "name"],
2752
- "type": "object",
2753
- },
2754
2746
  },
2755
- "required": ["kind", "surface", "required"],
2747
+ "required": ["contractId", "required"],
2756
2748
  "type": "object",
2757
- }, {
2749
+ },
2750
+ "type": "array",
2751
+ },
2752
+ "resources": {
2753
+ "items": {
2758
2754
  "properties": {
2759
- "capability": { "minLength": 1, "type": "string" },
2760
- "kind": { "const": "capability", "type": "string" },
2755
+ "alias": { "minLength": 1, "type": "string" },
2756
+ "definition": { "type": "object" },
2757
+ "kind": {
2758
+ "anyOf": [
2759
+ { "const": "kv", "type": "string" },
2760
+ { "const": "store", "type": "string" },
2761
+ { "const": "jobs", "type": "string" },
2762
+ { "const": "event-consumer", "type": "string" },
2763
+ { "const": "transfer", "type": "string" },
2764
+ ],
2765
+ },
2761
2766
  "required": { "type": "boolean" },
2762
2767
  },
2763
- "required": ["kind", "capability", "required"],
2768
+ "required": ["kind", "alias", "required"],
2764
2769
  "type": "object",
2765
- }, {
2770
+ },
2771
+ "type": "array",
2772
+ },
2773
+ "surfaces": {
2774
+ "items": {
2766
2775
  "properties": {
2767
- "kind": { "const": "resource", "type": "string" },
2768
- "required": { "type": "boolean" },
2769
- "resource": {
2770
- "properties": {
2771
- "alias": { "minLength": 1, "type": "string" },
2772
- "definition": { "type": "object" },
2773
- "kind": {
2774
- "anyOf": [
2775
- { "const": "kv", "type": "string" },
2776
- { "const": "store", "type": "string" },
2777
- { "const": "jobs", "type": "string" },
2778
- {
2779
- "const": "event-consumer",
2780
- "type": "string",
2781
- },
2782
- { "const": "transfer", "type": "string" },
2783
- ],
2784
- },
2785
- "required": { "type": "boolean" },
2786
- },
2787
- "required": ["kind", "alias", "required"],
2788
- "type": "object",
2776
+ "action": {
2777
+ "anyOf": [
2778
+ { "const": "call", "type": "string" },
2779
+ { "const": "publish", "type": "string" },
2780
+ { "const": "subscribe", "type": "string" },
2781
+ { "const": "observe", "type": "string" },
2782
+ { "const": "cancel", "type": "string" },
2783
+ ],
2784
+ },
2785
+ "contractId": { "minLength": 1, "type": "string" },
2786
+ "kind": {
2787
+ "anyOf": [
2788
+ { "const": "rpc", "type": "string" },
2789
+ { "const": "operation", "type": "string" },
2790
+ { "const": "event", "type": "string" },
2791
+ { "const": "feed", "type": "string" },
2792
+ ],
2789
2793
  },
2794
+ "name": { "minLength": 1, "type": "string" },
2795
+ "required": { "type": "boolean" },
2790
2796
  },
2791
- "required": ["kind", "resource", "required"],
2797
+ "required": [
2798
+ "contractId",
2799
+ "kind",
2800
+ "name",
2801
+ "required",
2802
+ ],
2792
2803
  "type": "object",
2793
- }],
2804
+ },
2805
+ "type": "array",
2806
+ },
2794
2807
  },
2795
- "type": "array",
2808
+ "required": [
2809
+ "contracts",
2810
+ "surfaces",
2811
+ "capabilities",
2812
+ "resources",
2813
+ ],
2814
+ "type": "object",
2796
2815
  },
2797
2816
  "resources": {
2798
2817
  "items": {
@@ -2957,89 +2976,92 @@ export const CONTRACT = {
2957
2976
  "type": "array",
2958
2977
  },
2959
2978
  "requestedNeeds": {
2960
- "items": {
2961
- "anyOf": [{
2979
+ "properties": {
2980
+ "capabilities": {
2981
+ "items": {
2962
2982
  "properties": {
2963
- "contractId": { "minLength": 1, "type": "string" },
2964
- "kind": { "const": "contract", "type": "string" },
2983
+ "capability": { "minLength": 1, "type": "string" },
2965
2984
  "required": { "type": "boolean" },
2966
2985
  },
2967
- "required": ["kind", "contractId", "required"],
2986
+ "required": ["capability", "required"],
2968
2987
  "type": "object",
2969
- }, {
2988
+ },
2989
+ "type": "array",
2990
+ },
2991
+ "contracts": {
2992
+ "items": {
2970
2993
  "properties": {
2971
- "kind": { "const": "surface", "type": "string" },
2994
+ "contractId": { "minLength": 1, "type": "string" },
2972
2995
  "required": { "type": "boolean" },
2973
- "surface": {
2974
- "properties": {
2975
- "action": {
2976
- "anyOf": [
2977
- { "const": "call", "type": "string" },
2978
- { "const": "publish", "type": "string" },
2979
- { "const": "subscribe", "type": "string" },
2980
- { "const": "observe", "type": "string" },
2981
- { "const": "cancel", "type": "string" },
2982
- ],
2983
- },
2984
- "contractId": {
2985
- "minLength": 1,
2986
- "type": "string",
2987
- },
2988
- "kind": {
2989
- "anyOf": [
2990
- { "const": "rpc", "type": "string" },
2991
- { "const": "operation", "type": "string" },
2992
- { "const": "event", "type": "string" },
2993
- { "const": "feed", "type": "string" },
2994
- ],
2995
- },
2996
- "name": { "minLength": 1, "type": "string" },
2997
- },
2998
- "required": ["contractId", "kind", "name"],
2999
- "type": "object",
3000
- },
3001
2996
  },
3002
- "required": ["kind", "surface", "required"],
2997
+ "required": ["contractId", "required"],
3003
2998
  "type": "object",
3004
- }, {
2999
+ },
3000
+ "type": "array",
3001
+ },
3002
+ "resources": {
3003
+ "items": {
3005
3004
  "properties": {
3006
- "capability": { "minLength": 1, "type": "string" },
3007
- "kind": { "const": "capability", "type": "string" },
3005
+ "alias": { "minLength": 1, "type": "string" },
3006
+ "definition": { "type": "object" },
3007
+ "kind": {
3008
+ "anyOf": [
3009
+ { "const": "kv", "type": "string" },
3010
+ { "const": "store", "type": "string" },
3011
+ { "const": "jobs", "type": "string" },
3012
+ { "const": "event-consumer", "type": "string" },
3013
+ { "const": "transfer", "type": "string" },
3014
+ ],
3015
+ },
3008
3016
  "required": { "type": "boolean" },
3009
3017
  },
3010
- "required": ["kind", "capability", "required"],
3018
+ "required": ["kind", "alias", "required"],
3011
3019
  "type": "object",
3012
- }, {
3020
+ },
3021
+ "type": "array",
3022
+ },
3023
+ "surfaces": {
3024
+ "items": {
3013
3025
  "properties": {
3014
- "kind": { "const": "resource", "type": "string" },
3015
- "required": { "type": "boolean" },
3016
- "resource": {
3017
- "properties": {
3018
- "alias": { "minLength": 1, "type": "string" },
3019
- "definition": { "type": "object" },
3020
- "kind": {
3021
- "anyOf": [
3022
- { "const": "kv", "type": "string" },
3023
- { "const": "store", "type": "string" },
3024
- { "const": "jobs", "type": "string" },
3025
- {
3026
- "const": "event-consumer",
3027
- "type": "string",
3028
- },
3029
- { "const": "transfer", "type": "string" },
3030
- ],
3031
- },
3032
- "required": { "type": "boolean" },
3033
- },
3034
- "required": ["kind", "alias", "required"],
3035
- "type": "object",
3026
+ "action": {
3027
+ "anyOf": [
3028
+ { "const": "call", "type": "string" },
3029
+ { "const": "publish", "type": "string" },
3030
+ { "const": "subscribe", "type": "string" },
3031
+ { "const": "observe", "type": "string" },
3032
+ { "const": "cancel", "type": "string" },
3033
+ ],
3034
+ },
3035
+ "contractId": { "minLength": 1, "type": "string" },
3036
+ "kind": {
3037
+ "anyOf": [
3038
+ { "const": "rpc", "type": "string" },
3039
+ { "const": "operation", "type": "string" },
3040
+ { "const": "event", "type": "string" },
3041
+ { "const": "feed", "type": "string" },
3042
+ ],
3036
3043
  },
3044
+ "name": { "minLength": 1, "type": "string" },
3045
+ "required": { "type": "boolean" },
3037
3046
  },
3038
- "required": ["kind", "resource", "required"],
3047
+ "required": [
3048
+ "contractId",
3049
+ "kind",
3050
+ "name",
3051
+ "required",
3052
+ ],
3039
3053
  "type": "object",
3040
- }],
3054
+ },
3055
+ "type": "array",
3056
+ },
3041
3057
  },
3042
- "type": "array",
3058
+ "required": [
3059
+ "contracts",
3060
+ "surfaces",
3061
+ "capabilities",
3062
+ "resources",
3063
+ ],
3064
+ "type": "object",
3043
3065
  },
3044
3066
  "summary": { "type": "object" },
3045
3067
  },
@@ -3141,89 +3163,92 @@ export const CONTRACT = {
3141
3163
  "type": "array",
3142
3164
  },
3143
3165
  "requestedNeeds": {
3144
- "items": {
3145
- "anyOf": [{
3166
+ "properties": {
3167
+ "capabilities": {
3168
+ "items": {
3146
3169
  "properties": {
3147
- "contractId": { "minLength": 1, "type": "string" },
3148
- "kind": { "const": "contract", "type": "string" },
3170
+ "capability": { "minLength": 1, "type": "string" },
3149
3171
  "required": { "type": "boolean" },
3150
3172
  },
3151
- "required": ["kind", "contractId", "required"],
3173
+ "required": ["capability", "required"],
3152
3174
  "type": "object",
3153
- }, {
3175
+ },
3176
+ "type": "array",
3177
+ },
3178
+ "contracts": {
3179
+ "items": {
3154
3180
  "properties": {
3155
- "kind": { "const": "surface", "type": "string" },
3181
+ "contractId": { "minLength": 1, "type": "string" },
3156
3182
  "required": { "type": "boolean" },
3157
- "surface": {
3158
- "properties": {
3159
- "action": {
3160
- "anyOf": [
3161
- { "const": "call", "type": "string" },
3162
- { "const": "publish", "type": "string" },
3163
- { "const": "subscribe", "type": "string" },
3164
- { "const": "observe", "type": "string" },
3165
- { "const": "cancel", "type": "string" },
3166
- ],
3167
- },
3168
- "contractId": {
3169
- "minLength": 1,
3170
- "type": "string",
3171
- },
3172
- "kind": {
3173
- "anyOf": [
3174
- { "const": "rpc", "type": "string" },
3175
- { "const": "operation", "type": "string" },
3176
- { "const": "event", "type": "string" },
3177
- { "const": "feed", "type": "string" },
3178
- ],
3179
- },
3180
- "name": { "minLength": 1, "type": "string" },
3181
- },
3182
- "required": ["contractId", "kind", "name"],
3183
- "type": "object",
3184
- },
3185
3183
  },
3186
- "required": ["kind", "surface", "required"],
3184
+ "required": ["contractId", "required"],
3187
3185
  "type": "object",
3188
- }, {
3186
+ },
3187
+ "type": "array",
3188
+ },
3189
+ "resources": {
3190
+ "items": {
3189
3191
  "properties": {
3190
- "capability": { "minLength": 1, "type": "string" },
3191
- "kind": { "const": "capability", "type": "string" },
3192
+ "alias": { "minLength": 1, "type": "string" },
3193
+ "definition": { "type": "object" },
3194
+ "kind": {
3195
+ "anyOf": [
3196
+ { "const": "kv", "type": "string" },
3197
+ { "const": "store", "type": "string" },
3198
+ { "const": "jobs", "type": "string" },
3199
+ { "const": "event-consumer", "type": "string" },
3200
+ { "const": "transfer", "type": "string" },
3201
+ ],
3202
+ },
3192
3203
  "required": { "type": "boolean" },
3193
3204
  },
3194
- "required": ["kind", "capability", "required"],
3205
+ "required": ["kind", "alias", "required"],
3195
3206
  "type": "object",
3196
- }, {
3197
- "properties": {
3198
- "kind": { "const": "resource", "type": "string" },
3199
- "required": { "type": "boolean" },
3200
- "resource": {
3201
- "properties": {
3202
- "alias": { "minLength": 1, "type": "string" },
3203
- "definition": { "type": "object" },
3204
- "kind": {
3205
- "anyOf": [
3206
- { "const": "kv", "type": "string" },
3207
- { "const": "store", "type": "string" },
3208
- { "const": "jobs", "type": "string" },
3209
- {
3210
- "const": "event-consumer",
3211
- "type": "string",
3212
- },
3213
- { "const": "transfer", "type": "string" },
3214
- ],
3215
- },
3216
- "required": { "type": "boolean" },
3217
- },
3218
- "required": ["kind", "alias", "required"],
3219
- "type": "object",
3207
+ },
3208
+ "type": "array",
3209
+ },
3210
+ "surfaces": {
3211
+ "items": {
3212
+ "properties": {
3213
+ "action": {
3214
+ "anyOf": [
3215
+ { "const": "call", "type": "string" },
3216
+ { "const": "publish", "type": "string" },
3217
+ { "const": "subscribe", "type": "string" },
3218
+ { "const": "observe", "type": "string" },
3219
+ { "const": "cancel", "type": "string" },
3220
+ ],
3221
+ },
3222
+ "contractId": { "minLength": 1, "type": "string" },
3223
+ "kind": {
3224
+ "anyOf": [
3225
+ { "const": "rpc", "type": "string" },
3226
+ { "const": "operation", "type": "string" },
3227
+ { "const": "event", "type": "string" },
3228
+ { "const": "feed", "type": "string" },
3229
+ ],
3220
3230
  },
3231
+ "name": { "minLength": 1, "type": "string" },
3232
+ "required": { "type": "boolean" },
3221
3233
  },
3222
- "required": ["kind", "resource", "required"],
3234
+ "required": [
3235
+ "contractId",
3236
+ "kind",
3237
+ "name",
3238
+ "required",
3239
+ ],
3223
3240
  "type": "object",
3224
- }],
3241
+ },
3242
+ "type": "array",
3243
+ },
3225
3244
  },
3226
- "type": "array",
3245
+ "required": [
3246
+ "contracts",
3247
+ "surfaces",
3248
+ "capabilities",
3249
+ "resources",
3250
+ ],
3251
+ "type": "object",
3227
3252
  },
3228
3253
  "summary": { "type": "object" },
3229
3254
  },
@@ -3339,89 +3364,92 @@ export const CONTRACT = {
3339
3364
  "type": "array",
3340
3365
  },
3341
3366
  "requestedNeeds": {
3342
- "items": {
3343
- "anyOf": [{
3367
+ "properties": {
3368
+ "capabilities": {
3369
+ "items": {
3344
3370
  "properties": {
3345
- "contractId": { "minLength": 1, "type": "string" },
3346
- "kind": { "const": "contract", "type": "string" },
3371
+ "capability": { "minLength": 1, "type": "string" },
3347
3372
  "required": { "type": "boolean" },
3348
3373
  },
3349
- "required": ["kind", "contractId", "required"],
3374
+ "required": ["capability", "required"],
3350
3375
  "type": "object",
3351
- }, {
3376
+ },
3377
+ "type": "array",
3378
+ },
3379
+ "contracts": {
3380
+ "items": {
3352
3381
  "properties": {
3353
- "kind": { "const": "surface", "type": "string" },
3382
+ "contractId": { "minLength": 1, "type": "string" },
3354
3383
  "required": { "type": "boolean" },
3355
- "surface": {
3356
- "properties": {
3357
- "action": {
3358
- "anyOf": [
3359
- { "const": "call", "type": "string" },
3360
- { "const": "publish", "type": "string" },
3361
- { "const": "subscribe", "type": "string" },
3362
- { "const": "observe", "type": "string" },
3363
- { "const": "cancel", "type": "string" },
3364
- ],
3365
- },
3366
- "contractId": {
3367
- "minLength": 1,
3368
- "type": "string",
3369
- },
3370
- "kind": {
3371
- "anyOf": [
3372
- { "const": "rpc", "type": "string" },
3373
- { "const": "operation", "type": "string" },
3374
- { "const": "event", "type": "string" },
3375
- { "const": "feed", "type": "string" },
3376
- ],
3377
- },
3378
- "name": { "minLength": 1, "type": "string" },
3379
- },
3380
- "required": ["contractId", "kind", "name"],
3381
- "type": "object",
3382
- },
3383
3384
  },
3384
- "required": ["kind", "surface", "required"],
3385
+ "required": ["contractId", "required"],
3385
3386
  "type": "object",
3386
- }, {
3387
+ },
3388
+ "type": "array",
3389
+ },
3390
+ "resources": {
3391
+ "items": {
3387
3392
  "properties": {
3388
- "capability": { "minLength": 1, "type": "string" },
3389
- "kind": { "const": "capability", "type": "string" },
3393
+ "alias": { "minLength": 1, "type": "string" },
3394
+ "definition": { "type": "object" },
3395
+ "kind": {
3396
+ "anyOf": [
3397
+ { "const": "kv", "type": "string" },
3398
+ { "const": "store", "type": "string" },
3399
+ { "const": "jobs", "type": "string" },
3400
+ { "const": "event-consumer", "type": "string" },
3401
+ { "const": "transfer", "type": "string" },
3402
+ ],
3403
+ },
3390
3404
  "required": { "type": "boolean" },
3391
3405
  },
3392
- "required": ["kind", "capability", "required"],
3406
+ "required": ["kind", "alias", "required"],
3393
3407
  "type": "object",
3394
- }, {
3408
+ },
3409
+ "type": "array",
3410
+ },
3411
+ "surfaces": {
3412
+ "items": {
3395
3413
  "properties": {
3396
- "kind": { "const": "resource", "type": "string" },
3397
- "required": { "type": "boolean" },
3398
- "resource": {
3399
- "properties": {
3400
- "alias": { "minLength": 1, "type": "string" },
3401
- "definition": { "type": "object" },
3402
- "kind": {
3403
- "anyOf": [
3404
- { "const": "kv", "type": "string" },
3405
- { "const": "store", "type": "string" },
3406
- { "const": "jobs", "type": "string" },
3407
- {
3408
- "const": "event-consumer",
3409
- "type": "string",
3410
- },
3411
- { "const": "transfer", "type": "string" },
3412
- ],
3413
- },
3414
- "required": { "type": "boolean" },
3415
- },
3416
- "required": ["kind", "alias", "required"],
3417
- "type": "object",
3414
+ "action": {
3415
+ "anyOf": [
3416
+ { "const": "call", "type": "string" },
3417
+ { "const": "publish", "type": "string" },
3418
+ { "const": "subscribe", "type": "string" },
3419
+ { "const": "observe", "type": "string" },
3420
+ { "const": "cancel", "type": "string" },
3421
+ ],
3422
+ },
3423
+ "contractId": { "minLength": 1, "type": "string" },
3424
+ "kind": {
3425
+ "anyOf": [
3426
+ { "const": "rpc", "type": "string" },
3427
+ { "const": "operation", "type": "string" },
3428
+ { "const": "event", "type": "string" },
3429
+ { "const": "feed", "type": "string" },
3430
+ ],
3418
3431
  },
3432
+ "name": { "minLength": 1, "type": "string" },
3433
+ "required": { "type": "boolean" },
3419
3434
  },
3420
- "required": ["kind", "resource", "required"],
3435
+ "required": [
3436
+ "contractId",
3437
+ "kind",
3438
+ "name",
3439
+ "required",
3440
+ ],
3421
3441
  "type": "object",
3422
- }],
3442
+ },
3443
+ "type": "array",
3444
+ },
3423
3445
  },
3424
- "type": "array",
3446
+ "required": [
3447
+ "contracts",
3448
+ "surfaces",
3449
+ "capabilities",
3450
+ "resources",
3451
+ ],
3452
+ "type": "object",
3425
3453
  },
3426
3454
  "summary": { "type": "object" },
3427
3455
  },
@@ -3523,89 +3551,92 @@ export const CONTRACT = {
3523
3551
  "type": "array",
3524
3552
  },
3525
3553
  "requestedNeeds": {
3526
- "items": {
3527
- "anyOf": [{
3554
+ "properties": {
3555
+ "capabilities": {
3556
+ "items": {
3528
3557
  "properties": {
3529
- "contractId": { "minLength": 1, "type": "string" },
3530
- "kind": { "const": "contract", "type": "string" },
3558
+ "capability": { "minLength": 1, "type": "string" },
3531
3559
  "required": { "type": "boolean" },
3532
3560
  },
3533
- "required": ["kind", "contractId", "required"],
3561
+ "required": ["capability", "required"],
3534
3562
  "type": "object",
3535
- }, {
3563
+ },
3564
+ "type": "array",
3565
+ },
3566
+ "contracts": {
3567
+ "items": {
3536
3568
  "properties": {
3537
- "kind": { "const": "surface", "type": "string" },
3569
+ "contractId": { "minLength": 1, "type": "string" },
3538
3570
  "required": { "type": "boolean" },
3539
- "surface": {
3540
- "properties": {
3541
- "action": {
3542
- "anyOf": [
3543
- { "const": "call", "type": "string" },
3544
- { "const": "publish", "type": "string" },
3545
- { "const": "subscribe", "type": "string" },
3546
- { "const": "observe", "type": "string" },
3547
- { "const": "cancel", "type": "string" },
3548
- ],
3549
- },
3550
- "contractId": {
3551
- "minLength": 1,
3552
- "type": "string",
3553
- },
3554
- "kind": {
3555
- "anyOf": [
3556
- { "const": "rpc", "type": "string" },
3557
- { "const": "operation", "type": "string" },
3558
- { "const": "event", "type": "string" },
3559
- { "const": "feed", "type": "string" },
3560
- ],
3561
- },
3562
- "name": { "minLength": 1, "type": "string" },
3563
- },
3564
- "required": ["contractId", "kind", "name"],
3565
- "type": "object",
3566
- },
3567
3571
  },
3568
- "required": ["kind", "surface", "required"],
3572
+ "required": ["contractId", "required"],
3569
3573
  "type": "object",
3570
- }, {
3574
+ },
3575
+ "type": "array",
3576
+ },
3577
+ "resources": {
3578
+ "items": {
3571
3579
  "properties": {
3572
- "capability": { "minLength": 1, "type": "string" },
3573
- "kind": { "const": "capability", "type": "string" },
3580
+ "alias": { "minLength": 1, "type": "string" },
3581
+ "definition": { "type": "object" },
3582
+ "kind": {
3583
+ "anyOf": [
3584
+ { "const": "kv", "type": "string" },
3585
+ { "const": "store", "type": "string" },
3586
+ { "const": "jobs", "type": "string" },
3587
+ { "const": "event-consumer", "type": "string" },
3588
+ { "const": "transfer", "type": "string" },
3589
+ ],
3590
+ },
3574
3591
  "required": { "type": "boolean" },
3575
3592
  },
3576
- "required": ["kind", "capability", "required"],
3593
+ "required": ["kind", "alias", "required"],
3577
3594
  "type": "object",
3578
- }, {
3595
+ },
3596
+ "type": "array",
3597
+ },
3598
+ "surfaces": {
3599
+ "items": {
3579
3600
  "properties": {
3580
- "kind": { "const": "resource", "type": "string" },
3581
- "required": { "type": "boolean" },
3582
- "resource": {
3583
- "properties": {
3584
- "alias": { "minLength": 1, "type": "string" },
3585
- "definition": { "type": "object" },
3586
- "kind": {
3587
- "anyOf": [
3588
- { "const": "kv", "type": "string" },
3589
- { "const": "store", "type": "string" },
3590
- { "const": "jobs", "type": "string" },
3591
- {
3592
- "const": "event-consumer",
3593
- "type": "string",
3594
- },
3595
- { "const": "transfer", "type": "string" },
3596
- ],
3597
- },
3598
- "required": { "type": "boolean" },
3599
- },
3600
- "required": ["kind", "alias", "required"],
3601
- "type": "object",
3601
+ "action": {
3602
+ "anyOf": [
3603
+ { "const": "call", "type": "string" },
3604
+ { "const": "publish", "type": "string" },
3605
+ { "const": "subscribe", "type": "string" },
3606
+ { "const": "observe", "type": "string" },
3607
+ { "const": "cancel", "type": "string" },
3608
+ ],
3609
+ },
3610
+ "contractId": { "minLength": 1, "type": "string" },
3611
+ "kind": {
3612
+ "anyOf": [
3613
+ { "const": "rpc", "type": "string" },
3614
+ { "const": "operation", "type": "string" },
3615
+ { "const": "event", "type": "string" },
3616
+ { "const": "feed", "type": "string" },
3617
+ ],
3602
3618
  },
3619
+ "name": { "minLength": 1, "type": "string" },
3620
+ "required": { "type": "boolean" },
3603
3621
  },
3604
- "required": ["kind", "resource", "required"],
3622
+ "required": [
3623
+ "contractId",
3624
+ "kind",
3625
+ "name",
3626
+ "required",
3627
+ ],
3605
3628
  "type": "object",
3606
- }],
3629
+ },
3630
+ "type": "array",
3631
+ },
3607
3632
  },
3608
- "type": "array",
3633
+ "required": [
3634
+ "contracts",
3635
+ "surfaces",
3636
+ "capabilities",
3637
+ "resources",
3638
+ ],
3639
+ "type": "object",
3609
3640
  },
3610
3641
  "summary": { "type": "object" },
3611
3642
  },
@@ -3752,89 +3783,104 @@ export const CONTRACT = {
3752
3783
  "type": "array",
3753
3784
  },
3754
3785
  "requestedNeeds": {
3755
- "items": {
3756
- "anyOf": [{
3786
+ "properties": {
3787
+ "capabilities": {
3788
+ "items": {
3757
3789
  "properties": {
3758
- "contractId": { "minLength": 1, "type": "string" },
3759
- "kind": { "const": "contract", "type": "string" },
3790
+ "capability": {
3791
+ "minLength": 1,
3792
+ "type": "string",
3793
+ },
3760
3794
  "required": { "type": "boolean" },
3761
3795
  },
3762
- "required": ["kind", "contractId", "required"],
3796
+ "required": ["capability", "required"],
3763
3797
  "type": "object",
3764
- }, {
3798
+ },
3799
+ "type": "array",
3800
+ },
3801
+ "contracts": {
3802
+ "items": {
3765
3803
  "properties": {
3766
- "kind": { "const": "surface", "type": "string" },
3767
- "required": { "type": "boolean" },
3768
- "surface": {
3769
- "properties": {
3770
- "action": {
3771
- "anyOf": [
3772
- { "const": "call", "type": "string" },
3773
- { "const": "publish", "type": "string" },
3774
- { "const": "subscribe", "type": "string" },
3775
- { "const": "observe", "type": "string" },
3776
- { "const": "cancel", "type": "string" },
3777
- ],
3778
- },
3779
- "contractId": {
3780
- "minLength": 1,
3781
- "type": "string",
3782
- },
3783
- "kind": {
3784
- "anyOf": [
3785
- { "const": "rpc", "type": "string" },
3786
- { "const": "operation", "type": "string" },
3787
- { "const": "event", "type": "string" },
3788
- { "const": "feed", "type": "string" },
3789
- ],
3790
- },
3791
- "name": { "minLength": 1, "type": "string" },
3792
- },
3793
- "required": ["contractId", "kind", "name"],
3794
- "type": "object",
3804
+ "contractId": {
3805
+ "minLength": 1,
3806
+ "type": "string",
3795
3807
  },
3808
+ "required": { "type": "boolean" },
3796
3809
  },
3797
- "required": ["kind", "surface", "required"],
3810
+ "required": ["contractId", "required"],
3798
3811
  "type": "object",
3799
- }, {
3812
+ },
3813
+ "type": "array",
3814
+ },
3815
+ "resources": {
3816
+ "items": {
3800
3817
  "properties": {
3801
- "capability": { "minLength": 1, "type": "string" },
3802
- "kind": { "const": "capability", "type": "string" },
3818
+ "alias": { "minLength": 1, "type": "string" },
3819
+ "definition": { "type": "object" },
3820
+ "kind": {
3821
+ "anyOf": [
3822
+ { "const": "kv", "type": "string" },
3823
+ { "const": "store", "type": "string" },
3824
+ { "const": "jobs", "type": "string" },
3825
+ {
3826
+ "const": "event-consumer",
3827
+ "type": "string",
3828
+ },
3829
+ { "const": "transfer", "type": "string" },
3830
+ ],
3831
+ },
3803
3832
  "required": { "type": "boolean" },
3804
3833
  },
3805
- "required": ["kind", "capability", "required"],
3834
+ "required": ["kind", "alias", "required"],
3806
3835
  "type": "object",
3807
- }, {
3836
+ },
3837
+ "type": "array",
3838
+ },
3839
+ "surfaces": {
3840
+ "items": {
3808
3841
  "properties": {
3809
- "kind": { "const": "resource", "type": "string" },
3810
- "required": { "type": "boolean" },
3811
- "resource": {
3812
- "properties": {
3813
- "alias": { "minLength": 1, "type": "string" },
3814
- "definition": { "type": "object" },
3815
- "kind": {
3816
- "anyOf": [
3817
- { "const": "kv", "type": "string" },
3818
- { "const": "store", "type": "string" },
3819
- { "const": "jobs", "type": "string" },
3820
- {
3821
- "const": "event-consumer",
3822
- "type": "string",
3823
- },
3824
- { "const": "transfer", "type": "string" },
3825
- ],
3826
- },
3827
- "required": { "type": "boolean" },
3828
- },
3829
- "required": ["kind", "alias", "required"],
3830
- "type": "object",
3842
+ "action": {
3843
+ "anyOf": [
3844
+ { "const": "call", "type": "string" },
3845
+ { "const": "publish", "type": "string" },
3846
+ { "const": "subscribe", "type": "string" },
3847
+ { "const": "observe", "type": "string" },
3848
+ { "const": "cancel", "type": "string" },
3849
+ ],
3850
+ },
3851
+ "contractId": {
3852
+ "minLength": 1,
3853
+ "type": "string",
3854
+ },
3855
+ "kind": {
3856
+ "anyOf": [
3857
+ { "const": "rpc", "type": "string" },
3858
+ { "const": "operation", "type": "string" },
3859
+ { "const": "event", "type": "string" },
3860
+ { "const": "feed", "type": "string" },
3861
+ ],
3831
3862
  },
3863
+ "name": { "minLength": 1, "type": "string" },
3864
+ "required": { "type": "boolean" },
3832
3865
  },
3833
- "required": ["kind", "resource", "required"],
3866
+ "required": [
3867
+ "contractId",
3868
+ "kind",
3869
+ "name",
3870
+ "required",
3871
+ ],
3834
3872
  "type": "object",
3835
- }],
3873
+ },
3874
+ "type": "array",
3875
+ },
3836
3876
  },
3837
- "type": "array",
3877
+ "required": [
3878
+ "contracts",
3879
+ "surfaces",
3880
+ "capabilities",
3881
+ "resources",
3882
+ ],
3883
+ "type": "object",
3838
3884
  },
3839
3885
  "summary": { "type": "object" },
3840
3886
  },
@@ -3936,89 +3982,104 @@ export const CONTRACT = {
3936
3982
  "type": "array",
3937
3983
  },
3938
3984
  "requestedNeeds": {
3939
- "items": {
3940
- "anyOf": [{
3985
+ "properties": {
3986
+ "capabilities": {
3987
+ "items": {
3941
3988
  "properties": {
3942
- "contractId": { "minLength": 1, "type": "string" },
3943
- "kind": { "const": "contract", "type": "string" },
3944
- "required": { "type": "boolean" },
3989
+ "capability": {
3990
+ "minLength": 1,
3991
+ "type": "string",
3992
+ },
3993
+ "required": { "type": "boolean" },
3945
3994
  },
3946
- "required": ["kind", "contractId", "required"],
3995
+ "required": ["capability", "required"],
3947
3996
  "type": "object",
3948
- }, {
3997
+ },
3998
+ "type": "array",
3999
+ },
4000
+ "contracts": {
4001
+ "items": {
3949
4002
  "properties": {
3950
- "kind": { "const": "surface", "type": "string" },
3951
- "required": { "type": "boolean" },
3952
- "surface": {
3953
- "properties": {
3954
- "action": {
3955
- "anyOf": [
3956
- { "const": "call", "type": "string" },
3957
- { "const": "publish", "type": "string" },
3958
- { "const": "subscribe", "type": "string" },
3959
- { "const": "observe", "type": "string" },
3960
- { "const": "cancel", "type": "string" },
3961
- ],
3962
- },
3963
- "contractId": {
3964
- "minLength": 1,
3965
- "type": "string",
3966
- },
3967
- "kind": {
3968
- "anyOf": [
3969
- { "const": "rpc", "type": "string" },
3970
- { "const": "operation", "type": "string" },
3971
- { "const": "event", "type": "string" },
3972
- { "const": "feed", "type": "string" },
3973
- ],
3974
- },
3975
- "name": { "minLength": 1, "type": "string" },
3976
- },
3977
- "required": ["contractId", "kind", "name"],
3978
- "type": "object",
4003
+ "contractId": {
4004
+ "minLength": 1,
4005
+ "type": "string",
3979
4006
  },
4007
+ "required": { "type": "boolean" },
3980
4008
  },
3981
- "required": ["kind", "surface", "required"],
4009
+ "required": ["contractId", "required"],
3982
4010
  "type": "object",
3983
- }, {
4011
+ },
4012
+ "type": "array",
4013
+ },
4014
+ "resources": {
4015
+ "items": {
3984
4016
  "properties": {
3985
- "capability": { "minLength": 1, "type": "string" },
3986
- "kind": { "const": "capability", "type": "string" },
4017
+ "alias": { "minLength": 1, "type": "string" },
4018
+ "definition": { "type": "object" },
4019
+ "kind": {
4020
+ "anyOf": [
4021
+ { "const": "kv", "type": "string" },
4022
+ { "const": "store", "type": "string" },
4023
+ { "const": "jobs", "type": "string" },
4024
+ {
4025
+ "const": "event-consumer",
4026
+ "type": "string",
4027
+ },
4028
+ { "const": "transfer", "type": "string" },
4029
+ ],
4030
+ },
3987
4031
  "required": { "type": "boolean" },
3988
4032
  },
3989
- "required": ["kind", "capability", "required"],
4033
+ "required": ["kind", "alias", "required"],
3990
4034
  "type": "object",
3991
- }, {
4035
+ },
4036
+ "type": "array",
4037
+ },
4038
+ "surfaces": {
4039
+ "items": {
3992
4040
  "properties": {
3993
- "kind": { "const": "resource", "type": "string" },
3994
- "required": { "type": "boolean" },
3995
- "resource": {
3996
- "properties": {
3997
- "alias": { "minLength": 1, "type": "string" },
3998
- "definition": { "type": "object" },
3999
- "kind": {
4000
- "anyOf": [
4001
- { "const": "kv", "type": "string" },
4002
- { "const": "store", "type": "string" },
4003
- { "const": "jobs", "type": "string" },
4004
- {
4005
- "const": "event-consumer",
4006
- "type": "string",
4007
- },
4008
- { "const": "transfer", "type": "string" },
4009
- ],
4010
- },
4011
- "required": { "type": "boolean" },
4012
- },
4013
- "required": ["kind", "alias", "required"],
4014
- "type": "object",
4041
+ "action": {
4042
+ "anyOf": [
4043
+ { "const": "call", "type": "string" },
4044
+ { "const": "publish", "type": "string" },
4045
+ { "const": "subscribe", "type": "string" },
4046
+ { "const": "observe", "type": "string" },
4047
+ { "const": "cancel", "type": "string" },
4048
+ ],
4049
+ },
4050
+ "contractId": {
4051
+ "minLength": 1,
4052
+ "type": "string",
4053
+ },
4054
+ "kind": {
4055
+ "anyOf": [
4056
+ { "const": "rpc", "type": "string" },
4057
+ { "const": "operation", "type": "string" },
4058
+ { "const": "event", "type": "string" },
4059
+ { "const": "feed", "type": "string" },
4060
+ ],
4015
4061
  },
4062
+ "name": { "minLength": 1, "type": "string" },
4063
+ "required": { "type": "boolean" },
4016
4064
  },
4017
- "required": ["kind", "resource", "required"],
4065
+ "required": [
4066
+ "contractId",
4067
+ "kind",
4068
+ "name",
4069
+ "required",
4070
+ ],
4018
4071
  "type": "object",
4019
- }],
4072
+ },
4073
+ "type": "array",
4074
+ },
4020
4075
  },
4021
- "type": "array",
4076
+ "required": [
4077
+ "contracts",
4078
+ "surfaces",
4079
+ "capabilities",
4080
+ "resources",
4081
+ ],
4082
+ "type": "object",
4022
4083
  },
4023
4084
  "summary": { "type": "object" },
4024
4085
  },
@@ -4088,83 +4149,87 @@ export const CONTRACT = {
4088
4149
  "type": "array",
4089
4150
  },
4090
4151
  "needs": {
4091
- "items": {
4092
- "anyOf": [{
4152
+ "properties": {
4153
+ "capabilities": {
4154
+ "items": {
4093
4155
  "properties": {
4094
- "contractId": { "minLength": 1, "type": "string" },
4095
- "kind": { "const": "contract", "type": "string" },
4156
+ "capability": { "minLength": 1, "type": "string" },
4096
4157
  "required": { "type": "boolean" },
4097
4158
  },
4098
- "required": ["kind", "contractId", "required"],
4159
+ "required": ["capability", "required"],
4099
4160
  "type": "object",
4100
- }, {
4161
+ },
4162
+ "type": "array",
4163
+ },
4164
+ "contracts": {
4165
+ "items": {
4101
4166
  "properties": {
4102
- "kind": { "const": "surface", "type": "string" },
4167
+ "contractId": { "minLength": 1, "type": "string" },
4103
4168
  "required": { "type": "boolean" },
4104
- "surface": {
4105
- "properties": {
4106
- "action": {
4107
- "anyOf": [
4108
- { "const": "call", "type": "string" },
4109
- { "const": "publish", "type": "string" },
4110
- { "const": "subscribe", "type": "string" },
4111
- { "const": "observe", "type": "string" },
4112
- { "const": "cancel", "type": "string" },
4113
- ],
4114
- },
4115
- "contractId": { "minLength": 1, "type": "string" },
4116
- "kind": {
4117
- "anyOf": [
4118
- { "const": "rpc", "type": "string" },
4119
- { "const": "operation", "type": "string" },
4120
- { "const": "event", "type": "string" },
4121
- { "const": "feed", "type": "string" },
4122
- ],
4123
- },
4124
- "name": { "minLength": 1, "type": "string" },
4125
- },
4126
- "required": ["contractId", "kind", "name"],
4127
- "type": "object",
4128
- },
4129
4169
  },
4130
- "required": ["kind", "surface", "required"],
4170
+ "required": ["contractId", "required"],
4131
4171
  "type": "object",
4132
- }, {
4172
+ },
4173
+ "type": "array",
4174
+ },
4175
+ "resources": {
4176
+ "items": {
4133
4177
  "properties": {
4134
- "capability": { "minLength": 1, "type": "string" },
4135
- "kind": { "const": "capability", "type": "string" },
4178
+ "alias": { "minLength": 1, "type": "string" },
4179
+ "definition": { "type": "object" },
4180
+ "kind": {
4181
+ "anyOf": [
4182
+ { "const": "kv", "type": "string" },
4183
+ { "const": "store", "type": "string" },
4184
+ { "const": "jobs", "type": "string" },
4185
+ { "const": "event-consumer", "type": "string" },
4186
+ { "const": "transfer", "type": "string" },
4187
+ ],
4188
+ },
4136
4189
  "required": { "type": "boolean" },
4137
4190
  },
4138
- "required": ["kind", "capability", "required"],
4191
+ "required": ["kind", "alias", "required"],
4139
4192
  "type": "object",
4140
- }, {
4193
+ },
4194
+ "type": "array",
4195
+ },
4196
+ "surfaces": {
4197
+ "items": {
4141
4198
  "properties": {
4142
- "kind": { "const": "resource", "type": "string" },
4143
- "required": { "type": "boolean" },
4144
- "resource": {
4145
- "properties": {
4146
- "alias": { "minLength": 1, "type": "string" },
4147
- "definition": { "type": "object" },
4148
- "kind": {
4149
- "anyOf": [
4150
- { "const": "kv", "type": "string" },
4151
- { "const": "store", "type": "string" },
4152
- { "const": "jobs", "type": "string" },
4153
- { "const": "event-consumer", "type": "string" },
4154
- { "const": "transfer", "type": "string" },
4155
- ],
4156
- },
4157
- "required": { "type": "boolean" },
4158
- },
4159
- "required": ["kind", "alias", "required"],
4160
- "type": "object",
4199
+ "action": {
4200
+ "anyOf": [
4201
+ { "const": "call", "type": "string" },
4202
+ { "const": "publish", "type": "string" },
4203
+ { "const": "subscribe", "type": "string" },
4204
+ { "const": "observe", "type": "string" },
4205
+ { "const": "cancel", "type": "string" },
4206
+ ],
4207
+ },
4208
+ "contractId": { "minLength": 1, "type": "string" },
4209
+ "kind": {
4210
+ "anyOf": [
4211
+ { "const": "rpc", "type": "string" },
4212
+ { "const": "operation", "type": "string" },
4213
+ { "const": "event", "type": "string" },
4214
+ { "const": "feed", "type": "string" },
4215
+ ],
4161
4216
  },
4217
+ "name": { "minLength": 1, "type": "string" },
4218
+ "required": { "type": "boolean" },
4162
4219
  },
4163
- "required": ["kind", "resource", "required"],
4220
+ "required": ["contractId", "kind", "name", "required"],
4164
4221
  "type": "object",
4165
- }],
4222
+ },
4223
+ "type": "array",
4224
+ },
4166
4225
  },
4167
- "type": "array",
4226
+ "required": [
4227
+ "contracts",
4228
+ "surfaces",
4229
+ "capabilities",
4230
+ "resources",
4231
+ ],
4232
+ "type": "object",
4168
4233
  },
4169
4234
  "resources": {
4170
4235
  "items": {
@@ -4250,40 +4315,19 @@ export const CONTRACT = {
4250
4315
  "desiredVersion": { "minLength": 1, "type": "string" },
4251
4316
  "error": { "minLength": 1, "type": "string" },
4252
4317
  "grants": {
4253
- "items": {
4254
- "anyOf": [{
4318
+ "properties": {
4319
+ "capabilities": {
4320
+ "items": {
4255
4321
  "properties": {
4256
4322
  "capability": { "minLength": 1, "type": "string" },
4257
- "kind": { "const": "capability", "type": "string" },
4258
- },
4259
- "required": ["kind", "capability"],
4260
- "type": "object",
4261
- }, {
4262
- "properties": {
4263
- "action": {
4264
- "anyOf": [
4265
- { "const": "call", "type": "string" },
4266
- { "const": "publish", "type": "string" },
4267
- { "const": "subscribe", "type": "string" },
4268
- { "const": "observe", "type": "string" },
4269
- { "const": "cancel", "type": "string" },
4270
- ],
4271
- },
4272
- "contractId": { "minLength": 1, "type": "string" },
4273
- "kind": { "const": "surface", "type": "string" },
4274
- "name": { "minLength": 1, "type": "string" },
4275
- "surfaceKind": {
4276
- "anyOf": [
4277
- { "const": "rpc", "type": "string" },
4278
- { "const": "operation", "type": "string" },
4279
- { "const": "event", "type": "string" },
4280
- { "const": "feed", "type": "string" },
4281
- ],
4282
- },
4283
4323
  },
4284
- "required": ["kind", "contractId", "surfaceKind", "name"],
4324
+ "required": ["capability"],
4285
4325
  "type": "object",
4286
- }, {
4326
+ },
4327
+ "type": "array",
4328
+ },
4329
+ "nats": {
4330
+ "items": {
4287
4331
  "properties": {
4288
4332
  "direction": {
4289
4333
  "anyOf": [{ "const": "publish", "type": "string" }, {
@@ -4300,7 +4344,6 @@ export const CONTRACT = {
4300
4344
  { "const": "transfer", "type": "string" },
4301
4345
  ],
4302
4346
  },
4303
- "kind": { "const": "nats", "type": "string" },
4304
4347
  "requiredCapabilities": {
4305
4348
  "items": { "minLength": 1, "type": "string" },
4306
4349
  "type": "array",
@@ -4333,16 +4376,46 @@ export const CONTRACT = {
4333
4376
  },
4334
4377
  },
4335
4378
  "required": [
4336
- "kind",
4337
4379
  "direction",
4338
4380
  "subject",
4339
4381
  "requiredCapabilities",
4340
4382
  "grantSource",
4341
4383
  ],
4342
4384
  "type": "object",
4343
- }],
4385
+ },
4386
+ "type": "array",
4387
+ },
4388
+ "surfaces": {
4389
+ "items": {
4390
+ "properties": {
4391
+ "action": {
4392
+ "anyOf": [
4393
+ { "const": "call", "type": "string" },
4394
+ { "const": "publish", "type": "string" },
4395
+ { "const": "subscribe", "type": "string" },
4396
+ { "const": "observe", "type": "string" },
4397
+ { "const": "cancel", "type": "string" },
4398
+ ],
4399
+ },
4400
+ "contractId": { "minLength": 1, "type": "string" },
4401
+ "name": { "minLength": 1, "type": "string" },
4402
+ "surfaceKind": {
4403
+ "anyOf": [
4404
+ { "const": "rpc", "type": "string" },
4405
+ { "const": "operation", "type": "string" },
4406
+ { "const": "event", "type": "string" },
4407
+ { "const": "feed", "type": "string" },
4408
+ ],
4409
+ },
4410
+ },
4411
+ "required": ["contractId", "surfaceKind", "name"],
4412
+ "type": "object",
4413
+ },
4414
+ "type": "array",
4415
+ },
4344
4416
  },
4345
- "type": "array",
4417
+ "required": ["capabilities", "surfaces", "nats"],
4418
+ "type": "object",
4346
4419
  },
4347
4420
  "reconciledAt": {
4348
4421
  "anyOf": [{ "format": "date-time", "type": "string" }, {
@@ -7726,83 +7799,87 @@ export const CONTRACT = {
7726
7799
  "type": "array",
7727
7800
  },
7728
7801
  "needs": {
7729
- "items": {
7730
- "anyOf": [{
7802
+ "properties": {
7803
+ "capabilities": {
7804
+ "items": {
7731
7805
  "properties": {
7732
- "contractId": { "minLength": 1, "type": "string" },
7733
- "kind": { "const": "contract", "type": "string" },
7806
+ "capability": { "minLength": 1, "type": "string" },
7734
7807
  "required": { "type": "boolean" },
7735
7808
  },
7736
- "required": ["kind", "contractId", "required"],
7809
+ "required": ["capability", "required"],
7737
7810
  "type": "object",
7738
- }, {
7811
+ },
7812
+ "type": "array",
7813
+ },
7814
+ "contracts": {
7815
+ "items": {
7739
7816
  "properties": {
7740
- "kind": { "const": "surface", "type": "string" },
7817
+ "contractId": { "minLength": 1, "type": "string" },
7741
7818
  "required": { "type": "boolean" },
7742
- "surface": {
7743
- "properties": {
7744
- "action": {
7745
- "anyOf": [
7746
- { "const": "call", "type": "string" },
7747
- { "const": "publish", "type": "string" },
7748
- { "const": "subscribe", "type": "string" },
7749
- { "const": "observe", "type": "string" },
7750
- { "const": "cancel", "type": "string" },
7751
- ],
7752
- },
7753
- "contractId": { "minLength": 1, "type": "string" },
7754
- "kind": {
7755
- "anyOf": [
7756
- { "const": "rpc", "type": "string" },
7757
- { "const": "operation", "type": "string" },
7758
- { "const": "event", "type": "string" },
7759
- { "const": "feed", "type": "string" },
7760
- ],
7761
- },
7762
- "name": { "minLength": 1, "type": "string" },
7763
- },
7764
- "required": ["contractId", "kind", "name"],
7765
- "type": "object",
7766
- },
7767
7819
  },
7768
- "required": ["kind", "surface", "required"],
7820
+ "required": ["contractId", "required"],
7769
7821
  "type": "object",
7770
- }, {
7822
+ },
7823
+ "type": "array",
7824
+ },
7825
+ "resources": {
7826
+ "items": {
7771
7827
  "properties": {
7772
- "capability": { "minLength": 1, "type": "string" },
7773
- "kind": { "const": "capability", "type": "string" },
7828
+ "alias": { "minLength": 1, "type": "string" },
7829
+ "definition": { "type": "object" },
7830
+ "kind": {
7831
+ "anyOf": [
7832
+ { "const": "kv", "type": "string" },
7833
+ { "const": "store", "type": "string" },
7834
+ { "const": "jobs", "type": "string" },
7835
+ { "const": "event-consumer", "type": "string" },
7836
+ { "const": "transfer", "type": "string" },
7837
+ ],
7838
+ },
7774
7839
  "required": { "type": "boolean" },
7775
7840
  },
7776
- "required": ["kind", "capability", "required"],
7841
+ "required": ["kind", "alias", "required"],
7777
7842
  "type": "object",
7778
- }, {
7843
+ },
7844
+ "type": "array",
7845
+ },
7846
+ "surfaces": {
7847
+ "items": {
7779
7848
  "properties": {
7780
- "kind": { "const": "resource", "type": "string" },
7781
- "required": { "type": "boolean" },
7782
- "resource": {
7783
- "properties": {
7784
- "alias": { "minLength": 1, "type": "string" },
7785
- "definition": { "type": "object" },
7786
- "kind": {
7787
- "anyOf": [
7788
- { "const": "kv", "type": "string" },
7789
- { "const": "store", "type": "string" },
7790
- { "const": "jobs", "type": "string" },
7791
- { "const": "event-consumer", "type": "string" },
7792
- { "const": "transfer", "type": "string" },
7793
- ],
7794
- },
7795
- "required": { "type": "boolean" },
7796
- },
7797
- "required": ["kind", "alias", "required"],
7798
- "type": "object",
7849
+ "action": {
7850
+ "anyOf": [
7851
+ { "const": "call", "type": "string" },
7852
+ { "const": "publish", "type": "string" },
7853
+ { "const": "subscribe", "type": "string" },
7854
+ { "const": "observe", "type": "string" },
7855
+ { "const": "cancel", "type": "string" },
7856
+ ],
7857
+ },
7858
+ "contractId": { "minLength": 1, "type": "string" },
7859
+ "kind": {
7860
+ "anyOf": [
7861
+ { "const": "rpc", "type": "string" },
7862
+ { "const": "operation", "type": "string" },
7863
+ { "const": "event", "type": "string" },
7864
+ { "const": "feed", "type": "string" },
7865
+ ],
7799
7866
  },
7867
+ "name": { "minLength": 1, "type": "string" },
7868
+ "required": { "type": "boolean" },
7800
7869
  },
7801
- "required": ["kind", "resource", "required"],
7870
+ "required": ["contractId", "kind", "name", "required"],
7802
7871
  "type": "object",
7803
- }],
7872
+ },
7873
+ "type": "array",
7874
+ },
7804
7875
  },
7805
- "type": "array",
7876
+ "required": [
7877
+ "contracts",
7878
+ "surfaces",
7879
+ "capabilities",
7880
+ "resources",
7881
+ ],
7882
+ "type": "object",
7806
7883
  },
7807
7884
  "resources": {
7808
7885
  "items": {
@@ -7882,6 +7959,22 @@ export const CONTRACT = {
7882
7959
  ],
7883
7960
  "type": "object",
7884
7961
  },
7962
+ "DeploymentAuthorityCapabilityNeed": {
7963
+ "properties": {
7964
+ "capability": { "minLength": 1, "type": "string" },
7965
+ "required": { "type": "boolean" },
7966
+ },
7967
+ "required": ["capability", "required"],
7968
+ "type": "object",
7969
+ },
7970
+ "DeploymentAuthorityContractNeed": {
7971
+ "properties": {
7972
+ "contractId": { "minLength": 1, "type": "string" },
7973
+ "required": { "type": "boolean" },
7974
+ },
7975
+ "required": ["contractId", "required"],
7976
+ "type": "object",
7977
+ },
7885
7978
  "DeploymentAuthorityGrantOverride": {
7886
7979
  "anyOf": [{
7887
7980
  "properties": {
@@ -7979,40 +8072,19 @@ export const CONTRACT = {
7979
8072
  "desiredVersion": { "minLength": 1, "type": "string" },
7980
8073
  "error": { "minLength": 1, "type": "string" },
7981
8074
  "grants": {
7982
- "items": {
7983
- "anyOf": [{
8075
+ "properties": {
8076
+ "capabilities": {
8077
+ "items": {
7984
8078
  "properties": {
7985
8079
  "capability": { "minLength": 1, "type": "string" },
7986
- "kind": { "const": "capability", "type": "string" },
7987
- },
7988
- "required": ["kind", "capability"],
7989
- "type": "object",
7990
- }, {
7991
- "properties": {
7992
- "action": {
7993
- "anyOf": [
7994
- { "const": "call", "type": "string" },
7995
- { "const": "publish", "type": "string" },
7996
- { "const": "subscribe", "type": "string" },
7997
- { "const": "observe", "type": "string" },
7998
- { "const": "cancel", "type": "string" },
7999
- ],
8000
- },
8001
- "contractId": { "minLength": 1, "type": "string" },
8002
- "kind": { "const": "surface", "type": "string" },
8003
- "name": { "minLength": 1, "type": "string" },
8004
- "surfaceKind": {
8005
- "anyOf": [
8006
- { "const": "rpc", "type": "string" },
8007
- { "const": "operation", "type": "string" },
8008
- { "const": "event", "type": "string" },
8009
- { "const": "feed", "type": "string" },
8010
- ],
8011
- },
8012
8080
  },
8013
- "required": ["kind", "contractId", "surfaceKind", "name"],
8081
+ "required": ["capability"],
8014
8082
  "type": "object",
8015
- }, {
8083
+ },
8084
+ "type": "array",
8085
+ },
8086
+ "nats": {
8087
+ "items": {
8016
8088
  "properties": {
8017
8089
  "direction": {
8018
8090
  "anyOf": [{ "const": "publish", "type": "string" }, {
@@ -8029,7 +8101,6 @@ export const CONTRACT = {
8029
8101
  { "const": "transfer", "type": "string" },
8030
8102
  ],
8031
8103
  },
8032
- "kind": { "const": "nats", "type": "string" },
8033
8104
  "requiredCapabilities": {
8034
8105
  "items": { "minLength": 1, "type": "string" },
8035
8106
  "type": "array",
@@ -8062,16 +8133,46 @@ export const CONTRACT = {
8062
8133
  },
8063
8134
  },
8064
8135
  "required": [
8065
- "kind",
8066
8136
  "direction",
8067
8137
  "subject",
8068
8138
  "requiredCapabilities",
8069
8139
  "grantSource",
8070
8140
  ],
8071
8141
  "type": "object",
8072
- }],
8142
+ },
8143
+ "type": "array",
8144
+ },
8145
+ "surfaces": {
8146
+ "items": {
8147
+ "properties": {
8148
+ "action": {
8149
+ "anyOf": [
8150
+ { "const": "call", "type": "string" },
8151
+ { "const": "publish", "type": "string" },
8152
+ { "const": "subscribe", "type": "string" },
8153
+ { "const": "observe", "type": "string" },
8154
+ { "const": "cancel", "type": "string" },
8155
+ ],
8156
+ },
8157
+ "contractId": { "minLength": 1, "type": "string" },
8158
+ "name": { "minLength": 1, "type": "string" },
8159
+ "surfaceKind": {
8160
+ "anyOf": [
8161
+ { "const": "rpc", "type": "string" },
8162
+ { "const": "operation", "type": "string" },
8163
+ { "const": "event", "type": "string" },
8164
+ { "const": "feed", "type": "string" },
8165
+ ],
8166
+ },
8167
+ },
8168
+ "required": ["contractId", "surfaceKind", "name"],
8169
+ "type": "object",
8170
+ },
8171
+ "type": "array",
8172
+ },
8073
8173
  },
8074
- "type": "array",
8174
+ "required": ["capabilities", "surfaces", "nats"],
8175
+ "type": "object",
8075
8176
  },
8076
8177
  "reconciledAt": {
8077
8178
  "anyOf": [{ "format": "date-time", "type": "string" }, {
@@ -8197,83 +8298,87 @@ export const CONTRACT = {
8197
8298
  "type": "array",
8198
8299
  },
8199
8300
  "requestedNeeds": {
8200
- "items": {
8201
- "anyOf": [{
8301
+ "properties": {
8302
+ "capabilities": {
8303
+ "items": {
8202
8304
  "properties": {
8203
- "contractId": { "minLength": 1, "type": "string" },
8204
- "kind": { "const": "contract", "type": "string" },
8305
+ "capability": { "minLength": 1, "type": "string" },
8205
8306
  "required": { "type": "boolean" },
8206
8307
  },
8207
- "required": ["kind", "contractId", "required"],
8308
+ "required": ["capability", "required"],
8208
8309
  "type": "object",
8209
- }, {
8310
+ },
8311
+ "type": "array",
8312
+ },
8313
+ "contracts": {
8314
+ "items": {
8210
8315
  "properties": {
8211
- "kind": { "const": "surface", "type": "string" },
8316
+ "contractId": { "minLength": 1, "type": "string" },
8212
8317
  "required": { "type": "boolean" },
8213
- "surface": {
8214
- "properties": {
8215
- "action": {
8216
- "anyOf": [
8217
- { "const": "call", "type": "string" },
8218
- { "const": "publish", "type": "string" },
8219
- { "const": "subscribe", "type": "string" },
8220
- { "const": "observe", "type": "string" },
8221
- { "const": "cancel", "type": "string" },
8222
- ],
8223
- },
8224
- "contractId": { "minLength": 1, "type": "string" },
8225
- "kind": {
8226
- "anyOf": [
8227
- { "const": "rpc", "type": "string" },
8228
- { "const": "operation", "type": "string" },
8229
- { "const": "event", "type": "string" },
8230
- { "const": "feed", "type": "string" },
8231
- ],
8232
- },
8233
- "name": { "minLength": 1, "type": "string" },
8234
- },
8235
- "required": ["contractId", "kind", "name"],
8236
- "type": "object",
8237
- },
8238
8318
  },
8239
- "required": ["kind", "surface", "required"],
8319
+ "required": ["contractId", "required"],
8240
8320
  "type": "object",
8241
- }, {
8321
+ },
8322
+ "type": "array",
8323
+ },
8324
+ "resources": {
8325
+ "items": {
8242
8326
  "properties": {
8243
- "capability": { "minLength": 1, "type": "string" },
8244
- "kind": { "const": "capability", "type": "string" },
8327
+ "alias": { "minLength": 1, "type": "string" },
8328
+ "definition": { "type": "object" },
8329
+ "kind": {
8330
+ "anyOf": [
8331
+ { "const": "kv", "type": "string" },
8332
+ { "const": "store", "type": "string" },
8333
+ { "const": "jobs", "type": "string" },
8334
+ { "const": "event-consumer", "type": "string" },
8335
+ { "const": "transfer", "type": "string" },
8336
+ ],
8337
+ },
8245
8338
  "required": { "type": "boolean" },
8246
8339
  },
8247
- "required": ["kind", "capability", "required"],
8340
+ "required": ["kind", "alias", "required"],
8248
8341
  "type": "object",
8249
- }, {
8342
+ },
8343
+ "type": "array",
8344
+ },
8345
+ "surfaces": {
8346
+ "items": {
8250
8347
  "properties": {
8251
- "kind": { "const": "resource", "type": "string" },
8348
+ "action": {
8349
+ "anyOf": [
8350
+ { "const": "call", "type": "string" },
8351
+ { "const": "publish", "type": "string" },
8352
+ { "const": "subscribe", "type": "string" },
8353
+ { "const": "observe", "type": "string" },
8354
+ { "const": "cancel", "type": "string" },
8355
+ ],
8356
+ },
8357
+ "contractId": { "minLength": 1, "type": "string" },
8358
+ "kind": {
8359
+ "anyOf": [
8360
+ { "const": "rpc", "type": "string" },
8361
+ { "const": "operation", "type": "string" },
8362
+ { "const": "event", "type": "string" },
8363
+ { "const": "feed", "type": "string" },
8364
+ ],
8365
+ },
8366
+ "name": { "minLength": 1, "type": "string" },
8252
8367
  "required": { "type": "boolean" },
8253
- "resource": {
8254
- "properties": {
8255
- "alias": { "minLength": 1, "type": "string" },
8256
- "definition": { "type": "object" },
8257
- "kind": {
8258
- "anyOf": [
8259
- { "const": "kv", "type": "string" },
8260
- { "const": "store", "type": "string" },
8261
- { "const": "jobs", "type": "string" },
8262
- { "const": "event-consumer", "type": "string" },
8263
- { "const": "transfer", "type": "string" },
8264
- ],
8265
- },
8266
- "required": { "type": "boolean" },
8267
- },
8268
- "required": ["kind", "alias", "required"],
8269
- "type": "object",
8270
- },
8271
8368
  },
8272
- "required": ["kind", "resource", "required"],
8369
+ "required": ["contractId", "kind", "name", "required"],
8273
8370
  "type": "object",
8274
- }],
8371
+ },
8372
+ "type": "array",
8373
+ },
8275
8374
  },
8276
- "type": "array",
8375
+ "required": [
8376
+ "contracts",
8377
+ "surfaces",
8378
+ "capabilities",
8379
+ "resources",
8380
+ ],
8381
+ "type": "object",
8277
8382
  },
8278
8383
  "summary": { "type": "object" },
8279
8384
  },
@@ -8312,81 +8417,83 @@ export const CONTRACT = {
8312
8417
  ],
8313
8418
  "type": "object",
8314
8419
  },
8315
- "DeploymentAuthorityNeed": {
8316
- "anyOf": [{
8317
- "properties": {
8318
- "contractId": { "minLength": 1, "type": "string" },
8319
- "kind": { "const": "contract", "type": "string" },
8320
- "required": { "type": "boolean" },
8420
+ "DeploymentAuthorityNeeds": {
8421
+ "properties": {
8422
+ "capabilities": {
8423
+ "items": {
8424
+ "properties": {
8425
+ "capability": { "minLength": 1, "type": "string" },
8426
+ "required": { "type": "boolean" },
8427
+ },
8428
+ "required": ["capability", "required"],
8429
+ "type": "object",
8321
8430
  },
8322
- "required": ["kind", "contractId", "required"],
8323
- "type": "object",
8324
- }, {
8325
- "properties": {
8326
- "kind": { "const": "surface", "type": "string" },
8327
- "required": { "type": "boolean" },
8328
- "surface": {
8329
- "properties": {
8330
- "action": {
8331
- "anyOf": [
8332
- { "const": "call", "type": "string" },
8333
- { "const": "publish", "type": "string" },
8334
- { "const": "subscribe", "type": "string" },
8335
- { "const": "observe", "type": "string" },
8336
- { "const": "cancel", "type": "string" },
8337
- ],
8338
- },
8339
- "contractId": { "minLength": 1, "type": "string" },
8340
- "kind": {
8341
- "anyOf": [
8342
- { "const": "rpc", "type": "string" },
8343
- { "const": "operation", "type": "string" },
8344
- { "const": "event", "type": "string" },
8345
- { "const": "feed", "type": "string" },
8346
- ],
8347
- },
8348
- "name": { "minLength": 1, "type": "string" },
8349
- },
8350
- "required": ["contractId", "kind", "name"],
8351
- "type": "object",
8431
+ "type": "array",
8432
+ },
8433
+ "contracts": {
8434
+ "items": {
8435
+ "properties": {
8436
+ "contractId": { "minLength": 1, "type": "string" },
8437
+ "required": { "type": "boolean" },
8352
8438
  },
8439
+ "required": ["contractId", "required"],
8440
+ "type": "object",
8353
8441
  },
8354
- "required": ["kind", "surface", "required"],
8355
- "type": "object",
8356
- }, {
8357
- "properties": {
8358
- "capability": { "minLength": 1, "type": "string" },
8359
- "kind": { "const": "capability", "type": "string" },
8360
- "required": { "type": "boolean" },
8442
+ "type": "array",
8443
+ },
8444
+ "resources": {
8445
+ "items": {
8446
+ "properties": {
8447
+ "alias": { "minLength": 1, "type": "string" },
8448
+ "definition": { "type": "object" },
8449
+ "kind": {
8450
+ "anyOf": [
8451
+ { "const": "kv", "type": "string" },
8452
+ { "const": "store", "type": "string" },
8453
+ { "const": "jobs", "type": "string" },
8454
+ { "const": "event-consumer", "type": "string" },
8455
+ { "const": "transfer", "type": "string" },
8456
+ ],
8457
+ },
8458
+ "required": { "type": "boolean" },
8459
+ },
8460
+ "required": ["kind", "alias", "required"],
8461
+ "type": "object",
8361
8462
  },
8362
- "required": ["kind", "capability", "required"],
8363
- "type": "object",
8364
- }, {
8365
- "properties": {
8366
- "kind": { "const": "resource", "type": "string" },
8367
- "required": { "type": "boolean" },
8368
- "resource": {
8369
- "properties": {
8370
- "alias": { "minLength": 1, "type": "string" },
8371
- "definition": { "type": "object" },
8372
- "kind": {
8373
- "anyOf": [
8374
- { "const": "kv", "type": "string" },
8375
- { "const": "store", "type": "string" },
8376
- { "const": "jobs", "type": "string" },
8377
- { "const": "event-consumer", "type": "string" },
8378
- { "const": "transfer", "type": "string" },
8379
- ],
8380
- },
8381
- "required": { "type": "boolean" },
8463
+ "type": "array",
8464
+ },
8465
+ "surfaces": {
8466
+ "items": {
8467
+ "properties": {
8468
+ "action": {
8469
+ "anyOf": [
8470
+ { "const": "call", "type": "string" },
8471
+ { "const": "publish", "type": "string" },
8472
+ { "const": "subscribe", "type": "string" },
8473
+ { "const": "observe", "type": "string" },
8474
+ { "const": "cancel", "type": "string" },
8475
+ ],
8382
8476
  },
8383
- "required": ["kind", "alias", "required"],
8384
- "type": "object",
8477
+ "contractId": { "minLength": 1, "type": "string" },
8478
+ "kind": {
8479
+ "anyOf": [
8480
+ { "const": "rpc", "type": "string" },
8481
+ { "const": "operation", "type": "string" },
8482
+ { "const": "event", "type": "string" },
8483
+ { "const": "feed", "type": "string" },
8484
+ ],
8485
+ },
8486
+ "name": { "minLength": 1, "type": "string" },
8487
+ "required": { "type": "boolean" },
8385
8488
  },
8489
+ "required": ["contractId", "kind", "name", "required"],
8490
+ "type": "object",
8386
8491
  },
8387
- "required": ["kind", "resource", "required"],
8388
- "type": "object",
8389
- }],
8492
+ "type": "array",
8493
+ },
8494
+ },
8495
+ "required": ["contracts", "surfaces", "capabilities", "resources"],
8496
+ "type": "object",
8390
8497
  },
8391
8498
  "DeploymentAuthorityProposal": {
8392
8499
  "properties": {
@@ -8424,83 +8531,82 @@ export const CONTRACT = {
8424
8531
  "type": "array",
8425
8532
  },
8426
8533
  "requestedNeeds": {
8427
- "items": {
8428
- "anyOf": [{
8534
+ "properties": {
8535
+ "capabilities": {
8536
+ "items": {
8429
8537
  "properties": {
8430
- "contractId": { "minLength": 1, "type": "string" },
8431
- "kind": { "const": "contract", "type": "string" },
8538
+ "capability": { "minLength": 1, "type": "string" },
8432
8539
  "required": { "type": "boolean" },
8433
8540
  },
8434
- "required": ["kind", "contractId", "required"],
8541
+ "required": ["capability", "required"],
8435
8542
  "type": "object",
8436
- }, {
8543
+ },
8544
+ "type": "array",
8545
+ },
8546
+ "contracts": {
8547
+ "items": {
8437
8548
  "properties": {
8438
- "kind": { "const": "surface", "type": "string" },
8549
+ "contractId": { "minLength": 1, "type": "string" },
8439
8550
  "required": { "type": "boolean" },
8440
- "surface": {
8441
- "properties": {
8442
- "action": {
8443
- "anyOf": [
8444
- { "const": "call", "type": "string" },
8445
- { "const": "publish", "type": "string" },
8446
- { "const": "subscribe", "type": "string" },
8447
- { "const": "observe", "type": "string" },
8448
- { "const": "cancel", "type": "string" },
8449
- ],
8450
- },
8451
- "contractId": { "minLength": 1, "type": "string" },
8452
- "kind": {
8453
- "anyOf": [
8454
- { "const": "rpc", "type": "string" },
8455
- { "const": "operation", "type": "string" },
8456
- { "const": "event", "type": "string" },
8457
- { "const": "feed", "type": "string" },
8458
- ],
8459
- },
8460
- "name": { "minLength": 1, "type": "string" },
8461
- },
8462
- "required": ["contractId", "kind", "name"],
8463
- "type": "object",
8464
- },
8465
8551
  },
8466
- "required": ["kind", "surface", "required"],
8552
+ "required": ["contractId", "required"],
8467
8553
  "type": "object",
8468
- }, {
8554
+ },
8555
+ "type": "array",
8556
+ },
8557
+ "resources": {
8558
+ "items": {
8469
8559
  "properties": {
8470
- "capability": { "minLength": 1, "type": "string" },
8471
- "kind": { "const": "capability", "type": "string" },
8560
+ "alias": { "minLength": 1, "type": "string" },
8561
+ "definition": { "type": "object" },
8562
+ "kind": {
8563
+ "anyOf": [
8564
+ { "const": "kv", "type": "string" },
8565
+ { "const": "store", "type": "string" },
8566
+ { "const": "jobs", "type": "string" },
8567
+ { "const": "event-consumer", "type": "string" },
8568
+ { "const": "transfer", "type": "string" },
8569
+ ],
8570
+ },
8472
8571
  "required": { "type": "boolean" },
8473
8572
  },
8474
- "required": ["kind", "capability", "required"],
8573
+ "required": ["kind", "alias", "required"],
8475
8574
  "type": "object",
8476
- }, {
8575
+ },
8576
+ "type": "array",
8577
+ },
8578
+ "surfaces": {
8579
+ "items": {
8477
8580
  "properties": {
8478
- "kind": { "const": "resource", "type": "string" },
8479
- "required": { "type": "boolean" },
8480
- "resource": {
8481
- "properties": {
8482
- "alias": { "minLength": 1, "type": "string" },
8483
- "definition": { "type": "object" },
8484
- "kind": {
8485
- "anyOf": [
8486
- { "const": "kv", "type": "string" },
8487
- { "const": "store", "type": "string" },
8488
- { "const": "jobs", "type": "string" },
8489
- { "const": "event-consumer", "type": "string" },
8490
- { "const": "transfer", "type": "string" },
8491
- ],
8492
- },
8493
- "required": { "type": "boolean" },
8494
- },
8495
- "required": ["kind", "alias", "required"],
8496
- "type": "object",
8581
+ "action": {
8582
+ "anyOf": [
8583
+ { "const": "call", "type": "string" },
8584
+ { "const": "publish", "type": "string" },
8585
+ { "const": "subscribe", "type": "string" },
8586
+ { "const": "observe", "type": "string" },
8587
+ { "const": "cancel", "type": "string" },
8588
+ ],
8589
+ },
8590
+ "contractId": { "minLength": 1, "type": "string" },
8591
+ "kind": {
8592
+ "anyOf": [
8593
+ { "const": "rpc", "type": "string" },
8594
+ { "const": "operation", "type": "string" },
8595
+ { "const": "event", "type": "string" },
8596
+ { "const": "feed", "type": "string" },
8597
+ ],
8497
8598
  },
8599
+ "name": { "minLength": 1, "type": "string" },
8600
+ "required": { "type": "boolean" },
8498
8601
  },
8499
- "required": ["kind", "resource", "required"],
8602
+ "required": ["contractId", "kind", "name", "required"],
8500
8603
  "type": "object",
8501
- }],
8604
+ },
8605
+ "type": "array",
8606
+ },
8502
8607
  },
8503
- "type": "array",
8608
+ "required": ["contracts", "surfaces", "capabilities", "resources"],
8609
+ "type": "object",
8504
8610
  },
8505
8611
  "summary": { "type": "object" },
8506
8612
  },
@@ -8564,6 +8670,24 @@ export const CONTRACT = {
8564
8670
  "required": ["kind", "alias", "required"],
8565
8671
  "type": "object",
8566
8672
  },
8673
+ "DeploymentAuthorityResourceNeed": {
8674
+ "properties": {
8675
+ "alias": { "minLength": 1, "type": "string" },
8676
+ "definition": { "type": "object" },
8677
+ "kind": {
8678
+ "anyOf": [
8679
+ { "const": "kv", "type": "string" },
8680
+ { "const": "store", "type": "string" },
8681
+ { "const": "jobs", "type": "string" },
8682
+ { "const": "event-consumer", "type": "string" },
8683
+ { "const": "transfer", "type": "string" },
8684
+ ],
8685
+ },
8686
+ "required": { "type": "boolean" },
8687
+ },
8688
+ "required": ["kind", "alias", "required"],
8689
+ "type": "object",
8690
+ },
8567
8691
  "DeploymentAuthoritySurface": {
8568
8692
  "properties": {
8569
8693
  "action": {
@@ -8589,6 +8713,32 @@ export const CONTRACT = {
8589
8713
  "required": ["contractId", "kind", "name"],
8590
8714
  "type": "object",
8591
8715
  },
8716
+ "DeploymentAuthoritySurfaceNeed": {
8717
+ "properties": {
8718
+ "action": {
8719
+ "anyOf": [
8720
+ { "const": "call", "type": "string" },
8721
+ { "const": "publish", "type": "string" },
8722
+ { "const": "subscribe", "type": "string" },
8723
+ { "const": "observe", "type": "string" },
8724
+ { "const": "cancel", "type": "string" },
8725
+ ],
8726
+ },
8727
+ "contractId": { "minLength": 1, "type": "string" },
8728
+ "kind": {
8729
+ "anyOf": [
8730
+ { "const": "rpc", "type": "string" },
8731
+ { "const": "operation", "type": "string" },
8732
+ { "const": "event", "type": "string" },
8733
+ { "const": "feed", "type": "string" },
8734
+ ],
8735
+ },
8736
+ "name": { "minLength": 1, "type": "string" },
8737
+ "required": { "type": "boolean" },
8738
+ },
8739
+ "required": ["contractId", "kind", "name", "required"],
8740
+ "type": "object",
8741
+ },
8592
8742
  "DeploymentAuthorityUpdate": {
8593
8743
  "properties": {
8594
8744
  "classification": { "const": "update", "type": "string" },
@@ -8650,83 +8800,87 @@ export const CONTRACT = {
8650
8800
  "type": "array",
8651
8801
  },
8652
8802
  "requestedNeeds": {
8653
- "items": {
8654
- "anyOf": [{
8803
+ "properties": {
8804
+ "capabilities": {
8805
+ "items": {
8655
8806
  "properties": {
8656
- "contractId": { "minLength": 1, "type": "string" },
8657
- "kind": { "const": "contract", "type": "string" },
8807
+ "capability": { "minLength": 1, "type": "string" },
8658
8808
  "required": { "type": "boolean" },
8659
8809
  },
8660
- "required": ["kind", "contractId", "required"],
8810
+ "required": ["capability", "required"],
8661
8811
  "type": "object",
8662
- }, {
8812
+ },
8813
+ "type": "array",
8814
+ },
8815
+ "contracts": {
8816
+ "items": {
8663
8817
  "properties": {
8664
- "kind": { "const": "surface", "type": "string" },
8818
+ "contractId": { "minLength": 1, "type": "string" },
8665
8819
  "required": { "type": "boolean" },
8666
- "surface": {
8667
- "properties": {
8668
- "action": {
8669
- "anyOf": [
8670
- { "const": "call", "type": "string" },
8671
- { "const": "publish", "type": "string" },
8672
- { "const": "subscribe", "type": "string" },
8673
- { "const": "observe", "type": "string" },
8674
- { "const": "cancel", "type": "string" },
8675
- ],
8676
- },
8677
- "contractId": { "minLength": 1, "type": "string" },
8678
- "kind": {
8679
- "anyOf": [
8680
- { "const": "rpc", "type": "string" },
8681
- { "const": "operation", "type": "string" },
8682
- { "const": "event", "type": "string" },
8683
- { "const": "feed", "type": "string" },
8684
- ],
8685
- },
8686
- "name": { "minLength": 1, "type": "string" },
8687
- },
8688
- "required": ["contractId", "kind", "name"],
8689
- "type": "object",
8690
- },
8691
8820
  },
8692
- "required": ["kind", "surface", "required"],
8821
+ "required": ["contractId", "required"],
8693
8822
  "type": "object",
8694
- }, {
8823
+ },
8824
+ "type": "array",
8825
+ },
8826
+ "resources": {
8827
+ "items": {
8695
8828
  "properties": {
8696
- "capability": { "minLength": 1, "type": "string" },
8697
- "kind": { "const": "capability", "type": "string" },
8829
+ "alias": { "minLength": 1, "type": "string" },
8830
+ "definition": { "type": "object" },
8831
+ "kind": {
8832
+ "anyOf": [
8833
+ { "const": "kv", "type": "string" },
8834
+ { "const": "store", "type": "string" },
8835
+ { "const": "jobs", "type": "string" },
8836
+ { "const": "event-consumer", "type": "string" },
8837
+ { "const": "transfer", "type": "string" },
8838
+ ],
8839
+ },
8698
8840
  "required": { "type": "boolean" },
8699
8841
  },
8700
- "required": ["kind", "capability", "required"],
8842
+ "required": ["kind", "alias", "required"],
8701
8843
  "type": "object",
8702
- }, {
8844
+ },
8845
+ "type": "array",
8846
+ },
8847
+ "surfaces": {
8848
+ "items": {
8703
8849
  "properties": {
8704
- "kind": { "const": "resource", "type": "string" },
8705
- "required": { "type": "boolean" },
8706
- "resource": {
8707
- "properties": {
8708
- "alias": { "minLength": 1, "type": "string" },
8709
- "definition": { "type": "object" },
8710
- "kind": {
8711
- "anyOf": [
8712
- { "const": "kv", "type": "string" },
8713
- { "const": "store", "type": "string" },
8714
- { "const": "jobs", "type": "string" },
8715
- { "const": "event-consumer", "type": "string" },
8716
- { "const": "transfer", "type": "string" },
8717
- ],
8718
- },
8719
- "required": { "type": "boolean" },
8720
- },
8721
- "required": ["kind", "alias", "required"],
8722
- "type": "object",
8850
+ "action": {
8851
+ "anyOf": [
8852
+ { "const": "call", "type": "string" },
8853
+ { "const": "publish", "type": "string" },
8854
+ { "const": "subscribe", "type": "string" },
8855
+ { "const": "observe", "type": "string" },
8856
+ { "const": "cancel", "type": "string" },
8857
+ ],
8858
+ },
8859
+ "contractId": { "minLength": 1, "type": "string" },
8860
+ "kind": {
8861
+ "anyOf": [
8862
+ { "const": "rpc", "type": "string" },
8863
+ { "const": "operation", "type": "string" },
8864
+ { "const": "event", "type": "string" },
8865
+ { "const": "feed", "type": "string" },
8866
+ ],
8723
8867
  },
8868
+ "name": { "minLength": 1, "type": "string" },
8869
+ "required": { "type": "boolean" },
8724
8870
  },
8725
- "required": ["kind", "resource", "required"],
8871
+ "required": ["contractId", "kind", "name", "required"],
8726
8872
  "type": "object",
8727
- }],
8873
+ },
8874
+ "type": "array",
8875
+ },
8728
8876
  },
8729
- "type": "array",
8877
+ "required": [
8878
+ "contracts",
8879
+ "surfaces",
8880
+ "capabilities",
8881
+ "resources",
8882
+ ],
8883
+ "type": "object",
8730
8884
  },
8731
8885
  "summary": { "type": "object" },
8732
8886
  },