@qlever-llc/trellis 0.5.1 → 0.6.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.
Files changed (490) hide show
  1. package/README.md +16 -2
  2. package/esm/_dnt.polyfills.d.ts +11 -0
  3. package/esm/_dnt.polyfills.d.ts.map +1 -1
  4. package/esm/_dnt.polyfills.js +14 -0
  5. package/esm/_dnt.shims.d.ts +6 -0
  6. package/esm/_dnt.shims.d.ts.map +1 -0
  7. package/esm/_dnt.shims.js +61 -0
  8. package/esm/auth/browser/login.d.ts +27 -0
  9. package/esm/auth/browser/login.d.ts.map +1 -0
  10. package/esm/auth/browser/login.js +94 -0
  11. package/esm/auth/browser/portal.d.ts +11 -0
  12. package/esm/auth/browser/portal.d.ts.map +1 -0
  13. package/esm/auth/browser/portal.js +33 -0
  14. package/esm/auth/browser/session.d.ts +19 -0
  15. package/esm/auth/browser/session.d.ts.map +1 -0
  16. package/esm/auth/browser/session.js +65 -0
  17. package/esm/auth/browser/storage.d.ts +12 -0
  18. package/esm/auth/browser/storage.d.ts.map +1 -0
  19. package/esm/auth/browser/storage.js +61 -0
  20. package/esm/auth/browser.d.ts +13 -0
  21. package/esm/auth/browser.d.ts.map +1 -0
  22. package/esm/auth/browser.js +11 -0
  23. package/esm/auth/keys.d.ts +5 -0
  24. package/esm/auth/keys.d.ts.map +1 -0
  25. package/esm/auth/keys.js +50 -0
  26. package/esm/auth/mod.d.ts +18 -0
  27. package/esm/auth/mod.d.ts.map +1 -0
  28. package/esm/auth/mod.js +17 -0
  29. package/esm/auth/proof.d.ts +9 -0
  30. package/esm/auth/proof.d.ts.map +1 -0
  31. package/esm/auth/proof.js +43 -0
  32. package/esm/auth/protocol.d.ts +1212 -0
  33. package/esm/auth/protocol.d.ts.map +1 -0
  34. package/esm/auth/protocol.js +682 -0
  35. package/esm/auth/schemas.d.ts +93 -0
  36. package/esm/auth/schemas.d.ts.map +1 -0
  37. package/esm/auth/schemas.js +64 -0
  38. package/esm/auth/session_auth.d.ts +20 -0
  39. package/esm/auth/session_auth.d.ts.map +1 -0
  40. package/esm/auth/session_auth.js +42 -0
  41. package/esm/auth/trellis_id.d.ts +2 -0
  42. package/esm/auth/trellis_id.d.ts.map +1 -0
  43. package/esm/auth/trellis_id.js +5 -0
  44. package/esm/auth/types.d.ts +8 -0
  45. package/esm/auth/types.d.ts.map +1 -0
  46. package/esm/auth/types.js +1 -0
  47. package/esm/auth/utils.d.ts +11 -0
  48. package/esm/auth/utils.d.ts.map +1 -0
  49. package/esm/auth/utils.js +68 -0
  50. package/esm/auth/workload_activation.d.ts +192 -0
  51. package/esm/auth/workload_activation.d.ts.map +1 -0
  52. package/esm/auth/workload_activation.js +290 -0
  53. package/esm/contracts/canonical.d.ts +14 -0
  54. package/esm/contracts/canonical.d.ts.map +1 -0
  55. package/esm/contracts/canonical.js +135 -0
  56. package/esm/contracts/mod.d.ts +462 -0
  57. package/esm/contracts/mod.d.ts.map +1 -0
  58. package/esm/contracts/mod.js +532 -0
  59. package/esm/contracts/protocol.d.ts +301 -0
  60. package/esm/contracts/protocol.d.ts.map +1 -0
  61. package/esm/contracts/protocol.js +130 -0
  62. package/esm/contracts/runtime.d.ts +48 -0
  63. package/esm/contracts/runtime.d.ts.map +1 -0
  64. package/esm/contracts/runtime.js +9 -0
  65. package/esm/contracts/schema_pointers.d.ts +18 -0
  66. package/esm/contracts/schema_pointers.d.ts.map +1 -0
  67. package/esm/contracts/schema_pointers.js +59 -0
  68. package/esm/server/deno.d.ts +7 -0
  69. package/esm/server/deno.d.ts.map +1 -0
  70. package/esm/server/deno.js +16 -0
  71. package/esm/server/health.d.ts +92 -0
  72. package/esm/server/health.d.ts.map +1 -0
  73. package/esm/server/health.js +74 -0
  74. package/esm/server/health_rpc.d.ts +16 -0
  75. package/esm/server/health_rpc.d.ts.map +1 -0
  76. package/esm/server/health_rpc.js +23 -0
  77. package/esm/server/health_schemas.d.ts +20 -0
  78. package/esm/server/health_schemas.d.ts.map +1 -0
  79. package/esm/server/health_schemas.js +18 -0
  80. package/esm/server/mod.d.ts +17 -0
  81. package/esm/server/mod.d.ts.map +1 -0
  82. package/esm/server/mod.js +17 -0
  83. package/esm/server/node.d.ts +7 -0
  84. package/esm/server/node.d.ts.map +1 -0
  85. package/esm/server/node.js +16 -0
  86. package/esm/server/runtime.d.ts +16 -0
  87. package/esm/server/runtime.d.ts.map +1 -0
  88. package/esm/server/runtime.js +1 -0
  89. package/esm/server/service.d.ts +121 -0
  90. package/esm/server/service.d.ts.map +1 -0
  91. package/esm/server/service.js +256 -0
  92. package/esm/server/subscription.d.ts +99 -0
  93. package/esm/server/subscription.d.ts.map +1 -0
  94. package/esm/server/subscription.js +25 -0
  95. package/esm/telemetry/carrier.d.ts +9 -0
  96. package/esm/telemetry/carrier.d.ts.map +1 -0
  97. package/esm/telemetry/carrier.js +20 -0
  98. package/esm/telemetry/core.d.ts +8 -0
  99. package/esm/telemetry/core.d.ts.map +1 -0
  100. package/esm/telemetry/core.js +14 -0
  101. package/esm/telemetry/env.d.ts +2 -0
  102. package/esm/telemetry/env.d.ts.map +1 -0
  103. package/esm/telemetry/env.js +10 -0
  104. package/esm/telemetry/mod.d.ts +11 -0
  105. package/esm/telemetry/mod.d.ts.map +1 -0
  106. package/esm/telemetry/mod.js +7 -0
  107. package/esm/telemetry/nats.d.ts +7 -0
  108. package/esm/telemetry/nats.d.ts.map +1 -0
  109. package/esm/telemetry/nats.js +6 -0
  110. package/esm/telemetry/result.d.ts +2 -0
  111. package/esm/telemetry/result.d.ts.map +1 -0
  112. package/esm/telemetry/result.js +18 -0
  113. package/esm/telemetry/runtime.d.ts +2 -0
  114. package/esm/telemetry/runtime.d.ts.map +1 -0
  115. package/esm/telemetry/runtime.js +53 -0
  116. package/esm/telemetry/trace.d.ts +5 -0
  117. package/esm/telemetry/trace.d.ts.map +1 -0
  118. package/esm/telemetry/trace.js +26 -0
  119. package/esm/telemetry/trellis.d.ts +3 -0
  120. package/esm/telemetry/trellis.d.ts.map +1 -0
  121. package/esm/telemetry/trellis.js +7 -0
  122. package/esm/trellis/_sdk/activity/_dnt.polyfills.d.ts +12 -0
  123. package/esm/trellis/_sdk/activity/_dnt.polyfills.d.ts.map +1 -0
  124. package/esm/trellis/_sdk/activity/_dnt.polyfills.js +15 -0
  125. package/esm/trellis/_sdk/activity/api.d.ts +10 -0
  126. package/esm/trellis/_sdk/activity/api.d.ts.map +1 -0
  127. package/esm/trellis/_sdk/activity/api.js +43 -0
  128. package/esm/trellis/_sdk/activity/contract.d.ts +8 -0
  129. package/esm/trellis/_sdk/activity/contract.d.ts.map +1 -0
  130. package/esm/trellis/_sdk/activity/contract.js +59 -0
  131. package/esm/trellis/_sdk/activity/mod.d.ts +7 -0
  132. package/esm/trellis/_sdk/activity/mod.d.ts.map +1 -0
  133. package/esm/trellis/_sdk/activity/mod.js +5 -0
  134. package/esm/trellis/_sdk/activity/package.json +3 -0
  135. package/esm/trellis/_sdk/activity/schemas.d.ts +607 -0
  136. package/esm/trellis/_sdk/activity/schemas.d.ts.map +1 -0
  137. package/esm/trellis/_sdk/activity/schemas.js +33 -0
  138. package/esm/trellis/_sdk/activity/types.d.ts +96 -0
  139. package/esm/trellis/_sdk/activity/types.d.ts.map +1 -0
  140. package/esm/trellis/_sdk/activity/types.js +3 -0
  141. package/esm/trellis/_sdk/auth/_dnt.polyfills.d.ts +12 -0
  142. package/esm/trellis/_sdk/auth/_dnt.polyfills.d.ts.map +1 -0
  143. package/esm/trellis/_sdk/auth/_dnt.polyfills.js +15 -0
  144. package/esm/trellis/_sdk/auth/api.d.ts +10 -0
  145. package/esm/trellis/_sdk/auth/api.d.ts.map +1 -0
  146. package/esm/trellis/_sdk/auth/api.js +354 -0
  147. package/esm/trellis/_sdk/auth/contract.d.ts +28 -0
  148. package/esm/trellis/_sdk/auth/contract.d.ts.map +1 -0
  149. package/esm/trellis/_sdk/auth/contract.js +83 -0
  150. package/esm/trellis/_sdk/auth/mod.d.ts +7 -0
  151. package/esm/trellis/_sdk/auth/mod.d.ts.map +1 -0
  152. package/esm/trellis/_sdk/auth/mod.js +5 -0
  153. package/esm/trellis/_sdk/auth/package.json +3 -0
  154. package/esm/trellis/_sdk/auth/schemas.d.ts +8967 -0
  155. package/esm/trellis/_sdk/auth/schemas.d.ts.map +1 -0
  156. package/esm/trellis/_sdk/auth/schemas.js +306 -0
  157. package/esm/trellis/_sdk/auth/types.d.ts +1232 -0
  158. package/esm/trellis/_sdk/auth/types.d.ts.map +1 -0
  159. package/esm/trellis/_sdk/auth/types.js +3 -0
  160. package/esm/trellis/_sdk/core/_dnt.polyfills.d.ts +12 -0
  161. package/esm/trellis/_sdk/core/_dnt.polyfills.d.ts.map +1 -0
  162. package/esm/trellis/_sdk/core/_dnt.polyfills.js +15 -0
  163. package/esm/trellis/_sdk/core/api.d.ts +10 -0
  164. package/esm/trellis/_sdk/core/api.d.ts.map +1 -0
  165. package/esm/trellis/_sdk/core/api.js +36 -0
  166. package/esm/trellis/_sdk/core/contract.d.ts +8 -0
  167. package/esm/trellis/_sdk/core/contract.d.ts.map +1 -0
  168. package/esm/trellis/_sdk/core/contract.js +59 -0
  169. package/esm/trellis/_sdk/core/mod.d.ts +7 -0
  170. package/esm/trellis/_sdk/core/mod.d.ts.map +1 -0
  171. package/esm/trellis/_sdk/core/mod.js +5 -0
  172. package/esm/trellis/_sdk/core/package.json +3 -0
  173. package/esm/trellis/_sdk/core/schemas.d.ts +1144 -0
  174. package/esm/trellis/_sdk/core/schemas.d.ts.map +1 -0
  175. package/esm/trellis/_sdk/core/schemas.js +28 -0
  176. package/esm/trellis/_sdk/core/types.d.ts +176 -0
  177. package/esm/trellis/_sdk/core/types.d.ts.map +1 -0
  178. package/esm/trellis/_sdk/core/types.js +3 -0
  179. package/esm/trellis/auth/browser.d.ts +3 -0
  180. package/esm/trellis/auth/browser.d.ts.map +1 -0
  181. package/esm/trellis/auth/browser.js +2 -0
  182. package/esm/trellis/auth.d.ts +3 -0
  183. package/esm/trellis/auth.d.ts.map +1 -0
  184. package/esm/trellis/auth.js +2 -0
  185. package/esm/trellis/browser.d.ts +2 -7
  186. package/esm/trellis/browser.d.ts.map +1 -1
  187. package/esm/trellis/browser.js +2 -7
  188. package/esm/trellis/client.d.ts +6 -4
  189. package/esm/trellis/client.d.ts.map +1 -1
  190. package/esm/trellis/client.js +28 -1
  191. package/esm/trellis/codec.d.ts +4 -3
  192. package/esm/trellis/codec.d.ts.map +1 -1
  193. package/esm/trellis/codec.js +15 -2
  194. package/esm/trellis/contract.d.ts +11 -0
  195. package/esm/trellis/contract.d.ts.map +1 -0
  196. package/esm/trellis/contract.js +15 -0
  197. package/esm/trellis/contracts.d.ts +5 -0
  198. package/esm/trellis/contracts.d.ts.map +1 -0
  199. package/esm/trellis/contracts.js +3 -0
  200. package/esm/trellis/env.d.ts +1 -1
  201. package/esm/trellis/env.d.ts.map +1 -1
  202. package/esm/trellis/env.js +1 -1
  203. package/esm/trellis/errors/AuthError.d.ts +1 -1
  204. package/esm/trellis/errors/AuthError.d.ts.map +1 -1
  205. package/esm/trellis/errors/AuthError.js +11 -0
  206. package/esm/trellis/errors/RemoteError.d.ts +3 -3
  207. package/esm/trellis/errors/RemoteError.d.ts.map +1 -1
  208. package/esm/trellis/errors/RemoteError.js +3 -3
  209. package/esm/trellis/errors/TrellisError.d.ts +1 -1
  210. package/esm/trellis/errors/TrellisError.js +1 -1
  211. package/esm/trellis/errors/index.d.ts +2 -1
  212. package/esm/trellis/errors/index.d.ts.map +1 -1
  213. package/esm/trellis/errors/index.js +3 -2
  214. package/esm/trellis/globals.d.ts +9 -1
  215. package/esm/trellis/globals.d.ts.map +1 -1
  216. package/esm/trellis/globals.js +16 -8
  217. package/esm/trellis/helpers.d.ts +2 -1
  218. package/esm/trellis/helpers.d.ts.map +1 -1
  219. package/esm/trellis/helpers.js +1 -0
  220. package/esm/trellis/index.d.ts +13 -5
  221. package/esm/trellis/index.d.ts.map +1 -1
  222. package/esm/trellis/index.js +8 -3
  223. package/esm/trellis/kv.d.ts +10 -7
  224. package/esm/trellis/kv.d.ts.map +1 -1
  225. package/esm/trellis/kv.js +57 -34
  226. package/esm/trellis/models/trellis/TrellisError.d.ts +1 -1
  227. package/esm/trellis/models/trellis/TrellisError.js +1 -1
  228. package/esm/trellis/operations.d.ts +81 -0
  229. package/esm/trellis/operations.d.ts.map +1 -0
  230. package/esm/trellis/operations.js +206 -0
  231. package/esm/trellis/sdk/activity.d.ts +3 -0
  232. package/esm/trellis/sdk/activity.d.ts.map +1 -0
  233. package/esm/trellis/sdk/activity.js +2 -0
  234. package/esm/trellis/sdk/auth.d.ts +4 -0
  235. package/esm/trellis/sdk/auth.d.ts.map +1 -0
  236. package/esm/trellis/sdk/auth.js +3 -0
  237. package/esm/trellis/sdk/core.d.ts +4 -0
  238. package/esm/trellis/sdk/core.d.ts.map +1 -0
  239. package/esm/trellis/sdk/core.js +3 -0
  240. package/esm/trellis/server/deno.d.ts +3 -0
  241. package/esm/trellis/server/deno.d.ts.map +1 -0
  242. package/esm/trellis/server/deno.js +2 -0
  243. package/esm/trellis/server/health.d.ts +5 -0
  244. package/esm/trellis/server/health.d.ts.map +1 -0
  245. package/esm/trellis/server/health.js +3 -0
  246. package/esm/trellis/server/mod.d.ts +3 -0
  247. package/esm/trellis/server/mod.d.ts.map +1 -0
  248. package/esm/trellis/server/mod.js +2 -0
  249. package/esm/trellis/server/node.d.ts +3 -0
  250. package/esm/trellis/server/node.d.ts.map +1 -0
  251. package/esm/trellis/server/node.js +2 -0
  252. package/esm/trellis/server/runtime.d.ts +4 -0
  253. package/esm/trellis/server/runtime.d.ts.map +1 -0
  254. package/esm/trellis/server/runtime.js +2 -0
  255. package/esm/trellis/server.d.ts +21 -0
  256. package/esm/trellis/server.d.ts.map +1 -0
  257. package/esm/trellis/server.js +536 -0
  258. package/esm/trellis/server_logger.d.ts +3 -0
  259. package/esm/trellis/server_logger.d.ts.map +1 -0
  260. package/esm/trellis/server_logger.js +7 -0
  261. package/esm/trellis/tasks.d.ts +3 -3
  262. package/esm/trellis/tasks.d.ts.map +1 -1
  263. package/esm/trellis/tasks.js +1 -1
  264. package/esm/trellis/tracing.d.ts +2 -2
  265. package/esm/trellis/tracing.d.ts.map +1 -1
  266. package/esm/trellis/tracing.js +2 -2
  267. package/esm/trellis/trellis.d.ts +167 -78
  268. package/esm/trellis/trellis.d.ts.map +1 -1
  269. package/esm/trellis/trellis.js +281 -87
  270. package/esm/trellis/workload.d.ts +45 -0
  271. package/esm/trellis/workload.d.ts.map +1 -0
  272. package/esm/trellis/workload.js +144 -0
  273. package/package.json +63 -4
  274. package/script/auth/browser/login.d.ts +27 -0
  275. package/script/auth/browser/login.d.ts.map +1 -0
  276. package/script/auth/browser/login.js +100 -0
  277. package/script/auth/browser/portal.d.ts +11 -0
  278. package/script/auth/browser/portal.d.ts.map +1 -0
  279. package/script/auth/browser/portal.js +40 -0
  280. package/script/auth/browser/session.d.ts +19 -0
  281. package/script/auth/browser/session.d.ts.map +1 -0
  282. package/script/auth/browser/session.js +79 -0
  283. package/script/auth/browser/storage.d.ts +12 -0
  284. package/script/auth/browser/storage.d.ts.map +1 -0
  285. package/script/auth/browser/storage.js +67 -0
  286. package/script/auth/browser.d.ts +13 -0
  287. package/script/auth/browser.d.ts.map +1 -0
  288. package/script/auth/browser.js +46 -0
  289. package/script/auth/keys.d.ts +5 -0
  290. package/script/auth/keys.d.ts.map +1 -0
  291. package/script/auth/keys.js +56 -0
  292. package/script/auth/mod.d.ts +18 -0
  293. package/script/auth/mod.d.ts.map +1 -0
  294. package/script/auth/mod.js +172 -0
  295. package/script/auth/proof.d.ts +9 -0
  296. package/script/auth/proof.d.ts.map +1 -0
  297. package/script/auth/proof.js +48 -0
  298. package/script/auth/protocol.d.ts +1212 -0
  299. package/script/auth/protocol.d.ts.map +1 -0
  300. package/script/auth/protocol.js +687 -0
  301. package/script/auth/schemas.d.ts +93 -0
  302. package/script/auth/schemas.d.ts.map +1 -0
  303. package/script/auth/schemas.js +67 -0
  304. package/script/auth/session_auth.d.ts +20 -0
  305. package/script/auth/session_auth.d.ts.map +1 -0
  306. package/script/auth/session_auth.js +45 -0
  307. package/script/auth/trellis_id.d.ts +2 -0
  308. package/script/auth/trellis_id.d.ts.map +1 -0
  309. package/script/auth/trellis_id.js +8 -0
  310. package/script/auth/types.d.ts +8 -0
  311. package/script/auth/types.d.ts.map +1 -0
  312. package/script/auth/utils.d.ts +11 -0
  313. package/script/auth/utils.d.ts.map +1 -0
  314. package/script/auth/utils.js +77 -0
  315. package/script/auth/workload_activation.d.ts +192 -0
  316. package/script/auth/workload_activation.d.ts.map +1 -0
  317. package/script/auth/workload_activation.js +308 -0
  318. package/script/contracts/canonical.d.ts +14 -0
  319. package/script/contracts/canonical.d.ts.map +1 -0
  320. package/script/contracts/canonical.js +144 -0
  321. package/script/contracts/mod.d.ts +462 -0
  322. package/script/contracts/mod.d.ts.map +1 -0
  323. package/script/contracts/mod.js +555 -0
  324. package/script/contracts/protocol.d.ts +301 -0
  325. package/script/contracts/protocol.d.ts.map +1 -0
  326. package/script/contracts/protocol.js +136 -0
  327. package/script/contracts/runtime.d.ts +48 -0
  328. package/script/contracts/runtime.d.ts.map +1 -0
  329. package/script/contracts/runtime.js +13 -0
  330. package/script/contracts/schema_pointers.d.ts +18 -0
  331. package/script/contracts/schema_pointers.d.ts.map +1 -0
  332. package/script/contracts/schema_pointers.js +63 -0
  333. package/script/telemetry/carrier.d.ts +9 -0
  334. package/script/telemetry/carrier.d.ts.map +1 -0
  335. package/script/telemetry/carrier.js +25 -0
  336. package/script/telemetry/core.d.ts +8 -0
  337. package/script/telemetry/core.d.ts.map +1 -0
  338. package/script/telemetry/core.js +24 -0
  339. package/script/telemetry/env.d.ts +2 -0
  340. package/script/telemetry/env.d.ts.map +1 -0
  341. package/script/telemetry/env.js +12 -0
  342. package/script/telemetry/mod.d.ts +11 -0
  343. package/script/telemetry/mod.d.ts.map +1 -0
  344. package/script/telemetry/mod.js +29 -0
  345. package/script/telemetry/nats.d.ts +7 -0
  346. package/script/telemetry/nats.d.ts.map +1 -0
  347. package/script/telemetry/nats.js +9 -0
  348. package/script/telemetry/result.d.ts +2 -0
  349. package/script/telemetry/result.d.ts.map +1 -0
  350. package/script/telemetry/result.js +21 -0
  351. package/script/telemetry/runtime.d.ts +2 -0
  352. package/script/telemetry/runtime.d.ts.map +1 -0
  353. package/script/telemetry/runtime.js +79 -0
  354. package/script/telemetry/trace.d.ts +5 -0
  355. package/script/telemetry/trace.d.ts.map +1 -0
  356. package/script/telemetry/trace.js +31 -0
  357. package/script/telemetry/trellis.d.ts +3 -0
  358. package/script/telemetry/trellis.d.ts.map +1 -0
  359. package/script/telemetry/trellis.js +14 -0
  360. package/script/trellis/_sdk/activity/_dnt.polyfills.d.ts +12 -0
  361. package/script/trellis/_sdk/activity/_dnt.polyfills.d.ts.map +1 -0
  362. package/script/trellis/_sdk/activity/_dnt.polyfills.js +16 -0
  363. package/script/trellis/_sdk/activity/api.d.ts +10 -0
  364. package/script/trellis/_sdk/activity/api.d.ts.map +1 -0
  365. package/script/trellis/_sdk/activity/api.js +46 -0
  366. package/script/trellis/_sdk/activity/contract.d.ts +8 -0
  367. package/script/trellis/_sdk/activity/contract.d.ts.map +1 -0
  368. package/script/trellis/_sdk/activity/contract.js +62 -0
  369. package/script/trellis/_sdk/activity/mod.d.ts +7 -0
  370. package/script/trellis/_sdk/activity/mod.d.ts.map +1 -0
  371. package/script/trellis/_sdk/activity/mod.js +30 -0
  372. package/script/trellis/_sdk/activity/package.json +3 -0
  373. package/script/trellis/_sdk/activity/schemas.d.ts +607 -0
  374. package/script/trellis/_sdk/activity/schemas.d.ts.map +1 -0
  375. package/script/trellis/_sdk/activity/schemas.js +36 -0
  376. package/script/trellis/_sdk/activity/types.d.ts +96 -0
  377. package/script/trellis/_sdk/activity/types.d.ts.map +1 -0
  378. package/script/trellis/_sdk/activity/types.js +6 -0
  379. package/script/trellis/_sdk/auth/_dnt.polyfills.d.ts +12 -0
  380. package/script/trellis/_sdk/auth/_dnt.polyfills.d.ts.map +1 -0
  381. package/script/trellis/_sdk/auth/_dnt.polyfills.js +16 -0
  382. package/script/trellis/_sdk/auth/api.d.ts +10 -0
  383. package/script/trellis/_sdk/auth/api.d.ts.map +1 -0
  384. package/script/trellis/_sdk/auth/api.js +357 -0
  385. package/script/trellis/_sdk/auth/contract.d.ts +28 -0
  386. package/script/trellis/_sdk/auth/contract.d.ts.map +1 -0
  387. package/script/trellis/_sdk/auth/contract.js +86 -0
  388. package/script/trellis/_sdk/auth/mod.d.ts +7 -0
  389. package/script/trellis/_sdk/auth/mod.d.ts.map +1 -0
  390. package/script/trellis/_sdk/auth/mod.js +31 -0
  391. package/script/trellis/_sdk/auth/package.json +3 -0
  392. package/script/trellis/_sdk/auth/schemas.d.ts +8967 -0
  393. package/script/trellis/_sdk/auth/schemas.d.ts.map +1 -0
  394. package/script/trellis/_sdk/auth/schemas.js +309 -0
  395. package/script/trellis/_sdk/auth/types.d.ts +1232 -0
  396. package/script/trellis/_sdk/auth/types.d.ts.map +1 -0
  397. package/script/trellis/_sdk/auth/types.js +6 -0
  398. package/script/trellis/_sdk/core/_dnt.polyfills.d.ts +12 -0
  399. package/script/trellis/_sdk/core/_dnt.polyfills.d.ts.map +1 -0
  400. package/script/trellis/_sdk/core/_dnt.polyfills.js +16 -0
  401. package/script/trellis/_sdk/core/api.d.ts +10 -0
  402. package/script/trellis/_sdk/core/api.d.ts.map +1 -0
  403. package/script/trellis/_sdk/core/api.js +39 -0
  404. package/script/trellis/_sdk/core/contract.d.ts +8 -0
  405. package/script/trellis/_sdk/core/contract.d.ts.map +1 -0
  406. package/script/trellis/_sdk/core/contract.js +62 -0
  407. package/script/trellis/_sdk/core/mod.d.ts +7 -0
  408. package/script/trellis/_sdk/core/mod.d.ts.map +1 -0
  409. package/script/trellis/_sdk/core/mod.js +30 -0
  410. package/script/trellis/_sdk/core/package.json +3 -0
  411. package/script/trellis/_sdk/core/schemas.d.ts +1144 -0
  412. package/script/trellis/_sdk/core/schemas.d.ts.map +1 -0
  413. package/script/trellis/_sdk/core/schemas.js +31 -0
  414. package/script/trellis/_sdk/core/types.d.ts +176 -0
  415. package/script/trellis/_sdk/core/types.d.ts.map +1 -0
  416. package/script/trellis/_sdk/core/types.js +6 -0
  417. package/script/trellis/auth.d.ts +2 -0
  418. package/script/trellis/auth.d.ts.map +1 -0
  419. package/script/trellis/auth.js +17 -0
  420. package/script/trellis/client.d.ts +8 -6
  421. package/script/trellis/client.d.ts.map +1 -1
  422. package/script/trellis/client.js +54 -3
  423. package/script/trellis/codec.d.ts +5 -4
  424. package/script/trellis/codec.d.ts.map +1 -1
  425. package/script/trellis/codec.js +31 -17
  426. package/script/trellis/contract.d.ts +11 -0
  427. package/script/trellis/contract.d.ts.map +1 -0
  428. package/script/trellis/contract.js +18 -0
  429. package/script/trellis/contracts.d.ts +4 -0
  430. package/script/trellis/contracts.d.ts.map +1 -0
  431. package/script/trellis/contracts.js +20 -0
  432. package/script/trellis/errors/AuthError.d.ts +2 -2
  433. package/script/trellis/errors/AuthError.d.ts.map +1 -1
  434. package/script/trellis/errors/AuthError.js +13 -2
  435. package/script/trellis/errors/KVError.d.ts +1 -1
  436. package/script/trellis/errors/KVError.d.ts.map +1 -1
  437. package/script/trellis/errors/KVError.js +2 -2
  438. package/script/trellis/errors/RemoteError.d.ts +4 -4
  439. package/script/trellis/errors/RemoteError.d.ts.map +1 -1
  440. package/script/trellis/errors/RemoteError.js +11 -11
  441. package/script/trellis/errors/TrellisError.d.ts +1 -1
  442. package/script/trellis/errors/TrellisError.d.ts.map +1 -1
  443. package/script/trellis/errors/TrellisError.js +2 -2
  444. package/script/trellis/errors/ValidationError.d.ts +1 -1
  445. package/script/trellis/errors/ValidationError.d.ts.map +1 -1
  446. package/script/trellis/errors/ValidationError.js +2 -2
  447. package/script/trellis/errors/index.d.ts +14 -14
  448. package/script/trellis/errors/index.d.ts.map +1 -1
  449. package/script/trellis/errors/index.js +31 -31
  450. package/script/trellis/globals.d.ts +9 -1
  451. package/script/trellis/globals.d.ts.map +1 -1
  452. package/script/trellis/globals.js +16 -8
  453. package/script/trellis/helpers.d.ts +1 -1
  454. package/script/trellis/helpers.d.ts.map +1 -1
  455. package/script/trellis/index.d.ts +17 -10
  456. package/script/trellis/index.d.ts.map +1 -1
  457. package/script/trellis/index.js +57 -22
  458. package/script/trellis/kv.d.ts +11 -8
  459. package/script/trellis/kv.d.ts.map +1 -1
  460. package/script/trellis/kv.js +91 -68
  461. package/script/trellis/models/trellis/TrellisError.d.ts +1 -1
  462. package/script/trellis/models/trellis/TrellisError.d.ts.map +1 -1
  463. package/script/trellis/models/trellis/TrellisError.js +8 -8
  464. package/script/trellis/operations.d.ts +81 -0
  465. package/script/trellis/operations.d.ts.map +1 -0
  466. package/script/trellis/operations.js +212 -0
  467. package/script/trellis/sdk/core.d.ts +3 -0
  468. package/script/trellis/sdk/core.d.ts.map +1 -0
  469. package/script/trellis/sdk/core.js +20 -0
  470. package/script/trellis/tasks.d.ts +3 -3
  471. package/script/trellis/tasks.d.ts.map +1 -1
  472. package/script/trellis/tasks.js +5 -5
  473. package/script/trellis/tracing.d.ts +2 -3
  474. package/script/trellis/tracing.d.ts.map +1 -1
  475. package/script/trellis/tracing.js +17 -20
  476. package/script/trellis/trellis.d.ts +169 -80
  477. package/script/trellis/trellis.d.ts.map +1 -1
  478. package/script/trellis/trellis.js +379 -177
  479. package/script/trellis/workload.d.ts +45 -0
  480. package/script/trellis/workload.d.ts.map +1 -0
  481. package/script/trellis/workload.js +172 -0
  482. package/script/_dnt.polyfills.d.ts +0 -7
  483. package/script/_dnt.polyfills.d.ts.map +0 -1
  484. package/script/trellis/browser.d.ts +0 -11
  485. package/script/trellis/browser.d.ts.map +0 -1
  486. package/script/trellis/browser.js +0 -21
  487. package/script/trellis/env.d.ts +0 -2
  488. package/script/trellis/env.d.ts.map +0 -1
  489. package/script/trellis/env.js +0 -5
  490. /package/script/{_dnt.polyfills.js → auth/types.js} +0 -0
