@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,175 +0,0 @@
|
|
|
1
|
-
import { UnauthorizedError } from "../../plugins/auth.js";
|
|
2
|
-
import { ErrorBody } from "../../schemas/shared.js";
|
|
3
|
-
import { ActivityComments, Comment, CommentIdParam, CommentReactions, CommentReport, CommentView, DiscussionActivityParam, EditComment, PostComment, ReportComment, SetCommentReaction } from "../../schemas/discussion.js";
|
|
4
|
-
import "../../schemas/index.js";
|
|
5
|
-
//#region src/http/routes/learn/comments.ts
|
|
6
|
-
async function learnCommentsRoutes(app, container) {
|
|
7
|
-
const r = app.withTypeProvider();
|
|
8
|
-
const discussion = container.discussion;
|
|
9
|
-
r.route({
|
|
10
|
-
method: "GET",
|
|
11
|
-
url: "/api/learn/activities/:activityId/comments",
|
|
12
|
-
preHandler: app.requireOrgSession,
|
|
13
|
-
schema: {
|
|
14
|
-
operationId: "listActivityComments",
|
|
15
|
-
tags: ["Discussion"],
|
|
16
|
-
summary: "Read an activity's comments",
|
|
17
|
-
params: DiscussionActivityParam,
|
|
18
|
-
response: {
|
|
19
|
-
200: ActivityComments,
|
|
20
|
-
404: ErrorBody
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
handler: async (req) => {
|
|
24
|
-
const orgId = req.orgId;
|
|
25
|
-
const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);
|
|
26
|
-
if (!orgUser) throw new UnauthorizedError();
|
|
27
|
-
return discussion.activityComments(orgId, req.params.activityId, orgUser);
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
r.route({
|
|
31
|
-
method: "POST",
|
|
32
|
-
url: "/api/learn/activities/:activityId/comments",
|
|
33
|
-
preHandler: app.requireOrgSession,
|
|
34
|
-
schema: {
|
|
35
|
-
operationId: "postComment",
|
|
36
|
-
tags: ["Discussion"],
|
|
37
|
-
summary: "Post a comment or reply on an activity",
|
|
38
|
-
params: DiscussionActivityParam,
|
|
39
|
-
body: PostComment,
|
|
40
|
-
response: {
|
|
41
|
-
200: CommentView,
|
|
42
|
-
403: ErrorBody,
|
|
43
|
-
404: ErrorBody
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
handler: async (req) => {
|
|
47
|
-
const orgId = req.orgId;
|
|
48
|
-
const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);
|
|
49
|
-
if (!orgUser) throw new UnauthorizedError();
|
|
50
|
-
return discussion.postComment(orgId, {
|
|
51
|
-
actor: orgUser,
|
|
52
|
-
activityId: req.params.activityId,
|
|
53
|
-
parentId: req.body.parentId,
|
|
54
|
-
body: req.body.body
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
r.route({
|
|
59
|
-
method: "PATCH",
|
|
60
|
-
url: "/api/learn/comments/:commentId",
|
|
61
|
-
preHandler: app.requireOrgSession,
|
|
62
|
-
schema: {
|
|
63
|
-
operationId: "editComment",
|
|
64
|
-
tags: ["Discussion"],
|
|
65
|
-
summary: "Revise your own comment",
|
|
66
|
-
params: CommentIdParam,
|
|
67
|
-
body: EditComment,
|
|
68
|
-
response: {
|
|
69
|
-
200: CommentView,
|
|
70
|
-
403: ErrorBody,
|
|
71
|
-
404: ErrorBody
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
handler: async (req) => {
|
|
75
|
-
const orgId = req.orgId;
|
|
76
|
-
const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);
|
|
77
|
-
if (!orgUser) throw new UnauthorizedError();
|
|
78
|
-
return discussion.edit(orgId, req.params.commentId, orgUser, req.body.body);
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
r.route({
|
|
82
|
-
method: "DELETE",
|
|
83
|
-
url: "/api/learn/comments/:commentId",
|
|
84
|
-
preHandler: app.requireOrgSession,
|
|
85
|
-
schema: {
|
|
86
|
-
operationId: "deleteComment",
|
|
87
|
-
tags: ["Discussion"],
|
|
88
|
-
summary: "Delete a comment",
|
|
89
|
-
params: CommentIdParam,
|
|
90
|
-
response: {
|
|
91
|
-
200: Comment,
|
|
92
|
-
403: ErrorBody,
|
|
93
|
-
404: ErrorBody
|
|
94
|
-
}
|
|
95
|
-
},
|
|
96
|
-
handler: async (req) => {
|
|
97
|
-
const orgId = req.orgId;
|
|
98
|
-
const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);
|
|
99
|
-
if (!orgUser) throw new UnauthorizedError();
|
|
100
|
-
return discussion.remove(orgId, req.params.commentId, orgUser);
|
|
101
|
-
}
|
|
102
|
-
});
|
|
103
|
-
r.route({
|
|
104
|
-
method: "PUT",
|
|
105
|
-
url: "/api/learn/comments/:commentId/reaction",
|
|
106
|
-
preHandler: app.requireOrgSession,
|
|
107
|
-
schema: {
|
|
108
|
-
operationId: "setCommentReaction",
|
|
109
|
-
tags: ["Discussion"],
|
|
110
|
-
summary: "Set your reaction to a comment, replacing any you already had",
|
|
111
|
-
params: CommentIdParam,
|
|
112
|
-
body: SetCommentReaction,
|
|
113
|
-
response: {
|
|
114
|
-
200: CommentReactions,
|
|
115
|
-
403: ErrorBody,
|
|
116
|
-
404: ErrorBody
|
|
117
|
-
}
|
|
118
|
-
},
|
|
119
|
-
handler: async (req) => {
|
|
120
|
-
const orgId = req.orgId;
|
|
121
|
-
const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);
|
|
122
|
-
if (!orgUser) throw new UnauthorizedError();
|
|
123
|
-
return discussion.setReaction(orgId, req.params.commentId, orgUser, req.body.emoji);
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
r.route({
|
|
127
|
-
method: "DELETE",
|
|
128
|
-
url: "/api/learn/comments/:commentId/reaction",
|
|
129
|
-
preHandler: app.requireOrgSession,
|
|
130
|
-
schema: {
|
|
131
|
-
operationId: "clearCommentReaction",
|
|
132
|
-
tags: ["Discussion"],
|
|
133
|
-
summary: "Withdraw your reaction from a comment",
|
|
134
|
-
params: CommentIdParam,
|
|
135
|
-
response: {
|
|
136
|
-
200: CommentReactions,
|
|
137
|
-
403: ErrorBody,
|
|
138
|
-
404: ErrorBody
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
handler: async (req) => {
|
|
142
|
-
const orgId = req.orgId;
|
|
143
|
-
const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);
|
|
144
|
-
if (!orgUser) throw new UnauthorizedError();
|
|
145
|
-
return discussion.setReaction(orgId, req.params.commentId, orgUser, null);
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
r.route({
|
|
149
|
-
method: "POST",
|
|
150
|
-
url: "/api/learn/comments/:commentId/reports",
|
|
151
|
-
preHandler: app.requireOrgSession,
|
|
152
|
-
schema: {
|
|
153
|
-
operationId: "reportComment",
|
|
154
|
-
tags: ["Discussion"],
|
|
155
|
-
summary: "Flag a comment for moderator attention",
|
|
156
|
-
params: CommentIdParam,
|
|
157
|
-
body: ReportComment,
|
|
158
|
-
response: {
|
|
159
|
-
200: CommentReport,
|
|
160
|
-
403: ErrorBody,
|
|
161
|
-
404: ErrorBody
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
handler: async (req) => {
|
|
165
|
-
const orgId = req.orgId;
|
|
166
|
-
const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);
|
|
167
|
-
if (!orgUser) throw new UnauthorizedError();
|
|
168
|
-
return discussion.reportComment(orgId, req.params.commentId, orgUser, req.body.reason);
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
}
|
|
172
|
-
//#endregion
|
|
173
|
-
export { learnCommentsRoutes };
|
|
174
|
-
|
|
175
|
-
//# sourceMappingURL=comments.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"comments.js","names":[],"sources":["../../../../src/http/routes/learn/comments.ts"],"sourcesContent":["import type { FastifyInstance } from 'fastify';\nimport type { ZodTypeProvider } from 'fastify-type-provider-zod';\nimport {\n ActivityComments,\n Comment,\n CommentIdParam,\n CommentReactions,\n CommentReport,\n CommentView,\n DiscussionActivityParam,\n EditComment,\n ErrorBody,\n PostComment,\n ReportComment,\n SetCommentReaction,\n} from '../../schemas/index.js';\nimport type { Container } from '../../../app/container.js';\nimport { UnauthorizedError } from '../../plugins/auth.js';\n\nexport async function learnCommentsRoutes(\n app: FastifyInstance,\n container: Container,\n): Promise<void> {\n const r = app.withTypeProvider<ZodTypeProvider>();\n const discussion = container.discussion;\n\n r.route({\n method: 'GET',\n url: '/api/learn/activities/:activityId/comments',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'listActivityComments',\n tags: ['Discussion'],\n summary: \"Read an activity's comments\",\n params: DiscussionActivityParam,\n response: { 200: ActivityComments, 404: ErrorBody },\n },\n handler: async (req) => {\n const orgId = req.orgId;\n const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);\n if (!orgUser) {\n throw new UnauthorizedError();\n }\n return discussion.activityComments(orgId, req.params.activityId, orgUser);\n },\n });\n\n r.route({\n method: 'POST',\n url: '/api/learn/activities/:activityId/comments',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'postComment',\n tags: ['Discussion'],\n summary: 'Post a comment or reply on an activity',\n params: DiscussionActivityParam,\n body: PostComment,\n response: { 200: CommentView, 403: ErrorBody, 404: ErrorBody },\n },\n handler: async (req) => {\n const orgId = req.orgId;\n const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);\n if (!orgUser) {\n throw new UnauthorizedError();\n }\n return discussion.postComment(orgId, {\n actor: orgUser,\n activityId: req.params.activityId,\n parentId: req.body.parentId,\n body: req.body.body,\n });\n },\n });\n\n r.route({\n method: 'PATCH',\n url: '/api/learn/comments/:commentId',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'editComment',\n tags: ['Discussion'],\n summary: 'Revise your own comment',\n params: CommentIdParam,\n body: EditComment,\n response: { 200: CommentView, 403: ErrorBody, 404: ErrorBody },\n },\n handler: async (req) => {\n const orgId = req.orgId;\n const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);\n if (!orgUser) {\n throw new UnauthorizedError();\n }\n return discussion.edit(orgId, req.params.commentId, orgUser, req.body.body);\n },\n });\n\n r.route({\n method: 'DELETE',\n url: '/api/learn/comments/:commentId',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'deleteComment',\n tags: ['Discussion'],\n summary: 'Delete a comment',\n params: CommentIdParam,\n response: { 200: Comment, 403: ErrorBody, 404: ErrorBody },\n },\n handler: async (req) => {\n const orgId = req.orgId;\n const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);\n if (!orgUser) {\n throw new UnauthorizedError();\n }\n return discussion.remove(orgId, req.params.commentId, orgUser);\n },\n });\n\n r.route({\n method: 'PUT',\n url: '/api/learn/comments/:commentId/reaction',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'setCommentReaction',\n tags: ['Discussion'],\n summary: 'Set your reaction to a comment, replacing any you already had',\n params: CommentIdParam,\n body: SetCommentReaction,\n response: { 200: CommentReactions, 403: ErrorBody, 404: ErrorBody },\n },\n handler: async (req) => {\n const orgId = req.orgId;\n const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);\n if (!orgUser) {\n throw new UnauthorizedError();\n }\n return discussion.setReaction(orgId, req.params.commentId, orgUser, req.body.emoji);\n },\n });\n\n r.route({\n method: 'DELETE',\n url: '/api/learn/comments/:commentId/reaction',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'clearCommentReaction',\n tags: ['Discussion'],\n summary: 'Withdraw your reaction from a comment',\n params: CommentIdParam,\n response: { 200: CommentReactions, 403: ErrorBody, 404: ErrorBody },\n },\n handler: async (req) => {\n const orgId = req.orgId;\n const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);\n if (!orgUser) {\n throw new UnauthorizedError();\n }\n return discussion.setReaction(orgId, req.params.commentId, orgUser, null);\n },\n });\n\n r.route({\n method: 'POST',\n url: '/api/learn/comments/:commentId/reports',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'reportComment',\n tags: ['Discussion'],\n summary: 'Flag a comment for moderator attention',\n params: CommentIdParam,\n body: ReportComment,\n response: { 200: CommentReport, 403: ErrorBody, 404: ErrorBody },\n },\n handler: async (req) => {\n const orgId = req.orgId;\n const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);\n if (!orgUser) {\n throw new UnauthorizedError();\n }\n return discussion.reportComment(orgId, req.params.commentId, orgUser, req.body.reason);\n },\n });\n}\n"],"mappings":";;;;;AAmBA,eAAsB,oBACpB,KACA,WACe;CACf,MAAM,IAAI,IAAI,iBAAkC;CAChD,MAAM,aAAa,UAAU;CAE7B,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb,MAAM,CAAC,YAAY;GACnB,SAAS;GACT,QAAQ;GACR,UAAU;IAAE,KAAK;IAAkB,KAAK;GAAU;EACpD;EACA,SAAS,OAAO,QAAQ;GACtB,MAAM,QAAQ,IAAI;GAClB,MAAM,UAAU,MAAM,UAAU,cAAc,WAAW,IAAI,OAAO,IAAI,MAAM;GAC9E,IAAI,CAAC,SACH,MAAM,IAAI,kBAAkB;GAE9B,OAAO,WAAW,iBAAiB,OAAO,IAAI,OAAO,YAAY,OAAO;EAC1E;CACF,CAAC;CAED,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb,MAAM,CAAC,YAAY;GACnB,SAAS;GACT,QAAQ;GACR,MAAM;GACN,UAAU;IAAE,KAAK;IAAa,KAAK;IAAW,KAAK;GAAU;EAC/D;EACA,SAAS,OAAO,QAAQ;GACtB,MAAM,QAAQ,IAAI;GAClB,MAAM,UAAU,MAAM,UAAU,cAAc,WAAW,IAAI,OAAO,IAAI,MAAM;GAC9E,IAAI,CAAC,SACH,MAAM,IAAI,kBAAkB;GAE9B,OAAO,WAAW,YAAY,OAAO;IACnC,OAAO;IACP,YAAY,IAAI,OAAO;IACvB,UAAU,IAAI,KAAK;IACnB,MAAM,IAAI,KAAK;GACjB,CAAC;EACH;CACF,CAAC;CAED,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb,MAAM,CAAC,YAAY;GACnB,SAAS;GACT,QAAQ;GACR,MAAM;GACN,UAAU;IAAE,KAAK;IAAa,KAAK;IAAW,KAAK;GAAU;EAC/D;EACA,SAAS,OAAO,QAAQ;GACtB,MAAM,QAAQ,IAAI;GAClB,MAAM,UAAU,MAAM,UAAU,cAAc,WAAW,IAAI,OAAO,IAAI,MAAM;GAC9E,IAAI,CAAC,SACH,MAAM,IAAI,kBAAkB;GAE9B,OAAO,WAAW,KAAK,OAAO,IAAI,OAAO,WAAW,SAAS,IAAI,KAAK,IAAI;EAC5E;CACF,CAAC;CAED,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb,MAAM,CAAC,YAAY;GACnB,SAAS;GACT,QAAQ;GACR,UAAU;IAAE,KAAK;IAAS,KAAK;IAAW,KAAK;GAAU;EAC3D;EACA,SAAS,OAAO,QAAQ;GACtB,MAAM,QAAQ,IAAI;GAClB,MAAM,UAAU,MAAM,UAAU,cAAc,WAAW,IAAI,OAAO,IAAI,MAAM;GAC9E,IAAI,CAAC,SACH,MAAM,IAAI,kBAAkB;GAE9B,OAAO,WAAW,OAAO,OAAO,IAAI,OAAO,WAAW,OAAO;EAC/D;CACF,CAAC;CAED,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb,MAAM,CAAC,YAAY;GACnB,SAAS;GACT,QAAQ;GACR,MAAM;GACN,UAAU;IAAE,KAAK;IAAkB,KAAK;IAAW,KAAK;GAAU;EACpE;EACA,SAAS,OAAO,QAAQ;GACtB,MAAM,QAAQ,IAAI;GAClB,MAAM,UAAU,MAAM,UAAU,cAAc,WAAW,IAAI,OAAO,IAAI,MAAM;GAC9E,IAAI,CAAC,SACH,MAAM,IAAI,kBAAkB;GAE9B,OAAO,WAAW,YAAY,OAAO,IAAI,OAAO,WAAW,SAAS,IAAI,KAAK,KAAK;EACpF;CACF,CAAC;CAED,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb,MAAM,CAAC,YAAY;GACnB,SAAS;GACT,QAAQ;GACR,UAAU;IAAE,KAAK;IAAkB,KAAK;IAAW,KAAK;GAAU;EACpE;EACA,SAAS,OAAO,QAAQ;GACtB,MAAM,QAAQ,IAAI;GAClB,MAAM,UAAU,MAAM,UAAU,cAAc,WAAW,IAAI,OAAO,IAAI,MAAM;GAC9E,IAAI,CAAC,SACH,MAAM,IAAI,kBAAkB;GAE9B,OAAO,WAAW,YAAY,OAAO,IAAI,OAAO,WAAW,SAAS,IAAI;EAC1E;CACF,CAAC;CAED,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb,MAAM,CAAC,YAAY;GACnB,SAAS;GACT,QAAQ;GACR,MAAM;GACN,UAAU;IAAE,KAAK;IAAe,KAAK;IAAW,KAAK;GAAU;EACjE;EACA,SAAS,OAAO,QAAQ;GACtB,MAAM,QAAQ,IAAI;GAClB,MAAM,UAAU,MAAM,UAAU,cAAc,WAAW,IAAI,OAAO,IAAI,MAAM;GAC9E,IAAI,CAAC,SACH,MAAM,IAAI,kBAAkB;GAE9B,OAAO,WAAW,cAAc,OAAO,IAAI,OAAO,WAAW,SAAS,IAAI,KAAK,MAAM;EACvF;CACF,CAAC;AACH"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Container } from "../../../app/container.js";
|
|
2
|
-
import { FastifyInstance } from "fastify";
|
|
3
|
-
//#region src/http/routes/learn/courses.d.ts
|
|
4
|
-
declare function learnCoursesRoutes(app: FastifyInstance, container: Container): Promise<void>;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { learnCoursesRoutes };
|
|
7
|
-
//# sourceMappingURL=courses.d.ts.map
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { UnauthorizedError } from "../../plugins/auth.js";
|
|
2
|
-
import { ErrorBody } from "../../schemas/shared.js";
|
|
3
|
-
import { Course } from "../../schemas/content.js";
|
|
4
|
-
import { ActivityList } from "../../schemas/activities.js";
|
|
5
|
-
import { LearnCourseIdParam, LearnCourses, LearnModules } from "../../schemas/learn.js";
|
|
6
|
-
import "../../schemas/index.js";
|
|
7
|
-
import { NotFoundError } from "@headless-lms/core/shared/errors";
|
|
8
|
-
//#region src/http/routes/learn/courses.ts
|
|
9
|
-
async function learnCoursesRoutes(app, container) {
|
|
10
|
-
const r = app.withTypeProvider();
|
|
11
|
-
const learn = container.reporting.learn;
|
|
12
|
-
r.route({
|
|
13
|
-
method: "GET",
|
|
14
|
-
url: "/api/learn/courses",
|
|
15
|
-
preHandler: app.requireOrgSession,
|
|
16
|
-
schema: {
|
|
17
|
-
operationId: "listLearnCourses",
|
|
18
|
-
tags: ["Content"],
|
|
19
|
-
summary: "List the student's enrolled courses",
|
|
20
|
-
response: { 200: LearnCourses }
|
|
21
|
-
},
|
|
22
|
-
handler: async (req) => {
|
|
23
|
-
const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);
|
|
24
|
-
if (!orgUser) throw new UnauthorizedError();
|
|
25
|
-
return learn.listCourses(req.orgId, orgUser.id);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
r.route({
|
|
29
|
-
method: "GET",
|
|
30
|
-
url: "/api/learn/courses/:courseId",
|
|
31
|
-
preHandler: app.requireOrgSession,
|
|
32
|
-
schema: {
|
|
33
|
-
operationId: "getLearnCourse",
|
|
34
|
-
tags: ["Content"],
|
|
35
|
-
summary: "Get one enrolled course",
|
|
36
|
-
params: LearnCourseIdParam,
|
|
37
|
-
response: {
|
|
38
|
-
200: Course,
|
|
39
|
-
404: ErrorBody
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
handler: async (req) => {
|
|
43
|
-
const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);
|
|
44
|
-
if (!orgUser) throw new UnauthorizedError();
|
|
45
|
-
const course = await learn.getCourse(req.orgId, orgUser.id, req.params.courseId);
|
|
46
|
-
if (!course) throw new NotFoundError("Course", req.params.courseId);
|
|
47
|
-
return course;
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
r.route({
|
|
51
|
-
method: "GET",
|
|
52
|
-
url: "/api/learn/courses/:courseId/modules",
|
|
53
|
-
preHandler: app.requireOrgSession,
|
|
54
|
-
schema: {
|
|
55
|
-
operationId: "listLearnModules",
|
|
56
|
-
tags: ["Content"],
|
|
57
|
-
summary: "List an enrolled course's module/activity tree",
|
|
58
|
-
params: LearnCourseIdParam,
|
|
59
|
-
response: {
|
|
60
|
-
200: LearnModules,
|
|
61
|
-
404: ErrorBody
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
handler: async (req) => {
|
|
65
|
-
const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);
|
|
66
|
-
if (!orgUser) throw new UnauthorizedError();
|
|
67
|
-
const modules = await learn.listModules(req.orgId, orgUser.id, req.params.courseId);
|
|
68
|
-
if (!modules) throw new NotFoundError("Course", req.params.courseId);
|
|
69
|
-
return modules;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
r.route({
|
|
73
|
-
method: "GET",
|
|
74
|
-
url: "/api/learn/courses/:courseId/activities",
|
|
75
|
-
preHandler: app.requireOrgSession,
|
|
76
|
-
schema: {
|
|
77
|
-
operationId: "listLearnActivities",
|
|
78
|
-
tags: ["Content"],
|
|
79
|
-
summary: "List an enrolled course's published activities",
|
|
80
|
-
params: LearnCourseIdParam,
|
|
81
|
-
response: {
|
|
82
|
-
200: ActivityList,
|
|
83
|
-
404: ErrorBody
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
handler: async (req) => {
|
|
87
|
-
const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);
|
|
88
|
-
if (!orgUser) throw new UnauthorizedError();
|
|
89
|
-
const activities = await learn.listActivities(req.orgId, orgUser.id, req.params.courseId);
|
|
90
|
-
if (!activities) throw new NotFoundError("Course", req.params.courseId);
|
|
91
|
-
return activities;
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
//#endregion
|
|
96
|
-
export { learnCoursesRoutes };
|
|
97
|
-
|
|
98
|
-
//# sourceMappingURL=courses.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"courses.js","names":[],"sources":["../../../../src/http/routes/learn/courses.ts"],"sourcesContent":["import type { FastifyInstance } from 'fastify';\nimport type { ZodTypeProvider } from 'fastify-type-provider-zod';\nimport {\n ActivityList,\n Course,\n ErrorBody,\n LearnCourseIdParam,\n LearnCourses,\n LearnModules,\n} from '../../schemas/index.js';\nimport { NotFoundError } from '@headless-lms/core/shared/errors';\nimport type { Container } from '../../../app/container.js';\nimport { UnauthorizedError } from '../../plugins/auth.js';\n\nexport async function learnCoursesRoutes(\n app: FastifyInstance,\n container: Container,\n): Promise<void> {\n const r = app.withTypeProvider<ZodTypeProvider>();\n const learn = container.reporting.learn;\n\n r.route({\n method: 'GET',\n url: '/api/learn/courses',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'listLearnCourses',\n tags: ['Content'],\n summary: \"List the student's enrolled courses\",\n response: { 200: LearnCourses },\n },\n handler: async (req) => {\n const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);\n if (!orgUser) {\n throw new UnauthorizedError();\n }\n return learn.listCourses(req.orgId, orgUser.id);\n },\n });\n\n r.route({\n method: 'GET',\n url: '/api/learn/courses/:courseId',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'getLearnCourse',\n tags: ['Content'],\n summary: 'Get one enrolled course',\n params: LearnCourseIdParam,\n response: { 200: Course, 404: ErrorBody },\n },\n handler: async (req) => {\n const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);\n if (!orgUser) {\n throw new UnauthorizedError();\n }\n const course = await learn.getCourse(req.orgId, orgUser.id, req.params.courseId);\n if (!course) {\n throw new NotFoundError('Course', req.params.courseId);\n }\n return course;\n },\n });\n\n r.route({\n method: 'GET',\n url: '/api/learn/courses/:courseId/modules',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'listLearnModules',\n tags: ['Content'],\n summary: \"List an enrolled course's module/activity tree\",\n params: LearnCourseIdParam,\n response: { 200: LearnModules, 404: ErrorBody },\n },\n handler: async (req) => {\n const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);\n if (!orgUser) {\n throw new UnauthorizedError();\n }\n const modules = await learn.listModules(req.orgId, orgUser.id, req.params.courseId);\n if (!modules) {\n throw new NotFoundError('Course', req.params.courseId);\n }\n return modules;\n },\n });\n\n r.route({\n method: 'GET',\n url: '/api/learn/courses/:courseId/activities',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'listLearnActivities',\n tags: ['Content'],\n summary: \"List an enrolled course's published activities\",\n params: LearnCourseIdParam,\n response: { 200: ActivityList, 404: ErrorBody },\n },\n handler: async (req) => {\n const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);\n if (!orgUser) {\n throw new UnauthorizedError();\n }\n const activities = await learn.listActivities(req.orgId, orgUser.id, req.params.courseId);\n if (!activities) {\n throw new NotFoundError('Course', req.params.courseId);\n }\n return activities;\n },\n });\n}\n"],"mappings":";;;;;;;;AAcA,eAAsB,mBACpB,KACA,WACe;CACf,MAAM,IAAI,IAAI,iBAAkC;CAChD,MAAM,QAAQ,UAAU,UAAU;CAElC,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb,MAAM,CAAC,SAAS;GAChB,SAAS;GACT,UAAU,EAAE,KAAK,aAAa;EAChC;EACA,SAAS,OAAO,QAAQ;GACtB,MAAM,UAAU,MAAM,UAAU,cAAc,WAAW,IAAI,OAAO,IAAI,MAAM;GAC9E,IAAI,CAAC,SACH,MAAM,IAAI,kBAAkB;GAE9B,OAAO,MAAM,YAAY,IAAI,OAAO,QAAQ,EAAE;EAChD;CACF,CAAC;CAED,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb,MAAM,CAAC,SAAS;GAChB,SAAS;GACT,QAAQ;GACR,UAAU;IAAE,KAAK;IAAQ,KAAK;GAAU;EAC1C;EACA,SAAS,OAAO,QAAQ;GACtB,MAAM,UAAU,MAAM,UAAU,cAAc,WAAW,IAAI,OAAO,IAAI,MAAM;GAC9E,IAAI,CAAC,SACH,MAAM,IAAI,kBAAkB;GAE9B,MAAM,SAAS,MAAM,MAAM,UAAU,IAAI,OAAO,QAAQ,IAAI,IAAI,OAAO,QAAQ;GAC/E,IAAI,CAAC,QACH,MAAM,IAAI,cAAc,UAAU,IAAI,OAAO,QAAQ;GAEvD,OAAO;EACT;CACF,CAAC;CAED,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb,MAAM,CAAC,SAAS;GAChB,SAAS;GACT,QAAQ;GACR,UAAU;IAAE,KAAK;IAAc,KAAK;GAAU;EAChD;EACA,SAAS,OAAO,QAAQ;GACtB,MAAM,UAAU,MAAM,UAAU,cAAc,WAAW,IAAI,OAAO,IAAI,MAAM;GAC9E,IAAI,CAAC,SACH,MAAM,IAAI,kBAAkB;GAE9B,MAAM,UAAU,MAAM,MAAM,YAAY,IAAI,OAAO,QAAQ,IAAI,IAAI,OAAO,QAAQ;GAClF,IAAI,CAAC,SACH,MAAM,IAAI,cAAc,UAAU,IAAI,OAAO,QAAQ;GAEvD,OAAO;EACT;CACF,CAAC;CAED,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb,MAAM,CAAC,SAAS;GAChB,SAAS;GACT,QAAQ;GACR,UAAU;IAAE,KAAK;IAAc,KAAK;GAAU;EAChD;EACA,SAAS,OAAO,QAAQ;GACtB,MAAM,UAAU,MAAM,UAAU,cAAc,WAAW,IAAI,OAAO,IAAI,MAAM;GAC9E,IAAI,CAAC,SACH,MAAM,IAAI,kBAAkB;GAE9B,MAAM,aAAa,MAAM,MAAM,eAAe,IAAI,OAAO,QAAQ,IAAI,IAAI,OAAO,QAAQ;GACxF,IAAI,CAAC,YACH,MAAM,IAAI,cAAc,UAAU,IAAI,OAAO,QAAQ;GAEvD,OAAO;EACT;CACF,CAAC;AACH"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Container } from "../../../app/container.js";
|
|
2
|
-
import { FastifyInstance } from "fastify";
|
|
3
|
-
//#region src/http/routes/learn/downloads.d.ts
|
|
4
|
-
declare function learnDownloadsRoutes(app: FastifyInstance, container: Container): Promise<void>;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { learnDownloadsRoutes };
|
|
7
|
-
//# sourceMappingURL=downloads.d.ts.map
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { UnauthorizedError } from "../../plugins/auth.js";
|
|
2
|
-
import { ErrorBody } from "../../schemas/shared.js";
|
|
3
|
-
import { DownloadAssetParams, DownloadIdParam } from "../../schemas/downloads.js";
|
|
4
|
-
import { LearnDownload, LearnDownloads } from "../../schemas/learn.js";
|
|
5
|
-
import "../../schemas/index.js";
|
|
6
|
-
import { NotFoundError } from "@headless-lms/core/shared/errors";
|
|
7
|
-
import { z } from "zod";
|
|
8
|
-
//#region src/http/routes/learn/downloads.ts
|
|
9
|
-
async function learnDownloadsRoutes(app, container) {
|
|
10
|
-
const r = app.withTypeProvider();
|
|
11
|
-
const learn = container.reporting.learn;
|
|
12
|
-
r.route({
|
|
13
|
-
method: "GET",
|
|
14
|
-
url: "/api/learn/downloads",
|
|
15
|
-
preHandler: app.requireOrgSession,
|
|
16
|
-
schema: {
|
|
17
|
-
operationId: "listLearnDownloads",
|
|
18
|
-
tags: ["Content"],
|
|
19
|
-
summary: "Downloads the student is actively entitled to",
|
|
20
|
-
response: { 200: LearnDownloads }
|
|
21
|
-
},
|
|
22
|
-
handler: async (req) => {
|
|
23
|
-
const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);
|
|
24
|
-
if (!orgUser) throw new UnauthorizedError();
|
|
25
|
-
return learn.listDownloads(req.orgId, orgUser.id);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
r.route({
|
|
29
|
-
method: "GET",
|
|
30
|
-
url: "/api/learn/downloads/:downloadId",
|
|
31
|
-
preHandler: app.requireOrgSession,
|
|
32
|
-
schema: {
|
|
33
|
-
operationId: "getLearnDownload",
|
|
34
|
-
tags: ["Content"],
|
|
35
|
-
summary: "One entitled download and its ordered assets",
|
|
36
|
-
params: DownloadIdParam,
|
|
37
|
-
response: {
|
|
38
|
-
200: LearnDownload,
|
|
39
|
-
404: ErrorBody
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
handler: async (req) => {
|
|
43
|
-
const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);
|
|
44
|
-
if (!orgUser) throw new UnauthorizedError();
|
|
45
|
-
const result = await learn.getDownload(req.orgId, orgUser.id, req.params.downloadId);
|
|
46
|
-
if (!result) throw new NotFoundError("Download", req.params.downloadId);
|
|
47
|
-
return result;
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
r.route({
|
|
51
|
-
method: "GET",
|
|
52
|
-
url: "/api/learn/downloads/:downloadId/assets/:assetId",
|
|
53
|
-
preHandler: app.requireOrgSession,
|
|
54
|
-
schema: {
|
|
55
|
-
operationId: "getLearnDownloadAsset",
|
|
56
|
-
tags: ["Content"],
|
|
57
|
-
summary: "Redirect to a short-lived signed URL for an entitled asset",
|
|
58
|
-
params: DownloadAssetParams,
|
|
59
|
-
response: {
|
|
60
|
-
302: z.void(),
|
|
61
|
-
404: ErrorBody
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
handler: async (req, reply) => {
|
|
65
|
-
const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);
|
|
66
|
-
if (!orgUser) throw new UnauthorizedError();
|
|
67
|
-
const signed = await learn.downloadAssetUrl(req.orgId, orgUser.id, req.params.downloadId, req.params.assetId);
|
|
68
|
-
if (!signed) throw new NotFoundError("Download asset", req.params.assetId);
|
|
69
|
-
return reply.header("cache-control", "no-store").header("referrer-policy", "no-referrer").redirect(signed.url, 302);
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
//#endregion
|
|
74
|
-
export { learnDownloadsRoutes };
|
|
75
|
-
|
|
76
|
-
//# sourceMappingURL=downloads.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"downloads.js","names":[],"sources":["../../../../src/http/routes/learn/downloads.ts"],"sourcesContent":["import { z } from 'zod';\nimport type { FastifyInstance } from 'fastify';\nimport type { ZodTypeProvider } from 'fastify-type-provider-zod';\nimport {\n DownloadAssetParams,\n DownloadIdParam,\n ErrorBody,\n LearnDownload,\n LearnDownloads,\n} from '../../schemas/index.js';\nimport { NotFoundError } from '@headless-lms/core/shared/errors';\nimport type { Container } from '../../../app/container.js';\nimport { UnauthorizedError } from '../../plugins/auth.js';\n\nexport async function learnDownloadsRoutes(\n app: FastifyInstance,\n container: Container,\n): Promise<void> {\n const r = app.withTypeProvider<ZodTypeProvider>();\n const learn = container.reporting.learn;\n\n r.route({\n method: 'GET',\n url: '/api/learn/downloads',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'listLearnDownloads',\n tags: ['Content'],\n summary: 'Downloads the student is actively entitled to',\n response: { 200: LearnDownloads },\n },\n handler: async (req) => {\n const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);\n if (!orgUser) {\n throw new UnauthorizedError();\n }\n return learn.listDownloads(req.orgId, orgUser.id);\n },\n });\n\n r.route({\n method: 'GET',\n url: '/api/learn/downloads/:downloadId',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'getLearnDownload',\n tags: ['Content'],\n summary: 'One entitled download and its ordered assets',\n params: DownloadIdParam,\n response: { 200: LearnDownload, 404: ErrorBody },\n },\n handler: async (req) => {\n const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);\n if (!orgUser) {\n throw new UnauthorizedError();\n }\n const result = await learn.getDownload(req.orgId, orgUser.id, req.params.downloadId);\n if (!result) {\n throw new NotFoundError('Download', req.params.downloadId);\n }\n return result;\n },\n });\n\n // One stable, resolvable URL per asset. Drops into an <a href download> in\n // any frontend — no JS, no SDK, no CORS preflight. The signed target is\n // minted per request and short-lived.\n r.route({\n method: 'GET',\n url: '/api/learn/downloads/:downloadId/assets/:assetId',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'getLearnDownloadAsset',\n tags: ['Content'],\n summary: 'Redirect to a short-lived signed URL for an entitled asset',\n params: DownloadAssetParams,\n response: { 302: z.void(), 404: ErrorBody },\n },\n handler: async (req, reply) => {\n const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);\n if (!orgUser) {\n throw new UnauthorizedError();\n }\n const signed = await learn.downloadAssetUrl(\n req.orgId,\n orgUser.id,\n req.params.downloadId,\n req.params.assetId,\n );\n if (!signed) {\n // Always 404, never 403 — a 403 confirms the resource exists to\n // someone not entitled to it.\n throw new NotFoundError('Download asset', req.params.assetId);\n }\n return reply\n .header('cache-control', 'no-store')\n .header('referrer-policy', 'no-referrer')\n .redirect(signed.url, 302);\n },\n });\n}\n"],"mappings":";;;;;;;;AAcA,eAAsB,qBACpB,KACA,WACe;CACf,MAAM,IAAI,IAAI,iBAAkC;CAChD,MAAM,QAAQ,UAAU,UAAU;CAElC,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb,MAAM,CAAC,SAAS;GAChB,SAAS;GACT,UAAU,EAAE,KAAK,eAAe;EAClC;EACA,SAAS,OAAO,QAAQ;GACtB,MAAM,UAAU,MAAM,UAAU,cAAc,WAAW,IAAI,OAAO,IAAI,MAAM;GAC9E,IAAI,CAAC,SACH,MAAM,IAAI,kBAAkB;GAE9B,OAAO,MAAM,cAAc,IAAI,OAAO,QAAQ,EAAE;EAClD;CACF,CAAC;CAED,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb,MAAM,CAAC,SAAS;GAChB,SAAS;GACT,QAAQ;GACR,UAAU;IAAE,KAAK;IAAe,KAAK;GAAU;EACjD;EACA,SAAS,OAAO,QAAQ;GACtB,MAAM,UAAU,MAAM,UAAU,cAAc,WAAW,IAAI,OAAO,IAAI,MAAM;GAC9E,IAAI,CAAC,SACH,MAAM,IAAI,kBAAkB;GAE9B,MAAM,SAAS,MAAM,MAAM,YAAY,IAAI,OAAO,QAAQ,IAAI,IAAI,OAAO,UAAU;GACnF,IAAI,CAAC,QACH,MAAM,IAAI,cAAc,YAAY,IAAI,OAAO,UAAU;GAE3D,OAAO;EACT;CACF,CAAC;CAKD,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb,MAAM,CAAC,SAAS;GAChB,SAAS;GACT,QAAQ;GACR,UAAU;IAAE,KAAK,EAAE,KAAK;IAAG,KAAK;GAAU;EAC5C;EACA,SAAS,OAAO,KAAK,UAAU;GAC7B,MAAM,UAAU,MAAM,UAAU,cAAc,WAAW,IAAI,OAAO,IAAI,MAAM;GAC9E,IAAI,CAAC,SACH,MAAM,IAAI,kBAAkB;GAE9B,MAAM,SAAS,MAAM,MAAM,iBACzB,IAAI,OACJ,QAAQ,IACR,IAAI,OAAO,YACX,IAAI,OAAO,OACb;GACA,IAAI,CAAC,QAGH,MAAM,IAAI,cAAc,kBAAkB,IAAI,OAAO,OAAO;GAE9D,OAAO,MACJ,OAAO,iBAAiB,UAAU,CAAC,CACnC,OAAO,mBAAmB,aAAa,CAAC,CACxC,SAAS,OAAO,KAAK,GAAG;EAC7B;CACF,CAAC;AACH"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Container } from "../../../app/container.js";
|
|
2
|
-
import { FastifyInstance } from "fastify";
|
|
3
|
-
//#region src/http/routes/learn/index.d.ts
|
|
4
|
-
declare function learnRoutes(app: FastifyInstance, container: Container): Promise<void>;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { learnRoutes };
|
|
7
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { learnAssetsRoutes } from "./assets.js";
|
|
2
|
-
import { learnCommentsRoutes } from "./comments.js";
|
|
3
|
-
import { learnCoursesRoutes } from "./courses.js";
|
|
4
|
-
import { learnDownloadsRoutes } from "./downloads.js";
|
|
5
|
-
import { learnOrgRoutes } from "./org.js";
|
|
6
|
-
import { learnProgressRoutes } from "./progress.js";
|
|
7
|
-
//#region src/http/routes/learn/index.ts
|
|
8
|
-
async function learnRoutes(app, container) {
|
|
9
|
-
await learnOrgRoutes(app, container);
|
|
10
|
-
await learnCoursesRoutes(app, container);
|
|
11
|
-
await learnProgressRoutes(app, container);
|
|
12
|
-
await learnCommentsRoutes(app, container);
|
|
13
|
-
await learnAssetsRoutes(app, container);
|
|
14
|
-
await learnDownloadsRoutes(app, container);
|
|
15
|
-
}
|
|
16
|
-
//#endregion
|
|
17
|
-
export { learnRoutes };
|
|
18
|
-
|
|
19
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/http/routes/learn/index.ts"],"sourcesContent":["// HTTP routes for the student-facing Learn surface. Session-guarded like every\n// back-office route, but scoped by the session's `org_users` row —\n// the reads gate on the person's enrollments, not on staff role. One file per\n// resource; everything under `/api/learn` lives in this directory and nowhere\n// else.\nimport type { FastifyInstance } from 'fastify';\nimport type { Container } from '../../../app/container.js';\nimport { learnAssetsRoutes } from './assets.js';\nimport { learnCommentsRoutes } from './comments.js';\nimport { learnCoursesRoutes } from './courses.js';\nimport { learnDownloadsRoutes } from './downloads.js';\nimport { learnOrgRoutes } from './org.js';\nimport { learnProgressRoutes } from './progress.js';\n\nexport async function learnRoutes(app: FastifyInstance, container: Container): Promise<void> {\n await learnOrgRoutes(app, container);\n await learnCoursesRoutes(app, container);\n await learnProgressRoutes(app, container);\n await learnCommentsRoutes(app, container);\n await learnAssetsRoutes(app, container);\n await learnDownloadsRoutes(app, container);\n}\n"],"mappings":";;;;;;;AAcA,eAAsB,YAAY,KAAsB,WAAqC;CAC3F,MAAM,eAAe,KAAK,SAAS;CACnC,MAAM,mBAAmB,KAAK,SAAS;CACvC,MAAM,oBAAoB,KAAK,SAAS;CACxC,MAAM,oBAAoB,KAAK,SAAS;CACxC,MAAM,kBAAkB,KAAK,SAAS;CACtC,MAAM,qBAAqB,KAAK,SAAS;AAC3C"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Container } from "../../../app/container.js";
|
|
2
|
-
import { FastifyInstance } from "fastify";
|
|
3
|
-
//#region src/http/routes/learn/org.d.ts
|
|
4
|
-
declare function learnOrgRoutes(app: FastifyInstance, container: Container): Promise<void>;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { learnOrgRoutes };
|
|
7
|
-
//# sourceMappingURL=org.d.ts.map
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { UnauthorizedError } from "../../plugins/auth.js";
|
|
2
|
-
import { LearnOrg, LearnViewer } from "../../schemas/learn.js";
|
|
3
|
-
import "../../schemas/index.js";
|
|
4
|
-
//#region src/http/routes/learn/org.ts
|
|
5
|
-
async function learnOrgRoutes(app, container) {
|
|
6
|
-
const r = app.withTypeProvider();
|
|
7
|
-
r.route({
|
|
8
|
-
method: "GET",
|
|
9
|
-
url: "/api/learn/org",
|
|
10
|
-
preHandler: app.requireOrgSession,
|
|
11
|
-
schema: {
|
|
12
|
-
operationId: "getLearnOrg",
|
|
13
|
-
tags: ["Organizations"],
|
|
14
|
-
summary: "Get the portal org's public identity (branding)",
|
|
15
|
-
response: { 200: LearnOrg }
|
|
16
|
-
},
|
|
17
|
-
handler: async (req) => {
|
|
18
|
-
const org = await container.organizations.getById(req.orgId);
|
|
19
|
-
if (!org) throw new UnauthorizedError("session organization not found");
|
|
20
|
-
return {
|
|
21
|
-
id: org.id,
|
|
22
|
-
name: org.name,
|
|
23
|
-
slug: org.slug
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
r.route({
|
|
28
|
-
method: "GET",
|
|
29
|
-
url: "/api/learn/viewer",
|
|
30
|
-
preHandler: app.requireOrgSession,
|
|
31
|
-
schema: {
|
|
32
|
-
operationId: "getLearnViewer",
|
|
33
|
-
tags: ["Organizations"],
|
|
34
|
-
summary: "Get the caller's identity within the session's org",
|
|
35
|
-
response: { 200: LearnViewer }
|
|
36
|
-
},
|
|
37
|
-
handler: async (req) => {
|
|
38
|
-
const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);
|
|
39
|
-
if (!orgUser) throw new UnauthorizedError();
|
|
40
|
-
return {
|
|
41
|
-
orgUserId: orgUser.id,
|
|
42
|
-
role: orgUser.role
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
//#endregion
|
|
48
|
-
export { learnOrgRoutes };
|
|
49
|
-
|
|
50
|
-
//# sourceMappingURL=org.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"org.js","names":[],"sources":["../../../../src/http/routes/learn/org.ts"],"sourcesContent":["import type { FastifyInstance } from 'fastify';\nimport type { ZodTypeProvider } from 'fastify-type-provider-zod';\nimport { LearnOrg, LearnViewer } from '../../schemas/index.js';\nimport type { Container } from '../../../app/container.js';\nimport { UnauthorizedError } from '../../plugins/auth.js';\n\nexport async function learnOrgRoutes(app: FastifyInstance, container: Container): Promise<void> {\n const r = app.withTypeProvider<ZodTypeProvider>();\n\n r.route({\n method: 'GET',\n url: '/api/learn/org',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'getLearnOrg',\n tags: ['Organizations'],\n summary: \"Get the portal org's public identity (branding)\",\n response: { 200: LearnOrg },\n },\n handler: async (req) => {\n // The session's org (from `activeOrganizationId`) — surface its display\n // identity for the portal brand.\n const org = await container.organizations.getById(req.orgId);\n if (!org) {\n throw new UnauthorizedError('session organization not found');\n }\n return { id: org.id, name: org.name, slug: org.slug };\n },\n });\n\n r.route({\n method: 'GET',\n url: '/api/learn/viewer',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'getLearnViewer',\n tags: ['Organizations'],\n summary: \"Get the caller's identity within the session's org\",\n response: { 200: LearnViewer },\n },\n handler: async (req) => {\n const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);\n if (!orgUser) {\n throw new UnauthorizedError();\n }\n return { orgUserId: orgUser.id, role: orgUser.role };\n },\n });\n}\n"],"mappings":";;;;AAMA,eAAsB,eAAe,KAAsB,WAAqC;CAC9F,MAAM,IAAI,IAAI,iBAAkC;CAEhD,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb,MAAM,CAAC,eAAe;GACtB,SAAS;GACT,UAAU,EAAE,KAAK,SAAS;EAC5B;EACA,SAAS,OAAO,QAAQ;GAGtB,MAAM,MAAM,MAAM,UAAU,cAAc,QAAQ,IAAI,KAAK;GAC3D,IAAI,CAAC,KACH,MAAM,IAAI,kBAAkB,gCAAgC;GAE9D,OAAO;IAAE,IAAI,IAAI;IAAI,MAAM,IAAI;IAAM,MAAM,IAAI;GAAK;EACtD;CACF,CAAC;CAED,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb,MAAM,CAAC,eAAe;GACtB,SAAS;GACT,UAAU,EAAE,KAAK,YAAY;EAC/B;EACA,SAAS,OAAO,QAAQ;GACtB,MAAM,UAAU,MAAM,UAAU,cAAc,WAAW,IAAI,OAAO,IAAI,MAAM;GAC9E,IAAI,CAAC,SACH,MAAM,IAAI,kBAAkB;GAE9B,OAAO;IAAE,WAAW,QAAQ;IAAI,MAAM,QAAQ;GAAK;EACrD;CACF,CAAC;AACH"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Container } from "../../../app/container.js";
|
|
2
|
-
import { FastifyInstance } from "fastify";
|
|
3
|
-
//#region src/http/routes/learn/progress.d.ts
|
|
4
|
-
declare function learnProgressRoutes(app: FastifyInstance, container: Container): Promise<void>;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { learnProgressRoutes };
|
|
7
|
-
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { UnauthorizedError } from "../../plugins/auth.js";
|
|
2
|
-
import { ErrorBody } from "../../schemas/shared.js";
|
|
3
|
-
import { CourseProgress, LearnCourseIdParam, ProgressStatus, ReportProgress } from "../../schemas/learn.js";
|
|
4
|
-
import "../../schemas/index.js";
|
|
5
|
-
import { NotFoundError } from "@headless-lms/core/shared/errors";
|
|
6
|
-
//#region src/http/routes/learn/progress.ts
|
|
7
|
-
async function learnProgressRoutes(app, container) {
|
|
8
|
-
const r = app.withTypeProvider();
|
|
9
|
-
const learn = container.reporting.learn;
|
|
10
|
-
r.route({
|
|
11
|
-
method: "POST",
|
|
12
|
-
url: "/api/learn/progress",
|
|
13
|
-
preHandler: app.requireOrgSession,
|
|
14
|
-
schema: {
|
|
15
|
-
operationId: "reportProgress",
|
|
16
|
-
tags: ["Progress"],
|
|
17
|
-
summary: "Report usage on a target; the progress service decides completion",
|
|
18
|
-
body: ReportProgress,
|
|
19
|
-
response: {
|
|
20
|
-
200: ProgressStatus,
|
|
21
|
-
404: ErrorBody
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
handler: async (req) => {
|
|
25
|
-
const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);
|
|
26
|
-
if (!orgUser) throw new UnauthorizedError();
|
|
27
|
-
const activity = await container.content.getActivity(req.orgId, req.body.activity);
|
|
28
|
-
if (!activity) throw new NotFoundError("Activity", req.body.activity);
|
|
29
|
-
if (!await learn.getCourse(req.orgId, orgUser.id, activity.courseId)) throw new NotFoundError("Activity", req.body.activity);
|
|
30
|
-
return { status: (await container.progress.report(req.orgId, {
|
|
31
|
-
orgUserId: orgUser.id,
|
|
32
|
-
activityId: req.body.activity,
|
|
33
|
-
reports: req.body.reports
|
|
34
|
-
})).completedAt ? "completed" : "in-progress" };
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
r.route({
|
|
38
|
-
method: "GET",
|
|
39
|
-
url: "/api/learn/courses/:courseId/progress",
|
|
40
|
-
preHandler: app.requireOrgSession,
|
|
41
|
-
schema: {
|
|
42
|
-
operationId: "getLearnCourseProgress",
|
|
43
|
-
tags: ["Progress"],
|
|
44
|
-
summary: "The student's progress in one course",
|
|
45
|
-
params: LearnCourseIdParam,
|
|
46
|
-
response: {
|
|
47
|
-
200: CourseProgress,
|
|
48
|
-
404: ErrorBody
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
handler: async (req) => {
|
|
52
|
-
const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);
|
|
53
|
-
if (!orgUser) throw new UnauthorizedError();
|
|
54
|
-
const view = await learn.courseProgress(req.orgId, orgUser.id, req.params.courseId);
|
|
55
|
-
if (!view) throw new NotFoundError("Course", req.params.courseId);
|
|
56
|
-
return view;
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
//#endregion
|
|
61
|
-
export { learnProgressRoutes };
|
|
62
|
-
|
|
63
|
-
//# sourceMappingURL=progress.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"progress.js","names":[],"sources":["../../../../src/http/routes/learn/progress.ts"],"sourcesContent":["import type { FastifyInstance } from 'fastify';\nimport type { ZodTypeProvider } from 'fastify-type-provider-zod';\nimport {\n CourseProgress,\n ErrorBody,\n LearnCourseIdParam,\n ProgressStatus,\n ReportProgress,\n} from '../../schemas/index.js';\nimport { NotFoundError } from '@headless-lms/core/shared/errors';\nimport type { Container } from '../../../app/container.js';\nimport { UnauthorizedError } from '../../plugins/auth.js';\n\nexport async function learnProgressRoutes(\n app: FastifyInstance,\n container: Container,\n): Promise<void> {\n const r = app.withTypeProvider<ZodTypeProvider>();\n const learn = container.reporting.learn;\n\n r.route({\n method: 'POST',\n url: '/api/learn/progress',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'reportProgress',\n tags: ['Progress'],\n summary: 'Report usage on a target; the progress service decides completion',\n body: ReportProgress,\n response: { 200: ProgressStatus, 404: ErrorBody },\n },\n handler: async (req) => {\n const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);\n if (!orgUser) {\n throw new UnauthorizedError();\n }\n // The activity carries its course, then the same enrollment gate as every\n // Learn read.\n const activity = await container.content.getActivity(req.orgId, req.body.activity);\n if (!activity) {\n throw new NotFoundError('Activity', req.body.activity);\n }\n const course = await learn.getCourse(req.orgId, orgUser.id, activity.courseId);\n if (!course) {\n throw new NotFoundError('Activity', req.body.activity);\n }\n const record = await container.progress.report(req.orgId, {\n orgUserId: orgUser.id,\n activityId: req.body.activity,\n reports: req.body.reports,\n });\n return { status: record.completedAt ? ('completed' as const) : ('in-progress' as const) };\n },\n });\n\n r.route({\n method: 'GET',\n url: '/api/learn/courses/:courseId/progress',\n preHandler: app.requireOrgSession,\n schema: {\n operationId: 'getLearnCourseProgress',\n tags: ['Progress'],\n summary: \"The student's progress in one course\",\n params: LearnCourseIdParam,\n response: { 200: CourseProgress, 404: ErrorBody },\n },\n handler: async (req) => {\n const orgUser = await container.organizations.getOrgUser(req.orgId, req.userId);\n if (!orgUser) {\n throw new UnauthorizedError();\n }\n const view = await learn.courseProgress(req.orgId, orgUser.id, req.params.courseId);\n if (!view) {\n throw new NotFoundError('Course', req.params.courseId);\n }\n return view;\n },\n });\n}\n"],"mappings":";;;;;;AAaA,eAAsB,oBACpB,KACA,WACe;CACf,MAAM,IAAI,IAAI,iBAAkC;CAChD,MAAM,QAAQ,UAAU,UAAU;CAElC,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb,MAAM,CAAC,UAAU;GACjB,SAAS;GACT,MAAM;GACN,UAAU;IAAE,KAAK;IAAgB,KAAK;GAAU;EAClD;EACA,SAAS,OAAO,QAAQ;GACtB,MAAM,UAAU,MAAM,UAAU,cAAc,WAAW,IAAI,OAAO,IAAI,MAAM;GAC9E,IAAI,CAAC,SACH,MAAM,IAAI,kBAAkB;GAI9B,MAAM,WAAW,MAAM,UAAU,QAAQ,YAAY,IAAI,OAAO,IAAI,KAAK,QAAQ;GACjF,IAAI,CAAC,UACH,MAAM,IAAI,cAAc,YAAY,IAAI,KAAK,QAAQ;GAGvD,IAAI,CAAC,MADgB,MAAM,UAAU,IAAI,OAAO,QAAQ,IAAI,SAAS,QAAQ,GAE3E,MAAM,IAAI,cAAc,YAAY,IAAI,KAAK,QAAQ;GAOvD,OAAO,EAAE,SAAQ,MALI,UAAU,SAAS,OAAO,IAAI,OAAO;IACxD,WAAW,QAAQ;IACnB,YAAY,IAAI,KAAK;IACrB,SAAS,IAAI,KAAK;GACpB,CAAC,EAAA,CACuB,cAAe,cAAyB,cAAwB;EAC1F;CACF,CAAC;CAED,EAAE,MAAM;EACN,QAAQ;EACR,KAAK;EACL,YAAY,IAAI;EAChB,QAAQ;GACN,aAAa;GACb,MAAM,CAAC,UAAU;GACjB,SAAS;GACT,QAAQ;GACR,UAAU;IAAE,KAAK;IAAgB,KAAK;GAAU;EAClD;EACA,SAAS,OAAO,QAAQ;GACtB,MAAM,UAAU,MAAM,UAAU,cAAc,WAAW,IAAI,OAAO,IAAI,MAAM;GAC9E,IAAI,CAAC,SACH,MAAM,IAAI,kBAAkB;GAE9B,MAAM,OAAO,MAAM,MAAM,eAAe,IAAI,OAAO,QAAQ,IAAI,IAAI,OAAO,QAAQ;GAClF,IAAI,CAAC,MACH,MAAM,IAAI,cAAc,UAAU,IAAI,OAAO,QAAQ;GAEvD,OAAO;EACT;CACF,CAAC;AACH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"learn.js","names":[],"sources":["../../../src/http/schemas/learn.ts"],"sourcesContent":["// Learn 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, DownloadAsset } from './downloads.js';\nimport { OrgRole } from './shared.js';\n\n/** Courses the authenticated student is actively enrolled in (published only). */\nexport const LearnCourses = z.array(Course);\nexport type LearnCourses = z.infer<typeof LearnCourses>;\n\n/** One enrolled course's module→activity tree (published activities only). */\nexport const LearnModules = z.array(Module);\nexport type LearnModules = z.infer<typeof LearnModules>;\n\nexport const LearnCourseIdParam = z.object({ courseId: z.string() });\nexport type LearnCourseIdParam = z.infer<typeof LearnCourseIdParam>;\n\n/** Downloads the authenticated student is actively entitled to (published only). */\nexport const LearnDownloads = z.array(Download);\nexport type LearnDownloads = z.infer<typeof LearnDownloads>;\n\n/** One entitled download plus its ordered assets. */\nexport const LearnDownload = z.object({\n download: Download,\n assets: z.array(DownloadAsset),\n});\nexport type LearnDownload = z.infer<typeof LearnDownload>;\n\n/** The portal org's public identity — the student surface themes against it. */\nexport const LearnOrg = z.object({\n id: z.string(),\n name: z.string(),\n slug: z.string(),\n});\nexport type LearnOrg = z.infer<typeof LearnOrg>;\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 LearnViewer = z.object({\n orgUserId: z.string(),\n role: OrgRole,\n});\nexport type LearnViewer = z.infer<typeof LearnViewer>;\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.object({\n activity: z.string(),\n reports: z.array(ProgressReportItem),\n});\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,eAAe,EAAE,MAAM,MAAM;;AAI1C,MAAa,eAAe,EAAE,MAAM,MAAM;AAG1C,MAAa,qBAAqB,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;;AAInE,MAAa,iBAAiB,EAAE,MAAM,QAAQ;;AAI9C,MAAa,gBAAgB,EAAE,OAAO;CACpC,UAAU;CACV,QAAQ,EAAE,MAAM,aAAa;AAC/B,CAAC;;AAID,MAAa,WAAW,EAAE,OAAO;CAC/B,IAAI,EAAE,OAAO;CACb,MAAM,EAAE,OAAO;CACf,MAAM,EAAE,OAAO;AACjB,CAAC;;;AAKD,MAAa,cAAc,EAAE,OAAO;CAClC,WAAW,EAAE,OAAO;CACpB,MAAM;AACR,CAAC;;;;;AAOD,MAAa,qBAAqB;;;AAKlC,MAAa,iBAAiB,EAAE,OAAO;CACrC,UAAU,EAAE,OAAO;CACnB,SAAS,EAAE,MAAM,kBAAkB;AACrC,CAAC;;AAID,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"}
|
package/dist/package.js
DELETED
package/dist/package.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":[""],"mappings":""}
|