@adatechnology/meta-whatsapp-module 0.2.0-rc.2 → 0.2.0-rc.4

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.
@@ -1,810 +0,0 @@
1
- {
2
- "version": "8",
3
- "dialect": "postgres",
4
- "id": "8f3c5b4c-cca4-4ddd-a8ff-23084baccaff",
5
- "prevIds": [
6
- "5510b482-4806-4827-a6ce-e39b57da0c07"
7
- ],
8
- "ddl": [
9
- {
10
- "name": "meta_whatsapp",
11
- "entityType": "schemas"
12
- },
13
- {
14
- "isRlsEnabled": false,
15
- "name": "flow_graphs",
16
- "entityType": "tables",
17
- "schema": "meta_whatsapp"
18
- },
19
- {
20
- "isRlsEnabled": false,
21
- "name": "messages",
22
- "entityType": "tables",
23
- "schema": "meta_whatsapp"
24
- },
25
- {
26
- "isRlsEnabled": false,
27
- "name": "sessions",
28
- "entityType": "tables",
29
- "schema": "meta_whatsapp"
30
- },
31
- {
32
- "type": "uuid",
33
- "typeSchema": null,
34
- "notNull": true,
35
- "dimensions": 0,
36
- "default": "gen_random_uuid()",
37
- "generated": null,
38
- "identity": null,
39
- "name": "id",
40
- "entityType": "columns",
41
- "schema": "meta_whatsapp",
42
- "table": "flow_graphs"
43
- },
44
- {
45
- "type": "uuid",
46
- "typeSchema": null,
47
- "notNull": true,
48
- "dimensions": 0,
49
- "default": null,
50
- "generated": null,
51
- "identity": null,
52
- "name": "company_id",
53
- "entityType": "columns",
54
- "schema": "meta_whatsapp",
55
- "table": "flow_graphs"
56
- },
57
- {
58
- "type": "varchar(64)",
59
- "typeSchema": null,
60
- "notNull": true,
61
- "dimensions": 0,
62
- "default": null,
63
- "generated": null,
64
- "identity": null,
65
- "name": "key",
66
- "entityType": "columns",
67
- "schema": "meta_whatsapp",
68
- "table": "flow_graphs"
69
- },
70
- {
71
- "type": "varchar(120)",
72
- "typeSchema": null,
73
- "notNull": true,
74
- "dimensions": 0,
75
- "default": null,
76
- "generated": null,
77
- "identity": null,
78
- "name": "label",
79
- "entityType": "columns",
80
- "schema": "meta_whatsapp",
81
- "table": "flow_graphs"
82
- },
83
- {
84
- "type": "varchar(64)",
85
- "typeSchema": null,
86
- "notNull": true,
87
- "dimensions": 0,
88
- "default": null,
89
- "generated": null,
90
- "identity": null,
91
- "name": "start_node_id",
92
- "entityType": "columns",
93
- "schema": "meta_whatsapp",
94
- "table": "flow_graphs"
95
- },
96
- {
97
- "type": "jsonb",
98
- "typeSchema": null,
99
- "notNull": true,
100
- "dimensions": 0,
101
- "default": "'{}'",
102
- "generated": null,
103
- "identity": null,
104
- "name": "nodes",
105
- "entityType": "columns",
106
- "schema": "meta_whatsapp",
107
- "table": "flow_graphs"
108
- },
109
- {
110
- "type": "integer",
111
- "typeSchema": null,
112
- "notNull": true,
113
- "dimensions": 0,
114
- "default": "1",
115
- "generated": null,
116
- "identity": null,
117
- "name": "version",
118
- "entityType": "columns",
119
- "schema": "meta_whatsapp",
120
- "table": "flow_graphs"
121
- },
122
- {
123
- "type": "boolean",
124
- "typeSchema": null,
125
- "notNull": true,
126
- "dimensions": 0,
127
- "default": "false",
128
- "generated": null,
129
- "identity": null,
130
- "name": "show_in_menu",
131
- "entityType": "columns",
132
- "schema": "meta_whatsapp",
133
- "table": "flow_graphs"
134
- },
135
- {
136
- "type": "varchar(64)",
137
- "typeSchema": null,
138
- "notNull": false,
139
- "dimensions": 0,
140
- "default": null,
141
- "generated": null,
142
- "identity": null,
143
- "name": "menu_option_label",
144
- "entityType": "columns",
145
- "schema": "meta_whatsapp",
146
- "table": "flow_graphs"
147
- },
148
- {
149
- "type": "timestamp with time zone",
150
- "typeSchema": null,
151
- "notNull": true,
152
- "dimensions": 0,
153
- "default": "now()",
154
- "generated": null,
155
- "identity": null,
156
- "name": "created_at",
157
- "entityType": "columns",
158
- "schema": "meta_whatsapp",
159
- "table": "flow_graphs"
160
- },
161
- {
162
- "type": "timestamp with time zone",
163
- "typeSchema": null,
164
- "notNull": true,
165
- "dimensions": 0,
166
- "default": "now()",
167
- "generated": null,
168
- "identity": null,
169
- "name": "updated_at",
170
- "entityType": "columns",
171
- "schema": "meta_whatsapp",
172
- "table": "flow_graphs"
173
- },
174
- {
175
- "type": "uuid",
176
- "typeSchema": null,
177
- "notNull": true,
178
- "dimensions": 0,
179
- "default": "gen_random_uuid()",
180
- "generated": null,
181
- "identity": null,
182
- "name": "id",
183
- "entityType": "columns",
184
- "schema": "meta_whatsapp",
185
- "table": "messages"
186
- },
187
- {
188
- "type": "uuid",
189
- "typeSchema": null,
190
- "notNull": true,
191
- "dimensions": 0,
192
- "default": null,
193
- "generated": null,
194
- "identity": null,
195
- "name": "company_id",
196
- "entityType": "columns",
197
- "schema": "meta_whatsapp",
198
- "table": "messages"
199
- },
200
- {
201
- "type": "uuid",
202
- "typeSchema": null,
203
- "notNull": true,
204
- "dimensions": 0,
205
- "default": null,
206
- "generated": null,
207
- "identity": null,
208
- "name": "session_id",
209
- "entityType": "columns",
210
- "schema": "meta_whatsapp",
211
- "table": "messages"
212
- },
213
- {
214
- "type": "varchar(20)",
215
- "typeSchema": null,
216
- "notNull": true,
217
- "dimensions": 0,
218
- "default": null,
219
- "generated": null,
220
- "identity": null,
221
- "name": "whatsapp_number",
222
- "entityType": "columns",
223
- "schema": "meta_whatsapp",
224
- "table": "messages"
225
- },
226
- {
227
- "type": "varchar(12)",
228
- "typeSchema": null,
229
- "notNull": true,
230
- "dimensions": 0,
231
- "default": null,
232
- "generated": null,
233
- "identity": null,
234
- "name": "direction",
235
- "entityType": "columns",
236
- "schema": "meta_whatsapp",
237
- "table": "messages"
238
- },
239
- {
240
- "type": "varchar(12)",
241
- "typeSchema": null,
242
- "notNull": true,
243
- "dimensions": 0,
244
- "default": null,
245
- "generated": null,
246
- "identity": null,
247
- "name": "sender",
248
- "entityType": "columns",
249
- "schema": "meta_whatsapp",
250
- "table": "messages"
251
- },
252
- {
253
- "type": "uuid",
254
- "typeSchema": null,
255
- "notNull": false,
256
- "dimensions": 0,
257
- "default": null,
258
- "generated": null,
259
- "identity": null,
260
- "name": "agent_user_id",
261
- "entityType": "columns",
262
- "schema": "meta_whatsapp",
263
- "table": "messages"
264
- },
265
- {
266
- "type": "varchar(16)",
267
- "typeSchema": null,
268
- "notNull": true,
269
- "dimensions": 0,
270
- "default": "'text'",
271
- "generated": null,
272
- "identity": null,
273
- "name": "type",
274
- "entityType": "columns",
275
- "schema": "meta_whatsapp",
276
- "table": "messages"
277
- },
278
- {
279
- "type": "text",
280
- "typeSchema": null,
281
- "notNull": false,
282
- "dimensions": 0,
283
- "default": null,
284
- "generated": null,
285
- "identity": null,
286
- "name": "content",
287
- "entityType": "columns",
288
- "schema": "meta_whatsapp",
289
- "table": "messages"
290
- },
291
- {
292
- "type": "jsonb",
293
- "typeSchema": null,
294
- "notNull": false,
295
- "dimensions": 0,
296
- "default": null,
297
- "generated": null,
298
- "identity": null,
299
- "name": "payload",
300
- "entityType": "columns",
301
- "schema": "meta_whatsapp",
302
- "table": "messages"
303
- },
304
- {
305
- "type": "varchar(128)",
306
- "typeSchema": null,
307
- "notNull": false,
308
- "dimensions": 0,
309
- "default": null,
310
- "generated": null,
311
- "identity": null,
312
- "name": "wa_message_id",
313
- "entityType": "columns",
314
- "schema": "meta_whatsapp",
315
- "table": "messages"
316
- },
317
- {
318
- "type": "varchar(16)",
319
- "typeSchema": null,
320
- "notNull": false,
321
- "dimensions": 0,
322
- "default": null,
323
- "generated": null,
324
- "identity": null,
325
- "name": "status",
326
- "entityType": "columns",
327
- "schema": "meta_whatsapp",
328
- "table": "messages"
329
- },
330
- {
331
- "type": "timestamp with time zone",
332
- "typeSchema": null,
333
- "notNull": false,
334
- "dimensions": 0,
335
- "default": null,
336
- "generated": null,
337
- "identity": null,
338
- "name": "read_at",
339
- "entityType": "columns",
340
- "schema": "meta_whatsapp",
341
- "table": "messages"
342
- },
343
- {
344
- "type": "timestamp with time zone",
345
- "typeSchema": null,
346
- "notNull": true,
347
- "dimensions": 0,
348
- "default": "now()",
349
- "generated": null,
350
- "identity": null,
351
- "name": "created_at",
352
- "entityType": "columns",
353
- "schema": "meta_whatsapp",
354
- "table": "messages"
355
- },
356
- {
357
- "type": "uuid",
358
- "typeSchema": null,
359
- "notNull": true,
360
- "dimensions": 0,
361
- "default": "gen_random_uuid()",
362
- "generated": null,
363
- "identity": null,
364
- "name": "id",
365
- "entityType": "columns",
366
- "schema": "meta_whatsapp",
367
- "table": "sessions"
368
- },
369
- {
370
- "type": "uuid",
371
- "typeSchema": null,
372
- "notNull": true,
373
- "dimensions": 0,
374
- "default": null,
375
- "generated": null,
376
- "identity": null,
377
- "name": "company_id",
378
- "entityType": "columns",
379
- "schema": "meta_whatsapp",
380
- "table": "sessions"
381
- },
382
- {
383
- "type": "varchar(20)",
384
- "typeSchema": null,
385
- "notNull": true,
386
- "dimensions": 0,
387
- "default": null,
388
- "generated": null,
389
- "identity": null,
390
- "name": "whatsapp_number",
391
- "entityType": "columns",
392
- "schema": "meta_whatsapp",
393
- "table": "sessions"
394
- },
395
- {
396
- "type": "varchar(64)",
397
- "typeSchema": null,
398
- "notNull": true,
399
- "dimensions": 0,
400
- "default": "'start'",
401
- "generated": null,
402
- "identity": null,
403
- "name": "current_state",
404
- "entityType": "columns",
405
- "schema": "meta_whatsapp",
406
- "table": "sessions"
407
- },
408
- {
409
- "type": "varchar(64)",
410
- "typeSchema": null,
411
- "notNull": false,
412
- "dimensions": 0,
413
- "default": null,
414
- "generated": null,
415
- "identity": null,
416
- "name": "flow_key",
417
- "entityType": "columns",
418
- "schema": "meta_whatsapp",
419
- "table": "sessions"
420
- },
421
- {
422
- "type": "varchar(64)",
423
- "typeSchema": null,
424
- "notNull": false,
425
- "dimensions": 0,
426
- "default": null,
427
- "generated": null,
428
- "identity": null,
429
- "name": "current_node_id",
430
- "entityType": "columns",
431
- "schema": "meta_whatsapp",
432
- "table": "sessions"
433
- },
434
- {
435
- "type": "jsonb",
436
- "typeSchema": null,
437
- "notNull": true,
438
- "dimensions": 0,
439
- "default": "'{}'",
440
- "generated": null,
441
- "identity": null,
442
- "name": "context",
443
- "entityType": "columns",
444
- "schema": "meta_whatsapp",
445
- "table": "sessions"
446
- },
447
- {
448
- "type": "varchar(12)",
449
- "typeSchema": null,
450
- "notNull": true,
451
- "dimensions": 0,
452
- "default": "'bot'",
453
- "generated": null,
454
- "identity": null,
455
- "name": "mode",
456
- "entityType": "columns",
457
- "schema": "meta_whatsapp",
458
- "table": "sessions"
459
- },
460
- {
461
- "type": "uuid",
462
- "typeSchema": null,
463
- "notNull": false,
464
- "dimensions": 0,
465
- "default": null,
466
- "generated": null,
467
- "identity": null,
468
- "name": "assigned_user_id",
469
- "entityType": "columns",
470
- "schema": "meta_whatsapp",
471
- "table": "sessions"
472
- },
473
- {
474
- "type": "timestamp with time zone",
475
- "typeSchema": null,
476
- "notNull": false,
477
- "dimensions": 0,
478
- "default": null,
479
- "generated": null,
480
- "identity": null,
481
- "name": "human_requested_at",
482
- "entityType": "columns",
483
- "schema": "meta_whatsapp",
484
- "table": "sessions"
485
- },
486
- {
487
- "type": "timestamp with time zone",
488
- "typeSchema": null,
489
- "notNull": false,
490
- "dimensions": 0,
491
- "default": null,
492
- "generated": null,
493
- "identity": null,
494
- "name": "last_inbound_at",
495
- "entityType": "columns",
496
- "schema": "meta_whatsapp",
497
- "table": "sessions"
498
- },
499
- {
500
- "type": "timestamp with time zone",
501
- "typeSchema": null,
502
- "notNull": false,
503
- "dimensions": 0,
504
- "default": null,
505
- "generated": null,
506
- "identity": null,
507
- "name": "last_agent_read_at",
508
- "entityType": "columns",
509
- "schema": "meta_whatsapp",
510
- "table": "sessions"
511
- },
512
- {
513
- "type": "timestamp with time zone",
514
- "typeSchema": null,
515
- "notNull": true,
516
- "dimensions": 0,
517
- "default": "now()",
518
- "generated": null,
519
- "identity": null,
520
- "name": "last_activity",
521
- "entityType": "columns",
522
- "schema": "meta_whatsapp",
523
- "table": "sessions"
524
- },
525
- {
526
- "type": "timestamp with time zone",
527
- "typeSchema": null,
528
- "notNull": true,
529
- "dimensions": 0,
530
- "default": "now()",
531
- "generated": null,
532
- "identity": null,
533
- "name": "created_at",
534
- "entityType": "columns",
535
- "schema": "meta_whatsapp",
536
- "table": "sessions"
537
- },
538
- {
539
- "type": "timestamp with time zone",
540
- "typeSchema": null,
541
- "notNull": true,
542
- "dimensions": 0,
543
- "default": "now()",
544
- "generated": null,
545
- "identity": null,
546
- "name": "updated_at",
547
- "entityType": "columns",
548
- "schema": "meta_whatsapp",
549
- "table": "sessions"
550
- },
551
- {
552
- "nameExplicit": true,
553
- "columns": [
554
- {
555
- "value": "company_id",
556
- "isExpression": false,
557
- "asc": true,
558
- "nullsFirst": false,
559
- "opclass": null
560
- },
561
- {
562
- "value": "key",
563
- "isExpression": false,
564
- "asc": true,
565
- "nullsFirst": false,
566
- "opclass": null
567
- }
568
- ],
569
- "isUnique": true,
570
- "where": null,
571
- "with": "",
572
- "method": "btree",
573
- "concurrently": false,
574
- "name": "idx_flow_graphs_company_key",
575
- "entityType": "indexes",
576
- "schema": "meta_whatsapp",
577
- "table": "flow_graphs"
578
- },
579
- {
580
- "nameExplicit": true,
581
- "columns": [
582
- {
583
- "value": "session_id",
584
- "isExpression": false,
585
- "asc": true,
586
- "nullsFirst": false,
587
- "opclass": null
588
- },
589
- {
590
- "value": "created_at",
591
- "isExpression": false,
592
- "asc": true,
593
- "nullsFirst": false,
594
- "opclass": null
595
- }
596
- ],
597
- "isUnique": false,
598
- "where": null,
599
- "with": "",
600
- "method": "btree",
601
- "concurrently": false,
602
- "name": "idx_messages_session_created",
603
- "entityType": "indexes",
604
- "schema": "meta_whatsapp",
605
- "table": "messages"
606
- },
607
- {
608
- "nameExplicit": true,
609
- "columns": [
610
- {
611
- "value": "company_id",
612
- "isExpression": false,
613
- "asc": true,
614
- "nullsFirst": false,
615
- "opclass": null
616
- },
617
- {
618
- "value": "whatsapp_number",
619
- "isExpression": false,
620
- "asc": true,
621
- "nullsFirst": false,
622
- "opclass": null
623
- },
624
- {
625
- "value": "created_at",
626
- "isExpression": false,
627
- "asc": true,
628
- "nullsFirst": false,
629
- "opclass": null
630
- }
631
- ],
632
- "isUnique": false,
633
- "where": null,
634
- "with": "",
635
- "method": "btree",
636
- "concurrently": false,
637
- "name": "idx_messages_company_number_created",
638
- "entityType": "indexes",
639
- "schema": "meta_whatsapp",
640
- "table": "messages"
641
- },
642
- {
643
- "nameExplicit": true,
644
- "columns": [
645
- {
646
- "value": "company_id",
647
- "isExpression": false,
648
- "asc": true,
649
- "nullsFirst": false,
650
- "opclass": null
651
- },
652
- {
653
- "value": "wa_message_id",
654
- "isExpression": false,
655
- "asc": true,
656
- "nullsFirst": false,
657
- "opclass": null
658
- }
659
- ],
660
- "isUnique": true,
661
- "where": "\"wa_message_id\" is not null",
662
- "with": "",
663
- "method": "btree",
664
- "concurrently": false,
665
- "name": "idx_messages_company_wa_message_id",
666
- "entityType": "indexes",
667
- "schema": "meta_whatsapp",
668
- "table": "messages"
669
- },
670
- {
671
- "nameExplicit": true,
672
- "columns": [
673
- {
674
- "value": "company_id",
675
- "isExpression": false,
676
- "asc": true,
677
- "nullsFirst": false,
678
- "opclass": null
679
- },
680
- {
681
- "value": "whatsapp_number",
682
- "isExpression": false,
683
- "asc": true,
684
- "nullsFirst": false,
685
- "opclass": null
686
- }
687
- ],
688
- "isUnique": true,
689
- "where": null,
690
- "with": "",
691
- "method": "btree",
692
- "concurrently": false,
693
- "name": "idx_sessions_company_number",
694
- "entityType": "indexes",
695
- "schema": "meta_whatsapp",
696
- "table": "sessions"
697
- },
698
- {
699
- "nameExplicit": true,
700
- "columns": [
701
- {
702
- "value": "company_id",
703
- "isExpression": false,
704
- "asc": true,
705
- "nullsFirst": false,
706
- "opclass": null
707
- },
708
- {
709
- "value": "mode",
710
- "isExpression": false,
711
- "asc": true,
712
- "nullsFirst": false,
713
- "opclass": null
714
- }
715
- ],
716
- "isUnique": false,
717
- "where": null,
718
- "with": "",
719
- "method": "btree",
720
- "concurrently": false,
721
- "name": "idx_sessions_company_mode",
722
- "entityType": "indexes",
723
- "schema": "meta_whatsapp",
724
- "table": "sessions"
725
- },
726
- {
727
- "nameExplicit": true,
728
- "columns": [
729
- {
730
- "value": "company_id",
731
- "isExpression": false,
732
- "asc": true,
733
- "nullsFirst": false,
734
- "opclass": null
735
- },
736
- {
737
- "value": "flow_key",
738
- "isExpression": false,
739
- "asc": true,
740
- "nullsFirst": false,
741
- "opclass": null
742
- },
743
- {
744
- "value": "current_node_id",
745
- "isExpression": false,
746
- "asc": true,
747
- "nullsFirst": false,
748
- "opclass": null
749
- }
750
- ],
751
- "isUnique": false,
752
- "where": null,
753
- "with": "",
754
- "method": "btree",
755
- "concurrently": false,
756
- "name": "idx_sessions_company_flow_node",
757
- "entityType": "indexes",
758
- "schema": "meta_whatsapp",
759
- "table": "sessions"
760
- },
761
- {
762
- "nameExplicit": false,
763
- "columns": [
764
- "session_id"
765
- ],
766
- "schemaTo": "meta_whatsapp",
767
- "tableTo": "sessions",
768
- "columnsTo": [
769
- "id"
770
- ],
771
- "onUpdate": "NO ACTION",
772
- "onDelete": "CASCADE",
773
- "name": "messages_session_id_sessions_id_fkey",
774
- "entityType": "fks",
775
- "schema": "meta_whatsapp",
776
- "table": "messages"
777
- },
778
- {
779
- "columns": [
780
- "id"
781
- ],
782
- "nameExplicit": false,
783
- "name": "flow_graphs_pkey",
784
- "schema": "meta_whatsapp",
785
- "table": "flow_graphs",
786
- "entityType": "pks"
787
- },
788
- {
789
- "columns": [
790
- "id"
791
- ],
792
- "nameExplicit": false,
793
- "name": "messages_pkey",
794
- "schema": "meta_whatsapp",
795
- "table": "messages",
796
- "entityType": "pks"
797
- },
798
- {
799
- "columns": [
800
- "id"
801
- ],
802
- "nameExplicit": false,
803
- "name": "sessions_pkey",
804
- "schema": "meta_whatsapp",
805
- "table": "sessions",
806
- "entityType": "pks"
807
- }
808
- ],
809
- "renames": []
810
- }