FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
evolution-api/src/api/server.module.ts at develop · evolution-foundation/evolution-api · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
evolution-foundation
/
evolution-api
Public
Notifications
You must be signed in to change notification settings
Fork
7.2k
Star
9.4k
Code
Issues
140
Pull requests
63
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
evolution-api
/
src
/
api
/
server.module.ts
Copy path
More file actions
More file actions
Latest commit
History
History
History
145 lines (122 loc) · 7.73 KB
Breadcrumbs
evolution-api
/
src
/
api
/
server.module.ts
Copy path
File metadata and controls
145 lines (122 loc) · 7.73 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
import
{
CacheEngine
}
from
'@cache/cacheengine'
;
import
{
Chatwoot
,
configService
,
ProviderSession
}
from
'@config/env.config'
;
import
{
eventEmitter
}
from
'@config/event.config'
;
import
{
Logger
}
from
'@config/logger.config'
;
import
{
BusinessController
}
from
'./controllers/business.controller'
;
import
{
CallController
}
from
'./controllers/call.controller'
;
import
{
ChatController
}
from
'./controllers/chat.controller'
;
import
{
GroupController
}
from
'./controllers/group.controller'
;
import
{
InstanceController
}
from
'./controllers/instance.controller'
;
import
{
LabelController
}
from
'./controllers/label.controller'
;
import
{
ProxyController
}
from
'./controllers/proxy.controller'
;
import
{
SendMessageController
}
from
'./controllers/sendMessage.controller'
;
import
{
SettingsController
}
from
'./controllers/settings.controller'
;
import
{
TemplateController
}
from
'./controllers/template.controller'
;
import
{
ChannelController
}
from
'./integrations/channel/channel.controller'
;
import
{
EvoHubClient
}
from
'./integrations/channel/evohub/evohub.client'
;
import
{
EvoHubController
}
from
'./integrations/channel/evohub/evohub.controller'
;
import
{
EvolutionController
}
from
'./integrations/channel/evolution/evolution.controller'
;
import
{
MetaController
}
from
'./integrations/channel/meta/meta.controller'
;
import
{
BaileysController
}
from
'./integrations/channel/whatsapp/baileys.controller'
;
import
{
ChatbotController
}
from
'./integrations/chatbot/chatbot.controller'
;
import
{
ChatwootController
}
from
'./integrations/chatbot/chatwoot/controllers/chatwoot.controller'
;
import
{
ChatwootService
}
from
'./integrations/chatbot/chatwoot/services/chatwoot.service'
;
import
{
DifyController
}
from
'./integrations/chatbot/dify/controllers/dify.controller'
;
import
{
DifyService
}
from
'./integrations/chatbot/dify/services/dify.service'
;
import
{
EvoaiController
}
from
'./integrations/chatbot/evoai/controllers/evoai.controller'
;
import
{
EvoaiService
}
from
'./integrations/chatbot/evoai/services/evoai.service'
;
import
{
EvolutionBotController
}
from
'./integrations/chatbot/evolutionBot/controllers/evolutionBot.controller'
;
import
{
EvolutionBotService
}
from
'./integrations/chatbot/evolutionBot/services/evolutionBot.service'
;
import
{
FlowiseController
}
from
'./integrations/chatbot/flowise/controllers/flowise.controller'
;
import
{
FlowiseService
}
from
'./integrations/chatbot/flowise/services/flowise.service'
;
import
{
N8nController
}
from
'./integrations/chatbot/n8n/controllers/n8n.controller'
;
import
{
N8nService
}
from
'./integrations/chatbot/n8n/services/n8n.service'
;
import
{
OpenaiController
}
from
'./integrations/chatbot/openai/controllers/openai.controller'
;
import
{
OpenaiService
}
from
'./integrations/chatbot/openai/services/openai.service'
;
import
{
TypebotController
}
from
'./integrations/chatbot/typebot/controllers/typebot.controller'
;
import
{
TypebotService
}
from
'./integrations/chatbot/typebot/services/typebot.service'
;
import
{
EventManager
}
from
'./integrations/event/event.manager'
;
import
{
S3Controller
}
from
'./integrations/storage/s3/controllers/s3.controller'
;
import
{
S3Service
}
from
'./integrations/storage/s3/services/s3.service'
;
import
{
ProviderFiles
}
from
'./provider/sessions'
;
import
{
PrismaRepository
}
from
'./repository/repository.service'
;
import
{
CacheService
}
from
'./services/cache.service'
;
import
{
WAMonitoringService
}
from
'./services/monitor.service'
;
import
{
ProxyService
}
from
'./services/proxy.service'
;
import
{
SettingsService
}
from
'./services/settings.service'
;
import
{
TemplateService
}
from
'./services/template.service'
;
const
logger
=
new
Logger
(
'WA MODULE'
)
;
let
chatwootCache
:
CacheService
=
null
;
if
(
configService
.
get
<
Chatwoot
>
(
'CHATWOOT'
)
.
ENABLED
)
{
chatwootCache
=
new
CacheService
(
new
CacheEngine
(
configService
,
ChatwootService
.
name
)
.
getEngine
(
)
)
;
}
export
const
cache
=
new
CacheService
(
new
CacheEngine
(
configService
,
'instance'
)
.
getEngine
(
)
)
;
const
baileysCache
=
new
CacheService
(
new
CacheEngine
(
configService
,
'baileys'
)
.
getEngine
(
)
)
;
let
providerFiles
:
ProviderFiles
=
null
;
if
(
configService
.
get
<
ProviderSession
>
(
'PROVIDER'
)
.
ENABLED
)
{
providerFiles
=
new
ProviderFiles
(
configService
)
;
}
export
const
prismaRepository
=
new
PrismaRepository
(
configService
)
;
export
const
waMonitor
=
new
WAMonitoringService
(
eventEmitter
,
configService
,
prismaRepository
,
providerFiles
,
cache
,
chatwootCache
,
baileysCache
,
)
;
const
s3Service
=
new
S3Service
(
prismaRepository
)
;
export
const
s3Controller
=
new
S3Controller
(
s3Service
)
;
const
templateService
=
new
TemplateService
(
waMonitor
,
prismaRepository
,
configService
)
;
export
const
templateController
=
new
TemplateController
(
templateService
)
;
const
proxyService
=
new
ProxyService
(
waMonitor
)
;
export
const
proxyController
=
new
ProxyController
(
proxyService
,
waMonitor
)
;
const
chatwootService
=
new
ChatwootService
(
waMonitor
,
configService
,
prismaRepository
,
chatwootCache
)
;
export
const
chatwootController
=
new
ChatwootController
(
chatwootService
,
configService
)
;
const
settingsService
=
new
SettingsService
(
waMonitor
)
;
export
const
settingsController
=
new
SettingsController
(
settingsService
)
;
export
const
instanceController
=
new
InstanceController
(
waMonitor
,
configService
,
prismaRepository
,
eventEmitter
,
chatwootService
,
settingsService
,
proxyController
,
cache
,
chatwootCache
,
baileysCache
,
providerFiles
,
)
;
export
const
sendMessageController
=
new
SendMessageController
(
waMonitor
)
;
export
const
callController
=
new
CallController
(
waMonitor
)
;
export
const
chatController
=
new
ChatController
(
waMonitor
)
;
export
const
businessController
=
new
BusinessController
(
waMonitor
)
;
export
const
groupController
=
new
GroupController
(
waMonitor
)
;
export
const
labelController
=
new
LabelController
(
waMonitor
)
;
export
const
eventManager
=
new
EventManager
(
prismaRepository
,
waMonitor
)
;
export
const
chatbotController
=
new
ChatbotController
(
prismaRepository
,
waMonitor
)
;
export
const
channelController
=
new
ChannelController
(
prismaRepository
,
waMonitor
)
;
// channels
export
const
evolutionController
=
new
EvolutionController
(
prismaRepository
,
waMonitor
)
;
export
const
metaController
=
new
MetaController
(
prismaRepository
,
waMonitor
)
;
export
const
evoHubController
=
new
EvoHubController
(
prismaRepository
,
waMonitor
,
configService
)
;
export
const
evoHubClient
=
new
EvoHubClient
(
configService
)
;
export
const
baileysController
=
new
BaileysController
(
waMonitor
)
;
const
openaiService
=
new
OpenaiService
(
waMonitor
,
prismaRepository
,
configService
)
;
export
const
openaiController
=
new
OpenaiController
(
openaiService
,
prismaRepository
,
waMonitor
)
;
// chatbots
const
typebotService
=
new
TypebotService
(
waMonitor
,
configService
,
prismaRepository
,
openaiService
)
;
export
const
typebotController
=
new
TypebotController
(
typebotService
,
prismaRepository
,
waMonitor
)
;
const
difyService
=
new
DifyService
(
waMonitor
,
prismaRepository
,
configService
,
openaiService
)
;
export
const
difyController
=
new
DifyController
(
difyService
,
prismaRepository
,
waMonitor
)
;
const
evolutionBotService
=
new
EvolutionBotService
(
waMonitor
,
prismaRepository
,
configService
,
openaiService
)
;
export
const
evolutionBotController
=
new
EvolutionBotController
(
evolutionBotService
,
prismaRepository
,
waMonitor
)
;
const
flowiseService
=
new
FlowiseService
(
waMonitor
,
prismaRepository
,
configService
,
openaiService
)
;
export
const
flowiseController
=
new
FlowiseController
(
flowiseService
,
prismaRepository
,
waMonitor
)
;
const
n8nService
=
new
N8nService
(
waMonitor
,
prismaRepository
,
configService
,
openaiService
)
;
export
const
n8nController
=
new
N8nController
(
n8nService
,
prismaRepository
,
waMonitor
)
;
const
evoaiService
=
new
EvoaiService
(
waMonitor
,
prismaRepository
,
configService
,
openaiService
)
;
export
const
evoaiController
=
new
EvoaiController
(
evoaiService
,
prismaRepository
,
waMonitor
)
;
logger
.
info
(
'Module - ON'
)
;
Back
|
FazBrowse Home
|
New Git URL