@astrale-domains/shell 0.1.0-beta.4 → 0.1.0-beta.40

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 (513) hide show
  1. package/README.md +143 -64
  2. package/dist/domain.d.ts +99 -0
  3. package/dist/domain.js +77 -0
  4. package/dist/functions/application/index.js +1 -3
  5. package/dist/functions/application/list-entrypoints.js +4 -0
  6. package/dist/functions/group/assign-member-to-group.js +4 -0
  7. package/dist/functions/group/change-group-membership.js +34 -0
  8. package/dist/functions/group/group-membership-errors.js +23 -0
  9. package/dist/functions/group/index.js +2 -3
  10. package/dist/functions/group/unassign-member-from-group.js +4 -0
  11. package/dist/functions/user/index.js +1 -3
  12. package/dist/functions/user/invite-user.js +39 -0
  13. package/dist/index.d.ts +1 -4
  14. package/dist/index.js +1 -4
  15. package/dist/integrations/index.d.ts +1 -0
  16. package/dist/integrations/index.js +1 -0
  17. package/dist/integrations/integrations.d.ts +9 -0
  18. package/dist/integrations/integrations.js +2 -0
  19. package/dist/integrations/user-invitation/index.d.ts +4 -0
  20. package/dist/integrations/user-invitation/index.js +3 -0
  21. package/dist/integrations/user-invitation/invitation-request-failure.d.ts +5 -0
  22. package/dist/integrations/user-invitation/invitation-request-failure.js +9 -0
  23. package/dist/integrations/user-invitation/invite-user-request.d.ts +6 -0
  24. package/dist/integrations/user-invitation/invite-user-request.js +1 -0
  25. package/dist/integrations/user-invitation/request-user-invitation.d.ts +8 -0
  26. package/dist/integrations/user-invitation/request-user-invitation.js +9 -0
  27. package/dist/mutations/group/index.js +1 -2
  28. package/dist/mutations/group/set-group-membership.js +29 -0
  29. package/dist/providers/admin-enrollment/create-admin-enrollment-provider.js +78 -0
  30. package/dist/providers/admin-enrollment/decode-admin-invitation-response.js +20 -0
  31. package/dist/providers/admin-enrollment/index.js +1 -0
  32. package/dist/providers/admin-enrollment/read-enrollment-response.js +34 -0
  33. package/dist/queries/application/index.js +1 -3
  34. package/dist/queries/application/read-installed-entrypoints.js +44 -0
  35. package/dist/queries/group/index.js +2 -3
  36. package/dist/queries/group/read-group-membership-endpoints.js +18 -0
  37. package/dist/queries/group/read-group-membership.js +35 -0
  38. package/dist/runtime.d.ts +462 -0
  39. package/dist/runtime.js +16 -0
  40. package/dist/schema/index.d.ts +5 -7
  41. package/dist/schema/index.js +4 -7
  42. package/dist/schema/modules/application/functions/index.d.ts +1 -0
  43. package/dist/schema/modules/application/functions/index.js +1 -0
  44. package/dist/schema/modules/application/functions/list-entrypoints.d.ts +15 -0
  45. package/dist/schema/modules/application/functions/list-entrypoints.js +16 -0
  46. package/dist/schema/modules/application/index.d.ts +2 -0
  47. package/dist/schema/modules/application/index.js +2 -0
  48. package/dist/schema/modules/application/types/entrypoint-entry.d.ts +8 -0
  49. package/dist/schema/modules/application/types/entrypoint-entry.js +7 -0
  50. package/dist/schema/modules/application/types/index.d.ts +1 -0
  51. package/dist/schema/modules/application/types/index.js +1 -0
  52. package/dist/schema/modules/group/classes/group.d.ts +20 -0
  53. package/dist/schema/modules/group/classes/group.js +8 -0
  54. package/dist/schema/modules/group/classes/index.d.ts +2 -0
  55. package/dist/schema/modules/group/classes/index.js +2 -0
  56. package/dist/schema/modules/group/classes/member-of-group.d.ts +16 -0
  57. package/dist/schema/modules/group/classes/member-of-group.js +11 -0
  58. package/dist/schema/modules/group/core/administrators-group.d.ts +1 -0
  59. package/dist/schema/modules/group/core/administrators-group.js +6 -0
  60. package/dist/schema/modules/group/core/applications-group.d.ts +1 -0
  61. package/dist/schema/modules/group/core/applications-group.js +6 -0
  62. package/dist/schema/modules/group/core/index.d.ts +3 -0
  63. package/dist/schema/modules/group/core/index.js +3 -0
  64. package/dist/schema/modules/group/core/members-group.d.ts +1 -0
  65. package/dist/schema/modules/group/core/members-group.js +6 -0
  66. package/dist/schema/modules/group/functions/assign-member-to-group.js +11 -0
  67. package/dist/schema/modules/group/functions/index.js +2 -0
  68. package/dist/schema/modules/group/functions/unassign-member-from-group.js +11 -0
  69. package/dist/schema/modules/group/index.d.ts +3 -0
  70. package/dist/schema/modules/group/index.js +3 -0
  71. package/dist/schema/modules/group/policies/belongs-to-group.d.ts +1 -0
  72. package/dist/schema/modules/group/policies/belongs-to-group.js +5 -0
  73. package/dist/schema/modules/group/policies/index.d.ts +1 -0
  74. package/dist/schema/modules/group/policies/index.js +1 -0
  75. package/dist/schema/modules/group/types/group-membership-input.js +8 -0
  76. package/dist/schema/modules/group/types/index.js +1 -0
  77. package/dist/schema/modules/user/classes/index.d.ts +1 -0
  78. package/dist/schema/modules/user/classes/index.js +1 -0
  79. package/dist/schema/modules/user/classes/user.d.ts +21 -0
  80. package/dist/schema/modules/user/classes/user.js +12 -0
  81. package/dist/schema/modules/user/functions/index.js +1 -0
  82. package/dist/schema/modules/user/functions/invite-user.js +12 -0
  83. package/dist/schema/modules/user/index.d.ts +2 -0
  84. package/dist/schema/modules/user/index.js +2 -0
  85. package/dist/schema/modules/user/types/index.d.ts +1 -0
  86. package/dist/schema/modules/user/types/index.js +1 -0
  87. package/dist/schema/modules/user/types/invitation-summary.d.ts +16 -0
  88. package/dist/schema/modules/user/types/invitation-summary.js +15 -0
  89. package/dist/schema/policies/administers-shell-class.js +11 -0
  90. package/dist/schema/policies/index.js +3 -0
  91. package/dist/schema/policies/owns-class.js +7 -0
  92. package/dist/schema/policies/uses-function.js +5 -0
  93. package/dist/schema/schema.d.ts +342 -0
  94. package/dist/schema/schema.js +27 -0
  95. package/dist/schema/views/application-view.js +4 -0
  96. package/dist/schema/views/index.js +1 -0
  97. package/dist/utils/canonical-node-path/index.js +1 -0
  98. package/dist/utils/canonical-node-path/parse-canonical-node-path.js +8 -0
  99. package/package.json +51 -30
  100. package/dist/functions/application/index.d.ts +0 -3
  101. package/dist/functions/application/index.d.ts.map +0 -1
  102. package/dist/functions/application/index.js.map +0 -1
  103. package/dist/functions/application/install.d.ts +0 -4
  104. package/dist/functions/application/install.d.ts.map +0 -1
  105. package/dist/functions/application/install.js +0 -11
  106. package/dist/functions/application/install.js.map +0 -1
  107. package/dist/functions/application/uninstall.d.ts +0 -5
  108. package/dist/functions/application/uninstall.d.ts.map +0 -1
  109. package/dist/functions/application/uninstall.js +0 -11
  110. package/dist/functions/application/uninstall.js.map +0 -1
  111. package/dist/functions/execution/index.d.ts +0 -15
  112. package/dist/functions/execution/index.d.ts.map +0 -1
  113. package/dist/functions/execution/index.js +0 -2
  114. package/dist/functions/execution/index.js.map +0 -1
  115. package/dist/functions/group/assign-user.d.ts +0 -5
  116. package/dist/functions/group/assign-user.d.ts.map +0 -1
  117. package/dist/functions/group/assign-user.js +0 -11
  118. package/dist/functions/group/assign-user.js.map +0 -1
  119. package/dist/functions/group/index.d.ts +0 -3
  120. package/dist/functions/group/index.d.ts.map +0 -1
  121. package/dist/functions/group/index.js.map +0 -1
  122. package/dist/functions/group/unassign-user.d.ts +0 -5
  123. package/dist/functions/group/unassign-user.d.ts.map +0 -1
  124. package/dist/functions/group/unassign-user.js +0 -11
  125. package/dist/functions/group/unassign-user.js.map +0 -1
  126. package/dist/functions/index.d.ts +0 -6
  127. package/dist/functions/index.d.ts.map +0 -1
  128. package/dist/functions/index.js +0 -6
  129. package/dist/functions/index.js.map +0 -1
  130. package/dist/functions/space/add-user.d.ts +0 -5
  131. package/dist/functions/space/add-user.d.ts.map +0 -1
  132. package/dist/functions/space/add-user.js +0 -11
  133. package/dist/functions/space/add-user.js.map +0 -1
  134. package/dist/functions/space/index.d.ts +0 -4
  135. package/dist/functions/space/index.d.ts.map +0 -1
  136. package/dist/functions/space/index.js +0 -4
  137. package/dist/functions/space/index.js.map +0 -1
  138. package/dist/functions/space/remove-user.d.ts +0 -5
  139. package/dist/functions/space/remove-user.d.ts.map +0 -1
  140. package/dist/functions/space/remove-user.js +0 -11
  141. package/dist/functions/space/remove-user.js.map +0 -1
  142. package/dist/functions/space/set-default.d.ts +0 -6
  143. package/dist/functions/space/set-default.d.ts.map +0 -1
  144. package/dist/functions/space/set-default.js +0 -11
  145. package/dist/functions/space/set-default.js.map +0 -1
  146. package/dist/functions/user/administrator.d.ts +0 -4
  147. package/dist/functions/user/administrator.d.ts.map +0 -1
  148. package/dist/functions/user/administrator.js +0 -39
  149. package/dist/functions/user/administrator.js.map +0 -1
  150. package/dist/functions/user/ensure.d.ts +0 -18
  151. package/dist/functions/user/ensure.d.ts.map +0 -1
  152. package/dist/functions/user/ensure.js +0 -49
  153. package/dist/functions/user/ensure.js.map +0 -1
  154. package/dist/functions/user/index.d.ts +0 -3
  155. package/dist/functions/user/index.d.ts.map +0 -1
  156. package/dist/functions/user/index.js.map +0 -1
  157. package/dist/index.d.ts.map +0 -1
  158. package/dist/index.js.map +0 -1
  159. package/dist/mutations/application/association.d.ts +0 -14
  160. package/dist/mutations/application/association.d.ts.map +0 -1
  161. package/dist/mutations/application/association.js +0 -46
  162. package/dist/mutations/application/association.js.map +0 -1
  163. package/dist/mutations/application/errors.d.ts +0 -5
  164. package/dist/mutations/application/errors.d.ts.map +0 -1
  165. package/dist/mutations/application/errors.js +0 -2
  166. package/dist/mutations/application/errors.js.map +0 -1
  167. package/dist/mutations/application/index.d.ts +0 -4
  168. package/dist/mutations/application/index.d.ts.map +0 -1
  169. package/dist/mutations/application/index.js +0 -3
  170. package/dist/mutations/application/index.js.map +0 -1
  171. package/dist/mutations/application/removal.d.ts +0 -6
  172. package/dist/mutations/application/removal.d.ts.map +0 -1
  173. package/dist/mutations/application/removal.js +0 -17
  174. package/dist/mutations/application/removal.js.map +0 -1
  175. package/dist/mutations/group/errors.d.ts +0 -5
  176. package/dist/mutations/group/errors.d.ts.map +0 -1
  177. package/dist/mutations/group/errors.js +0 -2
  178. package/dist/mutations/group/errors.js.map +0 -1
  179. package/dist/mutations/group/index.d.ts +0 -3
  180. package/dist/mutations/group/index.d.ts.map +0 -1
  181. package/dist/mutations/group/index.js.map +0 -1
  182. package/dist/mutations/group/membership.d.ts +0 -26
  183. package/dist/mutations/group/membership.d.ts.map +0 -1
  184. package/dist/mutations/group/membership.js +0 -71
  185. package/dist/mutations/group/membership.js.map +0 -1
  186. package/dist/mutations/index.d.ts +0 -4
  187. package/dist/mutations/index.d.ts.map +0 -1
  188. package/dist/mutations/index.js +0 -4
  189. package/dist/mutations/index.js.map +0 -1
  190. package/dist/mutations/space/access.d.ts +0 -30
  191. package/dist/mutations/space/access.d.ts.map +0 -1
  192. package/dist/mutations/space/access.js +0 -54
  193. package/dist/mutations/space/access.js.map +0 -1
  194. package/dist/mutations/space/default.d.ts +0 -26
  195. package/dist/mutations/space/default.d.ts.map +0 -1
  196. package/dist/mutations/space/default.js +0 -46
  197. package/dist/mutations/space/default.js.map +0 -1
  198. package/dist/mutations/space/errors.d.ts +0 -5
  199. package/dist/mutations/space/errors.d.ts.map +0 -1
  200. package/dist/mutations/space/errors.js +0 -2
  201. package/dist/mutations/space/errors.js.map +0 -1
  202. package/dist/mutations/space/index.d.ts +0 -4
  203. package/dist/mutations/space/index.d.ts.map +0 -1
  204. package/dist/mutations/space/index.js +0 -3
  205. package/dist/mutations/space/index.js.map +0 -1
  206. package/dist/mutations/user/index.d.ts +0 -1
  207. package/dist/mutations/user/index.d.ts.map +0 -1
  208. package/dist/mutations/user/index.js +0 -2
  209. package/dist/mutations/user/index.js.map +0 -1
  210. package/dist/public.d.ts +0 -5
  211. package/dist/public.d.ts.map +0 -1
  212. package/dist/public.js +0 -154
  213. package/dist/public.js.map +0 -1
  214. package/dist/queries/application/association.d.ts +0 -18
  215. package/dist/queries/application/association.d.ts.map +0 -1
  216. package/dist/queries/application/association.js +0 -82
  217. package/dist/queries/application/association.js.map +0 -1
  218. package/dist/queries/application/identity.d.ts +0 -4
  219. package/dist/queries/application/identity.d.ts.map +0 -1
  220. package/dist/queries/application/identity.js +0 -41
  221. package/dist/queries/application/identity.js.map +0 -1
  222. package/dist/queries/application/index.d.ts +0 -3
  223. package/dist/queries/application/index.d.ts.map +0 -1
  224. package/dist/queries/application/index.js.map +0 -1
  225. package/dist/queries/group/identity.d.ts +0 -3
  226. package/dist/queries/group/identity.d.ts.map +0 -1
  227. package/dist/queries/group/identity.js +0 -29
  228. package/dist/queries/group/identity.js.map +0 -1
  229. package/dist/queries/group/index.d.ts +0 -3
  230. package/dist/queries/group/index.d.ts.map +0 -1
  231. package/dist/queries/group/index.js.map +0 -1
  232. package/dist/queries/group/membership.d.ts +0 -17
  233. package/dist/queries/group/membership.d.ts.map +0 -1
  234. package/dist/queries/group/membership.js +0 -47
  235. package/dist/queries/group/membership.js.map +0 -1
  236. package/dist/queries/index.d.ts +0 -4
  237. package/dist/queries/index.d.ts.map +0 -1
  238. package/dist/queries/index.js +0 -4
  239. package/dist/queries/index.js.map +0 -1
  240. package/dist/queries/space/access.d.ts +0 -24
  241. package/dist/queries/space/access.d.ts.map +0 -1
  242. package/dist/queries/space/access.js +0 -93
  243. package/dist/queries/space/access.js.map +0 -1
  244. package/dist/queries/space/default.d.ts +0 -10
  245. package/dist/queries/space/default.d.ts.map +0 -1
  246. package/dist/queries/space/default.js +0 -25
  247. package/dist/queries/space/default.js.map +0 -1
  248. package/dist/queries/space/index.d.ts +0 -3
  249. package/dist/queries/space/index.d.ts.map +0 -1
  250. package/dist/queries/space/index.js +0 -3
  251. package/dist/queries/space/index.js.map +0 -1
  252. package/dist/rules/application/association.d.ts +0 -13
  253. package/dist/rules/application/association.d.ts.map +0 -1
  254. package/dist/rules/application/association.js +0 -10
  255. package/dist/rules/application/association.js.map +0 -1
  256. package/dist/rules/application/index.d.ts +0 -4
  257. package/dist/rules/application/index.d.ts.map +0 -1
  258. package/dist/rules/application/index.js +0 -4
  259. package/dist/rules/application/index.js.map +0 -1
  260. package/dist/rules/application/removal.d.ts +0 -11
  261. package/dist/rules/application/removal.d.ts.map +0 -1
  262. package/dist/rules/application/removal.js +0 -6
  263. package/dist/rules/application/removal.js.map +0 -1
  264. package/dist/rules/application/result.d.ts +0 -8
  265. package/dist/rules/application/result.d.ts.map +0 -1
  266. package/dist/rules/application/result.js +0 -17
  267. package/dist/rules/application/result.js.map +0 -1
  268. package/dist/rules/group/index.d.ts +0 -2
  269. package/dist/rules/group/index.d.ts.map +0 -1
  270. package/dist/rules/group/index.js +0 -2
  271. package/dist/rules/group/index.js.map +0 -1
  272. package/dist/rules/group/membership.d.ts +0 -5
  273. package/dist/rules/group/membership.d.ts.map +0 -1
  274. package/dist/rules/group/membership.js +0 -12
  275. package/dist/rules/group/membership.js.map +0 -1
  276. package/dist/rules/index.d.ts +0 -5
  277. package/dist/rules/index.d.ts.map +0 -1
  278. package/dist/rules/index.js +0 -5
  279. package/dist/rules/index.js.map +0 -1
  280. package/dist/rules/space/access.d.ts +0 -8
  281. package/dist/rules/space/access.d.ts.map +0 -1
  282. package/dist/rules/space/access.js +0 -18
  283. package/dist/rules/space/access.js.map +0 -1
  284. package/dist/rules/space/default.d.ts +0 -4
  285. package/dist/rules/space/default.d.ts.map +0 -1
  286. package/dist/rules/space/default.js +0 -7
  287. package/dist/rules/space/default.js.map +0 -1
  288. package/dist/rules/space/index.d.ts +0 -3
  289. package/dist/rules/space/index.d.ts.map +0 -1
  290. package/dist/rules/space/index.js +0 -3
  291. package/dist/rules/space/index.js.map +0 -1
  292. package/dist/rules/user/ensure.d.ts +0 -21
  293. package/dist/rules/user/ensure.d.ts.map +0 -1
  294. package/dist/rules/user/ensure.js +0 -61
  295. package/dist/rules/user/ensure.js.map +0 -1
  296. package/dist/rules/user/grant.d.ts +0 -13
  297. package/dist/rules/user/grant.d.ts.map +0 -1
  298. package/dist/rules/user/grant.js +0 -12
  299. package/dist/rules/user/grant.js.map +0 -1
  300. package/dist/rules/user/index.d.ts +0 -3
  301. package/dist/rules/user/index.d.ts.map +0 -1
  302. package/dist/rules/user/index.js +0 -3
  303. package/dist/rules/user/index.js.map +0 -1
  304. package/dist/schema/application/class.d.ts +0 -152
  305. package/dist/schema/application/class.d.ts.map +0 -1
  306. package/dist/schema/application/class.js +0 -10
  307. package/dist/schema/application/class.js.map +0 -1
  308. package/dist/schema/application/core.d.ts +0 -159
  309. package/dist/schema/application/core.d.ts.map +0 -1
  310. package/dist/schema/application/core.js +0 -13
  311. package/dist/schema/application/core.js.map +0 -1
  312. package/dist/schema/application/index.d.ts +0 -7
  313. package/dist/schema/application/index.d.ts.map +0 -1
  314. package/dist/schema/application/index.js +0 -7
  315. package/dist/schema/application/index.js.map +0 -1
  316. package/dist/schema/application/methods.d.ts +0 -171
  317. package/dist/schema/application/methods.d.ts.map +0 -1
  318. package/dist/schema/application/methods.js +0 -48
  319. package/dist/schema/application/methods.js.map +0 -1
  320. package/dist/schema/application/policies.d.ts +0 -3
  321. package/dist/schema/application/policies.d.ts.map +0 -1
  322. package/dist/schema/application/policies.js +0 -11
  323. package/dist/schema/application/policies.js.map +0 -1
  324. package/dist/schema/application/relationships.d.ts +0 -795
  325. package/dist/schema/application/relationships.d.ts.map +0 -1
  326. package/dist/schema/application/relationships.js +0 -20
  327. package/dist/schema/application/relationships.js.map +0 -1
  328. package/dist/schema/application/view.d.ts +0 -155
  329. package/dist/schema/application/view.d.ts.map +0 -1
  330. package/dist/schema/application/view.js +0 -7
  331. package/dist/schema/application/view.js.map +0 -1
  332. package/dist/schema/domain/index.d.ts +0 -9363
  333. package/dist/schema/domain/index.d.ts.map +0 -1
  334. package/dist/schema/domain/index.js +0 -56
  335. package/dist/schema/domain/index.js.map +0 -1
  336. package/dist/schema/group/class.d.ts +0 -59
  337. package/dist/schema/group/class.d.ts.map +0 -1
  338. package/dist/schema/group/class.js +0 -11
  339. package/dist/schema/group/class.js.map +0 -1
  340. package/dist/schema/group/core.d.ts +0 -495
  341. package/dist/schema/group/core.d.ts.map +0 -1
  342. package/dist/schema/group/core.js +0 -20
  343. package/dist/schema/group/core.js.map +0 -1
  344. package/dist/schema/group/index.d.ts +0 -7
  345. package/dist/schema/group/index.d.ts.map +0 -1
  346. package/dist/schema/group/index.js +0 -7
  347. package/dist/schema/group/index.js.map +0 -1
  348. package/dist/schema/group/methods.d.ts +0 -48
  349. package/dist/schema/group/methods.d.ts.map +0 -1
  350. package/dist/schema/group/methods.js +0 -21
  351. package/dist/schema/group/methods.js.map +0 -1
  352. package/dist/schema/group/policies.d.ts +0 -3
  353. package/dist/schema/group/policies.d.ts.map +0 -1
  354. package/dist/schema/group/policies.js +0 -7
  355. package/dist/schema/group/policies.js.map +0 -1
  356. package/dist/schema/group/relationships.d.ts +0 -293
  357. package/dist/schema/group/relationships.d.ts.map +0 -1
  358. package/dist/schema/group/relationships.js +0 -20
  359. package/dist/schema/group/relationships.js.map +0 -1
  360. package/dist/schema/group/view.d.ts +0 -62
  361. package/dist/schema/group/view.d.ts.map +0 -1
  362. package/dist/schema/group/view.js +0 -7
  363. package/dist/schema/group/view.js.map +0 -1
  364. package/dist/schema/home/index.d.ts +0 -2
  365. package/dist/schema/home/index.d.ts.map +0 -1
  366. package/dist/schema/home/index.js +0 -2
  367. package/dist/schema/home/index.js.map +0 -1
  368. package/dist/schema/home/view.d.ts +0 -4
  369. package/dist/schema/home/view.d.ts.map +0 -1
  370. package/dist/schema/home/view.js +0 -5
  371. package/dist/schema/home/view.js.map +0 -1
  372. package/dist/schema/index.d.ts.map +0 -1
  373. package/dist/schema/index.js.map +0 -1
  374. package/dist/schema/space/class.d.ts +0 -74
  375. package/dist/schema/space/class.d.ts.map +0 -1
  376. package/dist/schema/space/class.js +0 -15
  377. package/dist/schema/space/class.js.map +0 -1
  378. package/dist/schema/space/core.d.ts +0 -995
  379. package/dist/schema/space/core.d.ts.map +0 -1
  380. package/dist/schema/space/core.js +0 -17
  381. package/dist/schema/space/core.js.map +0 -1
  382. package/dist/schema/space/index.d.ts +0 -7
  383. package/dist/schema/space/index.d.ts.map +0 -1
  384. package/dist/schema/space/index.js +0 -7
  385. package/dist/schema/space/index.js.map +0 -1
  386. package/dist/schema/space/methods.d.ts +0 -78
  387. package/dist/schema/space/methods.d.ts.map +0 -1
  388. package/dist/schema/space/methods.js +0 -31
  389. package/dist/schema/space/methods.js.map +0 -1
  390. package/dist/schema/space/policies.d.ts +0 -5
  391. package/dist/schema/space/policies.d.ts.map +0 -1
  392. package/dist/schema/space/policies.js +0 -15
  393. package/dist/schema/space/policies.js.map +0 -1
  394. package/dist/schema/space/relationships.d.ts +0 -1059
  395. package/dist/schema/space/relationships.d.ts.map +0 -1
  396. package/dist/schema/space/relationships.js +0 -25
  397. package/dist/schema/space/relationships.js.map +0 -1
  398. package/dist/schema/space/view.d.ts +0 -77
  399. package/dist/schema/space/view.d.ts.map +0 -1
  400. package/dist/schema/space/view.js +0 -7
  401. package/dist/schema/space/view.js.map +0 -1
  402. package/dist/schema/user/administrator.d.ts +0 -30
  403. package/dist/schema/user/administrator.d.ts.map +0 -1
  404. package/dist/schema/user/administrator.js +0 -19
  405. package/dist/schema/user/administrator.js.map +0 -1
  406. package/dist/schema/user/class.d.ts +0 -12
  407. package/dist/schema/user/class.d.ts.map +0 -1
  408. package/dist/schema/user/class.js +0 -7
  409. package/dist/schema/user/class.js.map +0 -1
  410. package/dist/schema/user/ensure.d.ts +0 -37
  411. package/dist/schema/user/ensure.d.ts.map +0 -1
  412. package/dist/schema/user/ensure.js +0 -28
  413. package/dist/schema/user/ensure.js.map +0 -1
  414. package/dist/schema/user/index.d.ts +0 -6
  415. package/dist/schema/user/index.d.ts.map +0 -1
  416. package/dist/schema/user/index.js +0 -6
  417. package/dist/schema/user/index.js.map +0 -1
  418. package/dist/schema/user/interface.d.ts +0 -10
  419. package/dist/schema/user/interface.d.ts.map +0 -1
  420. package/dist/schema/user/interface.js +0 -12
  421. package/dist/schema/user/interface.js.map +0 -1
  422. package/dist/schema/user/view.d.ts +0 -15
  423. package/dist/schema/user/view.d.ts.map +0 -1
  424. package/dist/schema/user/view.js +0 -7
  425. package/dist/schema/user/view.js.map +0 -1
  426. package/dist/tests/cross-layer/public.test.d.ts +0 -2
  427. package/dist/tests/cross-layer/public.test.d.ts.map +0 -1
  428. package/dist/tests/cross-layer/public.test.js +0 -70
  429. package/dist/tests/cross-layer/public.test.js.map +0 -1
  430. package/dist/tests/cross-layer/workflows.test.d.ts +0 -2
  431. package/dist/tests/cross-layer/workflows.test.d.ts.map +0 -1
  432. package/dist/tests/cross-layer/workflows.test.js +0 -290
  433. package/dist/tests/cross-layer/workflows.test.js.map +0 -1
  434. package/dist/tests/index.d.ts +0 -3
  435. package/dist/tests/index.d.ts.map +0 -1
  436. package/dist/tests/index.js +0 -3
  437. package/dist/tests/index.js.map +0 -1
  438. package/dist/utils/graph-endpoint/index.d.ts +0 -13
  439. package/dist/utils/graph-endpoint/index.d.ts.map +0 -1
  440. package/dist/utils/graph-endpoint/index.js +0 -6
  441. package/dist/utils/graph-endpoint/index.js.map +0 -1
  442. package/dist/utils/index.d.ts +0 -3
  443. package/dist/utils/index.d.ts.map +0 -1
  444. package/dist/utils/index.js +0 -3
  445. package/dist/utils/index.js.map +0 -1
  446. package/dist/utils/query-page/index.d.ts +0 -3
  447. package/dist/utils/query-page/index.d.ts.map +0 -1
  448. package/dist/utils/query-page/index.js +0 -2
  449. package/dist/utils/query-page/index.js.map +0 -1
  450. package/dist/utils/query-page/nodes.d.ts +0 -16
  451. package/dist/utils/query-page/nodes.d.ts.map +0 -1
  452. package/dist/utils/query-page/nodes.js +0 -22
  453. package/dist/utils/query-page/nodes.js.map +0 -1
  454. package/dist/workflows/application/errors.d.ts +0 -5
  455. package/dist/workflows/application/errors.d.ts.map +0 -1
  456. package/dist/workflows/application/errors.js +0 -25
  457. package/dist/workflows/application/errors.js.map +0 -1
  458. package/dist/workflows/application/index.d.ts +0 -3
  459. package/dist/workflows/application/index.d.ts.map +0 -1
  460. package/dist/workflows/application/index.js +0 -3
  461. package/dist/workflows/application/index.js.map +0 -1
  462. package/dist/workflows/application/install.d.ts +0 -3
  463. package/dist/workflows/application/install.d.ts.map +0 -1
  464. package/dist/workflows/application/install.js +0 -37
  465. package/dist/workflows/application/install.js.map +0 -1
  466. package/dist/workflows/application/uninstall.d.ts +0 -4
  467. package/dist/workflows/application/uninstall.d.ts.map +0 -1
  468. package/dist/workflows/application/uninstall.js +0 -25
  469. package/dist/workflows/application/uninstall.js.map +0 -1
  470. package/dist/workflows/group/assign-user.d.ts +0 -8
  471. package/dist/workflows/group/assign-user.d.ts.map +0 -1
  472. package/dist/workflows/group/assign-user.js +0 -32
  473. package/dist/workflows/group/assign-user.js.map +0 -1
  474. package/dist/workflows/group/ensure-administrator.d.ts +0 -4
  475. package/dist/workflows/group/ensure-administrator.d.ts.map +0 -1
  476. package/dist/workflows/group/ensure-administrator.js +0 -26
  477. package/dist/workflows/group/ensure-administrator.js.map +0 -1
  478. package/dist/workflows/group/errors.d.ts +0 -2
  479. package/dist/workflows/group/errors.d.ts.map +0 -1
  480. package/dist/workflows/group/errors.js +0 -7
  481. package/dist/workflows/group/errors.js.map +0 -1
  482. package/dist/workflows/group/index.d.ts +0 -4
  483. package/dist/workflows/group/index.d.ts.map +0 -1
  484. package/dist/workflows/group/index.js +0 -4
  485. package/dist/workflows/group/index.js.map +0 -1
  486. package/dist/workflows/group/unassign-user.d.ts +0 -8
  487. package/dist/workflows/group/unassign-user.d.ts.map +0 -1
  488. package/dist/workflows/group/unassign-user.js +0 -32
  489. package/dist/workflows/group/unassign-user.js.map +0 -1
  490. package/dist/workflows/index.d.ts +0 -4
  491. package/dist/workflows/index.d.ts.map +0 -1
  492. package/dist/workflows/index.js +0 -4
  493. package/dist/workflows/index.js.map +0 -1
  494. package/dist/workflows/space/add-user.d.ts +0 -8
  495. package/dist/workflows/space/add-user.d.ts.map +0 -1
  496. package/dist/workflows/space/add-user.js +0 -34
  497. package/dist/workflows/space/add-user.js.map +0 -1
  498. package/dist/workflows/space/errors.d.ts +0 -3
  499. package/dist/workflows/space/errors.d.ts.map +0 -1
  500. package/dist/workflows/space/errors.js +0 -10
  501. package/dist/workflows/space/errors.js.map +0 -1
  502. package/dist/workflows/space/index.d.ts +0 -4
  503. package/dist/workflows/space/index.d.ts.map +0 -1
  504. package/dist/workflows/space/index.js +0 -4
  505. package/dist/workflows/space/index.js.map +0 -1
  506. package/dist/workflows/space/remove-user.d.ts +0 -8
  507. package/dist/workflows/space/remove-user.d.ts.map +0 -1
  508. package/dist/workflows/space/remove-user.js +0 -62
  509. package/dist/workflows/space/remove-user.js.map +0 -1
  510. package/dist/workflows/space/set-default.d.ts +0 -9
  511. package/dist/workflows/space/set-default.d.ts.map +0 -1
  512. package/dist/workflows/space/set-default.js +0 -43
  513. package/dist/workflows/space/set-default.js.map +0 -1
