@headless-lms/server 0.1.0 → 0.3.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/README.md +1 -1
- package/dist/_virtual/_rolldown/runtime.js +5 -0
- package/dist/app/community-mail.d.ts +26 -0
- package/dist/app/community-mail.js +96 -0
- package/dist/app/community-mail.js.map +1 -0
- package/dist/app/container.d.ts +22 -14
- package/dist/app/container.js +186 -62
- 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/http/config.d.ts +2 -1
- package/dist/http/errors.d.ts +14 -0
- package/dist/http/errors.js +147 -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 +3 -2
- package/dist/http/plugins/error-handler.js +52 -57
- package/dist/http/plugins/error-handler.js.map +1 -1
- package/dist/http/plugins/openapi.js +70 -20
- 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 +97 -20
- package/dist/http/routes/activities.js.map +1 -1
- package/dist/http/routes/assets.js +60 -51
- package/dist/http/routes/assets.js.map +1 -1
- package/dist/http/routes/automations.js +64 -20
- package/dist/http/routes/automations.js.map +1 -1
- package/dist/http/routes/bundles.d.ts +7 -0
- package/dist/http/routes/bundles.js +181 -0
- package/dist/http/routes/bundles.js.map +1 -0
- package/dist/http/routes/communities.d.ts +7 -0
- package/dist/http/routes/communities.js +462 -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.d.ts +7 -0
- package/dist/http/routes/course-analytics.js +60 -0
- package/dist/http/routes/course-analytics.js.map +1 -0
- package/dist/http/routes/courses.js +38 -23
- package/dist/http/routes/courses.js.map +1 -1
- package/dist/http/routes/dashboard.js +17 -8
- package/dist/http/routes/dashboard.js.map +1 -1
- package/dist/http/routes/discussion.js +35 -27
- package/dist/http/routes/discussion.js.map +1 -1
- package/dist/http/routes/downloads.js +58 -40
- 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 +456 -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 +288 -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/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 +31 -0
- package/dist/http/routes/member/index.js.map +1 -0
- package/dist/http/routes/member/notifications.d.ts +7 -0
- package/dist/http/routes/member/notifications.js +101 -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 +49 -24
- package/dist/http/routes/organizations.js.map +1 -1
- package/dist/http/routes/students.js +43 -37
- package/dist/http/routes/students.js.map +1 -1
- package/dist/http/routes/webhooks.d.ts +7 -0
- package/dist/http/routes/webhooks.js +167 -0
- package/dist/http/routes/webhooks.js.map +1 -0
- package/dist/http/routes.js +14 -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 +36 -1
- package/dist/http/schemas/activities.js +9 -4
- package/dist/http/schemas/activities.js.map +1 -1
- package/dist/http/schemas/assets.d.ts +76 -73
- package/dist/http/schemas/assets.js +23 -13
- package/dist/http/schemas/assets.js.map +1 -1
- package/dist/http/schemas/automations.d.ts +85 -8
- package/dist/http/schemas/automations.js +13 -2
- package/dist/http/schemas/automations.js.map +1 -1
- package/dist/http/schemas/bundles.d.ts +63 -0
- package/dist/http/schemas/bundles.js +23 -0
- package/dist/http/schemas/bundles.js.map +1 -0
- package/dist/http/schemas/chats.d.ts +386 -0
- package/dist/http/schemas/chats.js +58 -0
- package/dist/http/schemas/chats.js.map +1 -0
- package/dist/http/schemas/community.d.ts +537 -0
- package/dist/http/schemas/community.js +129 -0
- package/dist/http/schemas/community.js.map +1 -0
- package/dist/http/schemas/content.d.ts +22 -13
- package/dist/http/schemas/content.js +11 -9
- package/dist/http/schemas/content.js.map +1 -1
- package/dist/http/schemas/course-analytics.d.ts +29 -0
- package/dist/http/schemas/course-analytics.js +21 -0
- package/dist/http/schemas/course-analytics.js.map +1 -0
- package/dist/http/schemas/dashboard.js.map +1 -1
- package/dist/http/schemas/discussion.d.ts +85 -23
- package/dist/http/schemas/discussion.js +12 -11
- package/dist/http/schemas/discussion.js.map +1 -1
- package/dist/http/schemas/downloads.d.ts +13 -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 +14 -6
- package/dist/http/schemas/entitlements.js +8 -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 +19 -10
- package/dist/http/schemas/index.js +19 -10
- package/dist/http/schemas/integrations.d.ts +4 -4
- package/dist/http/schemas/integrations.js.map +1 -1
- package/dist/http/schemas/invites.d.ts +4 -0
- package/dist/http/schemas/invites.js +3 -1
- package/dist/http/schemas/invites.js.map +1 -1
- package/dist/http/schemas/{learn.d.ts → member.d.ts} +42 -19
- 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 +39 -6
- package/dist/http/schemas/members.js +17 -3
- package/dist/http/schemas/members.js.map +1 -1
- package/dist/http/schemas/notifications.d.ts +227 -0
- package/dist/http/schemas/notifications.js +44 -0
- package/dist/http/schemas/notifications.js.map +1 -0
- package/dist/http/schemas/organizations.js.map +1 -1
- package/dist/http/schemas/posts.d.ts +316 -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/settings.js.map +1 -1
- package/dist/http/schemas/shared.d.ts +26 -1
- package/dist/http/schemas/shared.js +22 -3
- package/dist/http/schemas/shared.js.map +1 -1
- package/dist/http/schemas/students.d.ts +32 -10
- package/dist/http/schemas/students.js +19 -6
- package/dist/http/schemas/students.js.map +1 -1
- package/dist/http/scope.d.ts +2 -1
- package/dist/http/scope.js +20 -4
- package/dist/http/scope.js.map +1 -1
- package/dist/http/server.js +10 -3
- 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 -2
- 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 -23
- 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 -75
- 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
|
@@ -20,17 +20,24 @@ declare const Download: z.ZodObject<{
|
|
|
20
20
|
thumbnailAssetId: z.ZodNullable<z.ZodString>;
|
|
21
21
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
22
22
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
23
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
23
24
|
}, z.core.$strict>;
|
|
24
25
|
type Download = z.infer<typeof Download>;
|
|
25
|
-
declare const
|
|
26
|
+
declare const DownloadFile: z.ZodObject<{
|
|
26
27
|
orgId: z.ZodString;
|
|
27
28
|
id: z.ZodString;
|
|
28
29
|
downloadId: z.ZodString;
|
|
29
30
|
assetId: z.ZodString;
|
|
30
31
|
seq: z.ZodNumber;
|
|
31
32
|
displayName: z.ZodNullable<z.ZodString>;
|
|
33
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
34
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
35
|
+
filename: z.ZodString;
|
|
36
|
+
contentType: z.ZodString;
|
|
37
|
+
size: z.ZodNumber;
|
|
38
|
+
url: z.ZodString;
|
|
32
39
|
}, z.core.$strict>;
|
|
33
|
-
type
|
|
40
|
+
type DownloadFile = z.infer<typeof DownloadFile>;
|
|
34
41
|
declare const CreateDownload: z.ZodObject<{
|
|
35
42
|
title: z.ZodString;
|
|
36
43
|
description: z.ZodDefault<z.ZodString>;
|
|
@@ -39,8 +46,8 @@ declare const CreateDownload: z.ZodObject<{
|
|
|
39
46
|
type CreateDownload = z.infer<typeof CreateDownload>;
|
|
40
47
|
declare const UpdateDownload: z.ZodObject<{
|
|
41
48
|
title: z.ZodOptional<z.ZodString>;
|
|
42
|
-
description: z.ZodOptional<z.
|
|
43
|
-
category: z.ZodOptional<z.
|
|
49
|
+
description: z.ZodOptional<z.ZodString>;
|
|
50
|
+
category: z.ZodOptional<z.ZodString>;
|
|
44
51
|
status: z.ZodOptional<z.ZodEnum<{
|
|
45
52
|
draft: "draft";
|
|
46
53
|
published: "published";
|
|
@@ -76,6 +83,7 @@ declare const DownloadsPage: z.ZodObject<{
|
|
|
76
83
|
thumbnailAssetId: z.ZodNullable<z.ZodString>;
|
|
77
84
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
78
85
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
86
|
+
thumbnailUrl: z.ZodNullable<z.ZodString>;
|
|
79
87
|
}, z.core.$strict>>;
|
|
80
88
|
total: z.ZodNumber;
|
|
81
89
|
page: z.ZodNumber;
|
|
@@ -106,5 +114,5 @@ declare const DownloadAssetParams: z.ZodObject<{
|
|
|
106
114
|
}, z.core.$strip>;
|
|
107
115
|
type DownloadAssetParams = z.infer<typeof DownloadAssetParams>;
|
|
108
116
|
//#endregion
|
|
109
|
-
export { AddDownloadAsset, CreateDownload, Download,
|
|
117
|
+
export { AddDownloadAsset, CreateDownload, Download, DownloadAssetParams, DownloadFile, DownloadIdParam, DownloadStatus, DownloadsPage, DownloadsQuery, RenameDownloadAsset, ReorderDownloadAssets, UpdateDownload };
|
|
110
118
|
//# sourceMappingURL=downloads.d.ts.map
|
|
@@ -1,27 +1,30 @@
|
|
|
1
1
|
import { ListQuery, paginated } from "./shared.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { addDownloadAssetInputSchema,
|
|
3
|
+
import { addDownloadAssetInputSchema, downloadFileSchema, downloadStatusSchema, downloadViewSchema, idSchema, reorderDownloadAssetsInputSchema } from "@headless-lms/core/schemas";
|
|
4
4
|
//#region src/http/schemas/downloads.ts
|
|
5
5
|
const DownloadStatus = downloadStatusSchema;
|
|
6
|
-
const Download =
|
|
7
|
-
const
|
|
6
|
+
const Download = downloadViewSchema;
|
|
7
|
+
const DownloadFile = downloadFileSchema;
|
|
8
8
|
const CreateDownload = z.object({
|
|
9
|
-
title: z.string().min(1),
|
|
10
|
-
description: z.string().default(""),
|
|
11
|
-
category: z.string().default("")
|
|
9
|
+
title: z.string().trim().min(1).max(200),
|
|
10
|
+
description: z.string().max(5e3).default(""),
|
|
11
|
+
category: z.string().trim().max(100).default("")
|
|
12
12
|
});
|
|
13
|
-
const UpdateDownload =
|
|
13
|
+
const UpdateDownload = z.object({
|
|
14
|
+
title: z.string().trim().min(1).max(200).optional(),
|
|
15
|
+
description: z.string().max(5e3).optional(),
|
|
16
|
+
category: z.string().trim().max(100).optional(),
|
|
14
17
|
status: DownloadStatus.optional(),
|
|
15
|
-
thumbnailAssetId:
|
|
18
|
+
thumbnailAssetId: idSchema.nullable().optional()
|
|
16
19
|
});
|
|
17
20
|
const DownloadsQuery = ListQuery.extend({
|
|
18
21
|
status: DownloadStatus.optional(),
|
|
19
|
-
category: z.string().optional()
|
|
22
|
+
category: z.string().trim().max(100).optional()
|
|
20
23
|
});
|
|
21
24
|
const DownloadsPage = paginated(Download);
|
|
22
25
|
const AddDownloadAsset = addDownloadAssetInputSchema;
|
|
23
26
|
/** `null` restores the `filename` fallback. */
|
|
24
|
-
const RenameDownloadAsset = z.object({ displayName: z.string().nullable() });
|
|
27
|
+
const RenameDownloadAsset = z.object({ displayName: z.string().trim().min(1).max(255).nullable() });
|
|
25
28
|
const ReorderDownloadAssets = reorderDownloadAssetsInputSchema;
|
|
26
29
|
const DownloadIdParam = z.object({ downloadId: z.string() });
|
|
27
30
|
const DownloadAssetParams = z.object({
|
|
@@ -29,6 +32,6 @@ const DownloadAssetParams = z.object({
|
|
|
29
32
|
assetId: z.string()
|
|
30
33
|
});
|
|
31
34
|
//#endregion
|
|
32
|
-
export { AddDownloadAsset, CreateDownload, Download,
|
|
35
|
+
export { AddDownloadAsset, CreateDownload, Download, DownloadAssetParams, DownloadFile, DownloadIdParam, DownloadStatus, DownloadsPage, DownloadsQuery, RenameDownloadAsset, ReorderDownloadAssets, UpdateDownload };
|
|
33
36
|
|
|
34
37
|
//# sourceMappingURL=downloads.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"downloads.js","names":[],"sources":["../../../src/http/schemas/downloads.ts"],"sourcesContent":["// Downloads resource schemas — a content type whose whole structure is an\n// ordered set of media-library assets. The Fastify routes validate\n// requests/responses against these, the OpenAPI spec is built from them, and\n// the frontend SDK is generated off that spec.\nimport { z } from
|
|
1
|
+
{"version":3,"file":"downloads.js","names":[],"sources":["../../../src/http/schemas/downloads.ts"],"sourcesContent":["// Downloads resource schemas — a content type whose whole structure is an\n// ordered set of media-library assets. The Fastify routes validate\n// requests/responses against these, the OpenAPI spec is built from them, and\n// the frontend SDK is generated off that spec.\nimport { z } from 'zod';\nimport {\n addDownloadAssetInputSchema,\n downloadFileSchema,\n downloadStatusSchema,\n downloadViewSchema,\n reorderDownloadAssetsInputSchema,\n idSchema,\n} from '@headless-lms/core/schemas';\nimport { ListQuery, paginated } from './shared.js';\n\nexport const DownloadStatus = downloadStatusSchema;\nexport type DownloadStatus = z.infer<typeof DownloadStatus>;\n\nexport const Download = downloadViewSchema;\nexport type Download = z.infer<typeof Download>;\n\nexport const DownloadFile = downloadFileSchema;\nexport type DownloadFile = z.infer<typeof DownloadFile>;\n\nexport const CreateDownload = z.object({\n title: z.string().trim().min(1).max(200),\n description: z.string().max(5_000).default(''),\n category: z.string().trim().max(100).default(''),\n});\nexport type CreateDownload = z.infer<typeof CreateDownload>;\n\nexport const UpdateDownload = z.object({\n title: z.string().trim().min(1).max(200).optional(),\n description: z.string().max(5_000).optional(),\n category: z.string().trim().max(100).optional(),\n status: DownloadStatus.optional(),\n thumbnailAssetId: idSchema.nullable().optional(),\n});\nexport type UpdateDownload = z.infer<typeof UpdateDownload>;\n\nexport const DownloadsQuery = ListQuery.extend({\n status: DownloadStatus.optional(),\n category: z.string().trim().max(100).optional(),\n});\nexport type DownloadsQuery = z.infer<typeof DownloadsQuery>;\n\nexport const DownloadsPage = paginated(Download);\nexport type DownloadsPage = z.infer<typeof DownloadsPage>;\n\nexport const AddDownloadAsset = addDownloadAssetInputSchema;\nexport type AddDownloadAsset = z.infer<typeof AddDownloadAsset>;\n\n/** `null` restores the `filename` fallback. */\nexport const RenameDownloadAsset = z.object({\n displayName: z.string().trim().min(1).max(255).nullable(),\n});\nexport type RenameDownloadAsset = z.infer<typeof RenameDownloadAsset>;\n\nexport const ReorderDownloadAssets = reorderDownloadAssetsInputSchema;\nexport type ReorderDownloadAssets = z.infer<typeof ReorderDownloadAssets>;\n\nexport const DownloadIdParam = z.object({ downloadId: z.string() });\nexport type DownloadIdParam = z.infer<typeof DownloadIdParam>;\n\nexport const DownloadAssetParams = z.object({\n downloadId: z.string(),\n assetId: z.string(),\n});\nexport type DownloadAssetParams = z.infer<typeof DownloadAssetParams>;\n"],"mappings":";;;;AAeA,MAAa,iBAAiB;AAG9B,MAAa,WAAW;AAGxB,MAAa,eAAe;AAG5B,MAAa,iBAAiB,EAAE,OAAO;CACrC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;CACvC,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,GAAK,CAAC,CAAC,QAAQ,EAAE;CAC7C,UAAU,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,QAAQ,EAAE;AACjD,CAAC;AAGD,MAAa,iBAAiB,EAAE,OAAO;CACrC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,SAAS;CAClD,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,GAAK,CAAC,CAAC,SAAS;CAC5C,UAAU,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,SAAS;CAC9C,QAAQ,eAAe,SAAS;CAChC,kBAAkB,SAAS,SAAS,CAAC,CAAC,SAAS;AACjD,CAAC;AAGD,MAAa,iBAAiB,UAAU,OAAO;CAC7C,QAAQ,eAAe,SAAS;CAChC,UAAU,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,SAAS;AAChD,CAAC;AAGD,MAAa,gBAAgB,UAAU,QAAQ;AAG/C,MAAa,mBAAmB;;AAIhC,MAAa,sBAAsB,EAAE,OAAO,EAC1C,aAAa,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,SAAS,EAC1D,CAAC;AAGD,MAAa,wBAAwB;AAGrC,MAAa,kBAAkB,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC;AAGlE,MAAa,sBAAsB,EAAE,OAAO;CAC1C,YAAY,EAAE,OAAO;CACrB,SAAS,EAAE,OAAO;AACpB,CAAC"}
|
|
@@ -2,8 +2,8 @@ import { z } from "zod";
|
|
|
2
2
|
//#region src/http/schemas/entitlements.d.ts
|
|
3
3
|
declare const EntitlementStatus: z.ZodEnum<{
|
|
4
4
|
active: "active";
|
|
5
|
-
expired: "expired";
|
|
6
5
|
revoked: "revoked";
|
|
6
|
+
expired: "expired";
|
|
7
7
|
}>;
|
|
8
8
|
type EntitlementStatus = z.infer<typeof EntitlementStatus>;
|
|
9
9
|
declare const ContentType: z.ZodEnum<{
|
|
@@ -26,7 +26,8 @@ declare const Entitlement: z.ZodObject<{
|
|
|
26
26
|
orgId: z.ZodString;
|
|
27
27
|
id: z.ZodString;
|
|
28
28
|
orgUserId: z.ZodString;
|
|
29
|
-
|
|
29
|
+
bundleId: z.ZodNullable<z.ZodString>;
|
|
30
|
+
contentId: z.ZodNullable<z.ZodString>;
|
|
30
31
|
status: z.ZodEnum<{
|
|
31
32
|
active: "active";
|
|
32
33
|
revoked: "revoked";
|
|
@@ -34,6 +35,8 @@ declare const Entitlement: z.ZodObject<{
|
|
|
34
35
|
source: z.ZodString;
|
|
35
36
|
grantedAt: z.ZodCoercedDate<unknown>;
|
|
36
37
|
expiresAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
38
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
39
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
37
40
|
}, z.core.$strict>;
|
|
38
41
|
type Entitlement = z.infer<typeof Entitlement>;
|
|
39
42
|
declare const EntitlementsQuery: z.ZodObject<{
|
|
@@ -43,8 +46,8 @@ declare const EntitlementsQuery: z.ZodObject<{
|
|
|
43
46
|
sort: z.ZodOptional<z.ZodString>;
|
|
44
47
|
status: z.ZodOptional<z.ZodEnum<{
|
|
45
48
|
active: "active";
|
|
46
|
-
expired: "expired";
|
|
47
49
|
revoked: "revoked";
|
|
50
|
+
expired: "expired";
|
|
48
51
|
}>>;
|
|
49
52
|
source: z.ZodOptional<z.ZodString>;
|
|
50
53
|
orgUserId: z.ZodOptional<z.ZodString>;
|
|
@@ -60,7 +63,8 @@ declare const EntitlementsPage: z.ZodObject<{
|
|
|
60
63
|
orgId: z.ZodString;
|
|
61
64
|
id: z.ZodString;
|
|
62
65
|
orgUserId: z.ZodString;
|
|
63
|
-
|
|
66
|
+
bundleId: z.ZodNullable<z.ZodString>;
|
|
67
|
+
contentId: z.ZodNullable<z.ZodString>;
|
|
64
68
|
status: z.ZodEnum<{
|
|
65
69
|
active: "active";
|
|
66
70
|
revoked: "revoked";
|
|
@@ -68,16 +72,20 @@ declare const EntitlementsPage: z.ZodObject<{
|
|
|
68
72
|
source: z.ZodString;
|
|
69
73
|
grantedAt: z.ZodCoercedDate<unknown>;
|
|
70
74
|
expiresAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
75
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
76
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
71
77
|
}, z.core.$strict>>;
|
|
72
78
|
total: z.ZodNumber;
|
|
73
79
|
page: z.ZodNumber;
|
|
74
80
|
pageSize: z.ZodNumber;
|
|
75
81
|
}, z.core.$strip>;
|
|
76
82
|
type EntitlementsPage = z.infer<typeof EntitlementsPage>;
|
|
83
|
+
/** A grant targets exactly one of: a single content item or a bundle. */
|
|
77
84
|
declare const GrantEntitlement: z.ZodObject<{
|
|
78
85
|
orgUserId: z.ZodString;
|
|
79
|
-
contentId: z.ZodString
|
|
80
|
-
|
|
86
|
+
contentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
87
|
+
bundleId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
88
|
+
expiresAt: z.ZodNullable<z.ZodPipe<z.ZodISODateTime, z.ZodCoercedDate<string>>>;
|
|
81
89
|
}, z.core.$strip>;
|
|
82
90
|
type GrantEntitlement = z.infer<typeof GrantEntitlement>;
|
|
83
91
|
/** Revoke/reinstate access by setting the active|revoked status. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ListQuery, paginated } from "./shared.js";
|
|
1
|
+
import { DateTimeInput, ListQuery, paginated } from "./shared.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { entitlementSchema } from "@headless-lms/core/schemas";
|
|
3
|
+
import { entitlementSchema, idSchema } from "@headless-lms/core/schemas";
|
|
4
4
|
//#region src/http/schemas/entitlements.ts
|
|
5
5
|
const EntitlementStatus = z.enum([
|
|
6
6
|
"active",
|
|
@@ -27,11 +27,13 @@ const EntitlementsQuery = ListQuery.extend({
|
|
|
27
27
|
type: ContentType.optional()
|
|
28
28
|
});
|
|
29
29
|
const EntitlementsPage = paginated(Entitlement);
|
|
30
|
+
/** A grant targets exactly one of: a single content item or a bundle. */
|
|
30
31
|
const GrantEntitlement = z.object({
|
|
31
|
-
orgUserId:
|
|
32
|
-
contentId:
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
orgUserId: idSchema,
|
|
33
|
+
contentId: idSchema.nullish(),
|
|
34
|
+
bundleId: idSchema.nullish(),
|
|
35
|
+
expiresAt: DateTimeInput.nullable().describe("When access ends; null never expires")
|
|
36
|
+
}).refine((v) => v.contentId != null !== (v.bundleId != null), { message: "Provide exactly one of contentId or bundleId" });
|
|
35
37
|
/** Revoke/reinstate access by setting the active|revoked status. */
|
|
36
38
|
const SetEntitlementStatus = z.object({ status: z.enum(["active", "revoked"]) });
|
|
37
39
|
const EntitlementIdParam = z.object({ id: z.string() });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entitlements.js","names":[],"sources":["../../../src/http/schemas/entitlements.ts"],"sourcesContent":["// Entitlements resource schemas. An entitlement is a student's access grant to\n// a piece of content — generic over content types (course today) — its\n// validity + source. Distinct from payment and from completion.\nimport { z } from
|
|
1
|
+
{"version":3,"file":"entitlements.js","names":[],"sources":["../../../src/http/schemas/entitlements.ts"],"sourcesContent":["// Entitlements resource schemas. An entitlement is a student's access grant to\n// a piece of content — generic over content types (course today) — its\n// validity + source. Distinct from payment and from completion.\nimport { z } from 'zod';\nimport { entitlementSchema, idSchema } from '@headless-lms/core/schemas';\nimport { DateTimeInput, ListQuery, paginated } from './shared.js';\n\nexport const EntitlementStatus = z.enum(['active', 'expired', 'revoked']);\nexport type EntitlementStatus = z.infer<typeof EntitlementStatus>;\n\nexport const ContentType = z.enum(['course', 'download']);\nexport type ContentType = z.infer<typeof ContentType>;\n\n/** Reference to the granted content: identity + display name (join-derived).\n * The full content object lives on its own resource. */\nexport const ContentRef = z.object({\n id: z.string(),\n type: ContentType,\n title: z.string(),\n});\nexport type ContentRef = z.infer<typeof ContentRef>;\n\nexport const Entitlement = entitlementSchema;\nexport type Entitlement = z.infer<typeof Entitlement>;\n\nexport const EntitlementsQuery = ListQuery.extend({\n status: EntitlementStatus.optional(),\n source: z.string().optional(),\n /** Scope to a single student (used by the student detail view). */\n orgUserId: z.string().optional(),\n /** Scope to a single piece of content. */\n contentId: z.string().optional(),\n /** Scope to one content type. */\n type: ContentType.optional(),\n});\nexport type EntitlementsQuery = z.infer<typeof EntitlementsQuery>;\n\nexport const EntitlementsPage = paginated(Entitlement);\nexport type EntitlementsPage = z.infer<typeof EntitlementsPage>;\n\n/** A grant targets exactly one of: a single content item or a bundle. */\nexport const GrantEntitlement = z\n .object({\n orgUserId: idSchema,\n contentId: idSchema.nullish(),\n bundleId: idSchema.nullish(),\n expiresAt: DateTimeInput.nullable().describe('When access ends; null never expires'),\n })\n .refine((v) => (v.contentId != null) !== (v.bundleId != null), {\n message: 'Provide exactly one of contentId or bundleId',\n });\nexport type GrantEntitlement = z.infer<typeof GrantEntitlement>;\n\n/** Revoke/reinstate access by setting the active|revoked status. */\nexport const SetEntitlementStatus = z.object({\n status: z.enum(['active', 'revoked']),\n});\nexport type SetEntitlementStatus = z.infer<typeof SetEntitlementStatus>;\n\nexport const EntitlementIdParam = z.object({ id: z.string() });\nexport type EntitlementIdParam = z.infer<typeof EntitlementIdParam>;\n"],"mappings":";;;;AAOA,MAAa,oBAAoB,EAAE,KAAK;CAAC;CAAU;CAAW;AAAS,CAAC;AAGxE,MAAa,cAAc,EAAE,KAAK,CAAC,UAAU,UAAU,CAAC;;;AAKxD,MAAa,aAAa,EAAE,OAAO;CACjC,IAAI,EAAE,OAAO;CACb,MAAM;CACN,OAAO,EAAE,OAAO;AAClB,CAAC;AAGD,MAAa,cAAc;AAG3B,MAAa,oBAAoB,UAAU,OAAO;CAChD,QAAQ,kBAAkB,SAAS;CACnC,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS;;CAE5B,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;;CAE/B,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;;CAE/B,MAAM,YAAY,SAAS;AAC7B,CAAC;AAGD,MAAa,mBAAmB,UAAU,WAAW;;AAIrD,MAAa,mBAAmB,EAC7B,OAAO;CACN,WAAW;CACX,WAAW,SAAS,QAAQ;CAC5B,UAAU,SAAS,QAAQ;CAC3B,WAAW,cAAc,SAAS,CAAC,CAAC,SAAS,sCAAsC;AACrF,CAAC,CAAC,CACD,QAAQ,MAAO,EAAE,aAAa,UAAW,EAAE,YAAY,OAAO,EAC7D,SAAS,+CACX,CAAC;;AAIH,MAAa,uBAAuB,EAAE,OAAO,EAC3C,QAAQ,EAAE,KAAK,CAAC,UAAU,SAAS,CAAC,EACtC,CAAC;AAGD,MAAa,qBAAqB,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/http/schemas/files.d.ts
|
|
3
|
+
declare const CourseThumbnailParams: z.ZodObject<{
|
|
4
|
+
courseId: z.ZodString;
|
|
5
|
+
}, z.core.$strip>;
|
|
6
|
+
type CourseThumbnailParams = z.infer<typeof CourseThumbnailParams>;
|
|
7
|
+
declare const DownloadThumbnailParams: z.ZodObject<{
|
|
8
|
+
downloadId: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
type DownloadThumbnailParams = z.infer<typeof DownloadThumbnailParams>;
|
|
11
|
+
declare const CommunityThumbnailParams: z.ZodObject<{
|
|
12
|
+
communityId: z.ZodString;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
type CommunityThumbnailParams = z.infer<typeof CommunityThumbnailParams>;
|
|
15
|
+
declare const ActivityFileParams: z.ZodObject<{
|
|
16
|
+
activityId: z.ZodString;
|
|
17
|
+
assetId: z.ZodString;
|
|
18
|
+
}, z.core.$strip>;
|
|
19
|
+
type ActivityFileParams = z.infer<typeof ActivityFileParams>;
|
|
20
|
+
declare const DownloadFileParams: z.ZodObject<{
|
|
21
|
+
downloadId: z.ZodString;
|
|
22
|
+
assetId: z.ZodString;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
type DownloadFileParams = z.infer<typeof DownloadFileParams>;
|
|
25
|
+
declare const PostCoverParams: z.ZodObject<{
|
|
26
|
+
postId: z.ZodString;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
type PostCoverParams = z.infer<typeof PostCoverParams>;
|
|
29
|
+
declare const MessageAttachmentParams: z.ZodObject<{
|
|
30
|
+
chatId: z.ZodString;
|
|
31
|
+
messageId: z.ZodString;
|
|
32
|
+
assetId: z.ZodString;
|
|
33
|
+
}, z.core.$strip>;
|
|
34
|
+
type MessageAttachmentParams = z.infer<typeof MessageAttachmentParams>;
|
|
35
|
+
declare const PersonImageParams: z.ZodObject<{
|
|
36
|
+
orgUserId: z.ZodString;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
type PersonImageParams = z.infer<typeof PersonImageParams>;
|
|
39
|
+
declare const UploadFileParams: z.ZodObject<{
|
|
40
|
+
id: z.ZodString;
|
|
41
|
+
}, z.core.$strip>;
|
|
42
|
+
type UploadFileParams = z.infer<typeof UploadFileParams>;
|
|
43
|
+
//#endregion
|
|
44
|
+
export { ActivityFileParams, CommunityThumbnailParams, CourseThumbnailParams, DownloadFileParams, DownloadThumbnailParams, MessageAttachmentParams, PersonImageParams, PostCoverParams, UploadFileParams };
|
|
45
|
+
//# sourceMappingURL=files.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/http/schemas/files.ts
|
|
3
|
+
const CourseThumbnailParams = z.object({ courseId: z.string() });
|
|
4
|
+
const DownloadThumbnailParams = z.object({ downloadId: z.string() });
|
|
5
|
+
const CommunityThumbnailParams = z.object({ communityId: z.string() });
|
|
6
|
+
const ActivityFileParams = z.object({
|
|
7
|
+
activityId: z.string(),
|
|
8
|
+
assetId: z.string()
|
|
9
|
+
});
|
|
10
|
+
const DownloadFileParams = z.object({
|
|
11
|
+
downloadId: z.string(),
|
|
12
|
+
assetId: z.string()
|
|
13
|
+
});
|
|
14
|
+
const PostCoverParams = z.object({ postId: z.string() });
|
|
15
|
+
const MessageAttachmentParams = z.object({
|
|
16
|
+
chatId: z.string(),
|
|
17
|
+
messageId: z.string(),
|
|
18
|
+
assetId: z.string()
|
|
19
|
+
});
|
|
20
|
+
const PersonImageParams = z.object({ orgUserId: z.string() });
|
|
21
|
+
const UploadFileParams = z.object({ id: z.string() });
|
|
22
|
+
//#endregion
|
|
23
|
+
export { ActivityFileParams, CommunityThumbnailParams, CourseThumbnailParams, DownloadFileParams, DownloadThumbnailParams, MessageAttachmentParams, PersonImageParams, PostCoverParams, UploadFileParams };
|
|
24
|
+
|
|
25
|
+
//# sourceMappingURL=files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"files.js","names":[],"sources":["../../../src/http/schemas/files.ts"],"sourcesContent":["// File proxy schemas. Every file is fetched from a stable URL that checks access\n// on each request and answers 302 with a signed storage URL.\nimport { z } from 'zod';\n\nexport const CourseThumbnailParams = z.object({ courseId: z.string() });\nexport type CourseThumbnailParams = z.infer<typeof CourseThumbnailParams>;\n\nexport const DownloadThumbnailParams = z.object({ downloadId: z.string() });\nexport type DownloadThumbnailParams = z.infer<typeof DownloadThumbnailParams>;\n\nexport const CommunityThumbnailParams = z.object({ communityId: z.string() });\nexport type CommunityThumbnailParams = z.infer<typeof CommunityThumbnailParams>;\n\nexport const ActivityFileParams = z.object({ activityId: z.string(), assetId: z.string() });\nexport type ActivityFileParams = z.infer<typeof ActivityFileParams>;\n\nexport const DownloadFileParams = z.object({ downloadId: z.string(), assetId: z.string() });\nexport type DownloadFileParams = z.infer<typeof DownloadFileParams>;\n\nexport const PostCoverParams = z.object({ postId: z.string() });\nexport type PostCoverParams = z.infer<typeof PostCoverParams>;\n\nexport const MessageAttachmentParams = z.object({\n chatId: z.string(),\n messageId: z.string(),\n assetId: z.string(),\n});\nexport type MessageAttachmentParams = z.infer<typeof MessageAttachmentParams>;\n\nexport const PersonImageParams = z.object({ orgUserId: z.string() });\nexport type PersonImageParams = z.infer<typeof PersonImageParams>;\n\nexport const UploadFileParams = z.object({ id: z.string() });\nexport type UploadFileParams = z.infer<typeof UploadFileParams>;\n"],"mappings":";;AAIA,MAAa,wBAAwB,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;AAGtE,MAAa,0BAA0B,EAAE,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,CAAC;AAG1E,MAAa,2BAA2B,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC;AAG5E,MAAa,qBAAqB,EAAE,OAAO;CAAE,YAAY,EAAE,OAAO;CAAG,SAAS,EAAE,OAAO;AAAE,CAAC;AAG1F,MAAa,qBAAqB,EAAE,OAAO;CAAE,YAAY,EAAE,OAAO;CAAG,SAAS,EAAE,OAAO;AAAE,CAAC;AAG1F,MAAa,kBAAkB,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AAG9D,MAAa,0BAA0B,EAAE,OAAO;CAC9C,QAAQ,EAAE,OAAO;CACjB,WAAW,EAAE,OAAO;CACpB,SAAS,EAAE,OAAO;AACpB,CAAC;AAGD,MAAa,oBAAoB,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;AAGnE,MAAa,mBAAmB,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC"}
|
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ApiKey, ApiKeyIdParam, ApiKeyList, ClientIdParam, ConnectedApp, ConnectedAppList, CreateApiKey, CreatedApiKey, ScopeOption, ScopeOptionList } from "./access.js";
|
|
2
|
+
import { Activity, ActivityAsset, ActivityAssetList, ActivityList, ActivityPathParam, CourseIdPathParam, CreateModule, Module, ModuleList, ModulePathParam, ReorderInput, SaveActivity, UpdateModule } from "./activities.js";
|
|
3
|
+
import { Asset, AssetIdParam, AssetKind, AssetSource, AssetStatus, AssetsPage, AssetsQuery, RequestMemberUpload, RequestUpload, UploadTicket } from "./assets.js";
|
|
4
|
+
import { Automation, AutomationAction, AutomationActionResult, AutomationIdParam, AutomationKind, AutomationRun, AutomationRunParams, AutomationRunStatus, AutomationRunsPage, AutomationRunsQuery, AutomationTrigger, AutomationsQuery, AvailableAction, AvailableTriggers, CreateAutomationBody, CreateWebhookBody, CreatedWebhook, UpdateAutomationBody, UpdateWebhookBody, Webhook, WebhookSecret } from "./automations.js";
|
|
5
|
+
import { AddBundleItem, Bundle, BundleIdParam, BundleItem, BundleItemParams, BundlesPage, BundlesQuery, CreateBundle, UpdateBundle } from "./bundles.js";
|
|
6
|
+
import { BlockParam, Chat, ChatIdParam, ChatListItem, ChatsPage, CommunityParam, EditMessage, MarkRead, MessageFlag, MessageIdParam, MessageQueue, MessageQueueEntry, MessageView, MessagesPage, MuteChat, OrgUserBody, ResolveMessageFlags, SendMessage, StartDirectChat, StartGroupChat } from "./chats.js";
|
|
7
|
+
import { CommunitiesPage, CommunitiesQuery, Community, CommunityAnalytics, CommunityChatParam, CommunityCommentParam, CommunityHome, CommunityHomeSpace, CommunityIdParam, CommunityMember, CommunityMembersPage, CommunityMembersQuery, CommunityMessageParam, CommunityPostParam, CommunitySpaceParam, CreateCommunity, CreateSpace, DirectoryEntry, DirectoryPage, DirectoryQuery, DmSettings, LockedCommunitySpace, OpenCommunitySpace, OrderedIds, PatchDmSettings, SetSpaceTopics, SpaceDetail, SpaceLinkBody, SpaceLinkParam, SpaceMember, SpaceMemberParam, SpaceMembersPage, UpdateCommunity, UpdateSpace } from "./community.js";
|
|
4
8
|
import { Course, CourseIdParam, CourseSettings, CourseStatus, CoursesPage, CoursesQuery, CreateCourse, PatchCourseSettings, UpdateCourse } from "./content.js";
|
|
9
|
+
import { CourseActivityEngagement, CourseAnalytics } from "./course-analytics.js";
|
|
5
10
|
import { EnrollmentPoint, EnrollmentSeries, EnrollmentSeriesQuery, OverviewStats } from "./dashboard.js";
|
|
6
|
-
import { ActivityComments, Comment, CommentAuthor, CommentIdParam, CommentListItem,
|
|
7
|
-
import { AddDownloadAsset, CreateDownload, Download,
|
|
11
|
+
import { ActivityComments, Comment, CommentAuthor, CommentIdParam, CommentListItem, CommentReport, CommentReportSummary, CommentSettings, CommentStatus, CommentView, CommentsConfig, CommentsPage, CommentsQuery, DiscussionActivityParam, EditComment, PatchComment, PostComment, ReactionCounts, ReactionEmoji, Reactions, ReplyToComment, ReportComment, ResolveCommentFlags, SetReaction } from "./discussion.js";
|
|
12
|
+
import { AddDownloadAsset, CreateDownload, Download, DownloadAssetParams, DownloadFile, DownloadIdParam, DownloadStatus, DownloadsPage, DownloadsQuery, RenameDownloadAsset, ReorderDownloadAssets, UpdateDownload } from "./downloads.js";
|
|
8
13
|
import { ContentRef, ContentType, Entitlement, EntitlementIdParam, EntitlementStatus, EntitlementsPage, EntitlementsQuery, GrantEntitlement, SetEntitlementStatus } from "./entitlements.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
14
|
+
import { ActivityFileParams, CommunityThumbnailParams, CourseThumbnailParams, DownloadFileParams, DownloadThumbnailParams, MessageAttachmentParams, PersonImageParams, PostCoverParams, UploadFileParams } from "./files.js";
|
|
15
|
+
import { DateTimeInput, ErrorBody, ListQuery, Matches, OrgRole, OrgUserProfileSchema, PageQuery, UserProfileSchema, ValidationErrorBody, paginated, refusals } from "./shared.js";
|
|
16
|
+
import { CourseProgress, LearnActivityAssetParams, MemberCourseIdParam, MemberCourses, MemberDownload, MemberDownloads, MemberModules, MemberOrg, MemberViewer, ProgressReportItem, ProgressStatus, ReportProgress } from "./member.js";
|
|
17
|
+
import { OrgUserStatus, Student, StudentAnalytics, StudentCourseProgress, StudentIdParam, StudentsPage, StudentsQuery } from "./students.js";
|
|
12
18
|
import { CreateOrganization, Organization, UpdateOrganization } from "./organizations.js";
|
|
13
|
-
import { Member, MemberIdParam, MemberStatus, MembersPage, MembersQuery, Role, UpdateMemberRole } from "./members.js";
|
|
19
|
+
import { AssignableRole, Member, MemberIdParam, MemberRoleChange, MemberStatus, MembersPage, MembersQuery, Role, UpdateMemberRole } from "./members.js";
|
|
14
20
|
import { AcceptInvite, AcceptInviteResult, ActivateInvite, ActivateInviteResult, CreateInvite, GetInviteResult, Invite, InviteRole, InviteTokenParam, RedeemInvite, RedeemInviteResult } from "./invites.js";
|
|
15
21
|
import { ActionInvocationResult, AvailableIntegration, AvailableIntegrationsList, ConfigureRequest, ConnectRequest, Connection, ConnectionActionParams, ConnectionIdParam, ConnectionsList, IntegrationActionInfo, InvokeActionRequest, ReconnectRequest } from "./integrations.js";
|
|
16
22
|
import { PatchSettings, ScopeSettings, SettingsNamespaceParam, SettingsScopeParam, SettingsValue } from "./settings.js";
|
|
17
|
-
|
|
23
|
+
import { CreatePost, FeedQuery, FlagReason, PostCommentsPage, PostFeedPage, PostFlag, PostIdParam, PostView, ResolvePostFlags, SchedulePost, SetPostReactions, SpaceQueue, UpdatePost } from "./posts.js";
|
|
24
|
+
import { UpdateProfile, UserProfile } from "./profile.js";
|
|
25
|
+
import { MarkedRead, Notification, NotificationIdParam, NotificationPreference, NotificationPreferences, NotificationView, NotificationsPage, SetNotificationPreferences } from "./notifications.js";
|
|
26
|
+
export { AcceptInvite, AcceptInviteResult, ActionInvocationResult, ActivateInvite, ActivateInviteResult, Activity, ActivityAsset, ActivityAssetList, ActivityComments, ActivityFileParams, ActivityList, ActivityPathParam, AddBundleItem, AddDownloadAsset, ApiKey, ApiKeyIdParam, ApiKeyList, Asset, AssetIdParam, AssetKind, AssetSource, AssetStatus, AssetsPage, AssetsQuery, AssignableRole, Automation, AutomationAction, AutomationActionResult, AutomationIdParam, AutomationKind, AutomationRun, AutomationRunParams, AutomationRunStatus, AutomationRunsPage, AutomationRunsQuery, AutomationTrigger, AutomationsQuery, AvailableAction, AvailableIntegration, AvailableIntegrationsList, AvailableTriggers, BlockParam, Bundle, BundleIdParam, BundleItem, BundleItemParams, BundlesPage, BundlesQuery, Chat, ChatIdParam, ChatListItem, ChatsPage, ClientIdParam, Comment, CommentAuthor, CommentIdParam, CommentListItem, CommentReport, CommentReportSummary, CommentSettings, CommentStatus, CommentView, CommentsConfig, CommentsPage, CommentsQuery, CommunitiesPage, CommunitiesQuery, Community, CommunityAnalytics, CommunityChatParam, CommunityCommentParam, CommunityHome, CommunityHomeSpace, CommunityIdParam, CommunityMember, CommunityMembersPage, CommunityMembersQuery, CommunityMessageParam, CommunityParam, CommunityPostParam, CommunitySpaceParam, CommunityThumbnailParams, ConfigureRequest, ConnectRequest, ConnectedApp, ConnectedAppList, Connection, ConnectionActionParams, ConnectionIdParam, ConnectionsList, ContentRef, ContentType, Course, CourseActivityEngagement, CourseAnalytics, CourseIdParam, CourseIdPathParam, CourseProgress, CourseSettings, CourseStatus, CourseThumbnailParams, CoursesPage, CoursesQuery, CreateApiKey, CreateAutomationBody, CreateBundle, CreateCommunity, CreateCourse, CreateDownload, CreateInvite, CreateModule, CreateOrganization, CreatePost, CreateSpace, CreateWebhookBody, CreatedApiKey, CreatedWebhook, DateTimeInput, DirectoryEntry, DirectoryPage, DirectoryQuery, DiscussionActivityParam, DmSettings, Download, DownloadAssetParams, DownloadFile, DownloadFileParams, DownloadIdParam, DownloadStatus, DownloadThumbnailParams, DownloadsPage, DownloadsQuery, EditComment, EditMessage, EnrollmentPoint, EnrollmentSeries, EnrollmentSeriesQuery, Entitlement, EntitlementIdParam, EntitlementStatus, EntitlementsPage, EntitlementsQuery, ErrorBody, FeedQuery, FlagReason, GetInviteResult, GrantEntitlement, IntegrationActionInfo, Invite, InviteRole, InviteTokenParam, InvokeActionRequest, LearnActivityAssetParams, ListQuery, LockedCommunitySpace, MarkRead, MarkedRead, Matches, Member, MemberCourseIdParam, MemberCourses, MemberDownload, MemberDownloads, MemberIdParam, MemberModules, MemberOrg, MemberRoleChange, MemberStatus, MemberViewer, MembersPage, MembersQuery, MessageAttachmentParams, MessageFlag, MessageIdParam, MessageQueue, MessageQueueEntry, MessageView, MessagesPage, Module, ModuleList, ModulePathParam, MuteChat, Notification, NotificationIdParam, NotificationPreference, NotificationPreferences, NotificationView, NotificationsPage, OpenCommunitySpace, OrderedIds, OrgRole, OrgUserBody, OrgUserProfileSchema, OrgUserStatus, Organization, OverviewStats, PageQuery, PatchComment, PatchCourseSettings, PatchDmSettings, PatchSettings, PersonImageParams, PostComment, PostCommentsPage, PostCoverParams, PostFeedPage, PostFlag, PostIdParam, PostView, ProgressReportItem, ProgressStatus, ReactionCounts, ReactionEmoji, Reactions, ReconnectRequest, RedeemInvite, RedeemInviteResult, RenameDownloadAsset, ReorderDownloadAssets, ReorderInput, ReplyToComment, ReportComment, ReportProgress, RequestMemberUpload, RequestUpload, ResolveCommentFlags, ResolveMessageFlags, ResolvePostFlags, Role, SaveActivity, SchedulePost, ScopeOption, ScopeOptionList, ScopeSettings, SendMessage, SetEntitlementStatus, SetNotificationPreferences, SetPostReactions, SetReaction, SetSpaceTopics, SettingsNamespaceParam, SettingsScopeParam, SettingsValue, SpaceDetail, SpaceLinkBody, SpaceLinkParam, SpaceMember, SpaceMemberParam, SpaceMembersPage, SpaceQueue, StartDirectChat, StartGroupChat, Student, StudentAnalytics, StudentCourseProgress, StudentIdParam, StudentsPage, StudentsQuery, UpdateAutomationBody, UpdateBundle, UpdateCommunity, UpdateCourse, UpdateDownload, UpdateMemberRole, UpdateModule, UpdateOrganization, UpdatePost, UpdateProfile, UpdateSpace, UpdateWebhookBody, UploadFileParams, UploadTicket, UserProfile, UserProfileSchema, ValidationErrorBody, Webhook, WebhookSecret, paginated, refusals };
|
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
import { ErrorBody, ListQuery, OrgRole, OrgUserProfileSchema, UserProfileSchema, paginated } from "./shared.js";
|
|
1
|
+
import { DateTimeInput, ErrorBody, ListQuery, OrgRole, OrgUserProfileSchema, PageQuery, UserProfileSchema, ValidationErrorBody, paginated, refusals } from "./shared.js";
|
|
2
2
|
import { Course, CourseIdParam, CourseSettings, CourseStatus, CoursesPage, CoursesQuery, CreateCourse, PatchCourseSettings, UpdateCourse } from "./content.js";
|
|
3
|
-
import { AddDownloadAsset, CreateDownload, Download,
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { AddDownloadAsset, CreateDownload, Download, DownloadAssetParams, DownloadFile, DownloadIdParam, DownloadStatus, DownloadsPage, DownloadsQuery, RenameDownloadAsset, ReorderDownloadAssets, UpdateDownload } from "./downloads.js";
|
|
4
|
+
import { AddBundleItem, Bundle, BundleIdParam, BundleItem, BundleItemParams, BundlesPage, BundlesQuery, CreateBundle, UpdateBundle } from "./bundles.js";
|
|
5
|
+
import { Activity, ActivityAsset, ActivityAssetList, ActivityList, ActivityPathParam, CourseIdPathParam, CreateModule, Module, ModuleList, ModulePathParam, ReorderInput, SaveActivity, UpdateModule } from "./activities.js";
|
|
6
|
+
import { CourseProgress, LearnActivityAssetParams, MemberCourseIdParam, MemberCourses, MemberDownload, MemberDownloads, MemberModules, MemberOrg, MemberViewer, ProgressReportItem, ProgressStatus, ReportProgress } from "./member.js";
|
|
7
|
+
import { OrgUserStatus, Student, StudentAnalytics, StudentCourseProgress, StudentIdParam, StudentsPage, StudentsQuery } from "./students.js";
|
|
7
8
|
import { ContentRef, ContentType, Entitlement, EntitlementIdParam, EntitlementStatus, EntitlementsPage, EntitlementsQuery, GrantEntitlement, SetEntitlementStatus } from "./entitlements.js";
|
|
8
|
-
import { Automation, AutomationAction, AutomationActionResult, AutomationIdParam, AutomationRun, AutomationRunStatus, AutomationRunsPage, AutomationRunsQuery, AutomationTrigger, AvailableAction, AvailableTriggers, CreateAutomationBody, UpdateAutomationBody } from "./automations.js";
|
|
9
|
+
import { Automation, AutomationAction, AutomationActionResult, AutomationIdParam, AutomationKind, AutomationRun, AutomationRunParams, AutomationRunStatus, AutomationRunsPage, AutomationRunsQuery, AutomationTrigger, AutomationsQuery, AvailableAction, AvailableTriggers, CreateAutomationBody, CreateWebhookBody, CreatedWebhook, UpdateAutomationBody, UpdateWebhookBody, Webhook, WebhookSecret } from "./automations.js";
|
|
9
10
|
import { CreateOrganization, Organization, UpdateOrganization } from "./organizations.js";
|
|
10
|
-
import { Member, MemberIdParam, MemberStatus, MembersPage, MembersQuery, Role, UpdateMemberRole } from "./members.js";
|
|
11
|
+
import { AssignableRole, Member, MemberIdParam, MemberRoleChange, MemberStatus, MembersPage, MembersQuery, Role, UpdateMemberRole } from "./members.js";
|
|
11
12
|
import { AcceptInvite, AcceptInviteResult, ActivateInvite, ActivateInviteResult, CreateInvite, GetInviteResult, Invite, InviteRole, InviteTokenParam, RedeemInvite, RedeemInviteResult } from "./invites.js";
|
|
12
13
|
import { EnrollmentPoint, EnrollmentSeries, EnrollmentSeriesQuery, OverviewStats } from "./dashboard.js";
|
|
13
|
-
import {
|
|
14
|
+
import { CourseActivityEngagement, CourseAnalytics } from "./course-analytics.js";
|
|
15
|
+
import { Asset, AssetIdParam, AssetKind, AssetSource, AssetStatus, AssetsPage, AssetsQuery, RequestMemberUpload, RequestUpload, UploadTicket } from "./assets.js";
|
|
16
|
+
import { ActivityFileParams, CommunityThumbnailParams, CourseThumbnailParams, DownloadFileParams, DownloadThumbnailParams, MessageAttachmentParams, PersonImageParams, PostCoverParams, UploadFileParams } from "./files.js";
|
|
14
17
|
import { ActionInvocationResult, AvailableIntegration, AvailableIntegrationsList, ConfigureRequest, ConnectRequest, Connection, ConnectionActionParams, ConnectionIdParam, ConnectionsList, IntegrationActionInfo, InvokeActionRequest, ReconnectRequest } from "./integrations.js";
|
|
15
18
|
import { PatchSettings, ScopeSettings, SettingsNamespaceParam, SettingsScopeParam, SettingsValue } from "./settings.js";
|
|
16
|
-
import { ActivityComments, Comment, CommentAuthor, CommentIdParam, CommentListItem,
|
|
17
|
-
|
|
19
|
+
import { ActivityComments, Comment, CommentAuthor, CommentIdParam, CommentListItem, CommentReport, CommentReportSummary, CommentSettings, CommentStatus, CommentView, CommentsConfig, CommentsPage, CommentsQuery, DiscussionActivityParam, EditComment, PatchComment, PostComment, ReactionCounts, ReactionEmoji, Reactions, ReplyToComment, ReportComment, ResolveCommentFlags, SetReaction } from "./discussion.js";
|
|
20
|
+
import { ApiKey, ApiKeyIdParam, ApiKeyList, ClientIdParam, ConnectedApp, ConnectedAppList, CreateApiKey, CreatedApiKey, ScopeOption, ScopeOptionList } from "./access.js";
|
|
21
|
+
import { CommunitiesPage, CommunitiesQuery, Community, CommunityAnalytics, CommunityChatParam, CommunityCommentParam, CommunityHome, CommunityHomeSpace, CommunityIdParam, CommunityMember, CommunityMembersPage, CommunityMembersQuery, CommunityMessageParam, CommunityPostParam, CommunitySpaceParam, CreateCommunity, CreateSpace, DirectoryEntry, DirectoryPage, DirectoryQuery, DmSettings, LockedCommunitySpace, OpenCommunitySpace, OrderedIds, PatchDmSettings, SetSpaceTopics, SpaceDetail, SpaceLinkBody, SpaceLinkParam, SpaceMember, SpaceMemberParam, SpaceMembersPage, UpdateCommunity, UpdateSpace } from "./community.js";
|
|
22
|
+
import { CreatePost, FeedQuery, FlagReason, PostCommentsPage, PostFeedPage, PostFlag, PostIdParam, PostView, ResolvePostFlags, SchedulePost, SetPostReactions, SpaceQueue, UpdatePost } from "./posts.js";
|
|
23
|
+
import { BlockParam, Chat, ChatIdParam, ChatListItem, ChatsPage, CommunityParam, EditMessage, MarkRead, MessageFlag, MessageIdParam, MessageQueue, MessageQueueEntry, MessageView, MessagesPage, MuteChat, OrgUserBody, ResolveMessageFlags, SendMessage, StartDirectChat, StartGroupChat } from "./chats.js";
|
|
24
|
+
import { UpdateProfile, UserProfile } from "./profile.js";
|
|
25
|
+
import { MarkedRead, Notification, NotificationIdParam, NotificationPreference, NotificationPreferences, NotificationView, NotificationsPage, SetNotificationPreferences } from "./notifications.js";
|
|
26
|
+
export { AcceptInvite, AcceptInviteResult, ActionInvocationResult, ActivateInvite, ActivateInviteResult, Activity, ActivityAsset, ActivityAssetList, ActivityComments, ActivityFileParams, ActivityList, ActivityPathParam, AddBundleItem, AddDownloadAsset, ApiKey, ApiKeyIdParam, ApiKeyList, Asset, AssetIdParam, AssetKind, AssetSource, AssetStatus, AssetsPage, AssetsQuery, AssignableRole, Automation, AutomationAction, AutomationActionResult, AutomationIdParam, AutomationKind, AutomationRun, AutomationRunParams, AutomationRunStatus, AutomationRunsPage, AutomationRunsQuery, AutomationTrigger, AutomationsQuery, AvailableAction, AvailableIntegration, AvailableIntegrationsList, AvailableTriggers, BlockParam, Bundle, BundleIdParam, BundleItem, BundleItemParams, BundlesPage, BundlesQuery, Chat, ChatIdParam, ChatListItem, ChatsPage, ClientIdParam, Comment, CommentAuthor, CommentIdParam, CommentListItem, CommentReport, CommentReportSummary, CommentSettings, CommentStatus, CommentView, CommentsConfig, CommentsPage, CommentsQuery, CommunitiesPage, CommunitiesQuery, Community, CommunityAnalytics, CommunityChatParam, CommunityCommentParam, CommunityHome, CommunityHomeSpace, CommunityIdParam, CommunityMember, CommunityMembersPage, CommunityMembersQuery, CommunityMessageParam, CommunityParam, CommunityPostParam, CommunitySpaceParam, CommunityThumbnailParams, ConfigureRequest, ConnectRequest, ConnectedApp, ConnectedAppList, Connection, ConnectionActionParams, ConnectionIdParam, ConnectionsList, ContentRef, ContentType, Course, CourseActivityEngagement, CourseAnalytics, CourseIdParam, CourseIdPathParam, CourseProgress, CourseSettings, CourseStatus, CourseThumbnailParams, CoursesPage, CoursesQuery, CreateApiKey, CreateAutomationBody, CreateBundle, CreateCommunity, CreateCourse, CreateDownload, CreateInvite, CreateModule, CreateOrganization, CreatePost, CreateSpace, CreateWebhookBody, CreatedApiKey, CreatedWebhook, DateTimeInput, DirectoryEntry, DirectoryPage, DirectoryQuery, DiscussionActivityParam, DmSettings, Download, DownloadAssetParams, DownloadFile, DownloadFileParams, DownloadIdParam, DownloadStatus, DownloadThumbnailParams, DownloadsPage, DownloadsQuery, EditComment, EditMessage, EnrollmentPoint, EnrollmentSeries, EnrollmentSeriesQuery, Entitlement, EntitlementIdParam, EntitlementStatus, EntitlementsPage, EntitlementsQuery, ErrorBody, FeedQuery, FlagReason, GetInviteResult, GrantEntitlement, IntegrationActionInfo, Invite, InviteRole, InviteTokenParam, InvokeActionRequest, LearnActivityAssetParams, ListQuery, LockedCommunitySpace, MarkRead, MarkedRead, Member, MemberCourseIdParam, MemberCourses, MemberDownload, MemberDownloads, MemberIdParam, MemberModules, MemberOrg, MemberRoleChange, MemberStatus, MemberViewer, MembersPage, MembersQuery, MessageAttachmentParams, MessageFlag, MessageIdParam, MessageQueue, MessageQueueEntry, MessageView, MessagesPage, Module, ModuleList, ModulePathParam, MuteChat, Notification, NotificationIdParam, NotificationPreference, NotificationPreferences, NotificationView, NotificationsPage, OpenCommunitySpace, OrderedIds, OrgRole, OrgUserBody, OrgUserProfileSchema, OrgUserStatus, Organization, OverviewStats, PageQuery, PatchComment, PatchCourseSettings, PatchDmSettings, PatchSettings, PersonImageParams, PostComment, PostCommentsPage, PostCoverParams, PostFeedPage, PostFlag, PostIdParam, PostView, ProgressReportItem, ProgressStatus, ReactionCounts, ReactionEmoji, Reactions, ReconnectRequest, RedeemInvite, RedeemInviteResult, RenameDownloadAsset, ReorderDownloadAssets, ReorderInput, ReplyToComment, ReportComment, ReportProgress, RequestMemberUpload, RequestUpload, ResolveCommentFlags, ResolveMessageFlags, ResolvePostFlags, Role, SaveActivity, SchedulePost, ScopeOption, ScopeOptionList, ScopeSettings, SendMessage, SetEntitlementStatus, SetNotificationPreferences, SetPostReactions, SetReaction, SetSpaceTopics, SettingsNamespaceParam, SettingsScopeParam, SettingsValue, SpaceDetail, SpaceLinkBody, SpaceLinkParam, SpaceMember, SpaceMemberParam, SpaceMembersPage, SpaceQueue, StartDirectChat, StartGroupChat, Student, StudentAnalytics, StudentCourseProgress, StudentIdParam, StudentsPage, StudentsQuery, UpdateAutomationBody, UpdateBundle, UpdateCommunity, UpdateCourse, UpdateDownload, UpdateMemberRole, UpdateModule, UpdateOrganization, UpdatePost, UpdateProfile, UpdateSpace, UpdateWebhookBody, UploadFileParams, UploadTicket, UserProfile, UserProfileSchema, ValidationErrorBody, Webhook, WebhookSecret, paginated, refusals };
|
|
@@ -35,21 +35,21 @@ declare const AvailableIntegrationsList: z.ZodArray<z.ZodObject<{
|
|
|
35
35
|
type AvailableIntegrationsList = z.infer<typeof AvailableIntegrationsList>;
|
|
36
36
|
/** The connection row minus credentialRef — not even the reference leaks. */
|
|
37
37
|
declare const Connection: z.ZodObject<{
|
|
38
|
-
active: z.ZodBoolean;
|
|
39
|
-
id: z.ZodString;
|
|
40
38
|
orgId: z.ZodString;
|
|
39
|
+
id: z.ZodString;
|
|
41
40
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
42
41
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
42
|
+
active: z.ZodBoolean;
|
|
43
43
|
config: z.ZodRecord<z.ZodString, z.ZodType<import("@headless-lms/core/types").JsonValue, unknown, z.core.$ZodTypeInternals<import("@headless-lms/core/types").JsonValue, unknown>>>;
|
|
44
44
|
integrationId: z.ZodString;
|
|
45
45
|
}, z.core.$strict>;
|
|
46
46
|
type Connection = z.infer<typeof Connection>;
|
|
47
47
|
declare const ConnectionsList: z.ZodArray<z.ZodObject<{
|
|
48
|
-
active: z.ZodBoolean;
|
|
49
|
-
id: z.ZodString;
|
|
50
48
|
orgId: z.ZodString;
|
|
49
|
+
id: z.ZodString;
|
|
51
50
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
52
51
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
52
|
+
active: z.ZodBoolean;
|
|
53
53
|
config: z.ZodRecord<z.ZodString, z.ZodType<import("@headless-lms/core/types").JsonValue, unknown, z.core.$ZodTypeInternals<import("@headless-lms/core/types").JsonValue, unknown>>>;
|
|
54
54
|
integrationId: z.ZodString;
|
|
55
55
|
}, z.core.$strict>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.js","names":[],"sources":["../../../src/http/schemas/integrations.ts"],"sourcesContent":["// Integrations resource schemas. A Connection is an org's link to one external\n// service (Stripe, Slack, …). Secrets are WRITE-ONLY: accepted on\n// connect/reconnect, stored encrypted server-side, and never appear in any\n// response — responses carry configuration and state only.\nimport { z } from
|
|
1
|
+
{"version":3,"file":"integrations.js","names":[],"sources":["../../../src/http/schemas/integrations.ts"],"sourcesContent":["// Integrations resource schemas. A Connection is an org's link to one external\n// service (Stripe, Slack, …). Secrets are WRITE-ONLY: accepted on\n// connect/reconnect, stored encrypted server-side, and never appear in any\n// response — responses carry configuration and state only.\nimport { z } from 'zod';\nimport { connectionSchema, jsonRecordSchema } from '@headless-lms/core/schemas';\n\n/** An action an integration can be invoked with; schemas are JSON Schema. */\nexport const IntegrationActionInfo = z.object({\n id: z.string(),\n description: z.string(),\n inputSchema: z.record(z.string(), z.unknown()),\n outputSchema: z.record(z.string(), z.unknown()),\n});\nexport type IntegrationActionInfo = z.infer<typeof IntegrationActionInfo>;\n\n/** An integration this deployment supports; configSchema is JSON Schema for its config. */\nexport const AvailableIntegration = z.object({\n id: z.string(),\n configSchema: z.record(z.string(), z.unknown()),\n /** JSON Schema of the secrets the integration needs (form rendering only). */\n secretsSchema: z.record(z.string(), z.unknown()),\n actions: z.array(IntegrationActionInfo),\n});\nexport type AvailableIntegration = z.infer<typeof AvailableIntegration>;\n\nexport const AvailableIntegrationsList = z.array(AvailableIntegration);\nexport type AvailableIntegrationsList = z.infer<typeof AvailableIntegrationsList>;\n\n/** The connection row minus credentialRef — not even the reference leaks. */\nexport const Connection = connectionSchema.omit({ credentialRef: true });\nexport type Connection = z.infer<typeof Connection>;\n\nexport const ConnectionsList = z.array(Connection);\nexport type ConnectionsList = z.infer<typeof ConnectionsList>;\n\nexport const ConnectionIdParam = z.object({ id: z.string() });\nexport type ConnectionIdParam = z.infer<typeof ConnectionIdParam>;\n\nexport const ConnectRequest = z.object({\n integrationId: z.string().min(1),\n /** The connection's secrets (API keys, tokens, …). Write-only, never returned;\n * stored as one encrypted JSON document. */\n secrets: jsonRecordSchema,\n config: jsonRecordSchema.optional(),\n});\nexport type ConnectRequest = z.infer<typeof ConnectRequest>;\n\nexport const ReconnectRequest = z.object({\n secrets: jsonRecordSchema,\n});\nexport type ReconnectRequest = z.infer<typeof ReconnectRequest>;\n\nexport const ConfigureRequest = z.object({\n config: jsonRecordSchema.optional(),\n active: z.boolean().optional(),\n});\nexport type ConfigureRequest = z.infer<typeof ConfigureRequest>;\n\nexport const ConnectionActionParams = z.object({ id: z.string(), actionId: z.string() });\nexport type ConnectionActionParams = z.infer<typeof ConnectionActionParams>;\n\n/** The action's input, per its declared inputSchema. */\nexport const InvokeActionRequest = z.object({\n input: z.record(z.string(), z.unknown()).optional(),\n});\nexport type InvokeActionRequest = z.infer<typeof InvokeActionRequest>;\n\n/** Whatever the action resolved with, per its declared outputSchema. */\nexport const ActionInvocationResult = z.object({\n output: z.record(z.string(), z.unknown()),\n});\nexport type ActionInvocationResult = z.infer<typeof ActionInvocationResult>;\n"],"mappings":";;;;AAQA,MAAa,wBAAwB,EAAE,OAAO;CAC5C,IAAI,EAAE,OAAO;CACb,aAAa,EAAE,OAAO;CACtB,aAAa,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC;CAC7C,cAAc,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC;AAChD,CAAC;;AAID,MAAa,uBAAuB,EAAE,OAAO;CAC3C,IAAI,EAAE,OAAO;CACb,cAAc,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC;;CAE9C,eAAe,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC;CAC/C,SAAS,EAAE,MAAM,qBAAqB;AACxC,CAAC;AAGD,MAAa,4BAA4B,EAAE,MAAM,oBAAoB;;AAIrE,MAAa,aAAa,iBAAiB,KAAK,EAAE,eAAe,KAAK,CAAC;AAGvE,MAAa,kBAAkB,EAAE,MAAM,UAAU;AAGjD,MAAa,oBAAoB,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAG5D,MAAa,iBAAiB,EAAE,OAAO;CACrC,eAAe,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;;;CAG/B,SAAS;CACT,QAAQ,iBAAiB,SAAS;AACpC,CAAC;AAGD,MAAa,mBAAmB,EAAE,OAAO,EACvC,SAAS,iBACX,CAAC;AAGD,MAAa,mBAAmB,EAAE,OAAO;CACvC,QAAQ,iBAAiB,SAAS;CAClC,QAAQ,EAAE,QAAQ,CAAC,CAAC,SAAS;AAC/B,CAAC;AAGD,MAAa,yBAAyB,EAAE,OAAO;CAAE,IAAI,EAAE,OAAO;CAAG,UAAU,EAAE,OAAO;AAAE,CAAC;;AAIvF,MAAa,sBAAsB,EAAE,OAAO,EAC1C,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,EACpD,CAAC;;AAID,MAAa,yBAAyB,EAAE,OAAO,EAC7C,QAAQ,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,EAC1C,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { z } from "zod";
|
|
|
4
4
|
declare const InviteRole: z.ZodEnum<{
|
|
5
5
|
admin: "admin";
|
|
6
6
|
instructor: "instructor";
|
|
7
|
+
moderator: "moderator";
|
|
7
8
|
student: "student";
|
|
8
9
|
}>;
|
|
9
10
|
type InviteRole = z.infer<typeof InviteRole>;
|
|
@@ -13,6 +14,7 @@ declare const Invite: z.ZodObject<{
|
|
|
13
14
|
role: z.ZodEnum<{
|
|
14
15
|
admin: "admin";
|
|
15
16
|
instructor: "instructor";
|
|
17
|
+
moderator: "moderator";
|
|
16
18
|
student: "student";
|
|
17
19
|
}>;
|
|
18
20
|
status: z.ZodString;
|
|
@@ -29,6 +31,7 @@ declare const CreateInvite: z.ZodObject<{
|
|
|
29
31
|
role: z.ZodEnum<{
|
|
30
32
|
admin: "admin";
|
|
31
33
|
instructor: "instructor";
|
|
34
|
+
moderator: "moderator";
|
|
32
35
|
student: "student";
|
|
33
36
|
}>;
|
|
34
37
|
firstName: z.ZodOptional<z.ZodString>;
|
|
@@ -52,6 +55,7 @@ declare const ActivateInviteResult: z.ZodObject<{
|
|
|
52
55
|
role: z.ZodEnum<{
|
|
53
56
|
admin: "admin";
|
|
54
57
|
instructor: "instructor";
|
|
58
|
+
moderator: "moderator";
|
|
55
59
|
student: "student";
|
|
56
60
|
}>;
|
|
57
61
|
accountExists: z.ZodBoolean;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { emailSchema } from "@headless-lms/core/schemas";
|
|
2
3
|
//#region src/http/schemas/invites.ts
|
|
3
4
|
/** Roles an invitation can carry. Never owner. */
|
|
4
5
|
const InviteRole = z.enum([
|
|
5
6
|
"admin",
|
|
6
7
|
"instructor",
|
|
8
|
+
"moderator",
|
|
7
9
|
"student"
|
|
8
10
|
]);
|
|
9
11
|
const Invite = z.object({
|
|
@@ -19,7 +21,7 @@ const Invite = z.object({
|
|
|
19
21
|
* only delivery is skipped. Both are ignored for staff roles, whose org user
|
|
20
22
|
* is mirrored from the auth provider when they join. */
|
|
21
23
|
const CreateInvite = z.object({
|
|
22
|
-
email:
|
|
24
|
+
email: emailSchema,
|
|
23
25
|
role: InviteRole,
|
|
24
26
|
firstName: z.string().trim().min(1).optional(),
|
|
25
27
|
lastName: z.string().trim().min(1).optional(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invites.js","names":[],"sources":["../../../src/http/schemas/invites.ts"],"sourcesContent":["// Invites resource schemas — domain-owned invites (staff + student).\nimport { z } from
|
|
1
|
+
{"version":3,"file":"invites.js","names":[],"sources":["../../../src/http/schemas/invites.ts"],"sourcesContent":["// Invites resource schemas — domain-owned invites (staff + student).\nimport { z } from 'zod';\nimport { emailSchema } from '@headless-lms/core/schemas';\n\n/** Roles an invitation can carry. Never owner. */\nexport const InviteRole = z.enum(['admin', 'instructor', 'moderator', 'student']);\nexport type InviteRole = z.infer<typeof InviteRole>;\n\nexport const Invite = z.object({\n id: z.string(),\n email: z.string(),\n role: InviteRole,\n status: z.string(),\n expiresAt: z.date().nullable(),\n createdAt: z.date(),\n});\nexport type Invite = z.infer<typeof Invite>;\n\n/** A student is created by this call, not by the acceptance that follows it, so\n * the admin names them here. `sendEmail: false` still creates everything —\n * only delivery is skipped. Both are ignored for staff roles, whose org user\n * is mirrored from the auth provider when they join. */\nexport const CreateInvite = z.object({\n email: emailSchema,\n role: InviteRole,\n firstName: z.string().trim().min(1).optional(),\n lastName: z.string().trim().min(1).optional(),\n sendEmail: z.boolean().default(true),\n});\nexport type CreateInvite = z.infer<typeof CreateInvite>;\n\nexport const ActivateInvite = z.object({ token: z.string().min(1) });\nexport type ActivateInvite = z.infer<typeof ActivateInvite>;\n\n/** accepted → consumed for the current session; auth-required → sign up/in first.\n * accountExists says which of the two: the invitee's email already has an\n * account (sign in to link it) or it does not (create one). */\nexport const ActivateInviteResult = z.object({\n status: z.enum(['accepted', 'auth-required']),\n email: z.string(),\n role: InviteRole,\n accountExists: z.boolean(),\n});\nexport type ActivateInviteResult = z.infer<typeof ActivateInviteResult>;\n\nexport const InviteTokenParam = z.object({ token: z.string().min(1) });\nexport type InviteTokenParam = z.infer<typeof InviteTokenParam>;\n\n/** Everything the invite landing page needs to render: who the invitation is\n * for, and the names the admin entered, which prefill sign-up. Whether the\n * address already has a login is not reported — the sign-up form discovers\n * that from a duplicate-signup rejection and switches to sign-in. */\nexport const GetInviteResult = z.object({\n email: z.string(),\n firstName: z.string().nullable(),\n lastName: z.string().nullable(),\n});\nexport type GetInviteResult = z.infer<typeof GetInviteResult>;\n\n/** Redeem: mints the session and accepts the invite in one request. `name` is\n * required only when no account exists yet (the sign-up branch). The email is\n * never sent — it is read from the invitation row, so it cannot be steered. */\nexport const RedeemInvite = z.object({\n token: z.string().min(1),\n password: z.string().min(1),\n name: z.string().min(1).optional(),\n});\nexport type RedeemInvite = z.infer<typeof RedeemInvite>;\n\nexport const RedeemInviteResult = z.object({ status: z.literal('accepted') });\nexport type RedeemInviteResult = z.infer<typeof RedeemInviteResult>;\n\nexport const AcceptInvite = z.object({ token: z.string().min(1) });\nexport type AcceptInvite = z.infer<typeof AcceptInvite>;\n\nexport const AcceptInviteResult = z.object({});\nexport type AcceptInviteResult = z.infer<typeof AcceptInviteResult>;\n"],"mappings":";;;;AAKA,MAAa,aAAa,EAAE,KAAK;CAAC;CAAS;CAAc;CAAa;AAAS,CAAC;AAGhF,MAAa,SAAS,EAAE,OAAO;CAC7B,IAAI,EAAE,OAAO;CACb,OAAO,EAAE,OAAO;CAChB,MAAM;CACN,QAAQ,EAAE,OAAO;CACjB,WAAW,EAAE,KAAK,CAAC,CAAC,SAAS;CAC7B,WAAW,EAAE,KAAK;AACpB,CAAC;;;;;AAOD,MAAa,eAAe,EAAE,OAAO;CACnC,OAAO;CACP,MAAM;CACN,WAAW,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;CAC7C,UAAU,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;CAC5C,WAAW,EAAE,QAAQ,CAAC,CAAC,QAAQ,IAAI;AACrC,CAAC;AAGD,MAAa,iBAAiB,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;;;;AAMnE,MAAa,uBAAuB,EAAE,OAAO;CAC3C,QAAQ,EAAE,KAAK,CAAC,YAAY,eAAe,CAAC;CAC5C,OAAO,EAAE,OAAO;CAChB,MAAM;CACN,eAAe,EAAE,QAAQ;AAC3B,CAAC;AAGD,MAAa,mBAAmB,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;;;;;AAOrE,MAAa,kBAAkB,EAAE,OAAO;CACtC,OAAO,EAAE,OAAO;CAChB,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS;CAC/B,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS;AAChC,CAAC;;;;AAMD,MAAa,eAAe,EAAE,OAAO;CACnC,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CACvB,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CAC1B,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;AACnC,CAAC;AAGD,MAAa,qBAAqB,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,UAAU,EAAE,CAAC;AAG5E,MAAa,eAAe,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC;AAGjE,MAAa,qBAAqB,EAAE,OAAO,CAAC,CAAC"}
|