@adatechnology/meta-whatsapp-module 0.6.0 → 0.7.0

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.
Files changed (20) hide show
  1. package/dist/index.d.cts +291 -529
  2. package/dist/index.d.ts +291 -529
  3. package/dist/migrations/20260725195853_freezing_switch/snapshot.json +555 -0
  4. package/dist/migrations/20260725210958_military_leper_queen/snapshot.json +742 -0
  5. package/dist/migrations/20260725214800_illegal_black_tarantula/snapshot.json +810 -0
  6. package/dist/migrations/20260725234507_normal_viper/snapshot.json +930 -0
  7. package/dist/migrations/20260731041538_flow_media_meta_ids/snapshot.json +1649 -0
  8. package/package.json +6 -6
  9. package/dist/migrations/meta/_journal.json +0 -76
  10. /package/dist/migrations/{0000_freezing_switch.sql → 20260725195853_freezing_switch/migration.sql} +0 -0
  11. /package/dist/migrations/{0001_military_leper_queen.sql → 20260725210958_military_leper_queen/migration.sql} +0 -0
  12. /package/dist/migrations/{0002_illegal_black_tarantula.sql → 20260725214800_illegal_black_tarantula/migration.sql} +0 -0
  13. /package/dist/migrations/{0003_normal_viper.sql → 20260725234507_normal_viper/migration.sql} +0 -0
  14. /package/dist/migrations/{0004_widen_message_type.sql → 20260725234508_widen_message_type/migration.sql} +0 -0
  15. /package/dist/migrations/{0005_message_moderation.sql → 20260727182141_message_moderation/migration.sql} +0 -0
  16. /package/dist/migrations/{0006_conversation_documents.sql → 20260727215549_conversation_documents/migration.sql} +0 -0
  17. /package/dist/migrations/{0007_flow_media.sql → 20260728220000_flow_media/migration.sql} +0 -0
  18. /package/dist/migrations/{0008_message_transcription.sql → 20260731041536_message_transcription/migration.sql} +0 -0
  19. /package/dist/migrations/{0009_settings_transcription_policy.sql → 20260731041537_settings_transcription_policy/migration.sql} +0 -0
  20. /package/dist/migrations/{0010_flow_media_meta_ids.sql → 20260731041538_flow_media_meta_ids/migration.sql} +0 -0
