@hexabot-ai/api 3.2.2-alpha.0 → 3.2.2-alpha.2
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/actions/actions.service.d.ts +3 -3
- package/dist/actions/base-action.d.ts +3 -3
- package/dist/actions/create-action.d.ts +1 -1
- package/dist/actions/types.d.ts +3 -3
- package/dist/analytics/controllers/stats.controller.d.ts +1 -1
- package/dist/analytics/dto/stats.dto.d.ts +1 -1
- package/dist/analytics/entities/stats.entity.d.ts +1 -1
- package/dist/analytics/repositories/stats.repository.d.ts +1 -1
- package/dist/analytics/services/stats.service.d.ts +7 -7
- package/dist/attachment/controllers/attachment.controller.d.ts +1 -1
- package/dist/attachment/dto/attachment.dto.d.ts +2 -2
- package/dist/attachment/entities/attachment.entity.d.ts +3 -3
- package/dist/attachment/guards/attachment-ability.guard.d.ts +2 -2
- package/dist/attachment/repositories/attachment.repository.d.ts +2 -2
- package/dist/attachment/services/attachment.service.d.ts +3 -3
- package/dist/attachment/utilities/index.js +2 -2
- package/dist/attachment/utilities/index.js.map +1 -1
- package/dist/audit/controllers/audit-log.controller.d.ts +2 -2
- package/dist/audit/dto/audit-log.dto.d.ts +1 -1
- package/dist/audit/entities/audit-log.entity.d.ts +1 -1
- package/dist/audit/exporters/audit-backend.factory.d.ts +1 -1
- package/dist/audit/exporters/audit-safe.exporter.d.ts +1 -1
- package/dist/audit/repositories/audit-log.repository.d.ts +1 -1
- package/dist/audit/services/audit-log-record.service.d.ts +1 -1
- package/dist/bindings/base-binding-kind.d.ts +2 -2
- package/dist/bindings/runtime-bindings.service.d.ts +2 -2
- package/dist/bootstrap.js +8 -0
- package/dist/bootstrap.js.map +1 -1
- package/dist/channel/channel.controller.d.ts +1 -1
- package/dist/channel/channel.service.d.ts +5 -5
- package/dist/channel/dto/source.dto.d.ts +1 -1
- package/dist/channel/entities/source.entity.d.ts +2 -2
- package/dist/channel/lib/Handler.d.ts +7 -7
- package/dist/channel/lib/Handler.js +2 -2
- package/dist/channel/lib/Handler.js.map +1 -1
- package/dist/channel/lib/channel-event-bus.d.ts +1 -1
- package/dist/channel/lib/inbound-events/channel-inbound-event-context.d.ts +1 -1
- package/dist/channel/lib/inbound-events/channel-inbound-event-decoder.d.ts +1 -1
- package/dist/channel/lib/inbound-events/channel-inbound-event.d.ts +2 -2
- package/dist/channel/lib/inbound-events/message-inbound-event.d.ts +1 -1
- package/dist/channel/lib/transports/http-channel-handler.d.ts +2 -2
- package/dist/channel/lib/transports/websocket-channel-handler.d.ts +3 -3
- package/dist/channel/repositories/source.repository.d.ts +1 -1
- package/dist/channel/services/channel-attachment.service.d.ts +3 -3
- package/dist/channel/services/source.service.d.ts +3 -3
- package/dist/channel/services/subscriber-resolver.service.d.ts +2 -2
- package/dist/channel/source.controller.d.ts +1 -1
- package/dist/channel/webhook.controller.d.ts +1 -1
- package/dist/chat/chat.module.js +1 -1
- package/dist/chat/chat.module.js.map +1 -1
- package/dist/chat/controllers/label-group.controller.d.ts +1 -1
- package/dist/chat/controllers/label.controller.d.ts +1 -1
- package/dist/chat/controllers/message.controller.d.ts +2 -2
- package/dist/chat/controllers/subscriber.controller.d.ts +3 -3
- package/dist/chat/controllers/thread.controller.d.ts +2 -2
- package/dist/chat/dto/label-group.dto.d.ts +1 -1
- package/dist/chat/dto/label.dto.d.ts +1 -1
- package/dist/chat/dto/message.dto.d.ts +1 -1
- package/dist/chat/dto/subscriber.dto.d.ts +3 -3
- package/dist/chat/dto/thread.dto.d.ts +1 -1
- package/dist/chat/entities/label-group.entity.d.ts +1 -1
- package/dist/chat/entities/label.entity.d.ts +1 -1
- package/dist/chat/entities/message.entity.d.ts +2 -2
- package/dist/chat/entities/subscriber.entity.d.ts +4 -4
- package/dist/chat/entities/subscriber.entity.js +3 -1
- package/dist/chat/entities/subscriber.entity.js.map +1 -1
- package/dist/chat/entities/thread.entity.d.ts +2 -2
- package/dist/chat/repositories/label-group.repository.d.ts +1 -1
- package/dist/chat/repositories/label.repository.d.ts +1 -1
- package/dist/chat/repositories/message.repository.d.ts +1 -1
- package/dist/chat/repositories/subscriber.repository.d.ts +1 -1
- package/dist/chat/repositories/thread.repository.d.ts +1 -1
- package/dist/chat/services/chat.service.d.ts +4 -4
- package/dist/chat/services/label-group.service.d.ts +1 -1
- package/dist/chat/services/label.service.d.ts +1 -1
- package/dist/chat/services/message.service.d.ts +2 -2
- package/dist/chat/services/subscriber.service.d.ts +5 -5
- package/dist/chat/services/subscriber.service.js +2 -2
- package/dist/chat/services/subscriber.service.js.map +1 -1
- package/dist/chat/services/thread.service.d.ts +2 -2
- package/dist/chat/types/channel.d.ts +1 -1
- package/dist/cms/controllers/content-type.controller.d.ts +1 -1
- package/dist/cms/controllers/content.controller.d.ts +1 -1
- package/dist/cms/controllers/menu.controller.d.ts +2 -2
- package/dist/cms/dto/content.dto.d.ts +1 -1
- package/dist/cms/dto/contentType.dto.d.ts +2 -2
- package/dist/cms/dto/menu.dto.d.ts +1 -1
- package/dist/cms/entities/content-type.entity.d.ts +2 -2
- package/dist/cms/entities/content-type.entity.js +3 -2
- package/dist/cms/entities/content-type.entity.js.map +1 -1
- package/dist/cms/entities/content.entity.d.ts +2 -2
- package/dist/cms/entities/content.entity.js +4 -3
- package/dist/cms/entities/content.entity.js.map +1 -1
- package/dist/cms/entities/menu.entity.d.ts +1 -1
- package/dist/cms/repositories/content-type.repository.d.ts +1 -1
- package/dist/cms/repositories/content.repository.d.ts +1 -1
- package/dist/cms/repositories/menu.repository.d.ts +1 -1
- package/dist/cms/services/content-type.service.d.ts +2 -2
- package/dist/cms/services/content.service.d.ts +1 -1
- package/dist/cms/services/menu.service.d.ts +1 -1
- package/dist/cms/services/rag-backend.service.d.ts +2 -2
- package/dist/cms/services/rag-indexer.service.d.ts +2 -2
- package/dist/cms/services/rag-retriever.service.d.ts +1 -1
- package/dist/cms/services/rag.service.d.ts +4 -4
- package/dist/database/entities/base.entity.d.ts +1 -1
- package/dist/extension/cleanup.service.d.ts +3 -3
- package/dist/extension/extension.module.d.ts +1 -1
- package/dist/extension/types.d.ts +1 -1
- package/dist/extensions/actions/ai/agent.action.d.ts +3 -3
- package/dist/extensions/actions/ai/ai-base.action.d.ts +5 -5
- package/dist/extensions/actions/ai/generate-object.action.d.ts +2 -2
- package/dist/extensions/actions/ai/generate-object.base.action.d.ts +3 -3
- package/dist/extensions/actions/ai/generate-reply.action.d.ts +2 -2
- package/dist/extensions/actions/ai/generate-text.action.d.ts +2 -2
- package/dist/extensions/actions/ai/generate-text.base.action.d.ts +3 -3
- package/dist/extensions/actions/ai/infer-object.action.d.ts +2 -2
- package/dist/extensions/actions/ai/retrieve-content-rag.action.d.ts +1 -1
- package/dist/extensions/actions/memory/update-memory.action.d.ts +4 -4
- package/dist/extensions/actions/messaging/attachment.action.d.ts +3 -3
- package/dist/extensions/actions/messaging/await-reply.action.d.ts +4 -4
- package/dist/extensions/actions/messaging/buttons.action.d.ts +3 -3
- package/dist/extensions/actions/messaging/list.action.d.ts +3 -3
- package/dist/extensions/actions/messaging/message-action.base.d.ts +6 -6
- package/dist/extensions/actions/messaging/quick-replies.action.d.ts +3 -3
- package/dist/extensions/actions/messaging/text-message.action.d.ts +3 -3
- package/dist/extensions/actions/subscriber/handover.action.d.ts +1 -1
- package/dist/extensions/actions/subscriber/update-labels.action.d.ts +1 -1
- package/dist/extensions/actions/web/http-request.action.d.ts +1 -1
- package/dist/extensions/actions/web/http-request.action.js +15 -4
- package/dist/extensions/actions/web/http-request.action.js.map +1 -1
- package/dist/extensions/actions/web/i18n/en.translations.json +9 -0
- package/dist/extensions/actions/web/i18n/fr.translations.json +9 -0
- package/dist/extensions/actions/web/send-mail.action.d.ts +30 -0
- package/dist/extensions/actions/web/send-mail.action.js +79 -0
- package/dist/extensions/actions/web/send-mail.action.js.map +1 -0
- package/dist/extensions/channels/web/base-web-channel.d.ts +6 -6
- package/dist/extensions/channels/web/base-web-channel.js +2 -2
- package/dist/extensions/channels/web/base-web-channel.js.map +1 -1
- package/dist/extensions/channels/web/inbound/events/base-web-inbound.event.d.ts +3 -3
- package/dist/extensions/channels/web/inbound/events/delivery.event.d.ts +2 -2
- package/dist/extensions/channels/web/inbound/events/messages/attachment.event.d.ts +2 -2
- package/dist/extensions/channels/web/inbound/events/messages/location.event.d.ts +2 -2
- package/dist/extensions/channels/web/inbound/events/messages/payload.event.d.ts +2 -2
- package/dist/extensions/channels/web/inbound/events/messages/postback.event.d.ts +2 -2
- package/dist/extensions/channels/web/inbound/events/messages/quick-reply.event.d.ts +2 -2
- package/dist/extensions/channels/web/inbound/events/messages/text.event.d.ts +2 -2
- package/dist/extensions/channels/web/inbound/events/messages/web-message.event.d.ts +3 -3
- package/dist/extensions/channels/web/inbound/events/read.event.d.ts +2 -2
- package/dist/extensions/channels/web/inbound/events/typing.event.d.ts +2 -2
- package/dist/extensions/channels/web/inbound/events/unsupported.event.d.ts +2 -2
- package/dist/extensions/channels/web/inbound/web-inbound-event-decoder.d.ts +2 -2
- package/dist/extensions/channels/web/inbound/web-inbound-message-encoder.d.ts +1 -1
- package/dist/extensions/channels/web/outbound/web-outbound-message-encoder.d.ts +4 -4
- package/dist/extensions/channels/web/services/web-history.service.d.ts +2 -2
- package/dist/extensions/channels/web/services/web-session.service.d.ts +6 -6
- package/dist/extensions/helpers/local-storage/index.helper.d.ts +2 -2
- package/dist/extensions/index.d.ts +1 -0
- package/dist/extensions/index.js +1 -0
- package/dist/extensions/index.js.map +1 -1
- package/dist/health/health.service.d.ts +3 -3
- package/dist/helper/helper.service.d.ts +2 -2
- package/dist/helper/lib/base-helper.d.ts +2 -2
- package/dist/helper/lib/base-storage-helper.d.ts +1 -1
- package/dist/helper/types.d.ts +1 -1
- package/dist/i18n/controllers/language.controller.d.ts +1 -1
- package/dist/i18n/controllers/translation.controller.d.ts +1 -1
- package/dist/i18n/dto/language.dto.d.ts +1 -1
- package/dist/i18n/dto/translation.dto.d.ts +1 -1
- package/dist/i18n/entities/language.entity.d.ts +1 -1
- package/dist/i18n/entities/translation.entity.d.ts +1 -1
- package/dist/i18n/repositories/language.repository.d.ts +1 -1
- package/dist/i18n/repositories/translation.repository.d.ts +1 -1
- package/dist/i18n/seeds/language.seed.d.ts +1 -1
- package/dist/i18n/seeds/translation.seed.d.ts +1 -1
- package/dist/i18n/services/i18n.service.d.ts +2 -2
- package/dist/i18n/services/language.service.d.ts +1 -1
- package/dist/i18n/services/translation.service.d.ts +3 -3
- package/dist/license/services/lemon-squeezy.service.js +2 -2
- package/dist/license/services/lemon-squeezy.service.js.map +1 -1
- package/dist/license/services/license.service.d.ts +5 -5
- package/dist/mailer/mailer.module.js +1 -49
- package/dist/mailer/mailer.module.js.map +1 -1
- package/dist/mailer/mailer.service.d.ts +11 -2
- package/dist/mailer/mailer.service.js +69 -3
- package/dist/mailer/mailer.service.js.map +1 -1
- package/dist/migration/migration.command.d.ts +1 -1
- package/dist/migration/migration.service.d.ts +3 -3
- package/dist/migration/types.d.ts +2 -2
- package/dist/setting/base-setting-group.d.ts +2 -2
- package/dist/setting/controllers/setting.controller.d.ts +1 -1
- package/dist/setting/create-setting-group.d.ts +2 -2
- package/dist/setting/dto/metadata.dto.d.ts +1 -1
- package/dist/setting/dto/setting.dto.d.ts +1 -1
- package/dist/setting/entities/metadata.entity.d.ts +1 -1
- package/dist/setting/entities/setting.entity.d.ts +1 -1
- package/dist/setting/repositories/metadata.repository.d.ts +1 -1
- package/dist/setting/repositories/setting.repository.d.ts +1 -1
- package/dist/setting/runtime-settings.seed.d.ts +3 -3
- package/dist/setting/seeds/metadata.seed.d.ts +1 -1
- package/dist/setting/seeds/setting.seed.d.ts +1 -1
- package/dist/setting/services/metadata.service.d.ts +1 -1
- package/dist/setting/services/runtime-settings.service.d.ts +1 -1
- package/dist/setting/services/setting.service.d.ts +4 -4
- package/dist/static/assets/browser-ponyfill-BHrZk0Ba.js +2 -0
- package/dist/static/assets/{cssMode-Cl7JZDYi.js → cssMode-BMhPv6LQ.js} +1 -1
- package/dist/static/assets/{freemarker2-Ddcsv82z.js → freemarker2-BeZMhdTv.js} +1 -1
- package/dist/static/assets/{handlebars-BggcQSEE.js → handlebars-BKG3g2Ua.js} +1 -1
- package/dist/static/assets/{html-FN76dqvq.js → html-DGzTITbD.js} +1 -1
- package/dist/static/assets/{htmlMode-BWRIcbsi.js → htmlMode-BqkaqtYx.js} +1 -1
- package/dist/static/assets/{index-DKozh3Um.css → index-BI1BtkYv.css} +1 -1
- package/dist/static/assets/{index-DOga3_TI.js → index-BZ6XUYgl.js} +2136 -2133
- package/dist/static/assets/{javascript-1EusMo1M.js → javascript-b5wI9R64.js} +1 -1
- package/dist/static/assets/{jsonMode-WNbHOGWa.js → jsonMode-CHkAHll-.js} +1 -1
- package/dist/static/assets/{liquid-D45yUZ7g.js → liquid-DWtcf_ol.js} +1 -1
- package/dist/static/assets/{lspLanguageFeatures-uwS-CJEU.js → lspLanguageFeatures-CogY5n0Q.js} +1 -1
- package/dist/static/assets/{mdx-PpOJ5pZ0.js → mdx-Bahv9Yam.js} +1 -1
- package/dist/static/assets/{python-B3PwxkAn.js → python-BMSmNQlB.js} +1 -1
- package/dist/static/assets/{razor-D0t-tcQz.js → razor-gQN4hgMu.js} +1 -1
- package/dist/static/assets/{tsMode-DEMWhFCv.js → tsMode-lBRxNuK8.js} +1 -1
- package/dist/static/assets/{typescript-DUe9LVDn.js → typescript-BIY26e43.js} +1 -1
- package/dist/static/assets/{xml-Dqap22Hx.js → xml-CU3COlzI.js} +1 -1
- package/dist/static/assets/{yaml-Suu2-EtH.js → yaml-Bu2tB__J.js} +1 -1
- package/dist/static/assets/{yaml.worker.entry-BdO9k22I.js → yaml.worker.entry-BB81z30Q.js} +228 -228
- package/dist/static/index.html +2 -2
- package/dist/static/locales/en/translation.json +6 -1
- package/dist/static/locales/fr/translation.json +6 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/user/controllers/auth.controller.d.ts +2 -2
- package/dist/user/controllers/credential.controller.d.ts +1 -1
- package/dist/user/controllers/model.controller.d.ts +3 -3
- package/dist/user/controllers/permission.controller.d.ts +2 -2
- package/dist/user/controllers/role.controller.d.ts +1 -1
- package/dist/user/controllers/user.controller.d.ts +3 -3
- package/dist/user/dto/credential.dto.d.ts +1 -1
- package/dist/user/dto/model.dto.d.ts +1 -1
- package/dist/user/dto/permission.dto.d.ts +1 -1
- package/dist/user/dto/role.dto.d.ts +1 -1
- package/dist/user/dto/user-profile.dto.d.ts +1 -1
- package/dist/user/dto/user.dto.d.ts +2 -2
- package/dist/user/entities/credential.entity.d.ts +1 -1
- package/dist/user/entities/model.entity.d.ts +2 -2
- package/dist/user/entities/model.entity.js +4 -3
- package/dist/user/entities/model.entity.js.map +1 -1
- package/dist/user/entities/permission.entity.d.ts +3 -3
- package/dist/user/entities/permission.entity.js +7 -7
- package/dist/user/entities/permission.entity.js.map +1 -1
- package/dist/user/entities/role.entity.d.ts +2 -2
- package/dist/user/entities/role.entity.js +3 -2
- package/dist/user/entities/role.entity.js.map +1 -1
- package/dist/user/entities/user-profile.entity.d.ts +3 -3
- package/dist/user/entities/user.entity.d.ts +1 -1
- package/dist/user/repositories/credential.repository.d.ts +1 -1
- package/dist/user/repositories/model.repository.d.ts +1 -1
- package/dist/user/repositories/permission.repository.d.ts +1 -1
- package/dist/user/repositories/role.repository.d.ts +1 -1
- package/dist/user/repositories/user.repository.d.ts +1 -1
- package/dist/user/seeds/model.seed.d.ts +1 -1
- package/dist/user/seeds/permission.seed.d.ts +1 -1
- package/dist/user/seeds/role.seed.d.ts +1 -1
- package/dist/user/seeds/user.seed.d.ts +1 -1
- package/dist/user/services/credential.service.d.ts +1 -1
- package/dist/user/services/model.service.d.ts +1 -1
- package/dist/user/services/passwordReset.service.d.ts +4 -4
- package/dist/user/services/permission.service.d.ts +1 -1
- package/dist/user/services/role.service.d.ts +1 -1
- package/dist/user/services/user.service.d.ts +1 -1
- package/dist/user/services/validate-account.service.d.ts +4 -4
- package/dist/utils/decorators/roles.decorator.d.ts +1 -1
- package/dist/utils/generics/base-orm.controller.d.ts +2 -2
- package/dist/utils/generics/base-orm.repository.d.ts +2 -2
- package/dist/utils/generics/base-orm.seeder.d.ts +1 -1
- package/dist/utils/generics/base-orm.service.d.ts +2 -2
- package/dist/utils/generics/extension.d.ts +3 -4
- package/dist/utils/generics/extension.js.map +1 -1
- package/dist/utils/helpers/safe-property-path.d.ts +1 -0
- package/dist/utils/helpers/safe-property-path.js +12 -0
- package/dist/utils/helpers/safe-property-path.js.map +1 -0
- package/dist/utils/helpers/zod.d.ts +1 -1
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.js +0 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/pipes/typeorm-search-filter.pipe.js +4 -3
- package/dist/utils/pipes/typeorm-search-filter.pipe.js.map +1 -1
- package/dist/utils/pipes/uuid.pipe.js +3 -3
- package/dist/utils/pipes/uuid.pipe.js.map +1 -1
- package/dist/utils/test/dummy/controllers/dummy.controller.d.ts +1 -1
- package/dist/utils/test/dummy/dto/dummy.dto.d.ts +1 -1
- package/dist/utils/test/dummy/dummy.action.d.ts +1 -1
- package/dist/utils/test/dummy/entities/dummy.entity.d.ts +1 -1
- package/dist/utils/test/dummy/repositories/dummy.repository.d.ts +1 -1
- package/dist/utils/test/dummy/services/dummy.service.d.ts +1 -1
- package/dist/utils/test/fixtures/attachment.d.ts +1 -1
- package/dist/utils/test/fixtures/content.d.ts +2 -2
- package/dist/utils/test/fixtures/contenttype.d.ts +2 -2
- package/dist/utils/test/fixtures/contenttype.js +2 -2
- package/dist/utils/test/fixtures/contenttype.js.map +1 -1
- package/dist/utils/test/fixtures/dummy.d.ts +2 -2
- package/dist/utils/test/fixtures/label-group.d.ts +3 -3
- package/dist/utils/test/fixtures/label.d.ts +2 -2
- package/dist/utils/test/fixtures/language.d.ts +2 -2
- package/dist/utils/test/fixtures/mcp-server.d.ts +3 -3
- package/dist/utils/test/fixtures/memory-definition.d.ts +2 -2
- package/dist/utils/test/fixtures/memory-record.d.ts +2 -2
- package/dist/utils/test/fixtures/menu.d.ts +1 -1
- package/dist/utils/test/fixtures/message.d.ts +1 -1
- package/dist/utils/test/fixtures/migration.d.ts +1 -1
- package/dist/utils/test/fixtures/model.d.ts +2 -2
- package/dist/utils/test/fixtures/permission.d.ts +4 -4
- package/dist/utils/test/fixtures/role.d.ts +2 -2
- package/dist/utils/test/fixtures/setting.d.ts +1 -1
- package/dist/utils/test/fixtures/stats.d.ts +1 -1
- package/dist/utils/test/fixtures/subscriber.d.ts +4 -4
- package/dist/utils/test/fixtures/translation.d.ts +1 -1
- package/dist/utils/test/fixtures/user.d.ts +2 -2
- package/dist/utils/test/fixtures/workflow-run.d.ts +2 -2
- package/dist/utils/test/fixtures/workflow.d.ts +2 -2
- package/dist/utils/test/providers/i18n-service.provider.d.ts +1 -1
- package/dist/utils/test/providers/mailer-service.provider.d.ts +3 -3
- package/dist/utils/test/providers/setting-service.provider.d.ts +1 -1
- package/dist/utils/test/test.d.ts +4 -0
- package/dist/utils/test/test.js +34 -1
- package/dist/utils/test/test.js.map +1 -1
- package/dist/utils/test/types.d.ts +1 -1
- package/dist/utils/test/utils.d.ts +2 -1
- package/dist/utils/test/utils.js +181 -41
- package/dist/utils/test/utils.js.map +1 -1
- package/dist/utils/types/dto.types.d.ts +1 -1
- package/dist/utils/types/entity-event.types.d.ts +1 -1
- package/dist/websocket/services/socket-event-dispatcher.service.d.ts +1 -1
- package/dist/websocket/websocket.gateway.d.ts +6 -6
- package/dist/websocket/websocket.gateway.js +2 -2
- package/dist/websocket/websocket.gateway.js.map +1 -1
- package/dist/workflow/contexts/conversational-workflow.context.d.ts +1 -1
- package/dist/workflow/contexts/workflow-runtime.context.d.ts +10 -10
- package/dist/workflow/controllers/mcp-server.controller.d.ts +1 -1
- package/dist/workflow/controllers/memory-definition.controller.d.ts +1 -1
- package/dist/workflow/controllers/workflow-run.controller.d.ts +1 -1
- package/dist/workflow/controllers/workflow-version.controller.d.ts +1 -1
- package/dist/workflow/controllers/workflow.controller.d.ts +4 -4
- package/dist/workflow/dto/mcp-server.dto.d.ts +1 -1
- package/dist/workflow/dto/memory-definition.dto.d.ts +1 -1
- package/dist/workflow/dto/memory-record.dto.d.ts +1 -1
- package/dist/workflow/dto/workflow-run.dto.d.ts +1 -1
- package/dist/workflow/dto/workflow-version.dto.d.ts +1 -1
- package/dist/workflow/dto/workflow.dto.d.ts +1 -1
- package/dist/workflow/entities/mcp-server.entity.d.ts +2 -2
- package/dist/workflow/entities/memory-definition.entity.d.ts +1 -1
- package/dist/workflow/entities/memory-record.entity.d.ts +4 -4
- package/dist/workflow/entities/workflow-run.entity.d.ts +4 -4
- package/dist/workflow/entities/workflow-version.entity.d.ts +3 -3
- package/dist/workflow/entities/workflow-version.entity.js +6 -4
- package/dist/workflow/entities/workflow-version.entity.js.map +1 -1
- package/dist/workflow/entities/workflow.entity.d.ts +2 -2
- package/dist/workflow/lib/trigger-event-wrapper.d.ts +1 -1
- package/dist/workflow/repositories/mcp-server.repository.d.ts +1 -1
- package/dist/workflow/repositories/memory-definition.repository.d.ts +1 -1
- package/dist/workflow/repositories/memory-record.repository.d.ts +1 -1
- package/dist/workflow/repositories/workflow-run.repository.d.ts +1 -1
- package/dist/workflow/repositories/workflow-version.repository.d.ts +1 -1
- package/dist/workflow/repositories/workflow.repository.d.ts +1 -1
- package/dist/workflow/seeds/memory-definition.seed.d.ts +1 -1
- package/dist/workflow/seeds/workflow.seed.d.ts +1 -1
- package/dist/workflow/services/agentic.service.d.ts +4 -4
- package/dist/workflow/services/mcp-client-pool.service.d.ts +2 -2
- package/dist/workflow/services/mcp-server.service.d.ts +1 -1
- package/dist/workflow/services/memory-definition.service.d.ts +1 -1
- package/dist/workflow/services/memory-record.service.d.ts +1 -1
- package/dist/workflow/services/memory.service.js +1 -0
- package/dist/workflow/services/memory.service.js.map +1 -1
- package/dist/workflow/services/workflow-run.service.d.ts +1 -1
- package/dist/workflow/services/workflow-scheduler.service.d.ts +3 -3
- package/dist/workflow/services/workflow-version.service.d.ts +1 -1
- package/dist/workflow/services/workflow.service.d.ts +3 -3
- package/dist/workflow/utils/memory-store.js +12 -1
- package/dist/workflow/utils/memory-store.js.map +1 -1
- package/package.json +63 -32
- package/src/attachment/utilities/index.ts +2 -2
- package/src/bootstrap.ts +10 -1
- package/src/channel/lib/Handler.ts +3 -2
- package/src/chat/chat.module.ts +1 -1
- package/src/chat/entities/subscriber.entity.ts +14 -7
- package/src/chat/services/subscriber.service.ts +3 -2
- package/src/cms/entities/content-type.entity.ts +12 -4
- package/src/cms/entities/content.entity.ts +13 -5
- package/src/extensions/actions/web/http-request.action.ts +23 -4
- package/src/extensions/actions/web/i18n/en.translations.json +9 -0
- package/src/extensions/actions/web/i18n/fr.translations.json +9 -0
- package/src/extensions/actions/web/send-mail.action.ts +89 -0
- package/src/extensions/channels/web/base-web-channel.ts +3 -2
- package/src/extensions/index.ts +2 -0
- package/src/global.d.ts +0 -6
- package/src/license/services/lemon-squeezy.service.ts +3 -2
- package/src/mailer/mailer.module.ts +1 -54
- package/src/mailer/mailer.service.ts +86 -2
- package/src/user/entities/model.entity.ts +13 -5
- package/src/user/entities/permission.entity.ts +21 -9
- package/src/user/entities/role.entity.ts +12 -4
- package/src/utils/generics/extension.ts +1 -3
- package/src/utils/helpers/safe-property-path.ts +13 -0
- package/src/utils/index.ts +0 -2
- package/src/utils/pipes/typeorm-search-filter.pipe.ts +4 -3
- package/src/utils/pipes/uuid.pipe.ts +3 -3
- package/src/utils/test/fixtures/contenttype.ts +1 -1
- package/src/utils/test/test.ts +39 -0
- package/src/utils/test/utils.ts +278 -52
- package/src/websocket/websocket.gateway.ts +2 -2
- package/src/workflow/entities/workflow-version.entity.ts +8 -3
- package/src/workflow/services/memory.service.ts +1 -0
- package/src/workflow/utils/memory-store.ts +13 -1
- package/dist/mailer/mjml-adapter.class.d.ts +0 -4
- package/dist/mailer/mjml-adapter.class.js +0 -67
- package/dist/mailer/mjml-adapter.class.js.map +0 -1
- package/dist/utils/types/extension.d.ts +0 -4
- package/dist/utils/types/extension.js +0 -3
- package/dist/utils/types/extension.js.map +0 -1
- package/src/mailer/mjml-adapter.class.ts +0 -41
- package/src/utils/types/extension.ts +0 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ContentType } from '@hexabot-ai/types';
|
|
2
|
-
import { InferCreateDto } from
|
|
3
|
-
import { BaseOrmService } from
|
|
2
|
+
import { InferCreateDto } from "../../utils";
|
|
3
|
+
import { BaseOrmService } from "../../utils/generics/base-orm.service";
|
|
4
4
|
import { ContentTypeOrmEntity } from '../entities/content-type.entity';
|
|
5
5
|
import { ContentTypeRepository } from '../repositories/content-type.repository';
|
|
6
6
|
export declare const DEFAULT_CONTENT_TYPE_SCHEMA: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ContentFull, ContentType, StdOutgoingListMessageData, ContentOptions } from '@hexabot-ai/types';
|
|
2
|
-
import { BaseOrmService } from
|
|
2
|
+
import { BaseOrmService } from "../../utils/generics/base-orm.service";
|
|
3
3
|
import { ContentOrmEntity } from '../entities/content.entity';
|
|
4
4
|
import { ContentRepository } from '../repositories/content.repository';
|
|
5
5
|
import { RagHit, RagQueryOptions } from '../types/rag';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Cache } from 'cache-manager';
|
|
2
|
-
import { BaseOrmService } from
|
|
2
|
+
import { BaseOrmService } from "../../utils/generics/base-orm.service";
|
|
3
3
|
import { MenuOrmEntity } from '../entities/menu.entity';
|
|
4
4
|
import { MenuRepository } from '../repositories/menu.repository';
|
|
5
5
|
import { MenuTree } from '../types/menu';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OnModuleInit } from '@nestjs/common';
|
|
2
2
|
import { KeywordTableIndex, VectorStoreIndex } from 'llamaindex';
|
|
3
|
-
import { LoggerService } from
|
|
4
|
-
import { SettingService } from
|
|
3
|
+
import { LoggerService } from "../../logger/logger.service";
|
|
4
|
+
import { SettingService } from "../../setting/services/setting.service";
|
|
5
5
|
export declare class RagBackendService implements OnModuleInit {
|
|
6
6
|
private readonly settingService;
|
|
7
7
|
private readonly logger;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { LoggerService } from
|
|
2
|
-
import { SettingService } from
|
|
1
|
+
import { LoggerService } from "../../logger/logger.service";
|
|
2
|
+
import { SettingService } from "../../setting/services/setting.service";
|
|
3
3
|
import { ContentService } from './content.service';
|
|
4
4
|
import { RagBackendService } from './rag-backend.service';
|
|
5
5
|
export declare class RagIndexerService {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SettingService } from
|
|
1
|
+
import { SettingService } from "../../setting/services/setting.service";
|
|
2
2
|
import { RagHit, RagQueryOptions } from '../types/rag';
|
|
3
3
|
import { RagBackendService } from './rag-backend.service';
|
|
4
4
|
export declare class RagRetrieverService {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { LoggerService } from
|
|
2
|
-
import { SettingService } from
|
|
3
|
-
import { UserOrmEntity } from
|
|
4
|
-
import { DeleteEntityEvent, InsertEntityEvent, UpdateEntityEvent } from
|
|
1
|
+
import { LoggerService } from "../../logger/logger.service";
|
|
2
|
+
import { SettingService } from "../../setting/services/setting.service";
|
|
3
|
+
import { UserOrmEntity } from "../../user";
|
|
4
|
+
import { DeleteEntityEvent, InsertEntityEvent, UpdateEntityEvent } from "../../utils/types/entity-event.types";
|
|
5
5
|
import { ContentOrmEntity } from '../entities/content.entity';
|
|
6
6
|
import { RagHit, RagQueryOptions } from '../types/rag';
|
|
7
7
|
import { RagBackendService } from './rag-backend.service';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InferTransformDto, TDto } from
|
|
1
|
+
import { InferTransformDto, TDto } from "../../utils";
|
|
2
2
|
export declare abstract class BaseOrmEntity<Dto extends TDto = TDto> {
|
|
3
3
|
abstract plainCls: Dto['transformers']['plain'];
|
|
4
4
|
abstract fullCls: Dto['transformers']['full'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { HelperService } from
|
|
2
|
-
import { LoggerService } from
|
|
3
|
-
import { SettingService } from
|
|
1
|
+
import { HelperService } from "../helper/helper.service";
|
|
2
|
+
import { LoggerService } from "../logger/logger.service";
|
|
3
|
+
import { SettingService } from "../setting/services/setting.service";
|
|
4
4
|
import { TExtractGroup } from './types';
|
|
5
5
|
export declare class CleanupService {
|
|
6
6
|
private readonly helperService;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnApplicationBootstrap } from '@nestjs/common';
|
|
2
|
-
import { LoggerService } from
|
|
2
|
+
import { LoggerService } from "../logger/logger.service";
|
|
3
3
|
import { CleanupService } from './cleanup.service';
|
|
4
4
|
export declare class ExtensionModule implements OnApplicationBootstrap {
|
|
5
5
|
private readonly loggerService;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ToolSet } from 'ai';
|
|
2
|
-
import { ExecArgs } from
|
|
3
|
-
import { ActionService } from
|
|
4
|
-
import { WorkflowRuntimeContext } from
|
|
2
|
+
import { ExecArgs } from "../../../actions";
|
|
3
|
+
import { ActionService } from "../../../actions/actions.service";
|
|
4
|
+
import { WorkflowRuntimeContext } from "../../../workflow/contexts/workflow-runtime.context";
|
|
5
5
|
import { AiBaseAction } from './ai-base.action';
|
|
6
6
|
import { AiAgentInput, AiAgentOutput, AiAgentSettings } from './ai-schemas';
|
|
7
7
|
export declare class AiAgentAction extends AiBaseAction<AiAgentInput, AiAgentOutput, WorkflowRuntimeContext, AiAgentSettings> {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ProviderV2, ProviderV3 } from '@ai-sdk/provider';
|
|
2
2
|
import { Message, StdIncomingMessage, StdOutgoingMessage } from '@hexabot-ai/types';
|
|
3
3
|
import { LanguageModel, LanguageModelUsage, ModelMessage, ToolSet, hasToolCall, stepCountIs } from 'ai';
|
|
4
|
-
import { ActionService } from
|
|
5
|
-
import { BaseAction } from
|
|
6
|
-
import { ActionMetadata } from
|
|
7
|
-
import { RuntimeBindings } from
|
|
8
|
-
import { WorkflowRuntimeContext } from
|
|
4
|
+
import { ActionService } from "../../../actions/actions.service";
|
|
5
|
+
import { BaseAction } from "../../../actions/base-action";
|
|
6
|
+
import { ActionMetadata } from "../../../actions/types";
|
|
7
|
+
import { RuntimeBindings } from "../../../bindings/runtime-bindings";
|
|
8
|
+
import { WorkflowRuntimeContext } from "../../../workflow/contexts/workflow-runtime.context";
|
|
9
9
|
import { AiCommonSettings, AiPromptInput } from './ai-schemas';
|
|
10
10
|
export type { AiCommonSettings, AiPromptInput } from './ai-schemas';
|
|
11
11
|
export type ProviderInitOptions = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ActionService } from
|
|
2
|
-
import { WorkflowRuntimeContext } from
|
|
1
|
+
import { ActionService } from "../../../actions/actions.service";
|
|
2
|
+
import { WorkflowRuntimeContext } from "../../../workflow/contexts/workflow-runtime.context";
|
|
3
3
|
import { AiPromptInput } from './ai-base.action';
|
|
4
4
|
import { AiGenerateObjectInput } from './ai-schemas';
|
|
5
5
|
import { AiGenerateObjectBaseAction } from './generate-object.base.action';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ActionService } from
|
|
2
|
-
import { ActionMetadata, ExecArgs } from
|
|
3
|
-
import { WorkflowRuntimeContext } from
|
|
1
|
+
import { ActionService } from "../../../actions/actions.service";
|
|
2
|
+
import { ActionMetadata, ExecArgs } from "../../../actions/types";
|
|
3
|
+
import { WorkflowRuntimeContext } from "../../../workflow/contexts/workflow-runtime.context";
|
|
4
4
|
import { AiBaseAction, AiPromptInput } from './ai-base.action';
|
|
5
5
|
import { AiGenerateObjectOutput, AiGenerateObjectSettings } from './ai-schemas';
|
|
6
6
|
export declare abstract class AiGenerateObjectBaseAction<I, C extends WorkflowRuntimeContext = WorkflowRuntimeContext> extends AiBaseAction<I, AiGenerateObjectOutput, C, AiGenerateObjectSettings> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ActionService } from
|
|
2
|
-
import { WorkflowRuntimeContext } from
|
|
1
|
+
import { ActionService } from "../../../actions/actions.service";
|
|
2
|
+
import { WorkflowRuntimeContext } from "../../../workflow/contexts/workflow-runtime.context";
|
|
3
3
|
import { AiPromptInput } from './ai-base.action';
|
|
4
4
|
import { AiGenerateReplyInput } from './ai-schemas';
|
|
5
5
|
import { AiGenerateTextBaseAction } from './generate-text.base.action';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ActionService } from
|
|
2
|
-
import { WorkflowRuntimeContext } from
|
|
1
|
+
import { ActionService } from "../../../actions/actions.service";
|
|
2
|
+
import { WorkflowRuntimeContext } from "../../../workflow/contexts/workflow-runtime.context";
|
|
3
3
|
import { AiPromptInput } from './ai-base.action';
|
|
4
4
|
import { AiGenerateTextInput } from './ai-schemas';
|
|
5
5
|
import { AiGenerateTextBaseAction } from './generate-text.base.action';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ActionService } from
|
|
2
|
-
import { ActionMetadata, ExecArgs } from
|
|
3
|
-
import { WorkflowRuntimeContext } from
|
|
1
|
+
import { ActionService } from "../../../actions/actions.service";
|
|
2
|
+
import { ActionMetadata, ExecArgs } from "../../../actions/types";
|
|
3
|
+
import { WorkflowRuntimeContext } from "../../../workflow/contexts/workflow-runtime.context";
|
|
4
4
|
import { AiBaseAction, AiPromptInput } from './ai-base.action';
|
|
5
5
|
import { AiGenerateTextOutput, AiGenerateTextSettings } from './ai-schemas';
|
|
6
6
|
export declare abstract class AiGenerateTextBaseAction<I, C extends WorkflowRuntimeContext = WorkflowRuntimeContext> extends AiBaseAction<I, AiGenerateTextOutput, C, AiGenerateTextSettings> {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ActionService } from
|
|
2
|
-
import { WorkflowRuntimeContext } from
|
|
1
|
+
import { ActionService } from "../../../actions/actions.service";
|
|
2
|
+
import { WorkflowRuntimeContext } from "../../../workflow/contexts/workflow-runtime.context";
|
|
3
3
|
import { AiPromptInput } from './ai-base.action';
|
|
4
4
|
import { AiInferObjectInput } from './ai-schemas';
|
|
5
5
|
import { AiGenerateObjectBaseAction } from './generate-object.base.action';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WorkflowRuntimeContext } from
|
|
1
|
+
import { WorkflowRuntimeContext } from "../../../workflow/contexts/workflow-runtime.context";
|
|
2
2
|
export declare const RetrieveRagContentAction: import("@nestjs/common").Type<import("../../..").BaseAction<{
|
|
3
3
|
query: string;
|
|
4
4
|
}, {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ExecArgs } from
|
|
3
|
-
import { ActionService } from
|
|
4
|
-
import { BaseAction } from
|
|
5
|
-
import { WorkflowRuntimeContext } from
|
|
2
|
+
import { ExecArgs } from "../../../actions";
|
|
3
|
+
import { ActionService } from "../../../actions/actions.service";
|
|
4
|
+
import { BaseAction } from "../../../actions/base-action";
|
|
5
|
+
import { WorkflowRuntimeContext } from "../../../workflow/contexts/workflow-runtime.context";
|
|
6
6
|
declare const updateMemorySchema: z.ZodObject<{
|
|
7
7
|
memory: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
8
8
|
}, z.core.$strip>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FileType } from '@hexabot-ai/types';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { ExecArgs } from
|
|
4
|
-
import { ActionService } from
|
|
5
|
-
import { ConversationalWorkflowContext } from
|
|
3
|
+
import { ExecArgs } from "../../../actions";
|
|
4
|
+
import { ActionService } from "../../../actions/actions.service";
|
|
5
|
+
import { ConversationalWorkflowContext } from "../../../workflow/contexts/conversational-workflow.context";
|
|
6
6
|
import { MessageAction, MessageActionSettings } from '../messaging/message-action.base';
|
|
7
7
|
declare const attachmentInputSchema: z.ZodObject<{
|
|
8
8
|
attachment: z.ZodDefault<z.ZodObject<{
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Settings } from '@hexabot-ai/agentic';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { ExecArgs } from
|
|
4
|
-
import { ActionService } from
|
|
5
|
-
import { BaseAction } from
|
|
6
|
-
import { ConversationalWorkflowContext } from
|
|
3
|
+
import { ExecArgs } from "../../../actions";
|
|
4
|
+
import { ActionService } from "../../../actions/actions.service";
|
|
5
|
+
import { BaseAction } from "../../../actions/base-action";
|
|
6
|
+
import { ConversationalWorkflowContext } from "../../../workflow/contexts/conversational-workflow.context";
|
|
7
7
|
export declare const awaitReplyResumeSchema: z.ZodObject<{
|
|
8
8
|
message_type: z.ZodOptional<z.ZodEnum<typeof import("@hexabot-ai/types").IncomingMessageType>>;
|
|
9
9
|
payload: z.ZodOptional<z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ExecArgs } from
|
|
3
|
-
import { ActionService } from
|
|
4
|
-
import { ConversationalWorkflowContext } from
|
|
2
|
+
import { ExecArgs } from "../../../actions";
|
|
3
|
+
import { ActionService } from "../../../actions/actions.service";
|
|
4
|
+
import { ConversationalWorkflowContext } from "../../../workflow/contexts/conversational-workflow.context";
|
|
5
5
|
import { MessageAction, MessageActionSettings } from './message-action.base';
|
|
6
6
|
declare const buttonsInputSchema: z.ZodObject<{
|
|
7
7
|
text: z.ZodDefault<z.ZodString>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ExecArgs } from
|
|
3
|
-
import { ActionService } from
|
|
4
|
-
import { ConversationalWorkflowContext } from
|
|
2
|
+
import { ExecArgs } from "../../../actions";
|
|
3
|
+
import { ActionService } from "../../../actions/actions.service";
|
|
4
|
+
import { ConversationalWorkflowContext } from "../../../workflow/contexts/conversational-workflow.context";
|
|
5
5
|
import { MessageAction } from './message-action.base';
|
|
6
6
|
declare const listActionInputSchema: z.ZodObject<{
|
|
7
7
|
query: z.ZodOptional<z.ZodAny>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Subscriber, StdIncomingMessage, StdOutgoingMessage, StdOutgoingMessageEnvelope } from '@hexabot-ai/types';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { ActionService } from
|
|
4
|
-
import { BaseAction } from
|
|
5
|
-
import { ActionMetadata } from
|
|
6
|
-
import { MessageInboundEvent } from
|
|
7
|
-
import { EnvelopeFactory } from
|
|
8
|
-
import { ConversationalWorkflowContext } from
|
|
3
|
+
import { ActionService } from "../../../actions/actions.service";
|
|
4
|
+
import { BaseAction } from "../../../actions/base-action";
|
|
5
|
+
import { ActionMetadata } from "../../../actions/types";
|
|
6
|
+
import { MessageInboundEvent } from "../../../channel/lib/inbound-events";
|
|
7
|
+
import { EnvelopeFactory } from "../../../chat/helpers/envelope-factory";
|
|
8
|
+
import { ConversationalWorkflowContext } from "../../../workflow/contexts/conversational-workflow.context";
|
|
9
9
|
declare const sentFormats: readonly ["text", "quickReply", "buttons", "list", "carousel", "attachment"];
|
|
10
10
|
export declare const sentMessageSchema: z.ZodObject<{
|
|
11
11
|
mid: z.ZodOptional<z.ZodString>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ExecArgs } from
|
|
3
|
-
import { ActionService } from
|
|
4
|
-
import { ConversationalWorkflowContext } from
|
|
2
|
+
import { ExecArgs } from "../../../actions";
|
|
3
|
+
import { ActionService } from "../../../actions/actions.service";
|
|
4
|
+
import { ConversationalWorkflowContext } from "../../../workflow/contexts/conversational-workflow.context";
|
|
5
5
|
import { MessageAction, MessageActionSettings } from './message-action.base';
|
|
6
6
|
declare const quickRepliesInputSchema: z.ZodObject<{
|
|
7
7
|
text: z.ZodDefault<z.ZodString>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ExecArgs } from
|
|
3
|
-
import { ActionService } from
|
|
4
|
-
import { ConversationalWorkflowContext } from
|
|
2
|
+
import { ExecArgs } from "../../../actions";
|
|
3
|
+
import { ActionService } from "../../../actions/actions.service";
|
|
4
|
+
import { ConversationalWorkflowContext } from "../../../workflow/contexts/conversational-workflow.context";
|
|
5
5
|
import { MessageAction, MessageActionSettings } from './message-action.base';
|
|
6
6
|
declare const textMessageInputSchema: z.ZodObject<{
|
|
7
7
|
text: z.ZodDefault<z.ZodString>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConversationalWorkflowContext } from
|
|
1
|
+
import { ConversationalWorkflowContext } from "../../../workflow/contexts/conversational-workflow.context";
|
|
2
2
|
export declare const SubscriberHandoverAction: import("@nestjs/common").Type<import("../../..").BaseAction<{
|
|
3
3
|
mode: "auto" | "specific";
|
|
4
4
|
user_id?: string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ConversationalWorkflowContext } from
|
|
1
|
+
import { ConversationalWorkflowContext } from "../../../workflow/contexts/conversational-workflow.context";
|
|
2
2
|
export declare const SubscriberUpdateLabelsAction: import("@nestjs/common").Type<import("../../..").BaseAction<{
|
|
3
3
|
labels_to_assign?: string[] | undefined;
|
|
4
4
|
labels_to_remove?: string[] | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { WorkflowRuntimeContext } from
|
|
1
|
+
import { WorkflowRuntimeContext } from "../../../workflow/contexts/workflow-runtime.context";
|
|
2
2
|
export declare const HttpRequestAction: import("@nestjs/common").Type<import("../../..").BaseAction<{
|
|
3
3
|
url: string;
|
|
4
4
|
headers?: Record<string, string> | undefined;
|
|
@@ -85,6 +85,20 @@ function isJsonContentType(contentType) {
|
|
|
85
85
|
normalized.includes('text/json') ||
|
|
86
86
|
normalized.includes('+json'));
|
|
87
87
|
}
|
|
88
|
+
function normalizeHeaderValue(value) {
|
|
89
|
+
if (value === undefined || value === null) {
|
|
90
|
+
return undefined;
|
|
91
|
+
}
|
|
92
|
+
if (Array.isArray(value)) {
|
|
93
|
+
return value.map(String).join(', ');
|
|
94
|
+
}
|
|
95
|
+
if (typeof value === 'string' ||
|
|
96
|
+
typeof value === 'number' ||
|
|
97
|
+
typeof value === 'boolean') {
|
|
98
|
+
return String(value);
|
|
99
|
+
}
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
88
102
|
function resolveFinalUrl(response) {
|
|
89
103
|
return response.request?.res?.responseUrl ?? response.request?.responseUrl;
|
|
90
104
|
}
|
|
@@ -133,10 +147,7 @@ exports.HttpRequestAction = (0, create_action_1.createAction)({
|
|
|
133
147
|
validateStatus: () => true,
|
|
134
148
|
...(requestData !== undefined ? { data: requestData } : {}),
|
|
135
149
|
});
|
|
136
|
-
const
|
|
137
|
-
const contentType = Array.isArray(contentTypeHeader)
|
|
138
|
-
? contentTypeHeader.join(', ')
|
|
139
|
-
: contentTypeHeader;
|
|
150
|
+
const contentType = normalizeHeaderValue(response.headers?.['content-type']);
|
|
140
151
|
const responseData = response.data;
|
|
141
152
|
let body = '';
|
|
142
153
|
if (responseData === undefined || responseData === null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-request.action.js","sourceRoot":"","sources":["../../../../src/extensions/actions/web/http-request.action.ts"],"names":[],"mappings":";;;;;;AAMA,iDAAsD;AACtD,kDAA0B;AAC1B,6BAAwB;AAExB,kEAAuD;AAGvD,MAAM,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IACtC,GAAG,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC;QAChB,KAAK,EAAE,KAAK;QACZ,WAAW,EAAE,uCAAuC;KACrD,CAAC;IACF,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC;QACxD,KAAK,EAAE,SAAS;QAChB,WAAW,EACT,qEAAqE;KACxE,CAAC;IACF,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAA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nC,CAAC;QAEF,IAAI,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,OAAO,CAAC;gBACnC,GAAG,EAAE,KAAK,CAAC,GAAG;gBACd,MAAM;gBACN,OAAO;gBACP,OAAO,EAAE,SAAS;gBAClB,cAAc,EAAE,GAAG,EAAE,CAAC,IAAI;gBAC1B,GAAG,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;aAC5D,CAAC,CAAC;YACH,MAAM,
|
|
1
|
+
{"version":3,"file":"http-request.action.js","sourceRoot":"","sources":["../../../../src/extensions/actions/web/http-request.action.ts"],"names":[],"mappings":";;;;;;AAMA,iDAAsD;AACtD,kDAA0B;AAC1B,6BAAwB;AAExB,kEAAuD;AAGvD,MAAM,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IACtC,GAAG,EAAE,OAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC;QAChB,KAAK,EAAE,KAAK;QACZ,WAAW,EAAE,uCAAuC;KACrD,CAAC;IACF,OAAO,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC;QACxD,KAAK,EAAE,SAAS;QAChB,WAAW,EACT,qEAAqE;KACxE,CAAC;IACF,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC;QAC7C,KAAK,EAAE,MAAM;QACb,WAAW,EACT,wFAAwF;KAC3F,CAAC;CACH,CAAC,CAAC;AACH,MAAM,yBAAyB,GAAG,OAAC,CAAC,YAAY,CAAC;IAC/C,MAAM,EAAE,OAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,C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C,OAAO,CAAC,CAAC,CAAC,uBAAuB,CAAC;YAEnE,MAAM,CAAC,IAAI,CAAC,2BAA2B,KAAK,CAAC,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC,CAAC;YAExE,OAAO;gBACL,EAAE,EAAE,KAAK;gBACT,MAAM,EAAE,CAAC;gBACT,WAAW,EAAE,eAAe;gBAC5B,GAAG,EAAE,KAAK,CAAC,GAAG;gBACd,OAAO,EAAE,EAAE;gBACX,IAAI,EAAE,EAAE;gBACR,SAAS,EAAE,KAAK;gBAChB,KAAK,EAAE,OAAO;aACf,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC,CAAC;AAEH,kBAAe,yBAAiB,CAAC"}
|
|
@@ -25,5 +25,14 @@
|
|
|
25
25
|
"URL": "URL",
|
|
26
26
|
"Whether the HTTP response status indicates success.": "Whether the HTTP response status indicates success.",
|
|
27
27
|
"Whether the response body was truncated.": "Whether the response body was truncated."
|
|
28
|
+
},
|
|
29
|
+
"send_mail": {
|
|
30
|
+
"Sends an email using HTML content.": "Sends an email using HTML content.",
|
|
31
|
+
"To": "To",
|
|
32
|
+
"Recipient email address.": "Recipient email address.",
|
|
33
|
+
"Title": "Title",
|
|
34
|
+
"Email subject.": "Email subject.",
|
|
35
|
+
"Content (HTML)": "Content (HTML)",
|
|
36
|
+
"HTML email content.": "HTML email content."
|
|
28
37
|
}
|
|
29
38
|
}
|
|
@@ -25,5 +25,14 @@
|
|
|
25
25
|
"URL": "URL",
|
|
26
26
|
"Whether the HTTP response status indicates success.": "Indique si le statut de la réponse HTTP signale un succès.",
|
|
27
27
|
"Whether the response body was truncated.": "Indique si le corps de la réponse a été tronqué."
|
|
28
|
+
},
|
|
29
|
+
"send_mail": {
|
|
30
|
+
"Sends an email using HTML content.": "Envoie un e-mail en utilisant du contenu HTML.",
|
|
31
|
+
"To": "À",
|
|
32
|
+
"Recipient email address.": "Adresse e-mail du destinataire.",
|
|
33
|
+
"Title": "Titre",
|
|
34
|
+
"Email subject.": "Objet de l'e-mail.",
|
|
35
|
+
"Content (HTML)": "Contenu (HTML)",
|
|
36
|
+
"HTML email content.": "Contenu de l'e-mail en HTML."
|
|
28
37
|
}
|
|
29
38
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { BaseAction, ExecArgs } from "../../../actions";
|
|
3
|
+
import { ActionService } from "../../../actions/actions.service";
|
|
4
|
+
import { MailerService } from "../../../mailer/mailer.service";
|
|
5
|
+
import { WorkflowRuntimeContext } from "../../../workflow/contexts/workflow-runtime.context";
|
|
6
|
+
declare const sendMailInputSchema: z.ZodObject<{
|
|
7
|
+
to: z.ZodEmail;
|
|
8
|
+
title: z.ZodString;
|
|
9
|
+
content: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
declare const sendMailOutputSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
12
|
+
success: z.ZodLiteral<true>;
|
|
13
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
14
|
+
success: z.ZodLiteral<false>;
|
|
15
|
+
error: z.ZodString;
|
|
16
|
+
}, z.core.$strip>]>;
|
|
17
|
+
type SendMailInput = z.infer<typeof sendMailInputSchema>;
|
|
18
|
+
type SendMailOutput = z.infer<typeof sendMailOutputSchema>;
|
|
19
|
+
export declare class SendMailAction extends BaseAction<SendMailInput, SendMailOutput, WorkflowRuntimeContext> {
|
|
20
|
+
private readonly mailerService;
|
|
21
|
+
constructor(actionService: ActionService, mailerService: MailerService);
|
|
22
|
+
execute({ input, context, }: ExecArgs<SendMailInput, WorkflowRuntimeContext>): Promise<{
|
|
23
|
+
success: true;
|
|
24
|
+
error?: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
success: false;
|
|
27
|
+
error: string;
|
|
28
|
+
}>;
|
|
29
|
+
}
|
|
30
|
+
export default SendMailAction;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SendMailAction = void 0;
|
|
13
|
+
const common_1 = require("@nestjs/common");
|
|
14
|
+
const zod_1 = require("zod");
|
|
15
|
+
const actions_1 = require("../../../actions");
|
|
16
|
+
const actions_service_1 = require("../../../actions/actions.service");
|
|
17
|
+
const mailer_service_1 = require("../../../mailer/mailer.service");
|
|
18
|
+
const sendMailInputSchema = zod_1.z.object({
|
|
19
|
+
to: zod_1.z.email().meta({
|
|
20
|
+
title: 'To',
|
|
21
|
+
description: 'Recipient email address.',
|
|
22
|
+
}),
|
|
23
|
+
title: zod_1.z.string().min(1).meta({
|
|
24
|
+
title: 'Title',
|
|
25
|
+
description: 'Email subject.',
|
|
26
|
+
}),
|
|
27
|
+
content: zod_1.z.string().min(1).meta({
|
|
28
|
+
title: 'Content (HTML)',
|
|
29
|
+
description: 'HTML email content.',
|
|
30
|
+
}),
|
|
31
|
+
});
|
|
32
|
+
const sendMailOutputSchema = zod_1.z.union([
|
|
33
|
+
zod_1.z.object({
|
|
34
|
+
success: zod_1.z.literal(true),
|
|
35
|
+
}),
|
|
36
|
+
zod_1.z.object({
|
|
37
|
+
success: zod_1.z.literal(false),
|
|
38
|
+
error: zod_1.z.string(),
|
|
39
|
+
}),
|
|
40
|
+
]);
|
|
41
|
+
let SendMailAction = class SendMailAction extends actions_1.BaseAction {
|
|
42
|
+
constructor(actionService, mailerService) {
|
|
43
|
+
super({
|
|
44
|
+
name: 'send_mail',
|
|
45
|
+
description: 'Sends an email using HTML content.',
|
|
46
|
+
group: 'web',
|
|
47
|
+
icon: 'Mail',
|
|
48
|
+
color: '#68b1ff',
|
|
49
|
+
inputSchema: sendMailInputSchema,
|
|
50
|
+
outputSchema: sendMailOutputSchema,
|
|
51
|
+
}, actionService);
|
|
52
|
+
this.mailerService = mailerService;
|
|
53
|
+
}
|
|
54
|
+
async execute({ input, context, }) {
|
|
55
|
+
try {
|
|
56
|
+
await this.mailerService.sendMail({
|
|
57
|
+
to: input.to,
|
|
58
|
+
subject: input.title,
|
|
59
|
+
html: input.content,
|
|
60
|
+
});
|
|
61
|
+
return { success: true };
|
|
62
|
+
}
|
|
63
|
+
catch (error) {
|
|
64
|
+
const message = error instanceof Error ? error.message : 'Could not send email';
|
|
65
|
+
context.services.logger.error('send_mail action failed', message, '', {
|
|
66
|
+
to: input.to,
|
|
67
|
+
});
|
|
68
|
+
return { success: false, error: message };
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
exports.SendMailAction = SendMailAction;
|
|
73
|
+
exports.SendMailAction = SendMailAction = __decorate([
|
|
74
|
+
(0, common_1.Injectable)(),
|
|
75
|
+
__metadata("design:paramtypes", [actions_service_1.ActionService,
|
|
76
|
+
mailer_service_1.MailerService])
|
|
77
|
+
], SendMailAction);
|
|
78
|
+
exports.default = SendMailAction;
|
|
79
|
+
//# sourceMappingURL=send-mail.action.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"send-mail.action.js","sourceRoot":"","sources":["../../../../src/extensions/actions/web/send-mail.action.ts"],"names":[],"mappings":";;;;;;;;;;;;AAMA,2CAA4C;AAC5C,6BAAwB;AAExB,8CAAiD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D,IAAI,CAAC;YACH,MAAM,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC;gBAChC,EAAE,EAAE,KAAK,CAAC,EAAE;gBACZ,OAAO,EAAE,KAAK,CAAC,KAAK;gBACpB,IAAI,EAAE,KAAK,CAAC,OAAO;aACpB,CAAC,CAAC;YAEH,OAAO,EAAE,OAAO,EAAE,IAAI,EAA2B,CAAC;QACpD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,OAAO,GACX,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,sBAAsB,CAAC;YAClE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,yBAAyB,EAAE,OAAO,EAAE,EAAE,EAAE;gBACpE,EAAE,EAAE,KAAK,CAAC,EAAE;aACb,CAAC,CAAC;YAEH,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAA2B,CAAC;QACrE,CAAC;IACH,CAAC;CACF,CAAA;AA7CY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,mBAAU,GAAE;qCAOM,+BAAa;QACI,8BAAa;GAPpC,cAAc,CA6C1B;AAED,kBAAe,cAAc,CAAC"}
|
|
@@ -4,12 +4,12 @@ import { HttpException, OnModuleInit } from '@nestjs/common';
|
|
|
4
4
|
import { Request, Response } from 'express';
|
|
5
5
|
import { Socket } from 'socket.io';
|
|
6
6
|
import type { z } from 'zod';
|
|
7
|
-
import { ChannelCapabilities, WebSocketChannelHandler } from
|
|
8
|
-
import { MessageInboundEvent } from
|
|
9
|
-
import { ChannelName } from
|
|
10
|
-
import { SubscriberCreateDto } from
|
|
11
|
-
import { SocketRequest } from
|
|
12
|
-
import { SocketResponse } from
|
|
7
|
+
import { ChannelCapabilities, WebSocketChannelHandler } from "../../../channel";
|
|
8
|
+
import { MessageInboundEvent } from "../../../channel/lib/inbound-events";
|
|
9
|
+
import { ChannelName } from "../../../channel/types";
|
|
10
|
+
import { SubscriberCreateDto } from "../../../chat/dto/subscriber.dto";
|
|
11
|
+
import { SocketRequest } from "../../../websocket/utils/socket-request";
|
|
12
|
+
import { SocketResponse } from "../../../websocket/utils/socket-response";
|
|
13
13
|
import { WEB_CHANNEL_NAME } from './settings.schema';
|
|
14
14
|
export default abstract class BaseWebChannelHandler<N extends ChannelName> extends WebSocketChannelHandler<N> implements OnModuleInit {
|
|
15
15
|
private readonly menuService;
|
|
@@ -9,11 +9,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
9
9
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const crypto_1 = require("crypto");
|
|
12
13
|
const types_1 = require("@hexabot-ai/types");
|
|
13
14
|
const common_1 = require("@nestjs/common");
|
|
14
15
|
const event_emitter_1 = require("@nestjs/event-emitter");
|
|
15
16
|
const socket_io_1 = require("socket.io");
|
|
16
|
-
const uuid_1 = require("uuid");
|
|
17
17
|
const attachment_entity_1 = require("../../../attachment/entities/attachment.entity");
|
|
18
18
|
const types_2 = require("../../../attachment/types");
|
|
19
19
|
const channel_1 = require("../../../channel");
|
|
@@ -38,7 +38,7 @@ let BaseWebChannelHandler = class BaseWebChannelHandler extends channel_1.WebSoc
|
|
|
38
38
|
return { ...channel_1.DEFAULT_CHANNEL_CAPABILITIES, typingIndicator: true };
|
|
39
39
|
}
|
|
40
40
|
generateId() {
|
|
41
|
-
return `${this.name}-${(0,
|
|
41
|
+
return `${this.name}-${(0, crypto_1.randomUUID)()}`;
|
|
42
42
|
}
|
|
43
43
|
getChannelAttributes(req) {
|
|
44
44
|
return {
|