@headless-lms/server 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.js +5 -0
- package/dist/app/community-mail.d.ts +24 -0
- package/dist/app/community-mail.js +92 -0
- package/dist/app/community-mail.js.map +1 -0
- package/dist/app/container.d.ts +40 -19
- package/dist/app/container.js +294 -45
- package/dist/app/container.js.map +1 -1
- package/dist/app/mcp-endpoints.d.ts +13 -0
- package/dist/app/mcp-endpoints.js +25 -0
- package/dist/app/mcp-endpoints.js.map +1 -0
- package/dist/app/notification-channels.d.ts +47 -0
- package/dist/app/notification-channels.js +174 -0
- package/dist/app/notification-channels.js.map +1 -0
- package/dist/app/notification-reads.d.ts +23 -0
- package/dist/app/notification-reads.js +95 -0
- package/dist/app/notification-reads.js.map +1 -0
- package/dist/http/config.d.ts +2 -1
- package/dist/http/errors.d.ts +15 -0
- package/dist/http/errors.js +162 -0
- package/dist/http/errors.js.map +1 -0
- package/dist/http/mcp/catalogue.d.ts +37 -0
- package/dist/http/mcp/catalogue.js +69 -0
- package/dist/http/mcp/catalogue.js.map +1 -0
- package/dist/http/mcp/challenge.d.ts +7 -0
- package/dist/http/mcp/challenge.js +35 -0
- package/dist/http/mcp/challenge.js.map +1 -0
- package/dist/http/mcp/input-schema.d.ts +7 -0
- package/dist/http/mcp/input-schema.js +28 -0
- package/dist/http/mcp/input-schema.js.map +1 -0
- package/dist/http/mcp/route.d.ts +8 -0
- package/dist/http/mcp/route.js +75 -0
- package/dist/http/mcp/route.js.map +1 -0
- package/dist/http/mcp/server.d.ts +8 -0
- package/dist/http/mcp/server.js +31 -0
- package/dist/http/mcp/server.js.map +1 -0
- package/dist/http/mcp/test-support.d.ts +55 -0
- package/dist/http/mcp/test-support.js +151 -0
- package/dist/http/mcp/test-support.js.map +1 -0
- package/dist/http/mcp/tool.d.ts +48 -0
- package/dist/http/mcp/tool.js +58 -0
- package/dist/http/mcp/tool.js.map +1 -0
- package/dist/http/mcp/tools/automations.d.ts +6 -0
- package/dist/http/mcp/tools/automations.js +120 -0
- package/dist/http/mcp/tools/automations.js.map +1 -0
- package/dist/http/mcp/tools/catalog.d.ts +6 -0
- package/dist/http/mcp/tools/catalog.js +200 -0
- package/dist/http/mcp/tools/catalog.js.map +1 -0
- package/dist/http/mcp/tools/comments.d.ts +6 -0
- package/dist/http/mcp/tools/comments.js +70 -0
- package/dist/http/mcp/tools/comments.js.map +1 -0
- package/dist/http/mcp/tools/communities.d.ts +6 -0
- package/dist/http/mcp/tools/communities.js +175 -0
- package/dist/http/mcp/tools/communities.js.map +1 -0
- package/dist/http/mcp/tools/community-members.d.ts +6 -0
- package/dist/http/mcp/tools/community-members.js +89 -0
- package/dist/http/mcp/tools/community-members.js.map +1 -0
- package/dist/http/mcp/tools/community-moderation.d.ts +6 -0
- package/dist/http/mcp/tools/community-moderation.js +144 -0
- package/dist/http/mcp/tools/community-moderation.js.map +1 -0
- package/dist/http/mcp/tools/courses.d.ts +6 -0
- package/dist/http/mcp/tools/courses.js +121 -0
- package/dist/http/mcp/tools/courses.js.map +1 -0
- package/dist/http/mcp/tools/index.d.ts +6 -0
- package/dist/http/mcp/tools/index.js +23 -0
- package/dist/http/mcp/tools/index.js.map +1 -0
- package/dist/http/mcp/tools/people.d.ts +6 -0
- package/dist/http/mcp/tools/people.js +145 -0
- package/dist/http/mcp/tools/people.js.map +1 -0
- package/dist/http/plugins/auth.js +13 -5
- package/dist/http/plugins/auth.js.map +1 -1
- package/dist/http/plugins/error-handler.d.ts +2 -1
- package/dist/http/plugins/error-handler.js +51 -65
- package/dist/http/plugins/error-handler.js.map +1 -1
- package/dist/http/plugins/openapi.js +49 -2
- package/dist/http/plugins/openapi.js.map +1 -1
- package/dist/http/routes/access.d.ts +7 -0
- package/dist/http/routes/access.js +140 -0
- package/dist/http/routes/access.js.map +1 -0
- package/dist/http/routes/activities.js +68 -23
- package/dist/http/routes/activities.js.map +1 -1
- package/dist/http/routes/assets.js +60 -55
- package/dist/http/routes/assets.js.map +1 -1
- package/dist/http/routes/automations.js +44 -24
- package/dist/http/routes/automations.js.map +1 -1
- package/dist/http/routes/bundles.js +29 -18
- package/dist/http/routes/bundles.js.map +1 -1
- package/dist/http/routes/communities.d.ts +7 -0
- package/dist/http/routes/communities.js +522 -0
- package/dist/http/routes/communities.js.map +1 -0
- package/dist/http/routes/community-moderation.d.ts +7 -0
- package/dist/http/routes/community-moderation.js +425 -0
- package/dist/http/routes/community-moderation.js.map +1 -0
- package/dist/http/routes/course-analytics.js +9 -7
- package/dist/http/routes/course-analytics.js.map +1 -1
- package/dist/http/routes/courses.js +30 -15
- package/dist/http/routes/courses.js.map +1 -1
- package/dist/http/routes/dashboard.js +15 -6
- package/dist/http/routes/dashboard.js.map +1 -1
- package/dist/http/routes/discussion.js +34 -26
- package/dist/http/routes/discussion.js.map +1 -1
- package/dist/http/routes/downloads.js +48 -30
- package/dist/http/routes/downloads.js.map +1 -1
- package/dist/http/routes/entitlements.js +16 -7
- package/dist/http/routes/entitlements.js.map +1 -1
- package/dist/http/routes/integrations.js +38 -41
- package/dist/http/routes/integrations.js.map +1 -1
- package/dist/http/routes/member/actor.d.ts +14 -0
- package/dist/http/routes/member/actor.js +11 -0
- package/dist/http/routes/member/actor.js.map +1 -0
- package/dist/http/routes/member/assets.d.ts +7 -0
- package/dist/http/routes/member/assets.js +79 -0
- package/dist/http/routes/member/assets.js.map +1 -0
- package/dist/http/routes/member/chats.d.ts +7 -0
- package/dist/http/routes/member/chats.js +435 -0
- package/dist/http/routes/member/chats.js.map +1 -0
- package/dist/http/routes/member/comments.d.ts +7 -0
- package/dist/http/routes/member/comments.js +187 -0
- package/dist/http/routes/member/comments.js.map +1 -0
- package/dist/http/routes/member/community.d.ts +7 -0
- package/dist/http/routes/member/community.js +312 -0
- package/dist/http/routes/member/community.js.map +1 -0
- package/dist/http/routes/member/courses.d.ts +7 -0
- package/dist/http/routes/member/courses.js +101 -0
- package/dist/http/routes/member/courses.js.map +1 -0
- package/dist/http/routes/member/devices.d.ts +7 -0
- package/dist/http/routes/member/devices.js +98 -0
- package/dist/http/routes/member/devices.js.map +1 -0
- package/dist/http/routes/member/downloads.d.ts +7 -0
- package/dist/http/routes/member/downloads.js +56 -0
- package/dist/http/routes/member/downloads.js.map +1 -0
- package/dist/http/routes/member/files.d.ts +7 -0
- package/dist/http/routes/member/files.js +184 -0
- package/dist/http/routes/member/files.js.map +1 -0
- package/dist/http/routes/member/index.d.ts +7 -0
- package/dist/http/routes/member/index.js +35 -0
- package/dist/http/routes/member/index.js.map +1 -0
- package/dist/http/routes/member/notification-settings.d.ts +7 -0
- package/dist/http/routes/member/notification-settings.js +108 -0
- package/dist/http/routes/member/notification-settings.js.map +1 -0
- package/dist/http/routes/member/notifications.d.ts +7 -0
- package/dist/http/routes/member/notifications.js +125 -0
- package/dist/http/routes/member/notifications.js.map +1 -0
- package/dist/http/routes/member/org.d.ts +7 -0
- package/dist/http/routes/member/org.js +56 -0
- package/dist/http/routes/member/org.js.map +1 -0
- package/dist/http/routes/member/posts.d.ts +7 -0
- package/dist/http/routes/member/posts.js +612 -0
- package/dist/http/routes/member/posts.js.map +1 -0
- package/dist/http/routes/member/profile.d.ts +7 -0
- package/dist/http/routes/member/profile.js +48 -0
- package/dist/http/routes/member/profile.js.map +1 -0
- package/dist/http/routes/member/progress.d.ts +7 -0
- package/dist/http/routes/member/progress.js +60 -0
- package/dist/http/routes/member/progress.js.map +1 -0
- package/dist/http/routes/organizations.js +171 -25
- package/dist/http/routes/organizations.js.map +1 -1
- package/dist/http/routes/students.js +32 -47
- package/dist/http/routes/students.js.map +1 -1
- package/dist/http/routes/webhooks.js +26 -18
- package/dist/http/routes/webhooks.js.map +1 -1
- package/dist/http/routes.js +8 -2
- package/dist/http/routes.js.map +1 -1
- package/dist/http/schemas/access.d.ts +146 -0
- package/dist/http/schemas/access.js +36 -0
- package/dist/http/schemas/access.js.map +1 -0
- package/dist/http/schemas/activities.d.ts +3 -1
- package/dist/http/schemas/activities.js +4 -4
- package/dist/http/schemas/activities.js.map +1 -1
- package/dist/http/schemas/assets.d.ts +79 -80
- package/dist/http/schemas/assets.js +23 -13
- package/dist/http/schemas/assets.js.map +1 -1
- package/dist/http/schemas/automations.d.ts +6 -0
- package/dist/http/schemas/bundles.js +6 -6
- package/dist/http/schemas/bundles.js.map +1 -1
- package/dist/http/schemas/chats.d.ts +409 -0
- package/dist/http/schemas/chats.js +56 -0
- package/dist/http/schemas/chats.js.map +1 -0
- package/dist/http/schemas/community.d.ts +597 -0
- package/dist/http/schemas/community.js +132 -0
- package/dist/http/schemas/community.js.map +1 -0
- package/dist/http/schemas/content.d.ts +4 -2
- package/dist/http/schemas/content.js +11 -8
- package/dist/http/schemas/content.js.map +1 -1
- package/dist/http/schemas/discussion.d.ts +98 -14
- package/dist/http/schemas/discussion.js +25 -12
- package/dist/http/schemas/discussion.js.map +1 -1
- package/dist/http/schemas/downloads.d.ts +11 -5
- package/dist/http/schemas/downloads.js +14 -11
- package/dist/http/schemas/downloads.js.map +1 -1
- package/dist/http/schemas/entitlements.d.ts +6 -6
- package/dist/http/schemas/entitlements.js +6 -6
- package/dist/http/schemas/entitlements.js.map +1 -1
- package/dist/http/schemas/files.d.ts +45 -0
- package/dist/http/schemas/files.js +25 -0
- package/dist/http/schemas/files.js.map +1 -0
- package/dist/http/schemas/index.d.ts +15 -8
- package/dist/http/schemas/index.js +15 -8
- package/dist/http/schemas/integrations.d.ts +4 -4
- package/dist/http/schemas/invites.d.ts +4 -0
- package/dist/http/schemas/invites.js +1 -0
- package/dist/http/schemas/invites.js.map +1 -1
- package/dist/http/schemas/{learn.d.ts → member.d.ts} +31 -18
- package/dist/http/schemas/{learn.js → member.js} +17 -13
- package/dist/http/schemas/member.js.map +1 -0
- package/dist/http/schemas/members.d.ts +35 -2
- package/dist/http/schemas/members.js +17 -3
- package/dist/http/schemas/members.js.map +1 -1
- package/dist/http/schemas/notifications.d.ts +550 -0
- package/dist/http/schemas/notifications.js +164 -0
- package/dist/http/schemas/notifications.js.map +1 -0
- package/dist/http/schemas/posts.d.ts +350 -0
- package/dist/http/schemas/posts.js +47 -0
- package/dist/http/schemas/posts.js.map +1 -0
- package/dist/http/schemas/profile.d.ts +23 -0
- package/dist/http/schemas/profile.js +15 -0
- package/dist/http/schemas/profile.js.map +1 -0
- package/dist/http/schemas/shared.d.ts +32 -1
- package/dist/http/schemas/shared.js +20 -2
- package/dist/http/schemas/shared.js.map +1 -1
- package/dist/http/schemas/students.d.ts +1 -7
- package/dist/http/schemas/students.js +1 -7
- package/dist/http/schemas/students.js.map +1 -1
- package/dist/http/scope.d.ts +3 -1
- package/dist/http/scope.js +26 -4
- package/dist/http/scope.js.map +1 -1
- package/dist/http/server.js +6 -1
- package/dist/http/server.js.map +1 -1
- package/dist/http/web-bridge.d.ts +1 -1
- package/dist/http/web-bridge.js +2 -2
- package/dist/http/web-bridge.js.map +1 -1
- package/dist/http/well-known.d.ts +7 -0
- package/dist/http/well-known.js +22 -0
- package/dist/http/well-known.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +78 -0
- package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_expect@2.1.9/node_modules/@vitest/expect/dist/index.js +1267 -0
- package/dist/node_modules/.pnpm/@vitest_expect@2.1.9/node_modules/@vitest/expect/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_pretty-format@2.1.9/node_modules/@vitest/pretty-format/dist/index.js +814 -0
- package/dist/node_modules/.pnpm/@vitest_pretty-format@2.1.9/node_modules/@vitest/pretty-format/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_runner@2.1.9/node_modules/@vitest/runner/dist/chunk-tasks.js +43 -0
- package/dist/node_modules/.pnpm/@vitest_runner@2.1.9/node_modules/@vitest/runner/dist/chunk-tasks.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_runner@2.1.9/node_modules/@vitest/runner/dist/index.js +527 -0
- package/dist/node_modules/.pnpm/@vitest_runner@2.1.9/node_modules/@vitest/runner/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_runner@2.1.9/node_modules/@vitest/runner/dist/utils.js +2 -0
- package/dist/node_modules/.pnpm/@vitest_snapshot@2.1.9/node_modules/@vitest/snapshot/dist/index.js +1737 -0
- package/dist/node_modules/.pnpm/@vitest_snapshot@2.1.9/node_modules/@vitest/snapshot/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_spy@2.1.9/node_modules/@vitest/spy/dist/index.js +137 -0
- package/dist/node_modules/.pnpm/@vitest_spy@2.1.9/node_modules/@vitest/spy/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +118 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/diff.js +1222 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/diff.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/error.js +91 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/error.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/helpers.js +113 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/helpers.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/index.js +449 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/source-map.js +163 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/source-map.js.map +1 -0
- package/dist/node_modules/.pnpm/chai@5.3.3/node_modules/chai/index.js +3187 -0
- package/dist/node_modules/.pnpm/chai@5.3.3/node_modules/chai/index.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.js +11 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.js +16 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.js +11 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.js +15 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.js +13 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.js +34 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.js +12 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.js +122 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.js +39 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js +99 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.js +25 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js +14 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.js +21 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.js +6 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js +12 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.js +18 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.js +24 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.js +9 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.js +30 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.js.map +1 -0
- package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js +939 -0
- package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js.map +1 -0
- package/dist/node_modules/.pnpm/pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.js +82 -0
- package/dist/node_modules/.pnpm/pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.js.map +1 -0
- package/dist/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js +82 -0
- package/dist/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js.map +1 -0
- package/dist/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/node.js +8 -0
- package/dist/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/node.js.map +1 -0
- package/dist/node_modules/.pnpm/tinyspy@3.0.2/node_modules/tinyspy/dist/index.js +83 -0
- package/dist/node_modules/.pnpm/tinyspy@3.0.2/node_modules/tinyspy/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js +9 -0
- package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js.map +1 -0
- package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/date.W2xKR2qe.js +51 -0
- package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/date.W2xKR2qe.js.map +1 -0
- package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/utils.C8RiOc4B.js +48 -0
- package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/utils.C8RiOc4B.js.map +1 -0
- package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/vi.DgezovHB.js +2426 -0
- package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/vi.DgezovHB.js.map +1 -0
- package/dist/packages/server/package.js +6 -0
- package/dist/packages/server/package.js.map +1 -0
- package/package.json +9 -7
- package/dist/app/notifications.d.ts +0 -7
- package/dist/app/notifications.js +0 -26
- package/dist/app/notifications.js.map +0 -1
- package/dist/http/routes/learn/assets.d.ts +0 -8
- package/dist/http/routes/learn/assets.js +0 -32
- package/dist/http/routes/learn/assets.js.map +0 -1
- package/dist/http/routes/learn/comments.d.ts +0 -7
- package/dist/http/routes/learn/comments.js +0 -175
- package/dist/http/routes/learn/comments.js.map +0 -1
- package/dist/http/routes/learn/courses.d.ts +0 -7
- package/dist/http/routes/learn/courses.js +0 -98
- package/dist/http/routes/learn/courses.js.map +0 -1
- package/dist/http/routes/learn/downloads.d.ts +0 -7
- package/dist/http/routes/learn/downloads.js +0 -76
- package/dist/http/routes/learn/downloads.js.map +0 -1
- package/dist/http/routes/learn/index.d.ts +0 -7
- package/dist/http/routes/learn/index.js +0 -19
- package/dist/http/routes/learn/index.js.map +0 -1
- package/dist/http/routes/learn/org.d.ts +0 -7
- package/dist/http/routes/learn/org.js +0 -50
- package/dist/http/routes/learn/org.js.map +0 -1
- package/dist/http/routes/learn/progress.d.ts +0 -7
- package/dist/http/routes/learn/progress.js +0 -63
- package/dist/http/routes/learn/progress.js.map +0 -1
- package/dist/http/schemas/learn.js.map +0 -1
- package/dist/package.js +0 -6
- package/dist/package.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
//#region src/http/schemas/
|
|
2
|
+
//#region src/http/schemas/member.d.ts
|
|
3
3
|
/** Courses the authenticated student is actively enrolled in (published only). */
|
|
4
|
-
declare const
|
|
4
|
+
declare const MemberCourses: z.ZodArray<z.ZodObject<{
|
|
5
5
|
orgId: z.ZodString;
|
|
6
6
|
id: z.ZodString;
|
|
7
7
|
type: z.ZodLiteral<"course">;
|
|
@@ -25,10 +25,11 @@ declare const LearnCourses: z.ZodArray<z.ZodObject<{
|
|
|
25
25
|
}, z.core.$strict>;
|
|
26
26
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
27
27
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
28
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
28
29
|
}, z.core.$strict>>;
|
|
29
|
-
type
|
|
30
|
+
type MemberCourses = z.infer<typeof MemberCourses>;
|
|
30
31
|
/** One enrolled course's module→activity tree (published activities only). */
|
|
31
|
-
declare const
|
|
32
|
+
declare const MemberModules: z.ZodArray<z.ZodObject<{
|
|
32
33
|
orgId: z.ZodString;
|
|
33
34
|
id: z.ZodString;
|
|
34
35
|
courseId: z.ZodString;
|
|
@@ -37,13 +38,18 @@ declare const LearnModules: z.ZodArray<z.ZodObject<{
|
|
|
37
38
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
38
39
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
39
40
|
}, z.core.$strict>>;
|
|
40
|
-
type
|
|
41
|
-
declare const
|
|
41
|
+
type MemberModules = z.infer<typeof MemberModules>;
|
|
42
|
+
declare const MemberCourseIdParam: z.ZodObject<{
|
|
42
43
|
courseId: z.ZodString;
|
|
43
44
|
}, z.core.$strip>;
|
|
44
|
-
type
|
|
45
|
+
type MemberCourseIdParam = z.infer<typeof MemberCourseIdParam>;
|
|
46
|
+
declare const LearnActivityAssetParams: z.ZodObject<{
|
|
47
|
+
activityId: z.ZodString;
|
|
48
|
+
assetId: z.ZodString;
|
|
49
|
+
}, z.core.$strip>;
|
|
50
|
+
type LearnActivityAssetParams = z.infer<typeof LearnActivityAssetParams>;
|
|
45
51
|
/** Downloads the authenticated student is actively entitled to (published only). */
|
|
46
|
-
declare const
|
|
52
|
+
declare const MemberDownloads: z.ZodArray<z.ZodObject<{
|
|
47
53
|
orgId: z.ZodString;
|
|
48
54
|
id: z.ZodString;
|
|
49
55
|
type: z.ZodLiteral<"download">;
|
|
@@ -58,10 +64,11 @@ declare const LearnDownloads: z.ZodArray<z.ZodObject<{
|
|
|
58
64
|
thumbnailAssetId: z.ZodNullable<z.ZodString>;
|
|
59
65
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
60
66
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
67
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
61
68
|
}, z.core.$strict>>;
|
|
62
|
-
type
|
|
69
|
+
type MemberDownloads = z.infer<typeof MemberDownloads>;
|
|
63
70
|
/** One entitled download plus its ordered assets. */
|
|
64
|
-
declare const
|
|
71
|
+
declare const MemberDownload: z.ZodObject<{
|
|
65
72
|
download: z.ZodObject<{
|
|
66
73
|
orgId: z.ZodString;
|
|
67
74
|
id: z.ZodString;
|
|
@@ -77,6 +84,7 @@ declare const LearnDownload: z.ZodObject<{
|
|
|
77
84
|
thumbnailAssetId: z.ZodNullable<z.ZodString>;
|
|
78
85
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
79
86
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
87
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
80
88
|
}, z.core.$strict>;
|
|
81
89
|
assets: z.ZodArray<z.ZodObject<{
|
|
82
90
|
orgId: z.ZodString;
|
|
@@ -87,28 +95,33 @@ declare const LearnDownload: z.ZodObject<{
|
|
|
87
95
|
displayName: z.ZodNullable<z.ZodString>;
|
|
88
96
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
89
97
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
98
|
+
filename: z.ZodString;
|
|
99
|
+
contentType: z.ZodString;
|
|
100
|
+
size: z.ZodNumber;
|
|
101
|
+
url: z.ZodString;
|
|
90
102
|
}, z.core.$strict>>;
|
|
91
103
|
}, z.core.$strip>;
|
|
92
|
-
type
|
|
104
|
+
type MemberDownload = z.infer<typeof MemberDownload>;
|
|
93
105
|
/** The portal org's public identity — the student surface themes against it. */
|
|
94
|
-
declare const
|
|
106
|
+
declare const MemberOrg: z.ZodObject<{
|
|
95
107
|
id: z.ZodString;
|
|
96
108
|
name: z.ZodString;
|
|
97
109
|
slug: z.ZodString;
|
|
98
110
|
}, z.core.$strip>;
|
|
99
|
-
type
|
|
111
|
+
type MemberOrg = z.infer<typeof MemberOrg>;
|
|
100
112
|
/** Who the caller is within the session's org. The session cookie identifies
|
|
101
113
|
* an auth user; the learner surface is keyed on `org_users.id`. */
|
|
102
|
-
declare const
|
|
114
|
+
declare const MemberViewer: z.ZodObject<{
|
|
103
115
|
orgUserId: z.ZodString;
|
|
104
116
|
role: z.ZodEnum<{
|
|
105
117
|
owner: "owner";
|
|
106
118
|
admin: "admin";
|
|
107
119
|
instructor: "instructor";
|
|
120
|
+
moderator: "moderator";
|
|
108
121
|
student: "student";
|
|
109
122
|
}>;
|
|
110
123
|
}, z.core.$strip>;
|
|
111
|
-
type
|
|
124
|
+
type MemberViewer = z.infer<typeof MemberViewer>;
|
|
112
125
|
/** One reported fact — never a decision. `asset` names the subject within the
|
|
113
126
|
* activity (absent = the activity itself); `completed` is the learner's
|
|
114
127
|
* activity-level claim. Every other field is the asset type's own vocabulary,
|
|
@@ -126,7 +139,7 @@ declare const ReportProgress: z.ZodObject<{
|
|
|
126
139
|
asset: z.ZodOptional<z.ZodString>;
|
|
127
140
|
completed: z.ZodOptional<z.ZodBoolean>;
|
|
128
141
|
}, z.core.$catchall<z.ZodType<import("@headless-lms/core/types").JsonValue, unknown, z.core.$ZodTypeInternals<import("@headless-lms/core/types").JsonValue, unknown>>>>>;
|
|
129
|
-
}, z.core.$
|
|
142
|
+
}, z.core.$strict>;
|
|
130
143
|
type ReportProgress = z.infer<typeof ReportProgress>;
|
|
131
144
|
/** The reported target's state after the service decided. */
|
|
132
145
|
declare const ProgressStatus: z.ZodObject<{
|
|
@@ -148,5 +161,5 @@ declare const CourseProgress: z.ZodObject<{
|
|
|
148
161
|
}, z.core.$strip>;
|
|
149
162
|
type CourseProgress = z.infer<typeof CourseProgress>;
|
|
150
163
|
//#endregion
|
|
151
|
-
export { CourseProgress,
|
|
152
|
-
//# sourceMappingURL=
|
|
164
|
+
export { CourseProgress, LearnActivityAssetParams, MemberCourseIdParam, MemberCourses, MemberDownload, MemberDownloads, MemberModules, MemberOrg, MemberViewer, ProgressReportItem, ProgressStatus, ReportProgress };
|
|
165
|
+
//# sourceMappingURL=member.d.ts.map
|
|
@@ -1,31 +1,35 @@
|
|
|
1
1
|
import { OrgRole } from "./shared.js";
|
|
2
2
|
import { Course } from "./content.js";
|
|
3
|
-
import { Download,
|
|
3
|
+
import { Download, DownloadFile } from "./downloads.js";
|
|
4
4
|
import { Module } from "./activities.js";
|
|
5
5
|
import { z } from "zod";
|
|
6
6
|
import { progressReportItemSchema } from "@headless-lms/core/schemas";
|
|
7
|
-
//#region src/http/schemas/
|
|
7
|
+
//#region src/http/schemas/member.ts
|
|
8
8
|
/** Courses the authenticated student is actively enrolled in (published only). */
|
|
9
|
-
const
|
|
9
|
+
const MemberCourses = z.array(Course);
|
|
10
10
|
/** One enrolled course's module→activity tree (published activities only). */
|
|
11
|
-
const
|
|
12
|
-
const
|
|
11
|
+
const MemberModules = z.array(Module);
|
|
12
|
+
const MemberCourseIdParam = z.object({ courseId: z.string() });
|
|
13
|
+
const LearnActivityAssetParams = z.object({
|
|
14
|
+
activityId: z.string(),
|
|
15
|
+
assetId: z.string()
|
|
16
|
+
});
|
|
13
17
|
/** Downloads the authenticated student is actively entitled to (published only). */
|
|
14
|
-
const
|
|
18
|
+
const MemberDownloads = z.array(Download);
|
|
15
19
|
/** One entitled download plus its ordered assets. */
|
|
16
|
-
const
|
|
20
|
+
const MemberDownload = z.object({
|
|
17
21
|
download: Download,
|
|
18
|
-
assets: z.array(
|
|
22
|
+
assets: z.array(DownloadFile)
|
|
19
23
|
});
|
|
20
24
|
/** The portal org's public identity — the student surface themes against it. */
|
|
21
|
-
const
|
|
25
|
+
const MemberOrg = z.object({
|
|
22
26
|
id: z.string(),
|
|
23
27
|
name: z.string(),
|
|
24
28
|
slug: z.string()
|
|
25
29
|
});
|
|
26
30
|
/** Who the caller is within the session's org. The session cookie identifies
|
|
27
31
|
* an auth user; the learner surface is keyed on `org_users.id`. */
|
|
28
|
-
const
|
|
32
|
+
const MemberViewer = z.object({
|
|
29
33
|
orgUserId: z.string(),
|
|
30
34
|
role: OrgRole
|
|
31
35
|
});
|
|
@@ -39,7 +43,7 @@ const ProgressReportItem = progressReportItemSchema;
|
|
|
39
43
|
const ReportProgress = z.object({
|
|
40
44
|
activity: z.string(),
|
|
41
45
|
reports: z.array(ProgressReportItem)
|
|
42
|
-
});
|
|
46
|
+
}).strict();
|
|
43
47
|
/** The reported target's state after the service decided. */
|
|
44
48
|
const ProgressStatus = z.object({ status: z.enum(["in-progress", "completed"]) });
|
|
45
49
|
/** Per-course progress, derived on read against current structure. */
|
|
@@ -53,6 +57,6 @@ const CourseProgress = z.object({
|
|
|
53
57
|
positions: z.record(z.string(), z.unknown())
|
|
54
58
|
});
|
|
55
59
|
//#endregion
|
|
56
|
-
export { CourseProgress,
|
|
60
|
+
export { CourseProgress, LearnActivityAssetParams, MemberCourseIdParam, MemberCourses, MemberDownload, MemberDownloads, MemberModules, MemberOrg, MemberViewer, ProgressReportItem, ProgressStatus, ReportProgress };
|
|
57
61
|
|
|
58
|
-
//# sourceMappingURL=
|
|
62
|
+
//# sourceMappingURL=member.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"member.js","names":[],"sources":["../../../src/http/schemas/member.ts"],"sourcesContent":["// Member resource schemas — the student-facing read surface. Reuses the Course\n// and Module payloads (identical wire shape to the back-office API, including\n// the opaque activity `settings` blob) so one renderer path serves both.\nimport { z } from 'zod';\nimport { progressReportItemSchema } from '@headless-lms/core/schemas';\nimport { Course } from './content.js';\nimport { Module } from './activities.js';\nimport { Download, DownloadFile } from './downloads.js';\nimport { OrgRole } from './shared.js';\n\n/** Courses the authenticated student is actively enrolled in (published only). */\nexport const MemberCourses = z.array(Course);\nexport type MemberCourses = z.infer<typeof MemberCourses>;\n\n/** One enrolled course's module→activity tree (published activities only). */\nexport const MemberModules = z.array(Module);\nexport type MemberModules = z.infer<typeof MemberModules>;\n\nexport const MemberCourseIdParam = z.object({ courseId: z.string() });\nexport type MemberCourseIdParam = z.infer<typeof MemberCourseIdParam>;\n\nexport const LearnActivityAssetParams = z.object({ activityId: z.string(), assetId: z.string() });\nexport type LearnActivityAssetParams = z.infer<typeof LearnActivityAssetParams>;\n\n/** Downloads the authenticated student is actively entitled to (published only). */\nexport const MemberDownloads = z.array(Download);\nexport type MemberDownloads = z.infer<typeof MemberDownloads>;\n\n/** One entitled download plus its ordered assets. */\nexport const MemberDownload = z.object({\n download: Download,\n assets: z.array(DownloadFile),\n});\nexport type MemberDownload = z.infer<typeof MemberDownload>;\n\n/** The portal org's public identity — the student surface themes against it. */\nexport const MemberOrg = z.object({\n id: z.string(),\n name: z.string(),\n slug: z.string(),\n});\nexport type MemberOrg = z.infer<typeof MemberOrg>;\n\n/** Who the caller is within the session's org. The session cookie identifies\n * an auth user; the learner surface is keyed on `org_users.id`. */\nexport const MemberViewer = z.object({\n orgUserId: z.string(),\n role: OrgRole,\n});\nexport type MemberViewer = z.infer<typeof MemberViewer>;\n\n/** One reported fact — never a decision. `asset` names the subject within the\n * activity (absent = the activity itself); `completed` is the learner's\n * activity-level claim. Every other field is the asset type's own vocabulary,\n * passed through opaquely. */\nexport const ProgressReportItem = progressReportItemSchema;\nexport type ProgressReportItem = z.infer<typeof ProgressReportItem>;\n\n/** The report envelope: the target (key names the content type) and a batch of\n * items. `[]` is a bare touch — it creates the record. */\nexport const ReportProgress = z\n .object({\n activity: z.string(),\n reports: z.array(ProgressReportItem),\n })\n .strict();\nexport type ReportProgress = z.infer<typeof ReportProgress>;\n\n/** The reported target's state after the service decided. */\nexport const ProgressStatus = z.object({\n status: z.enum(['in-progress', 'completed']),\n});\nexport type ProgressStatus = z.infer<typeof ProgressStatus>;\n\n/** Per-course progress, derived on read against current structure. */\nexport const CourseProgress = z.object({\n /** Keyed by activity id; absent key = not started. */\n activities: z.record(z.string(), z.enum(['in-progress', 'completed'])),\n /** Integer 0–100, completed ÷ current activities, rounded. */\n percent: z.int().min(0).max(100),\n completed: z.boolean(),\n /** Keyed by activity id: the per-asset reported state map (opaque). */\n positions: z.record(z.string(), z.unknown()),\n});\nexport type CourseProgress = z.infer<typeof CourseProgress>;\n"],"mappings":";;;;;;;;AAWA,MAAa,gBAAgB,EAAE,MAAM,MAAM;;AAI3C,MAAa,gBAAgB,EAAE,MAAM,MAAM;AAG3C,MAAa,sBAAsB,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;AAGpE,MAAa,2BAA2B,EAAE,OAAO;CAAE,YAAY,EAAE,OAAO;CAAG,SAAS,EAAE,OAAO;AAAE,CAAC;;AAIhG,MAAa,kBAAkB,EAAE,MAAM,QAAQ;;AAI/C,MAAa,iBAAiB,EAAE,OAAO;CACrC,UAAU;CACV,QAAQ,EAAE,MAAM,YAAY;AAC9B,CAAC;;AAID,MAAa,YAAY,EAAE,OAAO;CAChC,IAAI,EAAE,OAAO;CACb,MAAM,EAAE,OAAO;CACf,MAAM,EAAE,OAAO;AACjB,CAAC;;;AAKD,MAAa,eAAe,EAAE,OAAO;CACnC,WAAW,EAAE,OAAO;CACpB,MAAM;AACR,CAAC;;;;;AAOD,MAAa,qBAAqB;;;AAKlC,MAAa,iBAAiB,EAC3B,OAAO;CACN,UAAU,EAAE,OAAO;CACnB,SAAS,EAAE,MAAM,kBAAkB;AACrC,CAAC,CAAC,CACD,OAAO;;AAIV,MAAa,iBAAiB,EAAE,OAAO,EACrC,QAAQ,EAAE,KAAK,CAAC,eAAe,WAAW,CAAC,EAC7C,CAAC;;AAID,MAAa,iBAAiB,EAAE,OAAO;;CAErC,YAAY,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,KAAK,CAAC,eAAe,WAAW,CAAC,CAAC;;CAErE,SAAS,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;CAC/B,WAAW,EAAE,QAAQ;;CAErB,WAAW,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC;AAC7C,CAAC"}
|
|
@@ -5,6 +5,7 @@ declare const Role: z.ZodEnum<{
|
|
|
5
5
|
owner: "owner";
|
|
6
6
|
admin: "admin";
|
|
7
7
|
instructor: "instructor";
|
|
8
|
+
moderator: "moderator";
|
|
8
9
|
}>;
|
|
9
10
|
type Role = z.infer<typeof Role>;
|
|
10
11
|
declare const MemberStatus: z.ZodEnum<{
|
|
@@ -22,6 +23,7 @@ declare const Member: z.ZodObject<{
|
|
|
22
23
|
owner: "owner";
|
|
23
24
|
admin: "admin";
|
|
24
25
|
instructor: "instructor";
|
|
26
|
+
moderator: "moderator";
|
|
25
27
|
}>;
|
|
26
28
|
status: z.ZodEnum<{
|
|
27
29
|
active: "active";
|
|
@@ -40,6 +42,7 @@ declare const MembersQuery: z.ZodObject<{
|
|
|
40
42
|
owner: "owner";
|
|
41
43
|
admin: "admin";
|
|
42
44
|
instructor: "instructor";
|
|
45
|
+
moderator: "moderator";
|
|
43
46
|
}>>;
|
|
44
47
|
status: z.ZodOptional<z.ZodEnum<{
|
|
45
48
|
active: "active";
|
|
@@ -58,6 +61,7 @@ declare const MembersPage: z.ZodObject<{
|
|
|
58
61
|
owner: "owner";
|
|
59
62
|
admin: "admin";
|
|
60
63
|
instructor: "instructor";
|
|
64
|
+
moderator: "moderator";
|
|
61
65
|
}>;
|
|
62
66
|
status: z.ZodEnum<{
|
|
63
67
|
active: "active";
|
|
@@ -71,18 +75,47 @@ declare const MembersPage: z.ZodObject<{
|
|
|
71
75
|
pageSize: z.ZodNumber;
|
|
72
76
|
}, z.core.$strip>;
|
|
73
77
|
type MembersPage = z.infer<typeof MembersPage>;
|
|
78
|
+
declare const AssignableRole: z.ZodEnum<{
|
|
79
|
+
admin: "admin";
|
|
80
|
+
instructor: "instructor";
|
|
81
|
+
moderator: "moderator";
|
|
82
|
+
student: "student";
|
|
83
|
+
}>;
|
|
84
|
+
type AssignableRole = z.infer<typeof AssignableRole>;
|
|
74
85
|
declare const UpdateMemberRole: z.ZodObject<{
|
|
75
86
|
role: z.ZodEnum<{
|
|
76
|
-
owner: "owner";
|
|
77
87
|
admin: "admin";
|
|
78
88
|
instructor: "instructor";
|
|
89
|
+
moderator: "moderator";
|
|
90
|
+
student: "student";
|
|
79
91
|
}>;
|
|
80
92
|
}, z.core.$strip>;
|
|
81
93
|
type UpdateMemberRole = z.infer<typeof UpdateMemberRole>;
|
|
94
|
+
declare const MemberRoleChange: z.ZodObject<{
|
|
95
|
+
id: z.ZodString;
|
|
96
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
97
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
98
|
+
email: z.ZodString;
|
|
99
|
+
image: z.ZodNullable<z.ZodString>;
|
|
100
|
+
status: z.ZodEnum<{
|
|
101
|
+
active: "active";
|
|
102
|
+
invited: "invited";
|
|
103
|
+
}>;
|
|
104
|
+
joinedAt: z.ZodNullable<z.ZodString>;
|
|
105
|
+
invitedAt: z.ZodNullable<z.ZodString>;
|
|
106
|
+
role: z.ZodEnum<{
|
|
107
|
+
owner: "owner";
|
|
108
|
+
admin: "admin";
|
|
109
|
+
instructor: "instructor";
|
|
110
|
+
moderator: "moderator";
|
|
111
|
+
student: "student";
|
|
112
|
+
}>;
|
|
113
|
+
}, z.core.$strip>;
|
|
114
|
+
type MemberRoleChange = z.infer<typeof MemberRoleChange>;
|
|
82
115
|
declare const MemberIdParam: z.ZodObject<{
|
|
83
116
|
id: z.ZodString;
|
|
84
117
|
}, z.core.$strip>;
|
|
85
118
|
type MemberIdParam = z.infer<typeof MemberIdParam>;
|
|
86
119
|
//#endregion
|
|
87
|
-
export { Member, MemberIdParam, MemberStatus, MembersPage, MembersQuery, Role, UpdateMemberRole };
|
|
120
|
+
export { AssignableRole, Member, MemberIdParam, MemberRoleChange, MemberStatus, MembersPage, MembersQuery, Role, UpdateMemberRole };
|
|
88
121
|
//# sourceMappingURL=members.d.ts.map
|
|
@@ -5,7 +5,8 @@ import { z } from "zod";
|
|
|
5
5
|
const Role = z.enum([
|
|
6
6
|
"owner",
|
|
7
7
|
"admin",
|
|
8
|
-
"instructor"
|
|
8
|
+
"instructor",
|
|
9
|
+
"moderator"
|
|
9
10
|
]);
|
|
10
11
|
const MemberStatus = z.enum(["active", "invited"]);
|
|
11
12
|
const Member = OrgUserProfileSchema.extend({
|
|
@@ -19,9 +20,22 @@ const MembersQuery = ListQuery.extend({
|
|
|
19
20
|
status: MemberStatus.optional()
|
|
20
21
|
});
|
|
21
22
|
const MembersPage = paginated(Member);
|
|
22
|
-
const
|
|
23
|
+
const AssignableRole = z.enum([
|
|
24
|
+
"admin",
|
|
25
|
+
"instructor",
|
|
26
|
+
"moderator",
|
|
27
|
+
"student"
|
|
28
|
+
]);
|
|
29
|
+
const UpdateMemberRole = z.object({ role: AssignableRole });
|
|
30
|
+
const MemberRoleChange = Member.extend({ role: z.enum([
|
|
31
|
+
"owner",
|
|
32
|
+
"admin",
|
|
33
|
+
"instructor",
|
|
34
|
+
"moderator",
|
|
35
|
+
"student"
|
|
36
|
+
]) });
|
|
23
37
|
const MemberIdParam = z.object({ id: z.string() });
|
|
24
38
|
//#endregion
|
|
25
|
-
export { Member, MemberIdParam, MemberStatus, MembersPage, MembersQuery, Role, UpdateMemberRole };
|
|
39
|
+
export { AssignableRole, Member, MemberIdParam, MemberRoleChange, MemberStatus, MembersPage, MembersQuery, Role, UpdateMemberRole };
|
|
26
40
|
|
|
27
41
|
//# sourceMappingURL=members.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"members.js","names":[],"sources":["../../../src/http/schemas/members.ts"],"sourcesContent":["// Team (org members) resource schemas.\nimport { z } from 'zod';\nimport { ListQuery, paginated, OrgUserProfileSchema } from './shared.js';\n\n/** Org-scoped roles, mirrored from better-auth's organization plugin. */\nexport const Role = z.enum(['owner', 'admin', 'instructor']);\nexport type Role = z.infer<typeof Role>;\n\nexport const MemberStatus = z.enum(['active', 'invited']);\nexport type MemberStatus = z.infer<typeof MemberStatus>;\n\nexport const Member = OrgUserProfileSchema.extend({\n role: Role,\n status: MemberStatus,\n joinedAt: z.string().nullable(),\n invitedAt: z.string().nullable(),\n});\nexport type Member = z.infer<typeof Member>;\n\nexport const MembersQuery = ListQuery.extend({\n role: Role.optional(),\n status: MemberStatus.optional(),\n});\nexport type MembersQuery = z.infer<typeof MembersQuery>;\n\nexport const MembersPage = paginated(Member);\nexport type MembersPage = z.infer<typeof MembersPage>;\n\nexport const UpdateMemberRole = z.object({ role:
|
|
1
|
+
{"version":3,"file":"members.js","names":[],"sources":["../../../src/http/schemas/members.ts"],"sourcesContent":["// Team (org members) resource schemas.\nimport { z } from 'zod';\nimport { ListQuery, paginated, OrgUserProfileSchema } from './shared.js';\n\n/** Org-scoped roles, mirrored from better-auth's organization plugin. */\nexport const Role = z.enum(['owner', 'admin', 'instructor', 'moderator']);\nexport type Role = z.infer<typeof Role>;\n\nexport const MemberStatus = z.enum(['active', 'invited']);\nexport type MemberStatus = z.infer<typeof MemberStatus>;\n\nexport const Member = OrgUserProfileSchema.extend({\n role: Role,\n status: MemberStatus,\n joinedAt: z.string().nullable(),\n invitedAt: z.string().nullable(),\n});\nexport type Member = z.infer<typeof Member>;\n\nexport const MembersQuery = ListQuery.extend({\n role: Role.optional(),\n status: MemberStatus.optional(),\n});\nexport type MembersQuery = z.infer<typeof MembersQuery>;\n\nexport const MembersPage = paginated(Member);\nexport type MembersPage = z.infer<typeof MembersPage>;\n\nexport const AssignableRole = z.enum(['admin', 'instructor', 'moderator', 'student']);\nexport type AssignableRole = z.infer<typeof AssignableRole>;\n\nexport const UpdateMemberRole = z.object({ role: AssignableRole });\nexport type UpdateMemberRole = z.infer<typeof UpdateMemberRole>;\n\nexport const MemberRoleChange = Member.extend({\n role: z.enum(['owner', 'admin', 'instructor', 'moderator', 'student']),\n});\nexport type MemberRoleChange = z.infer<typeof MemberRoleChange>;\n\nexport const MemberIdParam = z.object({ id: z.string() });\nexport type MemberIdParam = z.infer<typeof MemberIdParam>;\n"],"mappings":";;;;AAKA,MAAa,OAAO,EAAE,KAAK;CAAC;CAAS;CAAS;CAAc;AAAW,CAAC;AAGxE,MAAa,eAAe,EAAE,KAAK,CAAC,UAAU,SAAS,CAAC;AAGxD,MAAa,SAAS,qBAAqB,OAAO;CAChD,MAAM;CACN,QAAQ;CACR,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;CAC9B,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;AACjC,CAAC;AAGD,MAAa,eAAe,UAAU,OAAO;CAC3C,MAAM,KAAK,SAAS;CACpB,QAAQ,aAAa,SAAS;AAChC,CAAC;AAGD,MAAa,cAAc,UAAU,MAAM;AAG3C,MAAa,iBAAiB,EAAE,KAAK;CAAC;CAAS;CAAc;CAAa;AAAS,CAAC;AAGpF,MAAa,mBAAmB,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGjE,MAAa,mBAAmB,OAAO,OAAO,EAC5C,MAAM,EAAE,KAAK;CAAC;CAAS;CAAS;CAAc;CAAa;AAAS,CAAC,EACvE,CAAC;AAGD,MAAa,gBAAgB,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|