Skip to content

Commit 5f34d9c

Browse files
committed
feat: pusher event integration
1 parent cebe5b6 commit 5f34d9c

File tree

17 files changed

+735
-2
lines changed

17 files changed

+735
-2
lines changed

.env.example

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,41 @@ SQS_REGION=
9090
WEBSOCKET_ENABLED=false
9191
WEBSOCKET_GLOBAL_EVENTS=false
9292

93+
# Pusher - Environment variables
94+
PUSHER_ENABLED=true
95+
PUSHER_GLOBAL_ENABLED=false
96+
PUSHER_GLOBAL_APP_ID=
97+
PUSHER_GLOBAL_KEY=
98+
PUSHER_GLOBAL_SECRET=
99+
PUSHER_GLOBAL_CLUSTER=
100+
PUSHER_GLOBAL_USE_TLS=true
101+
# Choose the events you want to send to Pusher
102+
PUSHER_EVENTS_APPLICATION_STARTUP=true
103+
PUSHER_EVENTS_QRCODE_UPDATED=true
104+
PUSHER_EVENTS_MESSAGES_SET=true
105+
PUSHER_EVENTS_MESSAGES_UPSERT=true
106+
PUSHER_EVENTS_MESSAGES_EDITED=true
107+
PUSHER_EVENTS_MESSAGES_UPDATE=true
108+
PUSHER_EVENTS_MESSAGES_DELETE=true
109+
PUSHER_EVENTS_SEND_MESSAGE=true
110+
PUSHER_EVENTS_CONTACTS_SET=true
111+
PUSHER_EVENTS_CONTACTS_UPSERT=true
112+
PUSHER_EVENTS_CONTACTS_UPDATE=true
113+
PUSHER_EVENTS_PRESENCE_UPDATE=true
114+
PUSHER_EVENTS_CHATS_SET=true
115+
PUSHER_EVENTS_CHATS_UPSERT=true
116+
PUSHER_EVENTS_CHATS_UPDATE=true
117+
PUSHER_EVENTS_CHATS_DELETE=true
118+
PUSHER_EVENTS_GROUPS_UPSERT=true
119+
PUSHER_EVENTS_GROUPS_UPDATE=true
120+
PUSHER_EVENTS_GROUP_PARTICIPANTS_UPDATE=true
121+
PUSHER_EVENTS_CONNECTION_UPDATE=true
122+
PUSHER_EVENTS_LABELS_EDIT=true
123+
PUSHER_EVENTS_LABELS_ASSOCIATION=true
124+
PUSHER_EVENTS_CALL=true
125+
PUSHER_EVENTS_TYPEBOT_START=false
126+
PUSHER_EVENTS_TYPEBOT_CHANGE_STATUS=false
127+
93128
# WhatsApp Business API - Environment variables
94129
# Token used to validate the webhook on the Facebook APP
95130
WA_BUSINESS_TOKEN_WEBHOOK=evolution

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* Send List Message
77
* Send Button Message
88
* Added unreadMessages to chats
9+
* Pusher event integration
910