@@ -0,0 +1,1649 @@
1
+ {
2
+ "version": "8",
3
+ "dialect": "postgres",
4
+ "id": "f9a77133-7cf9-4f45-9598-7676621f4b25",
5
+ "prevIds": [
6
+ "c69cbed0-199b-409a-a8ec-3d06678cc2c2"
7
+ ],
8
+ "ddl": [
9
+ {
10
+ "name": "meta_whatsapp",
11
+ "entityType": "schemas"
12
+ },
13
+ {
14
+ "isRlsEnabled": false,
15
+ "name": "documents",
16
+ "entityType": "tables",
17
+ "schema": "meta_whatsapp"
18
+ },
19
+ {
20
+ "isRlsEnabled": false,
21
+ "name": "flow_graphs",
22
+ "entityType": "tables",
23
+ "schema": "meta_whatsapp"
24
+ },
25
+ {
26
+ "isRlsEnabled": false,
27
+ "name": "flow_media",
28
+ "entityType": "tables",
29
+ "schema": "meta_whatsapp"
30
+ },
31
+ {
32
+ "isRlsEnabled": false,
33
+ "name": "messages",
34
+ "entityType": "tables",
35
+ "schema": "meta_whatsapp"
36
+ },
37
+ {
38
+ "isRlsEnabled": false,
39
+ "name": "sessions",
40
+ "entityType": "tables",
41
+ "schema": "meta_whatsapp"
42
+ },
43
+ {
44
+ "isRlsEnabled": false,
45
+ "name": "settings",
46
+ "entityType": "tables",
47
+ "schema": "meta_whatsapp"
48
+ },
49
+ {
50
+ "type": "uuid",
51
+ "typeSchema": null,
52
+ "notNull": true,
53
+ "dimensions": 0,
54
+ "default": "gen_random_uuid()",
55
+ "generated": null,
56
+ "identity": null,
57
+ "name": "id",
58
+ "entityType": "columns",
59
+ "schema": "meta_whatsapp",
60
+ "table": "documents"
61
+ },
62
+ {
63
+ "type": "uuid",
64
+ "typeSchema": null,
65
+ "notNull": true,
66
+ "dimensions": 0,
67
+ "default": null,
68
+ "generated": null,
69
+ "identity": null,
70
+ "name": "company_id",
71
+ "entityType": "columns",
72
+ "schema": "meta_whatsapp",
73
+ "table": "documents"
74
+ },
75
+ {
76
+ "type": "uuid",
77
+ "typeSchema": null,
78
+ "notNull": true,
79
+ "dimensions": 0,
80
+ "default": null,
81
+ "generated": null,
82
+ "identity": null,
83
+ "name": "session_id",
84
+ "entityType": "columns",
85
+ "schema": "meta_whatsapp",
86
+ "table": "documents"
87
+ },
88
+ {
89
+ "type": "uuid",
90
+ "typeSchema": null,
91
+ "notNull": false,
92
+ "dimensions": 0,
93
+ "default": null,
94
+ "generated": null,
95
+ "identity": null,
96
+ "name": "message_id",
97
+ "entityType": "columns",
98
+ "schema": "meta_whatsapp",
99
+ "table": "documents"
100
+ },
101
+ {
102
+ "type": "varchar(256)",
103
+ "typeSchema": null,
104
+ "notNull": true,
105
+ "dimensions": 0,
106
+ "default": null,
107
+ "generated": null,
108
+ "identity": null,
109
+ "name": "upload_id",
110
+ "entityType": "columns",
111
+ "schema": "meta_whatsapp",
112
+ "table": "documents"
113
+ },
114
+ {
115
+ "type": "varchar(512)",
116
+ "typeSchema": null,
117
+ "notNull": true,
118
+ "dimensions": 0,
119
+ "default": null,
120
+ "generated": null,
121
+ "identity": null,
122
+ "name": "filename",
123
+ "entityType": "columns",
124
+ "schema": "meta_whatsapp",
125
+ "table": "documents"
126
+ },
127
+ {
128
+ "type": "varchar(128)",
129
+ "typeSchema": null,
130
+ "notNull": true,
131
+ "dimensions": 0,
132
+ "default": null,
133
+ "generated": null,
134
+ "identity": null,
135
+ "name": "mime_type",
136
+ "entityType": "columns",
137
+ "schema": "meta_whatsapp",
138
+ "table": "documents"
139
+ },
140
+ {
141
+ "type": "integer",
142
+ "typeSchema": null,
143
+ "notNull": true,
144
+ "dimensions": 0,
145
+ "default": null,
146
+ "generated": null,
147
+ "identity": null,
148
+ "name": "size_bytes",
149
+ "entityType": "columns",
150
+ "schema": "meta_whatsapp",
151
+ "table": "documents"
152
+ },
153
+ {
154
+ "type": "varchar(64)",
155
+ "typeSchema": null,
156
+ "notNull": false,
157
+ "dimensions": 0,
158
+ "default": null,
159
+ "generated": null,
160
+ "identity": null,
161
+ "name": "sha256",
162
+ "entityType": "columns",
163
+ "schema": "meta_whatsapp",
164
+ "table": "documents"
165
+ },
166
+ {
167
+ "type": "varchar(12)",
168
+ "typeSchema": null,
169
+ "notNull": true,
170
+ "dimensions": 0,
171
+ "default": null,
172
+ "generated": null,
173
+ "identity": null,
174
+ "name": "source",
175
+ "entityType": "columns",
176
+ "schema": "meta_whatsapp",
177
+ "table": "documents"
178
+ },
179
+ {
180
+ "type": "timestamp with time zone",
181
+ "typeSchema": null,
182
+ "notNull": true,
183
+ "dimensions": 0,
184
+ "default": "now()",
185
+ "generated": null,
186
+ "identity": null,
187
+ "name": "linked_at",
188
+ "entityType": "columns",
189
+ "schema": "meta_whatsapp",
190
+ "table": "documents"
191
+ },
192
+ {
193
+ "type": "uuid",
194
+ "typeSchema": null,
195
+ "notNull": true,
196
+ "dimensions": 0,
197
+ "default": "gen_random_uuid()",
198
+ "generated": null,
199
+ "identity": null,
200
+ "name": "id",
201
+ "entityType": "columns",
202
+ "schema": "meta_whatsapp",
203
+ "table": "flow_graphs"
204
+ },
205
+ {
206
+ "type": "uuid",
207
+ "typeSchema": null,
208
+ "notNull": true,
209
+ "dimensions": 0,
210
+ "default": null,
211
+ "generated": null,
212
+ "identity": null,
213
+ "name": "company_id",
214
+ "entityType": "columns",
215
+ "schema": "meta_whatsapp",
216
+ "table": "flow_graphs"
217
+ },
218
+ {
219
+ "type": "varchar(64)",
220
+ "typeSchema": null,
221
+ "notNull": true,
222
+ "dimensions": 0,
223
+ "default": null,
224
+ "generated": null,
225
+ "identity": null,
226
+ "name": "key",
227
+ "entityType": "columns",
228
+ "schema": "meta_whatsapp",
229
+ "table": "flow_graphs"
230
+ },
231
+ {
232
+ "type": "varchar(120)",
233
+ "typeSchema": null,
234
+ "notNull": true,
235
+ "dimensions": 0,
236
+ "default": null,
237
+ "generated": null,
238
+ "identity": null,
239
+ "name": "label",
240
+ "entityType": "columns",
241
+ "schema": "meta_whatsapp",
242
+ "table": "flow_graphs"
243
+ },
244
+ {
245
+ "type": "varchar(64)",
246
+ "typeSchema": null,
247
+ "notNull": true,
248
+ "dimensions": 0,
249
+ "default": null,
250
+ "generated": null,
251
+ "identity": null,
252
+ "name": "start_node_id",
253
+ "entityType": "columns",
254
+ "schema": "meta_whatsapp",
255
+ "table": "flow_graphs"
256
+ },
257
+ {
258
+ "type": "jsonb",
259
+ "typeSchema": null,
260
+ "notNull": true,
261
+ "dimensions": 0,
262
+ "default": "'{}'",
263
+ "generated": null,
264
+ "identity": null,
265
+ "name": "nodes",
266
+ "entityType": "columns",
267
+ "schema": "meta_whatsapp",
268
+ "table": "flow_graphs"
269
+ },
270
+ {
271
+ "type": "integer",
272
+ "typeSchema": null,
273
+ "notNull": true,
274
+ "dimensions": 0,
275
+ "default": "1",
276
+ "generated": null,
277
+ "identity": null,
278
+ "name": "version",
279
+ "entityType": "columns",
280
+ "schema": "meta_whatsapp",
281
+ "table": "flow_graphs"
282
+ },
283
+ {
284
+ "type": "boolean",
285
+ "typeSchema": null,
286
+ "notNull": true,
287
+ "dimensions": 0,
288
+ "default": "false",
289
+ "generated": null,
290
+ "identity": null,
291
+ "name": "show_in_menu",
292
+ "entityType": "columns",
293
+ "schema": "meta_whatsapp",
294
+ "table": "flow_graphs"
295
+ },
296
+ {
297
+ "type": "varchar(64)",
298
+ "typeSchema": null,
299
+ "notNull": false,
300
+ "dimensions": 0,
301
+ "default": null,
302
+ "generated": null,
303
+ "identity": null,
304
+ "name": "menu_option_label",
305
+ "entityType": "columns",
306
+ "schema": "meta_whatsapp",
307
+ "table": "flow_graphs"
308
+ },
309
+ {
310
+ "type": "timestamp with time zone",
311
+ "typeSchema": null,
312
+ "notNull": true,
313
+ "dimensions": 0,
314
+ "default": "now()",
315
+ "generated": null,
316
+ "identity": null,
317
+ "name": "created_at",
318
+ "entityType": "columns",
319
+ "schema": "meta_whatsapp",
320
+ "table": "flow_graphs"
321
+ },
322
+ {
323
+ "type": "timestamp with time zone",
324
+ "typeSchema": null,
325
+ "notNull": true,
326
+ "dimensions": 0,
327
+ "default": "now()",
328
+ "generated": null,
329
+ "identity": null,
330
+ "name": "updated_at",
331
+ "entityType": "columns",
332
+ "schema": "meta_whatsapp",
333
+ "table": "flow_graphs"
334
+ },
335
+ {
336
+ "type": "uuid",
337
+ "typeSchema": null,
338
+ "notNull": true,
339
+ "dimensions": 0,
340
+ "default": "gen_random_uuid()",
341
+ "generated": null,
342
+ "identity": null,
343
+ "name": "id",
344
+ "entityType": "columns",
345
+ "schema": "meta_whatsapp",
346
+ "table": "flow_media"
347
+ },
348
+ {
349
+ "type": "uuid",
350
+ "typeSchema": null,
351
+ "notNull": true,
352
+ "dimensions": 0,
353
+ "default": null,
354
+ "generated": null,
355
+ "identity": null,
356
+ "name": "company_id",
357
+ "entityType": "columns",
358
+ "schema": "meta_whatsapp",
359
+ "table": "flow_media"
360
+ },
361
+ {
362
+ "type": "varchar(64)",
363
+ "typeSchema": null,
364
+ "notNull": true,
365
+ "dimensions": 0,
366
+ "default": null,
367
+ "generated": null,
368
+ "identity": null,
369
+ "name": "flow_key",
370
+ "entityType": "columns",
371
+ "schema": "meta_whatsapp",
372
+ "table": "flow_media"
373
+ },
374
+ {
375
+ "type": "varchar(64)",
376
+ "typeSchema": null,
377
+ "notNull": true,
378
+ "dimensions": 0,
379
+ "default": null,
380
+ "generated": null,
381
+ "identity": null,
382
+ "name": "node_id",
383
+ "entityType": "columns",
384
+ "schema": "meta_whatsapp",
385
+ "table": "flow_media"
386
+ },
387
+ {
388
+ "type": "varchar(256)",
389
+ "typeSchema": null,
390
+ "notNull": true,
391
+ "dimensions": 0,
392
+ "default": null,
393
+ "generated": null,
394
+ "identity": null,
395
+ "name": "upload_id",
396
+ "entityType": "columns",
397
+ "schema": "meta_whatsapp",
398
+ "table": "flow_media"
399
+ },
400
+ {
401
+ "type": "varchar(512)",
402
+ "typeSchema": null,
403
+ "notNull": true,
404
+ "dimensions": 0,
405
+ "default": null,
406
+ "generated": null,
407
+ "identity": null,
408
+ "name": "filename",
409
+ "entityType": "columns",
410
+ "schema": "meta_whatsapp",
411
+ "table": "flow_media"
412
+ },
413
+ {
414
+ "type": "varchar(128)",
415
+ "typeSchema": null,
416
+ "notNull": true,
417
+ "dimensions": 0,
418
+ "default": null,
419
+ "generated": null,
420
+ "identity": null,
421
+ "name": "mime_type",
422
+ "entityType": "columns",
423
+ "schema": "meta_whatsapp",
424
+ "table": "flow_media"
425
+ },
426
+ {
427
+ "type": "integer",
428
+ "typeSchema": null,
429
+ "notNull": true,
430
+ "dimensions": 0,
431
+ "default": null,
432
+ "generated": null,
433
+ "identity": null,
434
+ "name": "size_bytes",
435
+ "entityType": "columns",
436
+ "schema": "meta_whatsapp",
437
+ "table": "flow_media"
438
+ },
439
+ {
440
+ "type": "text",
441
+ "typeSchema": null,
442
+ "notNull": false,
443
+ "dimensions": 0,
444
+ "default": null,
445
+ "generated": null,
446
+ "identity": null,
447
+ "name": "caption",
448
+ "entityType": "columns",
449
+ "schema": "meta_whatsapp",
450
+ "table": "flow_media"
451
+ },
452
+ {
453
+ "type": "integer",
454
+ "typeSchema": null,
455
+ "notNull": true,
456
+ "dimensions": 0,
457
+ "default": "0",
458
+ "generated": null,
459
+ "identity": null,
460
+ "name": "sort_order",
461
+ "entityType": "columns",
462
+ "schema": "meta_whatsapp",
463
+ "table": "flow_media"
464
+ },
465
+ {
466
+ "type": "boolean",
467
+ "typeSchema": null,
468
+ "notNull": true,
469
+ "dimensions": 0,
470
+ "default": "true",
471
+ "generated": null,
472
+ "identity": null,
473
+ "name": "active",
474
+ "entityType": "columns",
475
+ "schema": "meta_whatsapp",
476
+ "table": "flow_media"
477
+ },
478
+ {
479
+ "type": "jsonb",
480
+ "typeSchema": null,
481
+ "notNull": true,
482
+ "dimensions": 0,
483
+ "default": "'{}'",
484
+ "generated": null,
485
+ "identity": null,
486
+ "name": "meta_media_ids",
487
+ "entityType": "columns",
488
+ "schema": "meta_whatsapp",
489
+ "table": "flow_media"
490
+ },
491
+ {
492
+ "type": "timestamp with time zone",
493
+ "typeSchema": null,
494
+ "notNull": true,
495
+ "dimensions": 0,
496
+ "default": "now()",
497
+ "generated": null,
498
+ "identity": null,
499
+ "name": "created_at",
500
+ "entityType": "columns",
501
+ "schema": "meta_whatsapp",
502
+ "table": "flow_media"
503
+ },
504
+ {
505
+ "type": "timestamp with time zone",
506
+ "typeSchema": null,
507
+ "notNull": true,
508
+ "dimensions": 0,
509
+ "default": "now()",
510
+ "generated": null,
511
+ "identity": null,
512
+ "name": "updated_at",
513
+ "entityType": "columns",
514
+ "schema": "meta_whatsapp",
515
+ "table": "flow_media"
516
+ },
517
+ {
518
+ "type": "uuid",
519
+ "typeSchema": null,
520
+ "notNull": true,
521
+ "dimensions": 0,
522
+ "default": "gen_random_uuid()",
523
+ "generated": null,
524
+ "identity": null,
525
+ "name": "id",
526
+ "entityType": "columns",
527
+ "schema": "meta_whatsapp",
528
+ "table": "messages"
529
+ },
530
+ {
531
+ "type": "uuid",
532
+ "typeSchema": null,
533
+ "notNull": true,
534
+ "dimensions": 0,
535
+ "default": null,
536
+ "generated": null,
537
+ "identity": null,
538
+ "name": "company_id",
539
+ "entityType": "columns",
540
+ "schema": "meta_whatsapp",
541
+ "table": "messages"
542
+ },
543
+ {
544
+ "type": "uuid",
545
+ "typeSchema": null,
546
+ "notNull": true,
547
+ "dimensions": 0,
548
+ "default": null,
549
+ "generated": null,
550
+ "identity": null,
551
+ "name": "session_id",
552
+ "entityType": "columns",
553
+ "schema": "meta_whatsapp",
554
+ "table": "messages"
555
+ },
556
+ {
557
+ "type": "varchar(20)",
558
+ "typeSchema": null,
559
+ "notNull": true,
560
+ "dimensions": 0,
561
+ "default": null,
562
+ "generated": null,
563
+ "identity": null,
564
+ "name": "whatsapp_number",
565
+ "entityType": "columns",
566
+ "schema": "meta_whatsapp",
567
+ "table": "messages"
568
+ },
569
+ {
570
+ "type": "varchar(12)",
571
+ "typeSchema": null,
572
+ "notNull": true,
573
+ "dimensions": 0,
574
+ "default": null,
575
+ "generated": null,
576
+ "identity": null,
577
+ "name": "direction",
578
+ "entityType": "columns",
579
+ "schema": "meta_whatsapp",
580
+ "table": "messages"
581
+ },
582
+ {
583
+ "type": "varchar(12)",
584
+ "typeSchema": null,
585
+ "notNull": true,
586
+ "dimensions": 0,
587
+ "default": null,
588
+ "generated": null,
589
+ "identity": null,
590
+ "name": "sender",
591
+ "entityType": "columns",
592
+ "schema": "meta_whatsapp",
593
+ "table": "messages"
594
+ },
595
+ {
596
+ "type": "uuid",
597
+ "typeSchema": null,
598
+ "notNull": false,
599
+ "dimensions": 0,
600
+ "default": null,
601
+ "generated": null,
602
+ "identity": null,
603
+ "name": "agent_user_id",
604
+ "entityType": "columns",
605
+ "schema": "meta_whatsapp",
606
+ "table": "messages"
607
+ },
608
+ {
609
+ "type": "varchar(32)",
610
+ "typeSchema": null,
611
+ "notNull": true,
612
+ "dimensions": 0,
613
+ "default": "'text'",
614
+ "generated": null,
615
+ "identity": null,
616
+ "name": "type",
617
+ "entityType": "columns",
618
+ "schema": "meta_whatsapp",
619
+ "table": "messages"
620
+ },
621
+ {
622
+ "type": "text",
623
+ "typeSchema": null,
624
+ "notNull": false,
625
+ "dimensions": 0,
626
+ "default": null,
627
+ "generated": null,
628
+ "identity": null,
629
+ "name": "content",
630
+ "entityType": "columns",
631
+ "schema": "meta_whatsapp",
632
+ "table": "messages"
633
+ },
634
+ {
635
+ "type": "jsonb",
636
+ "typeSchema": null,
637
+ "notNull": false,
638
+ "dimensions": 0,
639
+ "default": null,
640
+ "generated": null,
641
+ "identity": null,
642
+ "name": "payload",
643
+ "entityType": "columns",
644
+ "schema": "meta_whatsapp",
645
+ "table": "messages"
646
+ },
647
+ {
648
+ "type": "varchar(128)",
649
+ "typeSchema": null,
650
+ "notNull": false,
651
+ "dimensions": 0,
652
+ "default": null,
653
+ "generated": null,
654
+ "identity": null,
655
+ "name": "wa_message_id",
656
+ "entityType": "columns",
657
+ "schema": "meta_whatsapp",
658
+ "table": "messages"
659
+ },
660
+ {
661
+ "type": "varchar(16)",
662
+ "typeSchema": null,
663
+ "notNull": false,
664
+ "dimensions": 0,
665
+ "default": null,
666
+ "generated": null,
667
+ "identity": null,
668
+ "name": "status",
669
+ "entityType": "columns",
670
+ "schema": "meta_whatsapp",
671
+ "table": "messages"
672
+ },
673
+ {
674
+ "type": "timestamp with time zone",
675
+ "typeSchema": null,
676
+ "notNull": false,
677
+ "dimensions": 0,
678
+ "default": null,
679
+ "generated": null,
680
+ "identity": null,
681
+ "name": "read_at",
682
+ "entityType": "columns",
683
+ "schema": "meta_whatsapp",
684
+ "table": "messages"
685
+ },
686
+ {
687
+ "type": "boolean",
688
+ "typeSchema": null,
689
+ "notNull": false,
690
+ "dimensions": 0,
691
+ "default": null,
692
+ "generated": null,
693
+ "identity": null,
694
+ "name": "moderation_flagged",
695
+ "entityType": "columns",
696
+ "schema": "meta_whatsapp",
697
+ "table": "messages"
698
+ },
699
+ {
700
+ "type": "jsonb",
701
+ "typeSchema": null,
702
+ "notNull": false,
703
+ "dimensions": 0,
704
+ "default": null,
705
+ "generated": null,
706
+ "identity": null,
707
+ "name": "moderation_terms",
708
+ "entityType": "columns",
709
+ "schema": "meta_whatsapp",
710
+ "table": "messages"
711
+ },
712
+ {
713
+ "type": "varchar(16)",
714
+ "typeSchema": null,
715
+ "notNull": false,
716
+ "dimensions": 0,
717
+ "default": null,
718
+ "generated": null,
719
+ "identity": null,
720
+ "name": "transcription_status",
721
+ "entityType": "columns",
722
+ "schema": "meta_whatsapp",
723
+ "table": "messages"
724
+ },
725
+ {
726
+ "type": "text",
727
+ "typeSchema": null,
728
+ "notNull": false,
729
+ "dimensions": 0,
730
+ "default": null,
731
+ "generated": null,
732
+ "identity": null,
733
+ "name": "transcription_text",
734
+ "entityType": "columns",
735
+ "schema": "meta_whatsapp",
736
+ "table": "messages"
737
+ },
738
+ {
739
+ "type": "varchar(32)",
740
+ "typeSchema": null,
741
+ "notNull": false,
742
+ "dimensions": 0,
743
+ "default": null,
744
+ "generated": null,
745
+ "identity": null,
746
+ "name": "transcription_language",
747
+ "entityType": "columns",
748
+ "schema": "meta_whatsapp",
749
+ "table": "messages"
750
+ },
751
+ {
752
+ "type": "varchar(32)",
753
+ "typeSchema": null,
754
+ "notNull": false,
755
+ "dimensions": 0,
756
+ "default": null,
757
+ "generated": null,
758
+ "identity": null,
759
+ "name": "transcription_engine",
760
+ "entityType": "columns",
761
+ "schema": "meta_whatsapp",
762
+ "table": "messages"
763
+ },
764
+ {
765
+ "type": "timestamp with time zone",
766
+ "typeSchema": null,
767
+ "notNull": true,
768
+ "dimensions": 0,
769
+ "default": "now()",
770
+ "generated": null,
771
+ "identity": null,
772
+ "name": "created_at",
773
+ "entityType": "columns",
774
+ "schema": "meta_whatsapp",
775
+ "table": "messages"
776
+ },
777
+ {
778
+ "type": "uuid",
779
+ "typeSchema": null,
780
+ "notNull": true,
781
+ "dimensions": 0,
782
+ "default": "gen_random_uuid()",
783
+ "generated": null,
784
+ "identity": null,
785
+ "name": "id",
786
+ "entityType": "columns",
787
+ "schema": "meta_whatsapp",
788
+ "table": "sessions"
789
+ },
790
+ {
791
+ "type": "uuid",
792
+ "typeSchema": null,
793
+ "notNull": true,
794
+ "dimensions": 0,
795
+ "default": null,
796
+ "generated": null,
797
+ "identity": null,
798
+ "name": "company_id",
799
+ "entityType": "columns",
800
+ "schema": "meta_whatsapp",
801
+ "table": "sessions"
802
+ },
803
+ {
804
+ "type": "varchar(20)",
805
+ "typeSchema": null,
806
+ "notNull": true,
807
+ "dimensions": 0,
808
+ "default": null,
809
+ "generated": null,
810
+ "identity": null,
811
+ "name": "whatsapp_number",
812
+ "entityType": "columns",
813
+ "schema": "meta_whatsapp",
814
+ "table": "sessions"
815
+ },
816
+ {
817
+ "type": "varchar(64)",
818
+ "typeSchema": null,
819
+ "notNull": true,
820
+ "dimensions": 0,
821
+ "default": "'start'",
822
+ "generated": null,
823
+ "identity": null,
824
+ "name": "current_state",
825
+ "entityType": "columns",
826
+ "schema": "meta_whatsapp",
827
+ "table": "sessions"
828
+ },
829
+ {
830
+ "type": "varchar(64)",
831
+ "typeSchema": null,
832
+ "notNull": false,
833
+ "dimensions": 0,
834
+ "default": null,
835
+ "generated": null,
836
+ "identity": null,
837
+ "name": "flow_key",
838
+ "entityType": "columns",
839
+ "schema": "meta_whatsapp",
840
+ "table": "sessions"
841
+ },
842
+ {
843
+ "type": "varchar(64)",
844
+ "typeSchema": null,
845
+ "notNull": false,
846
+ "dimensions": 0,
847
+ "default": null,
848
+ "generated": null,
849
+ "identity": null,
850
+ "name": "current_node_id",
851
+ "entityType": "columns",
852
+ "schema": "meta_whatsapp",
853
+ "table": "sessions"
854
+ },
855
+ {
856
+ "type": "jsonb",
857
+ "typeSchema": null,
858
+ "notNull": true,
859
+ "dimensions": 0,
860
+ "default": "'{}'",
861
+ "generated": null,
862
+ "identity": null,
863
+ "name": "context",
864
+ "entityType": "columns",
865
+ "schema": "meta_whatsapp",
866
+ "table": "sessions"
867
+ },
868
+ {
869
+ "type": "varchar(12)",
870
+ "typeSchema": null,
871
+ "notNull": true,
872
+ "dimensions": 0,
873
+ "default": "'bot'",
874
+ "generated": null,
875
+ "identity": null,
876
+ "name": "mode",
877
+ "entityType": "columns",
878
+ "schema": "meta_whatsapp",
879
+ "table": "sessions"
880
+ },
881
+ {
882
+ "type": "uuid",
883
+ "typeSchema": null,
884
+ "notNull": false,
885
+ "dimensions": 0,
886
+ "default": null,
887
+ "generated": null,
888
+ "identity": null,
889
+ "name": "assigned_user_id",
890
+ "entityType": "columns",
891
+ "schema": "meta_whatsapp",
892
+ "table": "sessions"
893
+ },
894
+ {
895
+ "type": "timestamp with time zone",
896
+ "typeSchema": null,
897
+ "notNull": false,
898
+ "dimensions": 0,
899
+ "default": null,
900
+ "generated": null,
901
+ "identity": null,
902
+ "name": "human_requested_at",
903
+ "entityType": "columns",
904
+ "schema": "meta_whatsapp",
905
+ "table": "sessions"
906
+ },
907
+ {
908
+ "type": "timestamp with time zone",
909
+ "typeSchema": null,
910
+ "notNull": false,
911
+ "dimensions": 0,
912
+ "default": null,
913
+ "generated": null,
914
+ "identity": null,
915
+ "name": "last_inbound_at",
916
+ "entityType": "columns",
917
+ "schema": "meta_whatsapp",
918
+ "table": "sessions"
919
+ },
920
+ {
921
+ "type": "timestamp with time zone",
922
+ "typeSchema": null,
923
+ "notNull": false,
924
+ "dimensions": 0,
925
+ "default": null,
926
+ "generated": null,
927
+ "identity": null,
928
+ "name": "last_agent_read_at",
929
+ "entityType": "columns",
930
+ "schema": "meta_whatsapp",
931
+ "table": "sessions"
932
+ },
933
+ {
934
+ "type": "timestamp with time zone",
935
+ "typeSchema": null,
936
+ "notNull": true,
937
+ "dimensions": 0,
938
+ "default": "now()",
939
+ "generated": null,
940
+ "identity": null,
941
+ "name": "last_activity",
942
+ "entityType": "columns",
943
+ "schema": "meta_whatsapp",
944
+ "table": "sessions"
945
+ },
946
+ {
947
+ "type": "timestamp with time zone",
948
+ "typeSchema": null,
949
+ "notNull": true,
950
+ "dimensions": 0,
951
+ "default": "now()",
952
+ "generated": null,
953
+ "identity": null,
954
+ "name": "created_at",
955
+ "entityType": "columns",
956
+ "schema": "meta_whatsapp",
957
+ "table": "sessions"
958
+ },
959
+ {
960
+ "type": "timestamp with time zone",
961
+ "typeSchema": null,
962
+ "notNull": true,
963
+ "dimensions": 0,
964
+ "default": "now()",
965
+ "generated": null,
966
+ "identity": null,
967
+ "name": "updated_at",
968
+ "entityType": "columns",
969
+ "schema": "meta_whatsapp",
970
+ "table": "sessions"
971
+ },
972
+ {
973
+ "type": "uuid",
974
+ "typeSchema": null,
975
+ "notNull": true,
976
+ "dimensions": 0,
977
+ "default": null,
978
+ "generated": null,
979
+ "identity": null,
980
+ "name": "company_id",
981
+ "entityType": "columns",
982
+ "schema": "meta_whatsapp",
983
+ "table": "settings"
984
+ },
985
+ {
986
+ "type": "varchar(128)",
987
+ "typeSchema": null,
988
+ "notNull": false,
989
+ "dimensions": 0,
990
+ "default": null,
991
+ "generated": null,
992
+ "identity": null,
993
+ "name": "template_name",
994
+ "entityType": "columns",
995
+ "schema": "meta_whatsapp",
996
+ "table": "settings"
997
+ },
998
+ {
999
+ "type": "varchar(16)",
1000
+ "typeSchema": null,
1001
+ "notNull": true,
1002
+ "dimensions": 0,
1003
+ "default": "'pt_BR'",
1004
+ "generated": null,
1005
+ "identity": null,
1006
+ "name": "template_language",
1007
+ "entityType": "columns",
1008
+ "schema": "meta_whatsapp",
1009
+ "table": "settings"
1010
+ },
1011
+ {
1012
+ "type": "jsonb",
1013
+ "typeSchema": null,
1014
+ "notNull": true,
1015
+ "dimensions": 0,
1016
+ "default": "'[]'",
1017
+ "generated": null,
1018
+ "identity": null,
1019
+ "name": "template_variables",
1020
+ "entityType": "columns",
1021
+ "schema": "meta_whatsapp",
1022
+ "table": "settings"
1023
+ },
1024
+ {
1025
+ "type": "text",
1026
+ "typeSchema": null,
1027
+ "notNull": false,
1028
+ "dimensions": 0,
1029
+ "default": null,
1030
+ "generated": null,
1031
+ "identity": null,
1032
+ "name": "welcome_message",
1033
+ "entityType": "columns",
1034
+ "schema": "meta_whatsapp",
1035
+ "table": "settings"
1036
+ },
1037
+ {
1038
+ "type": "text",
1039
+ "typeSchema": null,
1040
+ "notNull": false,
1041
+ "dimensions": 0,
1042
+ "default": null,
1043
+ "generated": null,
1044
+ "identity": null,
1045
+ "name": "farewell_message",
1046
+ "entityType": "columns",
1047
+ "schema": "meta_whatsapp",
1048
+ "table": "settings"
1049
+ },
1050
+ {
1051
+ "type": "boolean",
1052
+ "typeSchema": null,
1053
+ "notNull": false,
1054
+ "dimensions": 0,
1055
+ "default": null,
1056
+ "generated": null,
1057
+ "identity": null,
1058
+ "name": "transcription_enabled",
1059
+ "entityType": "columns",
1060
+ "schema": "meta_whatsapp",
1061
+ "table": "settings"
1062
+ },
1063
+ {
1064
+ "type": "varchar(16)",
1065
+ "typeSchema": null,
1066
+ "notNull": false,
1067
+ "dimensions": 0,
1068
+ "default": null,
1069
+ "generated": null,
1070
+ "identity": null,
1071
+ "name": "transcription_mode",
1072
+ "entityType": "columns",
1073
+ "schema": "meta_whatsapp",
1074
+ "table": "settings"
1075
+ },
1076
+ {
1077
+ "type": "timestamp with time zone",
1078
+ "typeSchema": null,
1079
+ "notNull": true,
1080
+ "dimensions": 0,
1081
+ "default": "now()",
1082
+ "generated": null,
1083
+ "identity": null,
1084
+ "name": "created_at",
1085
+ "entityType": "columns",
1086
+ "schema": "meta_whatsapp",
1087
+ "table": "settings"
1088
+ },
1089
+ {
1090
+ "type": "timestamp with time zone",
1091
+ "typeSchema": null,
1092
+ "notNull": true,
1093
+ "dimensions": 0,
1094
+ "default": "now()",
1095
+ "generated": null,
1096
+ "identity": null,
1097
+ "name": "updated_at",
1098
+ "entityType": "columns",
1099
+ "schema": "meta_whatsapp",
1100
+ "table": "settings"
1101
+ },
1102
+ {
1103
+ "nameExplicit": true,
1104
+ "columns": [
1105
+ {
1106
+ "value": "session_id",
1107
+ "isExpression": false,
1108
+ "asc": true,
1109
+ "nullsFirst": false,
1110
+ "opclass": null
1111
+ },
1112
+ {
1113
+ "value": "linked_at",
1114
+ "isExpression": false,
1115
+ "asc": true,
1116
+ "nullsFirst": false,
1117
+ "opclass": null
1118
+ }
1119
+ ],
1120
+ "isUnique": false,
1121
+ "where": null,
1122
+ "with": "",
1123
+ "method": "btree",
1124
+ "concurrently": false,
1125
+ "name": "idx_documents_session_linked",
1126
+ "entityType": "indexes",
1127
+ "schema": "meta_whatsapp",
1128
+ "table": "documents"
1129
+ },
1130
+ {
1131
+ "nameExplicit": true,
1132
+ "columns": [
1133
+ {
1134
+ "value": "company_id",
1135
+ "isExpression": false,
1136
+ "asc": true,
1137
+ "nullsFirst": false,
1138
+ "opclass": null
1139
+ },
1140
+ {
1141
+ "value": "linked_at",
1142
+ "isExpression": false,
1143
+ "asc": true,
1144
+ "nullsFirst": false,
1145
+ "opclass": null
1146
+ }
1147
+ ],
1148
+ "isUnique": false,
1149
+ "where": null,
1150
+ "with": "",
1151
+ "method": "btree",
1152
+ "concurrently": false,
1153
+ "name": "idx_documents_company_linked",
1154
+ "entityType": "indexes",
1155
+ "schema": "meta_whatsapp",
1156
+ "table": "documents"
1157
+ },
1158
+ {
1159
+ "nameExplicit": true,
1160
+ "columns": [
1161
+ {
1162
+ "value": "company_id",
1163
+ "isExpression": false,
1164
+ "asc": true,
1165
+ "nullsFirst": false,
1166
+ "opclass": null
1167
+ },
1168
+ {
1169
+ "value": "upload_id",
1170
+ "isExpression": false,
1171
+ "asc": true,
1172
+ "nullsFirst": false,
1173
+ "opclass": null
1174
+ }
1175
+ ],
1176
+ "isUnique": true,
1177
+ "where": null,
1178
+ "with": "",
1179
+ "method": "btree",
1180
+ "concurrently": false,
1181
+ "name": "idx_documents_company_upload",
1182
+ "entityType": "indexes",
1183
+ "schema": "meta_whatsapp",
1184
+ "table": "documents"
1185
+ },
1186
+ {
1187
+ "nameExplicit": true,
1188
+ "columns": [
1189
+ {
1190
+ "value": "company_id",
1191
+ "isExpression": false,
1192
+ "asc": true,
1193
+ "nullsFirst": false,
1194
+ "opclass": null
1195
+ },
1196
+ {
1197
+ "value": "key",
1198
+ "isExpression": false,
1199
+ "asc": true,
1200
+ "nullsFirst": false,
1201
+ "opclass": null
1202
+ }
1203
+ ],
1204
+ "isUnique": true,
1205
+ "where": null,
1206
+ "with": "",
1207
+ "method": "btree",
1208
+ "concurrently": false,
1209
+ "name": "idx_flow_graphs_company_key",
1210
+ "entityType": "indexes",
1211
+ "schema": "meta_whatsapp",
1212
+ "table": "flow_graphs"
1213
+ },
1214
+ {
1215
+ "nameExplicit": true,
1216
+ "columns": [
1217
+ {
1218
+ "value": "company_id",
1219
+ "isExpression": false,
1220
+ "asc": true,
1221
+ "nullsFirst": false,
1222
+ "opclass": null
1223
+ },
1224
+ {
1225
+ "value": "flow_key",
1226
+ "isExpression": false,
1227
+ "asc": true,
1228
+ "nullsFirst": false,
1229
+ "opclass": null
1230
+ },
1231
+ {
1232
+ "value": "node_id",
1233
+ "isExpression": false,
1234
+ "asc": true,
1235
+ "nullsFirst": false,
1236
+ "opclass": null
1237
+ },
1238
+ {
1239
+ "value": "sort_order",
1240
+ "isExpression": false,
1241
+ "asc": true,
1242
+ "nullsFirst": false,
1243
+ "opclass": null
1244
+ }
1245
+ ],
1246
+ "isUnique": false,
1247
+ "where": null,
1248
+ "with": "",
1249
+ "method": "btree",
1250
+ "concurrently": false,
1251
+ "name": "idx_flow_media_node",
1252
+ "entityType": "indexes",
1253
+ "schema": "meta_whatsapp",
1254
+ "table": "flow_media"
1255
+ },
1256
+ {
1257
+ "nameExplicit": true,
1258
+ "columns": [
1259
+ {
1260
+ "value": "company_id",
1261
+ "isExpression": false,
1262
+ "asc": true,
1263
+ "nullsFirst": false,
1264
+ "opclass": null
1265
+ },
1266
+ {
1267
+ "value": "flow_key",
1268
+ "isExpression": false,
1269
+ "asc": true,
1270
+ "nullsFirst": false,
1271
+ "opclass": null
1272
+ },
1273
+ {
1274
+ "value": "node_id",
1275
+ "isExpression": false,
1276
+ "asc": true,
1277
+ "nullsFirst": false,
1278
+ "opclass": null
1279
+ },
1280
+ {
1281
+ "value": "upload_id",
1282
+ "isExpression": false,
1283
+ "asc": true,
1284
+ "nullsFirst": false,
1285
+ "opclass": null
1286
+ }
1287
+ ],
1288
+ "isUnique": true,
1289
+ "where": null,
1290
+ "with": "",
1291
+ "method": "btree",
1292
+ "concurrently": false,
1293
+ "name": "idx_flow_media_node_upload",
1294
+ "entityType": "indexes",
1295
+ "schema": "meta_whatsapp",
1296
+ "table": "flow_media"
1297
+ },
1298
+ {
1299
+ "nameExplicit": true,
1300
+ "columns": [
1301
+ {
1302
+ "value": "session_id",
1303
+ "isExpression": false,
1304
+ "asc": true,
1305
+ "nullsFirst": false,
1306
+ "opclass": null
1307
+ },
1308
+ {
1309
+ "value": "created_at",
1310
+ "isExpression": false,
1311
+ "asc": true,
1312
+ "nullsFirst": false,
1313
+ "opclass": null
1314
+ }
1315
+ ],
1316
+ "isUnique": false,
1317
+ "where": null,
1318
+ "with": "",
1319
+ "method": "btree",
1320
+ "concurrently": false,
1321
+ "name": "idx_messages_session_created",
1322
+ "entityType": "indexes",
1323
+ "schema": "meta_whatsapp",
1324
+ "table": "messages"
1325
+ },
1326
+ {
1327
+ "nameExplicit": true,
1328
+ "columns": [
1329
+ {
1330
+ "value": "company_id",
1331
+ "isExpression": false,
1332
+ "asc": true,
1333
+ "nullsFirst": false,
1334
+ "opclass": null
1335
+ },
1336
+ {
1337
+ "value": "whatsapp_number",
1338
+ "isExpression": false,
1339
+ "asc": true,
1340
+ "nullsFirst": false,
1341
+ "opclass": null
1342
+ },
1343
+ {
1344
+ "value": "created_at",
1345
+ "isExpression": false,
1346
+ "asc": true,
1347
+ "nullsFirst": false,
1348
+ "opclass": null
1349
+ }
1350
+ ],
1351
+ "isUnique": false,
1352
+ "where": null,
1353
+ "with": "",
1354
+ "method": "btree",
1355
+ "concurrently": false,
1356
+ "name": "idx_messages_company_number_created",
1357
+ "entityType": "indexes",
1358
+ "schema": "meta_whatsapp",
1359
+ "table": "messages"
1360
+ },
1361
+ {
1362
+ "nameExplicit": true,
1363
+ "columns": [
1364
+ {
1365
+ "value": "company_id",
1366
+ "isExpression": false,
1367
+ "asc": true,
1368
+ "nullsFirst": false,
1369
+ "opclass": null
1370
+ },
1371
+ {
1372
+ "value": "wa_message_id",
1373
+ "isExpression": false,
1374
+ "asc": true,
1375
+ "nullsFirst": false,
1376
+ "opclass": null
1377
+ }
1378
+ ],
1379
+ "isUnique": true,
1380
+ "where": "\"wa_message_id\" is not null",
1381
+ "with": "",
1382
+ "method": "btree",
1383
+ "concurrently": false,
1384
+ "name": "idx_messages_company_wa_message_id",
1385
+ "entityType": "indexes",
1386
+ "schema": "meta_whatsapp",
1387
+ "table": "messages"
1388
+ },
1389
+ {
1390
+ "nameExplicit": true,
1391
+ "columns": [
1392
+ {
1393
+ "value": "company_id",
1394
+ "isExpression": false,
1395
+ "asc": true,
1396
+ "nullsFirst": false,
1397
+ "opclass": null
1398
+ },
1399
+ {
1400
+ "value": "created_at",
1401
+ "isExpression": false,
1402
+ "asc": true,
1403
+ "nullsFirst": false,
1404
+ "opclass": null
1405
+ }
1406
+ ],
1407
+ "isUnique": false,
1408
+ "where": "\"moderation_flagged\"",
1409
+ "with": "",
1410
+ "method": "btree",
1411
+ "concurrently": false,
1412
+ "name": "idx_messages_moderation_flagged",
1413
+ "entityType": "indexes",
1414
+ "schema": "meta_whatsapp",
1415
+ "table": "messages"
1416
+ },
1417
+ {
1418
+ "nameExplicit": true,
1419
+ "columns": [
1420
+ {
1421
+ "value": "company_id",
1422
+ "isExpression": false,
1423
+ "asc": true,
1424
+ "nullsFirst": false,
1425
+ "opclass": null
1426
+ },
1427
+ {
1428
+ "value": "created_at",
1429
+ "isExpression": false,
1430
+ "asc": true,
1431
+ "nullsFirst": false,
1432
+ "opclass": null
1433
+ }
1434
+ ],
1435
+ "isUnique": false,
1436
+ "where": "\"transcription_status\" = 'pending'",
1437
+ "with": "",
1438
+ "method": "btree",
1439
+ "concurrently": false,
1440
+ "name": "idx_messages_transcription_pending",
1441
+ "entityType": "indexes",
1442
+ "schema": "meta_whatsapp",
1443
+ "table": "messages"
1444
+ },
1445
+ {
1446
+ "nameExplicit": true,
1447
+ "columns": [
1448
+ {
1449
+ "value": "company_id",
1450
+ "isExpression": false,
1451
+ "asc": true,
1452
+ "nullsFirst": false,
1453
+ "opclass": null
1454
+ },
1455
+ {
1456
+ "value": "whatsapp_number",
1457
+ "isExpression": false,
1458
+ "asc": true,
1459
+ "nullsFirst": false,
1460
+ "opclass": null
1461
+ }
1462
+ ],
1463
+ "isUnique": true,
1464
+ "where": null,
1465
+ "with": "",
1466
+ "method": "btree",
1467
+ "concurrently": false,
1468
+ "name": "idx_sessions_company_number",
1469
+ "entityType": "indexes",
1470
+ "schema": "meta_whatsapp",
1471
+ "table": "sessions"
1472
+ },
1473
+ {
1474
+ "nameExplicit": true,
1475
+ "columns": [
1476
+ {
1477
+ "value": "company_id",
1478
+ "isExpression": false,
1479
+ "asc": true,
1480
+ "nullsFirst": false,
1481
+ "opclass": null
1482
+ },
1483
+ {
1484
+ "value": "mode",
1485
+ "isExpression": false,
1486
+ "asc": true,
1487
+ "nullsFirst": false,
1488
+ "opclass": null
1489
+ }
1490
+ ],
1491
+ "isUnique": false,
1492
+ "where": null,
1493
+ "with": "",
1494
+ "method": "btree",
1495
+ "concurrently": false,
1496
+ "name": "idx_sessions_company_mode",
1497
+ "entityType": "indexes",
1498
+ "schema": "meta_whatsapp",
1499
+ "table": "sessions"
1500
+ },
1501
+ {
1502
+ "nameExplicit": true,
1503
+ "columns": [
1504
+ {
1505
+ "value": "company_id",
1506
+ "isExpression": false,
1507
+ "asc": true,
1508
+ "nullsFirst": false,
1509
+ "opclass": null
1510
+ },
1511
+ {
1512
+ "value": "flow_key",
1513
+ "isExpression": false,
1514
+ "asc": true,
1515
+ "nullsFirst": false,
1516
+ "opclass": null
1517
+ },
1518
+ {
1519
+ "value": "current_node_id",
1520
+ "isExpression": false,
1521
+ "asc": true,
1522
+ "nullsFirst": false,
1523
+ "opclass": null
1524
+ }
1525
+ ],
1526
+ "isUnique": false,
1527
+ "where": null,
1528
+ "with": "",
1529
+ "method": "btree",
1530
+ "concurrently": false,
1531
+ "name": "idx_sessions_company_flow_node",
1532
+ "entityType": "indexes",
1533
+ "schema": "meta_whatsapp",
1534
+ "table": "sessions"
1535
+ },
1536
+ {
1537
+ "nameExplicit": false,
1538
+ "columns": [
1539
+ "session_id"
1540
+ ],
1541
+ "schemaTo": "meta_whatsapp",
1542
+ "tableTo": "sessions",
1543
+ "columnsTo": [
1544
+ "id"
1545
+ ],
1546
+ "onUpdate": "NO ACTION",
1547
+ "onDelete": "CASCADE",
1548
+ "name": "documents_session_id_sessions_id_fkey",
1549
+ "entityType": "fks",
1550
+ "schema": "meta_whatsapp",
1551
+ "table": "documents"
1552
+ },
1553
+ {
1554
+ "nameExplicit": false,
1555
+ "columns": [
1556
+ "message_id"
1557
+ ],
1558
+ "schemaTo": "meta_whatsapp",
1559
+ "tableTo": "messages",
1560
+ "columnsTo": [
1561
+ "id"
1562
+ ],
1563
+ "onUpdate": "NO ACTION",
1564
+ "onDelete": "SET NULL",
1565
+ "name": "documents_message_id_messages_id_fkey",
1566
+ "entityType": "fks",
1567
+ "schema": "meta_whatsapp",
1568
+ "table": "documents"
1569
+ },
1570
+ {
1571
+ "nameExplicit": false,
1572
+ "columns": [
1573
+ "session_id"
1574
+ ],
1575
+ "schemaTo": "meta_whatsapp",
1576
+ "tableTo": "sessions",
1577
+ "columnsTo": [
1578
+ "id"
1579
+ ],
1580
+ "onUpdate": "NO ACTION",
1581
+ "onDelete": "CASCADE",
1582
+ "name": "messages_session_id_sessions_id_fkey",
1583
+ "entityType": "fks",
1584
+ "schema": "meta_whatsapp",
1585
+ "table": "messages"
1586
+ },
1587
+ {
1588
+ "columns": [
1589
+ "id"
1590
+ ],
1591
+ "nameExplicit": false,
1592
+ "name": "documents_pkey",
1593
+ "schema": "meta_whatsapp",
1594
+ "table": "documents",
1595
+ "entityType": "pks"
1596
+ },
1597
+ {
1598
+ "columns": [
1599
+ "id"
1600
+ ],
1601
+ "nameExplicit": false,
1602
+ "name": "flow_graphs_pkey",
1603
+ "schema": "meta_whatsapp",
1604
+ "table": "flow_graphs",
1605
+ "entityType": "pks"
1606
+ },
1607
+ {
1608
+ "columns": [
1609
+ "id"
1610
+ ],
1611
+ "nameExplicit": false,
1612
+ "name": "flow_media_pkey",
1613
+ "schema": "meta_whatsapp",
1614
+ "table": "flow_media",
1615
+ "entityType": "pks"
1616
+ },
1617
+ {
1618
+ "columns": [
1619
+ "id"
1620
+ ],
1621
+ "nameExplicit": false,
1622
+ "name": "messages_pkey",
1623
+ "schema": "meta_whatsapp",
1624
+ "table": "messages",
1625
+ "entityType": "pks"
1626
+ },
1627
+ {
1628
+ "columns": [
1629
+ "id"
1630
+ ],
1631
+ "nameExplicit": false,
1632
+ "name": "sessions_pkey",
1633
+ "schema": "meta_whatsapp",
1634
+ "table": "sessions",
1635
+ "entityType": "pks"
1636
+ },
1637
+ {
1638
+ "columns": [
1639
+ "company_id"
1640
+ ],
1641
+ "nameExplicit": false,
1642
+ "name": "settings_pkey",
1643
+ "schema": "meta_whatsapp",
1644
+ "table": "settings",
1645
+ "entityType": "pks"
1646
+ }
1647
+ ],
1648
+ "renames": []
1649
+ }