happy2 0.0.5
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 +82 -0
- package/package.json +74 -0
- package/packages/happy2-server/Dockerfile +18 -0
- package/packages/happy2-server/README.md +418 -0
- package/packages/happy2-server/bin/happy2.js +3 -0
- package/packages/happy2-server/dist/cli.d.ts +3 -0
- package/packages/happy2-server/dist/cli.d.ts.map +1 -0
- package/packages/happy2-server/dist/cli.js +44 -0
- package/packages/happy2-server/dist/cli.js.map +1 -0
- package/packages/happy2-server/dist/index.d.ts +24 -0
- package/packages/happy2-server/dist/index.d.ts.map +1 -0
- package/packages/happy2-server/dist/index.js +22 -0
- package/packages/happy2-server/dist/index.js.map +1 -0
- package/packages/happy2-server/dist/modules/agents/builtin-images.d.ts +8 -0
- package/packages/happy2-server/dist/modules/agents/builtin-images.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agents/builtin-images.js +283 -0
- package/packages/happy2-server/dist/modules/agents/builtin-images.js.map +1 -0
- package/packages/happy2-server/dist/modules/agents/command.d.ts +3 -0
- package/packages/happy2-server/dist/modules/agents/command.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agents/command.js +7 -0
- package/packages/happy2-server/dist/modules/agents/command.js.map +1 -0
- package/packages/happy2-server/dist/modules/agents/daemon.d.ts +106 -0
- package/packages/happy2-server/dist/modules/agents/daemon.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agents/daemon.js +522 -0
- package/packages/happy2-server/dist/modules/agents/daemon.js.map +1 -0
- package/packages/happy2-server/dist/modules/agents/docker.d.ts +51 -0
- package/packages/happy2-server/dist/modules/agents/docker.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agents/docker.js +256 -0
- package/packages/happy2-server/dist/modules/agents/docker.js.map +1 -0
- package/packages/happy2-server/dist/modules/agents/docker.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/agents/docker.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agents/docker.test.js +155 -0
- package/packages/happy2-server/dist/modules/agents/docker.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/agents/index.d.ts +5 -0
- package/packages/happy2-server/dist/modules/agents/index.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agents/index.js +4 -0
- package/packages/happy2-server/dist/modules/agents/index.js.map +1 -0
- package/packages/happy2-server/dist/modules/agents/service.d.ts +140 -0
- package/packages/happy2-server/dist/modules/agents/service.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/agents/service.js +1283 -0
- package/packages/happy2-server/dist/modules/agents/service.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/cloudflare-access.d.ts +15 -0
- package/packages/happy2-server/dist/modules/auth/cloudflare-access.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/cloudflare-access.js +49 -0
- package/packages/happy2-server/dist/modules/auth/cloudflare-access.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/crypto.d.ts +4 -0
- package/packages/happy2-server/dist/modules/auth/crypto.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/crypto.js +31 -0
- package/packages/happy2-server/dist/modules/auth/crypto.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/crypto.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/auth/crypto.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/crypto.test.js +11 -0
- package/packages/happy2-server/dist/modules/auth/crypto.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/email.d.ts +3 -0
- package/packages/happy2-server/dist/modules/auth/email.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/email.js +22 -0
- package/packages/happy2-server/dist/modules/auth/email.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/metadata.d.ts +5 -0
- package/packages/happy2-server/dist/modules/auth/metadata.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/metadata.js +28 -0
- package/packages/happy2-server/dist/modules/auth/metadata.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/metadata.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/auth/metadata.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/metadata.test.js +10 -0
- package/packages/happy2-server/dist/modules/auth/metadata.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/methods.d.ts +10 -0
- package/packages/happy2-server/dist/modules/auth/methods.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/methods.js +21 -0
- package/packages/happy2-server/dist/modules/auth/methods.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/methods.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/auth/methods.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/methods.test.js +16 -0
- package/packages/happy2-server/dist/modules/auth/methods.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/oidc.d.ts +9 -0
- package/packages/happy2-server/dist/modules/auth/oidc.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/oidc.js +68 -0
- package/packages/happy2-server/dist/modules/auth/oidc.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/service.d.ts +44 -0
- package/packages/happy2-server/dist/modules/auth/service.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/service.js +208 -0
- package/packages/happy2-server/dist/modules/auth/service.js.map +1 -0
- package/packages/happy2-server/dist/modules/auth/tokens.d.ts +21 -0
- package/packages/happy2-server/dist/modules/auth/tokens.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/auth/tokens.js +79 -0
- package/packages/happy2-server/dist/modules/auth/tokens.js.map +1 -0
- package/packages/happy2-server/dist/modules/automation/repository.d.ts +127 -0
- package/packages/happy2-server/dist/modules/automation/repository.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/automation/repository.js +821 -0
- package/packages/happy2-server/dist/modules/automation/repository.js.map +1 -0
- package/packages/happy2-server/dist/modules/collaboration/repository.d.ts +839 -0
- package/packages/happy2-server/dist/modules/collaboration/repository.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/collaboration/repository.js +5795 -0
- package/packages/happy2-server/dist/modules/collaboration/repository.js.map +1 -0
- package/packages/happy2-server/dist/modules/collaboration/repository.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/collaboration/repository.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/collaboration/repository.test.js +620 -0
- package/packages/happy2-server/dist/modules/collaboration/repository.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/collaboration/types.d.ts +243 -0
- package/packages/happy2-server/dist/modules/collaboration/types.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/collaboration/types.js +8 -0
- package/packages/happy2-server/dist/modules/collaboration/types.js.map +1 -0
- package/packages/happy2-server/dist/modules/config/defaults.d.ts +8 -0
- package/packages/happy2-server/dist/modules/config/defaults.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/config/defaults.js +70 -0
- package/packages/happy2-server/dist/modules/config/defaults.js.map +1 -0
- package/packages/happy2-server/dist/modules/config/defaults.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/config/defaults.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/config/defaults.test.js +27 -0
- package/packages/happy2-server/dist/modules/config/defaults.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/config/environment.d.ts +4 -0
- package/packages/happy2-server/dist/modules/config/environment.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/config/environment.js +92 -0
- package/packages/happy2-server/dist/modules/config/environment.js.map +1 -0
- package/packages/happy2-server/dist/modules/config/loader.d.ts +5 -0
- package/packages/happy2-server/dist/modules/config/loader.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/config/loader.js +251 -0
- package/packages/happy2-server/dist/modules/config/loader.js.map +1 -0
- package/packages/happy2-server/dist/modules/config/loader.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/config/loader.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/config/loader.test.js +108 -0
- package/packages/happy2-server/dist/modules/config/loader.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/config/paths.d.ts +7 -0
- package/packages/happy2-server/dist/modules/config/paths.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/config/paths.js +15 -0
- package/packages/happy2-server/dist/modules/config/paths.js.map +1 -0
- package/packages/happy2-server/dist/modules/config/paths.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/config/paths.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/config/paths.test.js +22 -0
- package/packages/happy2-server/dist/modules/config/paths.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/config/runtime.d.ts +6 -0
- package/packages/happy2-server/dist/modules/config/runtime.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/config/runtime.js +14 -0
- package/packages/happy2-server/dist/modules/config/runtime.js.map +1 -0
- package/packages/happy2-server/dist/modules/config/type.d.ts +88 -0
- package/packages/happy2-server/dist/modules/config/type.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/config/type.js +2 -0
- package/packages/happy2-server/dist/modules/config/type.js.map +1 -0
- package/packages/happy2-server/dist/modules/database.d.ts +105 -0
- package/packages/happy2-server/dist/modules/database.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/database.js +583 -0
- package/packages/happy2-server/dist/modules/database.js.map +1 -0
- package/packages/happy2-server/dist/modules/drizzle.d.ts +11 -0
- package/packages/happy2-server/dist/modules/drizzle.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/drizzle.js +31 -0
- package/packages/happy2-server/dist/modules/drizzle.js.map +1 -0
- package/packages/happy2-server/dist/modules/files/lock.d.ts +3 -0
- package/packages/happy2-server/dist/modules/files/lock.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/files/lock.js +83 -0
- package/packages/happy2-server/dist/modules/files/lock.js.map +1 -0
- package/packages/happy2-server/dist/modules/files/media.d.ts +18 -0
- package/packages/happy2-server/dist/modules/files/media.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/files/media.js +352 -0
- package/packages/happy2-server/dist/modules/files/media.js.map +1 -0
- package/packages/happy2-server/dist/modules/files/provider.d.ts +130 -0
- package/packages/happy2-server/dist/modules/files/provider.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/files/provider.js +448 -0
- package/packages/happy2-server/dist/modules/files/provider.js.map +1 -0
- package/packages/happy2-server/dist/modules/files/quota.d.ts +58 -0
- package/packages/happy2-server/dist/modules/files/quota.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/files/quota.js +180 -0
- package/packages/happy2-server/dist/modules/files/quota.js.map +1 -0
- package/packages/happy2-server/dist/modules/files/routes.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/files/routes.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/files/routes.test.js +163 -0
- package/packages/happy2-server/dist/modules/files/routes.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/files/scanner.d.ts +27 -0
- package/packages/happy2-server/dist/modules/files/scanner.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/files/scanner.js +66 -0
- package/packages/happy2-server/dist/modules/files/scanner.js.map +1 -0
- package/packages/happy2-server/dist/modules/files/storage.d.ts +95 -0
- package/packages/happy2-server/dist/modules/files/storage.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/files/storage.js +855 -0
- package/packages/happy2-server/dist/modules/files/storage.js.map +1 -0
- package/packages/happy2-server/dist/modules/files/storage.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/files/storage.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/files/storage.test.js +170 -0
- package/packages/happy2-server/dist/modules/files/storage.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/index.d.ts +6 -0
- package/packages/happy2-server/dist/modules/integrations/index.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/index.js +6 -0
- package/packages/happy2-server/dist/modules/integrations/index.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/repository.d.ts +136 -0
- package/packages/happy2-server/dist/modules/integrations/repository.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/repository.js +1229 -0
- package/packages/happy2-server/dist/modules/integrations/repository.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/repository.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/integrations/repository.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/repository.test.js +345 -0
- package/packages/happy2-server/dist/modules/integrations/repository.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/routes.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/integrations/routes.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/routes.test.js +161 -0
- package/packages/happy2-server/dist/modules/integrations/routes.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/secrets.d.ts +19 -0
- package/packages/happy2-server/dist/modules/integrations/secrets.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/secrets.js +69 -0
- package/packages/happy2-server/dist/modules/integrations/secrets.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/ssrf.d.ts +32 -0
- package/packages/happy2-server/dist/modules/integrations/ssrf.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/ssrf.js +185 -0
- package/packages/happy2-server/dist/modules/integrations/ssrf.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/ssrf.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/integrations/ssrf.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/ssrf.test.js +56 -0
- package/packages/happy2-server/dist/modules/integrations/ssrf.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/transport.d.ts +21 -0
- package/packages/happy2-server/dist/modules/integrations/transport.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/transport.js +108 -0
- package/packages/happy2-server/dist/modules/integrations/transport.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/transport.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/integrations/transport.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/transport.test.js +66 -0
- package/packages/happy2-server/dist/modules/integrations/transport.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/types.d.ts +155 -0
- package/packages/happy2-server/dist/modules/integrations/types.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/integrations/types.js +26 -0
- package/packages/happy2-server/dist/modules/integrations/types.js.map +1 -0
- package/packages/happy2-server/dist/modules/operations/export-worker.d.ts +16 -0
- package/packages/happy2-server/dist/modules/operations/export-worker.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/operations/export-worker.js +56 -0
- package/packages/happy2-server/dist/modules/operations/export-worker.js.map +1 -0
- package/packages/happy2-server/dist/modules/operations/repository.d.ts +215 -0
- package/packages/happy2-server/dist/modules/operations/repository.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/operations/repository.js +2011 -0
- package/packages/happy2-server/dist/modules/operations/repository.js.map +1 -0
- package/packages/happy2-server/dist/modules/operations/repository.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/operations/repository.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/operations/repository.test.js +610 -0
- package/packages/happy2-server/dist/modules/operations/repository.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/operations/types.d.ts +144 -0
- package/packages/happy2-server/dist/modules/operations/types.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/operations/types.js +9 -0
- package/packages/happy2-server/dist/modules/operations/types.js.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/events.d.ts +99 -0
- package/packages/happy2-server/dist/modules/realtime/events.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/events.js +173 -0
- package/packages/happy2-server/dist/modules/realtime/events.js.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/index.d.ts +4 -0
- package/packages/happy2-server/dist/modules/realtime/index.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/index.js +4 -0
- package/packages/happy2-server/dist/modules/realtime/index.js.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/local.d.ts +37 -0
- package/packages/happy2-server/dist/modules/realtime/local.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/local.js +181 -0
- package/packages/happy2-server/dist/modules/realtime/local.js.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/local.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/realtime/local.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/local.test.js +186 -0
- package/packages/happy2-server/dist/modules/realtime/local.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/pubsub.d.ts +26 -0
- package/packages/happy2-server/dist/modules/realtime/pubsub.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/realtime/pubsub.js +7 -0
- package/packages/happy2-server/dist/modules/realtime/pubsub.js.map +1 -0
- package/packages/happy2-server/dist/modules/request/database-idempotency.d.ts +15 -0
- package/packages/happy2-server/dist/modules/request/database-idempotency.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/request/database-idempotency.js +141 -0
- package/packages/happy2-server/dist/modules/request/database-idempotency.js.map +1 -0
- package/packages/happy2-server/dist/modules/request/idempotency-hook.d.ts +12 -0
- package/packages/happy2-server/dist/modules/request/idempotency-hook.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/request/idempotency-hook.js +98 -0
- package/packages/happy2-server/dist/modules/request/idempotency-hook.js.map +1 -0
- package/packages/happy2-server/dist/modules/request/idempotency.d.ts +146 -0
- package/packages/happy2-server/dist/modules/request/idempotency.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/request/idempotency.js +312 -0
- package/packages/happy2-server/dist/modules/request/idempotency.js.map +1 -0
- package/packages/happy2-server/dist/modules/request/idempotency.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/request/idempotency.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/request/idempotency.test.js +191 -0
- package/packages/happy2-server/dist/modules/request/idempotency.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/request/index.d.ts +5 -0
- package/packages/happy2-server/dist/modules/request/index.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/request/index.js +5 -0
- package/packages/happy2-server/dist/modules/request/index.js.map +1 -0
- package/packages/happy2-server/dist/modules/request/rate-limit.d.ts +100 -0
- package/packages/happy2-server/dist/modules/request/rate-limit.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/request/rate-limit.js +239 -0
- package/packages/happy2-server/dist/modules/request/rate-limit.js.map +1 -0
- package/packages/happy2-server/dist/modules/request/rate-limit.test.d.ts +2 -0
- package/packages/happy2-server/dist/modules/request/rate-limit.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/request/rate-limit.test.js +123 -0
- package/packages/happy2-server/dist/modules/request/rate-limit.test.js.map +1 -0
- package/packages/happy2-server/dist/modules/schema.d.ts +31454 -0
- package/packages/happy2-server/dist/modules/schema.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/schema.js +1081 -0
- package/packages/happy2-server/dist/modules/schema.js.map +1 -0
- package/packages/happy2-server/dist/modules/workspace/index.d.ts +3 -0
- package/packages/happy2-server/dist/modules/workspace/index.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/workspace/index.js +3 -0
- package/packages/happy2-server/dist/modules/workspace/index.js.map +1 -0
- package/packages/happy2-server/dist/modules/workspace/service.d.ts +54 -0
- package/packages/happy2-server/dist/modules/workspace/service.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/workspace/service.js +997 -0
- package/packages/happy2-server/dist/modules/workspace/service.js.map +1 -0
- package/packages/happy2-server/dist/modules/workspace/types.d.ts +58 -0
- package/packages/happy2-server/dist/modules/workspace/types.d.ts.map +1 -0
- package/packages/happy2-server/dist/modules/workspace/types.js +11 -0
- package/packages/happy2-server/dist/modules/workspace/types.js.map +1 -0
- package/packages/happy2-server/dist/routes/agents.d.ts +5 -0
- package/packages/happy2-server/dist/routes/agents.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/agents.js +225 -0
- package/packages/happy2-server/dist/routes/agents.js.map +1 -0
- package/packages/happy2-server/dist/routes/auth.d.ts +5 -0
- package/packages/happy2-server/dist/routes/auth.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/auth.js +128 -0
- package/packages/happy2-server/dist/routes/auth.js.map +1 -0
- package/packages/happy2-server/dist/routes/automation.d.ts +6 -0
- package/packages/happy2-server/dist/routes/automation.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/automation.js +315 -0
- package/packages/happy2-server/dist/routes/automation.js.map +1 -0
- package/packages/happy2-server/dist/routes/basic.d.ts +3 -0
- package/packages/happy2-server/dist/routes/basic.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/basic.js +5 -0
- package/packages/happy2-server/dist/routes/basic.js.map +1 -0
- package/packages/happy2-server/dist/routes/collaboration.d.ts +7 -0
- package/packages/happy2-server/dist/routes/collaboration.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/collaboration.js +1285 -0
- package/packages/happy2-server/dist/routes/collaboration.js.map +1 -0
- package/packages/happy2-server/dist/routes/files.d.ts +9 -0
- package/packages/happy2-server/dist/routes/files.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/files.js +397 -0
- package/packages/happy2-server/dist/routes/files.js.map +1 -0
- package/packages/happy2-server/dist/routes/integrations.d.ts +6 -0
- package/packages/happy2-server/dist/routes/integrations.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/integrations.js +486 -0
- package/packages/happy2-server/dist/routes/integrations.js.map +1 -0
- package/packages/happy2-server/dist/routes/operations.d.ts +5 -0
- package/packages/happy2-server/dist/routes/operations.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/operations.js +588 -0
- package/packages/happy2-server/dist/routes/operations.js.map +1 -0
- package/packages/happy2-server/dist/routes/operations.test.d.ts +2 -0
- package/packages/happy2-server/dist/routes/operations.test.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/operations.test.js +106 -0
- package/packages/happy2-server/dist/routes/operations.test.js.map +1 -0
- package/packages/happy2-server/dist/routes/sync.d.ts +6 -0
- package/packages/happy2-server/dist/routes/sync.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/sync.js +549 -0
- package/packages/happy2-server/dist/routes/sync.js.map +1 -0
- package/packages/happy2-server/dist/routes/workspace.d.ts +5 -0
- package/packages/happy2-server/dist/routes/workspace.d.ts.map +1 -0
- package/packages/happy2-server/dist/routes/workspace.js +240 -0
- package/packages/happy2-server/dist/routes/workspace.js.map +1 -0
- package/packages/happy2-server/dist/runner.d.ts +3 -0
- package/packages/happy2-server/dist/runner.d.ts.map +1 -0
- package/packages/happy2-server/dist/runner.js +30 -0
- package/packages/happy2-server/dist/runner.js.map +1 -0
- package/packages/happy2-server/dist/server.d.ts +32 -0
- package/packages/happy2-server/dist/server.d.ts.map +1 -0
- package/packages/happy2-server/dist/server.js +284 -0
- package/packages/happy2-server/dist/server.js.map +1 -0
- package/packages/happy2-server/dist/standalone.d.ts +13 -0
- package/packages/happy2-server/dist/standalone.d.ts.map +1 -0
- package/packages/happy2-server/dist/standalone.js +99 -0
- package/packages/happy2-server/dist/standalone.js.map +1 -0
- package/packages/happy2-server/dist/web/assets/figtree-latin-wght-normal-D_ZTVpCC.woff2 +0 -0
- package/packages/happy2-server/dist/web/assets/happy-otter-Q2O_g-DT.png +0 -0
- package/packages/happy2-server/dist/web/assets/index-COvbX8JP.css +2 -0
- package/packages/happy2-server/dist/web/assets/index-DdpugxMO.js +57 -0
- package/packages/happy2-server/dist/web/assets/jetbrains-mono-latin-wght-normal-B9CIFXIH.woff2 +0 -0
- package/packages/happy2-server/dist/web/assets/onboarding-CRUpq9xl.png +0 -0
- package/packages/happy2-server/dist/web/index.html +13 -0
- package/packages/happy2-server/drizzle/0000_initial.sql +13 -0
- package/packages/happy2-server/drizzle/0001_accounts_profiles_files.sql +42 -0
- package/packages/happy2-server/drizzle/0002_file_visibility_and_uploader.sql +5 -0
- package/packages/happy2-server/drizzle/0003_collaboration.sql +565 -0
- package/packages/happy2-server/drizzle/0004_collaboration_expansion.sql +1099 -0
- package/packages/happy2-server/drizzle/0005_ai_agents.sql +85 -0
- package/packages/happy2-server/drizzle/0006_rig_global_event_queue.sql +10 -0
- package/packages/happy2-server/drizzle/0007_rename_server_identity.sql +3 -0
- package/packages/happy2-server/drizzle/0008_agent_message_streaming.sql +47 -0
- package/packages/happy2-server/drizzle/0009_chat_workspace_binding_lookup.sql +2 -0
- package/packages/happy2-server/drizzle/0010_rig_secret_assignments.sql +21 -0
- package/packages/happy2-server/drizzle/meta/_journal.json +83 -0
- package/packages/happy2-server/happy2.example.toml +104 -0
|
@@ -0,0 +1,839 @@
|
|
|
1
|
+
import { type Client } from "@libsql/client";
|
|
2
|
+
import type { FileKind } from "../database.js";
|
|
3
|
+
import { type ChatBookmarkSummary, type ChatPinSummary, type ChatRole, type ChatSummary, type CallSummary, type AdminUserSummary, type AgentImageDetails, type AgentImageSummary, type FileSummary, type MessageSummary, type MutationHint, type NotificationLevel, type NotificationSummary, type PresenceSettingsSummary, type SyncState, type ThreadSummary, type UserSummary } from "./types.js";
|
|
4
|
+
interface SendMessageRepositoryInput {
|
|
5
|
+
actorUserId: string;
|
|
6
|
+
chatId: string;
|
|
7
|
+
text: string;
|
|
8
|
+
attachmentFileIds?: string[];
|
|
9
|
+
quotedMessageId?: string;
|
|
10
|
+
threadRootMessageId?: string;
|
|
11
|
+
expiresAt?: string;
|
|
12
|
+
expiryMode?: "none" | "after_send" | "after_read";
|
|
13
|
+
selfDestructSeconds?: number;
|
|
14
|
+
afterReadScope?: "any_reader" | "all_readers";
|
|
15
|
+
clientMutationId?: string;
|
|
16
|
+
kind?: "user" | "automated";
|
|
17
|
+
senderBotId?: string;
|
|
18
|
+
forwardedFromMessageId?: string;
|
|
19
|
+
agentSessionId?: string;
|
|
20
|
+
agentTurn?: {
|
|
21
|
+
agentUserId: string;
|
|
22
|
+
sessionId: string;
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export interface RigEventCheckpoint {
|
|
26
|
+
cursor?: number;
|
|
27
|
+
eventsSinceTrim: number;
|
|
28
|
+
lastTrimmedAt: string;
|
|
29
|
+
trimmedThrough?: number;
|
|
30
|
+
}
|
|
31
|
+
export interface AgentChatContext {
|
|
32
|
+
agentUserId: string;
|
|
33
|
+
chatId: string;
|
|
34
|
+
image: AgentExecutionImage;
|
|
35
|
+
privateUserId: string;
|
|
36
|
+
binding?: {
|
|
37
|
+
containerName: string;
|
|
38
|
+
cwd: string;
|
|
39
|
+
sessionId: string;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export interface ChatWorkspaceBinding {
|
|
43
|
+
chatId: string;
|
|
44
|
+
cwd: string;
|
|
45
|
+
}
|
|
46
|
+
export interface AgentExecutionImage {
|
|
47
|
+
id: string;
|
|
48
|
+
dockerImageId: string;
|
|
49
|
+
dockerTag: string;
|
|
50
|
+
}
|
|
51
|
+
export interface AgentImageBuild {
|
|
52
|
+
buildContext?: string;
|
|
53
|
+
dockerfile: string;
|
|
54
|
+
id: string;
|
|
55
|
+
dockerTag: string;
|
|
56
|
+
}
|
|
57
|
+
export interface AgentSecretAssignment {
|
|
58
|
+
secretId: string;
|
|
59
|
+
agentUserIds: string[];
|
|
60
|
+
channelIds: string[];
|
|
61
|
+
}
|
|
62
|
+
export interface AgentSecretBinding {
|
|
63
|
+
agentUserId: string;
|
|
64
|
+
chatId: string;
|
|
65
|
+
secretIds: string[];
|
|
66
|
+
sessionId: string;
|
|
67
|
+
}
|
|
68
|
+
export declare class CollaborationRepository {
|
|
69
|
+
private readonly client;
|
|
70
|
+
private readonly db;
|
|
71
|
+
private readonly ownsClient;
|
|
72
|
+
constructor(source: string | Client, authToken?: string);
|
|
73
|
+
initialize(): Promise<void>;
|
|
74
|
+
close(): void;
|
|
75
|
+
/** Package-internal shared connection for transactional backend extensions. */
|
|
76
|
+
extensionClient(): Client;
|
|
77
|
+
getState(): Promise<SyncState>;
|
|
78
|
+
acknowledgeSyncConsumer(input: {
|
|
79
|
+
userId: string;
|
|
80
|
+
deviceId: string;
|
|
81
|
+
generation: string;
|
|
82
|
+
sequence: number;
|
|
83
|
+
}): Promise<void>;
|
|
84
|
+
compactSync(): Promise<{
|
|
85
|
+
minRecoverableSequence: string;
|
|
86
|
+
eventsDeleted: number;
|
|
87
|
+
mutationsDeleted: number;
|
|
88
|
+
chatUpdatesDeleted: number;
|
|
89
|
+
}>;
|
|
90
|
+
canAccessChat(userId: string, chatId: string): Promise<boolean>;
|
|
91
|
+
canAccessChatWorkspace(userId: string, chatId: string): Promise<boolean>;
|
|
92
|
+
getChatWorkspaceBinding(userId: string, chatId: string): Promise<ChatWorkspaceBinding>;
|
|
93
|
+
canPostToChat(userId: string, chatId: string): Promise<boolean>;
|
|
94
|
+
listChats(userId: string): Promise<ChatSummary[]>;
|
|
95
|
+
getChat(userId: string, chatId: string): Promise<ChatSummary>;
|
|
96
|
+
listChatMembers(userId: string, chatId: string): Promise<UserSummary[]>;
|
|
97
|
+
listChatMemberships(userId: string, chatId: string): Promise<Array<{
|
|
98
|
+
user: UserSummary;
|
|
99
|
+
role: ChatRole;
|
|
100
|
+
joinedAt: string;
|
|
101
|
+
}>>;
|
|
102
|
+
createChannel(input: {
|
|
103
|
+
actorUserId: string;
|
|
104
|
+
kind: "public_channel" | "private_channel";
|
|
105
|
+
name: string;
|
|
106
|
+
slug: string;
|
|
107
|
+
topic?: string;
|
|
108
|
+
}): Promise<{
|
|
109
|
+
chat: ChatSummary;
|
|
110
|
+
hint: MutationHint;
|
|
111
|
+
}>;
|
|
112
|
+
ensureAgentImageDefinitions(definitions: ReadonlyArray<{
|
|
113
|
+
buildContext: string;
|
|
114
|
+
builtinKey: "daycare-full" | "daycare-minimal";
|
|
115
|
+
definitionHash: string;
|
|
116
|
+
dockerTag: string;
|
|
117
|
+
dockerfile: string;
|
|
118
|
+
name: string;
|
|
119
|
+
}>): Promise<void>;
|
|
120
|
+
listAgentImages(actorUserId: string): Promise<{
|
|
121
|
+
defaultImageId?: string;
|
|
122
|
+
images: AgentImageSummary[];
|
|
123
|
+
}>;
|
|
124
|
+
getAgentImage(actorUserId: string, imageId: string): Promise<AgentImageDetails>;
|
|
125
|
+
createAgentImage(input: {
|
|
126
|
+
actorUserId: string;
|
|
127
|
+
definitionHash: string;
|
|
128
|
+
dockerTag: string;
|
|
129
|
+
dockerfile: string;
|
|
130
|
+
name: string;
|
|
131
|
+
}): Promise<{
|
|
132
|
+
hint: MutationHint;
|
|
133
|
+
image: AgentImageSummary;
|
|
134
|
+
}>;
|
|
135
|
+
requestAgentImageBuild(input: {
|
|
136
|
+
actorUserId: string;
|
|
137
|
+
imageId: string;
|
|
138
|
+
}): Promise<{
|
|
139
|
+
hint: MutationHint;
|
|
140
|
+
image: AgentImageSummary;
|
|
141
|
+
}>;
|
|
142
|
+
setDefaultAgentImage(input: {
|
|
143
|
+
actorUserId: string;
|
|
144
|
+
imageId: string;
|
|
145
|
+
}): Promise<{
|
|
146
|
+
hint: MutationHint;
|
|
147
|
+
image: AgentImageSummary;
|
|
148
|
+
}>;
|
|
149
|
+
getReadyDefaultAgentImage(): Promise<AgentExecutionImage | undefined>;
|
|
150
|
+
listRequestedAgentImageBuildIds(): Promise<string[]>;
|
|
151
|
+
takeAgentImageBuild(imageId: string, workerId: string): Promise<{
|
|
152
|
+
build: AgentImageBuild;
|
|
153
|
+
hint: MutationHint;
|
|
154
|
+
} | undefined>;
|
|
155
|
+
recordAgentImageBuildOutput(input: {
|
|
156
|
+
imageId: string;
|
|
157
|
+
lastBuildLogLine?: string;
|
|
158
|
+
logChunk: string;
|
|
159
|
+
progress: number;
|
|
160
|
+
workerId: string;
|
|
161
|
+
}): Promise<MutationHint | undefined>;
|
|
162
|
+
renewAgentImageBuildLease(imageId: string, workerId: string): Promise<boolean>;
|
|
163
|
+
completeAgentImageBuild(input: {
|
|
164
|
+
dockerImageId: string;
|
|
165
|
+
imageId: string;
|
|
166
|
+
workerId: string;
|
|
167
|
+
}): Promise<MutationHint | undefined>;
|
|
168
|
+
failAgentImageBuild(input: {
|
|
169
|
+
error: string;
|
|
170
|
+
imageId: string;
|
|
171
|
+
workerId: string;
|
|
172
|
+
}): Promise<MutationHint | undefined>;
|
|
173
|
+
releaseAgentImageBuildLeases(workerId: string): Promise<void>;
|
|
174
|
+
authorizeAgentSecretManagement(actorUserId: string): Promise<void>;
|
|
175
|
+
listAgentSecretAssignments(actorUserId: string): Promise<AgentSecretAssignment[]>;
|
|
176
|
+
listAgentSecretBindings(input?: {
|
|
177
|
+
agentUserId?: string;
|
|
178
|
+
chatId?: string;
|
|
179
|
+
}): Promise<AgentSecretBinding[]>;
|
|
180
|
+
recordAgentSecretRegistration(input: {
|
|
181
|
+
actorUserId: string;
|
|
182
|
+
secretId: string;
|
|
183
|
+
}): Promise<MutationHint>;
|
|
184
|
+
deleteAgentSecretAssignments(input: {
|
|
185
|
+
actorUserId: string;
|
|
186
|
+
secretId: string;
|
|
187
|
+
}): Promise<MutationHint>;
|
|
188
|
+
attachAgentSecretToAgent(input: {
|
|
189
|
+
actorUserId: string;
|
|
190
|
+
agentUserId: string;
|
|
191
|
+
secretId: string;
|
|
192
|
+
}): Promise<MutationHint | undefined>;
|
|
193
|
+
detachAgentSecretFromAgent(input: {
|
|
194
|
+
actorUserId: string;
|
|
195
|
+
agentUserId: string;
|
|
196
|
+
secretId: string;
|
|
197
|
+
}): Promise<MutationHint | undefined>;
|
|
198
|
+
attachAgentSecretToChannel(input: {
|
|
199
|
+
actorUserId: string;
|
|
200
|
+
channelId: string;
|
|
201
|
+
secretId: string;
|
|
202
|
+
}): Promise<MutationHint | undefined>;
|
|
203
|
+
detachAgentSecretFromChannel(input: {
|
|
204
|
+
actorUserId: string;
|
|
205
|
+
channelId: string;
|
|
206
|
+
secretId: string;
|
|
207
|
+
}): Promise<MutationHint | undefined>;
|
|
208
|
+
createAgent(input: {
|
|
209
|
+
agentUserId: string;
|
|
210
|
+
actorUserId: string;
|
|
211
|
+
containerName: string;
|
|
212
|
+
imageId: string;
|
|
213
|
+
name: string;
|
|
214
|
+
username: string;
|
|
215
|
+
sessionId: string;
|
|
216
|
+
cwd: string;
|
|
217
|
+
}): Promise<{
|
|
218
|
+
chat: ChatSummary;
|
|
219
|
+
hint: MutationHint;
|
|
220
|
+
}>;
|
|
221
|
+
agentUsernameAvailable(username: string): Promise<boolean>;
|
|
222
|
+
getDirectAgentChatContext(userId: string, chatId: string): Promise<AgentChatContext | undefined>;
|
|
223
|
+
bindAgentChat(input: {
|
|
224
|
+
actorUserId: string;
|
|
225
|
+
agentUserId: string;
|
|
226
|
+
chatId: string;
|
|
227
|
+
containerName: string;
|
|
228
|
+
cwd: string;
|
|
229
|
+
imageId: string;
|
|
230
|
+
sessionId: string;
|
|
231
|
+
}): Promise<{
|
|
232
|
+
containerName: string;
|
|
233
|
+
cwd: string;
|
|
234
|
+
sessionId: string;
|
|
235
|
+
}>;
|
|
236
|
+
listUnfinishedAgentChatIds(): Promise<string[]>;
|
|
237
|
+
hasUnfinishedAgentTurn(chatId: string): Promise<boolean>;
|
|
238
|
+
hasRunnableAgentTurn(chatId: string): Promise<boolean>;
|
|
239
|
+
takeNextAgentTurn(chatId: string, workerId: string): Promise<{
|
|
240
|
+
agentUserId: string;
|
|
241
|
+
actorUserId: string;
|
|
242
|
+
baselineMessageCount?: number;
|
|
243
|
+
chatId: string;
|
|
244
|
+
lastSessionEventId?: string;
|
|
245
|
+
leaseExpiresAt?: string;
|
|
246
|
+
runId?: string;
|
|
247
|
+
sessionId: string;
|
|
248
|
+
streamCommittedText: string;
|
|
249
|
+
text: string;
|
|
250
|
+
userMessageId: string;
|
|
251
|
+
workerId: string;
|
|
252
|
+
} | undefined>;
|
|
253
|
+
renewAgentTurnLease(input: {
|
|
254
|
+
agentUserId: string;
|
|
255
|
+
userMessageId: string;
|
|
256
|
+
workerId: string;
|
|
257
|
+
}): Promise<boolean>;
|
|
258
|
+
releaseAgentTurnLeases(workerId: string): Promise<void>;
|
|
259
|
+
checkpointAgentTurn(input: {
|
|
260
|
+
agentUserId: string;
|
|
261
|
+
baselineMessageCount: number;
|
|
262
|
+
lastSessionEventId?: string;
|
|
263
|
+
runId?: string;
|
|
264
|
+
userMessageId: string;
|
|
265
|
+
workerId: string;
|
|
266
|
+
}): Promise<boolean>;
|
|
267
|
+
attachAgentRun(input: {
|
|
268
|
+
runId: string;
|
|
269
|
+
sessionId: string;
|
|
270
|
+
text: string;
|
|
271
|
+
}): Promise<void>;
|
|
272
|
+
getRunningAgentTurn(sessionId: string, runId: string): Promise<{
|
|
273
|
+
agentUserId: string;
|
|
274
|
+
actorUserId: string;
|
|
275
|
+
baselineMessageCount?: number | undefined;
|
|
276
|
+
chatId: string;
|
|
277
|
+
lastSessionEventId?: string | undefined;
|
|
278
|
+
leaseExpiresAt?: string | undefined;
|
|
279
|
+
runId?: string | undefined;
|
|
280
|
+
sessionId: string;
|
|
281
|
+
streamCommittedText: string;
|
|
282
|
+
text: string;
|
|
283
|
+
userMessageId: string;
|
|
284
|
+
workerId: string;
|
|
285
|
+
} | undefined>;
|
|
286
|
+
getRigEventCheckpoint(): Promise<RigEventCheckpoint>;
|
|
287
|
+
checkpointRigEvent(cursor: number, eventCount?: number): Promise<RigEventCheckpoint>;
|
|
288
|
+
markRigEventsTrimmed(through: number): Promise<RigEventCheckpoint>;
|
|
289
|
+
streamAgentTurnReply(input: {
|
|
290
|
+
agentUserId: string;
|
|
291
|
+
actorUserId: string;
|
|
292
|
+
eventId: string;
|
|
293
|
+
expectedEventId?: string;
|
|
294
|
+
sessionId: string;
|
|
295
|
+
streamCommittedText: string;
|
|
296
|
+
userMessageId: string;
|
|
297
|
+
text: string;
|
|
298
|
+
workerId: string;
|
|
299
|
+
}): Promise<{
|
|
300
|
+
applied: boolean;
|
|
301
|
+
message?: MessageSummary;
|
|
302
|
+
hint?: MutationHint;
|
|
303
|
+
}>;
|
|
304
|
+
completeAgentTurn(input: {
|
|
305
|
+
agentUserId: string;
|
|
306
|
+
actorUserId: string;
|
|
307
|
+
sessionId: string;
|
|
308
|
+
userMessageId: string;
|
|
309
|
+
text: string;
|
|
310
|
+
workerId: string;
|
|
311
|
+
}): Promise<{
|
|
312
|
+
message: MessageSummary;
|
|
313
|
+
hint: MutationHint;
|
|
314
|
+
} | undefined>;
|
|
315
|
+
failAgentTurn(input: {
|
|
316
|
+
agentUserId: string;
|
|
317
|
+
actorUserId: string;
|
|
318
|
+
error: string;
|
|
319
|
+
sessionId: string;
|
|
320
|
+
userMessageId: string;
|
|
321
|
+
workerId: string;
|
|
322
|
+
}): Promise<{
|
|
323
|
+
message: MessageSummary;
|
|
324
|
+
hint: MutationHint;
|
|
325
|
+
} | undefined>;
|
|
326
|
+
private finishAgentTurn;
|
|
327
|
+
createDirectMessage(actorUserId: string, otherUserId: string): Promise<{
|
|
328
|
+
chat: ChatSummary;
|
|
329
|
+
hint?: MutationHint;
|
|
330
|
+
}>;
|
|
331
|
+
createGroupDirectMessage(input: {
|
|
332
|
+
actorUserId: string;
|
|
333
|
+
userIds: string[];
|
|
334
|
+
name?: string;
|
|
335
|
+
}): Promise<{
|
|
336
|
+
chat: ChatSummary;
|
|
337
|
+
hint?: MutationHint;
|
|
338
|
+
memberUserIds: string[];
|
|
339
|
+
}>;
|
|
340
|
+
updateChannel(input: {
|
|
341
|
+
actorUserId: string;
|
|
342
|
+
chatId: string;
|
|
343
|
+
name?: string;
|
|
344
|
+
slug?: string;
|
|
345
|
+
topic?: string | null;
|
|
346
|
+
kind?: "public_channel" | "private_channel";
|
|
347
|
+
photoFileId?: string | null;
|
|
348
|
+
isListed?: boolean;
|
|
349
|
+
}): Promise<{
|
|
350
|
+
chat: ChatSummary;
|
|
351
|
+
hint: MutationHint;
|
|
352
|
+
}>;
|
|
353
|
+
setChannelArchived(input: {
|
|
354
|
+
actorUserId: string;
|
|
355
|
+
chatId: string;
|
|
356
|
+
archived: boolean;
|
|
357
|
+
reason?: string;
|
|
358
|
+
}): Promise<{
|
|
359
|
+
chat: ChatSummary;
|
|
360
|
+
hint: MutationHint;
|
|
361
|
+
}>;
|
|
362
|
+
updateChannelPolicies(input: {
|
|
363
|
+
actorUserId: string;
|
|
364
|
+
chatId: string;
|
|
365
|
+
retentionMode?: "inherit" | "forever" | "duration";
|
|
366
|
+
retentionSeconds?: number | null;
|
|
367
|
+
defaultExpiryMode?: "none" | "after_send" | "after_read";
|
|
368
|
+
defaultSelfDestructSeconds?: number | null;
|
|
369
|
+
defaultAfterReadScope?: "any_reader" | "all_readers";
|
|
370
|
+
}): Promise<{
|
|
371
|
+
chat: ChatSummary;
|
|
372
|
+
hint: MutationHint;
|
|
373
|
+
}>;
|
|
374
|
+
deleteChannel(input: {
|
|
375
|
+
actorUserId: string;
|
|
376
|
+
chatId: string;
|
|
377
|
+
reason?: string;
|
|
378
|
+
}): Promise<{
|
|
379
|
+
hint: MutationHint;
|
|
380
|
+
memberUserIds: string[];
|
|
381
|
+
}>;
|
|
382
|
+
setChannelMemberRole(input: {
|
|
383
|
+
actorUserId: string;
|
|
384
|
+
chatId: string;
|
|
385
|
+
userId: string;
|
|
386
|
+
role: ChatRole;
|
|
387
|
+
}): Promise<{
|
|
388
|
+
hint: MutationHint;
|
|
389
|
+
}>;
|
|
390
|
+
updateTopic(actorUserId: string, chatId: string, topic: string | undefined): Promise<{
|
|
391
|
+
chat: ChatSummary;
|
|
392
|
+
hint: MutationHint;
|
|
393
|
+
}>;
|
|
394
|
+
joinPublicChannel(actorUserId: string, chatId: string): Promise<{
|
|
395
|
+
chat: ChatSummary;
|
|
396
|
+
hint: MutationHint;
|
|
397
|
+
}>;
|
|
398
|
+
leaveChannel(actorUserId: string, chatId: string): Promise<{
|
|
399
|
+
hint: MutationHint;
|
|
400
|
+
}>;
|
|
401
|
+
addChannelMember(input: {
|
|
402
|
+
actorUserId: string;
|
|
403
|
+
chatId: string;
|
|
404
|
+
userId: string;
|
|
405
|
+
role?: ChatRole;
|
|
406
|
+
}): Promise<{
|
|
407
|
+
hint: MutationHint;
|
|
408
|
+
}>;
|
|
409
|
+
removeChannelMember(input: {
|
|
410
|
+
actorUserId: string;
|
|
411
|
+
chatId: string;
|
|
412
|
+
userId: string;
|
|
413
|
+
}): Promise<{
|
|
414
|
+
hint: MutationHint;
|
|
415
|
+
}>;
|
|
416
|
+
setStar(actorUserId: string, chatId: string, starred: boolean): Promise<{
|
|
417
|
+
hint: MutationHint;
|
|
418
|
+
}>;
|
|
419
|
+
reorderStarred(actorUserId: string, chatIds: string[]): Promise<{
|
|
420
|
+
hint: MutationHint;
|
|
421
|
+
}>;
|
|
422
|
+
markChatRead(input: {
|
|
423
|
+
actorUserId: string;
|
|
424
|
+
chatId: string;
|
|
425
|
+
messageId?: string;
|
|
426
|
+
}): Promise<{
|
|
427
|
+
chat: ChatSummary;
|
|
428
|
+
hint: MutationHint;
|
|
429
|
+
}>;
|
|
430
|
+
setChatNotificationPreferences(input: {
|
|
431
|
+
actorUserId: string;
|
|
432
|
+
chatId: string;
|
|
433
|
+
notificationLevel?: NotificationLevel;
|
|
434
|
+
mutedUntil?: string | null;
|
|
435
|
+
notifyThreadReplies?: boolean;
|
|
436
|
+
showMessagePreviews?: boolean;
|
|
437
|
+
}): Promise<{
|
|
438
|
+
chat: ChatSummary;
|
|
439
|
+
hint: MutationHint;
|
|
440
|
+
}>;
|
|
441
|
+
getNotificationPreferences(userId: string): Promise<{
|
|
442
|
+
directMessages: "all" | "none";
|
|
443
|
+
mentions: "all" | "none";
|
|
444
|
+
threadReplies: NotificationLevel;
|
|
445
|
+
reactions: "all" | "none";
|
|
446
|
+
calls: "all" | "none";
|
|
447
|
+
emailNotifications: boolean;
|
|
448
|
+
desktopNotifications: boolean;
|
|
449
|
+
dndStartMinutes?: number;
|
|
450
|
+
dndEndMinutes?: number;
|
|
451
|
+
timezone?: string;
|
|
452
|
+
}>;
|
|
453
|
+
updateNotificationPreferences(input: {
|
|
454
|
+
actorUserId: string;
|
|
455
|
+
directMessages?: "all" | "none";
|
|
456
|
+
mentions?: "all" | "none";
|
|
457
|
+
threadReplies?: NotificationLevel;
|
|
458
|
+
reactions?: "all" | "none";
|
|
459
|
+
calls?: "all" | "none";
|
|
460
|
+
emailNotifications?: boolean;
|
|
461
|
+
desktopNotifications?: boolean;
|
|
462
|
+
dndStartMinutes?: number | null;
|
|
463
|
+
dndEndMinutes?: number | null;
|
|
464
|
+
timezone?: string | null;
|
|
465
|
+
}): Promise<{
|
|
466
|
+
preferences: Awaited<ReturnType<CollaborationRepository["getNotificationPreferences"]>>;
|
|
467
|
+
hint: MutationHint;
|
|
468
|
+
}>;
|
|
469
|
+
listNotifications(input: {
|
|
470
|
+
userId: string;
|
|
471
|
+
before?: string;
|
|
472
|
+
unreadOnly?: boolean;
|
|
473
|
+
limit: number;
|
|
474
|
+
}): Promise<{
|
|
475
|
+
notifications: NotificationSummary[];
|
|
476
|
+
nextCursor?: string;
|
|
477
|
+
}>;
|
|
478
|
+
markNotificationsRead(input: {
|
|
479
|
+
actorUserId: string;
|
|
480
|
+
notificationIds?: string[];
|
|
481
|
+
all?: boolean;
|
|
482
|
+
}): Promise<{
|
|
483
|
+
hint: MutationHint;
|
|
484
|
+
}>;
|
|
485
|
+
listMyThreads(input: {
|
|
486
|
+
userId: string;
|
|
487
|
+
before?: string;
|
|
488
|
+
unreadOnly?: boolean;
|
|
489
|
+
limit: number;
|
|
490
|
+
}): Promise<{
|
|
491
|
+
threads: ThreadSummary[];
|
|
492
|
+
nextCursor?: string;
|
|
493
|
+
}>;
|
|
494
|
+
setThreadSubscription(input: {
|
|
495
|
+
actorUserId: string;
|
|
496
|
+
threadRootMessageId: string;
|
|
497
|
+
subscribed: boolean;
|
|
498
|
+
notificationLevel?: NotificationLevel;
|
|
499
|
+
}): Promise<{
|
|
500
|
+
hint: MutationHint;
|
|
501
|
+
}>;
|
|
502
|
+
markThreadRead(input: {
|
|
503
|
+
actorUserId: string;
|
|
504
|
+
threadRootMessageId: string;
|
|
505
|
+
messageId?: string;
|
|
506
|
+
}): Promise<{
|
|
507
|
+
hint: MutationHint;
|
|
508
|
+
}>;
|
|
509
|
+
listChatPins(userId: string, chatId: string): Promise<ChatPinSummary[]>;
|
|
510
|
+
setMessagePinned(input: {
|
|
511
|
+
actorUserId: string;
|
|
512
|
+
messageId: string;
|
|
513
|
+
pinned: boolean;
|
|
514
|
+
}): Promise<{
|
|
515
|
+
hint: MutationHint;
|
|
516
|
+
}>;
|
|
517
|
+
listChatBookmarks(userId: string, chatId: string): Promise<ChatBookmarkSummary[]>;
|
|
518
|
+
createChatBookmark(input: {
|
|
519
|
+
actorUserId: string;
|
|
520
|
+
chatId: string;
|
|
521
|
+
kind: "link" | "message" | "file";
|
|
522
|
+
title: string;
|
|
523
|
+
url?: string;
|
|
524
|
+
messageId?: string;
|
|
525
|
+
fileId?: string;
|
|
526
|
+
emoji?: string;
|
|
527
|
+
}): Promise<{
|
|
528
|
+
bookmark: ChatBookmarkSummary;
|
|
529
|
+
hint: MutationHint;
|
|
530
|
+
}>;
|
|
531
|
+
deleteChatBookmark(input: {
|
|
532
|
+
actorUserId: string;
|
|
533
|
+
chatId: string;
|
|
534
|
+
bookmarkId: string;
|
|
535
|
+
}): Promise<{
|
|
536
|
+
hint: MutationHint;
|
|
537
|
+
}>;
|
|
538
|
+
sendMessage(input: SendMessageRepositoryInput): Promise<{
|
|
539
|
+
message: MessageSummary;
|
|
540
|
+
hint: MutationHint;
|
|
541
|
+
}>;
|
|
542
|
+
private sendMessageDb;
|
|
543
|
+
forwardMessage(input: {
|
|
544
|
+
actorUserId: string;
|
|
545
|
+
messageId: string;
|
|
546
|
+
targetChatIds: string[];
|
|
547
|
+
clientMutationId?: string;
|
|
548
|
+
}): Promise<{
|
|
549
|
+
messages: MessageSummary[];
|
|
550
|
+
hints: MutationHint[];
|
|
551
|
+
}>;
|
|
552
|
+
getMessage(userId: string, messageId: string): Promise<MessageSummary>;
|
|
553
|
+
editMessage(input: {
|
|
554
|
+
actorUserId: string;
|
|
555
|
+
messageId: string;
|
|
556
|
+
text: string;
|
|
557
|
+
reason?: string;
|
|
558
|
+
expectedRevision?: number;
|
|
559
|
+
}): Promise<{
|
|
560
|
+
message: MessageSummary;
|
|
561
|
+
hint: MutationHint;
|
|
562
|
+
}>;
|
|
563
|
+
listMessageRevisions(userId: string, messageId: string): Promise<Array<{
|
|
564
|
+
revision: number;
|
|
565
|
+
text: string;
|
|
566
|
+
editedByUserId?: string;
|
|
567
|
+
editReason?: string;
|
|
568
|
+
createdAt: string;
|
|
569
|
+
}>>;
|
|
570
|
+
listMessages(input: {
|
|
571
|
+
userId: string;
|
|
572
|
+
chatId: string;
|
|
573
|
+
beforeSequence?: number;
|
|
574
|
+
afterSequence?: number;
|
|
575
|
+
threadRootMessageId?: string;
|
|
576
|
+
limit: number;
|
|
577
|
+
}): Promise<{
|
|
578
|
+
messages: MessageSummary[];
|
|
579
|
+
chatPts: string;
|
|
580
|
+
hasMore: boolean;
|
|
581
|
+
}>;
|
|
582
|
+
deleteMessage(actorUserId: string, messageId: string): Promise<{
|
|
583
|
+
message: MessageSummary;
|
|
584
|
+
hint: MutationHint;
|
|
585
|
+
}>;
|
|
586
|
+
setReaction(input: {
|
|
587
|
+
actorUserId: string;
|
|
588
|
+
messageId: string;
|
|
589
|
+
emoji?: string;
|
|
590
|
+
customEmojiId?: string;
|
|
591
|
+
active: boolean;
|
|
592
|
+
}): Promise<{
|
|
593
|
+
message: MessageSummary;
|
|
594
|
+
hint: MutationHint;
|
|
595
|
+
}>;
|
|
596
|
+
getDifference(input: {
|
|
597
|
+
userId: string;
|
|
598
|
+
generation: string;
|
|
599
|
+
fromSequence: number;
|
|
600
|
+
untilSequence?: number;
|
|
601
|
+
limit: number;
|
|
602
|
+
}): Promise<{
|
|
603
|
+
kind: "empty" | "difference" | "slice" | "reset";
|
|
604
|
+
changedChats: ChatSummary[];
|
|
605
|
+
removedChatIds: string[];
|
|
606
|
+
areas: string[];
|
|
607
|
+
state: SyncState;
|
|
608
|
+
targetState: SyncState;
|
|
609
|
+
}>;
|
|
610
|
+
getChatDifference(input: {
|
|
611
|
+
userId: string;
|
|
612
|
+
chatId: string;
|
|
613
|
+
membershipEpoch: string;
|
|
614
|
+
fromPts: number;
|
|
615
|
+
untilPts?: number;
|
|
616
|
+
limit: number;
|
|
617
|
+
}): Promise<{
|
|
618
|
+
kind: "empty" | "difference" | "slice" | "reset" | "tooLong";
|
|
619
|
+
updates: Array<{
|
|
620
|
+
pts: string;
|
|
621
|
+
ptsCount: 1;
|
|
622
|
+
kind: string;
|
|
623
|
+
entityId?: string;
|
|
624
|
+
}>;
|
|
625
|
+
messages: MessageSummary[];
|
|
626
|
+
chat: ChatSummary;
|
|
627
|
+
state: {
|
|
628
|
+
membershipEpoch: string;
|
|
629
|
+
pts: string;
|
|
630
|
+
};
|
|
631
|
+
targetState: {
|
|
632
|
+
membershipEpoch: string;
|
|
633
|
+
pts: string;
|
|
634
|
+
};
|
|
635
|
+
}>;
|
|
636
|
+
expireDueMessages(limit?: number): Promise<MutationHint | undefined>;
|
|
637
|
+
listContacts(): Promise<UserSummary[]>;
|
|
638
|
+
listPresenceSettings(userIds?: string[]): Promise<PresenceSettingsSummary[]>;
|
|
639
|
+
updatePresenceSettings(input: {
|
|
640
|
+
actorUserId: string;
|
|
641
|
+
availability?: "automatic" | "online" | "away" | "dnd";
|
|
642
|
+
customStatusText?: string | null;
|
|
643
|
+
customStatusEmoji?: string | null;
|
|
644
|
+
statusExpiresAt?: string | null;
|
|
645
|
+
dndUntil?: string | null;
|
|
646
|
+
}): Promise<{
|
|
647
|
+
presence: PresenceSettingsSummary;
|
|
648
|
+
hint: MutationHint;
|
|
649
|
+
}>;
|
|
650
|
+
createCall(input: {
|
|
651
|
+
actorUserId: string;
|
|
652
|
+
chatId: string;
|
|
653
|
+
kind: "audio" | "video";
|
|
654
|
+
invitedUserIds?: string[];
|
|
655
|
+
}): Promise<{
|
|
656
|
+
call: CallSummary;
|
|
657
|
+
hint: MutationHint;
|
|
658
|
+
invitedUserIds: string[];
|
|
659
|
+
}>;
|
|
660
|
+
getCall(userId: string, callId: string): Promise<CallSummary>;
|
|
661
|
+
listCalls(input: {
|
|
662
|
+
userId: string;
|
|
663
|
+
chatId?: string;
|
|
664
|
+
limit: number;
|
|
665
|
+
}): Promise<CallSummary[]>;
|
|
666
|
+
updateCallParticipation(input: {
|
|
667
|
+
actorUserId: string;
|
|
668
|
+
callId: string;
|
|
669
|
+
action: "join" | "decline" | "leave";
|
|
670
|
+
}): Promise<{
|
|
671
|
+
call: CallSummary;
|
|
672
|
+
hint: MutationHint;
|
|
673
|
+
}>;
|
|
674
|
+
endCall(input: {
|
|
675
|
+
actorUserId: string;
|
|
676
|
+
callId: string;
|
|
677
|
+
reason?: string;
|
|
678
|
+
}): Promise<{
|
|
679
|
+
call: CallSummary;
|
|
680
|
+
hint: MutationHint;
|
|
681
|
+
}>;
|
|
682
|
+
canSignalCall(input: {
|
|
683
|
+
userId: string;
|
|
684
|
+
callId: string;
|
|
685
|
+
chatId: string;
|
|
686
|
+
recipientUserId?: string;
|
|
687
|
+
}): Promise<boolean>;
|
|
688
|
+
listDirectoryChannels(userId: string): Promise<ChatSummary[]>;
|
|
689
|
+
listFiles(input: {
|
|
690
|
+
userId: string;
|
|
691
|
+
kind?: FileKind;
|
|
692
|
+
before?: string;
|
|
693
|
+
limit: number;
|
|
694
|
+
}): Promise<{
|
|
695
|
+
files: FileSummary[];
|
|
696
|
+
nextCursor?: string;
|
|
697
|
+
}>;
|
|
698
|
+
canAccessFile(userId: string, fileId: string): Promise<boolean>;
|
|
699
|
+
listCustomEmoji(): Promise<Array<{
|
|
700
|
+
id: string;
|
|
701
|
+
name: string;
|
|
702
|
+
file: FileSummary;
|
|
703
|
+
createdByUserId: string;
|
|
704
|
+
}>>;
|
|
705
|
+
createCustomEmoji(input: {
|
|
706
|
+
actorUserId: string;
|
|
707
|
+
name: string;
|
|
708
|
+
fileId: string;
|
|
709
|
+
}): Promise<{
|
|
710
|
+
emoji: {
|
|
711
|
+
id: string;
|
|
712
|
+
name: string;
|
|
713
|
+
file: FileSummary;
|
|
714
|
+
createdByUserId: string;
|
|
715
|
+
};
|
|
716
|
+
hint: MutationHint;
|
|
717
|
+
}>;
|
|
718
|
+
deleteCustomEmoji(actorUserId: string, emojiId: string): Promise<{
|
|
719
|
+
hint: MutationHint;
|
|
720
|
+
}>;
|
|
721
|
+
search(userId: string, query: string, limit: number): Promise<Array<{
|
|
722
|
+
type: "message";
|
|
723
|
+
score: number;
|
|
724
|
+
message: MessageSummary;
|
|
725
|
+
} | {
|
|
726
|
+
type: "channel";
|
|
727
|
+
score: number;
|
|
728
|
+
channel: ChatSummary;
|
|
729
|
+
} | {
|
|
730
|
+
type: "user";
|
|
731
|
+
score: number;
|
|
732
|
+
user: UserSummary;
|
|
733
|
+
}>>;
|
|
734
|
+
searchPage(input: {
|
|
735
|
+
userId: string;
|
|
736
|
+
query: string;
|
|
737
|
+
limit: number;
|
|
738
|
+
cursor?: string;
|
|
739
|
+
}): Promise<{
|
|
740
|
+
results: Array<{
|
|
741
|
+
type: "message";
|
|
742
|
+
score: number;
|
|
743
|
+
message: MessageSummary;
|
|
744
|
+
} | {
|
|
745
|
+
type: "channel";
|
|
746
|
+
score: number;
|
|
747
|
+
channel: ChatSummary;
|
|
748
|
+
} | {
|
|
749
|
+
type: "user";
|
|
750
|
+
score: number;
|
|
751
|
+
user: UserSummary;
|
|
752
|
+
}>;
|
|
753
|
+
nextCursor?: string;
|
|
754
|
+
}>;
|
|
755
|
+
getServerProfile(): Promise<{
|
|
756
|
+
name: string;
|
|
757
|
+
title?: string;
|
|
758
|
+
photoFileId?: string;
|
|
759
|
+
defaultRetentionMode: "forever" | "duration";
|
|
760
|
+
defaultRetentionSeconds?: number;
|
|
761
|
+
updatedAt: string;
|
|
762
|
+
}>;
|
|
763
|
+
listAdminUsers(actorUserId: string): Promise<Array<AdminUserSummary & {
|
|
764
|
+
email: string;
|
|
765
|
+
bannedAt?: string;
|
|
766
|
+
deletedAt?: string;
|
|
767
|
+
sessionLastSeenAt?: string;
|
|
768
|
+
}>>;
|
|
769
|
+
updateServerProfile(input: {
|
|
770
|
+
actorUserId: string;
|
|
771
|
+
name?: string;
|
|
772
|
+
title?: string | null;
|
|
773
|
+
photoFileId?: string | null;
|
|
774
|
+
defaultRetentionMode?: "forever" | "duration";
|
|
775
|
+
defaultRetentionSeconds?: number | null;
|
|
776
|
+
}): Promise<{
|
|
777
|
+
server: Awaited<ReturnType<CollaborationRepository["getServerProfile"]>>;
|
|
778
|
+
hint: MutationHint;
|
|
779
|
+
}>;
|
|
780
|
+
updateUserAdministration(input: {
|
|
781
|
+
actorUserId: string;
|
|
782
|
+
userId: string;
|
|
783
|
+
title?: string | null;
|
|
784
|
+
role?: "member" | "admin";
|
|
785
|
+
}): Promise<{
|
|
786
|
+
user: UserSummary;
|
|
787
|
+
hint: MutationHint;
|
|
788
|
+
}>;
|
|
789
|
+
setUserBanned(input: {
|
|
790
|
+
actorUserId: string;
|
|
791
|
+
userId: string;
|
|
792
|
+
banned: boolean;
|
|
793
|
+
}): Promise<{
|
|
794
|
+
hint: MutationHint;
|
|
795
|
+
}>;
|
|
796
|
+
deleteUser(input: {
|
|
797
|
+
actorUserId: string;
|
|
798
|
+
userId: string;
|
|
799
|
+
}): Promise<{
|
|
800
|
+
hint: MutationHint;
|
|
801
|
+
}>;
|
|
802
|
+
sendAutomatedMessage(input: {
|
|
803
|
+
actorUserId: string;
|
|
804
|
+
chatId: string;
|
|
805
|
+
text: string;
|
|
806
|
+
attachmentFileIds?: string[];
|
|
807
|
+
clientMutationId?: string;
|
|
808
|
+
botId?: string;
|
|
809
|
+
}): Promise<{
|
|
810
|
+
message: MessageSummary;
|
|
811
|
+
hint: MutationHint;
|
|
812
|
+
}>;
|
|
813
|
+
private chatAccessDb;
|
|
814
|
+
private requireChatManagerDb;
|
|
815
|
+
private requireActiveUserDb;
|
|
816
|
+
private requireActiveIdentityDb;
|
|
817
|
+
private isPostingRestrictedDb;
|
|
818
|
+
private getCallProjectionDb;
|
|
819
|
+
private listPresenceSettingsWithDb;
|
|
820
|
+
private nextSequence;
|
|
821
|
+
private advanceChat;
|
|
822
|
+
private advanceChatWithSequence;
|
|
823
|
+
private insertChatUpdate;
|
|
824
|
+
private insertSyncEvent;
|
|
825
|
+
private recomputeThreadProjectionDb;
|
|
826
|
+
private canAccessFileWithDb;
|
|
827
|
+
private requireMessageInChatDb;
|
|
828
|
+
private getMessageProjectionDb;
|
|
829
|
+
private replaceMessageMentionsDb;
|
|
830
|
+
private indexMessageForSearchDb;
|
|
831
|
+
private recordMessageDeliveryDb;
|
|
832
|
+
private findClientMutationDb;
|
|
833
|
+
private storeClientMutationDb;
|
|
834
|
+
private requireServerAdminDb;
|
|
835
|
+
private appendAuditDb;
|
|
836
|
+
private writeDb;
|
|
837
|
+
}
|
|
838
|
+
export {};
|
|
839
|
+
//# sourceMappingURL=repository.d.ts.map
|