@wabot-dev/framework 0.0.12 → 0.0.13

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.
@@ -587,6 +587,11 @@ declare class PgCrudRepository<P extends Persistent> extends PgRepositoryBase<P>
587
587
  discard(item: P): Promise<void>;
588
588
  }
589
589
 
590
+ interface ISqliteRecord {
591
+ id: string;
592
+ data: string;
593
+ }
594
+
590
595
  declare class SqliteCrudRepository<P extends Persistent> implements ICrudRepository<P> {
591
596
  private table;
592
597
  private dbPath;
@@ -602,6 +607,14 @@ declare class SqliteCrudRepository<P extends Persistent> implements ICrudReposit
602
607
  protected createTable(db: Database<sqlite3.Database, sqlite3.Statement>): Promise<void>;
603
608
  }
604
609
 
610
+ declare class SqlitePersistentMapper<P extends Persistent> implements IReversibleMapper<P, string> {
611
+ private ctor;
612
+ constructor(ctor: IConstructor<P>);
613
+ map(input: P): string;
614
+ rev(input: string): P;
615
+ }
616
+ declare function sqliteMapperFor<P extends Persistent>(ctor: IConstructor<P>): SqlitePersistentMapper<P>;
617
+
605
618
  declare class PgUserRepository extends PgCrudRepository<User> implements IUserRepository {
606
619
  constructor(pool: Pool);
607
620
  findByConnection(query: IUserConnection): Promise<User | null>;
@@ -661,4 +674,4 @@ declare class RamChatRepository implements IChatRepository {
661
674
  private getMemory;
662
675
  }
663
676
 
664
- export { AuthenticationModule, Chat, ChatBot, ChatBotAdapter, ChatBotMetadataStore, ChatItem, ChatMemory, ChatRepository, ChatResolver, CmdChannel, Container, ControllerMetadataStore, EmailService, type IChannelMetadata, type IChatBot, type IChatBotAdapter, type IChatBotMetadata, type IChatChannel, type IChatConnection, type IChatControllerMetadata, type IChatData, type IChatFunctionCall, type IChatItemData, type IChatItemType, type IChatMemory, type IChatMessage, type IChatRepository, type IChatType, type IConnectionChatMessage, type IConstructor, type IEmailService, type IMessageContext, type IMindset, type IMindsetDecoration, type IMindsetFunctionConfig, type IMindsetFunctionDecoration, type IMindsetFunctionMetadata, type IMindsetFunctionParamMetadata, type IMindsetIdentity, type IMindsetMetadata, type IMindsetModuleConfig, type IMindsetModuleDecoration, type IMindsetModuleMetadata, type IOtpService, type IParamConfig, type IParamDecoration, type IPersistent, type IReceivedMessage, type IReceivedMessageItem, type IReversibleMapper, type ISendEmailRequest, type IServerConfig, type IServerProvider, type ISystemFunctionCallItem, type ISystemMessageItem, type ITelegramChannelConfig, type IUserConnection, type IUserData, type IUserRepository, type IchatControllerConfig, type IrunChannelProps, MINDSET_DECORATION_MINDSET, MINDSET_FUNCTION_DECORATION_FUNCTION, MINDSET_MODULE_DECORATION_MODULE, MessageContext, Mindset, MindsetMetadataStore, MindsetOperator, OpenaiChatBotAdapter, OtpService, PARAM_DECORATION_IS_OPTIONAL, PARAM_DECORATION_PARAM, Persistent, PgChatMemory, PgChatRepository, PgUserRepository, RamChatMemory, RamChatRepository, RamUserRepository, RegisterUserModule, RegisterUserWithEmailRequest, SendOneTimePasswordRequest, SqliteChatMemory, SqliteChatRepository, SqliteUserRepository, TelegramChannel, TelegramChannelConfig, User, UserRepository, UserResolver, ValidateOneTimePasswordRequest, chatBot, chatController, cmd, container, inject, injectable, isOptional, mindset, mindsetFunction, mindsetModule, param, prepareChatContainer, runChannel, runServer, singleton, telegram };
677
+ export { AuthenticationModule, Chat, ChatBot, ChatBotAdapter, ChatBotMetadataStore, ChatItem, ChatMemory, ChatRepository, ChatResolver, CmdChannel, Container, ControllerMetadataStore, EmailService, type IChannelMetadata, type IChatBot, type IChatBotAdapter, type IChatBotMetadata, type IChatChannel, type IChatConnection, type IChatControllerMetadata, type IChatData, type IChatFunctionCall, type IChatItemData, type IChatItemType, type IChatMemory, type IChatMessage, type IChatRepository, type IChatType, type IConnectionChatMessage, type IConstructor, type ICrudRepository, type IEmailService, type IMessageContext, type IMindset, type IMindsetDecoration, type IMindsetFunctionConfig, type IMindsetFunctionDecoration, type IMindsetFunctionMetadata, type IMindsetFunctionParamMetadata, type IMindsetIdentity, type IMindsetMetadata, type IMindsetModuleConfig, type IMindsetModuleDecoration, type IMindsetModuleMetadata, type IOtpService, type IParamConfig, type IParamDecoration, type IPersistent, type IPgRepositoryConfig, type IReceivedMessage, type IReceivedMessageItem, type IReversibleMapper, type ISendEmailRequest, type IServerConfig, type IServerProvider, type ISqliteRecord, type ISystemFunctionCallItem, type ISystemMessageItem, type ITelegramChannelConfig, type IUserConnection, type IUserData, type IUserRepository, type IchatControllerConfig, type IrunChannelProps, MINDSET_DECORATION_MINDSET, MINDSET_FUNCTION_DECORATION_FUNCTION, MINDSET_MODULE_DECORATION_MODULE, MessageContext, Mindset, MindsetMetadataStore, MindsetOperator, OpenaiChatBotAdapter, OtpService, PARAM_DECORATION_IS_OPTIONAL, PARAM_DECORATION_PARAM, Persistent, PgChatMemory, PgChatRepository, PgCrudRepository, PgRepositoryBase, PgUserRepository, RamChatMemory, RamChatRepository, RamUserRepository, RegisterUserModule, RegisterUserWithEmailRequest, SendOneTimePasswordRequest, SqliteChatMemory, SqliteChatRepository, SqliteCrudRepository, SqlitePersistentMapper, SqliteUserRepository, TelegramChannel, TelegramChannelConfig, User, UserRepository, UserResolver, ValidateOneTimePasswordRequest, chatBot, chatController, cmd, container, inject, injectable, isOptional, mindset, mindsetFunction, mindsetModule, param, prepareChatContainer, runChannel, runServer, singleton, sqliteMapperFor, telegram };
package/dist/src/index.js CHANGED
@@ -52,4 +52,8 @@ export { SqliteChatMemory } from './pre-made/repository/chat/sqlite/SqliteChatMe
52
52
  export { SqliteChatRepository } from './pre-made/repository/chat/sqlite/SqliteChatRepository.js';
53
53
  export { RamChatMemory } from './pre-made/repository/chat/ram/RamChatMemory.js';
54
54
  export { RamChatRepository } from './pre-made/repository/chat/ram/RamChatRepository.js';
55
+ export { PgCrudRepository } from './repository/pg/PgCrudRepository.js';
56
+ export { PgRepositoryBase } from './repository/pg/PgRepositoryBase.js';
57
+ export { SqliteCrudRepository } from './repository/sqlite/SqliteCrudRepository.js';
58
+ export { SqlitePersistentMapper, sqliteMapperFor } from './repository/sqlite/SqlitePersistentMapper.js';
55
59
  export { Container } from './injection/Container.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wabot-dev/framework",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "Framework for IA Chat Bots",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",