openloops 0.1.8 → 0.1.10
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/chunk-XRJFNASX.mjs +14 -0
- package/dist/common/clients/index.js +26 -0
- package/dist/common/clients/index.mjs +3 -0
- package/dist/common/clients/llm-client.js +159 -0
- package/dist/common/clients/llm-client.mjs +126 -0
- package/dist/common/clients/sentry-client.js +87 -0
- package/dist/common/clients/sentry-client.mjs +53 -0
- package/dist/common/clients/serper-client.js +74 -0
- package/dist/common/clients/serper-client.mjs +41 -0
- package/dist/common/core/base.app.js +57 -0
- package/dist/common/core/base.app.mjs +34 -0
- package/dist/common/core/base.entity.js +208 -0
- package/dist/common/core/base.entity.mjs +179 -0
- package/dist/common/core/base.use-case.js +30 -0
- package/dist/common/core/base.use-case.mjs +7 -0
- package/dist/common/core/index.js +1 -0
- package/dist/common/core/index.mjs +0 -0
- package/dist/common/core/utils/delete-empty-fields.js +66 -0
- package/dist/common/core/utils/delete-empty-fields.mjs +43 -0
- package/dist/common/core/utils/flatten-object.js +45 -0
- package/dist/common/core/utils/flatten-object.mjs +22 -0
- package/dist/common/core/utils/index.js +26 -0
- package/dist/common/core/utils/index.mjs +3 -0
- package/dist/common/core/utils/is-plain-object.js +32 -0
- package/dist/common/core/utils/is-plain-object.mjs +9 -0
- package/dist/common/decorators/admin-only/admin-only.js +52 -0
- package/dist/common/decorators/admin-only/admin-only.mjs +28 -0
- package/dist/common/decorators/admin-only/index.js +22 -0
- package/dist/common/decorators/admin-only/index.mjs +1 -0
- package/dist/common/decorators/index.js +26 -0
- package/dist/common/decorators/index.mjs +3 -0
- package/dist/common/decorators/mask-in-logs/index.js +22 -0
- package/dist/common/decorators/mask-in-logs/index.mjs +1 -0
- package/dist/common/decorators/mask-in-logs/mask-in-logs.js +53 -0
- package/dist/common/decorators/mask-in-logs/mask-in-logs.mjs +29 -0
- package/dist/common/decorators/owner-only/index.js +22 -0
- package/dist/common/decorators/owner-only/index.mjs +1 -0
- package/dist/common/decorators/owner-only/owner-only.js +52 -0
- package/dist/common/decorators/owner-only/owner-only.mjs +28 -0
- package/dist/common/error/http-error.js +37 -0
- package/dist/common/error/http-error.mjs +14 -0
- package/dist/common/error/index.js +24 -0
- package/dist/common/error/index.mjs +2 -0
- package/dist/common/error/reportError.js +51 -0
- package/dist/common/error/reportError.mjs +28 -0
- package/dist/common/helpers/extract-json-from-text.js +63 -0
- package/dist/common/helpers/extract-json-from-text.mjs +40 -0
- package/dist/common/helpers/index.js +24 -0
- package/dist/common/helpers/index.mjs +2 -0
- package/dist/common/helpers/sanitize-string.js +45 -0
- package/dist/common/helpers/sanitize-string.mjs +12 -0
- package/dist/common/logger/index.js +22 -0
- package/dist/common/logger/index.mjs +1 -0
- package/dist/common/logger/pino.js +70 -0
- package/dist/common/logger/pino.mjs +36 -0
- package/dist/common/repositories/index.js +24 -0
- package/dist/common/repositories/index.mjs +2 -0
- package/dist/common/repositories/mongo-db.client.js +79 -0
- package/dist/common/repositories/mongo-db.client.mjs +57 -0
- package/dist/common/repositories/mongo-db.repository.js +219 -0
- package/dist/common/repositories/mongo-db.repository.mjs +196 -0
- package/dist/common/utils/secret-manager.js +105 -0
- package/dist/common/utils/secret-manager.mjs +71 -0
- package/dist/index.js +22 -7
- package/dist/index.mjs +1 -7
- package/dist/services/agent/core/agent-loop.js +29 -0
- package/dist/services/agent/core/agent-loop.mjs +6 -0
- package/dist/services/agent/core/agent-state.js +102 -0
- package/dist/services/agent/core/agent-state.mjs +78 -0
- package/dist/services/agent/core/agent.js +351 -0
- package/dist/services/agent/core/agent.mjs +327 -0
- package/dist/services/agent/core/index.js +26 -0
- package/dist/services/agent/core/index.mjs +3 -0
- package/dist/services/agent/loops/index.js +24 -0
- package/dist/services/agent/loops/index.mjs +2 -0
- package/dist/services/agent/loops/plan-execute/index.js +22 -0
- package/dist/services/agent/loops/plan-execute/index.mjs +1 -0
- package/dist/services/agent/loops/plan-execute/plan-execute-loop.js +242 -0
- package/dist/services/agent/loops/plan-execute/plan-execute-loop.mjs +226 -0
- package/dist/services/agent/loops/shared/index.js +22 -0
- package/dist/services/agent/loops/shared/index.mjs +1 -0
- package/dist/services/agent/loops/shared/skills/action-planner.js +68 -0
- package/dist/services/agent/loops/shared/skills/action-planner.mjs +45 -0
- package/dist/services/agent/loops/shared/skills/confirmation-gate.js +53 -0
- package/dist/services/agent/loops/shared/skills/confirmation-gate.mjs +30 -0
- package/dist/services/agent/loops/shared/skills/fast-responder.js +70 -0
- package/dist/services/agent/loops/shared/skills/fast-responder.mjs +47 -0
- package/dist/services/agent/loops/shared/skills/final-responder.js +57 -0
- package/dist/services/agent/loops/shared/skills/final-responder.mjs +34 -0
- package/dist/services/agent/loops/shared/skills/index.js +32 -0
- package/dist/services/agent/loops/shared/skills/index.mjs +6 -0
- package/dist/services/agent/loops/shared/skills/state-observer.js +57 -0
- package/dist/services/agent/loops/shared/skills/state-observer.mjs +34 -0
- package/dist/services/agent/loops/shared/skills/strategy-engine.js +60 -0
- package/dist/services/agent/loops/shared/skills/strategy-engine.mjs +37 -0
- package/dist/services/agent/modules/chats/entities/agent-action.entity.js +151 -0
- package/dist/services/agent/modules/chats/entities/agent-action.entity.mjs +128 -0
- package/dist/services/agent/modules/chats/entities/agent-task.entity.js +231 -0
- package/dist/services/agent/modules/chats/entities/agent-task.entity.mjs +207 -0
- package/dist/services/agent/modules/chats/entities/chat-context.entity.js +70 -0
- package/dist/services/agent/modules/chats/entities/chat-context.entity.mjs +47 -0
- package/dist/services/agent/modules/chats/entities/chat-message.entity.js +58 -0
- package/dist/services/agent/modules/chats/entities/chat-message.entity.mjs +35 -0
- package/dist/services/agent/modules/chats/entities/chat-settings.entity.js +63 -0
- package/dist/services/agent/modules/chats/entities/chat-settings.entity.mjs +40 -0
- package/dist/services/agent/modules/chats/entities/chat.entity.js +163 -0
- package/dist/services/agent/modules/chats/entities/chat.entity.mjs +140 -0
- package/dist/services/agent/modules/chats/entities/index.js +22 -0
- package/dist/services/agent/modules/chats/entities/index.mjs +1 -0
- package/dist/services/agent/modules/chats/lambdas/create-chat/create-chat.use-case.js +56 -0
- package/dist/services/agent/modules/chats/lambdas/create-chat/create-chat.use-case.mjs +27 -0
- package/dist/services/agent/modules/chats/lambdas/create-chat/index.js +22 -0
- package/dist/services/agent/modules/chats/lambdas/create-chat/index.mjs +1 -0
- package/dist/services/agent/modules/chats/lambdas/delete-chat/delete-chat.use-case.js +61 -0
- package/dist/services/agent/modules/chats/lambdas/delete-chat/delete-chat.use-case.mjs +32 -0
- package/dist/services/agent/modules/chats/lambdas/delete-chat/index.js +22 -0
- package/dist/services/agent/modules/chats/lambdas/delete-chat/index.mjs +1 -0
- package/dist/services/agent/modules/chats/lambdas/get-chat-by-id/get-chat-by-id.use-case.js +52 -0
- package/dist/services/agent/modules/chats/lambdas/get-chat-by-id/get-chat-by-id.use-case.mjs +23 -0
- package/dist/services/agent/modules/chats/lambdas/get-chat-by-id/index.js +22 -0
- package/dist/services/agent/modules/chats/lambdas/get-chat-by-id/index.mjs +1 -0
- package/dist/services/agent/modules/chats/lambdas/interrupt-execution/index.js +22 -0
- package/dist/services/agent/modules/chats/lambdas/interrupt-execution/index.mjs +1 -0
- package/dist/services/agent/modules/chats/lambdas/interrupt-execution/interrupt-execution.use-case.js +64 -0
- package/dist/services/agent/modules/chats/lambdas/interrupt-execution/interrupt-execution.use-case.mjs +35 -0
- package/dist/services/agent/modules/chats/lambdas/list-chats-by-props/index.js +22 -0
- package/dist/services/agent/modules/chats/lambdas/list-chats-by-props/index.mjs +1 -0
- package/dist/services/agent/modules/chats/lambdas/list-chats-by-props/list-chats-by-props.use-case.js +52 -0
- package/dist/services/agent/modules/chats/lambdas/list-chats-by-props/list-chats-by-props.use-case.mjs +23 -0
- package/dist/services/agent/modules/chats/lambdas/list-chats-by-user/index.js +22 -0
- package/dist/services/agent/modules/chats/lambdas/list-chats-by-user/index.mjs +1 -0
- package/dist/services/agent/modules/chats/lambdas/list-chats-by-user/list-chats-by-user.use-case.js +59 -0
- package/dist/services/agent/modules/chats/lambdas/list-chats-by-user/list-chats-by-user.use-case.mjs +30 -0
- package/dist/services/agent/modules/chats/lambdas/update-chat/index.js +22 -0
- package/dist/services/agent/modules/chats/lambdas/update-chat/index.mjs +1 -0
- package/dist/services/agent/modules/chats/lambdas/update-chat/update-chat.use-case.js +64 -0
- package/dist/services/agent/modules/chats/lambdas/update-chat/update-chat.use-case.mjs +35 -0
- package/dist/services/agent/modules/chats/repositories/chat.repository.js +67 -0
- package/dist/services/agent/modules/chats/repositories/chat.repository.mjs +38 -0
- package/dist/services/agent/modules/chats/repositories/index.js +22 -0
- package/dist/services/agent/modules/chats/repositories/index.mjs +1 -0
- package/dist/services/agent/modules/llmcalls/entities/index.js +22 -0
- package/dist/services/agent/modules/llmcalls/entities/index.mjs +1 -0
- package/dist/services/agent/modules/llmcalls/entities/llmcall.entity.js +71 -0
- package/dist/services/agent/modules/llmcalls/entities/llmcall.entity.mjs +48 -0
- package/dist/services/agent/modules/llmcalls/lambdas/create-llmcall/create-llmcall.use-case.js +56 -0
- package/dist/services/agent/modules/llmcalls/lambdas/create-llmcall/create-llmcall.use-case.mjs +27 -0
- package/dist/services/agent/modules/llmcalls/lambdas/create-llmcall/index.js +22 -0
- package/dist/services/agent/modules/llmcalls/lambdas/create-llmcall/index.mjs +1 -0
- package/dist/services/agent/modules/llmcalls/lambdas/delete-llmcall/delete-llmcall.use-case.js +61 -0
- package/dist/services/agent/modules/llmcalls/lambdas/delete-llmcall/delete-llmcall.use-case.mjs +32 -0
- package/dist/services/agent/modules/llmcalls/lambdas/delete-llmcall/index.js +22 -0
- package/dist/services/agent/modules/llmcalls/lambdas/delete-llmcall/index.mjs +1 -0
- package/dist/services/agent/modules/llmcalls/lambdas/get-llm-usage/get-llm-usage.use-case.js +123 -0
- package/dist/services/agent/modules/llmcalls/lambdas/get-llm-usage/get-llm-usage.use-case.mjs +94 -0
- package/dist/services/agent/modules/llmcalls/lambdas/get-llm-usage/index.js +22 -0
- package/dist/services/agent/modules/llmcalls/lambdas/get-llm-usage/index.mjs +1 -0
- package/dist/services/agent/modules/llmcalls/lambdas/get-llmcall-by-id/get-llmcall-by-id.use-case.js +52 -0
- package/dist/services/agent/modules/llmcalls/lambdas/get-llmcall-by-id/get-llmcall-by-id.use-case.mjs +23 -0
- package/dist/services/agent/modules/llmcalls/lambdas/get-llmcall-by-id/index.js +22 -0
- package/dist/services/agent/modules/llmcalls/lambdas/get-llmcall-by-id/index.mjs +1 -0
- package/dist/services/agent/modules/llmcalls/lambdas/list-llmcalls-by-props/index.js +22 -0
- package/dist/services/agent/modules/llmcalls/lambdas/list-llmcalls-by-props/index.mjs +1 -0
- package/dist/services/agent/modules/llmcalls/lambdas/list-llmcalls-by-props/list-llmcalls-by-props.use-case.js +52 -0
- package/dist/services/agent/modules/llmcalls/lambdas/list-llmcalls-by-props/list-llmcalls-by-props.use-case.mjs +23 -0
- package/dist/services/agent/modules/llmcalls/lambdas/update-llmcall/index.js +22 -0
- package/dist/services/agent/modules/llmcalls/lambdas/update-llmcall/index.mjs +1 -0
- package/dist/services/agent/modules/llmcalls/lambdas/update-llmcall/update-llmcall.use-case.js +62 -0
- package/dist/services/agent/modules/llmcalls/lambdas/update-llmcall/update-llmcall.use-case.mjs +33 -0
- package/dist/services/agent/modules/llmcalls/repositories/index.js +22 -0
- package/dist/services/agent/modules/llmcalls/repositories/index.mjs +1 -0
- package/dist/services/agent/modules/llmcalls/repositories/llmcall.repository.js +67 -0
- package/dist/services/agent/modules/llmcalls/repositories/llmcall.repository.mjs +38 -0
- package/dist/services/agent/modules/mcp-servers/entities/index.js +22 -0
- package/dist/services/agent/modules/mcp-servers/entities/index.mjs +1 -0
- package/dist/services/agent/modules/mcp-servers/entities/mcpserver.entity.js +79 -0
- package/dist/services/agent/modules/mcp-servers/entities/mcpserver.entity.mjs +56 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/create-mcpserver/create-mcpserver.use-case.js +56 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/create-mcpserver/create-mcpserver.use-case.mjs +27 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/create-mcpserver/index.js +22 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/create-mcpserver/index.mjs +1 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/delete-mcpserver/delete-mcpserver.use-case.js +61 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/delete-mcpserver/delete-mcpserver.use-case.mjs +32 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/delete-mcpserver/index.js +22 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/delete-mcpserver/index.mjs +1 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/get-mcpserver-by-id/get-mcpserver-by-id.use-case.js +52 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/get-mcpserver-by-id/get-mcpserver-by-id.use-case.mjs +23 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/get-mcpserver-by-id/index.js +22 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/get-mcpserver-by-id/index.mjs +1 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/list-mcpservers-by-user/index.js +22 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/list-mcpservers-by-user/index.mjs +1 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/list-mcpservers-by-user/list-mcpservers-by-user.use-case.js +59 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/list-mcpservers-by-user/list-mcpservers-by-user.use-case.mjs +30 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/update-mcpserver/index.js +22 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/update-mcpserver/index.mjs +1 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/update-mcpserver/update-mcpserver.use-case.js +61 -0
- package/dist/services/agent/modules/mcp-servers/lambdas/update-mcpserver/update-mcpserver.use-case.mjs +32 -0
- package/dist/services/agent/modules/mcp-servers/repositories/index.js +22 -0
- package/dist/services/agent/modules/mcp-servers/repositories/index.mjs +1 -0
- package/dist/services/agent/modules/mcp-servers/repositories/mcpserver.repository.js +67 -0
- package/dist/services/agent/modules/mcp-servers/repositories/mcpserver.repository.mjs +38 -0
- package/dist/services/agent/skills/index.js +24 -0
- package/dist/services/agent/skills/index.mjs +2 -0
- package/dist/services/agent/skills/shared/index.js +22 -0
- package/dist/services/agent/skills/shared/index.mjs +1 -0
- package/dist/services/agent/skills/shared/shared-rules.js +37 -0
- package/dist/services/agent/skills/shared/shared-rules.mjs +11 -0
- package/dist/services/agent/skills/skill-runner.js +121 -0
- package/dist/services/agent/skills/skill-runner.mjs +92 -0
- package/dist/services/agent/skills/skill.js +128 -0
- package/dist/services/agent/skills/skill.mjs +105 -0
- package/dist/services/agent/tools/core/call-ai/call-ai.skill.js +54 -0
- package/dist/services/agent/tools/core/call-ai/call-ai.skill.mjs +31 -0
- package/dist/services/agent/tools/core/call-ai/call-ai.tool.js +68 -0
- package/dist/services/agent/tools/core/call-ai/call-ai.tool.mjs +45 -0
- package/dist/services/agent/tools/core/call-ai/index.js +22 -0
- package/dist/services/agent/tools/core/call-ai/index.mjs +1 -0
- package/dist/services/agent/tools/core/index.js +24 -0
- package/dist/services/agent/tools/core/index.mjs +2 -0
- package/dist/services/agent/tools/core/web-search/index.js +22 -0
- package/dist/services/agent/tools/core/web-search/index.mjs +1 -0
- package/dist/services/agent/tools/core/web-search/web-search.tool.js +51 -0
- package/dist/services/agent/tools/core/web-search/web-search.tool.mjs +30 -0
- package/dist/services/agent/tools/index.js +24 -0
- package/dist/services/agent/tools/index.mjs +2 -0
- package/dist/services/agent/tools/tool.js +57 -0
- package/dist/services/agent/tools/tool.mjs +34 -0
- package/dist/services/agent/utils/rank-tools-by-keywords.js +65 -0
- package/dist/services/agent/utils/rank-tools-by-keywords.mjs +42 -0
- package/dist/services/app/core/app.js +60 -0
- package/dist/services/app/core/app.mjs +47 -0
- package/dist/services/app/core/current-session.js +124 -0
- package/dist/services/app/core/current-session.mjs +104 -0
- package/dist/services/app/core/current-user.js +84 -0
- package/dist/services/app/core/current-user.mjs +61 -0
- package/dist/services/app/core/index.js +26 -0
- package/dist/services/app/core/index.mjs +3 -0
- package/dist/services/app/modules/authentication/lambdas/login/index.js +22 -0
- package/dist/services/app/modules/authentication/lambdas/login/index.mjs +1 -0
- package/dist/services/app/modules/authentication/lambdas/login/login.use-case.js +89 -0
- package/dist/services/app/modules/authentication/lambdas/login/login.use-case.mjs +50 -0
- package/dist/services/app/modules/users/entities/index.js +22 -0
- package/dist/services/app/modules/users/entities/index.mjs +1 -0
- package/dist/services/app/modules/users/entities/user-acquisition.js +55 -0
- package/dist/services/app/modules/users/entities/user-acquisition.mjs +26 -0
- package/dist/services/app/modules/users/entities/user-country.js +44 -0
- package/dist/services/app/modules/users/entities/user-country.mjs +21 -0
- package/dist/services/app/modules/users/entities/user-currency.js +44 -0
- package/dist/services/app/modules/users/entities/user-currency.mjs +21 -0
- package/dist/services/app/modules/users/entities/user-email.value-object.js +43 -0
- package/dist/services/app/modules/users/entities/user-email.value-object.mjs +20 -0
- package/dist/services/app/modules/users/entities/user-language.js +44 -0
- package/dist/services/app/modules/users/entities/user-language.mjs +21 -0
- package/dist/services/app/modules/users/entities/user-marketing.js +53 -0
- package/dist/services/app/modules/users/entities/user-marketing.mjs +24 -0
- package/dist/services/app/modules/users/entities/user-notification-preferences.js +41 -0
- package/dist/services/app/modules/users/entities/user-notification-preferences.mjs +18 -0
- package/dist/services/app/modules/users/entities/user-password.value-object.js +69 -0
- package/dist/services/app/modules/users/entities/user-password.value-object.mjs +36 -0
- package/dist/services/app/modules/users/entities/user-permissions.js +59 -0
- package/dist/services/app/modules/users/entities/user-permissions.mjs +36 -0
- package/dist/services/app/modules/users/entities/user-preferences.js +69 -0
- package/dist/services/app/modules/users/entities/user-preferences.mjs +46 -0
- package/dist/services/app/modules/users/entities/user-report-preferences.js +56 -0
- package/dist/services/app/modules/users/entities/user-report-preferences.mjs +33 -0
- package/dist/services/app/modules/users/entities/user-report-schedule.js +41 -0
- package/dist/services/app/modules/users/entities/user-report-schedule.mjs +18 -0
- package/dist/services/app/modules/users/entities/user-timezone.js +44 -0
- package/dist/services/app/modules/users/entities/user-timezone.mjs +21 -0
- package/dist/services/app/modules/users/entities/user.entity.js +133 -0
- package/dist/services/app/modules/users/entities/user.entity.mjs +103 -0
- package/dist/services/app/modules/users/lambdas/create-user/create-user.use-case.js +58 -0
- package/dist/services/app/modules/users/lambdas/create-user/create-user.use-case.mjs +29 -0
- package/dist/services/app/modules/users/lambdas/create-user/index.js +22 -0
- package/dist/services/app/modules/users/lambdas/create-user/index.mjs +1 -0
- package/dist/services/app/modules/users/lambdas/delete-user/delete-user.use-case.js +61 -0
- package/dist/services/app/modules/users/lambdas/delete-user/delete-user.use-case.mjs +32 -0
- package/dist/services/app/modules/users/lambdas/delete-user/index.js +22 -0
- package/dist/services/app/modules/users/lambdas/delete-user/index.mjs +1 -0
- package/dist/services/app/modules/users/lambdas/get-user-by-id/get-user-by-id.use-case.js +52 -0
- package/dist/services/app/modules/users/lambdas/get-user-by-id/get-user-by-id.use-case.mjs +23 -0
- package/dist/services/app/modules/users/lambdas/get-user-by-id/index.js +22 -0
- package/dist/services/app/modules/users/lambdas/get-user-by-id/index.mjs +1 -0
- package/dist/services/app/modules/users/lambdas/list-users-by-props/index.js +22 -0
- package/dist/services/app/modules/users/lambdas/list-users-by-props/index.mjs +1 -0
- package/dist/services/app/modules/users/lambdas/list-users-by-props/list-users-by-props.use-case.js +52 -0
- package/dist/services/app/modules/users/lambdas/list-users-by-props/list-users-by-props.use-case.mjs +23 -0
- package/dist/services/app/modules/users/lambdas/update-user/index.js +22 -0
- package/dist/services/app/modules/users/lambdas/update-user/index.mjs +1 -0
- package/dist/services/app/modules/users/lambdas/update-user/update-user.use-case.js +62 -0
- package/dist/services/app/modules/users/lambdas/update-user/update-user.use-case.mjs +33 -0
- package/dist/services/app/modules/users/repositories/index.js +22 -0
- package/dist/services/app/modules/users/repositories/index.mjs +1 -0
- package/dist/services/app/modules/users/repositories/user.repository.js +83 -0
- package/dist/services/app/modules/users/repositories/user.repository.mjs +54 -0
- package/package.json +2 -2
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "../../../../../chunk-XRJFNASX.mjs";
|
|
2
|
+
import { sanitizeString } from "@common/helpers";
|
|
3
|
+
class Currency {
|
|
4
|
+
constructor(isoCode, label, symbol) {
|
|
5
|
+
this.isoCode = isoCode;
|
|
6
|
+
this.label = label;
|
|
7
|
+
this.symbol = symbol;
|
|
8
|
+
}
|
|
9
|
+
isoCode;
|
|
10
|
+
label;
|
|
11
|
+
symbol;
|
|
12
|
+
static fromJSON(props) {
|
|
13
|
+
return new Currency(sanitizeString(props.isoCode), sanitizeString(props.label), sanitizeString(props.symbol));
|
|
14
|
+
}
|
|
15
|
+
toJSON() {
|
|
16
|
+
return { isoCode: this.isoCode, label: this.label, symbol: this.symbol };
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
Currency
|
|
21
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var user_email_value_object_exports = {};
|
|
20
|
+
__export(user_email_value_object_exports, {
|
|
21
|
+
UserEmail: () => UserEmail
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(user_email_value_object_exports);
|
|
24
|
+
var import_error = require("@common/error");
|
|
25
|
+
var import_helpers = require("@common/helpers");
|
|
26
|
+
class UserEmail {
|
|
27
|
+
static EMAIL_REGEX = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
28
|
+
constructor() {
|
|
29
|
+
}
|
|
30
|
+
static validateFormat(email) {
|
|
31
|
+
return this.EMAIL_REGEX.test(email);
|
|
32
|
+
}
|
|
33
|
+
static create(email) {
|
|
34
|
+
if (!email) return void 0;
|
|
35
|
+
const normalized = typeof email === "string" ? (0, import_helpers.sanitizeString)(email.trim())?.toLowerCase() : "";
|
|
36
|
+
if (!this.validateFormat(normalized ?? "")) throw new import_error.HttpError({ statusCode: 400, errorMessage: "{{invalid_email_format}}", errorDetails: { email } });
|
|
37
|
+
return normalized;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
+
0 && (module.exports = {
|
|
42
|
+
UserEmail
|
|
43
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import "../../../../../chunk-XRJFNASX.mjs";
|
|
2
|
+
import { HttpError } from "@common/error";
|
|
3
|
+
import { sanitizeString } from "@common/helpers";
|
|
4
|
+
class UserEmail {
|
|
5
|
+
static EMAIL_REGEX = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
|
|
6
|
+
constructor() {
|
|
7
|
+
}
|
|
8
|
+
static validateFormat(email) {
|
|
9
|
+
return this.EMAIL_REGEX.test(email);
|
|
10
|
+
}
|
|
11
|
+
static create(email) {
|
|
12
|
+
if (!email) return void 0;
|
|
13
|
+
const normalized = typeof email === "string" ? sanitizeString(email.trim())?.toLowerCase() : "";
|
|
14
|
+
if (!this.validateFormat(normalized ?? "")) throw new HttpError({ statusCode: 400, errorMessage: "{{invalid_email_format}}", errorDetails: { email } });
|
|
15
|
+
return normalized;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
UserEmail
|
|
20
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var user_language_exports = {};
|
|
20
|
+
__export(user_language_exports, {
|
|
21
|
+
Language: () => Language
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(user_language_exports);
|
|
24
|
+
var import_helpers = require("@common/helpers");
|
|
25
|
+
var import_countries_and_currencies_utils = require("countries-and-currencies-utils");
|
|
26
|
+
class Language {
|
|
27
|
+
constructor(isoCode) {
|
|
28
|
+
this.isoCode = isoCode;
|
|
29
|
+
}
|
|
30
|
+
isoCode;
|
|
31
|
+
get label() {
|
|
32
|
+
return this.isoCode ? (0, import_countries_and_currencies_utils.getLanguageFromLanguageCode)(this.isoCode)?.nativeName : void 0;
|
|
33
|
+
}
|
|
34
|
+
static fromJSON(props) {
|
|
35
|
+
return new Language((0, import_helpers.sanitizeString)(props.isoCode));
|
|
36
|
+
}
|
|
37
|
+
toJSON() {
|
|
38
|
+
return { isoCode: this.isoCode, label: this.label };
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
42
|
+
0 && (module.exports = {
|
|
43
|
+
Language
|
|
44
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import "../../../../../chunk-XRJFNASX.mjs";
|
|
2
|
+
import { sanitizeString } from "@common/helpers";
|
|
3
|
+
import { getLanguageFromLanguageCode } from "countries-and-currencies-utils";
|
|
4
|
+
class Language {
|
|
5
|
+
constructor(isoCode) {
|
|
6
|
+
this.isoCode = isoCode;
|
|
7
|
+
}
|
|
8
|
+
isoCode;
|
|
9
|
+
get label() {
|
|
10
|
+
return this.isoCode ? getLanguageFromLanguageCode(this.isoCode)?.nativeName : void 0;
|
|
11
|
+
}
|
|
12
|
+
static fromJSON(props) {
|
|
13
|
+
return new Language(sanitizeString(props.isoCode));
|
|
14
|
+
}
|
|
15
|
+
toJSON() {
|
|
16
|
+
return { isoCode: this.isoCode, label: this.label };
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
Language
|
|
21
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
20
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
21
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
22
|
+
if (decorator = decorators[i])
|
|
23
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
24
|
+
if (kind && result) __defProp(target, key, result);
|
|
25
|
+
return result;
|
|
26
|
+
};
|
|
27
|
+
var user_marketing_exports = {};
|
|
28
|
+
__export(user_marketing_exports, {
|
|
29
|
+
UserMarketing: () => UserMarketing
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(user_marketing_exports);
|
|
32
|
+
var import_decorators = require("@common/decorators");
|
|
33
|
+
var import_helpers = require("@common/helpers");
|
|
34
|
+
const _UserMarketing = class _UserMarketing {
|
|
35
|
+
drawNumber;
|
|
36
|
+
constructor(drawNumber) {
|
|
37
|
+
this.drawNumber = drawNumber;
|
|
38
|
+
}
|
|
39
|
+
static fromJSON(props) {
|
|
40
|
+
return new _UserMarketing((0, import_helpers.sanitizeString)(props.drawNumber));
|
|
41
|
+
}
|
|
42
|
+
toJSON() {
|
|
43
|
+
return { drawNumber: this.drawNumber };
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
__decorateClass([
|
|
47
|
+
import_decorators.AdminOnly
|
|
48
|
+
], _UserMarketing.prototype, "drawNumber", 2);
|
|
49
|
+
let UserMarketing = _UserMarketing;
|
|
50
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
51
|
+
0 && (module.exports = {
|
|
52
|
+
UserMarketing
|
|
53
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__decorateClass
|
|
3
|
+
} from "../../../../../chunk-XRJFNASX.mjs";
|
|
4
|
+
import { AdminOnly } from "@common/decorators";
|
|
5
|
+
import { sanitizeString } from "@common/helpers";
|
|
6
|
+
const _UserMarketing = class _UserMarketing {
|
|
7
|
+
drawNumber;
|
|
8
|
+
constructor(drawNumber) {
|
|
9
|
+
this.drawNumber = drawNumber;
|
|
10
|
+
}
|
|
11
|
+
static fromJSON(props) {
|
|
12
|
+
return new _UserMarketing(sanitizeString(props.drawNumber));
|
|
13
|
+
}
|
|
14
|
+
toJSON() {
|
|
15
|
+
return { drawNumber: this.drawNumber };
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
__decorateClass([
|
|
19
|
+
AdminOnly
|
|
20
|
+
], _UserMarketing.prototype, "drawNumber", 2);
|
|
21
|
+
let UserMarketing = _UserMarketing;
|
|
22
|
+
export {
|
|
23
|
+
UserMarketing
|
|
24
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var user_notification_preferences_exports = {};
|
|
20
|
+
__export(user_notification_preferences_exports, {
|
|
21
|
+
NotificationPreferences: () => NotificationPreferences
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(user_notification_preferences_exports);
|
|
24
|
+
class NotificationPreferences {
|
|
25
|
+
constructor(pushEnabled, emailEnabled) {
|
|
26
|
+
this.pushEnabled = pushEnabled;
|
|
27
|
+
this.emailEnabled = emailEnabled;
|
|
28
|
+
}
|
|
29
|
+
pushEnabled;
|
|
30
|
+
emailEnabled;
|
|
31
|
+
static fromJSON(props) {
|
|
32
|
+
return new NotificationPreferences(props.pushEnabled, props.emailEnabled);
|
|
33
|
+
}
|
|
34
|
+
toJSON() {
|
|
35
|
+
return { pushEnabled: this.pushEnabled, emailEnabled: this.emailEnabled };
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
NotificationPreferences
|
|
41
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import "../../../../../chunk-XRJFNASX.mjs";
|
|
2
|
+
class NotificationPreferences {
|
|
3
|
+
constructor(pushEnabled, emailEnabled) {
|
|
4
|
+
this.pushEnabled = pushEnabled;
|
|
5
|
+
this.emailEnabled = emailEnabled;
|
|
6
|
+
}
|
|
7
|
+
pushEnabled;
|
|
8
|
+
emailEnabled;
|
|
9
|
+
static fromJSON(props) {
|
|
10
|
+
return new NotificationPreferences(props.pushEnabled, props.emailEnabled);
|
|
11
|
+
}
|
|
12
|
+
toJSON() {
|
|
13
|
+
return { pushEnabled: this.pushEnabled, emailEnabled: this.emailEnabled };
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
NotificationPreferences
|
|
18
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var user_password_value_object_exports = {};
|
|
30
|
+
__export(user_password_value_object_exports, {
|
|
31
|
+
UserPassword: () => UserPassword
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(user_password_value_object_exports);
|
|
34
|
+
var import_bcryptjs = __toESM(require("bcryptjs"));
|
|
35
|
+
class UserPassword {
|
|
36
|
+
static SALT_ROUNDS = 10;
|
|
37
|
+
constructor() {
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Validates that the password meets the required security format:
|
|
41
|
+
* - Minimum 8 characters
|
|
42
|
+
* - At least one lowercase letter
|
|
43
|
+
* - At least one uppercase letter
|
|
44
|
+
* - At least one number
|
|
45
|
+
* - At least one special character from the allowed set: @ $ ! % * ? & .
|
|
46
|
+
* - Only letters, numbers, and the special characters above are allowed
|
|
47
|
+
*
|
|
48
|
+
* @param password Plain-text password to validate
|
|
49
|
+
* @returns `true` if the password is valid, `false` otherwise
|
|
50
|
+
*/
|
|
51
|
+
static validateFormat(password) {
|
|
52
|
+
const re = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&.])[A-Za-z\d@$!%*?&.]{8,}$/;
|
|
53
|
+
return re.test(password);
|
|
54
|
+
}
|
|
55
|
+
static async create(password) {
|
|
56
|
+
if (!password) return void 0;
|
|
57
|
+
return import_bcryptjs.default.hash(password.trim(), this.SALT_ROUNDS);
|
|
58
|
+
}
|
|
59
|
+
static async compare(password, hash) {
|
|
60
|
+
return import_bcryptjs.default.compare(password, hash);
|
|
61
|
+
}
|
|
62
|
+
static isHashed(password) {
|
|
63
|
+
return password.length === 60 && password.startsWith("$2");
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
67
|
+
0 && (module.exports = {
|
|
68
|
+
UserPassword
|
|
69
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import "../../../../../chunk-XRJFNASX.mjs";
|
|
2
|
+
import bcrypt from "bcryptjs";
|
|
3
|
+
class UserPassword {
|
|
4
|
+
static SALT_ROUNDS = 10;
|
|
5
|
+
constructor() {
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Validates that the password meets the required security format:
|
|
9
|
+
* - Minimum 8 characters
|
|
10
|
+
* - At least one lowercase letter
|
|
11
|
+
* - At least one uppercase letter
|
|
12
|
+
* - At least one number
|
|
13
|
+
* - At least one special character from the allowed set: @ $ ! % * ? & .
|
|
14
|
+
* - Only letters, numbers, and the special characters above are allowed
|
|
15
|
+
*
|
|
16
|
+
* @param password Plain-text password to validate
|
|
17
|
+
* @returns `true` if the password is valid, `false` otherwise
|
|
18
|
+
*/
|
|
19
|
+
static validateFormat(password) {
|
|
20
|
+
const re = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&.])[A-Za-z\d@$!%*?&.]{8,}$/;
|
|
21
|
+
return re.test(password);
|
|
22
|
+
}
|
|
23
|
+
static async create(password) {
|
|
24
|
+
if (!password) return void 0;
|
|
25
|
+
return bcrypt.hash(password.trim(), this.SALT_ROUNDS);
|
|
26
|
+
}
|
|
27
|
+
static async compare(password, hash) {
|
|
28
|
+
return bcrypt.compare(password, hash);
|
|
29
|
+
}
|
|
30
|
+
static isHashed(password) {
|
|
31
|
+
return password.length === 60 && password.startsWith("$2");
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
UserPassword
|
|
36
|
+
};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var user_permissions_exports = {};
|
|
20
|
+
__export(user_permissions_exports, {
|
|
21
|
+
UserPermissions: () => UserPermissions
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(user_permissions_exports);
|
|
24
|
+
class UserPermissions {
|
|
25
|
+
constructor(notifications, microphone, location, contacts, storage, camera, photos) {
|
|
26
|
+
this.notifications = notifications;
|
|
27
|
+
this.microphone = microphone;
|
|
28
|
+
this.location = location;
|
|
29
|
+
this.contacts = contacts;
|
|
30
|
+
this.storage = storage;
|
|
31
|
+
this.camera = camera;
|
|
32
|
+
this.photos = photos;
|
|
33
|
+
}
|
|
34
|
+
notifications;
|
|
35
|
+
microphone;
|
|
36
|
+
location;
|
|
37
|
+
contacts;
|
|
38
|
+
storage;
|
|
39
|
+
camera;
|
|
40
|
+
photos;
|
|
41
|
+
static fromJSON(props) {
|
|
42
|
+
return new UserPermissions(props.notifications, props.microphone, props.location, props.contacts, props.storage, props.camera, props.photos);
|
|
43
|
+
}
|
|
44
|
+
toJSON() {
|
|
45
|
+
return {
|
|
46
|
+
notifications: this.notifications,
|
|
47
|
+
microphone: this.microphone,
|
|
48
|
+
location: this.location,
|
|
49
|
+
contacts: this.contacts,
|
|
50
|
+
storage: this.storage,
|
|
51
|
+
camera: this.camera,
|
|
52
|
+
photos: this.photos
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
57
|
+
0 && (module.exports = {
|
|
58
|
+
UserPermissions
|
|
59
|
+
});
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import "../../../../../chunk-XRJFNASX.mjs";
|
|
2
|
+
class UserPermissions {
|
|
3
|
+
constructor(notifications, microphone, location, contacts, storage, camera, photos) {
|
|
4
|
+
this.notifications = notifications;
|
|
5
|
+
this.microphone = microphone;
|
|
6
|
+
this.location = location;
|
|
7
|
+
this.contacts = contacts;
|
|
8
|
+
this.storage = storage;
|
|
9
|
+
this.camera = camera;
|
|
10
|
+
this.photos = photos;
|
|
11
|
+
}
|
|
12
|
+
notifications;
|
|
13
|
+
microphone;
|
|
14
|
+
location;
|
|
15
|
+
contacts;
|
|
16
|
+
storage;
|
|
17
|
+
camera;
|
|
18
|
+
photos;
|
|
19
|
+
static fromJSON(props) {
|
|
20
|
+
return new UserPermissions(props.notifications, props.microphone, props.location, props.contacts, props.storage, props.camera, props.photos);
|
|
21
|
+
}
|
|
22
|
+
toJSON() {
|
|
23
|
+
return {
|
|
24
|
+
notifications: this.notifications,
|
|
25
|
+
microphone: this.microphone,
|
|
26
|
+
location: this.location,
|
|
27
|
+
contacts: this.contacts,
|
|
28
|
+
storage: this.storage,
|
|
29
|
+
camera: this.camera,
|
|
30
|
+
photos: this.photos
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export {
|
|
35
|
+
UserPermissions
|
|
36
|
+
};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var user_preferences_exports = {};
|
|
20
|
+
__export(user_preferences_exports, {
|
|
21
|
+
UserPreferences: () => UserPreferences
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(user_preferences_exports);
|
|
24
|
+
var import_user_notification_preferences = require("./user-notification-preferences");
|
|
25
|
+
var import_user_report_preferences = require("./user-report-preferences");
|
|
26
|
+
var import_user_country = require("./user-country");
|
|
27
|
+
var import_user_currency = require("./user-currency");
|
|
28
|
+
var import_user_timezone = require("./user-timezone");
|
|
29
|
+
var import_user_language = require("./user-language");
|
|
30
|
+
class UserPreferences {
|
|
31
|
+
constructor(notifications, reports, country, currency, timezone, language) {
|
|
32
|
+
this.notifications = notifications;
|
|
33
|
+
this.reports = reports;
|
|
34
|
+
this.country = country;
|
|
35
|
+
this.currency = currency;
|
|
36
|
+
this.timezone = timezone;
|
|
37
|
+
this.language = language;
|
|
38
|
+
}
|
|
39
|
+
notifications;
|
|
40
|
+
reports;
|
|
41
|
+
country;
|
|
42
|
+
currency;
|
|
43
|
+
timezone;
|
|
44
|
+
language;
|
|
45
|
+
static fromJSON(props) {
|
|
46
|
+
return new UserPreferences(
|
|
47
|
+
props.notifications && import_user_notification_preferences.NotificationPreferences.fromJSON(props.notifications),
|
|
48
|
+
props.reports && import_user_report_preferences.ReportPreferences.fromJSON(props.reports),
|
|
49
|
+
props.country && import_user_country.Country.fromJSON(props.country),
|
|
50
|
+
props.currency && import_user_currency.Currency.fromJSON(props.currency),
|
|
51
|
+
props.timezone && import_user_timezone.Timezone.fromJSON(props.timezone),
|
|
52
|
+
props.language && import_user_language.Language.fromJSON(props.language)
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
toJSON() {
|
|
56
|
+
return {
|
|
57
|
+
notifications: this.notifications?.toJSON(),
|
|
58
|
+
reports: this.reports?.toJSON(),
|
|
59
|
+
country: this.country?.toJSON(),
|
|
60
|
+
currency: this.currency?.toJSON(),
|
|
61
|
+
timezone: this.timezone?.toJSON(),
|
|
62
|
+
language: this.language?.toJSON()
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
67
|
+
0 && (module.exports = {
|
|
68
|
+
UserPreferences
|
|
69
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import "../../../../../chunk-XRJFNASX.mjs";
|
|
2
|
+
import { NotificationPreferences } from "./user-notification-preferences";
|
|
3
|
+
import { ReportPreferences } from "./user-report-preferences";
|
|
4
|
+
import { Country } from "./user-country";
|
|
5
|
+
import { Currency } from "./user-currency";
|
|
6
|
+
import { Timezone } from "./user-timezone";
|
|
7
|
+
import { Language } from "./user-language";
|
|
8
|
+
class UserPreferences {
|
|
9
|
+
constructor(notifications, reports, country, currency, timezone, language) {
|
|
10
|
+
this.notifications = notifications;
|
|
11
|
+
this.reports = reports;
|
|
12
|
+
this.country = country;
|
|
13
|
+
this.currency = currency;
|
|
14
|
+
this.timezone = timezone;
|
|
15
|
+
this.language = language;
|
|
16
|
+
}
|
|
17
|
+
notifications;
|
|
18
|
+
reports;
|
|
19
|
+
country;
|
|
20
|
+
currency;
|
|
21
|
+
timezone;
|
|
22
|
+
language;
|
|
23
|
+
static fromJSON(props) {
|
|
24
|
+
return new UserPreferences(
|
|
25
|
+
props.notifications && NotificationPreferences.fromJSON(props.notifications),
|
|
26
|
+
props.reports && ReportPreferences.fromJSON(props.reports),
|
|
27
|
+
props.country && Country.fromJSON(props.country),
|
|
28
|
+
props.currency && Currency.fromJSON(props.currency),
|
|
29
|
+
props.timezone && Timezone.fromJSON(props.timezone),
|
|
30
|
+
props.language && Language.fromJSON(props.language)
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
toJSON() {
|
|
34
|
+
return {
|
|
35
|
+
notifications: this.notifications?.toJSON(),
|
|
36
|
+
reports: this.reports?.toJSON(),
|
|
37
|
+
country: this.country?.toJSON(),
|
|
38
|
+
currency: this.currency?.toJSON(),
|
|
39
|
+
timezone: this.timezone?.toJSON(),
|
|
40
|
+
language: this.language?.toJSON()
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
UserPreferences
|
|
46
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var user_report_preferences_exports = {};
|
|
20
|
+
__export(user_report_preferences_exports, {
|
|
21
|
+
ReportPreferences: () => ReportPreferences
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(user_report_preferences_exports);
|
|
24
|
+
var import_user_report_schedule = require("./user-report-schedule");
|
|
25
|
+
class ReportPreferences {
|
|
26
|
+
constructor(dailySummary, weeklySummary, monthlySummary, dailyReminder) {
|
|
27
|
+
this.dailySummary = dailySummary;
|
|
28
|
+
this.weeklySummary = weeklySummary;
|
|
29
|
+
this.monthlySummary = monthlySummary;
|
|
30
|
+
this.dailyReminder = dailyReminder;
|
|
31
|
+
}
|
|
32
|
+
dailySummary;
|
|
33
|
+
weeklySummary;
|
|
34
|
+
monthlySummary;
|
|
35
|
+
dailyReminder;
|
|
36
|
+
static fromJSON(props) {
|
|
37
|
+
return new ReportPreferences(
|
|
38
|
+
props.dailySummary && import_user_report_schedule.ReportSchedule.fromJSON(props.dailySummary),
|
|
39
|
+
props.weeklySummary && import_user_report_schedule.ReportSchedule.fromJSON(props.weeklySummary),
|
|
40
|
+
props.monthlySummary && import_user_report_schedule.ReportSchedule.fromJSON(props.monthlySummary),
|
|
41
|
+
props.dailyReminder && import_user_report_schedule.ReportSchedule.fromJSON(props.dailyReminder)
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
toJSON() {
|
|
45
|
+
return {
|
|
46
|
+
dailySummary: this.dailySummary?.toJSON(),
|
|
47
|
+
weeklySummary: this.weeklySummary?.toJSON(),
|
|
48
|
+
monthlySummary: this.monthlySummary?.toJSON(),
|
|
49
|
+
dailyReminder: this.dailyReminder?.toJSON()
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
54
|
+
0 && (module.exports = {
|
|
55
|
+
ReportPreferences
|
|
56
|
+
});
|