@headless-lms/server 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.js +5 -0
- package/dist/app/community-mail.d.ts +24 -0
- package/dist/app/community-mail.js +92 -0
- package/dist/app/community-mail.js.map +1 -0
- package/dist/app/container.d.ts +40 -19
- package/dist/app/container.js +294 -45
- package/dist/app/container.js.map +1 -1
- package/dist/app/mcp-endpoints.d.ts +13 -0
- package/dist/app/mcp-endpoints.js +25 -0
- package/dist/app/mcp-endpoints.js.map +1 -0
- package/dist/app/notification-channels.d.ts +47 -0
- package/dist/app/notification-channels.js +174 -0
- package/dist/app/notification-channels.js.map +1 -0
- package/dist/app/notification-reads.d.ts +23 -0
- package/dist/app/notification-reads.js +95 -0
- package/dist/app/notification-reads.js.map +1 -0
- package/dist/http/config.d.ts +2 -1
- package/dist/http/errors.d.ts +15 -0
- package/dist/http/errors.js +162 -0
- package/dist/http/errors.js.map +1 -0
- package/dist/http/mcp/catalogue.d.ts +37 -0
- package/dist/http/mcp/catalogue.js +69 -0
- package/dist/http/mcp/catalogue.js.map +1 -0
- package/dist/http/mcp/challenge.d.ts +7 -0
- package/dist/http/mcp/challenge.js +35 -0
- package/dist/http/mcp/challenge.js.map +1 -0
- package/dist/http/mcp/input-schema.d.ts +7 -0
- package/dist/http/mcp/input-schema.js +28 -0
- package/dist/http/mcp/input-schema.js.map +1 -0
- package/dist/http/mcp/route.d.ts +8 -0
- package/dist/http/mcp/route.js +75 -0
- package/dist/http/mcp/route.js.map +1 -0
- package/dist/http/mcp/server.d.ts +8 -0
- package/dist/http/mcp/server.js +31 -0
- package/dist/http/mcp/server.js.map +1 -0
- package/dist/http/mcp/test-support.d.ts +55 -0
- package/dist/http/mcp/test-support.js +151 -0
- package/dist/http/mcp/test-support.js.map +1 -0
- package/dist/http/mcp/tool.d.ts +48 -0
- package/dist/http/mcp/tool.js +58 -0
- package/dist/http/mcp/tool.js.map +1 -0
- package/dist/http/mcp/tools/automations.d.ts +6 -0
- package/dist/http/mcp/tools/automations.js +120 -0
- package/dist/http/mcp/tools/automations.js.map +1 -0
- package/dist/http/mcp/tools/catalog.d.ts +6 -0
- package/dist/http/mcp/tools/catalog.js +200 -0
- package/dist/http/mcp/tools/catalog.js.map +1 -0
- package/dist/http/mcp/tools/comments.d.ts +6 -0
- package/dist/http/mcp/tools/comments.js +70 -0
- package/dist/http/mcp/tools/comments.js.map +1 -0
- package/dist/http/mcp/tools/communities.d.ts +6 -0
- package/dist/http/mcp/tools/communities.js +175 -0
- package/dist/http/mcp/tools/communities.js.map +1 -0
- package/dist/http/mcp/tools/community-members.d.ts +6 -0
- package/dist/http/mcp/tools/community-members.js +89 -0
- package/dist/http/mcp/tools/community-members.js.map +1 -0
- package/dist/http/mcp/tools/community-moderation.d.ts +6 -0
- package/dist/http/mcp/tools/community-moderation.js +144 -0
- package/dist/http/mcp/tools/community-moderation.js.map +1 -0
- package/dist/http/mcp/tools/courses.d.ts +6 -0
- package/dist/http/mcp/tools/courses.js +121 -0
- package/dist/http/mcp/tools/courses.js.map +1 -0
- package/dist/http/mcp/tools/index.d.ts +6 -0
- package/dist/http/mcp/tools/index.js +23 -0
- package/dist/http/mcp/tools/index.js.map +1 -0
- package/dist/http/mcp/tools/people.d.ts +6 -0
- package/dist/http/mcp/tools/people.js +145 -0
- package/dist/http/mcp/tools/people.js.map +1 -0
- package/dist/http/plugins/auth.js +13 -5
- package/dist/http/plugins/auth.js.map +1 -1
- package/dist/http/plugins/error-handler.d.ts +2 -1
- package/dist/http/plugins/error-handler.js +51 -65
- package/dist/http/plugins/error-handler.js.map +1 -1
- package/dist/http/plugins/openapi.js +49 -2
- package/dist/http/plugins/openapi.js.map +1 -1
- package/dist/http/routes/access.d.ts +7 -0
- package/dist/http/routes/access.js +140 -0
- package/dist/http/routes/access.js.map +1 -0
- package/dist/http/routes/activities.js +68 -23
- package/dist/http/routes/activities.js.map +1 -1
- package/dist/http/routes/assets.js +60 -55
- package/dist/http/routes/assets.js.map +1 -1
- package/dist/http/routes/automations.js +44 -24
- package/dist/http/routes/automations.js.map +1 -1
- package/dist/http/routes/bundles.js +29 -18
- package/dist/http/routes/bundles.js.map +1 -1
- package/dist/http/routes/communities.d.ts +7 -0
- package/dist/http/routes/communities.js +522 -0
- package/dist/http/routes/communities.js.map +1 -0
- package/dist/http/routes/community-moderation.d.ts +7 -0
- package/dist/http/routes/community-moderation.js +425 -0
- package/dist/http/routes/community-moderation.js.map +1 -0
- package/dist/http/routes/course-analytics.js +9 -7
- package/dist/http/routes/course-analytics.js.map +1 -1
- package/dist/http/routes/courses.js +30 -15
- package/dist/http/routes/courses.js.map +1 -1
- package/dist/http/routes/dashboard.js +15 -6
- package/dist/http/routes/dashboard.js.map +1 -1
- package/dist/http/routes/discussion.js +34 -26
- package/dist/http/routes/discussion.js.map +1 -1
- package/dist/http/routes/downloads.js +48 -30
- package/dist/http/routes/downloads.js.map +1 -1
- package/dist/http/routes/entitlements.js +16 -7
- package/dist/http/routes/entitlements.js.map +1 -1
- package/dist/http/routes/integrations.js +38 -41
- package/dist/http/routes/integrations.js.map +1 -1
- package/dist/http/routes/member/actor.d.ts +14 -0
- package/dist/http/routes/member/actor.js +11 -0
- package/dist/http/routes/member/actor.js.map +1 -0
- package/dist/http/routes/member/assets.d.ts +7 -0
- package/dist/http/routes/member/assets.js +79 -0
- package/dist/http/routes/member/assets.js.map +1 -0
- package/dist/http/routes/member/chats.d.ts +7 -0
- package/dist/http/routes/member/chats.js +435 -0
- package/dist/http/routes/member/chats.js.map +1 -0
- package/dist/http/routes/member/comments.d.ts +7 -0
- package/dist/http/routes/member/comments.js +187 -0
- package/dist/http/routes/member/comments.js.map +1 -0
- package/dist/http/routes/member/community.d.ts +7 -0
- package/dist/http/routes/member/community.js +312 -0
- package/dist/http/routes/member/community.js.map +1 -0
- package/dist/http/routes/member/courses.d.ts +7 -0
- package/dist/http/routes/member/courses.js +101 -0
- package/dist/http/routes/member/courses.js.map +1 -0
- package/dist/http/routes/member/devices.d.ts +7 -0
- package/dist/http/routes/member/devices.js +98 -0
- package/dist/http/routes/member/devices.js.map +1 -0
- package/dist/http/routes/member/downloads.d.ts +7 -0
- package/dist/http/routes/member/downloads.js +56 -0
- package/dist/http/routes/member/downloads.js.map +1 -0
- package/dist/http/routes/member/files.d.ts +7 -0
- package/dist/http/routes/member/files.js +184 -0
- package/dist/http/routes/member/files.js.map +1 -0
- package/dist/http/routes/member/index.d.ts +7 -0
- package/dist/http/routes/member/index.js +35 -0
- package/dist/http/routes/member/index.js.map +1 -0
- package/dist/http/routes/member/notification-settings.d.ts +7 -0
- package/dist/http/routes/member/notification-settings.js +108 -0
- package/dist/http/routes/member/notification-settings.js.map +1 -0
- package/dist/http/routes/member/notifications.d.ts +7 -0
- package/dist/http/routes/member/notifications.js +125 -0
- package/dist/http/routes/member/notifications.js.map +1 -0
- package/dist/http/routes/member/org.d.ts +7 -0
- package/dist/http/routes/member/org.js +56 -0
- package/dist/http/routes/member/org.js.map +1 -0
- package/dist/http/routes/member/posts.d.ts +7 -0
- package/dist/http/routes/member/posts.js +612 -0
- package/dist/http/routes/member/posts.js.map +1 -0
- package/dist/http/routes/member/profile.d.ts +7 -0
- package/dist/http/routes/member/profile.js +48 -0
- package/dist/http/routes/member/profile.js.map +1 -0
- package/dist/http/routes/member/progress.d.ts +7 -0
- package/dist/http/routes/member/progress.js +60 -0
- package/dist/http/routes/member/progress.js.map +1 -0
- package/dist/http/routes/organizations.js +171 -25
- package/dist/http/routes/organizations.js.map +1 -1
- package/dist/http/routes/students.js +32 -47
- package/dist/http/routes/students.js.map +1 -1
- package/dist/http/routes/webhooks.js +26 -18
- package/dist/http/routes/webhooks.js.map +1 -1
- package/dist/http/routes.js +8 -2
- package/dist/http/routes.js.map +1 -1
- package/dist/http/schemas/access.d.ts +146 -0
- package/dist/http/schemas/access.js +36 -0
- package/dist/http/schemas/access.js.map +1 -0
- package/dist/http/schemas/activities.d.ts +3 -1
- package/dist/http/schemas/activities.js +4 -4
- package/dist/http/schemas/activities.js.map +1 -1
- package/dist/http/schemas/assets.d.ts +79 -80
- package/dist/http/schemas/assets.js +23 -13
- package/dist/http/schemas/assets.js.map +1 -1
- package/dist/http/schemas/automations.d.ts +6 -0
- package/dist/http/schemas/bundles.js +6 -6
- package/dist/http/schemas/bundles.js.map +1 -1
- package/dist/http/schemas/chats.d.ts +409 -0
- package/dist/http/schemas/chats.js +56 -0
- package/dist/http/schemas/chats.js.map +1 -0
- package/dist/http/schemas/community.d.ts +597 -0
- package/dist/http/schemas/community.js +132 -0
- package/dist/http/schemas/community.js.map +1 -0
- package/dist/http/schemas/content.d.ts +4 -2
- package/dist/http/schemas/content.js +11 -8
- package/dist/http/schemas/content.js.map +1 -1
- package/dist/http/schemas/discussion.d.ts +98 -14
- package/dist/http/schemas/discussion.js +25 -12
- package/dist/http/schemas/discussion.js.map +1 -1
- package/dist/http/schemas/downloads.d.ts +11 -5
- package/dist/http/schemas/downloads.js +14 -11
- package/dist/http/schemas/downloads.js.map +1 -1
- package/dist/http/schemas/entitlements.d.ts +6 -6
- package/dist/http/schemas/entitlements.js +6 -6
- package/dist/http/schemas/entitlements.js.map +1 -1
- package/dist/http/schemas/files.d.ts +45 -0
- package/dist/http/schemas/files.js +25 -0
- package/dist/http/schemas/files.js.map +1 -0
- package/dist/http/schemas/index.d.ts +15 -8
- package/dist/http/schemas/index.js +15 -8
- package/dist/http/schemas/integrations.d.ts +4 -4
- package/dist/http/schemas/invites.d.ts +4 -0
- package/dist/http/schemas/invites.js +1 -0
- package/dist/http/schemas/invites.js.map +1 -1
- package/dist/http/schemas/{learn.d.ts → member.d.ts} +31 -18
- package/dist/http/schemas/{learn.js → member.js} +17 -13
- package/dist/http/schemas/member.js.map +1 -0
- package/dist/http/schemas/members.d.ts +35 -2
- package/dist/http/schemas/members.js +17 -3
- package/dist/http/schemas/members.js.map +1 -1
- package/dist/http/schemas/notifications.d.ts +550 -0
- package/dist/http/schemas/notifications.js +164 -0
- package/dist/http/schemas/notifications.js.map +1 -0
- package/dist/http/schemas/posts.d.ts +350 -0
- package/dist/http/schemas/posts.js +47 -0
- package/dist/http/schemas/posts.js.map +1 -0
- package/dist/http/schemas/profile.d.ts +23 -0
- package/dist/http/schemas/profile.js +15 -0
- package/dist/http/schemas/profile.js.map +1 -0
- package/dist/http/schemas/shared.d.ts +32 -1
- package/dist/http/schemas/shared.js +20 -2
- package/dist/http/schemas/shared.js.map +1 -1
- package/dist/http/schemas/students.d.ts +1 -7
- package/dist/http/schemas/students.js +1 -7
- package/dist/http/schemas/students.js.map +1 -1
- package/dist/http/scope.d.ts +3 -1
- package/dist/http/scope.js +26 -4
- package/dist/http/scope.js.map +1 -1
- package/dist/http/server.js +6 -1
- package/dist/http/server.js.map +1 -1
- package/dist/http/web-bridge.d.ts +1 -1
- package/dist/http/web-bridge.js +2 -2
- package/dist/http/web-bridge.js.map +1 -1
- package/dist/http/well-known.d.ts +7 -0
- package/dist/http/well-known.js +22 -0
- package/dist/http/well-known.js.map +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js +78 -0
- package/dist/node_modules/.pnpm/@jridgewell_sourcemap-codec@1.5.5/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_expect@2.1.9/node_modules/@vitest/expect/dist/index.js +1267 -0
- package/dist/node_modules/.pnpm/@vitest_expect@2.1.9/node_modules/@vitest/expect/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_pretty-format@2.1.9/node_modules/@vitest/pretty-format/dist/index.js +814 -0
- package/dist/node_modules/.pnpm/@vitest_pretty-format@2.1.9/node_modules/@vitest/pretty-format/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_runner@2.1.9/node_modules/@vitest/runner/dist/chunk-tasks.js +43 -0
- package/dist/node_modules/.pnpm/@vitest_runner@2.1.9/node_modules/@vitest/runner/dist/chunk-tasks.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_runner@2.1.9/node_modules/@vitest/runner/dist/index.js +527 -0
- package/dist/node_modules/.pnpm/@vitest_runner@2.1.9/node_modules/@vitest/runner/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_runner@2.1.9/node_modules/@vitest/runner/dist/utils.js +2 -0
- package/dist/node_modules/.pnpm/@vitest_snapshot@2.1.9/node_modules/@vitest/snapshot/dist/index.js +1737 -0
- package/dist/node_modules/.pnpm/@vitest_snapshot@2.1.9/node_modules/@vitest/snapshot/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_spy@2.1.9/node_modules/@vitest/spy/dist/index.js +137 -0
- package/dist/node_modules/.pnpm/@vitest_spy@2.1.9/node_modules/@vitest/spy/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js +118 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/chunk-_commonjsHelpers.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/diff.js +1222 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/diff.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/error.js +91 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/error.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/helpers.js +113 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/helpers.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/index.js +449 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/source-map.js +163 -0
- package/dist/node_modules/.pnpm/@vitest_utils@2.1.9/node_modules/@vitest/utils/dist/source-map.js.map +1 -0
- package/dist/node_modules/.pnpm/chai@5.3.3/node_modules/chai/index.js +3187 -0
- package/dist/node_modules/.pnpm/chai@5.3.3/node_modules/chai/index.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.js +11 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/arguments.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.js +16 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/array.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.js +11 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/bigint.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.js +15 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/class.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.js +13 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/date.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.js +34 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/error.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.js +12 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/function.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.js +122 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/helpers.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.js +39 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/html.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js +99 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/index.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.js +25 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/map.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js +14 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/number.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.js +21 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/object.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.js +6 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/promise.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js +12 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/regexp.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.js +18 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/set.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.js +24 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/string.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.js +9 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/symbol.js.map +1 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.js +30 -0
- package/dist/node_modules/.pnpm/loupe@3.2.1/node_modules/loupe/lib/typedarray.js.map +1 -0
- package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js +939 -0
- package/dist/node_modules/.pnpm/magic-string@0.30.21/node_modules/magic-string/dist/magic-string.es.js.map +1 -0
- package/dist/node_modules/.pnpm/pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.js +82 -0
- package/dist/node_modules/.pnpm/pathe@1.1.2/node_modules/pathe/dist/shared/pathe.ff20891b.js.map +1 -0
- package/dist/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js +82 -0
- package/dist/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/chunk-BVHSVHOK.js.map +1 -0
- package/dist/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/node.js +8 -0
- package/dist/node_modules/.pnpm/tinyrainbow@1.2.0/node_modules/tinyrainbow/dist/node.js.map +1 -0
- package/dist/node_modules/.pnpm/tinyspy@3.0.2/node_modules/tinyspy/dist/index.js +83 -0
- package/dist/node_modules/.pnpm/tinyspy@3.0.2/node_modules/tinyspy/dist/index.js.map +1 -0
- package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js +9 -0
- package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js.map +1 -0
- package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/date.W2xKR2qe.js +51 -0
- package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/date.W2xKR2qe.js.map +1 -0
- package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/utils.C8RiOc4B.js +48 -0
- package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/utils.C8RiOc4B.js.map +1 -0
- package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/vi.DgezovHB.js +2426 -0
- package/dist/node_modules/.pnpm/vitest@2.1.9_@types_node@22.20.0_jsdom@25.0.1_lightningcss@1.32.0/node_modules/vitest/dist/chunks/vi.DgezovHB.js.map +1 -0
- package/dist/packages/server/package.js +6 -0
- package/dist/packages/server/package.js.map +1 -0
- package/package.json +9 -7
- package/dist/app/notifications.d.ts +0 -7
- package/dist/app/notifications.js +0 -26
- package/dist/app/notifications.js.map +0 -1
- package/dist/http/routes/learn/assets.d.ts +0 -8
- package/dist/http/routes/learn/assets.js +0 -32
- package/dist/http/routes/learn/assets.js.map +0 -1
- package/dist/http/routes/learn/comments.d.ts +0 -7
- package/dist/http/routes/learn/comments.js +0 -175
- package/dist/http/routes/learn/comments.js.map +0 -1
- package/dist/http/routes/learn/courses.d.ts +0 -7
- package/dist/http/routes/learn/courses.js +0 -98
- package/dist/http/routes/learn/courses.js.map +0 -1
- package/dist/http/routes/learn/downloads.d.ts +0 -7
- package/dist/http/routes/learn/downloads.js +0 -76
- package/dist/http/routes/learn/downloads.js.map +0 -1
- package/dist/http/routes/learn/index.d.ts +0 -7
- package/dist/http/routes/learn/index.js +0 -19
- package/dist/http/routes/learn/index.js.map +0 -1
- package/dist/http/routes/learn/org.d.ts +0 -7
- package/dist/http/routes/learn/org.js +0 -50
- package/dist/http/routes/learn/org.js.map +0 -1
- package/dist/http/routes/learn/progress.d.ts +0 -7
- package/dist/http/routes/learn/progress.js +0 -63
- package/dist/http/routes/learn/progress.js.map +0 -1
- package/dist/http/schemas/learn.js.map +0 -1
- package/dist/package.js +0 -6
- package/dist/package.js.map +0 -1
|
@@ -0,0 +1,409 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/http/schemas/chats.d.ts
|
|
3
|
+
declare const Chat: z.ZodObject<{
|
|
4
|
+
orgId: z.ZodString;
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
communityId: z.ZodString;
|
|
7
|
+
kind: z.ZodEnum<{
|
|
8
|
+
direct: "direct";
|
|
9
|
+
group: "group";
|
|
10
|
+
}>;
|
|
11
|
+
status: z.ZodEnum<{
|
|
12
|
+
pending: "pending";
|
|
13
|
+
open: "open";
|
|
14
|
+
closed: "closed";
|
|
15
|
+
}>;
|
|
16
|
+
createdBy: z.ZodNullable<z.ZodString>;
|
|
17
|
+
lockedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
18
|
+
lockedBy: z.ZodNullable<z.ZodString>;
|
|
19
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
20
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
21
|
+
}, z.core.$strict>;
|
|
22
|
+
declare const MessageFlag: z.ZodObject<{
|
|
23
|
+
orgId: z.ZodString;
|
|
24
|
+
id: z.ZodString;
|
|
25
|
+
communityId: z.ZodString;
|
|
26
|
+
messageId: z.ZodString;
|
|
27
|
+
orgUserId: z.ZodString;
|
|
28
|
+
reason: z.ZodString;
|
|
29
|
+
resolvedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
30
|
+
resolution: z.ZodNullable<z.ZodEnum<{
|
|
31
|
+
locked: "locked";
|
|
32
|
+
dismissed: "dismissed";
|
|
33
|
+
deleted: "deleted";
|
|
34
|
+
}>>;
|
|
35
|
+
resolvedBy: z.ZodNullable<z.ZodString>;
|
|
36
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
37
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
38
|
+
}, z.core.$strict>;
|
|
39
|
+
declare const MessageView: z.ZodObject<{
|
|
40
|
+
orgId: z.ZodString;
|
|
41
|
+
id: z.ZodString;
|
|
42
|
+
communityId: z.ZodString;
|
|
43
|
+
chatId: z.ZodString;
|
|
44
|
+
orgUserId: z.ZodString;
|
|
45
|
+
body: z.ZodString;
|
|
46
|
+
replyToId: z.ZodNullable<z.ZodString>;
|
|
47
|
+
editedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
48
|
+
deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
49
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
50
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
51
|
+
sender: z.ZodObject<{
|
|
52
|
+
id: z.ZodString;
|
|
53
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
54
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
55
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
56
|
+
headline: z.ZodNullable<z.ZodString>;
|
|
57
|
+
image: z.ZodNullable<z.ZodString>;
|
|
58
|
+
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
59
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
60
|
+
role: z.ZodEnum<{
|
|
61
|
+
owner: "owner";
|
|
62
|
+
admin: "admin";
|
|
63
|
+
instructor: "instructor";
|
|
64
|
+
moderator: "moderator";
|
|
65
|
+
student: "student";
|
|
66
|
+
}>;
|
|
67
|
+
}, z.core.$strict>;
|
|
68
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
69
|
+
assetId: z.ZodString;
|
|
70
|
+
url: z.ZodString;
|
|
71
|
+
}, z.core.$strict>>;
|
|
72
|
+
reactions: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
73
|
+
viewerReaction: z.ZodNullable<z.ZodString>;
|
|
74
|
+
mentions: z.ZodArray<z.ZodObject<{
|
|
75
|
+
orgUserId: z.ZodString;
|
|
76
|
+
name: z.ZodString;
|
|
77
|
+
}, z.core.$strict>>;
|
|
78
|
+
}, z.core.$strict>;
|
|
79
|
+
declare const MessagesPage: z.ZodObject<{
|
|
80
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
81
|
+
orgId: z.ZodString;
|
|
82
|
+
id: z.ZodString;
|
|
83
|
+
communityId: z.ZodString;
|
|
84
|
+
chatId: z.ZodString;
|
|
85
|
+
orgUserId: z.ZodString;
|
|
86
|
+
body: z.ZodString;
|
|
87
|
+
replyToId: z.ZodNullable<z.ZodString>;
|
|
88
|
+
editedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
89
|
+
deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
90
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
91
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
92
|
+
sender: z.ZodObject<{
|
|
93
|
+
id: z.ZodString;
|
|
94
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
95
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
96
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
97
|
+
headline: z.ZodNullable<z.ZodString>;
|
|
98
|
+
image: z.ZodNullable<z.ZodString>;
|
|
99
|
+
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
100
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
101
|
+
role: z.ZodEnum<{
|
|
102
|
+
owner: "owner";
|
|
103
|
+
admin: "admin";
|
|
104
|
+
instructor: "instructor";
|
|
105
|
+
moderator: "moderator";
|
|
106
|
+
student: "student";
|
|
107
|
+
}>;
|
|
108
|
+
}, z.core.$strict>;
|
|
109
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
110
|
+
assetId: z.ZodString;
|
|
111
|
+
url: z.ZodString;
|
|
112
|
+
}, z.core.$strict>>;
|
|
113
|
+
reactions: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
114
|
+
viewerReaction: z.ZodNullable<z.ZodString>;
|
|
115
|
+
mentions: z.ZodArray<z.ZodObject<{
|
|
116
|
+
orgUserId: z.ZodString;
|
|
117
|
+
name: z.ZodString;
|
|
118
|
+
}, z.core.$strict>>;
|
|
119
|
+
}, z.core.$strict>>;
|
|
120
|
+
total: z.ZodNumber;
|
|
121
|
+
page: z.ZodNumber;
|
|
122
|
+
pageSize: z.ZodNumber;
|
|
123
|
+
}, z.core.$strip>;
|
|
124
|
+
declare const ChatListItem: z.ZodObject<{
|
|
125
|
+
chat: z.ZodObject<{
|
|
126
|
+
orgId: z.ZodString;
|
|
127
|
+
id: z.ZodString;
|
|
128
|
+
communityId: z.ZodString;
|
|
129
|
+
kind: z.ZodEnum<{
|
|
130
|
+
direct: "direct";
|
|
131
|
+
group: "group";
|
|
132
|
+
}>;
|
|
133
|
+
status: z.ZodEnum<{
|
|
134
|
+
pending: "pending";
|
|
135
|
+
open: "open";
|
|
136
|
+
closed: "closed";
|
|
137
|
+
}>;
|
|
138
|
+
createdBy: z.ZodNullable<z.ZodString>;
|
|
139
|
+
lockedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
140
|
+
lockedBy: z.ZodNullable<z.ZodString>;
|
|
141
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
142
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
143
|
+
}, z.core.$strict>;
|
|
144
|
+
participantIds: z.ZodArray<z.ZodString>;
|
|
145
|
+
lastReadMessageId: z.ZodNullable<z.ZodString>;
|
|
146
|
+
subscription: z.ZodNullable<z.ZodObject<{
|
|
147
|
+
state: z.ZodEnum<{
|
|
148
|
+
following: "following";
|
|
149
|
+
muted: "muted";
|
|
150
|
+
}>;
|
|
151
|
+
mutedUntil: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
152
|
+
}, z.core.$strict>>;
|
|
153
|
+
unread: z.ZodNumber;
|
|
154
|
+
lastMessage: z.ZodNullable<z.ZodObject<{
|
|
155
|
+
id: z.ZodString;
|
|
156
|
+
orgUserId: z.ZodString;
|
|
157
|
+
body: z.ZodString;
|
|
158
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
159
|
+
deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
160
|
+
}, z.core.$strict>>;
|
|
161
|
+
}, z.core.$strip>;
|
|
162
|
+
declare const ChatsPage: z.ZodObject<{
|
|
163
|
+
rows: z.ZodArray<z.ZodObject<{
|
|
164
|
+
chat: z.ZodObject<{
|
|
165
|
+
orgId: z.ZodString;
|
|
166
|
+
id: z.ZodString;
|
|
167
|
+
communityId: z.ZodString;
|
|
168
|
+
kind: z.ZodEnum<{
|
|
169
|
+
direct: "direct";
|
|
170
|
+
group: "group";
|
|
171
|
+
}>;
|
|
172
|
+
status: z.ZodEnum<{
|
|
173
|
+
pending: "pending";
|
|
174
|
+
open: "open";
|
|
175
|
+
closed: "closed";
|
|
176
|
+
}>;
|
|
177
|
+
createdBy: z.ZodNullable<z.ZodString>;
|
|
178
|
+
lockedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
179
|
+
lockedBy: z.ZodNullable<z.ZodString>;
|
|
180
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
181
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
182
|
+
}, z.core.$strict>;
|
|
183
|
+
participantIds: z.ZodArray<z.ZodString>;
|
|
184
|
+
lastReadMessageId: z.ZodNullable<z.ZodString>;
|
|
185
|
+
subscription: z.ZodNullable<z.ZodObject<{
|
|
186
|
+
state: z.ZodEnum<{
|
|
187
|
+
following: "following";
|
|
188
|
+
muted: "muted";
|
|
189
|
+
}>;
|
|
190
|
+
mutedUntil: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
191
|
+
}, z.core.$strict>>;
|
|
192
|
+
unread: z.ZodNumber;
|
|
193
|
+
lastMessage: z.ZodNullable<z.ZodObject<{
|
|
194
|
+
id: z.ZodString;
|
|
195
|
+
orgUserId: z.ZodString;
|
|
196
|
+
body: z.ZodString;
|
|
197
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
198
|
+
deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
199
|
+
}, z.core.$strict>>;
|
|
200
|
+
}, z.core.$strip>>;
|
|
201
|
+
total: z.ZodNumber;
|
|
202
|
+
page: z.ZodNumber;
|
|
203
|
+
pageSize: z.ZodNumber;
|
|
204
|
+
}, z.core.$strip>;
|
|
205
|
+
declare const MessageQueueEntry: z.ZodObject<{
|
|
206
|
+
message: z.ZodObject<{
|
|
207
|
+
orgId: z.ZodString;
|
|
208
|
+
id: z.ZodString;
|
|
209
|
+
communityId: z.ZodString;
|
|
210
|
+
chatId: z.ZodString;
|
|
211
|
+
orgUserId: z.ZodString;
|
|
212
|
+
body: z.ZodString;
|
|
213
|
+
replyToId: z.ZodNullable<z.ZodString>;
|
|
214
|
+
editedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
215
|
+
deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
216
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
217
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
218
|
+
sender: z.ZodObject<{
|
|
219
|
+
id: z.ZodString;
|
|
220
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
221
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
222
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
223
|
+
headline: z.ZodNullable<z.ZodString>;
|
|
224
|
+
image: z.ZodNullable<z.ZodString>;
|
|
225
|
+
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
226
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
227
|
+
role: z.ZodEnum<{
|
|
228
|
+
owner: "owner";
|
|
229
|
+
admin: "admin";
|
|
230
|
+
instructor: "instructor";
|
|
231
|
+
moderator: "moderator";
|
|
232
|
+
student: "student";
|
|
233
|
+
}>;
|
|
234
|
+
}, z.core.$strict>;
|
|
235
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
236
|
+
assetId: z.ZodString;
|
|
237
|
+
url: z.ZodString;
|
|
238
|
+
}, z.core.$strict>>;
|
|
239
|
+
reactions: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
240
|
+
viewerReaction: z.ZodNullable<z.ZodString>;
|
|
241
|
+
mentions: z.ZodArray<z.ZodObject<{
|
|
242
|
+
orgUserId: z.ZodString;
|
|
243
|
+
name: z.ZodString;
|
|
244
|
+
}, z.core.$strict>>;
|
|
245
|
+
}, z.core.$strict>;
|
|
246
|
+
flags: z.ZodArray<z.ZodObject<{
|
|
247
|
+
orgId: z.ZodString;
|
|
248
|
+
id: z.ZodString;
|
|
249
|
+
communityId: z.ZodString;
|
|
250
|
+
messageId: z.ZodString;
|
|
251
|
+
orgUserId: z.ZodString;
|
|
252
|
+
reason: z.ZodString;
|
|
253
|
+
resolvedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
254
|
+
resolution: z.ZodNullable<z.ZodEnum<{
|
|
255
|
+
locked: "locked";
|
|
256
|
+
dismissed: "dismissed";
|
|
257
|
+
deleted: "deleted";
|
|
258
|
+
}>>;
|
|
259
|
+
resolvedBy: z.ZodNullable<z.ZodString>;
|
|
260
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
261
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
262
|
+
}, z.core.$strict>>;
|
|
263
|
+
chat: z.ZodObject<{
|
|
264
|
+
orgId: z.ZodString;
|
|
265
|
+
id: z.ZodString;
|
|
266
|
+
communityId: z.ZodString;
|
|
267
|
+
kind: z.ZodEnum<{
|
|
268
|
+
direct: "direct";
|
|
269
|
+
group: "group";
|
|
270
|
+
}>;
|
|
271
|
+
status: z.ZodEnum<{
|
|
272
|
+
pending: "pending";
|
|
273
|
+
open: "open";
|
|
274
|
+
closed: "closed";
|
|
275
|
+
}>;
|
|
276
|
+
createdBy: z.ZodNullable<z.ZodString>;
|
|
277
|
+
lockedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
278
|
+
lockedBy: z.ZodNullable<z.ZodString>;
|
|
279
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
280
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
281
|
+
}, z.core.$strict>;
|
|
282
|
+
participantIds: z.ZodArray<z.ZodString>;
|
|
283
|
+
}, z.core.$strip>;
|
|
284
|
+
declare const MessageQueue: z.ZodObject<{
|
|
285
|
+
entries: z.ZodArray<z.ZodObject<{
|
|
286
|
+
message: z.ZodObject<{
|
|
287
|
+
orgId: z.ZodString;
|
|
288
|
+
id: z.ZodString;
|
|
289
|
+
communityId: z.ZodString;
|
|
290
|
+
chatId: z.ZodString;
|
|
291
|
+
orgUserId: z.ZodString;
|
|
292
|
+
body: z.ZodString;
|
|
293
|
+
replyToId: z.ZodNullable<z.ZodString>;
|
|
294
|
+
editedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
295
|
+
deletedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
296
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
297
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
298
|
+
sender: z.ZodObject<{
|
|
299
|
+
id: z.ZodString;
|
|
300
|
+
firstName: z.ZodNullable<z.ZodString>;
|
|
301
|
+
lastName: z.ZodNullable<z.ZodString>;
|
|
302
|
+
displayName: z.ZodNullable<z.ZodString>;
|
|
303
|
+
headline: z.ZodNullable<z.ZodString>;
|
|
304
|
+
image: z.ZodNullable<z.ZodString>;
|
|
305
|
+
imageAssetId: z.ZodNullable<z.ZodString>;
|
|
306
|
+
imageUrl: z.ZodNullable<z.ZodString>;
|
|
307
|
+
role: z.ZodEnum<{
|
|
308
|
+
owner: "owner";
|
|
309
|
+
admin: "admin";
|
|
310
|
+
instructor: "instructor";
|
|
311
|
+
moderator: "moderator";
|
|
312
|
+
student: "student";
|
|
313
|
+
}>;
|
|
314
|
+
}, z.core.$strict>;
|
|
315
|
+
attachments: z.ZodArray<z.ZodObject<{
|
|
316
|
+
assetId: z.ZodString;
|
|
317
|
+
url: z.ZodString;
|
|
318
|
+
}, z.core.$strict>>;
|
|
319
|
+
reactions: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
320
|
+
viewerReaction: z.ZodNullable<z.ZodString>;
|
|
321
|
+
mentions: z.ZodArray<z.ZodObject<{
|
|
322
|
+
orgUserId: z.ZodString;
|
|
323
|
+
name: z.ZodString;
|
|
324
|
+
}, z.core.$strict>>;
|
|
325
|
+
}, z.core.$strict>;
|
|
326
|
+
flags: z.ZodArray<z.ZodObject<{
|
|
327
|
+
orgId: z.ZodString;
|
|
328
|
+
id: z.ZodString;
|
|
329
|
+
communityId: z.ZodString;
|
|
330
|
+
messageId: z.ZodString;
|
|
331
|
+
orgUserId: z.ZodString;
|
|
332
|
+
reason: z.ZodString;
|
|
333
|
+
resolvedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
334
|
+
resolution: z.ZodNullable<z.ZodEnum<{
|
|
335
|
+
locked: "locked";
|
|
336
|
+
dismissed: "dismissed";
|
|
337
|
+
deleted: "deleted";
|
|
338
|
+
}>>;
|
|
339
|
+
resolvedBy: z.ZodNullable<z.ZodString>;
|
|
340
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
341
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
342
|
+
}, z.core.$strict>>;
|
|
343
|
+
chat: z.ZodObject<{
|
|
344
|
+
orgId: z.ZodString;
|
|
345
|
+
id: z.ZodString;
|
|
346
|
+
communityId: z.ZodString;
|
|
347
|
+
kind: z.ZodEnum<{
|
|
348
|
+
direct: "direct";
|
|
349
|
+
group: "group";
|
|
350
|
+
}>;
|
|
351
|
+
status: z.ZodEnum<{
|
|
352
|
+
pending: "pending";
|
|
353
|
+
open: "open";
|
|
354
|
+
closed: "closed";
|
|
355
|
+
}>;
|
|
356
|
+
createdBy: z.ZodNullable<z.ZodString>;
|
|
357
|
+
lockedAt: z.ZodNullable<z.ZodCoercedDate<unknown>>;
|
|
358
|
+
lockedBy: z.ZodNullable<z.ZodString>;
|
|
359
|
+
createdAt: z.ZodCoercedDate<unknown>;
|
|
360
|
+
updatedAt: z.ZodCoercedDate<unknown>;
|
|
361
|
+
}, z.core.$strict>;
|
|
362
|
+
participantIds: z.ZodArray<z.ZodString>;
|
|
363
|
+
}, z.core.$strip>>;
|
|
364
|
+
}, z.core.$strip>;
|
|
365
|
+
declare const StartDirectChat: z.ZodObject<{
|
|
366
|
+
communityId: z.ZodString;
|
|
367
|
+
orgUserId: z.ZodString;
|
|
368
|
+
body: z.ZodNullable<z.ZodString>;
|
|
369
|
+
assetIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
370
|
+
}, z.core.$strict>;
|
|
371
|
+
declare const StartGroupChat: z.ZodObject<{
|
|
372
|
+
communityId: z.ZodString;
|
|
373
|
+
orgUserIds: z.ZodArray<z.ZodString>;
|
|
374
|
+
}, z.core.$strict>;
|
|
375
|
+
declare const SendMessage: z.ZodObject<{
|
|
376
|
+
body: z.ZodString;
|
|
377
|
+
replyToId: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
378
|
+
assetIds: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
379
|
+
}, z.core.$strict>;
|
|
380
|
+
declare const EditMessage: z.ZodObject<{
|
|
381
|
+
body: z.ZodString;
|
|
382
|
+
}, z.core.$strict>;
|
|
383
|
+
declare const MarkRead: z.ZodObject<{
|
|
384
|
+
messageId: z.ZodString;
|
|
385
|
+
}, z.core.$strict>;
|
|
386
|
+
declare const OrgUserBody: z.ZodObject<{
|
|
387
|
+
orgUserId: z.ZodString;
|
|
388
|
+
}, z.core.$strict>;
|
|
389
|
+
declare const ResolveMessageFlags: z.ZodObject<{
|
|
390
|
+
resolution: z.ZodEnum<{
|
|
391
|
+
dismissed: "dismissed";
|
|
392
|
+
}>;
|
|
393
|
+
}, z.core.$strict>;
|
|
394
|
+
declare const ChatIdParam: z.ZodObject<{
|
|
395
|
+
chatId: z.ZodString;
|
|
396
|
+
}, z.core.$strip>;
|
|
397
|
+
declare const MessageIdParam: z.ZodObject<{
|
|
398
|
+
messageId: z.ZodString;
|
|
399
|
+
}, z.core.$strip>;
|
|
400
|
+
declare const CommunityParam: z.ZodObject<{
|
|
401
|
+
communityId: z.ZodString;
|
|
402
|
+
}, z.core.$strip>;
|
|
403
|
+
declare const BlockParam: z.ZodObject<{
|
|
404
|
+
communityId: z.ZodString;
|
|
405
|
+
orgUserId: z.ZodString;
|
|
406
|
+
}, z.core.$strip>;
|
|
407
|
+
//#endregion
|
|
408
|
+
export { BlockParam, Chat, ChatIdParam, ChatListItem, ChatsPage, CommunityParam, EditMessage, MarkRead, MessageFlag, MessageIdParam, MessageQueue, MessageQueueEntry, MessageView, MessagesPage, OrgUserBody, ResolveMessageFlags, SendMessage, StartDirectChat, StartGroupChat };
|
|
409
|
+
//# sourceMappingURL=chats.d.ts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { paginated } from "./shared.js";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { chatLastMessageSchema, chatSchema, idSchema, messageFlagResolutionSchema, messageFlagSchema, messageViewSchema, subscriptionViewSchema } from "@headless-lms/core/schemas";
|
|
4
|
+
//#region src/http/schemas/chats.ts
|
|
5
|
+
const Chat = chatSchema;
|
|
6
|
+
const MessageFlag = messageFlagSchema;
|
|
7
|
+
const MessageView = messageViewSchema;
|
|
8
|
+
const MessagesPage = paginated(MessageView);
|
|
9
|
+
const ChatListItem = z.object({
|
|
10
|
+
chat: Chat,
|
|
11
|
+
participantIds: z.array(z.string()),
|
|
12
|
+
lastReadMessageId: z.string().nullable(),
|
|
13
|
+
subscription: subscriptionViewSchema.nullable().describe("Your mute on this chat while it applies; null when none"),
|
|
14
|
+
unread: z.number().int(),
|
|
15
|
+
lastMessage: chatLastMessageSchema.nullable()
|
|
16
|
+
});
|
|
17
|
+
const ChatsPage = paginated(ChatListItem);
|
|
18
|
+
const MessageQueueEntry = z.object({
|
|
19
|
+
message: MessageView,
|
|
20
|
+
flags: z.array(MessageFlag),
|
|
21
|
+
chat: Chat,
|
|
22
|
+
participantIds: z.array(z.string())
|
|
23
|
+
});
|
|
24
|
+
const MessageQueue = z.object({ entries: z.array(MessageQueueEntry) });
|
|
25
|
+
const MessageBody = z.string().trim().min(1).max(1e4);
|
|
26
|
+
const Attachments = z.array(idSchema).max(10).default([]).describe("Up to 10 finalized images you uploaded through `requestMemberUpload`");
|
|
27
|
+
const StartDirectChat = z.object({
|
|
28
|
+
communityId: idSchema,
|
|
29
|
+
orgUserId: idSchema.describe("The person to talk to"),
|
|
30
|
+
body: MessageBody.nullable().describe("The first message. Null opens the chat without one; a new chat that starts as a message request needs one, and attachments need one."),
|
|
31
|
+
assetIds: Attachments
|
|
32
|
+
}).strict();
|
|
33
|
+
const StartGroupChat = z.object({
|
|
34
|
+
communityId: idSchema,
|
|
35
|
+
orgUserIds: z.array(idSchema).min(2).max(99).describe("The people to add besides you. The chat may not exceed the community's group size.")
|
|
36
|
+
}).strict();
|
|
37
|
+
const SendMessage = z.object({
|
|
38
|
+
body: MessageBody,
|
|
39
|
+
replyToId: idSchema.nullable().default(null).describe("A message in the same chat this one answers"),
|
|
40
|
+
assetIds: Attachments
|
|
41
|
+
}).strict();
|
|
42
|
+
const EditMessage = z.object({ body: MessageBody }).strict();
|
|
43
|
+
const MarkRead = z.object({ messageId: idSchema.describe("The newest message you have read in this chat") }).strict();
|
|
44
|
+
const OrgUserBody = z.object({ orgUserId: idSchema }).strict();
|
|
45
|
+
const ResolveMessageFlags = z.object({ resolution: messageFlagResolutionSchema.extract(["dismissed"]).describe("`dismissed` closes the open flags and leaves the message up. Deleting the message or locking the chat resolves its flags as `deleted` or `locked` instead.") }).strict();
|
|
46
|
+
const ChatIdParam = z.object({ chatId: z.string() });
|
|
47
|
+
const MessageIdParam = z.object({ messageId: z.string() });
|
|
48
|
+
const CommunityParam = z.object({ communityId: z.string() });
|
|
49
|
+
const BlockParam = z.object({
|
|
50
|
+
communityId: z.string(),
|
|
51
|
+
orgUserId: z.string()
|
|
52
|
+
});
|
|
53
|
+
//#endregion
|
|
54
|
+
export { BlockParam, Chat, ChatIdParam, ChatListItem, ChatsPage, CommunityParam, EditMessage, MarkRead, MessageFlag, MessageIdParam, MessageQueue, MessageQueueEntry, MessageView, MessagesPage, OrgUserBody, ResolveMessageFlags, SendMessage, StartDirectChat, StartGroupChat };
|
|
55
|
+
|
|
56
|
+
//# sourceMappingURL=chats.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chats.js","names":[],"sources":["../../../src/http/schemas/chats.ts"],"sourcesContent":["import { z } from 'zod';\nimport {\n chatLastMessageSchema,\n chatSchema,\n idSchema,\n messageFlagResolutionSchema,\n messageFlagSchema,\n messageViewSchema,\n subscriptionViewSchema,\n} from '@headless-lms/core/schemas';\nimport { paginated } from './shared.js';\n\nexport const Chat = chatSchema;\nexport const MessageFlag = messageFlagSchema;\nexport const MessageView = messageViewSchema;\nexport const MessagesPage = paginated(MessageView);\n\nexport const ChatListItem = z.object({\n chat: Chat,\n participantIds: z.array(z.string()),\n lastReadMessageId: z.string().nullable(),\n subscription: subscriptionViewSchema\n .nullable()\n .describe('Your mute on this chat while it applies; null when none'),\n unread: z.number().int(),\n lastMessage: chatLastMessageSchema.nullable(),\n});\nexport const ChatsPage = paginated(ChatListItem);\n\nexport const MessageQueueEntry = z.object({\n message: MessageView,\n flags: z.array(MessageFlag),\n chat: Chat,\n participantIds: z.array(z.string()),\n});\n\nexport const MessageQueue = z.object({\n entries: z.array(MessageQueueEntry),\n});\n\nconst MessageBody = z.string().trim().min(1).max(10_000);\nconst Attachments = z\n .array(idSchema)\n .max(10)\n .default([])\n .describe('Up to 10 finalized images you uploaded through `requestMemberUpload`');\n\nexport const StartDirectChat = z\n .object({\n communityId: idSchema,\n orgUserId: idSchema.describe('The person to talk to'),\n body: MessageBody.nullable().describe(\n 'The first message. Null opens the chat without one; a new chat that starts as a message request needs one, and attachments need one.',\n ),\n assetIds: Attachments,\n })\n .strict();\n\nexport const StartGroupChat = z\n .object({\n communityId: idSchema,\n orgUserIds: z\n .array(idSchema)\n .min(2)\n .max(99)\n .describe(\n \"The people to add besides you. The chat may not exceed the community's group size.\",\n ),\n })\n .strict();\n\nexport const SendMessage = z\n .object({\n body: MessageBody,\n replyToId: idSchema\n .nullable()\n .default(null)\n .describe('A message in the same chat this one answers'),\n assetIds: Attachments,\n })\n .strict();\n\nexport const EditMessage = z.object({ body: MessageBody }).strict();\nexport const MarkRead = z\n .object({ messageId: idSchema.describe('The newest message you have read in this chat') })\n .strict();\nexport const OrgUserBody = z.object({ orgUserId: idSchema }).strict();\nexport const ResolveMessageFlags = z\n .object({\n resolution: messageFlagResolutionSchema\n .extract(['dismissed'])\n .describe(\n '`dismissed` closes the open flags and leaves the message up. Deleting the message or locking the chat resolves its flags as `deleted` or `locked` instead.',\n ),\n })\n .strict();\n\nexport const ChatIdParam = z.object({ chatId: z.string() });\nexport const MessageIdParam = z.object({ messageId: z.string() });\nexport const CommunityParam = z.object({ communityId: z.string() });\nexport const BlockParam = z.object({ communityId: z.string(), orgUserId: z.string() });\n"],"mappings":";;;;AAYA,MAAa,OAAO;AACpB,MAAa,cAAc;AAC3B,MAAa,cAAc;AAC3B,MAAa,eAAe,UAAU,WAAW;AAEjD,MAAa,eAAe,EAAE,OAAO;CACnC,MAAM;CACN,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAC;CAClC,mBAAmB,EAAE,OAAO,CAAC,CAAC,SAAS;CACvC,cAAc,uBACX,SAAS,CAAC,CACV,SAAS,yDAAyD;CACrE,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI;CACvB,aAAa,sBAAsB,SAAS;AAC9C,CAAC;AACD,MAAa,YAAY,UAAU,YAAY;AAE/C,MAAa,oBAAoB,EAAE,OAAO;CACxC,SAAS;CACT,OAAO,EAAE,MAAM,WAAW;CAC1B,MAAM;CACN,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAC;AACpC,CAAC;AAED,MAAa,eAAe,EAAE,OAAO,EACnC,SAAS,EAAE,MAAM,iBAAiB,EACpC,CAAC;AAED,MAAM,cAAc,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAM;AACvD,MAAM,cAAc,EACjB,MAAM,QAAQ,CAAC,CACf,IAAI,EAAE,CAAC,CACP,QAAQ,CAAC,CAAC,CAAC,CACX,SAAS,sEAAsE;AAElF,MAAa,kBAAkB,EAC5B,OAAO;CACN,aAAa;CACb,WAAW,SAAS,SAAS,uBAAuB;CACpD,MAAM,YAAY,SAAS,CAAC,CAAC,SAC3B,sIACF;CACA,UAAU;AACZ,CAAC,CAAC,CACD,OAAO;AAEV,MAAa,iBAAiB,EAC3B,OAAO;CACN,aAAa;CACb,YAAY,EACT,MAAM,QAAQ,CAAC,CACf,IAAI,CAAC,CAAC,CACN,IAAI,EAAE,CAAC,CACP,SACC,oFACF;AACJ,CAAC,CAAC,CACD,OAAO;AAEV,MAAa,cAAc,EACxB,OAAO;CACN,MAAM;CACN,WAAW,SACR,SAAS,CAAC,CACV,QAAQ,IAAI,CAAC,CACb,SAAS,6CAA6C;CACzD,UAAU;AACZ,CAAC,CAAC,CACD,OAAO;AAEV,MAAa,cAAc,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC,CAAC,CAAC,OAAO;AAClE,MAAa,WAAW,EACrB,OAAO,EAAE,WAAW,SAAS,SAAS,+CAA+C,EAAE,CAAC,CAAC,CACzF,OAAO;AACV,MAAa,cAAc,EAAE,OAAO,EAAE,WAAW,SAAS,CAAC,CAAC,CAAC,OAAO;AACpE,MAAa,sBAAsB,EAChC,OAAO,EACN,YAAY,4BACT,QAAQ,CAAC,WAAW,CAAC,CAAC,CACtB,SACC,4JACF,EACJ,CAAC,CAAC,CACD,OAAO;AAEV,MAAa,cAAc,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;AAC1D,MAAa,iBAAiB,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,CAAC;AAChE,MAAa,iBAAiB,EAAE,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,CAAC;AAClE,MAAa,aAAa,EAAE,OAAO;CAAE,aAAa,EAAE,OAAO;CAAG,WAAW,EAAE,OAAO;AAAE,CAAC"}
|