@astrale-domains/shell 0.1.0-beta.4 → 0.1.0-beta.41
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/README.md +143 -64
- package/dist/domain.d.ts +99 -0
- package/dist/domain.js +77 -0
- package/dist/functions/application/index.js +1 -3
- package/dist/functions/application/list-entrypoints.js +4 -0
- package/dist/functions/group/assign-member-to-group.js +4 -0
- package/dist/functions/group/change-group-membership.js +34 -0
- package/dist/functions/group/group-membership-errors.js +23 -0
- package/dist/functions/group/index.js +2 -3
- package/dist/functions/group/unassign-member-from-group.js +4 -0
- package/dist/functions/user/index.js +1 -3
- package/dist/functions/user/invite-user.js +39 -0
- package/dist/index.d.ts +1 -4
- package/dist/index.js +1 -4
- package/dist/integrations/index.d.ts +1 -0
- package/dist/integrations/index.js +1 -0
- package/dist/integrations/integrations.d.ts +9 -0
- package/dist/integrations/integrations.js +2 -0
- package/dist/integrations/user-invitation/index.d.ts +4 -0
- package/dist/integrations/user-invitation/index.js +3 -0
- package/dist/integrations/user-invitation/invitation-request-failure.d.ts +5 -0
- package/dist/integrations/user-invitation/invitation-request-failure.js +9 -0
- package/dist/integrations/user-invitation/invite-user-request.d.ts +6 -0
- package/dist/integrations/user-invitation/invite-user-request.js +1 -0
- package/dist/integrations/user-invitation/request-user-invitation.d.ts +8 -0
- package/dist/integrations/user-invitation/request-user-invitation.js +9 -0
- package/dist/mutations/group/index.js +1 -2
- package/dist/mutations/group/set-group-membership.js +29 -0
- package/dist/providers/admin-enrollment/create-admin-enrollment-provider.js +78 -0
- package/dist/providers/admin-enrollment/decode-admin-invitation-response.js +20 -0
- package/dist/providers/admin-enrollment/index.js +1 -0
- package/dist/providers/admin-enrollment/read-enrollment-response.js +34 -0
- package/dist/queries/application/index.js +1 -3
- package/dist/queries/application/read-installed-entrypoints.js +44 -0
- package/dist/queries/group/index.js +2 -3
- package/dist/queries/group/read-group-membership-endpoints.js +18 -0
- package/dist/queries/group/read-group-membership.js +35 -0
- package/dist/runtime.d.ts +462 -0
- package/dist/runtime.js +16 -0
- package/dist/schema/index.d.ts +5 -7
- package/dist/schema/index.js +4 -7
- package/dist/schema/modules/application/functions/index.d.ts +1 -0
- package/dist/schema/modules/application/functions/index.js +1 -0
- package/dist/schema/modules/application/functions/list-entrypoints.d.ts +15 -0
- package/dist/schema/modules/application/functions/list-entrypoints.js +16 -0
- package/dist/schema/modules/application/index.d.ts +2 -0
- package/dist/schema/modules/application/index.js +2 -0
- package/dist/schema/modules/application/types/entrypoint-entry.d.ts +8 -0
- package/dist/schema/modules/application/types/entrypoint-entry.js +7 -0
- package/dist/schema/modules/application/types/index.d.ts +1 -0
- package/dist/schema/modules/application/types/index.js +1 -0
- package/dist/schema/modules/group/classes/group.d.ts +20 -0
- package/dist/schema/modules/group/classes/group.js +8 -0
- package/dist/schema/modules/group/classes/index.d.ts +2 -0
- package/dist/schema/modules/group/classes/index.js +2 -0
- package/dist/schema/modules/group/classes/member-of-group.d.ts +16 -0
- package/dist/schema/modules/group/classes/member-of-group.js +11 -0
- package/dist/schema/modules/group/core/administrators-group.d.ts +1 -0
- package/dist/schema/modules/group/core/administrators-group.js +6 -0
- package/dist/schema/modules/group/core/applications-group.d.ts +1 -0
- package/dist/schema/modules/group/core/applications-group.js +6 -0
- package/dist/schema/modules/group/core/index.d.ts +3 -0
- package/dist/schema/modules/group/core/index.js +3 -0
- package/dist/schema/modules/group/core/members-group.d.ts +1 -0
- package/dist/schema/modules/group/core/members-group.js +6 -0
- package/dist/schema/modules/group/functions/assign-member-to-group.js +11 -0
- package/dist/schema/modules/group/functions/index.js +2 -0
- package/dist/schema/modules/group/functions/unassign-member-from-group.js +11 -0
- package/dist/schema/modules/group/index.d.ts +3 -0
- package/dist/schema/modules/group/index.js +3 -0
- package/dist/schema/modules/group/policies/belongs-to-group.d.ts +1 -0
- package/dist/schema/modules/group/policies/belongs-to-group.js +5 -0
- package/dist/schema/modules/group/policies/index.d.ts +1 -0
- package/dist/schema/modules/group/policies/index.js +1 -0
- package/dist/schema/modules/group/types/group-membership-input.js +8 -0
- package/dist/schema/modules/group/types/index.js +1 -0
- package/dist/schema/modules/user/classes/index.d.ts +1 -0
- package/dist/schema/modules/user/classes/index.js +1 -0
- package/dist/schema/modules/user/classes/user.d.ts +21 -0
- package/dist/schema/modules/user/classes/user.js +12 -0
- package/dist/schema/modules/user/functions/index.js +1 -0
- package/dist/schema/modules/user/functions/invite-user.js +12 -0
- package/dist/schema/modules/user/index.d.ts +2 -0
- package/dist/schema/modules/user/index.js +2 -0
- package/dist/schema/modules/user/types/index.d.ts +1 -0
- package/dist/schema/modules/user/types/index.js +1 -0
- package/dist/schema/modules/user/types/invitation-summary.d.ts +16 -0
- package/dist/schema/modules/user/types/invitation-summary.js +15 -0
- package/dist/schema/policies/administers-shell-class.js +11 -0
- package/dist/schema/policies/index.js +3 -0
- package/dist/schema/policies/owns-class.js +7 -0
- package/dist/schema/policies/uses-function.js +5 -0
- package/dist/schema/schema.d.ts +342 -0
- package/dist/schema/schema.js +27 -0
- package/dist/schema/views/application-view.js +4 -0
- package/dist/schema/views/index.js +1 -0
- package/dist/utils/canonical-node-path/index.js +1 -0
- package/dist/utils/canonical-node-path/parse-canonical-node-path.js +8 -0
- package/package.json +51 -30
- 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.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.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.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 +0 -71
- 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 +0 -54
- 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 +0 -46
- 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 +0 -3
- 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 +0 -2
- 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.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.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 +0 -93
- 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 +0 -3
- 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 +0 -9363
- package/dist/schema/domain/index.d.ts.map +0 -1
- package/dist/schema/domain/index.js +0 -56
- package/dist/schema/domain/index.js.map +0 -1
- package/dist/schema/group/class.d.ts +0 -59
- package/dist/schema/group/class.d.ts.map +0 -1
- package/dist/schema/group/class.js +0 -11
- package/dist/schema/group/class.js.map +0 -1
- package/dist/schema/group/core.d.ts +0 -495
- package/dist/schema/group/core.d.ts.map +0 -1
- package/dist/schema/group/core.js +0 -20
- package/dist/schema/group/core.js.map +0 -1
- package/dist/schema/group/index.d.ts +0 -7
- package/dist/schema/group/index.d.ts.map +0 -1
- package/dist/schema/group/index.js +0 -7
- package/dist/schema/group/index.js.map +0 -1
- package/dist/schema/group/methods.d.ts +0 -48
- package/dist/schema/group/methods.d.ts.map +0 -1
- package/dist/schema/group/methods.js +0 -21
- package/dist/schema/group/methods.js.map +0 -1
- package/dist/schema/group/policies.d.ts +0 -3
- package/dist/schema/group/policies.d.ts.map +0 -1
- package/dist/schema/group/policies.js +0 -7
- package/dist/schema/group/policies.js.map +0 -1
- package/dist/schema/group/relationships.d.ts +0 -293
- package/dist/schema/group/relationships.d.ts.map +0 -1
- package/dist/schema/group/relationships.js +0 -20
- package/dist/schema/group/relationships.js.map +0 -1
- package/dist/schema/group/view.d.ts +0 -62
- package/dist/schema/group/view.d.ts.map +0 -1
- package/dist/schema/group/view.js +0 -7
- package/dist/schema/group/view.js.map +0 -1
- package/dist/schema/home/index.d.ts +0 -2
- package/dist/schema/home/index.d.ts.map +0 -1
- package/dist/schema/home/index.js +0 -2
- package/dist/schema/home/index.js.map +0 -1
- package/dist/schema/home/view.d.ts +0 -4
- package/dist/schema/home/view.d.ts.map +0 -1
- package/dist/schema/home/view.js +0 -5
- 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 +0 -74
- package/dist/schema/space/class.d.ts.map +0 -1
- package/dist/schema/space/class.js +0 -15
- package/dist/schema/space/class.js.map +0 -1
- package/dist/schema/space/core.d.ts +0 -995
- package/dist/schema/space/core.d.ts.map +0 -1
- package/dist/schema/space/core.js +0 -17
- package/dist/schema/space/core.js.map +0 -1
- package/dist/schema/space/index.d.ts +0 -7
- package/dist/schema/space/index.d.ts.map +0 -1
- package/dist/schema/space/index.js +0 -7
- package/dist/schema/space/index.js.map +0 -1
- package/dist/schema/space/methods.d.ts +0 -78
- package/dist/schema/space/methods.d.ts.map +0 -1
- package/dist/schema/space/methods.js +0 -31
- package/dist/schema/space/methods.js.map +0 -1
- package/dist/schema/space/policies.d.ts +0 -5
- package/dist/schema/space/policies.d.ts.map +0 -1
- package/dist/schema/space/policies.js +0 -15
- package/dist/schema/space/policies.js.map +0 -1
- package/dist/schema/space/relationships.d.ts +0 -1059
- package/dist/schema/space/relationships.d.ts.map +0 -1
- package/dist/schema/space/relationships.js +0 -25
- package/dist/schema/space/relationships.js.map +0 -1
- package/dist/schema/space/view.d.ts +0 -77
- package/dist/schema/space/view.d.ts.map +0 -1
- package/dist/schema/space/view.js +0 -7
- 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 +0 -12
- package/dist/schema/user/class.d.ts.map +0 -1
- package/dist/schema/user/class.js +0 -7
- 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 +0 -6
- package/dist/schema/user/index.d.ts.map +0 -1
- package/dist/schema/user/index.js +0 -6
- 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 +0 -15
- package/dist/schema/user/view.d.ts.map +0 -1
- package/dist/schema/user/view.js +0 -7
- 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 +0 -4
- 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 +0 -4
- 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 +0 -4
- 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
|
@@ -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 {
|
|
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
|
+
}
|
|
@@ -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 {
|
|
2
|
-
export {
|
|
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
|
+
}));
|