1011
### Fixed
1112

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
"multer": "^1.4.5-lts.1",
7575
"node-cache": "^5.1.2",
7676
"pino": "^8.11.0",
77+
"pusher": "^5.2.0",
7778
"qrcode": "^1.5.1",
7879
"qrcode-terminal": "^0.12.0",
7980
"redis": "^4.6.5",
Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,188 @@
1+
/*
2+
Warnings:
3+
4+
- You are about to alter the column `createdAt` on the `Chat` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
5+
- You are about to alter the column `updatedAt` on the `Chat` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
6+
- You are about to alter the column `createdAt` on the `Chatwoot` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
7+
- You are about to alter the column `updatedAt` on the `Chatwoot` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
8+
- You are about to alter the column `createdAt` on the `Contact` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
9+
- You are about to alter the column `updatedAt` on the `Contact` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
10+
- You are about to alter the column `createdAt` on the `Dify` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
11+
- You are about to alter the column `updatedAt` on the `Dify` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
12+
- You are about to alter the column `createdAt` on the `DifySetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
13+
- You are about to alter the column `updatedAt` on the `DifySetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
14+
- You are about to alter the column `createdAt` on the `EvolutionBot` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
15+
- You are about to alter the column `updatedAt` on the `EvolutionBot` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
16+
- You are about to alter the column `createdAt` on the `EvolutionBotSetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
17+
- You are about to alter the column `updatedAt` on the `EvolutionBotSetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
18+
- You are about to alter the column `createdAt` on the `Flowise` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
19+
- You are about to alter the column `updatedAt` on the `Flowise` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
20+
- You are about to alter the column `createdAt` on the `FlowiseSetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
21+
- You are about to alter the column `updatedAt` on the `FlowiseSetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
22+
- You are about to alter the column `disconnectionAt` on the `Instance` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
23+
- You are about to alter the column `createdAt` on the `Instance` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
24+
- You are about to alter the column `updatedAt` on the `Instance` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
25+
- You are about to alter the column `createdAt` on the `IntegrationSession` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
26+
- You are about to alter the column `updatedAt` on the `IntegrationSession` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
27+
- You are about to alter the column `createdAt` on the `IsOnWhatsapp` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
28+
- You are about to alter the column `updatedAt` on the `IsOnWhatsapp` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
29+
- You are about to alter the column `createdAt` on the `Label` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
30+
- You are about to alter the column `updatedAt` on the `Label` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
31+
- You are about to alter the column `createdAt` on the `Media` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
32+
- You are about to alter the column `createdAt` on the `OpenaiBot` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
33+
- You are about to alter the column `updatedAt` on the `OpenaiBot` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
34+
- You are about to alter the column `createdAt` on the `OpenaiCreds` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
35+
- You are about to alter the column `updatedAt` on the `OpenaiCreds` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
36+
- You are about to alter the column `createdAt` on the `OpenaiSetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
37+
- You are about to alter the column `updatedAt` on the `OpenaiSetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
38+
- You are about to alter the column `createdAt` on the `Proxy` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
39+
- You are about to alter the column `updatedAt` on the `Proxy` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
40+
- You are about to alter the column `createdAt` on the `Rabbitmq` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
41+
- You are about to alter the column `updatedAt` on the `Rabbitmq` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
42+
- You are about to alter the column `createdAt` on the `Session` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
43+
- You are about to alter the column `createdAt` on the `Setting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
44+
- You are about to alter the column `updatedAt` on the `Setting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
45+
- You are about to alter the column `createdAt` on the `Sqs` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
46+
- You are about to alter the column `updatedAt` on the `Sqs` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
47+
- You are about to alter the column `createdAt` on the `Template` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
48+
- You are about to alter the column `updatedAt` on the `Template` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
49+
- You are about to alter the column `createdAt` on the `Typebot` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
50+
- You are about to alter the column `updatedAt` on the `Typebot` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
51+
- You are about to alter the column `createdAt` on the `TypebotSetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
52+
- You are about to alter the column `updatedAt` on the `TypebotSetting` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
53+
- You are about to alter the column `createdAt` on the `Webhook` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
54+
- You are about to alter the column `updatedAt` on the `Webhook` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
55+
- You are about to alter the column `createdAt` on the `Websocket` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
56+
- You are about to alter the column `updatedAt` on the `Websocket` table. The data in that column could be lost. The data in that column will be cast from `Timestamp(0)` to `Timestamp`.
57+
58+
*/
59+
-- AlterTable
60+
ALTER TABLE `Chat` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
61+
MODIFY `updatedAt` TIMESTAMP NULL;
62+
63+
-- AlterTable
64+
ALTER TABLE `Chatwoot` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
65+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
66+
67+
-- AlterTable
68+
ALTER TABLE `Contact` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
69+
MODIFY `updatedAt` TIMESTAMP NULL;
70+
71+
-- AlterTable
72+
ALTER TABLE `Dify` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
73+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
74+
75+
-- AlterTable
76+
ALTER TABLE `DifySetting` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
77+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
78+
79+
-- AlterTable
80+
ALTER TABLE `EvolutionBot` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
81+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
82+
83+
-- AlterTable
84+
ALTER TABLE `EvolutionBotSetting` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
85+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
86+
87+
-- AlterTable
88+
ALTER TABLE `Flowise` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
89+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
90+
91+
-- AlterTable
92+
ALTER TABLE `FlowiseSetting` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
93+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
94+
95+
-- AlterTable
96+
ALTER TABLE `Instance` MODIFY `disconnectionAt` TIMESTAMP NULL,
97+
MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
98+
MODIFY `updatedAt` TIMESTAMP NULL;
99+
100+
-- AlterTable
101+
ALTER TABLE `IntegrationSession` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
102+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
103+
104+
-- AlterTable
105+
ALTER TABLE `IsOnWhatsapp` MODIFY `createdAt` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
106+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
107+
108+
-- AlterTable
109+
ALTER TABLE `Label` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
110+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
111+
112+
-- AlterTable
113+
ALTER TABLE `Media` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP;
114+
115+
-- AlterTable
116+
ALTER TABLE `Message` MODIFY `status` VARCHAR(30) NULL;
117+
118+
-- AlterTable
119+
ALTER TABLE `OpenaiBot` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
120+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
121+
122+
-- AlterTable
123+
ALTER TABLE `OpenaiCreds` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
124+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
125+
126+
-- AlterTable
127+
ALTER TABLE `OpenaiSetting` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
128+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
129+
130+
-- AlterTable
131+
ALTER TABLE `Proxy` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
132+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
133+
134+
-- AlterTable
135+
ALTER TABLE `Rabbitmq` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
136+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
137+
138+
-- AlterTable
139+
ALTER TABLE `Session` MODIFY `createdAt` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP;
140+
141+
-- AlterTable
142+
ALTER TABLE `Setting` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
143+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
144+
145+
-- AlterTable
146+
ALTER TABLE `Sqs` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
147+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
148+
149+
-- AlterTable
150+
ALTER TABLE `Template` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
151+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
152+
153+
-- AlterTable
154+
ALTER TABLE `Typebot` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
155+
MODIFY `updatedAt` TIMESTAMP NULL;
156+
157+
-- AlterTable
158+
ALTER TABLE `TypebotSetting` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
159+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
160+
161+
-- AlterTable
162+
ALTER TABLE `Webhook` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
163+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
164+
165+
-- AlterTable
166+
ALTER TABLE `Websocket` MODIFY `createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
167+
MODIFY `updatedAt` TIMESTAMP NOT NULL;
168+
169+
-- CreateTable
170+
CREATE TABLE `Pusher` (
171+
`id` VARCHAR(191) NOT NULL,
172+
`enabled` BOOLEAN NOT NULL DEFAULT false,
173+
`appId` VARCHAR(100) NOT NULL,
174+
`key` VARCHAR(100) NOT NULL,
175+
`secret` VARCHAR(100) NOT NULL,
176+
`cluster` VARCHAR(100) NOT NULL,
177+
`useTLS` BOOLEAN NOT NULL DEFAULT false,
178+
`events` JSON NOT NULL,
179+
`createdAt` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,
180+
`updatedAt` TIMESTAMP NOT NULL,
181+
`instanceId` VARCHAR(191) NOT NULL,
182+
183+
UNIQUE INDEX `Pusher_instanceId_key`(`instanceId`),
184+
PRIMARY KEY (`id`)
185+
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
186+
187+
-- AddForeignKey
188+
ALTER TABLE `Pusher` ADD CONSTRAINT `Pusher_instanceId_fkey` FOREIGN KEY (`instanceId`) REFERENCES `Instance`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;

prisma/mysql-schema.prisma

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ model Instance {
104104
EvolutionBotSetting EvolutionBotSetting?
105105
Flowise Flowise[]
106106
FlowiseSetting FlowiseSetting?
107+
Pusher Pusher?
107108
}
108109

109110
model Session {
@@ -289,6 +290,21 @@ model Websocket {
289290
instanceId String @unique
290291
}
291292

293+
model Pusher {
294+
id String @id @default(cuid())
295+
enabled Boolean @default(false)
296+
appId String @db.VarChar(100)
297+
key String @db.VarChar(100)
298+
secret String @db.VarChar(100)
299+
cluster String @db.VarChar(100)
300+
useTLS Boolean @default(false)
301+
events Json @db.Json
302+
createdAt DateTime? @default(dbgenerated("CURRENT_TIMESTAMP")) @db.Timestamp
303+
updatedAt DateTime @updatedAt @db.Timestamp
304+
Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)
305+
instanceId String @unique
306+
}
307+
292308
model Typebot {
293309
id String @id @default(cuid())
294310
enabled Boolean @default(true)
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
-- CreateTable
2+
CREATE TABLE "Pusher" (
3+
"id" TEXT NOT NULL,
4+
"enabled" BOOLEAN NOT NULL DEFAULT false,
5+
"appId" VARCHAR(100) NOT NULL,
6+
"key" VARCHAR(100) NOT NULL,
7+
"secret" VARCHAR(100) NOT NULL,
8+
"cluster" VARCHAR(100) NOT NULL,
9+
"useTLS" BOOLEAN NOT NULL DEFAULT false,
10+
"events" JSONB NOT NULL,
11+
"createdAt" TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
12+
"updatedAt" TIMESTAMP NOT NULL,
13+
"instanceId" TEXT NOT NULL,
14+
15+
CONSTRAINT "Pusher_pkey" PRIMARY KEY ("id")
16+
);
17+
18+
-- CreateIndex
19+
CREATE UNIQUE INDEX "Pusher_instanceId_key" ON "Pusher"("instanceId");
20+
21+
-- AddForeignKey
22+
ALTER TABLE "Pusher" ADD CONSTRAINT "Pusher_instanceId_fkey" FOREIGN KEY ("instanceId") REFERENCES "Instance"("id") ON DELETE CASCADE ON UPDATE CASCADE;

prisma/postgresql-schema.prisma

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ model Instance {
104104
EvolutionBotSetting EvolutionBotSetting?
105105
Flowise Flowise[]
106106
FlowiseSetting FlowiseSetting?
107+
Pusher Pusher?
107108
}
108109

109110
model Session {
@@ -291,6 +292,21 @@ model Websocket {
291292
instanceId String @unique
292293
}
293294

295+
model Pusher {
296+
id String @id @default(cuid())
297+
enabled Boolean @default(false) @db.Boolean
298+
appId String @db.VarChar(100)
299+
key String @db.VarChar(100)
300+
secret String @db.VarChar(100)
301+
cluster String @db.VarChar(100)
302+
useTLS Boolean @default(false) @db.Boolean
303+
events Json @db.JsonB
304+
createdAt DateTime? @default(now()) @db.Timestamp
305+
updatedAt DateTime @updatedAt @db.Timestamp
306+
Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)
307+
instanceId String @unique
308+
}
309+
294310
model Typebot {
295311
id String @id @default(cuid())
296312
enabled Boolean @default(true) @db.Boolean

src/api/integrations/event/event.controller.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export type EmitData = {
77
instanceName: string;
88
origin: string;
99
event: string;
10-
data: Object;
10+
data: any;
1111
serverUrl: string;
1212
dateTime: string;
1313
sender: string;
@@ -22,7 +22,7 @@ export interface EventControllerInterface {
2222
}
2323

2424
export class EventController {
25-
private prismaRepository: PrismaRepository;
25+
public prismaRepository: PrismaRepository;
2626
private waMonitor: WAMonitoringService;
2727
private integrationStatus: boolean;
2828
private integrationName: string;

0 commit comments

Comments
 (0)