@astrale-domains/shell 0.1.0-beta.4 → 0.1.0-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/index.js +1 -0
- package/dist/actions/user/index.js +1 -0
- package/dist/actions/user/resolve-home.js +19 -0
- package/dist/application.d.ts +5 -0
- package/dist/application.js +29 -0
- package/dist/index.d.ts +3 -4
- package/dist/index.js +3 -4
- package/dist/mutations/group/index.js +1 -2
- package/dist/mutations/group/membership.js +19 -69
- package/dist/mutations/space/access.js +23 -52
- package/dist/mutations/space/default.js +23 -44
- package/dist/mutations/space/index.js +2 -3
- package/dist/mutations/user/index.js +1 -2
- package/dist/mutations/user/repair.js +85 -0
- package/dist/queries/space/access.js +13 -92
- package/dist/queries/space/admin.js +27 -0
- package/dist/queries/space/index.js +3 -3
- package/dist/queries/space/member.js +24 -0
- package/dist/queries/user/groups.js +24 -0
- package/dist/queries/user/home.js +28 -0
- package/dist/queries/user/index.js +5 -0
- package/dist/queries/user/owned-spaces.js +24 -0
- package/dist/queries/user/profile.js +17 -0
- package/dist/queries/user/setup.js +18 -0
- package/dist/runtime.d.ts +4 -0
- package/dist/runtime.js +18 -0
- package/dist/schema/domain/index.d.ts +26385 -8837
- package/dist/schema/domain/index.js +26 -42
- package/dist/schema/group/class.d.ts +3258 -29
- package/dist/schema/group/class.js +2 -6
- package/dist/schema/group/core.d.ts +9 -490
- package/dist/schema/group/core.js +7 -13
- package/dist/schema/group/index.d.ts +2 -3
- package/dist/schema/group/index.js +2 -3
- package/dist/schema/group/methods.d.ts +2028 -17
- package/dist/schema/group/methods.js +7 -7
- package/dist/schema/group/policies.d.ts +1 -3
- package/dist/schema/group/policies.js +5 -6
- package/dist/schema/group/relationships.d.ts +4264 -244
- package/dist/schema/group/relationships.js +2 -14
- package/dist/schema/group/view.d.ts +3258 -29
- package/dist/schema/group/view.js +0 -1
- package/dist/schema/home/index.d.ts +0 -1
- package/dist/schema/home/index.js +0 -1
- package/dist/schema/home/view.d.ts +0 -1
- package/dist/schema/home/view.js +0 -1
- package/dist/schema/index.d.ts +4 -5
- package/dist/schema/index.js +4 -5
- package/dist/schema/setup/functions.d.ts +47 -0
- package/dist/schema/setup/functions.js +27 -0
- package/dist/schema/setup/index.d.ts +1 -0
- package/dist/schema/setup/index.js +1 -0
- package/dist/schema/space/class.d.ts +2263 -24
- package/dist/schema/space/class.js +2 -6
- package/dist/schema/space/core.d.ts +22235 -710
- package/dist/schema/space/core.js +6 -8
- package/dist/schema/space/index.d.ts +0 -1
- package/dist/schema/space/index.js +0 -1
- package/dist/schema/space/methods.d.ts +2027 -16
- package/dist/schema/space/methods.js +7 -8
- package/dist/schema/space/policies.d.ts +1 -2
- package/dist/schema/space/policies.js +17 -11
- package/dist/schema/space/relationships.d.ts +22980 -826
- package/dist/schema/space/relationships.js +5 -6
- package/dist/schema/space/view.d.ts +2264 -25
- package/dist/schema/space/view.js +1 -2
- package/dist/schema/user/class.d.ts +1013 -10
- package/dist/schema/user/class.js +9 -5
- package/dist/schema/user/index.d.ts +1 -4
- package/dist/schema/user/index.js +1 -4
- package/dist/schema/user/methods.d.ts +14 -0
- package/dist/schema/user/methods.js +11 -0
- package/dist/schema/user/view.d.ts +1012 -10
- package/dist/schema/user/view.js +0 -1
- package/dist/workflows/group/assign.js +3 -0
- package/dist/workflows/group/change.js +31 -0
- package/dist/workflows/group/index.js +3 -4
- package/dist/workflows/group/unassign.js +3 -0
- package/dist/workflows/index.js +3 -4
- package/dist/workflows/setup/admin.js +3 -0
- package/dist/workflows/setup/index.js +5 -0
- package/dist/workflows/setup/member.js +3 -0
- package/dist/workflows/setup/plan.js +88 -0
- package/dist/workflows/setup/provision.js +57 -0
- package/dist/workflows/setup/run.js +74 -0
- package/dist/workflows/space/access.js +41 -0
- package/dist/workflows/space/add.js +3 -0
- package/dist/workflows/space/default.js +37 -0
- package/dist/workflows/space/index.js +4 -4
- package/dist/workflows/space/remove.js +3 -0
- package/package.json +13 -32
- package/dist/functions/application/index.d.ts +0 -3
- package/dist/functions/application/index.d.ts.map +0 -1
- package/dist/functions/application/index.js +0 -3
- package/dist/functions/application/index.js.map +0 -1
- package/dist/functions/application/install.d.ts +0 -4
- package/dist/functions/application/install.d.ts.map +0 -1
- package/dist/functions/application/install.js +0 -11
- package/dist/functions/application/install.js.map +0 -1
- package/dist/functions/application/uninstall.d.ts +0 -5
- package/dist/functions/application/uninstall.d.ts.map +0 -1
- package/dist/functions/application/uninstall.js +0 -11
- package/dist/functions/application/uninstall.js.map +0 -1
- package/dist/functions/execution/index.d.ts +0 -15
- package/dist/functions/execution/index.d.ts.map +0 -1
- package/dist/functions/execution/index.js +0 -2
- package/dist/functions/execution/index.js.map +0 -1
- package/dist/functions/group/assign-user.d.ts +0 -5
- package/dist/functions/group/assign-user.d.ts.map +0 -1
- package/dist/functions/group/assign-user.js +0 -11
- package/dist/functions/group/assign-user.js.map +0 -1
- package/dist/functions/group/index.d.ts +0 -3
- package/dist/functions/group/index.d.ts.map +0 -1
- package/dist/functions/group/index.js +0 -3
- package/dist/functions/group/index.js.map +0 -1
- package/dist/functions/group/unassign-user.d.ts +0 -5
- package/dist/functions/group/unassign-user.d.ts.map +0 -1
- package/dist/functions/group/unassign-user.js +0 -11
- package/dist/functions/group/unassign-user.js.map +0 -1
- package/dist/functions/index.d.ts +0 -6
- package/dist/functions/index.d.ts.map +0 -1
- package/dist/functions/index.js +0 -6
- package/dist/functions/index.js.map +0 -1
- package/dist/functions/space/add-user.d.ts +0 -5
- package/dist/functions/space/add-user.d.ts.map +0 -1
- package/dist/functions/space/add-user.js +0 -11
- package/dist/functions/space/add-user.js.map +0 -1
- package/dist/functions/space/index.d.ts +0 -4
- package/dist/functions/space/index.d.ts.map +0 -1
- package/dist/functions/space/index.js +0 -4
- package/dist/functions/space/index.js.map +0 -1
- package/dist/functions/space/remove-user.d.ts +0 -5
- package/dist/functions/space/remove-user.d.ts.map +0 -1
- package/dist/functions/space/remove-user.js +0 -11
- package/dist/functions/space/remove-user.js.map +0 -1
- package/dist/functions/space/set-default.d.ts +0 -6
- package/dist/functions/space/set-default.d.ts.map +0 -1
- package/dist/functions/space/set-default.js +0 -11
- package/dist/functions/space/set-default.js.map +0 -1
- package/dist/functions/user/administrator.d.ts +0 -4
- package/dist/functions/user/administrator.d.ts.map +0 -1
- package/dist/functions/user/administrator.js +0 -39
- package/dist/functions/user/administrator.js.map +0 -1
- package/dist/functions/user/ensure.d.ts +0 -18
- package/dist/functions/user/ensure.d.ts.map +0 -1
- package/dist/functions/user/ensure.js +0 -49
- package/dist/functions/user/ensure.js.map +0 -1
- package/dist/functions/user/index.d.ts +0 -3
- package/dist/functions/user/index.d.ts.map +0 -1
- package/dist/functions/user/index.js +0 -3
- package/dist/functions/user/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/mutations/application/association.d.ts +0 -14
- package/dist/mutations/application/association.d.ts.map +0 -1
- package/dist/mutations/application/association.js +0 -46
- package/dist/mutations/application/association.js.map +0 -1
- package/dist/mutations/application/errors.d.ts +0 -5
- package/dist/mutations/application/errors.d.ts.map +0 -1
- package/dist/mutations/application/errors.js +0 -2
- package/dist/mutations/application/errors.js.map +0 -1
- package/dist/mutations/application/index.d.ts +0 -4
- package/dist/mutations/application/index.d.ts.map +0 -1
- package/dist/mutations/application/index.js +0 -3
- package/dist/mutations/application/index.js.map +0 -1
- package/dist/mutations/application/removal.d.ts +0 -6
- package/dist/mutations/application/removal.d.ts.map +0 -1
- package/dist/mutations/application/removal.js +0 -17
- package/dist/mutations/application/removal.js.map +0 -1
- package/dist/mutations/group/errors.d.ts +0 -5
- package/dist/mutations/group/errors.d.ts.map +0 -1
- package/dist/mutations/group/errors.js +0 -2
- package/dist/mutations/group/errors.js.map +0 -1
- package/dist/mutations/group/index.d.ts +0 -3
- package/dist/mutations/group/index.d.ts.map +0 -1
- package/dist/mutations/group/index.js.map +0 -1
- package/dist/mutations/group/membership.d.ts +0 -26
- package/dist/mutations/group/membership.d.ts.map +0 -1
- package/dist/mutations/group/membership.js.map +0 -1
- package/dist/mutations/index.d.ts +0 -4
- package/dist/mutations/index.d.ts.map +0 -1
- package/dist/mutations/index.js +0 -4
- package/dist/mutations/index.js.map +0 -1
- package/dist/mutations/space/access.d.ts +0 -30
- package/dist/mutations/space/access.d.ts.map +0 -1
- package/dist/mutations/space/access.js.map +0 -1
- package/dist/mutations/space/default.d.ts +0 -26
- package/dist/mutations/space/default.d.ts.map +0 -1
- package/dist/mutations/space/default.js.map +0 -1
- package/dist/mutations/space/errors.d.ts +0 -5
- package/dist/mutations/space/errors.d.ts.map +0 -1
- package/dist/mutations/space/errors.js +0 -2
- package/dist/mutations/space/errors.js.map +0 -1
- package/dist/mutations/space/index.d.ts +0 -4
- package/dist/mutations/space/index.d.ts.map +0 -1
- package/dist/mutations/space/index.js.map +0 -1
- package/dist/mutations/user/index.d.ts +0 -1
- package/dist/mutations/user/index.d.ts.map +0 -1
- package/dist/mutations/user/index.js.map +0 -1
- package/dist/public.d.ts +0 -5
- package/dist/public.d.ts.map +0 -1
- package/dist/public.js +0 -154
- package/dist/public.js.map +0 -1
- package/dist/queries/application/association.d.ts +0 -18
- package/dist/queries/application/association.d.ts.map +0 -1
- package/dist/queries/application/association.js +0 -82
- package/dist/queries/application/association.js.map +0 -1
- package/dist/queries/application/identity.d.ts +0 -4
- package/dist/queries/application/identity.d.ts.map +0 -1
- package/dist/queries/application/identity.js +0 -41
- package/dist/queries/application/identity.js.map +0 -1
- package/dist/queries/application/index.d.ts +0 -3
- package/dist/queries/application/index.d.ts.map +0 -1
- package/dist/queries/application/index.js +0 -3
- package/dist/queries/application/index.js.map +0 -1
- package/dist/queries/group/identity.d.ts +0 -3
- package/dist/queries/group/identity.d.ts.map +0 -1
- package/dist/queries/group/identity.js +0 -29
- package/dist/queries/group/identity.js.map +0 -1
- package/dist/queries/group/index.d.ts +0 -3
- package/dist/queries/group/index.d.ts.map +0 -1
- package/dist/queries/group/index.js +0 -3
- package/dist/queries/group/index.js.map +0 -1
- package/dist/queries/group/membership.d.ts +0 -17
- package/dist/queries/group/membership.d.ts.map +0 -1
- package/dist/queries/group/membership.js +0 -47
- package/dist/queries/group/membership.js.map +0 -1
- package/dist/queries/index.d.ts +0 -4
- package/dist/queries/index.d.ts.map +0 -1
- package/dist/queries/index.js +0 -4
- package/dist/queries/index.js.map +0 -1
- package/dist/queries/space/access.d.ts +0 -24
- package/dist/queries/space/access.d.ts.map +0 -1
- package/dist/queries/space/access.js.map +0 -1
- package/dist/queries/space/default.d.ts +0 -10
- package/dist/queries/space/default.d.ts.map +0 -1
- package/dist/queries/space/default.js +0 -25
- package/dist/queries/space/default.js.map +0 -1
- package/dist/queries/space/index.d.ts +0 -3
- package/dist/queries/space/index.d.ts.map +0 -1
- package/dist/queries/space/index.js.map +0 -1
- package/dist/rules/application/association.d.ts +0 -13
- package/dist/rules/application/association.d.ts.map +0 -1
- package/dist/rules/application/association.js +0 -10
- package/dist/rules/application/association.js.map +0 -1
- package/dist/rules/application/index.d.ts +0 -4
- package/dist/rules/application/index.d.ts.map +0 -1
- package/dist/rules/application/index.js +0 -4
- package/dist/rules/application/index.js.map +0 -1
- package/dist/rules/application/removal.d.ts +0 -11
- package/dist/rules/application/removal.d.ts.map +0 -1
- package/dist/rules/application/removal.js +0 -6
- package/dist/rules/application/removal.js.map +0 -1
- package/dist/rules/application/result.d.ts +0 -8
- package/dist/rules/application/result.d.ts.map +0 -1
- package/dist/rules/application/result.js +0 -17
- package/dist/rules/application/result.js.map +0 -1
- package/dist/rules/group/index.d.ts +0 -2
- package/dist/rules/group/index.d.ts.map +0 -1
- package/dist/rules/group/index.js +0 -2
- package/dist/rules/group/index.js.map +0 -1
- package/dist/rules/group/membership.d.ts +0 -5
- package/dist/rules/group/membership.d.ts.map +0 -1
- package/dist/rules/group/membership.js +0 -12
- package/dist/rules/group/membership.js.map +0 -1
- package/dist/rules/index.d.ts +0 -5
- package/dist/rules/index.d.ts.map +0 -1
- package/dist/rules/index.js +0 -5
- package/dist/rules/index.js.map +0 -1
- package/dist/rules/space/access.d.ts +0 -8
- package/dist/rules/space/access.d.ts.map +0 -1
- package/dist/rules/space/access.js +0 -18
- package/dist/rules/space/access.js.map +0 -1
- package/dist/rules/space/default.d.ts +0 -4
- package/dist/rules/space/default.d.ts.map +0 -1
- package/dist/rules/space/default.js +0 -7
- package/dist/rules/space/default.js.map +0 -1
- package/dist/rules/space/index.d.ts +0 -3
- package/dist/rules/space/index.d.ts.map +0 -1
- package/dist/rules/space/index.js +0 -3
- package/dist/rules/space/index.js.map +0 -1
- package/dist/rules/user/ensure.d.ts +0 -21
- package/dist/rules/user/ensure.d.ts.map +0 -1
- package/dist/rules/user/ensure.js +0 -61
- package/dist/rules/user/ensure.js.map +0 -1
- package/dist/rules/user/grant.d.ts +0 -13
- package/dist/rules/user/grant.d.ts.map +0 -1
- package/dist/rules/user/grant.js +0 -12
- package/dist/rules/user/grant.js.map +0 -1
- package/dist/rules/user/index.d.ts +0 -3
- package/dist/rules/user/index.d.ts.map +0 -1
- package/dist/rules/user/index.js +0 -3
- package/dist/rules/user/index.js.map +0 -1
- package/dist/schema/application/class.d.ts +0 -152
- package/dist/schema/application/class.d.ts.map +0 -1
- package/dist/schema/application/class.js +0 -10
- package/dist/schema/application/class.js.map +0 -1
- package/dist/schema/application/core.d.ts +0 -159
- package/dist/schema/application/core.d.ts.map +0 -1
- package/dist/schema/application/core.js +0 -13
- package/dist/schema/application/core.js.map +0 -1
- package/dist/schema/application/index.d.ts +0 -7
- package/dist/schema/application/index.d.ts.map +0 -1
- package/dist/schema/application/index.js +0 -7
- package/dist/schema/application/index.js.map +0 -1
- package/dist/schema/application/methods.d.ts +0 -171
- package/dist/schema/application/methods.d.ts.map +0 -1
- package/dist/schema/application/methods.js +0 -48
- package/dist/schema/application/methods.js.map +0 -1
- package/dist/schema/application/policies.d.ts +0 -3
- package/dist/schema/application/policies.d.ts.map +0 -1
- package/dist/schema/application/policies.js +0 -11
- package/dist/schema/application/policies.js.map +0 -1
- package/dist/schema/application/relationships.d.ts +0 -795
- package/dist/schema/application/relationships.d.ts.map +0 -1
- package/dist/schema/application/relationships.js +0 -20
- package/dist/schema/application/relationships.js.map +0 -1
- package/dist/schema/application/view.d.ts +0 -155
- package/dist/schema/application/view.d.ts.map +0 -1
- package/dist/schema/application/view.js +0 -7
- package/dist/schema/application/view.js.map +0 -1
- package/dist/schema/domain/index.d.ts.map +0 -1
- package/dist/schema/domain/index.js.map +0 -1
- package/dist/schema/group/class.d.ts.map +0 -1
- package/dist/schema/group/class.js.map +0 -1
- package/dist/schema/group/core.d.ts.map +0 -1
- package/dist/schema/group/core.js.map +0 -1
- package/dist/schema/group/index.d.ts.map +0 -1
- package/dist/schema/group/index.js.map +0 -1
- package/dist/schema/group/methods.d.ts.map +0 -1
- package/dist/schema/group/methods.js.map +0 -1
- package/dist/schema/group/policies.d.ts.map +0 -1
- package/dist/schema/group/policies.js.map +0 -1
- package/dist/schema/group/relationships.d.ts.map +0 -1
- package/dist/schema/group/relationships.js.map +0 -1
- package/dist/schema/group/view.d.ts.map +0 -1
- package/dist/schema/group/view.js.map +0 -1
- package/dist/schema/home/index.d.ts.map +0 -1
- package/dist/schema/home/index.js.map +0 -1
- package/dist/schema/home/view.d.ts.map +0 -1
- package/dist/schema/home/view.js.map +0 -1
- package/dist/schema/index.d.ts.map +0 -1
- package/dist/schema/index.js.map +0 -1
- package/dist/schema/space/class.d.ts.map +0 -1
- package/dist/schema/space/class.js.map +0 -1
- package/dist/schema/space/core.d.ts.map +0 -1
- package/dist/schema/space/core.js.map +0 -1
- package/dist/schema/space/index.d.ts.map +0 -1
- package/dist/schema/space/index.js.map +0 -1
- package/dist/schema/space/methods.d.ts.map +0 -1
- package/dist/schema/space/methods.js.map +0 -1
- package/dist/schema/space/policies.d.ts.map +0 -1
- package/dist/schema/space/policies.js.map +0 -1
- package/dist/schema/space/relationships.d.ts.map +0 -1
- package/dist/schema/space/relationships.js.map +0 -1
- package/dist/schema/space/view.d.ts.map +0 -1
- package/dist/schema/space/view.js.map +0 -1
- package/dist/schema/user/administrator.d.ts +0 -30
- package/dist/schema/user/administrator.d.ts.map +0 -1
- package/dist/schema/user/administrator.js +0 -19
- package/dist/schema/user/administrator.js.map +0 -1
- package/dist/schema/user/class.d.ts.map +0 -1
- package/dist/schema/user/class.js.map +0 -1
- package/dist/schema/user/ensure.d.ts +0 -37
- package/dist/schema/user/ensure.d.ts.map +0 -1
- package/dist/schema/user/ensure.js +0 -28
- package/dist/schema/user/ensure.js.map +0 -1
- package/dist/schema/user/index.d.ts.map +0 -1
- package/dist/schema/user/index.js.map +0 -1
- package/dist/schema/user/interface.d.ts +0 -10
- package/dist/schema/user/interface.d.ts.map +0 -1
- package/dist/schema/user/interface.js +0 -12
- package/dist/schema/user/interface.js.map +0 -1
- package/dist/schema/user/view.d.ts.map +0 -1
- package/dist/schema/user/view.js.map +0 -1
- package/dist/tests/cross-layer/public.test.d.ts +0 -2
- package/dist/tests/cross-layer/public.test.d.ts.map +0 -1
- package/dist/tests/cross-layer/public.test.js +0 -70
- package/dist/tests/cross-layer/public.test.js.map +0 -1
- package/dist/tests/cross-layer/workflows.test.d.ts +0 -2
- package/dist/tests/cross-layer/workflows.test.d.ts.map +0 -1
- package/dist/tests/cross-layer/workflows.test.js +0 -290
- package/dist/tests/cross-layer/workflows.test.js.map +0 -1
- package/dist/tests/index.d.ts +0 -3
- package/dist/tests/index.d.ts.map +0 -1
- package/dist/tests/index.js +0 -3
- package/dist/tests/index.js.map +0 -1
- package/dist/utils/graph-endpoint/index.d.ts +0 -13
- package/dist/utils/graph-endpoint/index.d.ts.map +0 -1
- package/dist/utils/graph-endpoint/index.js +0 -6
- package/dist/utils/graph-endpoint/index.js.map +0 -1
- package/dist/utils/index.d.ts +0 -3
- package/dist/utils/index.d.ts.map +0 -1
- package/dist/utils/index.js +0 -3
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/query-page/index.d.ts +0 -3
- package/dist/utils/query-page/index.d.ts.map +0 -1
- package/dist/utils/query-page/index.js +0 -2
- package/dist/utils/query-page/index.js.map +0 -1
- package/dist/utils/query-page/nodes.d.ts +0 -16
- package/dist/utils/query-page/nodes.d.ts.map +0 -1
- package/dist/utils/query-page/nodes.js +0 -22
- package/dist/utils/query-page/nodes.js.map +0 -1
- package/dist/workflows/application/errors.d.ts +0 -5
- package/dist/workflows/application/errors.d.ts.map +0 -1
- package/dist/workflows/application/errors.js +0 -25
- package/dist/workflows/application/errors.js.map +0 -1
- package/dist/workflows/application/index.d.ts +0 -3
- package/dist/workflows/application/index.d.ts.map +0 -1
- package/dist/workflows/application/index.js +0 -3
- package/dist/workflows/application/index.js.map +0 -1
- package/dist/workflows/application/install.d.ts +0 -3
- package/dist/workflows/application/install.d.ts.map +0 -1
- package/dist/workflows/application/install.js +0 -37
- package/dist/workflows/application/install.js.map +0 -1
- package/dist/workflows/application/uninstall.d.ts +0 -4
- package/dist/workflows/application/uninstall.d.ts.map +0 -1
- package/dist/workflows/application/uninstall.js +0 -25
- package/dist/workflows/application/uninstall.js.map +0 -1
- package/dist/workflows/group/assign-user.d.ts +0 -8
- package/dist/workflows/group/assign-user.d.ts.map +0 -1
- package/dist/workflows/group/assign-user.js +0 -32
- package/dist/workflows/group/assign-user.js.map +0 -1
- package/dist/workflows/group/ensure-administrator.d.ts +0 -4
- package/dist/workflows/group/ensure-administrator.d.ts.map +0 -1
- package/dist/workflows/group/ensure-administrator.js +0 -26
- package/dist/workflows/group/ensure-administrator.js.map +0 -1
- package/dist/workflows/group/errors.d.ts +0 -2
- package/dist/workflows/group/errors.d.ts.map +0 -1
- package/dist/workflows/group/errors.js +0 -7
- package/dist/workflows/group/errors.js.map +0 -1
- package/dist/workflows/group/index.d.ts +0 -4
- package/dist/workflows/group/index.d.ts.map +0 -1
- package/dist/workflows/group/index.js.map +0 -1
- package/dist/workflows/group/unassign-user.d.ts +0 -8
- package/dist/workflows/group/unassign-user.d.ts.map +0 -1
- package/dist/workflows/group/unassign-user.js +0 -32
- package/dist/workflows/group/unassign-user.js.map +0 -1
- package/dist/workflows/index.d.ts +0 -4
- package/dist/workflows/index.d.ts.map +0 -1
- package/dist/workflows/index.js.map +0 -1
- package/dist/workflows/space/add-user.d.ts +0 -8
- package/dist/workflows/space/add-user.d.ts.map +0 -1
- package/dist/workflows/space/add-user.js +0 -34
- package/dist/workflows/space/add-user.js.map +0 -1
- package/dist/workflows/space/errors.d.ts +0 -3
- package/dist/workflows/space/errors.d.ts.map +0 -1
- package/dist/workflows/space/errors.js +0 -10
- package/dist/workflows/space/errors.js.map +0 -1
- package/dist/workflows/space/index.d.ts +0 -4
- package/dist/workflows/space/index.d.ts.map +0 -1
- package/dist/workflows/space/index.js.map +0 -1
- package/dist/workflows/space/remove-user.d.ts +0 -8
- package/dist/workflows/space/remove-user.d.ts.map +0 -1
- package/dist/workflows/space/remove-user.js +0 -62
- package/dist/workflows/space/remove-user.js.map +0 -1
- package/dist/workflows/space/set-default.d.ts +0 -9
- package/dist/workflows/space/set-default.d.ts.map +0 -1
- package/dist/workflows/space/set-default.js +0 -43
- package/dist/workflows/space/set-default.js.map +0 -1
package/dist/schema/user/view.js
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { InvocationError } from '@astrale-os/sdk/execution';
|
|
2
|
+
import { changeGroupMembership } from '#mutations/group';
|
|
3
|
+
import { observeUserGroups } from '#queries/user';
|
|
4
|
+
export async function changeMembership(context, present) {
|
|
5
|
+
const observed = await context.step.run('observe-membership', () => context.query(observeUserGroups(context.domain), context.input.user));
|
|
6
|
+
const wasPresent = includes(observed.groups, context.self);
|
|
7
|
+
if (wasPresent === present)
|
|
8
|
+
return Object.freeze({});
|
|
9
|
+
const result = await context.step.run('change-membership', () => context.mutate(changeGroupMembership(context.domain), {
|
|
10
|
+
user: context.input.user,
|
|
11
|
+
group: context.self,
|
|
12
|
+
present,
|
|
13
|
+
guard: observed.guard,
|
|
14
|
+
}));
|
|
15
|
+
if (result.ok)
|
|
16
|
+
return Object.freeze({});
|
|
17
|
+
if (result.outcomeKnown)
|
|
18
|
+
return membershipConflict(result.code);
|
|
19
|
+
const recovered = await context.step.run('recover-membership', () => context.query(observeUserGroups(context.domain), context.input.user));
|
|
20
|
+
if (includes(recovered.groups, context.self) === present)
|
|
21
|
+
return Object.freeze({});
|
|
22
|
+
throw new InvocationError('BACKEND_UNAVAILABLE', 'Group membership outcome remains unknown after exact observation.', { reason: { code: result.code, details: {} } });
|
|
23
|
+
}
|
|
24
|
+
function includes(groups, group) {
|
|
25
|
+
return groups.some(({ id }) => id === group);
|
|
26
|
+
}
|
|
27
|
+
function membershipConflict(code) {
|
|
28
|
+
throw new InvocationError('CONFLICT', 'Group membership conflicted with concurrent graph state.', {
|
|
29
|
+
reason: { code, details: {} },
|
|
30
|
+
});
|
|
31
|
+
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export { assignGroupUserWorkflow } from './assign
|
|
2
|
-
export {
|
|
3
|
-
export { unassignGroupUserWorkflow } from './unassign
|
|
4
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export { assignGroupUserWorkflow } from './assign.js';
|
|
2
|
+
export { changeMembership } from './change.js';
|
|
3
|
+
export { unassignGroupUserWorkflow } from './unassign.js';
|
package/dist/workflows/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
export * from '#workflows/group';
|
|
2
|
+
export * from '#workflows/setup';
|
|
3
|
+
export * from '#workflows/space';
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
export function planUserSetup(domain, input, role, observation) {
|
|
2
|
+
const profile = observation.profile;
|
|
3
|
+
if (profile.class !== domain.classes.User.key) {
|
|
4
|
+
return conflict('IDENTITY_CLASS_CONFLICT', 'The asserted identity already belongs to a non-Shell User Class.');
|
|
5
|
+
}
|
|
6
|
+
const identityIssuer = profile.props[domain.classes.User.properties.iss.key];
|
|
7
|
+
const identitySubject = profile.props[domain.classes.User.properties.sub.key];
|
|
8
|
+
if (identityIssuer !== input.issuer || identitySubject !== input.subject) {
|
|
9
|
+
return conflict('IDENTITY_FACT_CONFLICT', 'The resolved Shell User does not retain the asserted issuer and subject.');
|
|
10
|
+
}
|
|
11
|
+
if (observation.home.spaces.length > 1) {
|
|
12
|
+
return conflict('MULTIPLE_DEFAULT_SPACES', 'The Shell User has more than one default personal Space.');
|
|
13
|
+
}
|
|
14
|
+
const currentHome = observation.home.spaces[0];
|
|
15
|
+
if (currentHome !== undefined && currentHome.class !== domain.classes.Space.key) {
|
|
16
|
+
return conflict('DEFAULT_SPACE_CLASS_CONFLICT', 'The Shell User default target is not a Shell Space.');
|
|
17
|
+
}
|
|
18
|
+
const candidates = currentHome === undefined
|
|
19
|
+
? observation.ownedSpaces.spaces.filter((space) => space.class === domain.classes.Space.key &&
|
|
20
|
+
space.props[domain.classes.Space.properties.name.key] === input.personalSpaceName)
|
|
21
|
+
: [];
|
|
22
|
+
if (candidates.length > 1) {
|
|
23
|
+
return conflict('AMBIGUOUS_PERSONAL_SPACE', 'More than one owned Space matches the requested personal Space name.');
|
|
24
|
+
}
|
|
25
|
+
const home = currentHome ?? candidates[0];
|
|
26
|
+
const currentDisplayName = profile.props[domain.classes.User.properties.displayName.key];
|
|
27
|
+
if (currentDisplayName !== undefined && typeof currentDisplayName !== 'string') {
|
|
28
|
+
throw new TypeError('Shell User displayName is not a string.');
|
|
29
|
+
}
|
|
30
|
+
const member = hasGroup(domain, observation.groups.groups, 'core.member');
|
|
31
|
+
const admin = hasGroup(domain, observation.groups.groups, 'core.admin');
|
|
32
|
+
const ownsHome = home !== undefined && observation.ownedSpaces.spaces.some((space) => space.id === home.id);
|
|
33
|
+
let homeName;
|
|
34
|
+
if (home !== undefined) {
|
|
35
|
+
const value = home.props[domain.classes.Space.properties.name.key];
|
|
36
|
+
if (typeof value !== 'string') {
|
|
37
|
+
throw new TypeError('Shell personal Space name is not a string.');
|
|
38
|
+
}
|
|
39
|
+
homeName = value;
|
|
40
|
+
}
|
|
41
|
+
const displayName = currentDisplayName === input.displayName ? undefined : input.displayName;
|
|
42
|
+
const desiredHomeName = homeName === input.personalSpaceName ? undefined : input.personalSpaceName;
|
|
43
|
+
const addDefault = currentHome === undefined;
|
|
44
|
+
const addOwnership = home === undefined || !ownsHome;
|
|
45
|
+
const addMember = !member;
|
|
46
|
+
const addAdmin = role === 'admin' && !admin;
|
|
47
|
+
if (displayName === undefined &&
|
|
48
|
+
desiredHomeName === undefined &&
|
|
49
|
+
!addDefault &&
|
|
50
|
+
!addOwnership &&
|
|
51
|
+
!addMember &&
|
|
52
|
+
!addAdmin) {
|
|
53
|
+
return Object.freeze({ kind: 'unchanged', personalSpaceId: home.id });
|
|
54
|
+
}
|
|
55
|
+
return Object.freeze({
|
|
56
|
+
kind: 'repair',
|
|
57
|
+
repair: Object.freeze({
|
|
58
|
+
userId: profile.id,
|
|
59
|
+
...(currentDisplayName === undefined ? {} : { currentDisplayName }),
|
|
60
|
+
...(displayName === undefined ? {} : { displayName }),
|
|
61
|
+
home: home === undefined
|
|
62
|
+
? Object.freeze({ kind: 'create', name: input.personalSpaceName })
|
|
63
|
+
: Object.freeze({
|
|
64
|
+
kind: 'existing',
|
|
65
|
+
id: home.id,
|
|
66
|
+
currentName: homeName,
|
|
67
|
+
...(desiredHomeName === undefined ? {} : { name: desiredHomeName }),
|
|
68
|
+
}),
|
|
69
|
+
addDefault,
|
|
70
|
+
addOwnership,
|
|
71
|
+
addMember,
|
|
72
|
+
addAdmin,
|
|
73
|
+
guards: Object.freeze({
|
|
74
|
+
home: observation.home.guard,
|
|
75
|
+
ownedSpaces: observation.ownedSpaces.guard,
|
|
76
|
+
groups: observation.groups.guard,
|
|
77
|
+
}),
|
|
78
|
+
}),
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
function hasGroup(domain, groups, subject) {
|
|
82
|
+
return groups.some((group) => group.class === domain.classes.Group.key &&
|
|
83
|
+
group.props[domain.classes.Group.properties.iss.key] === domain.origin &&
|
|
84
|
+
group.props[domain.classes.Group.properties.sub.key] === subject);
|
|
85
|
+
}
|
|
86
|
+
function conflict(reason, message) {
|
|
87
|
+
return Object.freeze({ kind: 'conflict', reason, message });
|
|
88
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { issuer } from '@astrale-os/sdk/auth';
|
|
2
|
+
import { LocalBinding } from '@astrale-os/sdk/graph';
|
|
3
|
+
import { Path } from '@astrale-os/sdk/graph/path';
|
|
4
|
+
import { MutationAST } from '@astrale-os/sdk/mutation';
|
|
5
|
+
const user = LocalBinding('user');
|
|
6
|
+
const personalSpace = LocalBinding('personalSpace');
|
|
7
|
+
export function provisioningRequest(domain, input, role) {
|
|
8
|
+
const mutation = MutationAST.build((change) => {
|
|
9
|
+
const createdUser = change.createNode({
|
|
10
|
+
as: user,
|
|
11
|
+
class: domain.classes.User.key,
|
|
12
|
+
props: domain.classes.User.properties.from({ displayName: input.displayName }),
|
|
13
|
+
});
|
|
14
|
+
const createdSpace = change.createNode({
|
|
15
|
+
as: personalSpace,
|
|
16
|
+
class: domain.classes.Space.key,
|
|
17
|
+
props: domain.classes.Space.properties.from({ name: input.personalSpaceName }),
|
|
18
|
+
});
|
|
19
|
+
change.createEdge({
|
|
20
|
+
class: domain.classes.owns_space.key,
|
|
21
|
+
source: createdUser,
|
|
22
|
+
target: createdSpace,
|
|
23
|
+
});
|
|
24
|
+
change.createEdge({
|
|
25
|
+
class: domain.classes.default_space.key,
|
|
26
|
+
source: createdUser,
|
|
27
|
+
target: createdSpace,
|
|
28
|
+
});
|
|
29
|
+
change.createEdge({
|
|
30
|
+
class: domain.classes.member_of_group.key,
|
|
31
|
+
source: createdUser,
|
|
32
|
+
target: Path.project(domain.core.nodes.member.ref),
|
|
33
|
+
});
|
|
34
|
+
if (role === 'admin') {
|
|
35
|
+
change.createEdge({
|
|
36
|
+
class: domain.classes.member_of_group.key,
|
|
37
|
+
source: createdUser,
|
|
38
|
+
target: Path.project(domain.core.nodes.admin.ref),
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
return Object.freeze({
|
|
43
|
+
idempotencyKey: input.operationId,
|
|
44
|
+
mutation,
|
|
45
|
+
identities: Object.freeze({
|
|
46
|
+
[user]: Object.freeze({ issuer: issuer.accept(input.issuer), subject: input.subject }),
|
|
47
|
+
}),
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
export function provisioningResult(result) {
|
|
51
|
+
const userId = result.createdNodes[user];
|
|
52
|
+
const personalSpaceId = result.createdNodes[personalSpace];
|
|
53
|
+
if (userId === undefined || personalSpaceId === undefined) {
|
|
54
|
+
throw new TypeError('Shell provisioning omitted its User or personal Space identity.');
|
|
55
|
+
}
|
|
56
|
+
return Object.freeze({ userId, personalSpaceId, changed: true });
|
|
57
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { issuer } from '@astrale-os/sdk/auth';
|
|
2
|
+
import { ResponseError, TransportError } from '@astrale-os/sdk/client';
|
|
3
|
+
import { InvocationError } from '@astrale-os/sdk/execution';
|
|
4
|
+
import { Path } from '@astrale-os/sdk/graph/path';
|
|
5
|
+
import { repairUser } from '#mutations/user';
|
|
6
|
+
import { observeUserSetup } from '#queries/user';
|
|
7
|
+
import { planUserSetup } from './plan.js';
|
|
8
|
+
import { provisioningRequest, provisioningResult } from './provision.js';
|
|
9
|
+
export async function runSetup(context, role) {
|
|
10
|
+
const { client, input, step } = context;
|
|
11
|
+
const identity = Object.freeze({
|
|
12
|
+
issuer: issuer.accept(input.issuer),
|
|
13
|
+
subject: input.subject,
|
|
14
|
+
});
|
|
15
|
+
const existing = await step.run('resolve-identity', () => client.auth.whois(identity));
|
|
16
|
+
if (existing === null) {
|
|
17
|
+
try {
|
|
18
|
+
const provisioned = await step.run('provision-identity', () => client.auth.provision(provisioningRequest(context.domain, input, role)));
|
|
19
|
+
return provisioningResult(provisioned);
|
|
20
|
+
}
|
|
21
|
+
catch (cause) {
|
|
22
|
+
if (!recoverableProvisionFailure(cause))
|
|
23
|
+
throw cause;
|
|
24
|
+
const recovered = await step.run('recover-provisioned-identity', () => client.auth.whois(identity));
|
|
25
|
+
if (recovered === null)
|
|
26
|
+
throw cause;
|
|
27
|
+
return convergeExisting(context, role, recovered.id, true);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return convergeExisting(context, role, existing.id, false);
|
|
31
|
+
}
|
|
32
|
+
async function convergeExisting(context, role, userId, changedBeforeObservation) {
|
|
33
|
+
const observed = await context.step.run('observe-user-setup', () => context.query(observeUserSetup(context.domain), Path.id(userId).raw));
|
|
34
|
+
const plan = planUserSetup(context.domain, context.input, role, observed);
|
|
35
|
+
if (plan.kind === 'conflict')
|
|
36
|
+
return setupConflict(plan);
|
|
37
|
+
if (plan.kind === 'unchanged') {
|
|
38
|
+
return Object.freeze({
|
|
39
|
+
userId,
|
|
40
|
+
personalSpaceId: plan.personalSpaceId,
|
|
41
|
+
changed: changedBeforeObservation,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
const repaired = await context.step.run('repair-user-setup', () => context.mutate(repairUser(context.domain), plan.repair));
|
|
45
|
+
if (repaired.ok) {
|
|
46
|
+
return Object.freeze({ userId, personalSpaceId: repaired.personalSpaceId, changed: true });
|
|
47
|
+
}
|
|
48
|
+
if (repaired.outcomeKnown) {
|
|
49
|
+
throw new InvocationError('CONFLICT', 'Shell User setup conflicted with concurrent graph state.', {
|
|
50
|
+
reason: { code: repaired.code, details: {} },
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
const recovered = await context.step.run('recover-user-repair', () => context.query(observeUserSetup(context.domain), Path.id(userId).raw));
|
|
54
|
+
const recoveredPlan = planUserSetup(context.domain, context.input, role, recovered);
|
|
55
|
+
if (recoveredPlan.kind === 'conflict')
|
|
56
|
+
return setupConflict(recoveredPlan);
|
|
57
|
+
if (recoveredPlan.kind === 'unchanged') {
|
|
58
|
+
return Object.freeze({ userId, personalSpaceId: recoveredPlan.personalSpaceId, changed: true });
|
|
59
|
+
}
|
|
60
|
+
throw new InvocationError('BACKEND_UNAVAILABLE', 'Shell User setup outcome remains unknown after exact state observation.', { reason: { code: repaired.code, details: {} } });
|
|
61
|
+
}
|
|
62
|
+
function setupConflict(plan) {
|
|
63
|
+
throw new InvocationError('CONFLICT', plan.message, {
|
|
64
|
+
reason: { code: plan.reason, details: {} },
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function recoverableProvisionFailure(cause) {
|
|
68
|
+
if (cause instanceof TransportError) {
|
|
69
|
+
return cause.context.kind === 'invocation' && cause.context.delivery === 'unknown';
|
|
70
|
+
}
|
|
71
|
+
return (cause instanceof ResponseError &&
|
|
72
|
+
(cause.reason?.code === 'PROVISION_CONFLICT' ||
|
|
73
|
+
cause.reason?.code === 'PROVISION_PRECONDITION_FAILED'));
|
|
74
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { InvocationError } from '@astrale-os/sdk/execution';
|
|
2
|
+
import { changeSpaceAccess } from '#mutations/space';
|
|
3
|
+
import { observeDirectSpaceAccess } from '#queries/space';
|
|
4
|
+
export async function setUserAccess(context, desired) {
|
|
5
|
+
const observed = await context.step.run('observe-space-access', () => context.query(observeDirectSpaceAccess(context.domain), context.input.user));
|
|
6
|
+
const current = state(observed, context.self);
|
|
7
|
+
if (current === desired)
|
|
8
|
+
return Object.freeze({});
|
|
9
|
+
const result = await context.step.run('change-space-access', () => context.mutate(changeSpaceAccess(context.domain), {
|
|
10
|
+
user: context.input.user,
|
|
11
|
+
space: context.self,
|
|
12
|
+
addMember: desired === 'member' && current !== 'member',
|
|
13
|
+
removeMember: current === 'member' && desired !== 'member',
|
|
14
|
+
addAdmin: desired === 'admin' && current !== 'admin',
|
|
15
|
+
removeAdmin: current === 'admin' && desired !== 'admin',
|
|
16
|
+
guards: { member: observed.member.guard, admin: observed.admin.guard },
|
|
17
|
+
}));
|
|
18
|
+
if (result.ok)
|
|
19
|
+
return Object.freeze({});
|
|
20
|
+
if (result.outcomeKnown)
|
|
21
|
+
return accessConflict(result.code);
|
|
22
|
+
const recovered = await context.step.run('recover-space-access', () => context.query(observeDirectSpaceAccess(context.domain), context.input.user));
|
|
23
|
+
if (state(recovered, context.self) === desired)
|
|
24
|
+
return Object.freeze({});
|
|
25
|
+
throw new InvocationError('BACKEND_UNAVAILABLE', 'Space access outcome remains unknown after exact observation.', { reason: { code: result.code, details: {} } });
|
|
26
|
+
}
|
|
27
|
+
function state(observation, space) {
|
|
28
|
+
const member = observation.member.spaces.some(({ id }) => id === space);
|
|
29
|
+
const admin = observation.admin.spaces.some(({ id }) => id === space);
|
|
30
|
+
if (member && admin) {
|
|
31
|
+
throw new InvocationError('CONFLICT', 'The User has conflicting direct Space access edges.', {
|
|
32
|
+
reason: { code: 'SPACE_ACCESS_AMBIGUOUS', details: {} },
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
return admin ? 'admin' : member ? 'member' : null;
|
|
36
|
+
}
|
|
37
|
+
function accessConflict(code) {
|
|
38
|
+
throw new InvocationError('CONFLICT', 'Space access conflicted with concurrent graph state.', {
|
|
39
|
+
reason: { code, details: {} },
|
|
40
|
+
});
|
|
41
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { InvocationError } from '@astrale-os/sdk/execution';
|
|
2
|
+
import { Path } from '@astrale-os/sdk/graph/path';
|
|
3
|
+
import { defineWorkflow } from '@astrale-os/sdk/workflow';
|
|
4
|
+
import { changeDefaultSpace } from '#mutations/space';
|
|
5
|
+
import { observeHome } from '#queries/user';
|
|
6
|
+
async function setDefault(context) {
|
|
7
|
+
const user = context.caller.principal;
|
|
8
|
+
const observed = await context.step.run('observe-default-space', () => context.query(observeHome(context.domain), Path.id(user).raw));
|
|
9
|
+
if (observed.spaces.length > 1) {
|
|
10
|
+
throw new InvocationError('CONFLICT', 'The Shell User has more than one default Space.', {
|
|
11
|
+
reason: { code: 'MULTIPLE_DEFAULT_SPACES', details: {} },
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
if (observed.spaces[0]?.id === context.self)
|
|
15
|
+
return Object.freeze({});
|
|
16
|
+
const result = await context.step.run('change-default-space', () => context.mutate(changeDefaultSpace(context.domain), {
|
|
17
|
+
user,
|
|
18
|
+
...(observed.spaces[0] === undefined ? {} : { previous: observed.spaces[0].id }),
|
|
19
|
+
next: context.self,
|
|
20
|
+
guard: observed.guard,
|
|
21
|
+
}));
|
|
22
|
+
if (result.ok)
|
|
23
|
+
return Object.freeze({});
|
|
24
|
+
if (result.outcomeKnown)
|
|
25
|
+
return defaultConflict(result.code);
|
|
26
|
+
const recovered = await context.step.run('recover-default-space', () => context.query(observeHome(context.domain), Path.id(user).raw));
|
|
27
|
+
if (recovered.spaces.length === 1 && recovered.spaces[0]?.id === context.self) {
|
|
28
|
+
return Object.freeze({});
|
|
29
|
+
}
|
|
30
|
+
throw new InvocationError('BACKEND_UNAVAILABLE', 'Default Space outcome remains unknown after exact observation.', { reason: { code: result.code, details: {} } });
|
|
31
|
+
}
|
|
32
|
+
function defaultConflict(code) {
|
|
33
|
+
throw new InvocationError('CONFLICT', 'Default Space conflicted with concurrent graph state.', {
|
|
34
|
+
reason: { code, details: {} },
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
export const setDefaultSpaceWorkflow = defineWorkflow()('Space.setDefault', setDefault);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export { setDefaultSpaceWorkflow } from './
|
|
4
|
-
|
|
1
|
+
export { setUserAccess } from './access.js';
|
|
2
|
+
export { addSpaceUserWorkflow } from './add.js';
|
|
3
|
+
export { setDefaultSpaceWorkflow } from './default.js';
|
|
4
|
+
export { removeSpaceUserWorkflow } from './remove.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-domains/shell",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.7",
|
|
4
4
|
"description": "Astrale Shell Domain schema and remote product implementation",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -15,34 +15,12 @@
|
|
|
15
15
|
"main": "./dist/index.js",
|
|
16
16
|
"types": "./dist/index.d.ts",
|
|
17
17
|
"imports": {
|
|
18
|
-
"#capabilities": "./dist/capabilities/index.js",
|
|
19
|
-
"#capabilities/*": "./dist/capabilities/*/index.js",
|
|
20
|
-
"#functions": "./dist/functions/index.js",
|
|
21
|
-
"#functions/*": "./dist/functions/*/index.js",
|
|
22
|
-
"#integrations": "./dist/integrations/index.js",
|
|
23
|
-
"#integrations/*": "./dist/integrations/*/index.js",
|
|
24
|
-
"#migrations": "./dist/migrations/index.js",
|
|
25
|
-
"#migrations/*": "./dist/migrations/*/index.js",
|
|
26
18
|
"#mutations": "./dist/mutations/index.js",
|
|
27
19
|
"#mutations/*": "./dist/mutations/*/index.js",
|
|
28
20
|
"#queries": "./dist/queries/index.js",
|
|
29
21
|
"#queries/*": "./dist/queries/*/index.js",
|
|
30
|
-
"#rules": "./dist/rules/index.js",
|
|
31
|
-
"#rules/*": "./dist/rules/*/index.js",
|
|
32
22
|
"#schema": "./dist/schema/index.js",
|
|
33
23
|
"#schema/*": "./dist/schema/*/index.js",
|
|
34
|
-
"#scripts": "./dist/scripts/index.js",
|
|
35
|
-
"#scripts/*": "./dist/scripts/*/index.js",
|
|
36
|
-
"#states": "./dist/states/index.js",
|
|
37
|
-
"#states/*": "./dist/states/*/index.js",
|
|
38
|
-
"#tests": "./dist/tests/index.js",
|
|
39
|
-
"#tests/*": "./dist/tests/*/index.js",
|
|
40
|
-
"#ui": "./dist/ui/index.js",
|
|
41
|
-
"#ui/*": "./dist/ui/*/index.js",
|
|
42
|
-
"#utils": "./dist/utils/index.js",
|
|
43
|
-
"#utils/*": "./dist/utils/*/index.js",
|
|
44
|
-
"#views": "./dist/views/index.js",
|
|
45
|
-
"#views/*": "./dist/views/*/index.js",
|
|
46
24
|
"#workflows": "./dist/workflows/index.js",
|
|
47
25
|
"#workflows/*": "./dist/workflows/*/index.js"
|
|
48
26
|
},
|
|
@@ -58,23 +36,26 @@
|
|
|
58
36
|
"registry": "https://registry.npmjs.org"
|
|
59
37
|
},
|
|
60
38
|
"dependencies": {
|
|
61
|
-
"@astrale-os/sdk": ">=0.5.0-beta.13 <1.0.0",
|
|
62
39
|
"zod": "4.4.3"
|
|
63
40
|
},
|
|
64
41
|
"devDependencies": {
|
|
65
|
-
"@astrale/
|
|
66
|
-
"@typescript
|
|
67
|
-
"typescript": "
|
|
68
|
-
"vitest": "
|
|
42
|
+
"@astrale-os/sdk": "0.5.0-beta.19",
|
|
43
|
+
"@astrale/typescript-config": "npm:@jsr/astrale__typescript-config@~1.1.3",
|
|
44
|
+
"typescript": "7.0.2",
|
|
45
|
+
"vitest": "4.1.10"
|
|
46
|
+
},
|
|
47
|
+
"peerDependencies": {
|
|
48
|
+
"@astrale-os/sdk": ">=0.5.0-beta.19 <1.0.0"
|
|
69
49
|
},
|
|
70
50
|
"engines": {
|
|
71
51
|
"node": ">=24"
|
|
72
52
|
},
|
|
73
53
|
"scripts": {
|
|
74
|
-
"
|
|
54
|
+
"prebuild": "pnpm clean",
|
|
55
|
+
"build": "tsc --paths null && astrale-domain package",
|
|
75
56
|
"clean": "rm -rf dist",
|
|
76
|
-
"typecheck": "
|
|
77
|
-
"test": "vitest run --config vitest.config.ts",
|
|
78
|
-
"test:file": "vitest run --config vitest.config.ts"
|
|
57
|
+
"typecheck": "tsc --noEmit --paths null",
|
|
58
|
+
"test": "NODE_PATH=$PWD/node_modules vitest run --config vitest.config.ts",
|
|
59
|
+
"test:file": "NODE_PATH=$PWD/node_modules vitest run --config vitest.config.ts"
|
|
79
60
|
}
|
|
80
61
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../functions/application/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../functions/application/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ShellWorkflowExecution } from '#functions/execution';
|
|
2
|
-
import type { InstallApplicationInput, InstallApplicationResult } from '#schema/application';
|
|
3
|
-
export declare function installApplication(execution: ShellWorkflowExecution, input: InstallApplicationInput): Promise<InstallApplicationResult>;
|
|
4
|
-
//# sourceMappingURL=install.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../../functions/application/install.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,KAAK,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAA;AAI5F,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,sBAAsB,EACjC,KAAK,EAAE,uBAAuB,GAC7B,OAAO,CAAC,wBAAwB,CAAC,CAQnC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { installApplicationWorkflow } from '#workflows/application';
|
|
2
|
-
export function installApplication(execution, input) {
|
|
3
|
-
return execution.workflow.run(installApplicationWorkflow, {
|
|
4
|
-
input,
|
|
5
|
-
capabilities: {},
|
|
6
|
-
query: execution.query,
|
|
7
|
-
mutate: execution.mutate,
|
|
8
|
-
...(execution.signal === undefined ? {} : { signal: execution.signal }),
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=install.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../../functions/application/install.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAA;AAEnE,MAAM,UAAU,kBAAkB,CAChC,SAAiC,EACjC,KAA8B;IAE9B,OAAO,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,0BAA0B,EAAE;QACxD,KAAK;QACL,YAAY,EAAE,EAAE;QAChB,KAAK,EAAE,SAAS,CAAC,KAAK;QACtB,MAAM,EAAE,SAAS,CAAC,MAAM;QACxB,GAAG,CAAC,SAAS,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC;KACxE,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { NodeId } from '@astrale-os/sdk/graph/node';
|
|
2
|
-
import type { ShellWorkflowExecution } from '#functions/execution';
|
|
3
|
-
import type { UninstallApplicationResult } from '#schema/application';
|
|
4
|
-
export declare function uninstallApplication(execution: ShellWorkflowExecution, application: NodeId): Promise<UninstallApplicationResult>;
|
|
5
|
-
//# sourceMappingURL=uninstall.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.d.ts","sourceRoot":"","sources":["../../../functions/application/uninstall.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAExD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAA;AAIrE,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,sBAAsB,EACjC,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,0BAA0B,CAAC,CAQrC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { uninstallApplicationWorkflow } from '#workflows/application';
|
|
2
|
-
export function uninstallApplication(execution, application) {
|
|
3
|
-
return execution.workflow.run(uninstallApplicationWorkflow, {
|
|
4
|
-
input: application,
|
|
5
|
-
capabilities: {},
|
|
6
|
-
query: execution.query,
|
|
7
|
-
mutate: execution.mutate,
|
|
8
|
-
...(execution.signal === undefined ? {} : { signal: execution.signal }),
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=uninstall.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uninstall.js","sourceRoot":"","sources":["../../../functions/application/uninstall.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,4BAA4B,EAAE,MAAM,wBAAwB,CAAA;AAErE,MAAM,UAAU,oBAAoB,CAClC,SAAiC,EACjC,WAAmB;IAEnB,OAAO,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,4BAA4B,EAAE;QAC1D,KAAK,EAAE,WAAW;QAClB,YAAY,EAAE,EAAE;QAChB,KAAK,EAAE,SAAS,CAAC,KAAK;QACtB,MAAM,EAAE,SAAS,CAAC,MAAM;QACxB,GAAG,CAAC,SAAS,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC;KACxE,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { MutationExecutor } from '@astrale-os/sdk/mutation';
|
|
2
|
-
import type { QueryExecutor } from '@astrale-os/sdk/query';
|
|
3
|
-
import type { WorkflowRunner } from '@astrale-os/sdk/workflow';
|
|
4
|
-
import type { WorkflowStep } from '@astrale-os/sdk/workflow/step';
|
|
5
|
-
export interface ShellWorkflowExecution {
|
|
6
|
-
readonly mutate: MutationExecutor;
|
|
7
|
-
readonly query: QueryExecutor;
|
|
8
|
-
readonly signal?: AbortSignal;
|
|
9
|
-
readonly workflow: WorkflowRunner;
|
|
10
|
-
}
|
|
11
|
-
export interface ShellDirectExecution {
|
|
12
|
-
readonly query: QueryExecutor;
|
|
13
|
-
readonly step: WorkflowStep;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../functions/execution/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAChE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAEjE,MAAM,WAAW,sBAAsB;IACrC,QAAQ,CAAC,MAAM,EAAE,gBAAgB,CAAA;IACjC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAA;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,WAAW,CAAA;IAC7B,QAAQ,CAAC,QAAQ,EAAE,cAAc,CAAA;CAClC;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAA;IAC7B,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAA;CAC5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../functions/execution/index.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { NodeId } from '@astrale-os/sdk/graph/node';
|
|
2
|
-
import type { ShellWorkflowExecution } from '#functions/execution';
|
|
3
|
-
import type { GroupMembershipInput, GroupMembershipResult } from '#schema/group';
|
|
4
|
-
export declare function assignGroupUser(execution: ShellWorkflowExecution, group: NodeId, input: GroupMembershipInput): Promise<GroupMembershipResult>;
|
|
5
|
-
//# sourceMappingURL=assign-user.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assign-user.d.ts","sourceRoot":"","sources":["../../../functions/group/assign-user.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAExD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAIhF,wBAAgB,eAAe,CAC7B,SAAS,EAAE,sBAAsB,EACjC,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,oBAAoB,GAC1B,OAAO,CAAC,qBAAqB,CAAC,CAQhC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { assignGroupUserWorkflow } from '#workflows/group';
|
|
2
|
-
export function assignGroupUser(execution, group, input) {
|
|
3
|
-
return execution.workflow.run(assignGroupUserWorkflow, {
|
|
4
|
-
input: { group, input },
|
|
5
|
-
capabilities: {},
|
|
6
|
-
query: execution.query,
|
|
7
|
-
mutate: execution.mutate,
|
|
8
|
-
...(execution.signal === undefined ? {} : { signal: execution.signal }),
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
//# sourceMappingURL=assign-user.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assign-user.js","sourceRoot":"","sources":["../../../functions/group/assign-user.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAA;AAE1D,MAAM,UAAU,eAAe,CAC7B,SAAiC,EACjC,KAAa,EACb,KAA2B;IAE3B,OAAO,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,uBAAuB,EAAE;QACrD,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE;QACvB,YAAY,EAAE,EAAE;QAChB,KAAK,EAAE,SAAS,CAAC,KAAK;QACtB,MAAM,EAAE,SAAS,CAAC,MAAM;QACxB,GAAG,CAAC,SAAS,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,CAAC,MAAM,EAAE,CAAC;KACxE,CAAC,CAAA;AACJ,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../functions/group/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA"}
|