@headless-lms/server 0.2.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/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 +18 -14
- package/dist/app/container.js +136 -43
- 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 +2 -1
- package/dist/http/plugins/error-handler.js +49 -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 +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.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 +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 +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 +73 -74
- package/dist/http/schemas/assets.js +23 -13
- package/dist/http/schemas/assets.js.map +1 -1
- package/dist/http/schemas/automations.d.ts +10 -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 +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 +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 +76 -14
- package/dist/http/schemas/discussion.js +12 -11
- 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 +2 -2
- 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 +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/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/shared.d.ts +25 -1
- package/dist/http/schemas/shared.js +19 -2
- package/dist/http/schemas/shared.js.map +1 -1
- package/dist/http/schemas/students.d.ts +4 -10
- package/dist/http/schemas/students.js +1 -7
- 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 +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 +2 -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,11 +1,17 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
//#region src/http/schemas/assets.d.ts
|
|
3
3
|
declare const AssetKind: z.ZodEnum<{
|
|
4
|
+
image: "image";
|
|
4
5
|
video: "video";
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
audio: "audio";
|
|
7
|
+
document: "document";
|
|
7
8
|
}>;
|
|
8
9
|
type AssetKind = z.infer<typeof AssetKind>;
|
|
10
|
+
declare const AssetSource: z.ZodEnum<{
|
|
11
|
+
library: "library";
|
|
12
|
+
member: "member";
|
|
13
|
+
}>;
|
|
14
|
+
type AssetSource = z.infer<typeof AssetSource>;
|
|
9
15
|
declare const AssetStatus: z.ZodEnum<{
|
|
10
16
|
pending: "pending";
|
|
11
17
|
ready: "ready";
|
|
@@ -14,23 +20,29 @@ type AssetStatus = z.infer<typeof AssetStatus>;
|
|
|
14
20
|
declare const Asset: z.ZodObject<{
|
|
15
21
|
orgId: z.ZodString;
|
|
16
22
|
id: z.ZodString;
|
|
17
|
-
key: z.ZodString;
|
|
18
|
-
kind: z.ZodEnum<{
|
|
19
|
-
video: "video";
|
|
20
|
-
download: "download";
|
|
21
|
-
content: "content";
|
|
22
|
-
}>;
|
|
23
|
-
filename: z.ZodString;
|
|
24
|
-
contentType: z.ZodString;
|
|
25
|
-
size: z.ZodNumber;
|
|
26
23
|
status: z.ZodEnum<{
|
|
27
24
|
pending: "pending";
|
|
28
25
|
ready: "ready";
|
|
29
26
|
}>;
|
|
30
|
-
uploadedBy: z.ZodString;
|
|
31
27
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
32
28
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
33
|
-
|
|
29
|
+
uploadedBy: z.ZodString;
|
|
30
|
+
filename: z.ZodString;
|
|
31
|
+
contentType: z.ZodString;
|
|
32
|
+
size: z.ZodNumber;
|
|
33
|
+
kind: z.ZodEnum<{
|
|
34
|
+
image: "image";
|
|
35
|
+
video: "video";
|
|
36
|
+
audio: "audio";
|
|
37
|
+
document: "document";
|
|
38
|
+
}>;
|
|
39
|
+
source: z.ZodEnum<{
|
|
40
|
+
library: "library";
|
|
41
|
+
member: "member";
|
|
42
|
+
}>;
|
|
43
|
+
url: z.ZodNullable<z.ZodString>;
|
|
44
|
+
downloadUrl: z.ZodNullable<z.ZodString>;
|
|
45
|
+
}, z.core.$strip>;
|
|
34
46
|
type Asset = z.infer<typeof Asset>;
|
|
35
47
|
declare const AssetsQuery: z.ZodObject<{
|
|
36
48
|
page: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
@@ -38,9 +50,14 @@ declare const AssetsQuery: z.ZodObject<{
|
|
|
38
50
|
search: z.ZodOptional<z.ZodString>;
|
|
39
51
|
sort: z.ZodOptional<z.ZodString>;
|
|
40
52
|
kind: z.ZodOptional<z.ZodEnum<{
|
|
53
|
+
image: "image";
|
|
41
54
|
video: "video";
|
|
42
|
-
|
|
43
|
-
|
|
55
|
+
audio: "audio";
|
|
56
|
+
document: "document";
|
|
57
|
+
}>>;
|
|
58
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
59
|
+
library: "library";
|
|
60
|
+
member: "member";
|
|
44
61
|
}>>;
|
|
45
62
|
}, z.core.$strip>;
|
|
46
63
|
type AssetsQuery = z.infer<typeof AssetsQuery>;
|
|
@@ -48,23 +65,29 @@ declare const AssetsPage: z.ZodObject<{
|
|
|
48
65
|
rows: z.ZodArray<z.ZodObject<{
|
|
49
66
|
orgId: z.ZodString;
|
|
50
67
|
id: z.ZodString;
|
|
51
|
-
key: z.ZodString;
|
|
52
|
-
kind: z.ZodEnum<{
|
|
53
|
-
video: "video";
|
|
54
|
-
download: "download";
|
|
55
|
-
content: "content";
|
|
56
|
-
}>;
|
|
57
|
-
filename: z.ZodString;
|
|
58
|
-
contentType: z.ZodString;
|
|
59
|
-
size: z.ZodNumber;
|
|
60
68
|
status: z.ZodEnum<{
|
|
61
69
|
pending: "pending";
|
|
62
70
|
ready: "ready";
|
|
63
71
|
}>;
|
|
64
|
-
uploadedBy: z.ZodString;
|
|
65
72
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
66
73
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
67
|
-
|
|
74
|
+
uploadedBy: z.ZodString;
|
|
75
|
+
filename: z.ZodString;
|
|
76
|
+
contentType: z.ZodString;
|
|
77
|
+
size: z.ZodNumber;
|
|
78
|
+
kind: z.ZodEnum<{
|
|
79
|
+
image: "image";
|
|
80
|
+
video: "video";
|
|
81
|
+
audio: "audio";
|
|
82
|
+
document: "document";
|
|
83
|
+
}>;
|
|
84
|
+
source: z.ZodEnum<{
|
|
85
|
+
library: "library";
|
|
86
|
+
member: "member";
|
|
87
|
+
}>;
|
|
88
|
+
url: z.ZodNullable<z.ZodString>;
|
|
89
|
+
downloadUrl: z.ZodNullable<z.ZodString>;
|
|
90
|
+
}, z.core.$strip>>;
|
|
68
91
|
total: z.ZodNumber;
|
|
69
92
|
page: z.ZodNumber;
|
|
70
93
|
pageSize: z.ZodNumber;
|
|
@@ -74,73 +97,49 @@ declare const AssetIdParam: z.ZodObject<{
|
|
|
74
97
|
id: z.ZodString;
|
|
75
98
|
}, z.core.$strip>;
|
|
76
99
|
type AssetIdParam = z.infer<typeof AssetIdParam>;
|
|
77
|
-
/** Register an asset and get a presigned upload URL. */
|
|
78
100
|
declare const RequestUpload: z.ZodObject<{
|
|
79
101
|
filename: z.ZodString;
|
|
80
102
|
contentType: z.ZodString;
|
|
81
|
-
kind: z.ZodEnum<{
|
|
82
|
-
video: "video";
|
|
83
|
-
download: "download";
|
|
84
|
-
content: "content";
|
|
85
|
-
}>;
|
|
86
103
|
}, z.core.$strip>;
|
|
87
104
|
type RequestUpload = z.infer<typeof RequestUpload>;
|
|
105
|
+
declare const RequestMemberUpload: z.ZodObject<{
|
|
106
|
+
filename: z.ZodString;
|
|
107
|
+
contentType: z.ZodString;
|
|
108
|
+
}, z.core.$strip>;
|
|
109
|
+
type RequestMemberUpload = z.infer<typeof RequestMemberUpload>;
|
|
88
110
|
declare const UploadTicket: z.ZodObject<{
|
|
89
|
-
asset: z.ZodObject<{
|
|
90
|
-
orgId: z.ZodString;
|
|
91
|
-
id: z.ZodString;
|
|
92
|
-
key: z.ZodString;
|
|
93
|
-
kind: z.ZodEnum<{
|
|
94
|
-
video: "video";
|
|
95
|
-
download: "download";
|
|
96
|
-
content: "content";
|
|
97
|
-
}>;
|
|
98
|
-
filename: z.ZodString;
|
|
99
|
-
contentType: z.ZodString;
|
|
100
|
-
size: z.ZodNumber;
|
|
101
|
-
status: z.ZodEnum<{
|
|
102
|
-
pending: "pending";
|
|
103
|
-
ready: "ready";
|
|
104
|
-
}>;
|
|
105
|
-
uploadedBy: z.ZodString;
|
|
106
|
-
createdAt: z.ZodCoercedDate<unknown>;
|
|
107
|
-
updatedAt: z.ZodCoercedDate<unknown>;
|
|
108
|
-
}, z.core.$strict>;
|
|
109
111
|
uploadUrl: z.ZodString;
|
|
110
112
|
method: z.ZodLiteral<"PUT">;
|
|
111
113
|
expiresInSeconds: z.ZodNumber;
|
|
112
114
|
headers: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
113
|
-
}, z.core.$strict>;
|
|
114
|
-
type UploadTicket = z.infer<typeof UploadTicket>;
|
|
115
|
-
/** Optional override of the download filename (Content-Disposition). */
|
|
116
|
-
declare const RequestDownload: z.ZodObject<{
|
|
117
|
-
filename: z.ZodOptional<z.ZodString>;
|
|
118
|
-
}, z.core.$strip>;
|
|
119
|
-
type RequestDownload = z.infer<typeof RequestDownload>;
|
|
120
|
-
declare const DownloadTicket: z.ZodObject<{
|
|
121
|
-
url: z.ZodString;
|
|
122
115
|
asset: z.ZodObject<{
|
|
123
116
|
orgId: z.ZodString;
|
|
124
117
|
id: z.ZodString;
|
|
125
|
-
key: z.ZodString;
|
|
126
|
-
kind: z.ZodEnum<{
|
|
127
|
-
video: "video";
|
|
128
|
-
download: "download";
|
|
129
|
-
content: "content";
|
|
130
|
-
}>;
|
|
131
|
-
filename: z.ZodString;
|
|
132
|
-
contentType: z.ZodString;
|
|
133
|
-
size: z.ZodNumber;
|
|
134
118
|
status: z.ZodEnum<{
|
|
135
119
|
pending: "pending";
|
|
136
120
|
ready: "ready";
|
|
137
121
|
}>;
|
|
138
|
-
uploadedBy: z.ZodString;
|
|
139
122
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
140
123
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
141
|
-
|
|
124
|
+
uploadedBy: z.ZodString;
|
|
125
|
+
filename: z.ZodString;
|
|
126
|
+
contentType: z.ZodString;
|
|
127
|
+
size: z.ZodNumber;
|
|
128
|
+
kind: z.ZodEnum<{
|
|
129
|
+
image: "image";
|
|
130
|
+
video: "video";
|
|
131
|
+
audio: "audio";
|
|
132
|
+
document: "document";
|
|
133
|
+
}>;
|
|
134
|
+
source: z.ZodEnum<{
|
|
135
|
+
library: "library";
|
|
136
|
+
member: "member";
|
|
137
|
+
}>;
|
|
138
|
+
url: z.ZodNullable<z.ZodString>;
|
|
139
|
+
downloadUrl: z.ZodNullable<z.ZodString>;
|
|
140
|
+
}, z.core.$strip>;
|
|
142
141
|
}, z.core.$strict>;
|
|
143
|
-
type
|
|
142
|
+
type UploadTicket = z.infer<typeof UploadTicket>;
|
|
144
143
|
//#endregion
|
|
145
|
-
export { Asset, AssetIdParam, AssetKind, AssetStatus, AssetsPage, AssetsQuery,
|
|
144
|
+
export { Asset, AssetIdParam, AssetKind, AssetSource, AssetStatus, AssetsPage, AssetsQuery, RequestMemberUpload, RequestUpload, UploadTicket };
|
|
146
145
|
//# sourceMappingURL=assets.d.ts.map
|
|
@@ -1,24 +1,34 @@
|
|
|
1
1
|
import { ListQuery, paginated } from "./shared.js";
|
|
2
|
+
import { MEMBER_IMAGE_TYPE } from "@headless-lms/core/assets";
|
|
2
3
|
import { z } from "zod";
|
|
3
|
-
import { assetKindSchema,
|
|
4
|
+
import { assetKindSchema, assetSourceSchema, assetStatusSchema, assetViewSchema, uploadTicketSchema } from "@headless-lms/core/schemas";
|
|
4
5
|
//#region src/http/schemas/assets.ts
|
|
5
|
-
const AssetKind = assetKindSchema;
|
|
6
|
+
const AssetKind = assetKindSchema.describe("The media class, derived by the server from the content type.");
|
|
7
|
+
const AssetSource = assetSourceSchema.describe("Where the file came from: `library` is the org's media uploaded by staff, `member` is a person's own upload.");
|
|
6
8
|
const AssetStatus = assetStatusSchema;
|
|
7
|
-
const Asset =
|
|
8
|
-
|
|
9
|
+
const Asset = assetViewSchema.omit({ key: true }).extend({
|
|
10
|
+
kind: AssetKind,
|
|
11
|
+
source: AssetSource,
|
|
12
|
+
url: z.string().nullable().describe("A short-lived signed URL that shows a ready library file. `null` while pending and for a member upload, which is served with what it is attached to."),
|
|
13
|
+
downloadUrl: z.string().nullable().describe("The same file as a download saved under its filename. `null` when `url` is.")
|
|
14
|
+
}).strip();
|
|
15
|
+
const AssetsQuery = ListQuery.extend({
|
|
16
|
+
kind: AssetKind.optional(),
|
|
17
|
+
source: AssetSource.optional().describe("Defaults to `library`.")
|
|
18
|
+
});
|
|
9
19
|
const AssetsPage = paginated(Asset);
|
|
10
20
|
const AssetIdParam = z.object({ id: z.string() });
|
|
11
|
-
|
|
21
|
+
const Filename = z.string().trim().min(1).max(255);
|
|
12
22
|
const RequestUpload = z.object({
|
|
13
|
-
filename:
|
|
14
|
-
contentType: z.string().min(1)
|
|
15
|
-
|
|
23
|
+
filename: Filename,
|
|
24
|
+
contentType: z.string().min(1).max(255).describe("The media class is derived from this.")
|
|
25
|
+
});
|
|
26
|
+
const RequestMemberUpload = z.object({
|
|
27
|
+
filename: Filename,
|
|
28
|
+
contentType: z.string().regex(MEMBER_IMAGE_TYPE, "A member upload must be a PNG, JPEG, GIF, WebP or AVIF image").describe("One of `image/png`, `image/jpeg`, `image/gif`, `image/webp` or `image/avif`. The stored type and size are checked when the upload is finalized.")
|
|
16
29
|
});
|
|
17
|
-
const UploadTicket = uploadTicketSchema;
|
|
18
|
-
/** Optional override of the download filename (Content-Disposition). */
|
|
19
|
-
const RequestDownload = z.object({ filename: z.string().optional() });
|
|
20
|
-
const DownloadTicket = downloadTicketSchema;
|
|
30
|
+
const UploadTicket = uploadTicketSchema.extend({ asset: Asset });
|
|
21
31
|
//#endregion
|
|
22
|
-
export { Asset, AssetIdParam, AssetKind, AssetStatus, AssetsPage, AssetsQuery,
|
|
32
|
+
export { Asset, AssetIdParam, AssetKind, AssetSource, AssetStatus, AssetsPage, AssetsQuery, RequestMemberUpload, RequestUpload, UploadTicket };
|
|
23
33
|
|
|
24
34
|
//# sourceMappingURL=assets.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assets.js","names":[],"sources":["../../../src/http/schemas/assets.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"assets.js","names":[],"sources":["../../../src/http/schemas/assets.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n assetKindSchema,\n assetSourceSchema,\n assetStatusSchema,\n assetViewSchema,\n uploadTicketSchema,\n} from '@headless-lms/core/schemas';\nimport { MEMBER_IMAGE_TYPE } from '@headless-lms/core/assets';\nimport { ListQuery, paginated } from './shared.js';\n\nexport const AssetKind = assetKindSchema.describe(\n 'The media class, derived by the server from the content type.',\n);\nexport type AssetKind = z.infer<typeof AssetKind>;\n\nexport const AssetSource = assetSourceSchema.describe(\n \"Where the file came from: `library` is the org's media uploaded by staff, `member` is a person's own upload.\",\n);\nexport type AssetSource = z.infer<typeof AssetSource>;\n\nexport const AssetStatus = assetStatusSchema;\nexport type AssetStatus = z.infer<typeof AssetStatus>;\n\nexport const Asset = assetViewSchema\n .omit({ key: true })\n .extend({\n kind: AssetKind,\n source: AssetSource,\n url: z\n .string()\n .nullable()\n .describe(\n 'A short-lived signed URL that shows a ready library file. `null` while pending and for a member upload, which is served with what it is attached to.',\n ),\n downloadUrl: z\n .string()\n .nullable()\n .describe('The same file as a download saved under its filename. `null` when `url` is.'),\n })\n .strip();\nexport type Asset = z.infer<typeof Asset>;\n\nexport const AssetsQuery = ListQuery.extend({\n kind: AssetKind.optional(),\n source: AssetSource.optional().describe('Defaults to `library`.'),\n});\nexport type AssetsQuery = z.infer<typeof AssetsQuery>;\n\nexport const AssetsPage = paginated(Asset);\nexport type AssetsPage = z.infer<typeof AssetsPage>;\n\nexport const AssetIdParam = z.object({ id: z.string() });\nexport type AssetIdParam = z.infer<typeof AssetIdParam>;\n\nconst Filename = z.string().trim().min(1).max(255);\n\nexport const RequestUpload = z.object({\n filename: Filename,\n contentType: z.string().min(1).max(255).describe('The media class is derived from this.'),\n});\nexport type RequestUpload = z.infer<typeof RequestUpload>;\n\nexport const RequestMemberUpload = z.object({\n filename: Filename,\n contentType: z\n .string()\n .regex(MEMBER_IMAGE_TYPE, 'A member upload must be a PNG, JPEG, GIF, WebP or AVIF image')\n .describe(\n 'One of `image/png`, `image/jpeg`, `image/gif`, `image/webp` or `image/avif`. The stored type and size are checked when the upload is finalized.',\n ),\n});\nexport type RequestMemberUpload = z.infer<typeof RequestMemberUpload>;\n\nexport const UploadTicket = uploadTicketSchema.extend({ asset: Asset });\nexport type UploadTicket = z.infer<typeof UploadTicket>;\n"],"mappings":";;;;;AAWA,MAAa,YAAY,gBAAgB,SACvC,+DACF;AAGA,MAAa,cAAc,kBAAkB,SAC3C,8GACF;AAGA,MAAa,cAAc;AAG3B,MAAa,QAAQ,gBAClB,KAAK,EAAE,KAAK,KAAK,CAAC,CAAC,CACnB,OAAO;CACN,MAAM;CACN,QAAQ;CACR,KAAK,EACF,OAAO,CAAC,CACR,SAAS,CAAC,CACV,SACC,sJACF;CACF,aAAa,EACV,OAAO,CAAC,CACR,SAAS,CAAC,CACV,SAAS,6EAA6E;AAC3F,CAAC,CAAC,CACD,MAAM;AAGT,MAAa,cAAc,UAAU,OAAO;CAC1C,MAAM,UAAU,SAAS;CACzB,QAAQ,YAAY,SAAS,CAAC,CAAC,SAAS,wBAAwB;AAClE,CAAC;AAGD,MAAa,aAAa,UAAU,KAAK;AAGzC,MAAa,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;AAGvD,MAAM,WAAW,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;AAEjD,MAAa,gBAAgB,EAAE,OAAO;CACpC,UAAU;CACV,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,SAAS,uCAAuC;AAC1F,CAAC;AAGD,MAAa,sBAAsB,EAAE,OAAO;CAC1C,UAAU;CACV,aAAa,EACV,OAAO,CAAC,CACR,MAAM,mBAAmB,8DAA8D,CAAC,CACxF,SACC,iJACF;AACJ,CAAC;AAGD,MAAa,eAAe,mBAAmB,OAAO,EAAE,OAAO,MAAM,CAAC"}
|
|
@@ -29,6 +29,11 @@ declare const Automation: z.ZodObject<{
|
|
|
29
29
|
input: z.ZodRecord<z.ZodString, z.ZodType<import("@headless-lms/core/types").JsonValue, unknown, z.core.$ZodTypeInternals<import("@headless-lms/core/types").JsonValue, unknown>>>;
|
|
30
30
|
}, z.core.$strict>>;
|
|
31
31
|
enabled: z.ZodBoolean;
|
|
32
|
+
filter: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodType<import("@headless-lms/core/types").JsonValue, unknown, z.core.$ZodTypeInternals<import("@headless-lms/core/types").JsonValue, unknown>>>>;
|
|
33
|
+
source: z.ZodEnum<{
|
|
34
|
+
system: "system";
|
|
35
|
+
user: "user";
|
|
36
|
+
}>;
|
|
32
37
|
createdAt: z.ZodCoercedDate<unknown>;
|
|
33
38
|
updatedAt: z.ZodCoercedDate<unknown>;
|
|
34
39
|
}, z.core.$strict>;
|
|
@@ -48,6 +53,7 @@ declare const CreateAutomationBody: z.ZodObject<{
|
|
|
48
53
|
type: z.ZodString;
|
|
49
54
|
input: z.ZodRecord<z.ZodString, z.ZodType<import("@headless-lms/core/types").JsonValue, unknown, z.core.$ZodTypeInternals<import("@headless-lms/core/types").JsonValue, unknown>>>;
|
|
50
55
|
}, z.core.$strict>>;
|
|
56
|
+
filter: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodType<import("@headless-lms/core/types").JsonValue, unknown, z.core.$ZodTypeInternals<import("@headless-lms/core/types").JsonValue, unknown>>>>>;
|
|
51
57
|
}, z.core.$strict>;
|
|
52
58
|
type CreateAutomationBody = z.infer<typeof CreateAutomationBody>;
|
|
53
59
|
declare const UpdateAutomationBody: z.ZodObject<{
|
|
@@ -58,6 +64,7 @@ declare const UpdateAutomationBody: z.ZodObject<{
|
|
|
58
64
|
type: z.ZodString;
|
|
59
65
|
input: z.ZodRecord<z.ZodString, z.ZodType<import("@headless-lms/core/types").JsonValue, unknown, z.core.$ZodTypeInternals<import("@headless-lms/core/types").JsonValue, unknown>>>;
|
|
60
66
|
}, z.core.$strict>>>;
|
|
67
|
+
filter: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodType<import("@headless-lms/core/types").JsonValue, unknown, z.core.$ZodTypeInternals<import("@headless-lms/core/types").JsonValue, unknown>>>>>>;
|
|
61
68
|
enabled: z.ZodOptional<z.ZodBoolean>;
|
|
62
69
|
}, z.core.$strict>;
|
|
63
70
|
type UpdateAutomationBody = z.infer<typeof UpdateAutomationBody>;
|
|
@@ -103,6 +110,7 @@ declare const AutomationActionResult: z.ZodObject<{
|
|
|
103
110
|
failed: "failed";
|
|
104
111
|
}>;
|
|
105
112
|
error: z.ZodOptional<z.ZodString>;
|
|
113
|
+
recipients: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
106
114
|
}, z.core.$strict>;
|
|
107
115
|
type AutomationActionResult = z.infer<typeof AutomationActionResult>;
|
|
108
116
|
declare const AutomationRun: z.ZodObject<{
|
|
@@ -125,6 +133,7 @@ declare const AutomationRun: z.ZodObject<{
|
|
|
125
133
|
failed: "failed";
|
|
126
134
|
}>;
|
|
127
135
|
error: z.ZodOptional<z.ZodString>;
|
|
136
|
+
recipients: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
128
137
|
}, z.core.$strict>>;
|
|
129
138
|
startedAt: z.ZodCoercedDate<unknown>;
|
|
130
139
|
finishedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
@@ -165,6 +174,7 @@ declare const AutomationRunsPage: z.ZodObject<{
|
|
|
165
174
|
failed: "failed";
|
|
166
175
|
}>;
|
|
167
176
|
error: z.ZodOptional<z.ZodString>;
|
|
177
|
+
recipients: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
168
178
|
}, z.core.$strict>>;
|
|
169
179
|
startedAt: z.ZodCoercedDate<unknown>;
|
|
170
180
|
finishedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { ListQuery, paginated } from "./shared.js";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { bundleItemSchema, bundleSchema } from "@headless-lms/core/schemas";
|
|
3
|
+
import { bundleItemSchema, bundleSchema, idSchema } from "@headless-lms/core/schemas";
|
|
4
4
|
//#region src/http/schemas/bundles.ts
|
|
5
5
|
const Bundle = bundleSchema;
|
|
6
6
|
const BundleItem = bundleItemSchema;
|
|
7
7
|
const CreateBundle = z.object({
|
|
8
|
-
name: z.string().min(1),
|
|
9
|
-
contentIds: z.array(
|
|
8
|
+
name: z.string().trim().min(1).max(200),
|
|
9
|
+
contentIds: z.array(idSchema).max(500).optional()
|
|
10
10
|
});
|
|
11
|
-
const UpdateBundle = z.object({ name: z.string().min(1).optional() });
|
|
11
|
+
const UpdateBundle = z.object({ name: z.string().trim().min(1).max(200).optional() });
|
|
12
12
|
const BundlesQuery = ListQuery;
|
|
13
13
|
const BundlesPage = paginated(Bundle);
|
|
14
|
-
const AddBundleItem = z.object({ contentId:
|
|
14
|
+
const AddBundleItem = z.object({ contentId: idSchema });
|
|
15
15
|
const BundleIdParam = z.object({ bundleId: z.string() });
|
|
16
16
|
const BundleItemParams = z.object({
|
|
17
17
|
bundleId: z.string(),
|
|
18
|
-
contentId:
|
|
18
|
+
contentId: idSchema
|
|
19
19
|
});
|
|
20
20
|
//#endregion
|
|
21
21
|
export { AddBundleItem, Bundle, BundleIdParam, BundleItem, BundleItemParams, BundlesPage, BundlesQuery, CreateBundle, UpdateBundle };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundles.js","names":[],"sources":["../../../src/http/schemas/bundles.ts"],"sourcesContent":["// Bundles resource schemas — a named grouping of content items. The Fastify\n// routes validate requests/responses against these, the OpenAPI spec is built\n// from them, and the frontend SDK is generated off that spec.\nimport { z } from 'zod';\nimport { bundleItemSchema, bundleSchema } from '@headless-lms/core/schemas';\nimport { ListQuery, paginated } from './shared.js';\n\nexport const Bundle = bundleSchema;\nexport type Bundle = z.infer<typeof Bundle>;\n\nexport const BundleItem = bundleItemSchema;\nexport type BundleItem = z.infer<typeof BundleItem>;\n\nexport const CreateBundle = z.object({\n name: z.string().min(1),\n contentIds: z.array(
|
|
1
|
+
{"version":3,"file":"bundles.js","names":[],"sources":["../../../src/http/schemas/bundles.ts"],"sourcesContent":["// Bundles resource schemas — a named grouping of content items. The Fastify\n// routes validate requests/responses against these, the OpenAPI spec is built\n// from them, and the frontend SDK is generated off that spec.\nimport { z } from 'zod';\nimport { bundleItemSchema, bundleSchema, idSchema } from '@headless-lms/core/schemas';\nimport { ListQuery, paginated } from './shared.js';\n\nexport const Bundle = bundleSchema;\nexport type Bundle = z.infer<typeof Bundle>;\n\nexport const BundleItem = bundleItemSchema;\nexport type BundleItem = z.infer<typeof BundleItem>;\n\nexport const CreateBundle = z.object({\n name: z.string().trim().min(1).max(200),\n contentIds: z.array(idSchema).max(500).optional(),\n});\nexport type CreateBundle = z.infer<typeof CreateBundle>;\n\nexport const UpdateBundle = z.object({\n name: z.string().trim().min(1).max(200).optional(),\n});\nexport type UpdateBundle = z.infer<typeof UpdateBundle>;\n\nexport const BundlesQuery = ListQuery;\nexport type BundlesQuery = z.infer<typeof BundlesQuery>;\n\nexport const BundlesPage = paginated(Bundle);\nexport type BundlesPage = z.infer<typeof BundlesPage>;\n\nexport const AddBundleItem = z.object({\n contentId: idSchema,\n});\nexport type AddBundleItem = z.infer<typeof AddBundleItem>;\n\nexport const BundleIdParam = z.object({ bundleId: z.string() });\nexport type BundleIdParam = z.infer<typeof BundleIdParam>;\n\nexport const BundleItemParams = z.object({\n bundleId: z.string(),\n contentId: idSchema,\n});\nexport type BundleItemParams = z.infer<typeof BundleItemParams>;\n"],"mappings":";;;;AAOA,MAAa,SAAS;AAGtB,MAAa,aAAa;AAG1B,MAAa,eAAe,EAAE,OAAO;CACnC,MAAM,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;CACtC,YAAY,EAAE,MAAM,QAAQ,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,SAAS;AAClD,CAAC;AAGD,MAAa,eAAe,EAAE,OAAO,EACnC,MAAM,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,SAAS,EACnD,CAAC;AAGD,MAAa,eAAe;AAG5B,MAAa,cAAc,UAAU,MAAM;AAG3C,MAAa,gBAAgB,EAAE,OAAO,EACpC,WAAW,SACb,CAAC;AAGD,MAAa,gBAAgB,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC;AAG9D,MAAa,mBAAmB,EAAE,OAAO;CACvC,UAAU,EAAE,OAAO;CACnB,WAAW;AACb,CAAC"}
|