@wabot-dev/framework 0.1.0-beta.4 → 0.1.0-beta.41
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/src/addon/async/pg/PgJobRepository.js +26 -0
- package/dist/src/addon/chat-bot/anthropic/AnthropicChatAdapter.js +135 -0
- package/dist/src/addon/chat-bot/deepseek/DeepSeekChatAdapter.js +137 -0
- package/dist/src/addon/chat-bot/google/GoogleChatAdapter.js +127 -0
- package/dist/src/addon/chat-bot/openia/OpenaiChatAdapter.js +116 -0
- package/dist/src/{pre-made/repository/chat → addon/chat-bot}/pg/PgChatMemory.js +5 -4
- package/dist/src/{pre-made/repository/chat → addon/chat-bot}/pg/PgChatRepository.js +5 -5
- package/dist/src/{pre-made/repository/chat → addon/chat-bot}/ram/RamChatRepository.js +2 -2
- package/dist/src/addon/chat-controller/cmd/@cmd.js +22 -0
- package/dist/src/{channels → addon/chat-controller}/cmd/CmdChannel.js +4 -26
- package/dist/src/{channels → addon/chat-controller}/socket/@socket.js +8 -4
- package/dist/src/{channels → addon/chat-controller}/socket/SocketChannel.js +5 -23
- package/dist/src/{channels → addon/chat-controller}/socket/SocketChannelConfig.js +1 -1
- package/dist/src/{channels → addon/chat-controller}/telegram/@telegram.js +8 -4
- package/dist/src/{channels → addon/chat-controller}/telegram/TelegramChannel.js +4 -22
- package/dist/src/{channels → addon/chat-controller}/whatsapp/@whatsapp.js +8 -4
- package/dist/src/{channels → addon/chat-controller}/whatsapp/EnvWhatsAppRepository.js +3 -3
- package/dist/src/{channels → addon/chat-controller}/whatsapp/PgWhatsAppRepository.js +1 -1
- package/dist/src/{channels/wabot → addon/chat-controller/whatsapp}/WabotDevConnection.js +2 -2
- package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsApp.js +2 -4
- package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppChannel.js +6 -18
- package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppReceiver.js +4 -7
- package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppReceiverByDevConnection.js +4 -10
- package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppReceiverByWebHook.js +6 -12
- package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppSender.js +39 -10
- package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppSenderByCloudApi.js +10 -13
- package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppSenderByDevConnection.js +13 -15
- package/dist/src/addon/mindset/html/HtmlModule.js +70 -0
- package/dist/src/addon/money/MoneyDto.js +22 -0
- package/dist/src/{repository → addon/repository}/pg/PgCrudRepository.js +23 -2
- package/dist/src/{repository → addon/repository}/pg/PgRepositoryBase.js +2 -2
- package/dist/src/addon/rest-controller/jwt/@jwtGuard.js +17 -0
- package/dist/src/addon/rest-controller/jwt/Jwt.js +31 -0
- package/dist/src/addon/rest-controller/jwt/JwtAccessAndRefreshTokenDto.js +20 -0
- package/dist/src/addon/rest-controller/jwt/JwtConfig.js +28 -0
- package/dist/src/addon/rest-controller/jwt/JwtGuardMiddleware.js +45 -0
- package/dist/src/addon/rest-controller/jwt/JwtRefreshToken.js +9 -0
- package/dist/src/addon/rest-controller/jwt/JwtRefreshTokenRepository.js +21 -0
- package/dist/src/addon/rest-controller/jwt/JwtSigner.js +48 -0
- package/dist/src/addon/rest-controller/jwt/JwtTokenDto.js +22 -0
- package/dist/src/addon/validation/is-boolean/@isBoolean.js +17 -0
- package/dist/src/addon/validation/is-boolean/validateIsBoolean.js +12 -0
- package/dist/src/addon/validation/is-date/@isDate.js +17 -0
- package/dist/src/addon/validation/is-date/validateIsDate.js +16 -0
- package/dist/src/addon/validation/is-not-empty/@isNotEmpty.js +17 -0
- package/dist/src/addon/validation/is-not-empty/validateIsNotEmpty.js +12 -0
- package/dist/src/addon/validation/is-number/@isNumber.js +17 -0
- package/dist/src/addon/validation/is-number/validateIsNumber.js +12 -0
- package/dist/src/addon/validation/is-present/@isPresent.js +17 -0
- package/dist/src/addon/validation/is-present/validateIsPresent.js +12 -0
- package/dist/src/addon/validation/is-string/@isString.js +17 -0
- package/dist/src/addon/validation/is-string/validateIsString.js +12 -0
- package/dist/src/addon/validation/max/@max.js +18 -0
- package/dist/src/addon/validation/max/validateMax.js +17 -0
- package/dist/src/addon/validation/min/@min.js +18 -0
- package/dist/src/addon/validation/min/validateMin.js +17 -0
- package/dist/src/core/auth/Auth.js +24 -0
- package/dist/src/core/{Persistent.js → entity/Entity.js} +24 -9
- package/dist/src/core/env/Env.js +39 -0
- package/dist/src/core/error/CustomError.js +15 -0
- package/dist/src/core/injection/index.js +4 -0
- package/dist/src/core/mapper/Mapper.js +42 -0
- package/dist/src/core/random/Random.js +37 -0
- package/dist/src/core/storable/Storable.js +8 -0
- package/dist/src/core/validation/metadata/@isArray.js +18 -0
- package/dist/src/core/validation/metadata/@isModel.js +18 -0
- package/dist/src/core/validation/metadata/@isOptional.js +17 -0
- package/dist/src/core/validation/metadata/ValidationMetadataStore.js +98 -0
- package/dist/src/core/validation/modelInfo.js +9 -0
- package/dist/src/core/validation/validate.js +11 -0
- package/dist/src/core/validation/validators/validateArray.js +51 -0
- package/dist/src/core/validation/validators/validateIsOptional.js +5 -0
- package/dist/src/core/validation/validators/validateModel.js +36 -0
- package/dist/src/feature/async/@command.js +11 -0
- package/dist/src/feature/async/@commandHandler.js +12 -0
- package/dist/src/feature/async/Async.js +38 -0
- package/dist/src/feature/async/Command.js +9 -0
- package/dist/src/feature/async/CommandMetadataStore.js +38 -0
- package/dist/src/feature/async/Job.js +24 -0
- package/dist/src/feature/async/JobRepository.js +31 -0
- package/dist/src/feature/async/JobRunner.js +45 -0
- package/dist/src/feature/async/JobsEventsHub.js +24 -0
- package/dist/src/feature/async/runCommandHandlers.js +29 -0
- package/dist/src/{core/chat → feature/chat-bot}/Chat.js +2 -2
- package/dist/src/feature/chat-bot/ChatAdapter.js +7 -0
- package/dist/src/feature/chat-bot/ChatBot.js +50 -0
- package/dist/src/feature/chat-bot/ChatItem.js +24 -0
- package/dist/src/feature/chat-bot/ChatMemory.js +10 -0
- package/dist/src/{core/chat/repository/IChatRepository.js → feature/chat-bot/ChatRepository.js} +2 -8
- package/dist/src/feature/chat-bot/IChatItem.js +3 -0
- package/dist/src/{chatbot → feature/chat-bot}/metadata/@chatBot.js +1 -1
- package/dist/src/{chatbot → feature/chat-bot}/metadata/ChatBotMetadataStore.js +1 -1
- package/dist/src/{controller/channel → feature/chat-controller}/ChatResolver.js +5 -4
- package/dist/src/{controller → feature/chat-controller}/metadata/ControllerMetadataStore.js +1 -1
- package/dist/src/{controller → feature/chat-controller}/metadata/controller/@chatController.js +1 -1
- package/dist/src/feature/chat-controller/runChatControllers.js +69 -0
- package/dist/src/{channels → feature}/express/ExpressProvider.js +2 -4
- package/dist/src/{channels → feature}/http/HttpServerProvider.js +2 -2
- package/dist/src/{mindset → feature/mindset}/MindsetOperator.js +66 -42
- package/dist/src/{mindset → feature/mindset}/metadata/MindsetMetadataStore.js +1 -1
- package/dist/src/{mindset → feature/mindset}/metadata/functions/@mindsetFunction.js +1 -1
- package/dist/src/{mindset → feature/mindset}/metadata/mindsets/@mindset.js +1 -1
- package/dist/src/{mindset → feature/mindset}/metadata/modules/@mindsetModule.js +1 -2
- package/dist/src/{mindset → feature/mindset}/metadata/params/@param.js +1 -1
- package/dist/src/feature/money/Money.js +61 -0
- package/dist/src/feature/rest-controller/injection-tokens.js +4 -0
- package/dist/src/feature/rest-controller/metadata/@get.js +19 -0
- package/dist/src/feature/rest-controller/metadata/@middleware.js +16 -0
- package/dist/src/feature/rest-controller/metadata/@post.js +19 -0
- package/dist/src/feature/rest-controller/metadata/@restController.js +15 -0
- package/dist/src/feature/rest-controller/metadata/RestControllerMetadataStore.js +50 -0
- package/dist/src/feature/rest-controller/runRestControllers.js +88 -0
- package/dist/src/{channels → feature}/socket/SocketServerProvider.js +2 -2
- package/dist/src/index.d.ts +848 -483
- package/dist/src/index.js +122 -76
- package/package.json +9 -3
- package/dist/src/ai/deepseek/DeepSeekChatBotAdapter.js +0 -106
- package/dist/src/ai/openia/OpenaiChatBotAdapter.js +0 -84
- package/dist/src/channels/cmd/@cmd.js +0 -18
- package/dist/src/chatbot/ChatBot.js +0 -51
- package/dist/src/chatbot/ChatBotAdapter.js +0 -72
- package/dist/src/controller/channel/UserResolver.js +0 -21
- package/dist/src/core/IMessageContext.js +0 -12
- package/dist/src/core/chat/ChatItem.js +0 -15
- package/dist/src/core/chat/repository/IChatMemory.js +0 -10
- package/dist/src/core/user/IUserRepository.js +0 -19
- package/dist/src/core/user/User.js +0 -26
- package/dist/src/env/WabotEnv.js +0 -27
- package/dist/src/injection/index.js +0 -4
- package/dist/src/mindset/metadata/params/@isOptional.js +0 -21
- package/dist/src/pre-made/module/authentication/AuthenticationModule.js +0 -97
- package/dist/src/pre-made/module/authentication/requests/SendOneTimePasswordRequest.js +0 -25
- package/dist/src/pre-made/module/authentication/requests/ValidateOneTimePasswordRequest.js +0 -25
- package/dist/src/pre-made/module/register-user/RegisterUserModule.js +0 -56
- package/dist/src/pre-made/module/register-user/requests/RegisterUserWithEmailRequest.js +0 -25
- package/dist/src/pre-made/repository/user/pg/PgUserRepository.js +0 -33
- package/dist/src/pre-made/repository/user/ram/RamUserRepository.js +0 -27
- package/dist/src/pre-made/service/EmailService.js +0 -13
- package/dist/src/pre-made/service/OtpService.js +0 -14
- package/dist/src/server/prepareChatContainer.js +0 -43
- package/dist/src/server/runChannel.js +0 -27
- package/dist/src/server/runServer.js +0 -40
- /package/dist/src/{pre-made/repository/chat → addon/chat-bot}/ram/RamChatMemory.js +0 -0
- /package/dist/src/{channels → addon/chat-controller}/telegram/TelegramChannelConfig.js +0 -0
- /package/dist/src/{channels/wabot → addon/chat-controller/whatsapp}/WabotDevSocketContracts.js +0 -0
- /package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppChannelConfig.js +0 -0
- /package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppRepository.js +0 -0
- /package/dist/src/{injection → core/injection}/Container.js +0 -0
- /package/dist/src/{logger → core/logger}/Logger.js +0 -0
- /package/dist/src/{mindset → feature/mindset}/IMindset.js +0 -0
- /package/dist/src/{mindset → feature/mindset}/metadata/functions/decoratorNames.js +0 -0
- /package/dist/src/{mindset → feature/mindset}/metadata/mindsets/decoratorNames.js +0 -0
- /package/dist/src/{mindset → feature/mindset}/metadata/modules/decoratorNames.js +0 -0
- /package/dist/src/{mindset → feature/mindset}/metadata/params/decoratorNames.js +0 -0
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import '
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { container } from '../../../core/injection/index.js';
|
|
2
|
+
import { ControllerMetadataStore } from '../../../feature/chat-controller/metadata/ControllerMetadataStore.js';
|
|
3
|
+
import '../../../feature/chat-controller/ChatResolver.js';
|
|
4
|
+
import 'uuid';
|
|
5
|
+
import '../../../feature/chat-bot/metadata/ChatBotMetadataStore.js';
|
|
6
|
+
import 'reflect-metadata';
|
|
7
|
+
import '../../../feature/mindset/metadata/MindsetMetadataStore.js';
|
|
8
|
+
import '../../../feature/mindset/MindsetOperator.js';
|
|
5
9
|
import { SocketChannel } from './SocketChannel.js';
|
|
6
10
|
import { SocketChannelConfig } from './SocketChannelConfig.js';
|
|
7
11
|
|
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
|
+
import { injectable } from '../../../core/injection/index.js';
|
|
3
|
+
import { SocketServerProvider } from '../../../feature/socket/SocketServerProvider.js';
|
|
2
4
|
import { SocketChannelConfig } from './SocketChannelConfig.js';
|
|
3
|
-
import { injectable } from '../../injection/index.js';
|
|
4
|
-
import { ChatResolver } from '../../controller/channel/ChatResolver.js';
|
|
5
|
-
import { UserResolver } from '../../controller/channel/UserResolver.js';
|
|
6
|
-
import '../../controller/metadata/ControllerMetadataStore.js';
|
|
7
|
-
import { SocketServerProvider } from './SocketServerProvider.js';
|
|
8
5
|
|
|
9
6
|
var SocketChannel_1;
|
|
10
7
|
let SocketChannel = SocketChannel_1 = class SocketChannel {
|
|
11
8
|
config;
|
|
12
9
|
socketServerProvider;
|
|
13
|
-
chatResolver;
|
|
14
|
-
userResolver;
|
|
15
10
|
callBack = null;
|
|
16
11
|
server;
|
|
17
|
-
constructor(config, socketServerProvider
|
|
12
|
+
constructor(config, socketServerProvider) {
|
|
18
13
|
this.config = config;
|
|
19
14
|
this.socketServerProvider = socketServerProvider;
|
|
20
|
-
this.chatResolver = chatResolver;
|
|
21
|
-
this.userResolver = userResolver;
|
|
22
15
|
this.server = this.socketServerProvider.getSocketServer();
|
|
23
16
|
}
|
|
24
17
|
listen(callback) {
|
|
@@ -42,20 +35,11 @@ let SocketChannel = SocketChannel_1 = class SocketChannel {
|
|
|
42
35
|
chatType: 'PRIVATE',
|
|
43
36
|
channelName: SocketChannel_1.name,
|
|
44
37
|
};
|
|
45
|
-
const chat = await this.chatResolver.resolve(chatConnection);
|
|
46
|
-
const userConnection = {
|
|
47
|
-
id: message.userId,
|
|
48
|
-
channelName: SocketChannel_1.name,
|
|
49
|
-
};
|
|
50
|
-
const user = await this.userResolver.resolve(userConnection);
|
|
51
38
|
if (!this.callBack)
|
|
52
39
|
return;
|
|
53
40
|
this.callBack({
|
|
54
|
-
|
|
55
|
-
user,
|
|
41
|
+
chatConnection,
|
|
56
42
|
message: {
|
|
57
|
-
chatConnection,
|
|
58
|
-
userConnection,
|
|
59
43
|
text: trimmedInput,
|
|
60
44
|
senderName: message.senderName,
|
|
61
45
|
},
|
|
@@ -71,9 +55,7 @@ let SocketChannel = SocketChannel_1 = class SocketChannel {
|
|
|
71
55
|
SocketChannel = SocketChannel_1 = __decorate([
|
|
72
56
|
injectable(),
|
|
73
57
|
__metadata("design:paramtypes", [SocketChannelConfig,
|
|
74
|
-
SocketServerProvider
|
|
75
|
-
ChatResolver,
|
|
76
|
-
UserResolver])
|
|
58
|
+
SocketServerProvider])
|
|
77
59
|
], SocketChannel);
|
|
78
60
|
|
|
79
61
|
export { SocketChannel };
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import { container } from '
|
|
2
|
-
import '
|
|
3
|
-
import '
|
|
4
|
-
import
|
|
1
|
+
import { container } from '../../../core/injection/index.js';
|
|
2
|
+
import { ControllerMetadataStore } from '../../../feature/chat-controller/metadata/ControllerMetadataStore.js';
|
|
3
|
+
import '../../../feature/chat-controller/ChatResolver.js';
|
|
4
|
+
import 'uuid';
|
|
5
|
+
import '../../../feature/chat-bot/metadata/ChatBotMetadataStore.js';
|
|
6
|
+
import 'reflect-metadata';
|
|
7
|
+
import '../../../feature/mindset/metadata/MindsetMetadataStore.js';
|
|
8
|
+
import '../../../feature/mindset/MindsetOperator.js';
|
|
5
9
|
import { TelegramChannel } from './TelegramChannel.js';
|
|
6
10
|
import { TelegramChannelConfig } from './TelegramChannelConfig.js';
|
|
7
11
|
|
|
@@ -1,21 +1,14 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
|
-
import { ChatResolver } from '../../controller/channel/ChatResolver.js';
|
|
3
|
-
import { UserResolver } from '../../controller/channel/UserResolver.js';
|
|
4
|
-
import { injectable } from '../../injection/index.js';
|
|
5
|
-
import '../../controller/metadata/ControllerMetadataStore.js';
|
|
6
2
|
import { Bot } from 'grammy';
|
|
7
3
|
import { TelegramChannelConfig } from './TelegramChannelConfig.js';
|
|
4
|
+
import { injectable } from '../../../core/injection/index.js';
|
|
8
5
|
|
|
9
6
|
var TelegramChannel_1;
|
|
10
7
|
let TelegramChannel = TelegramChannel_1 = class TelegramChannel {
|
|
11
8
|
config;
|
|
12
|
-
chatResolver;
|
|
13
|
-
userResolver;
|
|
14
9
|
bot;
|
|
15
|
-
constructor(config
|
|
10
|
+
constructor(config) {
|
|
16
11
|
this.config = config;
|
|
17
|
-
this.chatResolver = chatResolver;
|
|
18
|
-
this.userResolver = userResolver;
|
|
19
12
|
this.bot = new Bot(this.config.botToken);
|
|
20
13
|
}
|
|
21
14
|
listen(callback) {
|
|
@@ -28,18 +21,9 @@ let TelegramChannel = TelegramChannel_1 = class TelegramChannel {
|
|
|
28
21
|
chatType: ctx.message.chat.type === 'private' ? 'PRIVATE' : 'GROUP',
|
|
29
22
|
channelName: TelegramChannel_1.name,
|
|
30
23
|
};
|
|
31
|
-
const chat = await this.chatResolver.resolve(chatConnection);
|
|
32
|
-
const userConnection = {
|
|
33
|
-
id: ctx.from.id.toString(),
|
|
34
|
-
channelName: TelegramChannel_1.name,
|
|
35
|
-
};
|
|
36
|
-
const user = await this.userResolver.resolve(userConnection);
|
|
37
24
|
callback({
|
|
38
|
-
|
|
39
|
-
user,
|
|
25
|
+
chatConnection,
|
|
40
26
|
message: {
|
|
41
|
-
chatConnection,
|
|
42
|
-
userConnection,
|
|
43
27
|
senderName: ctx.from.first_name,
|
|
44
28
|
text: ctx.message.text,
|
|
45
29
|
},
|
|
@@ -55,9 +39,7 @@ let TelegramChannel = TelegramChannel_1 = class TelegramChannel {
|
|
|
55
39
|
};
|
|
56
40
|
TelegramChannel = TelegramChannel_1 = __decorate([
|
|
57
41
|
injectable(),
|
|
58
|
-
__metadata("design:paramtypes", [TelegramChannelConfig
|
|
59
|
-
ChatResolver,
|
|
60
|
-
UserResolver])
|
|
42
|
+
__metadata("design:paramtypes", [TelegramChannelConfig])
|
|
61
43
|
], TelegramChannel);
|
|
62
44
|
|
|
63
45
|
export { TelegramChannel };
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import { container } from '
|
|
1
|
+
import { container } from '../../../core/injection/index.js';
|
|
2
2
|
import { WhatsappChannelConfig } from './WhatsAppChannelConfig.js';
|
|
3
|
-
import '
|
|
4
|
-
import '
|
|
5
|
-
import
|
|
3
|
+
import { ControllerMetadataStore } from '../../../feature/chat-controller/metadata/ControllerMetadataStore.js';
|
|
4
|
+
import '../../../feature/chat-controller/ChatResolver.js';
|
|
5
|
+
import 'uuid';
|
|
6
|
+
import '../../../feature/chat-bot/metadata/ChatBotMetadataStore.js';
|
|
7
|
+
import 'reflect-metadata';
|
|
8
|
+
import '../../../feature/mindset/metadata/MindsetMetadataStore.js';
|
|
9
|
+
import '../../../feature/mindset/MindsetOperator.js';
|
|
6
10
|
import { WhatsAppChannel } from './WhatsAppChannel.js';
|
|
7
11
|
|
|
8
12
|
function whatsapp(config) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
|
-
import { singleton } from '
|
|
2
|
+
import { singleton } from '../../../core/injection/index.js';
|
|
3
3
|
import { WhatsApp } from './WhatsApp.js';
|
|
4
|
-
import {
|
|
4
|
+
import { Env } from '../../../core/env/Env.js';
|
|
5
5
|
|
|
6
6
|
let EnvWhatsAppRepository = class EnvWhatsAppRepository {
|
|
7
7
|
env;
|
|
@@ -43,7 +43,7 @@ let EnvWhatsAppRepository = class EnvWhatsAppRepository {
|
|
|
43
43
|
};
|
|
44
44
|
EnvWhatsAppRepository = __decorate([
|
|
45
45
|
singleton(),
|
|
46
|
-
__metadata("design:paramtypes", [
|
|
46
|
+
__metadata("design:paramtypes", [Env])
|
|
47
47
|
], EnvWhatsAppRepository);
|
|
48
48
|
|
|
49
49
|
export { EnvWhatsAppRepository };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import { Pool } from 'pg';
|
|
3
3
|
import { WhatsApp } from './WhatsApp.js';
|
|
4
|
-
import { singleton } from '
|
|
4
|
+
import { singleton } from '../../../core/injection/index.js';
|
|
5
5
|
import { PgCrudRepository } from '../../repository/pg/PgCrudRepository.js';
|
|
6
6
|
|
|
7
7
|
let PgWhatsAppRepository = class PgWhatsAppRepository extends PgCrudRepository {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
|
-
import { singleton } from '
|
|
3
|
-
import { Logger } from '
|
|
2
|
+
import { singleton } from '../../../core/injection/index.js';
|
|
3
|
+
import { Logger } from '../../../core/logger/Logger.js';
|
|
4
4
|
import { io } from 'socket.io-client';
|
|
5
5
|
import { devEmitEvent } from './WabotDevSocketContracts.js';
|
|
6
6
|
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import { Persistent } from '../../core/Persistent.js';
|
|
3
|
-
import '../../core/user/IUserRepository.js';
|
|
1
|
+
import { Entity } from '../../../core/entity/Entity.js';
|
|
4
2
|
|
|
5
|
-
class WhatsApp extends
|
|
3
|
+
class WhatsApp extends Entity {
|
|
6
4
|
getVerifyToken() {
|
|
7
5
|
return this.data.verifyToken;
|
|
8
6
|
}
|
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { injectable } from '../../injection/index.js';
|
|
5
|
-
import '../../controller/metadata/ControllerMetadataStore.js';
|
|
6
|
-
import { Logger } from '../../logger/Logger.js';
|
|
2
|
+
import { injectable } from '../../../core/injection/index.js';
|
|
3
|
+
import { Logger } from '../../../core/logger/Logger.js';
|
|
7
4
|
import { WhatsappChannelConfig } from './WhatsAppChannelConfig.js';
|
|
8
5
|
import { WhatsAppReceiver } from './WhatsAppReceiver.js';
|
|
9
6
|
import { WhatsAppSender } from './WhatsAppSender.js';
|
|
10
7
|
|
|
11
8
|
let WhatsAppChannel = class WhatsAppChannel {
|
|
12
9
|
config;
|
|
13
|
-
chatResolver;
|
|
14
|
-
userResolver;
|
|
15
10
|
sender;
|
|
16
11
|
receiver;
|
|
17
12
|
logger = new Logger('wabot:whatsapp-channel');
|
|
18
|
-
constructor(config,
|
|
13
|
+
constructor(config, sender, receiver) {
|
|
19
14
|
this.config = config;
|
|
20
|
-
this.chatResolver = chatResolver;
|
|
21
|
-
this.userResolver = userResolver;
|
|
22
15
|
this.sender = sender;
|
|
23
16
|
this.receiver = receiver;
|
|
24
17
|
}
|
|
@@ -27,16 +20,13 @@ let WhatsAppChannel = class WhatsAppChannel {
|
|
|
27
20
|
to: this.config.number,
|
|
28
21
|
listener: async (message) => {
|
|
29
22
|
try {
|
|
30
|
-
const chat = await this.chatResolver.resolve(message.chatConnection);
|
|
31
|
-
const user = await this.userResolver.resolve(message.userConnection);
|
|
32
23
|
callback({
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
message,
|
|
24
|
+
chatConnection: message.chatConnection,
|
|
25
|
+
message: message.message,
|
|
36
26
|
reply: (replyMessage) => {
|
|
37
27
|
this.sender.sendWhatsApp({
|
|
38
28
|
from: this.config.number,
|
|
39
|
-
to: message.
|
|
29
|
+
to: message.chatConnection.id,
|
|
40
30
|
message: replyMessage,
|
|
41
31
|
});
|
|
42
32
|
},
|
|
@@ -55,8 +45,6 @@ let WhatsAppChannel = class WhatsAppChannel {
|
|
|
55
45
|
WhatsAppChannel = __decorate([
|
|
56
46
|
injectable(),
|
|
57
47
|
__metadata("design:paramtypes", [WhatsappChannelConfig,
|
|
58
|
-
ChatResolver,
|
|
59
|
-
UserResolver,
|
|
60
48
|
WhatsAppSender,
|
|
61
49
|
WhatsAppReceiver])
|
|
62
50
|
], WhatsAppChannel);
|
|
@@ -43,15 +43,12 @@ class WhatsAppReceiver {
|
|
|
43
43
|
chatType: 'PRIVATE',
|
|
44
44
|
channelName,
|
|
45
45
|
};
|
|
46
|
-
const userConnection = {
|
|
47
|
-
id: contact.wa_id,
|
|
48
|
-
channelName,
|
|
49
|
-
};
|
|
50
46
|
await listener({
|
|
51
47
|
chatConnection,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
message: {
|
|
49
|
+
senderName: contact.profile.name,
|
|
50
|
+
text: message.text.body,
|
|
51
|
+
},
|
|
55
52
|
});
|
|
56
53
|
}
|
|
57
54
|
}
|
package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppReceiverByDevConnection.js
RENAMED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
|
-
import { Logger } from '
|
|
2
|
+
import { Logger } from '../../../core/logger/Logger.js';
|
|
3
3
|
import { WhatsAppReceiver } from './WhatsAppReceiver.js';
|
|
4
|
-
import { WabotDevConnection } from '
|
|
5
|
-
import { devListentEvent } from '
|
|
6
|
-
import { singleton } from '
|
|
7
|
-
import { container } from '../../injection/index.js';
|
|
4
|
+
import { WabotDevConnection } from './WabotDevConnection.js';
|
|
5
|
+
import { devListentEvent } from './WabotDevSocketContracts.js';
|
|
6
|
+
import { singleton } from '../../../core/injection/index.js';
|
|
8
7
|
|
|
9
8
|
let WhatsAppReceiverByDevConnection = class WhatsAppReceiverByDevConnection extends WhatsAppReceiver {
|
|
10
9
|
wabotDevConnection;
|
|
@@ -23,10 +22,5 @@ WhatsAppReceiverByDevConnection = __decorate([
|
|
|
23
22
|
singleton(),
|
|
24
23
|
__metadata("design:paramtypes", [WabotDevConnection])
|
|
25
24
|
], WhatsAppReceiverByDevConnection);
|
|
26
|
-
if (WabotDevConnection.isTokenAvailable()) {
|
|
27
|
-
container.register(WhatsAppReceiver, {
|
|
28
|
-
useClass: WhatsAppReceiverByDevConnection,
|
|
29
|
-
});
|
|
30
|
-
}
|
|
31
25
|
|
|
32
26
|
export { WhatsAppReceiverByDevConnection };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
|
-
import { Logger } from '
|
|
2
|
+
import { Logger } from '../../../core/logger/Logger.js';
|
|
3
3
|
import { WhatsAppReceiver } from './WhatsAppReceiver.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { ExpressProvider } from '../../../feature/express/ExpressProvider.js';
|
|
5
|
+
import { json } from 'express';
|
|
6
6
|
import { WhatsAppRepository } from './WhatsAppRepository.js';
|
|
7
|
-
import {
|
|
8
|
-
import { container } from '../../injection/index.js';
|
|
7
|
+
import { singleton } from '../../../core/injection/index.js';
|
|
9
8
|
|
|
10
9
|
let WhatsAppReceiverByWebHook = class WhatsAppReceiverByWebHook extends WhatsAppReceiver {
|
|
11
10
|
expressProvider;
|
|
@@ -19,7 +18,7 @@ let WhatsAppReceiverByWebHook = class WhatsAppReceiverByWebHook extends WhatsApp
|
|
|
19
18
|
this.expressApp = this.expressProvider.getExpress();
|
|
20
19
|
}
|
|
21
20
|
async connect() {
|
|
22
|
-
this.expressApp.get(this.webhookPath, async (req, res) => {
|
|
21
|
+
this.expressApp.get(this.webhookPath, json(), async (req, res) => {
|
|
23
22
|
try {
|
|
24
23
|
let mode = req.query['hub.mode'];
|
|
25
24
|
let token = req.query['hub.verify_token'];
|
|
@@ -41,7 +40,7 @@ let WhatsAppReceiverByWebHook = class WhatsAppReceiverByWebHook extends WhatsApp
|
|
|
41
40
|
return;
|
|
42
41
|
}
|
|
43
42
|
});
|
|
44
|
-
this.expressApp.post(this.webhookPath, (req, res) => {
|
|
43
|
+
this.expressApp.post(this.webhookPath, json(), (req, res) => {
|
|
45
44
|
const payload = req.body;
|
|
46
45
|
this.handlePayload(payload);
|
|
47
46
|
res.sendStatus(200);
|
|
@@ -54,10 +53,5 @@ WhatsAppReceiverByWebHook = __decorate([
|
|
|
54
53
|
__metadata("design:paramtypes", [ExpressProvider,
|
|
55
54
|
WhatsAppRepository])
|
|
56
55
|
], WhatsAppReceiverByWebHook);
|
|
57
|
-
if (!WabotDevConnection.isTokenAvailable()) {
|
|
58
|
-
container.register(WhatsAppReceiver, {
|
|
59
|
-
useClass: WhatsAppReceiverByWebHook,
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
56
|
|
|
63
57
|
export { WhatsAppReceiverByWebHook };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import '
|
|
2
|
-
import
|
|
3
|
-
import '
|
|
1
|
+
import { ChatItem } from '../../../feature/chat-bot/ChatItem.js';
|
|
2
|
+
import '../../../core/injection/index.js';
|
|
3
|
+
import 'uuid';
|
|
4
|
+
import '../../../feature/chat-bot/metadata/ChatBotMetadataStore.js';
|
|
4
5
|
|
|
5
6
|
class WhatsAppSender {
|
|
6
7
|
logger;
|
|
@@ -13,6 +14,15 @@ class WhatsAppSender {
|
|
|
13
14
|
this.chatResolver = chatResolver;
|
|
14
15
|
this.whatsAppRepository = whatsAppRepository;
|
|
15
16
|
}
|
|
17
|
+
handleSendRequest(request) {
|
|
18
|
+
throw new Error('Not implemented');
|
|
19
|
+
}
|
|
20
|
+
handleSendTemplateRequest(request) {
|
|
21
|
+
throw new Error('Not implemented');
|
|
22
|
+
}
|
|
23
|
+
handleGetWhatsAppTemplate(request) {
|
|
24
|
+
throw new Error('Not implemented');
|
|
25
|
+
}
|
|
16
26
|
async sendWhatsApp(request, options) {
|
|
17
27
|
try {
|
|
18
28
|
await this.handleSendRequest(request);
|
|
@@ -22,6 +32,7 @@ class WhatsAppSender {
|
|
|
22
32
|
}
|
|
23
33
|
catch (error) {
|
|
24
34
|
this.logger.error(`Error sending WhatsApp message: ${error}`);
|
|
35
|
+
throw new Error(`Error sending WhatsApp message: ${error}`, { cause: error });
|
|
25
36
|
}
|
|
26
37
|
}
|
|
27
38
|
async sendWhatsAppTemplate(request, options) {
|
|
@@ -34,6 +45,7 @@ class WhatsAppSender {
|
|
|
34
45
|
}
|
|
35
46
|
catch (error) {
|
|
36
47
|
this.logger.error(`Error sending WhatsApp message: ${error}`);
|
|
48
|
+
throw new Error(`Error sending WhatsApp message: ${error}`, { cause: error });
|
|
37
49
|
}
|
|
38
50
|
}
|
|
39
51
|
async getWhatsAppTemplate(request) {
|
|
@@ -55,11 +67,12 @@ class WhatsAppSender {
|
|
|
55
67
|
if (!template) {
|
|
56
68
|
throw new Error(`WhatsAppTemplate with name ${request.templateMessage.templateName} and language ${request.templateMessage.languageCode} not found`);
|
|
57
69
|
}
|
|
70
|
+
const components = template.components
|
|
71
|
+
.filter((x) => x.text != null)
|
|
72
|
+
.map((x) => x.text)
|
|
73
|
+
.join('\n');
|
|
58
74
|
return {
|
|
59
|
-
text:
|
|
60
|
-
.filter((x) => x.text != null)
|
|
61
|
-
.map((x) => x.text)
|
|
62
|
-
.join('\n'),
|
|
75
|
+
text: this.replaceTemplateParameters(components, request.templateMessage.parameters),
|
|
63
76
|
senderName: request.senderName,
|
|
64
77
|
};
|
|
65
78
|
}
|
|
@@ -70,13 +83,29 @@ class WhatsAppSender {
|
|
|
70
83
|
channelName: 'WhatsAppChannel',
|
|
71
84
|
};
|
|
72
85
|
const chat = await this.chatResolver.resolve(chatConnection);
|
|
73
|
-
const chatMemory = await this.chatRepository.findMemory(chat.
|
|
86
|
+
const chatMemory = await this.chatRepository.findMemory(chat.id);
|
|
74
87
|
const chatItem = new ChatItem({
|
|
75
|
-
type: '
|
|
76
|
-
|
|
88
|
+
type: 'botMessage',
|
|
89
|
+
botMessage: message
|
|
77
90
|
});
|
|
78
91
|
await chatMemory.create(chatItem);
|
|
79
92
|
}
|
|
93
|
+
replaceTemplateParameters(template, data) {
|
|
94
|
+
let result = template;
|
|
95
|
+
data.forEach((param) => {
|
|
96
|
+
if (param.type === 'text' && param.parameter_name) {
|
|
97
|
+
const tag = `{{${param.parameter_name}}}`;
|
|
98
|
+
result = result.split(tag).join(param.text);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
data.forEach((param, index) => {
|
|
102
|
+
if (param.type === 'text') {
|
|
103
|
+
const tag = `{{${index + 1}}}`;
|
|
104
|
+
result = result.split(tag).join(param.text);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
return result;
|
|
108
|
+
}
|
|
80
109
|
}
|
|
81
110
|
|
|
82
111
|
export { WhatsAppSender };
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
|
-
import { Logger } from '
|
|
2
|
+
import { Logger } from '../../../core/logger/Logger.js';
|
|
3
3
|
import { WhatsAppSender } from './WhatsAppSender.js';
|
|
4
|
-
import {
|
|
5
|
-
import '
|
|
6
|
-
import { ChatResolver } from '
|
|
7
|
-
import '
|
|
8
|
-
import
|
|
9
|
-
import '
|
|
4
|
+
import { singleton } from '../../../core/injection/index.js';
|
|
5
|
+
import '../../../feature/chat-controller/metadata/ControllerMetadataStore.js';
|
|
6
|
+
import { ChatResolver } from '../../../feature/chat-controller/ChatResolver.js';
|
|
7
|
+
import { ChatRepository } from '../../../feature/chat-bot/ChatRepository.js';
|
|
8
|
+
import 'uuid';
|
|
9
|
+
import '../../../feature/chat-bot/metadata/ChatBotMetadataStore.js';
|
|
10
|
+
import 'reflect-metadata';
|
|
11
|
+
import '../../../feature/mindset/metadata/MindsetMetadataStore.js';
|
|
12
|
+
import '../../../feature/mindset/MindsetOperator.js';
|
|
10
13
|
import { WhatsAppRepository } from './WhatsAppRepository.js';
|
|
11
|
-
import { WabotDevConnection } from '../wabot/WabotDevConnection.js';
|
|
12
14
|
|
|
13
15
|
let WhatsAppSenderByCloudApi = class WhatsAppSenderByCloudApi extends WhatsAppSender {
|
|
14
16
|
constructor(chatRepository, chatResolver, whatsAppRepository) {
|
|
@@ -115,10 +117,5 @@ WhatsAppSenderByCloudApi = __decorate([
|
|
|
115
117
|
ChatResolver,
|
|
116
118
|
WhatsAppRepository])
|
|
117
119
|
], WhatsAppSenderByCloudApi);
|
|
118
|
-
if (!WabotDevConnection.isTokenAvailable()) {
|
|
119
|
-
container.register(WhatsAppSender, {
|
|
120
|
-
useClass: WhatsAppSenderByCloudApi,
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
120
|
|
|
124
121
|
export { WhatsAppSenderByCloudApi };
|
package/dist/src/{channels → addon/chat-controller}/whatsapp/WhatsAppSenderByDevConnection.js
RENAMED
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
2
|
import { WhatsAppSender } from './WhatsAppSender.js';
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { ChatRepository } from '
|
|
7
|
-
import '
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import '
|
|
11
|
-
import '
|
|
3
|
+
import { singleton } from '../../../core/injection/index.js';
|
|
4
|
+
import '../../../feature/chat-controller/metadata/ControllerMetadataStore.js';
|
|
5
|
+
import { ChatResolver } from '../../../feature/chat-controller/ChatResolver.js';
|
|
6
|
+
import { ChatRepository } from '../../../feature/chat-bot/ChatRepository.js';
|
|
7
|
+
import 'uuid';
|
|
8
|
+
import '../../../feature/chat-bot/metadata/ChatBotMetadataStore.js';
|
|
9
|
+
import 'reflect-metadata';
|
|
10
|
+
import '../../../feature/mindset/metadata/MindsetMetadataStore.js';
|
|
11
|
+
import '../../../feature/mindset/MindsetOperator.js';
|
|
12
|
+
import { Logger } from '../../../core/logger/Logger.js';
|
|
12
13
|
import { WhatsAppRepository } from './WhatsAppRepository.js';
|
|
14
|
+
import { WabotDevConnection } from './WabotDevConnection.js';
|
|
15
|
+
import { devEmitEvent } from './WabotDevSocketContracts.js';
|
|
13
16
|
|
|
14
17
|
let WhatsAppSenderByDevConnection = class WhatsAppSenderByDevConnection extends WhatsAppSender {
|
|
15
18
|
wabotDevConnection;
|
|
@@ -42,7 +45,7 @@ let WhatsAppSenderByDevConnection = class WhatsAppSenderByDevConnection extends
|
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
47
|
async handleGetWhatsAppTemplate(request) {
|
|
45
|
-
throw new Error(
|
|
48
|
+
throw new Error('Not implemented');
|
|
46
49
|
}
|
|
47
50
|
};
|
|
48
51
|
WhatsAppSenderByDevConnection = __decorate([
|
|
@@ -52,10 +55,5 @@ WhatsAppSenderByDevConnection = __decorate([
|
|
|
52
55
|
ChatResolver,
|
|
53
56
|
WhatsAppRepository])
|
|
54
57
|
], WhatsAppSenderByDevConnection);
|
|
55
|
-
if (WabotDevConnection.isTokenAvailable()) {
|
|
56
|
-
container.register(WhatsAppSender, {
|
|
57
|
-
useClass: WhatsAppSenderByDevConnection,
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
58
|
|
|
61
59
|
export { WhatsAppSenderByDevConnection };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { __decorate, __metadata } from 'tslib';
|
|
2
|
+
import { mindsetFunction } from '../../../feature/mindset/metadata/functions/@mindsetFunction.js';
|
|
3
|
+
import 'reflect-metadata';
|
|
4
|
+
import '../../../core/injection/index.js';
|
|
5
|
+
import '../../../feature/mindset/metadata/MindsetMetadataStore.js';
|
|
6
|
+
import { mindsetModule } from '../../../feature/mindset/metadata/modules/@mindsetModule.js';
|
|
7
|
+
import { param } from '../../../feature/mindset/metadata/params/@param.js';
|
|
8
|
+
import '../../../feature/mindset/MindsetOperator.js';
|
|
9
|
+
import { convert } from 'html-to-text';
|
|
10
|
+
|
|
11
|
+
function toPascalCaseFunctionName(title) {
|
|
12
|
+
const cleaned = title.replace(/[^a-zA-Z0-9]+/g, ' ');
|
|
13
|
+
const words = cleaned
|
|
14
|
+
.trim()
|
|
15
|
+
.split(/\s+/)
|
|
16
|
+
.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase());
|
|
17
|
+
return words.join('');
|
|
18
|
+
}
|
|
19
|
+
async function fetchRawHtml(url) {
|
|
20
|
+
try {
|
|
21
|
+
const response = await fetch(url);
|
|
22
|
+
if (!response.ok) {
|
|
23
|
+
throw new Error(`HTTP error! Status: ${response.status}`);
|
|
24
|
+
}
|
|
25
|
+
const html = await response.text();
|
|
26
|
+
return html;
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
throw new Error(`Failed to fetch HTML from ${url}: ${error.message}`);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
class KeywordsReq {
|
|
33
|
+
keywords = '';
|
|
34
|
+
}
|
|
35
|
+
__decorate([
|
|
36
|
+
param({
|
|
37
|
+
description: 'Keywords separated by space',
|
|
38
|
+
}),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], KeywordsReq.prototype, "keywords", void 0);
|
|
41
|
+
function HtmlModule(options) {
|
|
42
|
+
var _a;
|
|
43
|
+
const standaricedTitle = toPascalCaseFunctionName(options.title);
|
|
44
|
+
let documentText = null;
|
|
45
|
+
let HtmlModuleIntern = class HtmlModuleIntern {
|
|
46
|
+
async [_a = `searchInTheDocument${standaricedTitle}`](req) {
|
|
47
|
+
if (!documentText) {
|
|
48
|
+
const rawHtml = await fetchRawHtml(options.url);
|
|
49
|
+
documentText = convert(rawHtml);
|
|
50
|
+
}
|
|
51
|
+
return documentText;
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
__decorate([
|
|
55
|
+
mindsetFunction({
|
|
56
|
+
description: `Search information using keywords in the document "${options.title}". Priorize this info.`,
|
|
57
|
+
}),
|
|
58
|
+
__metadata("design:type", Function),
|
|
59
|
+
__metadata("design:paramtypes", [KeywordsReq]),
|
|
60
|
+
__metadata("design:returntype", Promise)
|
|
61
|
+
], HtmlModuleIntern.prototype, _a, null);
|
|
62
|
+
HtmlModuleIntern = __decorate([
|
|
63
|
+
mindsetModule({
|
|
64
|
+
description: `Search information using keywords in the document ${options.title}`,
|
|
65
|
+
})
|
|
66
|
+
], HtmlModuleIntern);
|
|
67
|
+
return HtmlModuleIntern;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export { HtmlModule };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __decorate, __metadata } from 'tslib';
|
|
2
|
+
import '../../core/injection/index.js';
|
|
3
|
+
import '../../core/validation/metadata/ValidationMetadataStore.js';
|
|
4
|
+
import { isNotEmpty } from '../validation/is-not-empty/@isNotEmpty.js';
|
|
5
|
+
import { isString } from '../validation/is-string/@isString.js';
|
|
6
|
+
|
|
7
|
+
class MoneyDto {
|
|
8
|
+
amount = '';
|
|
9
|
+
currency = '';
|
|
10
|
+
}
|
|
11
|
+
__decorate([
|
|
12
|
+
isString(),
|
|
13
|
+
isNotEmpty(),
|
|
14
|
+
__metadata("design:type", String)
|
|
15
|
+
], MoneyDto.prototype, "amount", void 0);
|
|
16
|
+
__decorate([
|
|
17
|
+
isString(),
|
|
18
|
+
isNotEmpty(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], MoneyDto.prototype, "currency", void 0);
|
|
21
|
+
|
|
22
|
+
export { MoneyDto };
|