@@ -0,0 +1,8 @@
1
+ import type { InviteRequest } from './invite-user-request.js';
2
+ export declare const enrollment: import("@astrale-os/sdk/integration").IntegrationDefinition<"shell.enrollment", {
3
+ invite: import("@astrale-os/sdk/integration").IntegrationOperation<InviteRequest, {
4
+ invitationId: string;
5
+ user: string;
6
+ state: "accepted" | "cancelled" | "completed" | "expired" | "failed" | "pending" | "registered" | "registering";
7
+ }>;
8
+ }>;
@@ -0,0 +1,9 @@
1
+ import { defineIntegration } from '@astrale-os/sdk/integration';
2
+ export const enrollment = defineIntegration({
3
+ id: 'shell.enrollment',
4
+ operations: {
5
+ invite: defineIntegration.operation({
6
+ replay: ({ requestId }) => ({ kind: 'keyed', source: 'input', key: requestId }),
7
+ }),
8
+ },
9
+ });
@@ -1,2 +1 @@
1
- export { assignLocalGroupMembership, assignGroupMembership, unassignGroupMembership, } from './membership.js';
2
- //# sourceMappingURL=index.js.map
1
+ export { setGroupMembership } from './set-group-membership.js';
@@ -0,0 +1,29 @@
1
+ import { defineMutation } from '@astrale-os/sdk/mutation';
2
+ export const setGroupMembership = defineMutation()((domain) => ({
3
+ id: 'shell.group.membership.set',
4
+ build(input, mutation) {
5
+ mutation.expect.query(input.current.endpoints);
6
+ mutation.expect.query(input.current.guard);
7
+ const endpoints = { source: input.member, target: input.group };
8
+ const changes = [
9
+ { class: domain.classes.member_of_group, current: input.current.membership },
10
+ { class: domain.dependencies.kernel.classes.extends_with, current: input.current.authority },
11
+ ];
12
+ for (const edge of changes) {
13
+ if (edge.current === input.present)
14
+ continue;
15
+ if (input.present)
16
+ mutation.createEdge({ class: edge.class, ...endpoints });
17
+ else
18
+ mutation.deleteEdge({ class: edge.class, ...endpoints });
19
+ }
20
+ },
21
+ project: () => ({ ok: true }),
22
+ reject: (failure) => {
23
+ if (failure.outcomeKnown &&
24
+ failure.code !== 'MUTATION_PRECONDITION_FAILED' &&
25
+ failure.code !== 'MUTATION_CONFLICT')
26
+ throw failure;
27
+ return { ok: false, code: failure.code, outcomeKnown: failure.outcomeKnown };
28
+ },
29
+ }));
@@ -0,0 +1,78 @@
1
+ import { TransportError } from '@astrale-os/sdk/client';
2
+ import { defineProvider } from '@astrale-os/sdk/integration';
3
+ import { z } from 'zod';
4
+ import { enrollment, InvitationRequestFailure } from '../../integrations/user-invitation/index.js';
5
+ import { decodeAdminInvitationResponse } from './decode-admin-invitation-response.js';
6
+ import { readReply } from './read-enrollment-response.js';
7
+ // Environment is a representation boundary, unlike already-admitted handler input.
8
+ const configuration = z.object({ ENROLLMENT_INGRESS_URL: z.string().url() });
9
+ export function enrollmentProvider(environment) {
10
+ const input = configuration.parse(environment);
11
+ const endpoint = new URL(input.ENROLLMENT_INGRESS_URL);
12
+ if (endpoint.protocol !== 'https:' ||
13
+ endpoint.username ||
14
+ endpoint.password ||
15
+ endpoint.hash ||
16
+ endpoint.search) {
17
+ throw new TypeError('Enrollment ingress must be an HTTPS URL without credentials, query or hash.');
18
+ }
19
+ const audience = endpoint.href;
20
+ return defineProvider(enrollment, {
21
+ async invite(input, execution) {
22
+ if (execution.auth === undefined)
23
+ throw new Error('Authenticated Shell invocation required.');
24
+ // Mint per attempt, using only the current invocation's Domain-self identity.
25
+ const credential = await execution.auth.mint({ audience, ttlSeconds: 60 });
26
+ execution.signal.throwIfAborted();
27
+ const remaining = execution.deadline - Date.now();
28
+ if (remaining <= 0) {
29
+ throw TransportError.invocation('Enrollment deadline exceeded.', {
30
+ phase: 'timeout',
31
+ delivery: 'not-sent',
32
+ });
33
+ }
34
+ // No automatic HTTP retry. A timeout after send has an unknown effect.
35
+ const signal = AbortSignal.any([execution.signal, AbortSignal.timeout(remaining)]);
36
+ const response = await fetch(audience, {
37
+ method: 'POST',
38
+ // Workers reject redirect:error before sending. Manual preserves the refusal:
39
+ // every 3xx is rejected below, without forwarding the proof to its Location.
40
+ redirect: 'manual',
41
+ headers: {
42
+ Authorization: `Bearer ${credential}`,
43
+ 'Content-Type': 'application/json',
44
+ Accept: 'application/json',
45
+ 'Idempotency-Key': input.requestId,
46
+ },
47
+ body: JSON.stringify(input),
48
+ signal,
49
+ }).catch((cause) => {
50
+ if (!(cause instanceof TypeError) && !(cause instanceof DOMException))
51
+ throw cause;
52
+ throw TransportError.invocation('Admin enrollment transport failed.', {
53
+ phase: signal.aborted ? 'timeout' : 'unknown',
54
+ delivery: 'unknown',
55
+ });
56
+ });
57
+ if (!response.ok) {
58
+ await response.body?.cancel();
59
+ if (response.status === 409)
60
+ throw new InvitationRequestFailure('INVITATION_CONFLICT');
61
+ if (response.status === 400 || response.status === 422) {
62
+ throw new InvitationRequestFailure('INVITATION_REJECTED');
63
+ }
64
+ // Shell admission already happened. A refused service credential is not a new
65
+ // authorization decision about the caller, and no upstream body is exposed.
66
+ throw TransportError.invocation('Admin enrollment request was not completed.', {
67
+ phase: 'receive',
68
+ delivery: 'unknown',
69
+ });
70
+ }
71
+ const result = decodeAdminInvitationResponse(await readReply(response));
72
+ if (result.requestId !== input.requestId || result.user !== input.user) {
73
+ throw new TypeError('Admin enrollment response does not match the request.');
74
+ }
75
+ return { invitationId: result.invitationId, user: result.user, state: result.state };
76
+ },
77
+ });
78
+ }
@@ -0,0 +1,20 @@
1
+ import { z } from 'zod';
2
+ // Codec du JSON HTTP entrant ; la valeur admise satisfait le contrat de l'Integration.
3
+ const httpReply = z.object({
4
+ requestId: z.string().min(1),
5
+ invitationId: z.string().min(1),
6
+ user: z.string().min(1),
7
+ state: z.enum([
8
+ 'pending',
9
+ 'accepted',
10
+ 'registering',
11
+ 'registered',
12
+ 'completed',
13
+ 'cancelled',
14
+ 'expired',
15
+ 'failed',
16
+ ]),
17
+ });
18
+ export function decodeAdminInvitationResponse(value) {
19
+ return httpReply.parse(value);
20
+ }
@@ -0,0 +1 @@
1
+ export { enrollmentProvider } from './create-admin-enrollment-provider.js';
@@ -0,0 +1,34 @@
1
+ export async function readReply(response) {
2
+ if (!response.headers.get('content-type')?.toLowerCase().startsWith('application/json')) {
3
+ await response.body?.cancel();
4
+ throw new TypeError('Expected a JSON enrollment response.');
5
+ }
6
+ const reader = response.body?.getReader();
7
+ if (!reader)
8
+ throw new TypeError('Missing enrollment response body.');
9
+ const chunks = [];
10
+ let size = 0;
11
+ try {
12
+ for (;;) {
13
+ const { done, value } = await reader.read();
14
+ if (done)
15
+ break;
16
+ size += value.byteLength;
17
+ if (size > 16384) {
18
+ await reader.cancel();
19
+ throw new TypeError('Enrollment response exceeds 16 KiB.');
20
+ }
21
+ chunks.push(value);
22
+ }
23
+ }
24
+ finally {
25
+ reader.releaseLock();
26
+ }
27
+ const bytes = new Uint8Array(size);
28
+ let offset = 0;
29
+ for (const chunk of chunks) {
30
+ bytes.set(chunk, offset);
31
+ offset += chunk.byteLength;
32
+ }
33
+ return JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(bytes));
34
+ }
@@ -1,3 +1 @@
1
- export { observeApplicationAssociation, } from './association.js';
2
- export { observeApplicationPresence, resolveShellApplication } from './identity.js';
3
- //# sourceMappingURL=index.js.map
1
+ export { readInstalledEntrypoints } from './read-installed-entrypoints.js';
@@ -0,0 +1,44 @@
1
+ import { defineQuery, Query, queryResult, } from '@astrale-os/sdk/query';
2
+ const VIEW_MEMBER = /^view\.([A-Za-z][A-Za-z0-9_]*)$/u;
3
+ /**
4
+ * Every installed Domain entrypoint this authority can read, in origin order. The `of_domain`
5
+ * locator of a View that has an outgoing `entrypoint` Edge names that View (`view.<name>`), and its
6
+ * target is the Domain, whose Node carries the origin and the display name.
7
+ */
8
+ export const readInstalledEntrypoints = defineQuery()((domain) => {
9
+ const kernel = domain.dependencies.kernel.classes;
10
+ return {
11
+ id: 'shell.application.entrypoints',
12
+ page: { size: 200 },
13
+ pagination: { maximumPages: 50 },
14
+ build: () => {
15
+ const located = Query.from({ edges: [kernel.of_domain] });
16
+ return located
17
+ .expand({ from: located.source, via: [kernel.entrypoint], direction: 'outgoing' })
18
+ .select({
19
+ kind: 'edges',
20
+ binding: located.edge,
21
+ projection: { edge: 'value', source: 'reference', target: 'value' },
22
+ });
23
+ },
24
+ project(pages) {
25
+ const entries = [];
26
+ for (const page of pages) {
27
+ for (const item of queryResult.edgeItems(page, 'Installed entrypoints')) {
28
+ if (item.edge.kind !== 'value' || item.target.kind !== 'value') {
29
+ throw new TypeError('Installed entrypoint is not a complete value.');
30
+ }
31
+ const member = VIEW_MEMBER.exec(String(item.edge.value.props[kernel.of_domain.properties.member.key]));
32
+ const props = item.target.value.props;
33
+ const origin = props[kernel.Domain.properties.origin.key];
34
+ const name = props[kernel.Domain.properties.name.key];
35
+ if (member === null || typeof origin !== 'string' || typeof name !== 'string') {
36
+ throw new TypeError('Installed entrypoint has no View, origin, or name.');
37
+ }
38
+ entries.push({ origin, name, view: `${origin}:view.${member[1]}` });
39
+ }
40
+ }
41
+ return entries.sort((left, right) => left.origin.localeCompare(right.origin));
42
+ },
43
+ };
44
+ });
@@ -1,3 +1,2 @@
1
- export { resolveShellAdministratorGroup } from './identity.js';
2
- export { observeGroupMembership, } from './membership.js';
3
- //# sourceMappingURL=index.js.map
1
+ export { readGroupMembership, } from './read-group-membership.js';
2
+ export { readGroupMembershipEndpoints } from './read-group-membership-endpoints.js';
@@ -0,0 +1,18 @@
1
+ import { Path } from '@astrale-os/sdk/graph/path';
2
+ import { defineQuery, Query, queryResult, } from '@astrale-os/sdk/query';
3
+ export const readGroupMembershipEndpoints = defineQuery()(() => ({
4
+ id: 'shell.group.membership.endpoints',
5
+ page: { size: 2 },
6
+ pagination: { maximumPages: 2 },
7
+ build: ({ member, group }) => Query.from({ nodes: [Path.id(member), Path.id(group)] }).select({
8
+ kind: 'nodes',
9
+ projection: { kind: 'reference' },
10
+ }),
11
+ project(pages, input, { ast, complete }) {
12
+ const ids = queryResult.completeNodeIds(pages, 'Shell membership endpoints');
13
+ return {
14
+ visible: ids.includes(input.member) && ids.includes(input.group),
15
+ guard: { query: ast, equals: complete },
16
+ };
17
+ },
18
+ }));
@@ -0,0 +1,35 @@
1
+ import { Query, defineQuery, queryResult, } from '@astrale-os/sdk/query';
2
+ export const readGroupMembership = defineQuery()((domain) => ({
3
+ id: 'shell.group.membership.read',
4
+ build({ member, group }) {
5
+ const edges = Query.from({
6
+ edges: [domain.classes.member_of_group, domain.dependencies.kernel.classes.extends_with],
7
+ });
8
+ return edges
9
+ .filter({ binding: edges.source, predicate: { kind: 'identity.equal', identity: member } })
10
+ .filter({ binding: edges.target, predicate: { kind: 'identity.equal', identity: group } })
11
+ .select({
12
+ kind: 'edges',
13
+ projection: { edge: 'value', source: 'reference', target: 'reference' },
14
+ });
15
+ },
16
+ pagination: { maximumPages: 4 },
17
+ project(pages, _input, { ast, complete }) {
18
+ let membership = false;
19
+ let authority = false;
20
+ for (const page of pages) {
21
+ for (const item of queryResult.edgeItems(page, 'Shell group membership')) {
22
+ if (item.edge.kind !== 'value')
23
+ throw new TypeError('Expected an Edge value.');
24
+ if (item.edge.value.class === domain.classes.member_of_group.key)
25
+ membership = true;
26
+ else if (item.edge.value.class === domain.dependencies.kernel.classes.extends_with.key) {
27
+ authority = true;
28
+ }
29
+ else
30
+ throw new TypeError('Unexpected Edge Class.');
31
+ }
32
+ }
33
+ return { membership, authority, guard: { query: ast, equals: complete } };
34
+ },
35
+ }));