@@ -0,0 +1,83 @@
1
+ import { API } from "./api.js";
2
+ const CONTRACT_MODULE_METADATA = Symbol.for("../../../contracts/mod.js/contract-module");
3
+ export const CONTRACT_ID = "trellis.auth@v1";
4
+ export const CONTRACT_DIGEST = "Nf__I64IhjOU59OwMTk0w6r0AuN8O9WDMmNQ-YM3oqk";
5
+ export const CONTRACT = { "description": "Provide Trellis authentication, session, service install, and admin RPCs.", "displayName": "Trellis Auth", "events": { "Auth.Connect": { "capabilities": { "publish": ["service:events:auth"], "subscribe": ["service:events:auth"] }, "event": { "schema": "AuthConnectEvent" }, "subject": "events.v1.Auth.Connect", "version": "v1" }, "Auth.ConnectionKicked": { "capabilities": { "publish": ["service:events:auth"], "subscribe": ["service:events:auth"] }, "event": { "schema": "AuthConnectionKickedEvent" }, "subject": "events.v1.Auth.ConnectionKicked", "version": "v1" }, "Auth.Disconnect": { "capabilities": { "publish": ["service:events:auth"], "subscribe": ["service:events:auth"] }, "event": { "schema": "AuthDisconnectEvent" }, "subject": "events.v1.Auth.Disconnect", "version": "v1" }, "Auth.SessionRevoked": { "capabilities": { "publish": ["service:events:auth"], "subscribe": ["service:events:auth"] }, "event": { "schema": "AuthSessionRevokedEvent" }, "subject": "events.v1.Auth.SessionRevoked", "version": "v1" }, "Auth.WorkloadActivationReviewRequested": { "capabilities": { "publish": ["service:events:auth"], "subscribe": ["workload.review"] }, "event": { "schema": "AuthWorkloadActivationReviewRequestedEvent" }, "subject": "events.v1.Auth.WorkloadActivationReviewRequested", "version": "v1" } }, "format": "trellis.contract.v1", "id": "trellis.auth@v1", "operations": {}, "rpc": { "Auth.ActivateWorkload": { "capabilities": { "call": [] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthActivateWorkloadRequest" }, "output": { "schema": "AuthActivateWorkloadResponse" }, "subject": "rpc.v1.Auth.ActivateWorkload", "version": "v1" }, "Auth.ClearLoginPortalSelection": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthClearLoginPortalSelectionRequest" }, "output": { "schema": "AuthClearLoginPortalSelectionResponse" }, "subject": "rpc.v1.Auth.ClearLoginPortalSelection", "version": "v1" }, "Auth.ClearWorkloadPortalSelection": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthClearWorkloadPortalSelectionRequest" }, "output": { "schema": "AuthClearWorkloadPortalSelectionResponse" }, "subject": "rpc.v1.Auth.ClearWorkloadPortalSelection", "version": "v1" }, "Auth.CreatePortal": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthCreatePortalRequest" }, "output": { "schema": "AuthCreatePortalResponse" }, "subject": "rpc.v1.Auth.CreatePortal", "version": "v1" }, "Auth.CreateWorkloadProfile": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthCreateWorkloadProfileRequest" }, "output": { "schema": "AuthCreateWorkloadProfileResponse" }, "subject": "rpc.v1.Auth.CreateWorkloadProfile", "version": "v1" }, "Auth.DecideWorkloadActivationReview": { "capabilities": { "call": ["admin", "workload.review"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthDecideWorkloadActivationReviewRequest" }, "output": { "schema": "AuthDecideWorkloadActivationReviewResponse" }, "subject": "rpc.v1.Auth.DecideWorkloadActivationReview", "version": "v1" }, "Auth.DisablePortal": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthDisablePortalRequest" }, "output": { "schema": "AuthDisablePortalResponse" }, "subject": "rpc.v1.Auth.DisablePortal", "version": "v1" }, "Auth.DisableWorkloadInstance": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthDisableWorkloadInstanceRequest" }, "output": { "schema": "AuthDisableWorkloadInstanceResponse" }, "subject": "rpc.v1.Auth.DisableWorkloadInstance", "version": "v1" }, "Auth.DisableWorkloadProfile": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthDisableWorkloadProfileRequest" }, "output": { "schema": "AuthDisableWorkloadProfileResponse" }, "subject": "rpc.v1.Auth.DisableWorkloadProfile", "version": "v1" }, "Auth.GetInstalledContract": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthGetInstalledContractRequest" }, "output": { "schema": "AuthGetInstalledContractResponse" }, "subject": "rpc.v1.Auth.GetInstalledContract", "version": "v1" }, "Auth.GetLoginPortalDefault": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthGetLoginPortalDefaultRequest" }, "output": { "schema": "AuthGetLoginPortalDefaultResponse" }, "subject": "rpc.v1.Auth.GetLoginPortalDefault", "version": "v1" }, "Auth.GetWorkloadActivationStatus": { "capabilities": { "call": [] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthGetWorkloadActivationStatusRequest" }, "output": { "schema": "AuthGetWorkloadActivationStatusResponse" }, "subject": "rpc.v1.Auth.GetWorkloadActivationStatus", "version": "v1" }, "Auth.GetWorkloadConnectInfo": { "capabilities": { "call": [] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthGetWorkloadConnectInfoRequest" }, "output": { "schema": "AuthGetWorkloadConnectInfoResponse" }, "subject": "rpc.v1.Auth.GetWorkloadConnectInfo", "version": "v1" }, "Auth.GetWorkloadPortalDefault": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthGetWorkloadPortalDefaultRequest" }, "output": { "schema": "AuthGetWorkloadPortalDefaultResponse" }, "subject": "rpc.v1.Auth.GetWorkloadPortalDefault", "version": "v1" }, "Auth.Health": { "capabilities": { "call": [] }, "errors": [{ "type": "UnexpectedError" }], "input": { "schema": "HealthRequest" }, "output": { "schema": "HealthResponse" }, "subject": "rpc.v1.Auth.Health", "version": "v1" }, "Auth.InstallService": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthInstallServiceRequest" }, "output": { "schema": "AuthInstallServiceResponse" }, "subject": "rpc.v1.Auth.InstallService", "version": "v1" }, "Auth.KickConnection": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthKickConnectionRequest" }, "output": { "schema": "AuthKickConnectionResponse" }, "subject": "rpc.v1.Auth.KickConnection", "version": "v1" }, "Auth.ListApprovals": { "capabilities": { "call": [] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthListApprovalsRequest" }, "output": { "schema": "AuthListApprovalsResponse" }, "subject": "rpc.v1.Auth.ListApprovals", "version": "v1" }, "Auth.ListConnections": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthListConnectionsRequest" }, "output": { "schema": "AuthListConnectionsResponse" }, "subject": "rpc.v1.Auth.ListConnections", "version": "v1" }, "Auth.ListInstalledContracts": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthListInstalledContractsRequest" }, "output": { "schema": "AuthListInstalledContractsResponse" }, "subject": "rpc.v1.Auth.ListInstalledContracts", "version": "v1" }, "Auth.ListLoginPortalSelections": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthListLoginPortalSelectionsRequest" }, "output": { "schema": "AuthListLoginPortalSelectionsResponse" }, "subject": "rpc.v1.Auth.ListLoginPortalSelections", "version": "v1" }, "Auth.ListPortals": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthListPortalsRequest" }, "output": { "schema": "AuthListPortalsResponse" }, "subject": "rpc.v1.Auth.ListPortals", "version": "v1" }, "Auth.ListServices": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthListServicesRequest" }, "output": { "schema": "AuthListServicesResponse" }, "subject": "rpc.v1.Auth.ListServices", "version": "v1" }, "Auth.ListSessions": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthListSessionsRequest" }, "output": { "schema": "AuthListSessionsResponse" }, "subject": "rpc.v1.Auth.ListSessions", "version": "v1" }, "Auth.ListUsers": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthListUsersRequest" }, "output": { "schema": "AuthListUsersResponse" }, "subject": "rpc.v1.Auth.ListUsers", "version": "v1" }, "Auth.ListWorkloadActivationReviews": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthListWorkloadActivationReviewsRequest" }, "output": { "schema": "AuthListWorkloadActivationReviewsResponse" }, "subject": "rpc.v1.Auth.ListWorkloadActivationReviews", "version": "v1" }, "Auth.ListWorkloadActivations": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthListWorkloadActivationsRequest" }, "output": { "schema": "AuthListWorkloadActivationsResponse" }, "subject": "rpc.v1.Auth.ListWorkloadActivations", "version": "v1" }, "Auth.ListWorkloadInstances": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthListWorkloadInstancesRequest" }, "output": { "schema": "AuthListWorkloadInstancesResponse" }, "subject": "rpc.v1.Auth.ListWorkloadInstances", "version": "v1" }, "Auth.ListWorkloadPortalSelections": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthListWorkloadPortalSelectionsRequest" }, "output": { "schema": "AuthListWorkloadPortalSelectionsResponse" }, "subject": "rpc.v1.Auth.ListWorkloadPortalSelections", "version": "v1" }, "Auth.ListWorkloadProfiles": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthListWorkloadProfilesRequest" }, "output": { "schema": "AuthListWorkloadProfilesResponse" }, "subject": "rpc.v1.Auth.ListWorkloadProfiles", "version": "v1" }, "Auth.Logout": { "capabilities": { "call": [] }, "errors": [{ "type": "AuthError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthLogoutRequest" }, "output": { "schema": "AuthLogoutResponse" }, "subject": "rpc.v1.Auth.Logout", "version": "v1" }, "Auth.Me": { "capabilities": { "call": [] }, "errors": [{ "type": "AuthError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthMeRequest" }, "output": { "schema": "AuthMeResponse" }, "subject": "rpc.v1.Auth.Me", "version": "v1" }, "Auth.ProvisionWorkloadInstance": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthProvisionWorkloadInstanceRequest" }, "output": { "schema": "AuthProvisionWorkloadInstanceResponse" }, "subject": "rpc.v1.Auth.ProvisionWorkloadInstance", "version": "v1" }, "Auth.RenewBindingToken": { "capabilities": { "call": [] }, "errors": [{ "type": "AuthError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthRenewBindingTokenRequest" }, "output": { "schema": "AuthRenewBindingTokenResponse" }, "subject": "rpc.v1.Auth.RenewBindingToken", "version": "v1" }, "Auth.RevokeApproval": { "capabilities": { "call": [] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthRevokeApprovalRequest" }, "output": { "schema": "AuthRevokeApprovalResponse" }, "subject": "rpc.v1.Auth.RevokeApproval", "version": "v1" }, "Auth.RevokeSession": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthRevokeSessionRequest" }, "output": { "schema": "AuthRevokeSessionResponse" }, "subject": "rpc.v1.Auth.RevokeSession", "version": "v1" }, "Auth.RevokeWorkloadActivation": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthRevokeWorkloadActivationRequest" }, "output": { "schema": "AuthRevokeWorkloadActivationResponse" }, "subject": "rpc.v1.Auth.RevokeWorkloadActivation", "version": "v1" }, "Auth.SetLoginPortalDefault": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthSetLoginPortalDefaultRequest" }, "output": { "schema": "AuthSetLoginPortalDefaultResponse" }, "subject": "rpc.v1.Auth.SetLoginPortalDefault", "version": "v1" }, "Auth.SetLoginPortalSelection": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthSetLoginPortalSelectionRequest" }, "output": { "schema": "AuthSetLoginPortalSelectionResponse" }, "subject": "rpc.v1.Auth.SetLoginPortalSelection", "version": "v1" }, "Auth.SetWorkloadPortalDefault": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthSetWorkloadPortalDefaultRequest" }, "output": { "schema": "AuthSetWorkloadPortalDefaultResponse" }, "subject": "rpc.v1.Auth.SetWorkloadPortalDefault", "version": "v1" }, "Auth.SetWorkloadPortalSelection": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthSetWorkloadPortalSelectionRequest" }, "output": { "schema": "AuthSetWorkloadPortalSelectionResponse" }, "subject": "rpc.v1.Auth.SetWorkloadPortalSelection", "version": "v1" }, "Auth.UpdateUser": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthUpdateUserRequest" }, "output": { "schema": "AuthUpdateUserResponse" }, "subject": "rpc.v1.Auth.UpdateUser", "version": "v1" }, "Auth.UpgradeServiceContract": { "capabilities": { "call": ["admin"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthUpgradeServiceContractRequest" }, "output": { "schema": "AuthUpgradeServiceContractResponse" }, "subject": "rpc.v1.Auth.UpgradeServiceContract", "version": "v1" }, "Auth.ValidateRequest": { "capabilities": { "call": ["service"] }, "errors": [{ "type": "AuthError" }, { "type": "ValidationError" }, { "type": "UnexpectedError" }], "input": { "schema": "AuthValidateRequestRequest" }, "output": { "schema": "AuthValidateRequestResponse" }, "subject": "rpc.v1.Auth.ValidateRequest", "version": "v1" } }, "schemas": { "AuthActivateWorkloadRequest": { "additionalProperties": false, "properties": { "handoffId": { "minLength": 1, "type": "string" } }, "required": ["handoffId"], "type": "object" }, "AuthActivateWorkloadResponse": { "anyOf": [{ "additionalProperties": false, "properties": { "activatedAt": { "format": "date-time", "type": "string" }, "confirmationCode": { "minLength": 1, "type": "string" }, "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "status": { "const": "activated", "type": "string" } }, "required": ["status", "instanceId", "profileId", "activatedAt"], "type": "object" }, { "additionalProperties": false, "properties": { "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "requestedAt": { "format": "date-time", "type": "string" }, "reviewId": { "minLength": 1, "type": "string" }, "status": { "const": "pending_review", "type": "string" } }, "required": ["status", "reviewId", "instanceId", "profileId", "requestedAt"], "type": "object" }, { "additionalProperties": false, "properties": { "reason": { "minLength": 1, "type": "string" }, "status": { "const": "rejected", "type": "string" } }, "required": ["status"], "type": "object" }] }, "AuthClearLoginPortalSelectionRequest": { "additionalProperties": false, "properties": { "contractId": { "minLength": 1, "type": "string" } }, "required": ["contractId"], "type": "object" }, "AuthClearLoginPortalSelectionResponse": { "additionalProperties": false, "properties": { "success": { "type": "boolean" } }, "required": ["success"], "type": "object" }, "AuthClearWorkloadPortalSelectionRequest": { "additionalProperties": false, "properties": { "profileId": { "minLength": 1, "type": "string" } }, "required": ["profileId"], "type": "object" }, "AuthClearWorkloadPortalSelectionResponse": { "additionalProperties": false, "properties": { "success": { "type": "boolean" } }, "required": ["success"], "type": "object" }, "AuthConnectEvent": { "allOf": [{ "properties": { "header": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "time": { "format": "date-time", "type": "string" } }, "required": ["id", "time"], "type": "object" } }, "required": ["header"], "type": "object" }, { "properties": { "id": { "type": "string" }, "origin": { "type": "string" }, "sessionKey": { "type": "string" }, "userNkey": { "type": "string" } }, "required": ["origin", "id", "sessionKey", "userNkey"], "type": "object" }] }, "AuthConnectionKickedEvent": { "allOf": [{ "properties": { "header": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "time": { "format": "date-time", "type": "string" } }, "required": ["id", "time"], "type": "object" } }, "required": ["header"], "type": "object" }, { "properties": { "id": { "type": "string" }, "kickedBy": { "type": "string" }, "origin": { "type": "string" }, "userNkey": { "type": "string" } }, "required": ["origin", "id", "userNkey", "kickedBy"], "type": "object" }] }, "AuthCreatePortalRequest": { "additionalProperties": false, "properties": { "appContractId": { "minLength": 1, "type": "string" }, "entryUrl": { "minLength": 1, "type": "string" }, "portalId": { "minLength": 1, "type": "string" } }, "required": ["portalId", "entryUrl"], "type": "object" }, "AuthCreatePortalResponse": { "additionalProperties": false, "properties": { "portal": { "additionalProperties": false, "properties": { "appContractId": { "minLength": 1, "type": "string" }, "disabled": { "type": "boolean" }, "entryUrl": { "minLength": 1, "type": "string" }, "portalId": { "minLength": 1, "type": "string" } }, "required": ["portalId", "entryUrl", "disabled"], "type": "object" } }, "required": ["portal"], "type": "object" }, "AuthCreateWorkloadProfileRequest": { "additionalProperties": false, "properties": { "allowedDigests": { "items": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "type": "array" }, "contract": { "additionalProperties": true, "properties": {}, "type": "object" }, "contractId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "reviewMode": { "anyOf": [{ "const": "none", "type": "string" }, { "const": "required", "type": "string" }] } }, "required": ["profileId", "contractId", "allowedDigests"], "type": "object" }, "AuthCreateWorkloadProfileResponse": { "additionalProperties": false, "properties": { "profile": { "additionalProperties": false, "properties": { "allowedDigests": { "items": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "type": "array" }, "contractId": { "minLength": 1, "type": "string" }, "disabled": { "type": "boolean" }, "profileId": { "minLength": 1, "type": "string" }, "reviewMode": { "anyOf": [{ "const": "none", "type": "string" }, { "const": "required", "type": "string" }] } }, "required": ["profileId", "contractId", "allowedDigests", "disabled"], "type": "object" } }, "required": ["profile"], "type": "object" }, "AuthDecideWorkloadActivationReviewRequest": { "additionalProperties": false, "properties": { "decision": { "anyOf": [{ "const": "approve", "type": "string" }, { "const": "reject", "type": "string" }] }, "reason": { "minLength": 1, "type": "string" }, "reviewId": { "minLength": 1, "type": "string" } }, "required": ["reviewId", "decision"], "type": "object" }, "AuthDecideWorkloadActivationReviewResponse": { "additionalProperties": false, "properties": { "activation": { "additionalProperties": false, "properties": { "activatedAt": { "format": "date-time", "type": "string" }, "activatedBy": { "additionalProperties": false, "properties": { "id": { "minLength": 1, "type": "string" }, "origin": { "minLength": 1, "type": "string" } }, "required": ["origin", "id"], "type": "object" }, "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "publicIdentityKey": { "minLength": 1, "type": "string" }, "revokedAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "state": { "anyOf": [{ "const": "activated", "type": "string" }, { "const": "revoked", "type": "string" }] } }, "required": ["instanceId", "publicIdentityKey", "profileId", "state", "activatedAt", "revokedAt"], "type": "object" }, "confirmationCode": { "minLength": 1, "type": "string" }, "review": { "additionalProperties": false, "properties": { "decidedAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "publicIdentityKey": { "minLength": 1, "type": "string" }, "reason": { "minLength": 1, "type": "string" }, "requestedAt": { "format": "date-time", "type": "string" }, "reviewId": { "minLength": 1, "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "approved", "type": "string" }, { "const": "rejected", "type": "string" }] } }, "required": ["reviewId", "instanceId", "publicIdentityKey", "profileId", "state", "requestedAt", "decidedAt"], "type": "object" } }, "required": ["review"], "type": "object" }, "AuthDisablePortalRequest": { "additionalProperties": false, "properties": { "portalId": { "minLength": 1, "type": "string" } }, "required": ["portalId"], "type": "object" }, "AuthDisablePortalResponse": { "additionalProperties": false, "properties": { "success": { "type": "boolean" } }, "required": ["success"], "type": "object" }, "AuthDisableWorkloadInstanceRequest": { "additionalProperties": false, "properties": { "instanceId": { "minLength": 1, "type": "string" } }, "required": ["instanceId"], "type": "object" }, "AuthDisableWorkloadInstanceResponse": { "additionalProperties": false, "properties": { "success": { "type": "boolean" } }, "required": ["success"], "type": "object" }, "AuthDisableWorkloadProfileRequest": { "additionalProperties": false, "properties": { "profileId": { "minLength": 1, "type": "string" } }, "required": ["profileId"], "type": "object" }, "AuthDisableWorkloadProfileResponse": { "additionalProperties": false, "properties": { "success": { "type": "boolean" } }, "required": ["success"], "type": "object" }, "AuthDisconnectEvent": { "allOf": [{ "properties": { "header": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "time": { "format": "date-time", "type": "string" } }, "required": ["id", "time"], "type": "object" } }, "required": ["header"], "type": "object" }, { "properties": { "id": { "type": "string" }, "origin": { "type": "string" }, "sessionKey": { "type": "string" }, "userNkey": { "type": "string" } }, "required": ["origin", "id", "sessionKey", "userNkey"], "type": "object" }] }, "AuthGetInstalledContractRequest": { "additionalProperties": false, "properties": { "digest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" } }, "required": ["digest"], "type": "object" }, "AuthGetInstalledContractResponse": { "additionalProperties": false, "properties": { "contract": { "additionalProperties": false, "properties": { "analysis": { "additionalProperties": false, "properties": { "events": { "additionalProperties": false, "properties": { "events": { "items": { "additionalProperties": false, "properties": { "key": { "type": "string" }, "publishCapabilities": { "items": { "type": "string" }, "type": "array" }, "subject": { "type": "string" }, "subscribeCapabilities": { "items": { "type": "string" }, "type": "array" }, "wildcardSubject": { "type": "string" } }, "required": ["key", "subject", "wildcardSubject", "publishCapabilities", "subscribeCapabilities"], "type": "object" }, "type": "array" } }, "required": ["events"], "type": "object" }, "namespaces": { "items": { "type": "string" }, "type": "array" }, "nats": { "additionalProperties": false, "properties": { "publish": { "items": { "additionalProperties": false, "properties": { "kind": { "type": "string" }, "requiredCapabilities": { "items": { "type": "string" }, "type": "array" }, "subject": { "type": "string" }, "wildcardSubject": { "type": "string" } }, "required": ["kind", "subject", "wildcardSubject", "requiredCapabilities"], "type": "object" }, "type": "array" }, "subscribe": { "items": { "additionalProperties": false, "properties": { "kind": { "type": "string" }, "requiredCapabilities": { "items": { "type": "string" }, "type": "array" }, "subject": { "type": "string" }, "wildcardSubject": { "type": "string" } }, "required": ["kind", "subject", "wildcardSubject", "requiredCapabilities"], "type": "object" }, "type": "array" } }, "required": ["publish", "subscribe"], "type": "object" }, "resources": { "additionalProperties": false, "properties": { "jobs": { "items": { "additionalProperties": false, "properties": { "ackWaitMs": { "type": "number" }, "backoffMs": { "items": { "type": "number" }, "type": "array" }, "concurrency": { "type": "number" }, "defaultDeadlineMs": { "type": "number" }, "dlq": { "type": "boolean" }, "logs": { "type": "boolean" }, "maxDeliver": { "type": "number" }, "payload": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" }, "progress": { "type": "boolean" }, "queueType": { "minLength": 1, "type": "string" }, "result": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" } }, "required": ["queueType", "payload", "maxDeliver", "backoffMs", "ackWaitMs", "progress", "logs", "dlq", "concurrency"], "type": "object" }, "type": "array" }, "kv": { "items": { "additionalProperties": false, "properties": { "alias": { "minLength": 1, "type": "string" }, "history": { "type": "number" }, "maxValueBytes": { "type": "number" }, "purpose": { "minLength": 1, "type": "string" }, "required": { "type": "boolean" }, "ttlMs": { "type": "number" } }, "required": ["alias", "purpose", "required", "history", "ttlMs"], "type": "object" }, "type": "array" }, "streams": { "items": { "additionalProperties": false, "properties": { "alias": { "minLength": 1, "type": "string" }, "discard": { "minLength": 1, "type": "string" }, "maxAgeMs": { "type": "number" }, "maxBytes": { "type": "number" }, "maxMsgs": { "type": "number" }, "numReplicas": { "type": "number" }, "purpose": { "minLength": 1, "type": "string" }, "required": { "type": "boolean" }, "retention": { "minLength": 1, "type": "string" }, "sources": { "items": { "additionalProperties": false, "properties": { "filterSubject": { "minLength": 1, "type": "string" }, "fromAlias": { "minLength": 1, "type": "string" }, "streamName": { "minLength": 1, "type": "string" }, "subjectTransformDest": { "minLength": 1, "type": "string" } }, "required": ["fromAlias", "streamName"], "type": "object" }, "type": "array" }, "storage": { "minLength": 1, "type": "string" }, "subjects": { "items": { "minLength": 1, "type": "string" }, "minItems": 1, "type": "array" } }, "required": ["alias", "purpose", "required", "subjects"], "type": "object" }, "type": "array" } }, "required": ["kv", "jobs", "streams"], "type": "object" }, "rpc": { "additionalProperties": false, "properties": { "methods": { "items": { "additionalProperties": false, "properties": { "callerCapabilities": { "items": { "type": "string" }, "type": "array" }, "key": { "type": "string" }, "subject": { "type": "string" }, "wildcardSubject": { "type": "string" } }, "required": ["key", "subject", "wildcardSubject", "callerCapabilities"], "type": "object" }, "type": "array" } }, "required": ["methods"], "type": "object" }, "subjects": { "additionalProperties": false, "properties": { "subjects": { "items": { "additionalProperties": false, "properties": { "key": { "type": "string" }, "publishCapabilities": { "items": { "type": "string" }, "type": "array" }, "subject": { "type": "string" }, "subscribeCapabilities": { "items": { "type": "string" }, "type": "array" } }, "required": ["key", "subject", "publishCapabilities", "subscribeCapabilities"], "type": "object" }, "type": "array" } }, "required": ["subjects"], "type": "object" } }, "required": ["namespaces", "rpc", "events", "nats", "resources"], "type": "object" }, "analysisSummary": { "additionalProperties": false, "properties": { "events": { "type": "number" }, "jobsQueues": { "type": "number" }, "kvResources": { "type": "number" }, "namespaces": { "items": { "type": "string" }, "type": "array" }, "natsPublish": { "type": "number" }, "natsSubscribe": { "type": "number" }, "rpcMethods": { "type": "number" }, "streamResources": { "type": "number" } }, "required": ["namespaces", "rpcMethods", "events", "natsPublish", "natsSubscribe", "kvResources", "jobsQueues", "streamResources"], "type": "object" }, "contract": { "type": "object" }, "description": { "minLength": 1, "type": "string" }, "digest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "displayName": { "minLength": 1, "type": "string" }, "id": { "minLength": 1, "type": "string" }, "installedAt": { "format": "date-time", "type": "string" }, "resourceBindings": { "properties": { "jobs": { "additionalProperties": false, "properties": { "namespace": { "minLength": 1, "type": "string" }, "queues": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "ackWaitMs": { "minimum": 1, "type": "integer" }, "backoffMs": { "items": { "minimum": 0, "type": "integer" }, "type": "array" }, "concurrency": { "minimum": 1, "type": "integer" }, "consumerName": { "minLength": 1, "type": "string" }, "defaultDeadlineMs": { "minimum": 1, "type": "integer" }, "dlq": { "type": "boolean" }, "logs": { "type": "boolean" }, "maxDeliver": { "minimum": 1, "type": "integer" }, "payload": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" }, "progress": { "type": "boolean" }, "publishPrefix": { "minLength": 1, "type": "string" }, "queueType": { "minLength": 1, "type": "string" }, "result": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" }, "workSubject": { "minLength": 1, "type": "string" } }, "required": ["queueType", "publishPrefix", "workSubject", "consumerName", "payload", "maxDeliver", "backoffMs", "ackWaitMs", "progress", "logs", "dlq", "concurrency"], "type": "object" } }, "type": "object" } }, "required": ["namespace", "queues"], "type": "object" }, "kv": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "bucket": { "minLength": 1, "type": "string" }, "history": { "minimum": 1, "type": "integer" }, "maxValueBytes": { "minimum": 1, "type": "integer" }, "ttlMs": { "minimum": 0, "type": "integer" } }, "required": ["bucket", "history", "ttlMs"], "type": "object" } }, "type": "object" }, "streams": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "discard": { "minLength": 1, "type": "string" }, "maxAgeMs": { "minimum": 0, "type": "integer" }, "maxBytes": { "type": "integer" }, "maxMsgs": { "type": "integer" }, "name": { "minLength": 1, "type": "string" }, "numReplicas": { "minimum": 1, "type": "integer" }, "retention": { "minLength": 1, "type": "string" }, "sources": { "items": { "additionalProperties": false, "properties": { "filterSubject": { "minLength": 1, "type": "string" }, "fromAlias": { "minLength": 1, "type": "string" }, "streamName": { "minLength": 1, "type": "string" }, "subjectTransformDest": { "minLength": 1, "type": "string" } }, "required": ["fromAlias", "streamName"], "type": "object" }, "type": "array" }, "storage": { "minLength": 1, "type": "string" }, "subjects": { "items": { "minLength": 1, "type": "string" }, "minItems": 1, "type": "array" } }, "required": ["name", "subjects"], "type": "object" } }, "type": "object" } }, "type": "object" }, "resources": { "properties": { "jobs": { "additionalProperties": false, "properties": { "queues": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "ackWaitMs": { "minimum": 1, "type": "integer" }, "backoffMs": { "items": { "minimum": 0, "type": "integer" }, "type": "array" }, "concurrency": { "minimum": 1, "type": "integer" }, "defaultDeadlineMs": { "minimum": 1, "type": "integer" }, "dlq": { "type": "boolean" }, "logs": { "type": "boolean" }, "maxDeliver": { "minimum": 1, "type": "integer" }, "payload": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" }, "progress": { "type": "boolean" }, "result": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" } }, "required": ["payload"], "type": "object" } }, "type": "object" } }, "required": ["queues"], "type": "object" }, "kv": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "history": { "default": 1, "minimum": 1, "type": "integer" }, "maxValueBytes": { "minimum": 1, "type": "integer" }, "purpose": { "minLength": 1, "type": "string" }, "required": { "default": true, "type": "boolean" }, "ttlMs": { "default": 0, "minimum": 0, "type": "integer" } }, "required": ["purpose"], "type": "object" } }, "type": "object" }, "streams": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "discard": { "minLength": 1, "type": "string" }, "maxAgeMs": { "minimum": 0, "type": "integer" }, "maxBytes": { "type": "integer" }, "maxMsgs": { "type": "integer" }, "numReplicas": { "minimum": 1, "type": "integer" }, "purpose": { "minLength": 1, "type": "string" }, "required": { "default": true, "type": "boolean" }, "retention": { "minLength": 1, "type": "string" }, "sources": { "items": { "additionalProperties": false, "properties": { "filterSubject": { "minLength": 1, "type": "string" }, "fromAlias": { "minLength": 1, "type": "string" }, "subjectTransformDest": { "minLength": 1, "type": "string" } }, "required": ["fromAlias"], "type": "object" }, "type": "array" }, "storage": { "minLength": 1, "type": "string" }, "subjects": { "items": { "minLength": 1, "type": "string" }, "minItems": 1, "type": "array" } }, "required": ["purpose", "subjects"], "type": "object" } }, "type": "object" } }, "type": "object" }, "sessionKey": { "type": "string" } }, "required": ["digest", "id", "displayName", "description", "installedAt", "contract"], "type": "object" } }, "required": ["contract"], "type": "object" }, "AuthGetLoginPortalDefaultRequest": { "additionalProperties": false, "properties": {}, "type": "object" }, "AuthGetLoginPortalDefaultResponse": { "additionalProperties": false, "properties": { "defaultPortal": { "additionalProperties": false, "properties": { "portalId": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] } }, "required": ["portalId"], "type": "object" } }, "required": ["defaultPortal"], "type": "object" }, "AuthGetWorkloadActivationStatusRequest": { "additionalProperties": false, "properties": { "handoffId": { "minLength": 1, "type": "string" } }, "required": ["handoffId"], "type": "object" }, "AuthGetWorkloadActivationStatusResponse": { "anyOf": [{ "additionalProperties": false, "properties": { "activatedAt": { "format": "date-time", "type": "string" }, "confirmationCode": { "minLength": 1, "type": "string" }, "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "status": { "const": "activated", "type": "string" } }, "required": ["status", "instanceId", "profileId", "activatedAt"], "type": "object" }, { "additionalProperties": false, "properties": { "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "requestedAt": { "format": "date-time", "type": "string" }, "reviewId": { "minLength": 1, "type": "string" }, "status": { "const": "pending_review", "type": "string" } }, "required": ["status", "reviewId", "instanceId", "profileId", "requestedAt"], "type": "object" }, { "additionalProperties": false, "properties": { "reason": { "minLength": 1, "type": "string" }, "status": { "const": "rejected", "type": "string" } }, "required": ["status"], "type": "object" }] }, "AuthGetWorkloadConnectInfoRequest": { "additionalProperties": false, "properties": { "contractDigest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "iat": { "type": "number" }, "publicIdentityKey": { "minLength": 1, "type": "string" }, "sig": { "minLength": 1, "type": "string" } }, "required": ["publicIdentityKey", "contractDigest", "iat", "sig"], "type": "object" }, "AuthGetWorkloadConnectInfoResponse": { "additionalProperties": false, "properties": { "connectInfo": { "additionalProperties": false, "properties": { "auth": { "additionalProperties": false, "properties": { "iatSkewSeconds": { "type": "number" }, "mode": { "const": "workload_identity", "type": "string" } }, "required": ["mode", "iatSkewSeconds"], "type": "object" }, "contractDigest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "transport": { "additionalProperties": false, "properties": { "natsServers": { "items": { "minLength": 1, "type": "string" }, "type": "array" }, "sentinel": { "additionalProperties": false, "properties": { "jwt": { "minLength": 1, "type": "string" }, "seed": { "minLength": 1, "type": "string" } }, "required": ["jwt", "seed"], "type": "object" } }, "required": ["natsServers", "sentinel"], "type": "object" } }, "required": ["instanceId", "profileId", "contractId", "contractDigest", "transport", "auth"], "type": "object" }, "status": { "const": "ready", "type": "string" } }, "required": ["status", "connectInfo"], "type": "object" }, "AuthGetWorkloadPortalDefaultRequest": { "additionalProperties": false, "properties": {}, "type": "object" }, "AuthGetWorkloadPortalDefaultResponse": { "additionalProperties": false, "properties": { "defaultPortal": { "additionalProperties": false, "properties": { "portalId": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] } }, "required": ["portalId"], "type": "object" } }, "required": ["defaultPortal"], "type": "object" }, "AuthInstallServiceRequest": { "additionalProperties": false, "properties": { "active": { "type": "boolean" }, "contract": { "type": "object" }, "description": { "minLength": 1, "type": "string" }, "displayName": { "minLength": 1, "type": "string" }, "namespaces": { "items": { "type": "string" }, "type": "array" }, "sessionKey": { "type": "string" } }, "required": ["sessionKey", "displayName", "namespaces", "description", "contract"], "type": "object" }, "AuthInstallServiceResponse": { "additionalProperties": false, "properties": { "contractDigest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "resourceBindings": { "properties": { "jobs": { "additionalProperties": false, "properties": { "namespace": { "minLength": 1, "type": "string" }, "queues": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "ackWaitMs": { "minimum": 1, "type": "integer" }, "backoffMs": { "items": { "minimum": 0, "type": "integer" }, "type": "array" }, "concurrency": { "minimum": 1, "type": "integer" }, "consumerName": { "minLength": 1, "type": "string" }, "defaultDeadlineMs": { "minimum": 1, "type": "integer" }, "dlq": { "type": "boolean" }, "logs": { "type": "boolean" }, "maxDeliver": { "minimum": 1, "type": "integer" }, "payload": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" }, "progress": { "type": "boolean" }, "publishPrefix": { "minLength": 1, "type": "string" }, "queueType": { "minLength": 1, "type": "string" }, "result": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" }, "workSubject": { "minLength": 1, "type": "string" } }, "required": ["queueType", "publishPrefix", "workSubject", "consumerName", "payload", "maxDeliver", "backoffMs", "ackWaitMs", "progress", "logs", "dlq", "concurrency"], "type": "object" } }, "type": "object" } }, "required": ["namespace", "queues"], "type": "object" }, "kv": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "bucket": { "minLength": 1, "type": "string" }, "history": { "minimum": 1, "type": "integer" }, "maxValueBytes": { "minimum": 1, "type": "integer" }, "ttlMs": { "minimum": 0, "type": "integer" } }, "required": ["bucket", "history", "ttlMs"], "type": "object" } }, "type": "object" }, "streams": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "discard": { "minLength": 1, "type": "string" }, "maxAgeMs": { "minimum": 0, "type": "integer" }, "maxBytes": { "type": "integer" }, "maxMsgs": { "type": "integer" }, "name": { "minLength": 1, "type": "string" }, "numReplicas": { "minimum": 1, "type": "integer" }, "retention": { "minLength": 1, "type": "string" }, "sources": { "items": { "additionalProperties": false, "properties": { "filterSubject": { "minLength": 1, "type": "string" }, "fromAlias": { "minLength": 1, "type": "string" }, "streamName": { "minLength": 1, "type": "string" }, "subjectTransformDest": { "minLength": 1, "type": "string" } }, "required": ["fromAlias", "streamName"], "type": "object" }, "type": "array" }, "storage": { "minLength": 1, "type": "string" }, "subjects": { "items": { "minLength": 1, "type": "string" }, "minItems": 1, "type": "array" } }, "required": ["name", "subjects"], "type": "object" } }, "type": "object" } }, "type": "object" }, "sessionKey": { "type": "string" }, "success": { "type": "boolean" } }, "required": ["success", "sessionKey", "contractId", "contractDigest", "resourceBindings"], "type": "object" }, "AuthKickConnectionRequest": { "additionalProperties": false, "properties": { "userNkey": { "type": "string" } }, "required": ["userNkey"], "type": "object" }, "AuthKickConnectionResponse": { "additionalProperties": false, "properties": { "success": { "type": "boolean" } }, "required": ["success"], "type": "object" }, "AuthListApprovalsRequest": { "additionalProperties": false, "properties": { "digest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "user": { "minLength": 1, "type": "string" } }, "type": "object" }, "AuthListApprovalsResponse": { "additionalProperties": false, "properties": { "approvals": { "items": { "additionalProperties": false, "properties": { "answer": { "anyOf": [{ "const": "approved", "type": "string" }, { "const": "denied", "type": "string" }] }, "answeredAt": { "format": "date-time", "type": "string" }, "approval": { "additionalProperties": false, "properties": { "capabilities": { "items": { "type": "string" }, "type": "array" }, "contractDigest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "description": { "minLength": 1, "type": "string" }, "displayName": { "minLength": 1, "type": "string" } }, "required": ["contractDigest", "contractId", "displayName", "description", "capabilities"], "type": "object" }, "updatedAt": { "format": "date-time", "type": "string" }, "user": { "minLength": 1, "type": "string" } }, "required": ["user", "answer", "answeredAt", "updatedAt", "approval"], "type": "object" }, "type": "array" } }, "required": ["approvals"], "type": "object" }, "AuthListConnectionsRequest": { "additionalProperties": false, "properties": { "sessionKey": { "type": "string" }, "user": { "type": "string" } }, "type": "object" }, "AuthListConnectionsResponse": { "additionalProperties": false, "properties": { "connections": { "items": { "additionalProperties": false, "properties": { "clientId": { "type": "number" }, "connectedAt": { "type": "string" }, "key": { "type": "string" }, "serverId": { "type": "string" } }, "required": ["key", "serverId", "clientId", "connectedAt"], "type": "object" }, "type": "array" } }, "required": ["connections"], "type": "object" }, "AuthListInstalledContractsRequest": { "additionalProperties": false, "properties": { "sessionKey": { "type": "string" } }, "type": "object" }, "AuthListInstalledContractsResponse": { "additionalProperties": false, "properties": { "contracts": { "items": { "additionalProperties": false, "properties": { "analysisSummary": { "additionalProperties": false, "properties": { "events": { "type": "number" }, "jobsQueues": { "type": "number" }, "kvResources": { "type": "number" }, "namespaces": { "items": { "type": "string" }, "type": "array" }, "natsPublish": { "type": "number" }, "natsSubscribe": { "type": "number" }, "rpcMethods": { "type": "number" }, "streamResources": { "type": "number" } }, "required": ["namespaces", "rpcMethods", "events", "natsPublish", "natsSubscribe", "kvResources", "jobsQueues", "streamResources"], "type": "object" }, "description": { "minLength": 1, "type": "string" }, "digest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "displayName": { "minLength": 1, "type": "string" }, "id": { "minLength": 1, "type": "string" }, "installedAt": { "format": "date-time", "type": "string" }, "resourceBindings": { "properties": { "jobs": { "additionalProperties": false, "properties": { "namespace": { "minLength": 1, "type": "string" }, "queues": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "ackWaitMs": { "minimum": 1, "type": "integer" }, "backoffMs": { "items": { "minimum": 0, "type": "integer" }, "type": "array" }, "concurrency": { "minimum": 1, "type": "integer" }, "consumerName": { "minLength": 1, "type": "string" }, "defaultDeadlineMs": { "minimum": 1, "type": "integer" }, "dlq": { "type": "boolean" }, "logs": { "type": "boolean" }, "maxDeliver": { "minimum": 1, "type": "integer" }, "payload": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" }, "progress": { "type": "boolean" }, "publishPrefix": { "minLength": 1, "type": "string" }, "queueType": { "minLength": 1, "type": "string" }, "result": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" }, "workSubject": { "minLength": 1, "type": "string" } }, "required": ["queueType", "publishPrefix", "workSubject", "consumerName", "payload", "maxDeliver", "backoffMs", "ackWaitMs", "progress", "logs", "dlq", "concurrency"], "type": "object" } }, "type": "object" } }, "required": ["namespace", "queues"], "type": "object" }, "kv": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "bucket": { "minLength": 1, "type": "string" }, "history": { "minimum": 1, "type": "integer" }, "maxValueBytes": { "minimum": 1, "type": "integer" }, "ttlMs": { "minimum": 0, "type": "integer" } }, "required": ["bucket", "history", "ttlMs"], "type": "object" } }, "type": "object" }, "streams": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "discard": { "minLength": 1, "type": "string" }, "maxAgeMs": { "minimum": 0, "type": "integer" }, "maxBytes": { "type": "integer" }, "maxMsgs": { "type": "integer" }, "name": { "minLength": 1, "type": "string" }, "numReplicas": { "minimum": 1, "type": "integer" }, "retention": { "minLength": 1, "type": "string" }, "sources": { "items": { "additionalProperties": false, "properties": { "filterSubject": { "minLength": 1, "type": "string" }, "fromAlias": { "minLength": 1, "type": "string" }, "streamName": { "minLength": 1, "type": "string" }, "subjectTransformDest": { "minLength": 1, "type": "string" } }, "required": ["fromAlias", "streamName"], "type": "object" }, "type": "array" }, "storage": { "minLength": 1, "type": "string" }, "subjects": { "items": { "minLength": 1, "type": "string" }, "minItems": 1, "type": "array" } }, "required": ["name", "subjects"], "type": "object" } }, "type": "object" } }, "type": "object" }, "sessionKey": { "type": "string" } }, "required": ["digest", "id", "displayName", "description", "installedAt"], "type": "object" }, "type": "array" } }, "required": ["contracts"], "type": "object" }, "AuthListLoginPortalSelectionsRequest": { "additionalProperties": false, "properties": {}, "type": "object" }, "AuthListLoginPortalSelectionsResponse": { "additionalProperties": false, "properties": { "selections": { "items": { "additionalProperties": false, "properties": { "contractId": { "minLength": 1, "type": "string" }, "portalId": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] } }, "required": ["contractId", "portalId"], "type": "object" }, "type": "array" } }, "required": ["selections"], "type": "object" }, "AuthListPortalsRequest": { "additionalProperties": false, "properties": {}, "type": "object" }, "AuthListPortalsResponse": { "additionalProperties": false, "properties": { "portals": { "items": { "additionalProperties": false, "properties": { "appContractId": { "minLength": 1, "type": "string" }, "disabled": { "type": "boolean" }, "entryUrl": { "minLength": 1, "type": "string" }, "portalId": { "minLength": 1, "type": "string" } }, "required": ["portalId", "entryUrl", "disabled"], "type": "object" }, "type": "array" } }, "required": ["portals"], "type": "object" }, "AuthListServicesRequest": { "additionalProperties": false, "properties": {}, "type": "object" }, "AuthListServicesResponse": { "additionalProperties": false, "properties": { "services": { "items": { "additionalProperties": false, "properties": { "active": { "type": "boolean" }, "capabilities": { "items": { "type": "string" }, "type": "array" }, "contractDigest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "contractId": { "type": "string" }, "createdAt": { "format": "date-time", "type": "string" }, "description": { "type": "string" }, "displayName": { "type": "string" }, "namespaces": { "items": { "type": "string" }, "type": "array" }, "resourceBindings": { "properties": { "jobs": { "additionalProperties": false, "properties": { "namespace": { "minLength": 1, "type": "string" }, "queues": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "ackWaitMs": { "minimum": 1, "type": "integer" }, "backoffMs": { "items": { "minimum": 0, "type": "integer" }, "type": "array" }, "concurrency": { "minimum": 1, "type": "integer" }, "consumerName": { "minLength": 1, "type": "string" }, "defaultDeadlineMs": { "minimum": 1, "type": "integer" }, "dlq": { "type": "boolean" }, "logs": { "type": "boolean" }, "maxDeliver": { "minimum": 1, "type": "integer" }, "payload": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" }, "progress": { "type": "boolean" }, "publishPrefix": { "minLength": 1, "type": "string" }, "queueType": { "minLength": 1, "type": "string" }, "result": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" }, "workSubject": { "minLength": 1, "type": "string" } }, "required": ["queueType", "publishPrefix", "workSubject", "consumerName", "payload", "maxDeliver", "backoffMs", "ackWaitMs", "progress", "logs", "dlq", "concurrency"], "type": "object" } }, "type": "object" } }, "required": ["namespace", "queues"], "type": "object" }, "kv": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "bucket": { "minLength": 1, "type": "string" }, "history": { "minimum": 1, "type": "integer" }, "maxValueBytes": { "minimum": 1, "type": "integer" }, "ttlMs": { "minimum": 0, "type": "integer" } }, "required": ["bucket", "history", "ttlMs"], "type": "object" } }, "type": "object" }, "streams": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "discard": { "minLength": 1, "type": "string" }, "maxAgeMs": { "minimum": 0, "type": "integer" }, "maxBytes": { "type": "integer" }, "maxMsgs": { "type": "integer" }, "name": { "minLength": 1, "type": "string" }, "numReplicas": { "minimum": 1, "type": "integer" }, "retention": { "minLength": 1, "type": "string" }, "sources": { "items": { "additionalProperties": false, "properties": { "filterSubject": { "minLength": 1, "type": "string" }, "fromAlias": { "minLength": 1, "type": "string" }, "streamName": { "minLength": 1, "type": "string" }, "subjectTransformDest": { "minLength": 1, "type": "string" } }, "required": ["fromAlias", "streamName"], "type": "object" }, "type": "array" }, "storage": { "minLength": 1, "type": "string" }, "subjects": { "items": { "minLength": 1, "type": "string" }, "minItems": 1, "type": "array" } }, "required": ["name", "subjects"], "type": "object" } }, "type": "object" } }, "type": "object" }, "sessionKey": { "type": "string" } }, "required": ["sessionKey", "displayName", "active", "capabilities", "namespaces", "description", "createdAt"], "type": "object" }, "type": "array" } }, "required": ["services"], "type": "object" }, "AuthListSessionsRequest": { "additionalProperties": false, "properties": { "user": { "type": "string" } }, "type": "object" }, "AuthListSessionsResponse": { "additionalProperties": false, "properties": { "sessions": { "items": { "additionalProperties": false, "properties": { "createdAt": { "type": "string" }, "key": { "type": "string" }, "lastAuth": { "type": "string" }, "type": { "anyOf": [{ "const": "user", "type": "string" }, { "const": "service", "type": "string" }, { "const": "workload", "type": "string" }] } }, "required": ["key", "type", "createdAt", "lastAuth"], "type": "object" }, "type": "array" } }, "required": ["sessions"], "type": "object" }, "AuthListUsersRequest": { "additionalProperties": false, "properties": {}, "type": "object" }, "AuthListUsersResponse": { "additionalProperties": false, "properties": { "users": { "items": { "additionalProperties": false, "properties": { "active": { "type": "boolean" }, "capabilities": { "items": { "type": "string" }, "type": "array" }, "email": { "type": "string" }, "id": { "type": "string" }, "name": { "type": "string" }, "origin": { "type": "string" } }, "required": ["origin", "id", "active", "capabilities"], "type": "object" }, "type": "array" } }, "required": ["users"], "type": "object" }, "AuthListWorkloadActivationReviewsRequest": { "additionalProperties": false, "properties": { "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "approved", "type": "string" }, { "const": "rejected", "type": "string" }] } }, "type": "object" }, "AuthListWorkloadActivationReviewsResponse": { "additionalProperties": false, "properties": { "reviews": { "items": { "additionalProperties": false, "properties": { "decidedAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "publicIdentityKey": { "minLength": 1, "type": "string" }, "reason": { "minLength": 1, "type": "string" }, "requestedAt": { "format": "date-time", "type": "string" }, "reviewId": { "minLength": 1, "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "approved", "type": "string" }, { "const": "rejected", "type": "string" }] } }, "required": ["reviewId", "instanceId", "publicIdentityKey", "profileId", "state", "requestedAt", "decidedAt"], "type": "object" }, "type": "array" } }, "required": ["reviews"], "type": "object" }, "AuthListWorkloadActivationsRequest": { "additionalProperties": false, "properties": { "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "state": { "anyOf": [{ "const": "activated", "type": "string" }, { "const": "revoked", "type": "string" }] } }, "type": "object" }, "AuthListWorkloadActivationsResponse": { "additionalProperties": false, "properties": { "activations": { "items": { "additionalProperties": false, "properties": { "activatedAt": { "format": "date-time", "type": "string" }, "activatedBy": { "additionalProperties": false, "properties": { "id": { "minLength": 1, "type": "string" }, "origin": { "minLength": 1, "type": "string" } }, "required": ["origin", "id"], "type": "object" }, "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "publicIdentityKey": { "minLength": 1, "type": "string" }, "revokedAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "state": { "anyOf": [{ "const": "activated", "type": "string" }, { "const": "revoked", "type": "string" }] } }, "required": ["instanceId", "publicIdentityKey", "profileId", "state", "activatedAt", "revokedAt"], "type": "object" }, "type": "array" } }, "required": ["activations"], "type": "object" }, "AuthListWorkloadInstancesRequest": { "additionalProperties": false, "properties": { "profileId": { "minLength": 1, "type": "string" }, "state": { "anyOf": [{ "const": "registered", "type": "string" }, { "const": "activated", "type": "string" }, { "const": "revoked", "type": "string" }, { "const": "disabled", "type": "string" }] } }, "type": "object" }, "AuthListWorkloadInstancesResponse": { "additionalProperties": false, "properties": { "instances": { "items": { "additionalProperties": false, "properties": { "activatedAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "publicIdentityKey": { "minLength": 1, "type": "string" }, "revokedAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "state": { "anyOf": [{ "const": "registered", "type": "string" }, { "const": "activated", "type": "string" }, { "const": "revoked", "type": "string" }, { "const": "disabled", "type": "string" }] } }, "required": ["instanceId", "publicIdentityKey", "profileId", "state", "createdAt", "activatedAt", "revokedAt"], "type": "object" }, "type": "array" } }, "required": ["instances"], "type": "object" }, "AuthListWorkloadPortalSelectionsRequest": { "additionalProperties": false, "properties": {}, "type": "object" }, "AuthListWorkloadPortalSelectionsResponse": { "additionalProperties": false, "properties": { "selections": { "items": { "additionalProperties": false, "properties": { "portalId": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] }, "profileId": { "minLength": 1, "type": "string" } }, "required": ["profileId", "portalId"], "type": "object" }, "type": "array" } }, "required": ["selections"], "type": "object" }, "AuthListWorkloadProfilesRequest": { "additionalProperties": false, "properties": { "contractId": { "minLength": 1, "type": "string" }, "disabled": { "type": "boolean" } }, "type": "object" }, "AuthListWorkloadProfilesResponse": { "additionalProperties": false, "properties": { "profiles": { "items": { "additionalProperties": false, "properties": { "allowedDigests": { "items": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "type": "array" }, "contractId": { "minLength": 1, "type": "string" }, "disabled": { "type": "boolean" }, "profileId": { "minLength": 1, "type": "string" }, "reviewMode": { "anyOf": [{ "const": "none", "type": "string" }, { "const": "required", "type": "string" }] } }, "required": ["profileId", "contractId", "allowedDigests", "disabled"], "type": "object" }, "type": "array" } }, "required": ["profiles"], "type": "object" }, "AuthLogoutRequest": { "additionalProperties": false, "properties": {}, "type": "object" }, "AuthLogoutResponse": { "additionalProperties": false, "properties": { "success": { "type": "boolean" } }, "required": ["success"], "type": "object" }, "AuthMeRequest": { "additionalProperties": false, "properties": {}, "type": "object" }, "AuthMeResponse": { "additionalProperties": false, "properties": { "service": { "anyOf": [{ "additionalProperties": false, "properties": { "active": { "type": "boolean" }, "capabilities": { "items": { "type": "string" }, "type": "array" }, "id": { "type": "string" }, "name": { "type": "string" }, "type": { "const": "service", "type": "string" } }, "required": ["type", "id", "name", "active", "capabilities"], "type": "object" }, { "type": "null" }] }, "user": { "anyOf": [{ "additionalProperties": false, "properties": { "active": { "type": "boolean" }, "capabilities": { "items": { "type": "string" }, "type": "array" }, "email": { "type": "string" }, "id": { "type": "string" }, "image": { "type": "string" }, "lastLogin": { "format": "date-time", "type": "string" }, "name": { "type": "string" }, "origin": { "type": "string" } }, "required": ["id", "origin", "active", "name", "email", "capabilities"], "type": "object" }, { "type": "null" }] }, "workload": { "anyOf": [{ "additionalProperties": false, "properties": { "active": { "type": "boolean" }, "capabilities": { "items": { "type": "string" }, "type": "array" }, "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "publicIdentityKey": { "minLength": 1, "type": "string" }, "type": { "const": "workload", "type": "string" } }, "required": ["type", "instanceId", "publicIdentityKey", "profileId", "active", "capabilities"], "type": "object" }, { "type": "null" }] } }, "required": ["user", "workload", "service"], "type": "object" }, "AuthProvisionWorkloadInstanceRequest": { "additionalProperties": false, "properties": { "activationKey": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "publicIdentityKey": { "minLength": 1, "type": "string" } }, "required": ["profileId", "publicIdentityKey", "activationKey"], "type": "object" }, "AuthProvisionWorkloadInstanceResponse": { "additionalProperties": false, "properties": { "instance": { "additionalProperties": false, "properties": { "activatedAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "publicIdentityKey": { "minLength": 1, "type": "string" }, "revokedAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "state": { "anyOf": [{ "const": "registered", "type": "string" }, { "const": "activated", "type": "string" }, { "const": "revoked", "type": "string" }, { "const": "disabled", "type": "string" }] } }, "required": ["instanceId", "publicIdentityKey", "profileId", "state", "createdAt", "activatedAt", "revokedAt"], "type": "object" } }, "required": ["instance"], "type": "object" }, "AuthRenewBindingTokenRequest": { "additionalProperties": false, "properties": {}, "type": "object" }, "AuthRenewBindingTokenResponse": { "additionalProperties": false, "properties": { "bindingToken": { "type": "string" }, "expires": { "type": "string" }, "inboxPrefix": { "type": "string" }, "natsServers": { "items": { "type": "string" }, "type": "array" }, "sentinel": { "additionalProperties": false, "properties": { "jwt": { "type": "string" }, "seed": { "type": "string" } }, "required": ["jwt", "seed"], "type": "object" }, "status": { "const": "bound", "type": "string" } }, "required": ["status", "bindingToken", "inboxPrefix", "expires", "sentinel", "natsServers"], "type": "object" }, "AuthRevokeApprovalRequest": { "additionalProperties": false, "properties": { "contractDigest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "user": { "minLength": 1, "type": "string" } }, "required": ["contractDigest"], "type": "object" }, "AuthRevokeApprovalResponse": { "additionalProperties": false, "properties": { "success": { "type": "boolean" } }, "required": ["success"], "type": "object" }, "AuthRevokeSessionRequest": { "additionalProperties": false, "properties": { "sessionKey": { "type": "string" } }, "required": ["sessionKey"], "type": "object" }, "AuthRevokeSessionResponse": { "additionalProperties": false, "properties": { "success": { "type": "boolean" } }, "required": ["success"], "type": "object" }, "AuthRevokeWorkloadActivationRequest": { "additionalProperties": false, "properties": { "instanceId": { "minLength": 1, "type": "string" } }, "required": ["instanceId"], "type": "object" }, "AuthRevokeWorkloadActivationResponse": { "additionalProperties": false, "properties": { "success": { "type": "boolean" } }, "required": ["success"], "type": "object" }, "AuthSessionRevokedEvent": { "allOf": [{ "properties": { "header": { "additionalProperties": false, "properties": { "id": { "type": "string" }, "time": { "format": "date-time", "type": "string" } }, "required": ["id", "time"], "type": "object" } }, "required": ["header"], "type": "object" }, { "properties": { "id": { "type": "string" }, "origin": { "type": "string" }, "revokedBy": { "type": "string" }, "sessionKey": { "type": "string" } }, "required": ["origin", "id", "sessionKey", "revokedBy"], "type": "object" }] }, "AuthSetLoginPortalDefaultRequest": { "additionalProperties": false, "properties": { "portalId": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] } }, "required": ["portalId"], "type": "object" }, "AuthSetLoginPortalDefaultResponse": { "additionalProperties": false, "properties": { "defaultPortal": { "additionalProperties": false, "properties": { "portalId": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] } }, "required": ["portalId"], "type": "object" } }, "required": ["defaultPortal"], "type": "object" }, "AuthSetLoginPortalSelectionRequest": { "additionalProperties": false, "properties": { "contractId": { "minLength": 1, "type": "string" }, "portalId": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] } }, "required": ["contractId", "portalId"], "type": "object" }, "AuthSetLoginPortalSelectionResponse": { "additionalProperties": false, "properties": { "selection": { "additionalProperties": false, "properties": { "contractId": { "minLength": 1, "type": "string" }, "portalId": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] } }, "required": ["contractId", "portalId"], "type": "object" } }, "required": ["selection"], "type": "object" }, "AuthSetWorkloadPortalDefaultRequest": { "additionalProperties": false, "properties": { "portalId": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] } }, "required": ["portalId"], "type": "object" }, "AuthSetWorkloadPortalDefaultResponse": { "additionalProperties": false, "properties": { "defaultPortal": { "additionalProperties": false, "properties": { "portalId": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] } }, "required": ["portalId"], "type": "object" } }, "required": ["defaultPortal"], "type": "object" }, "AuthSetWorkloadPortalSelectionRequest": { "additionalProperties": false, "properties": { "portalId": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] }, "profileId": { "minLength": 1, "type": "string" } }, "required": ["profileId", "portalId"], "type": "object" }, "AuthSetWorkloadPortalSelectionResponse": { "additionalProperties": false, "properties": { "selection": { "additionalProperties": false, "properties": { "portalId": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] }, "profileId": { "minLength": 1, "type": "string" } }, "required": ["profileId", "portalId"], "type": "object" } }, "required": ["selection"], "type": "object" }, "AuthUpdateUserRequest": { "additionalProperties": false, "properties": { "active": { "type": "boolean" }, "capabilities": { "items": { "type": "string" }, "type": "array" }, "id": { "type": "string" }, "origin": { "type": "string" } }, "required": ["origin", "id"], "type": "object" }, "AuthUpdateUserResponse": { "additionalProperties": false, "properties": { "success": { "type": "boolean" } }, "required": ["success"], "type": "object" }, "AuthUpgradeServiceContractRequest": { "additionalProperties": false, "properties": { "contract": { "type": "object" }, "sessionKey": { "type": "string" } }, "required": ["sessionKey", "contract"], "type": "object" }, "AuthUpgradeServiceContractResponse": { "additionalProperties": false, "properties": { "contractDigest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "resourceBindings": { "properties": { "jobs": { "additionalProperties": false, "properties": { "namespace": { "minLength": 1, "type": "string" }, "queues": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "ackWaitMs": { "minimum": 1, "type": "integer" }, "backoffMs": { "items": { "minimum": 0, "type": "integer" }, "type": "array" }, "concurrency": { "minimum": 1, "type": "integer" }, "consumerName": { "minLength": 1, "type": "string" }, "defaultDeadlineMs": { "minimum": 1, "type": "integer" }, "dlq": { "type": "boolean" }, "logs": { "type": "boolean" }, "maxDeliver": { "minimum": 1, "type": "integer" }, "payload": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" }, "progress": { "type": "boolean" }, "publishPrefix": { "minLength": 1, "type": "string" }, "queueType": { "minLength": 1, "type": "string" }, "result": { "additionalProperties": false, "properties": { "schema": { "minLength": 1, "type": "string" } }, "required": ["schema"], "type": "object" }, "workSubject": { "minLength": 1, "type": "string" } }, "required": ["queueType", "publishPrefix", "workSubject", "consumerName", "payload", "maxDeliver", "backoffMs", "ackWaitMs", "progress", "logs", "dlq", "concurrency"], "type": "object" } }, "type": "object" } }, "required": ["namespace", "queues"], "type": "object" }, "kv": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "bucket": { "minLength": 1, "type": "string" }, "history": { "minimum": 1, "type": "integer" }, "maxValueBytes": { "minimum": 1, "type": "integer" }, "ttlMs": { "minimum": 0, "type": "integer" } }, "required": ["bucket", "history", "ttlMs"], "type": "object" } }, "type": "object" }, "streams": { "patternProperties": { "^.*$": { "additionalProperties": false, "properties": { "discard": { "minLength": 1, "type": "string" }, "maxAgeMs": { "minimum": 0, "type": "integer" }, "maxBytes": { "type": "integer" }, "maxMsgs": { "type": "integer" }, "name": { "minLength": 1, "type": "string" }, "numReplicas": { "minimum": 1, "type": "integer" }, "retention": { "minLength": 1, "type": "string" }, "sources": { "items": { "additionalProperties": false, "properties": { "filterSubject": { "minLength": 1, "type": "string" }, "fromAlias": { "minLength": 1, "type": "string" }, "streamName": { "minLength": 1, "type": "string" }, "subjectTransformDest": { "minLength": 1, "type": "string" } }, "required": ["fromAlias", "streamName"], "type": "object" }, "type": "array" }, "storage": { "minLength": 1, "type": "string" }, "subjects": { "items": { "minLength": 1, "type": "string" }, "minItems": 1, "type": "array" } }, "required": ["name", "subjects"], "type": "object" } }, "type": "object" } }, "type": "object" }, "sessionKey": { "type": "string" }, "success": { "type": "boolean" } }, "required": ["success", "sessionKey", "contractId", "contractDigest", "resourceBindings"], "type": "object" }, "AuthValidateRequestRequest": { "additionalProperties": false, "properties": { "capabilities": { "items": { "type": "string" }, "type": "array" }, "payloadHash": { "type": "string" }, "proof": { "type": "string" }, "sessionKey": { "type": "string" }, "subject": { "type": "string" } }, "required": ["sessionKey", "proof", "subject", "payloadHash"], "type": "object" }, "AuthValidateRequestResponse": { "additionalProperties": false, "properties": { "allowed": { "type": "boolean" }, "caller": { "anyOf": [{ "additionalProperties": false, "properties": { "active": { "type": "boolean" }, "capabilities": { "items": { "type": "string" }, "type": "array" }, "email": { "type": "string" }, "id": { "type": "string" }, "image": { "type": "string" }, "name": { "type": "string" }, "origin": { "type": "string" }, "type": { "const": "user", "type": "string" } }, "required": ["type", "id", "origin", "active", "name", "email", "capabilities"], "type": "object" }, { "additionalProperties": false, "properties": { "active": { "type": "boolean" }, "capabilities": { "items": { "type": "string" }, "type": "array" }, "id": { "type": "string" }, "name": { "type": "string" }, "type": { "const": "service", "type": "string" } }, "required": ["type", "id", "name", "active", "capabilities"], "type": "object" }, { "additionalProperties": false, "properties": { "active": { "type": "boolean" }, "capabilities": { "items": { "type": "string" }, "type": "array" }, "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "publicIdentityKey": { "minLength": 1, "type": "string" }, "type": { "const": "workload", "type": "string" } }, "required": ["type", "instanceId", "publicIdentityKey", "profileId", "active", "capabilities"], "type": "object" }] }, "inboxPrefix": { "type": "string" } }, "required": ["allowed", "inboxPrefix", "caller"], "type": "object" }, "AuthWorkloadActivationReviewRequestedEvent": { "additionalProperties": false, "properties": { "handoffId": { "minLength": 1, "type": "string" }, "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "publicIdentityKey": { "minLength": 1, "type": "string" }, "requestedAt": { "format": "date-time", "type": "string" }, "requestedBy": { "additionalProperties": false, "properties": { "id": { "minLength": 1, "type": "string" }, "origin": { "minLength": 1, "type": "string" } }, "required": ["origin", "id"], "type": "object" }, "reviewId": { "minLength": 1, "type": "string" } }, "required": ["reviewId", "handoffId", "instanceId", "publicIdentityKey", "profileId", "requestedAt", "requestedBy"], "type": "object" }, "HealthRequest": { "additionalProperties": false, "properties": {}, "type": "object" }, "HealthResponse": { "additionalProperties": false, "properties": { "checks": { "items": { "additionalProperties": false, "properties": { "error": { "type": "string" }, "latencyMs": { "type": "number" }, "name": { "type": "string" }, "status": { "anyOf": [{ "const": "ok", "type": "string" }, { "const": "failed", "type": "string" }] } }, "required": ["name", "status", "latencyMs"], "type": "object" }, "type": "array" }, "service": { "type": "string" }, "status": { "anyOf": [{ "const": "healthy", "type": "string" }, { "const": "unhealthy", "type": "string" }, { "const": "degraded", "type": "string" }] }, "timestamp": { "format": "date-time", "type": "string" } }, "required": ["status", "service", "timestamp", "checks"], "type": "object" }, "LoginPortalDefault": { "additionalProperties": false, "properties": { "portalId": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] } }, "required": ["portalId"], "type": "object" }, "LoginPortalSelection": { "additionalProperties": false, "properties": { "contractId": { "minLength": 1, "type": "string" }, "portalId": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] } }, "required": ["contractId", "portalId"], "type": "object" }, "Portal": { "additionalProperties": false, "properties": { "appContractId": { "minLength": 1, "type": "string" }, "disabled": { "type": "boolean" }, "entryUrl": { "minLength": 1, "type": "string" }, "portalId": { "minLength": 1, "type": "string" } }, "required": ["portalId", "entryUrl", "disabled"], "type": "object" }, "PortalFlowState": { "anyOf": [{ "additionalProperties": false, "properties": { "app": { "additionalProperties": false, "properties": { "context": { "type": "object" }, "contractDigest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "description": { "minLength": 1, "type": "string" }, "displayName": { "minLength": 1, "type": "string" } }, "required": ["contractId", "contractDigest", "displayName", "description"], "type": "object" }, "flowId": { "minLength": 1, "type": "string" }, "providers": { "items": { "additionalProperties": false, "properties": { "displayName": { "minLength": 1, "type": "string" }, "id": { "minLength": 1, "type": "string" } }, "required": ["id", "displayName"], "type": "object" }, "type": "array" }, "status": { "const": "choose_provider", "type": "string" } }, "required": ["status", "flowId", "providers", "app"], "type": "object" }, { "additionalProperties": false, "properties": { "approval": { "additionalProperties": false, "properties": { "capabilities": { "items": { "type": "string" }, "type": "array" }, "contractDigest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "description": { "minLength": 1, "type": "string" }, "displayName": { "minLength": 1, "type": "string" } }, "required": ["contractDigest", "contractId", "displayName", "description", "capabilities"], "type": "object" }, "flowId": { "minLength": 1, "type": "string" }, "status": { "const": "approval_required", "type": "string" }, "user": { "additionalProperties": false, "properties": { "email": { "minLength": 1, "type": "string" }, "id": { "minLength": 1, "type": "string" }, "image": { "minLength": 1, "type": "string" }, "name": { "minLength": 1, "type": "string" }, "origin": { "minLength": 1, "type": "string" } }, "required": ["origin", "id"], "type": "object" } }, "required": ["status", "flowId", "user", "approval"], "type": "object" }, { "additionalProperties": false, "properties": { "approval": { "additionalProperties": false, "properties": { "capabilities": { "items": { "type": "string" }, "type": "array" }, "contractDigest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "description": { "minLength": 1, "type": "string" }, "displayName": { "minLength": 1, "type": "string" } }, "required": ["contractDigest", "contractId", "displayName", "description", "capabilities"], "type": "object" }, "flowId": { "minLength": 1, "type": "string" }, "returnLocation": { "minLength": 1, "type": "string" }, "status": { "const": "approval_denied", "type": "string" } }, "required": ["status", "flowId", "approval"], "type": "object" }, { "additionalProperties": false, "properties": { "approval": { "additionalProperties": false, "properties": { "capabilities": { "items": { "type": "string" }, "type": "array" }, "contractDigest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "description": { "minLength": 1, "type": "string" }, "displayName": { "minLength": 1, "type": "string" } }, "required": ["contractDigest", "contractId", "displayName", "description", "capabilities"], "type": "object" }, "flowId": { "minLength": 1, "type": "string" }, "missingCapabilities": { "items": { "type": "string" }, "type": "array" }, "returnLocation": { "minLength": 1, "type": "string" }, "status": { "const": "insufficient_capabilities", "type": "string" }, "user": { "additionalProperties": false, "properties": { "id": { "minLength": 1, "type": "string" }, "name": { "minLength": 1, "type": "string" }, "origin": { "minLength": 1, "type": "string" } }, "required": ["origin", "id"], "type": "object" }, "userCapabilities": { "items": { "type": "string" }, "type": "array" } }, "required": ["status", "flowId", "approval", "missingCapabilities", "userCapabilities"], "type": "object" }, { "additionalProperties": false, "properties": { "location": { "minLength": 1, "type": "string" }, "status": { "const": "redirect", "type": "string" } }, "required": ["status", "location"], "type": "object" }, { "additionalProperties": false, "properties": { "status": { "const": "expired", "type": "string" } }, "required": ["status"], "type": "object" }] }, "Workload": { "additionalProperties": false, "properties": { "activatedAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "createdAt": { "format": "date-time", "type": "string" }, "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "publicIdentityKey": { "minLength": 1, "type": "string" }, "revokedAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "state": { "anyOf": [{ "const": "registered", "type": "string" }, { "const": "activated", "type": "string" }, { "const": "revoked", "type": "string" }, { "const": "disabled", "type": "string" }] } }, "required": ["instanceId", "publicIdentityKey", "profileId", "state", "createdAt", "activatedAt", "revokedAt"], "type": "object" }, "WorkloadActivationRecord": { "additionalProperties": false, "properties": { "activatedAt": { "format": "date-time", "type": "string" }, "activatedBy": { "additionalProperties": false, "properties": { "id": { "minLength": 1, "type": "string" }, "origin": { "minLength": 1, "type": "string" } }, "required": ["origin", "id"], "type": "object" }, "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "publicIdentityKey": { "minLength": 1, "type": "string" }, "revokedAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "state": { "anyOf": [{ "const": "activated", "type": "string" }, { "const": "revoked", "type": "string" }] } }, "required": ["instanceId", "publicIdentityKey", "profileId", "state", "activatedAt", "revokedAt"], "type": "object" }, "WorkloadActivationReview": { "additionalProperties": false, "properties": { "decidedAt": { "anyOf": [{ "format": "date-time", "type": "string" }, { "type": "null" }] }, "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "publicIdentityKey": { "minLength": 1, "type": "string" }, "reason": { "minLength": 1, "type": "string" }, "requestedAt": { "format": "date-time", "type": "string" }, "reviewId": { "minLength": 1, "type": "string" }, "state": { "anyOf": [{ "const": "pending", "type": "string" }, { "const": "approved", "type": "string" }, { "const": "rejected", "type": "string" }] } }, "required": ["reviewId", "instanceId", "publicIdentityKey", "profileId", "state", "requestedAt", "decidedAt"], "type": "object" }, "WorkloadConnectInfo": { "additionalProperties": false, "properties": { "auth": { "additionalProperties": false, "properties": { "iatSkewSeconds": { "type": "number" }, "mode": { "const": "workload_identity", "type": "string" } }, "required": ["mode", "iatSkewSeconds"], "type": "object" }, "contractDigest": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "contractId": { "minLength": 1, "type": "string" }, "instanceId": { "minLength": 1, "type": "string" }, "profileId": { "minLength": 1, "type": "string" }, "transport": { "additionalProperties": false, "properties": { "natsServers": { "items": { "minLength": 1, "type": "string" }, "type": "array" }, "sentinel": { "additionalProperties": false, "properties": { "jwt": { "minLength": 1, "type": "string" }, "seed": { "minLength": 1, "type": "string" } }, "required": ["jwt", "seed"], "type": "object" } }, "required": ["natsServers", "sentinel"], "type": "object" } }, "required": ["instanceId", "profileId", "contractId", "contractDigest", "transport", "auth"], "type": "object" }, "WorkloadPortalDefault": { "additionalProperties": false, "properties": { "portalId": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] } }, "required": ["portalId"], "type": "object" }, "WorkloadPortalSelection": { "additionalProperties": false, "properties": { "portalId": { "anyOf": [{ "minLength": 1, "type": "string" }, { "type": "null" }] }, "profileId": { "minLength": 1, "type": "string" } }, "required": ["profileId", "portalId"], "type": "object" }, "WorkloadProfile": { "additionalProperties": false, "properties": { "allowedDigests": { "items": { "pattern": "^[A-Za-z0-9_-]+$", "type": "string" }, "type": "array" }, "contractId": { "minLength": 1, "type": "string" }, "disabled": { "type": "boolean" }, "profileId": { "minLength": 1, "type": "string" }, "reviewMode": { "anyOf": [{ "const": "none", "type": "string" }, { "const": "required", "type": "string" }] } }, "required": ["profileId", "contractId", "allowedDigests", "disabled"], "type": "object" } } };
6
+ function assertSelectedKeysExist(kind, keys, api) {
7
+ if (!keys) {
8
+ return;
9
+ }
10
+ for (const key of keys) {
11
+ if (!Object.hasOwn(api, key)) {
12
+ throw new Error(`Contract '${CONTRACT_ID}' does not expose ${kind} key '${key}'`);
13
+ }
14
+ }
15
+ }
16
+ function assertValidUseSpec(spec) {
17
+ assertSelectedKeysExist("rpc", spec.rpc?.call, API.owned.rpc);
18
+ assertSelectedKeysExist("operations", spec.operations?.call, API.owned.operations);
19
+ assertSelectedKeysExist("events", spec.events?.publish, API.owned.events);
20
+ assertSelectedKeysExist("events", spec.events?.subscribe, API.owned.events);
21
+ assertSelectedKeysExist("subjects", spec.subjects?.publish, API.owned.subjects);
22
+ assertSelectedKeysExist("subjects", spec.subjects?.subscribe, API.owned.subjects);
23
+ }
24
+ const DEFAULT_AUTH_RPC_CALL = [
25
+ "Auth.Me",
26
+ "Auth.Logout",
27
+ "Auth.RenewBindingToken",
28
+ ];
29
+ function mergeAuthUseDefaults(spec) {
30
+ const rpcCall = [...DEFAULT_AUTH_RPC_CALL];
31
+ for (const key of spec?.rpc?.call ?? []) {
32
+ if (!rpcCall.includes(key)) {
33
+ rpcCall.push(key);
34
+ }
35
+ }
36
+ return {
37
+ ...spec,
38
+ rpc: {
39
+ ...spec?.rpc,
40
+ call: rpcCall,
41
+ },
42
+ };
43
+ }
44
+ export const auth = {
45
+ CONTRACT_ID,
46
+ CONTRACT_DIGEST,
47
+ CONTRACT,
48
+ API,
49
+ use: ((spec) => {
50
+ assertValidUseSpec(spec);
51
+ const dependencyUse = {
52
+ contract: CONTRACT_ID,
53
+ ...(spec.rpc?.call ? { rpc: { call: [...spec.rpc.call] } } : {}),
54
+ ...(spec.operations?.call ? { operations: { call: [...spec.operations.call] } } : {}),
55
+ ...((spec.events?.publish || spec.events?.subscribe)
56
+ ? {
57
+ events: {
58
+ ...(spec.events.publish ? { publish: [...spec.events.publish] } : {}),
59
+ ...(spec.events.subscribe ? { subscribe: [...spec.events.subscribe] } : {}),
60
+ },
61
+ }
62
+ : {}),
63
+ ...((spec.subjects?.publish || spec.subjects?.subscribe)
64
+ ? {
65
+ subjects: {
66
+ ...(spec.subjects.publish ? { publish: [...spec.subjects.publish] } : {}),
67
+ ...(spec.subjects.subscribe ? { subscribe: [...spec.subjects.subscribe] } : {}),
68
+ },
69
+ }
70
+ : {}),
71
+ };
72
+ Object.defineProperty(dependencyUse, CONTRACT_MODULE_METADATA, {
73
+ value: auth,
74
+ enumerable: false,
75
+ });
76
+ return dependencyUse;
77
+ }),
78
+ useDefaults: ((spec) => {
79
+ return auth.use(mergeAuthUseDefaults(spec));
80
+ }),
81
+ };
82
+ export const use = auth.use;
83
+ export const useDefaults = auth.useDefaults;
@@ -0,0 +1,7 @@
1
+ import "./_dnt.polyfills.js";
2
+ export { API, OWNED_API } from "./api.js";
3
+ export type { Api, ApiViews, OwnedApi } from "./api.js";
4
+ export * from "./types.js";
5
+ export { SCHEMAS } from "./schemas.js";
6
+ export { CONTRACT, CONTRACT_DIGEST, CONTRACT_ID, use, useDefaults, auth } from "./contract.js";
7
+ //# sourceMappingURL=mod.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../src/mod.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,YAAY,EAAE,GAAG,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACxD,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,WAAW,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,5 @@
1
+ import "./_dnt.polyfills.js";
2
+ export { API, OWNED_API } from "./api.js";
3
+ export * from "./types.js";
4
+ export { SCHEMAS } from "./schemas.js";
5
+ export { CONTRACT, CONTRACT_DIGEST, CONTRACT_ID, use, useDefaults, auth } from "./contract.js";
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }