@wabot-dev/framework 0.4.0-beta.3 → 0.4.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,49 @@
1
+ import { __decorate, __metadata } from 'tslib';
2
+ import { singleton } from '../../../core/injection/index.js';
3
+ import { CronJob } from '../../../feature/async/CronJob.js';
4
+ import { PgCrudRepository } from '../../../feature/pg/PgCrudRepository.js';
5
+ import '../../../feature/pg/PgLocker.js';
6
+ import 'debug';
7
+ import 'node:crypto';
8
+ import '../../../feature/pg/withPgClient.js';
9
+ import '../../../feature/pg/pgStorage.js';
10
+ import { Pool } from 'pg';
11
+
12
+ let PgCronJobRepository = class PgCronJobRepository extends PgCrudRepository {
13
+ constructor(pool) {
14
+ super(pool, {
15
+ schema: 'wabot',
16
+ table: 'cron_job',
17
+ constructor: CronJob,
18
+ });
19
+ }
20
+ async findDue(date) {
21
+ date = date ?? new Date();
22
+ const sql = `
23
+ SELECT ${this.columns}
24
+ FROM ${this.table}
25
+ WHERE data ? 'nextRunAt'
26
+ AND (data->>'nextRunAt')::bigint <= $1
27
+ AND (data->>'enabled')::boolean
28
+ ORDER BY (data->>'nextRunAt')::bigint ASC
29
+ `;
30
+ const items = await this.query(sql, [date.getTime()]);
31
+ return items;
32
+ }
33
+ async findByName(name) {
34
+ const sql = `
35
+ SELECT ${this.columns}
36
+ FROM ${this.table}
37
+ WHERE data @> $1::jsonb
38
+ LIMIT 1
39
+ `;
40
+ const items = await this.query(sql, [JSON.stringify({ name })]);
41
+ return items[0] ?? null;
42
+ }
43
+ };
44
+ PgCronJobRepository = __decorate([
45
+ singleton(),
46
+ __metadata("design:paramtypes", [Pool])
47
+ ], PgCronJobRepository);
48
+
49
+ export { PgCronJobRepository };
@@ -2,13 +2,14 @@ import { __decorate, __metadata } from 'tslib';
2
2
  import { Pool } from 'pg';
3
3
  import { singleton } from '../../../core/injection/index.js';
4
4
  import { PgCrudRepository } from '../../../feature/pg/PgCrudRepository.js';
5
- import '../../../feature/pg/PgLock.js';
5
+ import '../../../feature/pg/PgLocker.js';
6
6
  import 'debug';
7
7
  import 'node:crypto';
8
8
  import { withPgClient } from '../../../feature/pg/withPgClient.js';
9
9
  import '../../../feature/pg/pgStorage.js';
10
10
  import '../../../feature/async/AsyncMetadataStore.js';
11
11
  import '../../../feature/async/Async.js';
12
+ import '../../../_virtual/index.js';
12
13
  import { Job } from '../../../feature/async/Job.js';
13
14
  import '../../../feature/async/JobRepository.js';
14
15
  import '../../../feature/async/JobRunner.js';
@@ -1,6 +1,6 @@
1
1
  import { __decorate, __metadata } from 'tslib';
2
2
  import { PgCrudRepository } from '../../../feature/pg/PgCrudRepository.js';
3
- import '../../../feature/pg/PgLock.js';
3
+ import '../../../feature/pg/PgLocker.js';
4
4
  import 'debug';
5
5
  import 'node:crypto';
6
6
  import '../../../feature/pg/withPgClient.js';
@@ -2,7 +2,7 @@ import { __decorate, __metadata } from 'tslib';
2
2
  import { singleton } from '../../../core/injection/index.js';
3
3
  import { CustomError } from '../../../core/error/CustomError.js';
4
4
  import { PgCrudRepository } from '../../../feature/pg/PgCrudRepository.js';
5
- import '../../../feature/pg/PgLock.js';
5
+ import '../../../feature/pg/PgLocker.js';
6
6
  import 'debug';
7
7
  import 'node:crypto';
8
8
  import '../../../feature/pg/withPgClient.js';
@@ -1,5 +1,5 @@
1
1
  import { PgCrudRepository } from '../../../feature/pg/PgCrudRepository.js';
2
- import '../../../feature/pg/PgLock.js';
2
+ import '../../../feature/pg/PgLocker.js';
3
3
  import 'debug';
4
4
  import 'node:crypto';
5
5
  import '../../../feature/pg/withPgClient.js';
@@ -3,7 +3,7 @@ import { Pool } from 'pg';
3
3
  import { PgChatMemory } from './PgChatMemory.js';
4
4
  import { singleton } from '../../../core/injection/index.js';
5
5
  import { PgCrudRepository } from '../../../feature/pg/PgCrudRepository.js';
6
- import '../../../feature/pg/PgLock.js';
6
+ import '../../../feature/pg/PgLocker.js';
7
7
  import 'debug';
8
8
  import 'node:crypto';
9
9
  import '../../../feature/pg/withPgClient.js';
@@ -3,7 +3,7 @@ import { Pool } from 'pg';
3
3
  import { WhatsApp } from './WhatsApp.js';
4
4
  import { singleton } from '../../../core/injection/index.js';
5
5
  import { PgCrudRepository } from '../../../feature/pg/PgCrudRepository.js';
6
- import '../../../feature/pg/PgLock.js';
6
+ import '../../../feature/pg/PgLocker.js';
7
7
  import 'debug';
8
8
  import 'node:crypto';
9
9
  import '../../../feature/pg/withPgClient.js';
@@ -59,7 +59,7 @@ class Job extends Entity {
59
59
  this.data.scheduledAt <= new Date().getTime());
60
60
  }
61
61
  isStuck() {
62
- return this.runningSeconds > (this.data.aceptableRunningTimeSeconds ?? 900);
62
+ return this.runningSeconds > (this.data.aceptableRunningTimeSeconds ?? 15);
63
63
  }
64
64
  setAsStarted() {
65
65
  if (!this.isScheduleReady())
@@ -1,6 +1,6 @@
1
1
  import { withPgClient } from './withPgClient.js';
2
2
  import { Logger } from '../../core/logger/Logger.js';
3
- import { PgLocker } from './PgLock.js';
3
+ import { PgLocker } from './PgLocker.js';
4
4
 
5
5
  class PgRepositoryBase {
6
6
  pool;
@@ -372,6 +372,13 @@ interface ICronHandler {
372
372
  handleError?(e: any): void | Promise<void>;
373
373
  }
374
374
 
375
+ interface ICronConfig {
376
+ name: string;
377
+ cron: string;
378
+ disabled?: boolean;
379
+ }
380
+ declare function cron(config: ICronConfig): (target: IConstructor<ICronHandler>) => void;
381
+
375
382
  interface ICronJobScheduleConfig {
376
383
  name: string;
377
384
  commandName: string;
@@ -508,15 +515,53 @@ declare class Async {
508
515
  runCommand<T>(ctor: IConstructor<T>, data: IValidateInputShape<T>): Promise<Job>;
509
516
  }
510
517
 
511
- declare function runCommandHandlers(handlers: IConstructor<ICommandHandler<any>>[]): void;
512
- declare function stopCommandHandlers(handlers: IConstructor<ICommandHandler<any>>[]): void;
513
-
514
- interface ICronConfig {
518
+ interface ICronJobData extends IEntityData {
515
519
  name: string;
520
+ commandName: string;
521
+ commandData?: object;
516
522
  cron: string;
517
- disabled?: boolean;
523
+ enabled: boolean;
524
+ lastRunAt?: number;
525
+ nextRunAt?: number;
526
+ maxRunningJobs?: number;
527
+ misfirePolicy?: 'RUN_ONCE' | 'RUN_ALL' | 'SKIP';
528
+ reintentsDelaysInSeconds?: number[];
529
+ aceptableRunningTimeSeconds?: number;
530
+ stuckRetryAttempts?: number;
531
+ }
532
+ declare class CronJob extends Entity<ICronJobData> {
533
+ constructor(data: ICronJobData);
534
+ get nextRunAt(): Date | null;
535
+ get lastRunAt(): Date | null;
536
+ get maxConcurrency(): number;
537
+ get misfirePolicy(): "RUN_ONCE" | "RUN_ALL" | "SKIP";
538
+ get commandName(): string;
539
+ get name(): string;
540
+ isDue(now: Date): boolean;
541
+ computeNextRun(from: Date): void;
542
+ markAsExecuted(at: Date): void;
543
+ nextJob(): Job;
544
+ validate(): void;
545
+ }
546
+
547
+ interface ICronJobRepository {
548
+ create(cronJob: CronJob): Promise<void>;
549
+ findDue(date?: Date): Promise<CronJob[]>;
550
+ findOrThrow(id: string): Promise<CronJob>;
551
+ update(cronJob: CronJob): Promise<void>;
552
+ findByName(name: string): Promise<CronJob | null>;
518
553
  }
519
- declare function cron(config: ICronConfig): (target: IConstructor<ICronHandler>) => void;
554
+
555
+ declare class CronJobRepository implements ICronJobRepository {
556
+ create(cronJob: CronJob): Promise<void>;
557
+ findByName(name: string): Promise<CronJob | null>;
558
+ update(cronJob: CronJob): Promise<void>;
559
+ findDue(date?: Date): Promise<CronJob[]>;
560
+ findOrThrow(id: string): Promise<CronJob>;
561
+ }
562
+
563
+ declare function runCommandHandlers(handlers: IConstructor<ICommandHandler<any>>[]): void;
564
+ declare function stopCommandHandlers(handlers: IConstructor<ICommandHandler<any>>[]): void;
520
565
 
521
566
  declare function runCronHandlers(handlers: IConstructor<ICronHandler>[]): void;
522
567
  declare function stopCronHandlers(handlers: IConstructor<ICronHandler>[]): void;
@@ -1143,6 +1188,12 @@ declare class PgJobRepository extends PgCrudRepository<Job> implements IJobRepos
1143
1188
  countRunningByCommand(commandName: string): Promise<number>;
1144
1189
  }
1145
1190
 
1191
+ declare class PgCronJobRepository extends PgCrudRepository<CronJob> implements ICronJobRepository {
1192
+ constructor(pool: Pool);
1193
+ findDue(date?: Date): Promise<CronJob[]>;
1194
+ findByName(name: string): Promise<CronJob | null>;
1195
+ }
1196
+
1146
1197
  declare function apiKeyHandshakeGuard(): (target: IConstructor<any>) => void;
1147
1198
 
1148
1199
  declare function apiKeyGuard(): (target: object, propertyKey: string | symbol) => void;
@@ -1795,4 +1846,4 @@ declare function HtmlModule(options: IHtmlModuleOptions): {
1795
1846
  new (): {};
1796
1847
  };
1797
1848
 
1798
- export { AnthropicChatAdapter, ApiKey, ApiKeyGuardMiddleware, ApiKeyHandshakeGuardMiddleware, ApiKeyRepository, Async, AsyncMetadataStore, Auth, Chat, ChatAdapter, ChatBot, ChatBotMetadataStore, ChatItem, ChatMemory, ChatRepository, ChatResolver, type ClientMap, CmdChannel, Container, ControllerMetadataStore, CustomError, DeepSeekChatAdapter, DescriptionMetadataStore, EXPRESS_REQ, EXPRESS_RES, Entity, Env, EnvWhatsAppRepository, ExpressProvider, GoogleChatAdapter, type GoogleChatAdapterV2Options, HtmlModule, HttpServerProvider, type IApiKeyData, type IApiKeyRepository, type IArrayValidationError, type IArrayValidationResult, type IBotMessageItem, type IChannelMessage, type IChannelMetadata, type IChatAdapter, type IChatAdapterNextItemsReq, type IChatAdapterNextItemsRes, type IChatBot, type IChatBotMetadata, type IChatChannel, type IChatConnection, type IChatControllerMetadata, type IChatData, type IChatItem, type IChatItemData, type IChatItemType, type IChatMemory, type IChatMessage, type IChatRepository, type IChatType, type ICommandConfig, type ICommandHandler, type ICommandHandlerConfig, type IConstructor, type ICronConfig, type ICrudRepository, type ICustomErrorData, type IDescriptionMetadata, type IEndPointConfig, type IEndPointMetadata, type IEntityData, type IEnvType, type IFunctionCall, type IFunctionCallItem, type IGenerateApiKeyReq, type IGenerateApiKeyRes, type IGetWhatsAppTemplateRequest, type IHandshakeMiddleware, type IHandshakeMiddlewareMetadata, type IHtmlModuleOptions, type IHumanMessageItem, type IJobData, type IJobRepository, type IJwtRefreshTokenData, type IJwtRefreshTokenRepository, type ILanguageModelUsage, type IListenWhatsAppMessageRequest, type ILockKey, type ILocker, type IMessageContext, type IMiddleware, type IMiddlewareMetadata, type IMindset, type IMindsetConfig, type IMindsetIdentity, type IMindsetLlm, type IMindsetMetadata, type IMindsetModuleConfig, type IMindsetModuleMetadata, type IMindsetTool, type IMindsetToolParameter, type IModelValidationError, type IModelValidationResult, type IModelValidatorsInfo, type IMoneyData, type IPersistentData, type IPgRepositoryConfig, type IPropertyValidatorInfo, type IReceivedMessage, type IRemoteApiKeyFetcher, type IRestControllerConfig, type IRestControllerMetadata, type ISendWhatsAppRequest, type ISendWhatsAppTemplateRequest, type ISocketChannelConfig, type ISocketChannelReceivedMessage, type ISocketControllerConfig, type ISocketControllerMetadata, type ISocketEventConfig, type ISocketEventMetadata, type IStorableData, type ITelegramChannelConfig, type IValidateArrayOptions, type IValidateArrayOptionsWithItemsValidators, type IValidateInputShape, type IValidateIsInOptions, type IValidateIsRecordOptions, type IValidateMaxOptions, type IValidateMinOptions, type IValidationError, type IValidationResult, type IValidator, type IValidatorMetadata, type IWhatsAppBusinessAccount, type IWhatsAppBusinessNumber, type IWhatsAppCloudContact, type IWhatsAppCloudMessage, type IWhatsAppCloudMessageMetadata, type IWhatsAppCloudTemplate, type IWhatsAppCloudTemplateComponent, type IWhatsAppCloudTemplateMessage, type IWhatsAppCloudTemplateParameter, type IWhatsAppCloudTemplateResponse, type IWhatsAppCloudWebhookPayload, type IWhatsAppData, type IWhatsAppMessageListener, type IWhatsAppProxyListenMessageEventData, type IWhatsAppProxyListenMessageEventReq, type IWhatsAppProxyMessage, type IWhatsAppProxyMessageContent, type IWhatsAppProxyMessageEventReq, type IWhatsAppProxySendMessageEventReq, type IWhatsAppRepository, type IWhatsAppSenderOptions, type IWhatsappChannelConfig, type IchatControllerConfig, Job, JobRepository, JobRunner, Jwt, JwtAccessAndRefreshTokenDto, JwtConfig, JwtGuardMiddleware, JwtHandshakeGuardMiddleware, JwtRefreshToken, JwtRefreshTokenRepository, JwtSigner, JwtTokenDto, Lifecycle, Locker, Logger, Mapper, Mindset, MindsetMetadataStore, MindsetOperator, Money, MoneyDto, OpenaiChatAdapter, Password, type PasswordHashOptions, Persistent, PgApiKeyRepository, PgChatMemory, PgChatRepository, PgCrudRepository, PgJobRepository, PgJwtRefreshTokenRepository, PgLockKey, PgLocker, PgRepositoryBase, PgWhatsAppRepository, RamChatMemory, RamChatRepository, Random, RemoteApiKeyRepository, RestControllerMetadataStore, RestRequest, SocketChannel, SocketChannelConfig, SocketChannelReceivedMessage, SocketControllerMetadataStore, SocketServerProvider, Storable, TelegramChannel, TelegramChannelConfig, ValidationMetadataStore, WHATSAPP_MESSAGE_EVENT, WHATSAPP_PROXY_LISTEN_MESSAGE_EVENT, WHATSAPP_PROXY_SEND_MESSAGE_EVENT, WabotChatAdapter, WhatsApp, WhatsAppChannel, WhatsAppReceiver, WhatsAppReceiverByCloudApi, WhatsAppReceiverByWabotProxy, WhatsAppRepository, WhatsAppSender, WhatsAppSenderByCloudApi, WhatsAppSenderByWabotProxy, WhatsAppWabotProxyConnection, WhatsappChannelConfig, apiKeyGuard, apiKeyHandshakeGuard, chatBot, chatController, chatItemTypeOptions, cmd, command, commandHandler, container, cron, description, getClientMap, getPgClient, handshakeMiddlewares, inject, injectable, isArray, isBoolean, isDate, isIn, isModel, isNotEmpty, isNumber, isOptional, isPresent, isRecord, isString, jwtGuard, jwtHandshakeGuard, max, middleware, min, mindset, mindsetModule, modelInfo, onDelete, onGet, onPost, onPut, onSocketEvent, pgStorage, readJsonFromFile, restController, runChatControllers, runCommandHandlers, runCronHandlers, runRestControllers, runSocketControllers, scoped, singleton, socket, socketController, stopCommandHandlers, stopCronHandlers, telegram, validateAndTransform, validateArray, validateIsBoolean, validateIsDate, validateIsIn, validateIsNotEmpty, validateIsNumber, validateIsPresent, validateIsRecord, validateIsString, validateMax, validateMin, validateModel, whatsApp, withPgClient, withPgTransaction, writeJsonToFile };
1849
+ export { AnthropicChatAdapter, ApiKey, ApiKeyGuardMiddleware, ApiKeyHandshakeGuardMiddleware, ApiKeyRepository, Async, AsyncMetadataStore, Auth, Chat, ChatAdapter, ChatBot, ChatBotMetadataStore, ChatItem, ChatMemory, ChatRepository, ChatResolver, type ClientMap, CmdChannel, Container, ControllerMetadataStore, CronJob, CronJobRepository, CustomError, DeepSeekChatAdapter, DescriptionMetadataStore, EXPRESS_REQ, EXPRESS_RES, Entity, Env, EnvWhatsAppRepository, ExpressProvider, GoogleChatAdapter, type GoogleChatAdapterV2Options, HtmlModule, HttpServerProvider, type IApiKeyData, type IApiKeyRepository, type IArrayValidationError, type IArrayValidationResult, type IBotMessageItem, type IChannelMessage, type IChannelMetadata, type IChatAdapter, type IChatAdapterNextItemsReq, type IChatAdapterNextItemsRes, type IChatBot, type IChatBotMetadata, type IChatChannel, type IChatConnection, type IChatControllerMetadata, type IChatData, type IChatItem, type IChatItemData, type IChatItemType, type IChatMemory, type IChatMessage, type IChatRepository, type IChatType, type ICommandConfig, type ICommandHandler, type ICommandHandlerConfig, type IConstructor, type ICronConfig, type ICronJobData, type ICrudRepository, type ICustomErrorData, type IDescriptionMetadata, type IEndPointConfig, type IEndPointMetadata, type IEntityData, type IEnvType, type IFunctionCall, type IFunctionCallItem, type IGenerateApiKeyReq, type IGenerateApiKeyRes, type IGetWhatsAppTemplateRequest, type IHandshakeMiddleware, type IHandshakeMiddlewareMetadata, type IHtmlModuleOptions, type IHumanMessageItem, type IJobData, type IJobRepository, type IJwtRefreshTokenData, type IJwtRefreshTokenRepository, type ILanguageModelUsage, type IListenWhatsAppMessageRequest, type ILockKey, type ILocker, type IMessageContext, type IMiddleware, type IMiddlewareMetadata, type IMindset, type IMindsetConfig, type IMindsetIdentity, type IMindsetLlm, type IMindsetMetadata, type IMindsetModuleConfig, type IMindsetModuleMetadata, type IMindsetTool, type IMindsetToolParameter, type IModelValidationError, type IModelValidationResult, type IModelValidatorsInfo, type IMoneyData, type IPersistentData, type IPgRepositoryConfig, type IPropertyValidatorInfo, type IReceivedMessage, type IRemoteApiKeyFetcher, type IRestControllerConfig, type IRestControllerMetadata, type ISendWhatsAppRequest, type ISendWhatsAppTemplateRequest, type ISocketChannelConfig, type ISocketChannelReceivedMessage, type ISocketControllerConfig, type ISocketControllerMetadata, type ISocketEventConfig, type ISocketEventMetadata, type IStorableData, type ITelegramChannelConfig, type IValidateArrayOptions, type IValidateArrayOptionsWithItemsValidators, type IValidateInputShape, type IValidateIsInOptions, type IValidateIsRecordOptions, type IValidateMaxOptions, type IValidateMinOptions, type IValidationError, type IValidationResult, type IValidator, type IValidatorMetadata, type IWhatsAppBusinessAccount, type IWhatsAppBusinessNumber, type IWhatsAppCloudContact, type IWhatsAppCloudMessage, type IWhatsAppCloudMessageMetadata, type IWhatsAppCloudTemplate, type IWhatsAppCloudTemplateComponent, type IWhatsAppCloudTemplateMessage, type IWhatsAppCloudTemplateParameter, type IWhatsAppCloudTemplateResponse, type IWhatsAppCloudWebhookPayload, type IWhatsAppData, type IWhatsAppMessageListener, type IWhatsAppProxyListenMessageEventData, type IWhatsAppProxyListenMessageEventReq, type IWhatsAppProxyMessage, type IWhatsAppProxyMessageContent, type IWhatsAppProxyMessageEventReq, type IWhatsAppProxySendMessageEventReq, type IWhatsAppRepository, type IWhatsAppSenderOptions, type IWhatsappChannelConfig, type IchatControllerConfig, Job, JobRepository, JobRunner, Jwt, JwtAccessAndRefreshTokenDto, JwtConfig, JwtGuardMiddleware, JwtHandshakeGuardMiddleware, JwtRefreshToken, JwtRefreshTokenRepository, JwtSigner, JwtTokenDto, Lifecycle, Locker, Logger, Mapper, Mindset, MindsetMetadataStore, MindsetOperator, Money, MoneyDto, OpenaiChatAdapter, Password, type PasswordHashOptions, Persistent, PgApiKeyRepository, PgChatMemory, PgChatRepository, PgCronJobRepository, PgCrudRepository, PgJobRepository, PgJwtRefreshTokenRepository, PgLockKey, PgLocker, PgRepositoryBase, PgWhatsAppRepository, RamChatMemory, RamChatRepository, Random, RemoteApiKeyRepository, RestControllerMetadataStore, RestRequest, SocketChannel, SocketChannelConfig, SocketChannelReceivedMessage, SocketControllerMetadataStore, SocketServerProvider, Storable, TelegramChannel, TelegramChannelConfig, ValidationMetadataStore, WHATSAPP_MESSAGE_EVENT, WHATSAPP_PROXY_LISTEN_MESSAGE_EVENT, WHATSAPP_PROXY_SEND_MESSAGE_EVENT, WabotChatAdapter, WhatsApp, WhatsAppChannel, WhatsAppReceiver, WhatsAppReceiverByCloudApi, WhatsAppReceiverByWabotProxy, WhatsAppRepository, WhatsAppSender, WhatsAppSenderByCloudApi, WhatsAppSenderByWabotProxy, WhatsAppWabotProxyConnection, WhatsappChannelConfig, apiKeyGuard, apiKeyHandshakeGuard, chatBot, chatController, chatItemTypeOptions, cmd, command, commandHandler, container, cron, description, getClientMap, getPgClient, handshakeMiddlewares, inject, injectable, isArray, isBoolean, isDate, isIn, isModel, isNotEmpty, isNumber, isOptional, isPresent, isRecord, isString, jwtGuard, jwtHandshakeGuard, max, middleware, min, mindset, mindsetModule, modelInfo, onDelete, onGet, onPost, onPut, onSocketEvent, pgStorage, readJsonFromFile, restController, runChatControllers, runCommandHandlers, runCronHandlers, runRestControllers, runSocketControllers, scoped, singleton, socket, socketController, stopCommandHandlers, stopCronHandlers, telegram, validateAndTransform, validateArray, validateIsBoolean, validateIsDate, validateIsIn, validateIsNotEmpty, validateIsNumber, validateIsPresent, validateIsRecord, validateIsString, validateMax, validateMin, validateModel, whatsApp, withPgClient, withPgTransaction, writeJsonToFile };
package/dist/src/index.js CHANGED
@@ -41,13 +41,15 @@ export { DescriptionMetadataStore } from './core/description/metadata/Descriptio
41
41
  export { Locker } from './core/lock/Locker.js';
42
42
  export { command } from './feature/async/@command.js';
43
43
  export { commandHandler } from './feature/async/@commandHandler.js';
44
+ export { cron } from './feature/async/@cron.js';
44
45
  export { Async } from './feature/async/Async.js';
45
46
  export { AsyncMetadataStore } from './feature/async/AsyncMetadataStore.js';
47
+ export { CronJob } from './feature/async/CronJob.js';
48
+ export { CronJobRepository } from './feature/async/CronJobRepository.js';
46
49
  export { Job } from './feature/async/Job.js';
47
50
  export { JobRepository } from './feature/async/JobRepository.js';
48
51
  export { JobRunner } from './feature/async/JobRunner.js';
49
52
  export { runCommandHandlers, stopCommandHandlers } from './feature/async/runCommandHandlers.js';
50
- export { cron } from './feature/async/@cron.js';
51
53
  export { runCronHandlers, stopCronHandlers } from './feature/async/runCronHandlers.js';
52
54
  export { Chat } from './feature/chat-bot/Chat.js';
53
55
  export { ChatAdapter } from './feature/chat-bot/ChatAdapter.js';
@@ -72,7 +74,7 @@ export { MindsetOperator } from './feature/mindset/MindsetOperator.js';
72
74
  export { Money } from './feature/money/Money.js';
73
75
  export { MoneyDto } from './feature/money/MoneyDto.js';
74
76
  export { PgCrudRepository } from './feature/pg/PgCrudRepository.js';
75
- export { PgLocker } from './feature/pg/PgLock.js';
77
+ export { PgLocker } from './feature/pg/PgLocker.js';
76
78
  export { PgLockKey } from './feature/pg/PgLockKey.js';
77
79
  export { PgRepositoryBase } from './feature/pg/PgRepositoryBase.js';
78
80
  export { getClientMap, pgStorage } from './feature/pg/pgStorage.js';
@@ -95,6 +97,7 @@ export { onSocketEvent } from './feature/socket-controller/metadata/@onSocketEve
95
97
  export { SocketControllerMetadataStore } from './feature/socket-controller/metadata/SocketControllerMetadataStore.js';
96
98
  export { runSocketControllers } from './feature/socket-controller/runSocketControllers.js';
97
99
  export { PgJobRepository } from './addon/async/pg/PgJobRepository.js';
100
+ export { PgCronJobRepository } from './addon/async/pg/PgCronJobRepository.js';
98
101
  export { apiKeyHandshakeGuard } from './addon/auth/api-key/@apiKeyHandshakeGuard.js';
99
102
  export { apiKeyGuard } from './addon/auth/api-key/@apiKeyGuard.js';
100
103
  export { ApiKey } from './addon/auth/api-key/ApiKey.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wabot-dev/framework",
3
- "version": "0.4.0-beta.3",
3
+ "version": "0.4.0-beta.5",
4
4
  "description": "Framework for IA Chat Bots",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
File without changes