@nymbalhq/platform 1.2.0 → 1.4.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 (33) hide show
  1. package/dist/{chunk-UBEGSSFI.js → chunk-GMV3B3SC.js} +3681 -389
  2. package/dist/chunk-GMV3B3SC.js.map +1 -0
  3. package/dist/{chunk-XVUH34US.js → chunk-SNNK2OX3.js} +129 -7
  4. package/dist/chunk-SNNK2OX3.js.map +1 -0
  5. package/dist/db/schema/index.d.ts +1821 -323
  6. package/dist/db/schema/index.js +1 -1
  7. package/dist/index.d.ts +239 -10
  8. package/dist/index.js +734 -2169
  9. package/dist/index.js.map +1 -1
  10. package/dist/register-N2XGSFUF.js +8 -0
  11. package/migrations/postgres/0012_event_subject.sql +27 -0
  12. package/migrations/postgres/0013_order_access_keys.sql +11 -0
  13. package/migrations/postgres/0014_alert_subscriptions.sql +22 -0
  14. package/migrations/postgres/0015_events_retry_at.sql +1 -0
  15. package/migrations/postgres/meta/0012_snapshot.json +1926 -0
  16. package/migrations/postgres/meta/0013_snapshot.json +2000 -0
  17. package/migrations/postgres/meta/0014_snapshot.json +2185 -0
  18. package/migrations/postgres/meta/0015_snapshot.json +2191 -0
  19. package/migrations/postgres/meta/_journal.json +28 -0
  20. package/migrations/sqlite/0012_event_subject.sql +27 -0
  21. package/migrations/sqlite/0013_order_access_keys.sql +11 -0
  22. package/migrations/sqlite/0014_alert_subscriptions.sql +22 -0
  23. package/migrations/sqlite/0015_events_retry_at.sql +1 -0
  24. package/migrations/sqlite/meta/0012_snapshot.json +1728 -0
  25. package/migrations/sqlite/meta/0013_snapshot.json +1788 -0
  26. package/migrations/sqlite/meta/0014_snapshot.json +1931 -0
  27. package/migrations/sqlite/meta/0015_snapshot.json +1938 -0
  28. package/migrations/sqlite/meta/_journal.json +28 -0
  29. package/package.json +19 -19
  30. package/dist/chunk-UBEGSSFI.js.map +0 -1
  31. package/dist/chunk-XVUH34US.js.map +0 -1
  32. package/dist/register-NHG3TIRQ.js +0 -8
  33. /package/dist/{register-NHG3TIRQ.js.map → register-N2XGSFUF.js.map} +0 -0
@@ -0,0 +1,2185 @@
1
+ {
2
+ "id": "cbc0048c-3793-4deb-8cad-f17c6d6aaf9d",
3
+ "prevId": "6f322c5e-6a88-4421-a6f7-e9f0996004e5",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.alert_subscriptions": {
8
+ "name": "alert_subscriptions",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "email": {
18
+ "name": "email",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true
22
+ },
23
+ "kind": {
24
+ "name": "kind",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "variant_id": {
30
+ "name": "variant_id",
31
+ "type": "text",
32
+ "primaryKey": false,
33
+ "notNull": true
34
+ },
35
+ "product_id": {
36
+ "name": "product_id",
37
+ "type": "text",
38
+ "primaryKey": false,
39
+ "notNull": true
40
+ },
41
+ "status": {
42
+ "name": "status",
43
+ "type": "text",
44
+ "primaryKey": false,
45
+ "notNull": true
46
+ },
47
+ "confirm_token": {
48
+ "name": "confirm_token",
49
+ "type": "text",
50
+ "primaryKey": false,
51
+ "notNull": true
52
+ },
53
+ "unsubscribe_token": {
54
+ "name": "unsubscribe_token",
55
+ "type": "text",
56
+ "primaryKey": false,
57
+ "notNull": true
58
+ },
59
+ "origin": {
60
+ "name": "origin",
61
+ "type": "text",
62
+ "primaryKey": false,
63
+ "notNull": true
64
+ },
65
+ "baseline_price_minor": {
66
+ "name": "baseline_price_minor",
67
+ "type": "integer",
68
+ "primaryKey": false,
69
+ "notNull": false
70
+ },
71
+ "created_at": {
72
+ "name": "created_at",
73
+ "type": "timestamp with time zone",
74
+ "primaryKey": false,
75
+ "notNull": true
76
+ },
77
+ "updated_at": {
78
+ "name": "updated_at",
79
+ "type": "timestamp with time zone",
80
+ "primaryKey": false,
81
+ "notNull": true
82
+ },
83
+ "confirmed_at": {
84
+ "name": "confirmed_at",
85
+ "type": "timestamp with time zone",
86
+ "primaryKey": false,
87
+ "notNull": false
88
+ }
89
+ },
90
+ "indexes": {
91
+ "alert_subscriptions_address_unique": {
92
+ "name": "alert_subscriptions_address_unique",
93
+ "columns": [
94
+ {
95
+ "expression": "email",
96
+ "isExpression": false,
97
+ "asc": true,
98
+ "nulls": "last"
99
+ },
100
+ {
101
+ "expression": "variant_id",
102
+ "isExpression": false,
103
+ "asc": true,
104
+ "nulls": "last"
105
+ },
106
+ {
107
+ "expression": "kind",
108
+ "isExpression": false,
109
+ "asc": true,
110
+ "nulls": "last"
111
+ }
112
+ ],
113
+ "isUnique": true,
114
+ "concurrently": false,
115
+ "method": "btree",
116
+ "with": {}
117
+ },
118
+ "alert_subscriptions_confirm_token_unique": {
119
+ "name": "alert_subscriptions_confirm_token_unique",
120
+ "columns": [
121
+ {
122
+ "expression": "confirm_token",
123
+ "isExpression": false,
124
+ "asc": true,
125
+ "nulls": "last"
126
+ }
127
+ ],
128
+ "isUnique": true,
129
+ "concurrently": false,
130
+ "method": "btree",
131
+ "with": {}
132
+ },
133
+ "alert_subscriptions_unsubscribe_token_unique": {
134
+ "name": "alert_subscriptions_unsubscribe_token_unique",
135
+ "columns": [
136
+ {
137
+ "expression": "unsubscribe_token",
138
+ "isExpression": false,
139
+ "asc": true,
140
+ "nulls": "last"
141
+ }
142
+ ],
143
+ "isUnique": true,
144
+ "concurrently": false,
145
+ "method": "btree",
146
+ "with": {}
147
+ },
148
+ "alert_subscriptions_fan_out_idx": {
149
+ "name": "alert_subscriptions_fan_out_idx",
150
+ "columns": [
151
+ {
152
+ "expression": "variant_id",
153
+ "isExpression": false,
154
+ "asc": true,
155
+ "nulls": "last"
156
+ },
157
+ {
158
+ "expression": "kind",
159
+ "isExpression": false,
160
+ "asc": true,
161
+ "nulls": "last"
162
+ },
163
+ {
164
+ "expression": "status",
165
+ "isExpression": false,
166
+ "asc": true,
167
+ "nulls": "last"
168
+ }
169
+ ],
170
+ "isUnique": false,
171
+ "concurrently": false,
172
+ "method": "btree",
173
+ "with": {}
174
+ }
175
+ },
176
+ "foreignKeys": {},
177
+ "compositePrimaryKeys": {},
178
+ "uniqueConstraints": {},
179
+ "policies": {},
180
+ "checkConstraints": {
181
+ "alert_subscriptions_kind": {
182
+ "name": "alert_subscriptions_kind",
183
+ "value": "\"alert_subscriptions\".\"kind\" IN ('back_in_stock', 'price_drop')"
184
+ },
185
+ "alert_subscriptions_status": {
186
+ "name": "alert_subscriptions_status",
187
+ "value": "\"alert_subscriptions\".\"status\" IN ('pending', 'active', 'fired', 'unsubscribed')"
188
+ }
189
+ },
190
+ "isRLSEnabled": false
191
+ },
192
+ "public.audit_entries": {
193
+ "name": "audit_entries",
194
+ "schema": "",
195
+ "columns": {
196
+ "id": {
197
+ "name": "id",
198
+ "type": "text",
199
+ "primaryKey": true,
200
+ "notNull": true
201
+ },
202
+ "at": {
203
+ "name": "at",
204
+ "type": "timestamp with time zone",
205
+ "primaryKey": false,
206
+ "notNull": true
207
+ },
208
+ "actor_kind": {
209
+ "name": "actor_kind",
210
+ "type": "text",
211
+ "primaryKey": false,
212
+ "notNull": true
213
+ },
214
+ "actor_id": {
215
+ "name": "actor_id",
216
+ "type": "text",
217
+ "primaryKey": false,
218
+ "notNull": true
219
+ },
220
+ "command": {
221
+ "name": "command",
222
+ "type": "text",
223
+ "primaryKey": false,
224
+ "notNull": true
225
+ },
226
+ "subjects": {
227
+ "name": "subjects",
228
+ "type": "jsonb",
229
+ "primaryKey": false,
230
+ "notNull": true
231
+ },
232
+ "correlation_id": {
233
+ "name": "correlation_id",
234
+ "type": "text",
235
+ "primaryKey": false,
236
+ "notNull": false
237
+ },
238
+ "idempotency_key": {
239
+ "name": "idempotency_key",
240
+ "type": "text",
241
+ "primaryKey": false,
242
+ "notNull": false
243
+ },
244
+ "request_hash": {
245
+ "name": "request_hash",
246
+ "type": "text",
247
+ "primaryKey": false,
248
+ "notNull": false
249
+ },
250
+ "outcome": {
251
+ "name": "outcome",
252
+ "type": "text",
253
+ "primaryKey": false,
254
+ "notNull": true
255
+ },
256
+ "response_status": {
257
+ "name": "response_status",
258
+ "type": "integer",
259
+ "primaryKey": false,
260
+ "notNull": false
261
+ },
262
+ "response_body": {
263
+ "name": "response_body",
264
+ "type": "jsonb",
265
+ "primaryKey": false,
266
+ "notNull": false
267
+ }
268
+ },
269
+ "indexes": {
270
+ "audit_entries_applied_key_unique": {
271
+ "name": "audit_entries_applied_key_unique",
272
+ "columns": [
273
+ {
274
+ "expression": "actor_id",
275
+ "isExpression": false,
276
+ "asc": true,
277
+ "nulls": "last"
278
+ },
279
+ {
280
+ "expression": "command",
281
+ "isExpression": false,
282
+ "asc": true,
283
+ "nulls": "last"
284
+ },
285
+ {
286
+ "expression": "idempotency_key",
287
+ "isExpression": false,
288
+ "asc": true,
289
+ "nulls": "last"
290
+ }
291
+ ],
292
+ "isUnique": true,
293
+ "where": "\"audit_entries\".\"outcome\" = 'applied' AND \"audit_entries\".\"idempotency_key\" IS NOT NULL",
294
+ "concurrently": false,
295
+ "method": "btree",
296
+ "with": {}
297
+ },
298
+ "audit_entries_at_idx": {
299
+ "name": "audit_entries_at_idx",
300
+ "columns": [
301
+ {
302
+ "expression": "at",
303
+ "isExpression": false,
304
+ "asc": true,
305
+ "nulls": "last"
306
+ },
307
+ {
308
+ "expression": "id",
309
+ "isExpression": false,
310
+ "asc": true,
311
+ "nulls": "last"
312
+ }
313
+ ],
314
+ "isUnique": false,
315
+ "concurrently": false,
316
+ "method": "btree",
317
+ "with": {}
318
+ },
319
+ "audit_entries_correlation_idx": {
320
+ "name": "audit_entries_correlation_idx",
321
+ "columns": [
322
+ {
323
+ "expression": "correlation_id",
324
+ "isExpression": false,
325
+ "asc": true,
326
+ "nulls": "last"
327
+ }
328
+ ],
329
+ "isUnique": false,
330
+ "concurrently": false,
331
+ "method": "btree",
332
+ "with": {}
333
+ }
334
+ },
335
+ "foreignKeys": {},
336
+ "compositePrimaryKeys": {},
337
+ "uniqueConstraints": {},
338
+ "policies": {},
339
+ "checkConstraints": {
340
+ "audit_entries_outcome": {
341
+ "name": "audit_entries_outcome",
342
+ "value": "\"audit_entries\".\"outcome\" IN ('applied', 'refused', 'replayed')"
343
+ }
344
+ },
345
+ "isRLSEnabled": false
346
+ },
347
+ "public.carts": {
348
+ "name": "carts",
349
+ "schema": "",
350
+ "columns": {
351
+ "token": {
352
+ "name": "token",
353
+ "type": "text",
354
+ "primaryKey": true,
355
+ "notNull": true
356
+ },
357
+ "customer_id": {
358
+ "name": "customer_id",
359
+ "type": "text",
360
+ "primaryKey": false,
361
+ "notNull": false
362
+ },
363
+ "currency": {
364
+ "name": "currency",
365
+ "type": "text",
366
+ "primaryKey": false,
367
+ "notNull": true
368
+ },
369
+ "items": {
370
+ "name": "items",
371
+ "type": "jsonb",
372
+ "primaryKey": false,
373
+ "notNull": true,
374
+ "default": "'[]'::jsonb"
375
+ },
376
+ "line_count": {
377
+ "name": "line_count",
378
+ "type": "integer",
379
+ "primaryKey": false,
380
+ "notNull": true,
381
+ "default": 0
382
+ },
383
+ "subtotal_minor": {
384
+ "name": "subtotal_minor",
385
+ "type": "integer",
386
+ "primaryKey": false,
387
+ "notNull": true,
388
+ "default": 0
389
+ },
390
+ "expires_at": {
391
+ "name": "expires_at",
392
+ "type": "timestamp with time zone",
393
+ "primaryKey": false,
394
+ "notNull": true
395
+ },
396
+ "created_at": {
397
+ "name": "created_at",
398
+ "type": "timestamp with time zone",
399
+ "primaryKey": false,
400
+ "notNull": true
401
+ },
402
+ "updated_at": {
403
+ "name": "updated_at",
404
+ "type": "timestamp with time zone",
405
+ "primaryKey": false,
406
+ "notNull": true
407
+ },
408
+ "abandoned_notified_at": {
409
+ "name": "abandoned_notified_at",
410
+ "type": "timestamp with time zone",
411
+ "primaryKey": false,
412
+ "notNull": false
413
+ }
414
+ },
415
+ "indexes": {
416
+ "carts_expires_idx": {
417
+ "name": "carts_expires_idx",
418
+ "columns": [
419
+ {
420
+ "expression": "expires_at",
421
+ "isExpression": false,
422
+ "asc": true,
423
+ "nulls": "last"
424
+ }
425
+ ],
426
+ "isUnique": false,
427
+ "concurrently": false,
428
+ "method": "btree",
429
+ "with": {}
430
+ },
431
+ "carts_updated_idx": {
432
+ "name": "carts_updated_idx",
433
+ "columns": [
434
+ {
435
+ "expression": "updated_at",
436
+ "isExpression": false,
437
+ "asc": true,
438
+ "nulls": "last"
439
+ }
440
+ ],
441
+ "isUnique": false,
442
+ "concurrently": false,
443
+ "method": "btree",
444
+ "with": {}
445
+ }
446
+ },
447
+ "foreignKeys": {},
448
+ "compositePrimaryKeys": {},
449
+ "uniqueConstraints": {},
450
+ "policies": {},
451
+ "checkConstraints": {},
452
+ "isRLSEnabled": false
453
+ },
454
+ "public.categories": {
455
+ "name": "categories",
456
+ "schema": "",
457
+ "columns": {
458
+ "id": {
459
+ "name": "id",
460
+ "type": "text",
461
+ "primaryKey": true,
462
+ "notNull": true
463
+ },
464
+ "parent_id": {
465
+ "name": "parent_id",
466
+ "type": "text",
467
+ "primaryKey": false,
468
+ "notNull": false
469
+ },
470
+ "slug": {
471
+ "name": "slug",
472
+ "type": "text",
473
+ "primaryKey": false,
474
+ "notNull": true
475
+ },
476
+ "name": {
477
+ "name": "name",
478
+ "type": "text",
479
+ "primaryKey": false,
480
+ "notNull": true
481
+ },
482
+ "description": {
483
+ "name": "description",
484
+ "type": "text",
485
+ "primaryKey": false,
486
+ "notNull": true,
487
+ "default": "''"
488
+ },
489
+ "position": {
490
+ "name": "position",
491
+ "type": "integer",
492
+ "primaryKey": false,
493
+ "notNull": true,
494
+ "default": 0
495
+ },
496
+ "created_at": {
497
+ "name": "created_at",
498
+ "type": "timestamp with time zone",
499
+ "primaryKey": false,
500
+ "notNull": true
501
+ }
502
+ },
503
+ "indexes": {
504
+ "categories_slug_unique": {
505
+ "name": "categories_slug_unique",
506
+ "columns": [
507
+ {
508
+ "expression": "slug",
509
+ "isExpression": false,
510
+ "asc": true,
511
+ "nulls": "last"
512
+ }
513
+ ],
514
+ "isUnique": true,
515
+ "concurrently": false,
516
+ "method": "btree",
517
+ "with": {}
518
+ },
519
+ "categories_parent_idx": {
520
+ "name": "categories_parent_idx",
521
+ "columns": [
522
+ {
523
+ "expression": "parent_id",
524
+ "isExpression": false,
525
+ "asc": true,
526
+ "nulls": "last"
527
+ }
528
+ ],
529
+ "isUnique": false,
530
+ "concurrently": false,
531
+ "method": "btree",
532
+ "with": {}
533
+ }
534
+ },
535
+ "foreignKeys": {},
536
+ "compositePrimaryKeys": {},
537
+ "uniqueConstraints": {},
538
+ "policies": {},
539
+ "checkConstraints": {},
540
+ "isRLSEnabled": false
541
+ },
542
+ "public.customers": {
543
+ "name": "customers",
544
+ "schema": "",
545
+ "columns": {
546
+ "id": {
547
+ "name": "id",
548
+ "type": "text",
549
+ "primaryKey": true,
550
+ "notNull": true
551
+ },
552
+ "email": {
553
+ "name": "email",
554
+ "type": "text",
555
+ "primaryKey": false,
556
+ "notNull": true
557
+ },
558
+ "password_hash": {
559
+ "name": "password_hash",
560
+ "type": "text",
561
+ "primaryKey": false,
562
+ "notNull": true
563
+ },
564
+ "first_name": {
565
+ "name": "first_name",
566
+ "type": "text",
567
+ "primaryKey": false,
568
+ "notNull": true,
569
+ "default": "''"
570
+ },
571
+ "last_name": {
572
+ "name": "last_name",
573
+ "type": "text",
574
+ "primaryKey": false,
575
+ "notNull": true,
576
+ "default": "''"
577
+ },
578
+ "phone": {
579
+ "name": "phone",
580
+ "type": "text",
581
+ "primaryKey": false,
582
+ "notNull": true,
583
+ "default": "''"
584
+ },
585
+ "addresses": {
586
+ "name": "addresses",
587
+ "type": "jsonb",
588
+ "primaryKey": false,
589
+ "notNull": true,
590
+ "default": "'[]'::jsonb"
591
+ },
592
+ "order_count": {
593
+ "name": "order_count",
594
+ "type": "integer",
595
+ "primaryKey": false,
596
+ "notNull": true,
597
+ "default": 0
598
+ },
599
+ "total_spent_minor": {
600
+ "name": "total_spent_minor",
601
+ "type": "integer",
602
+ "primaryKey": false,
603
+ "notNull": true,
604
+ "default": 0
605
+ },
606
+ "metadata": {
607
+ "name": "metadata",
608
+ "type": "jsonb",
609
+ "primaryKey": false,
610
+ "notNull": true,
611
+ "default": "'{}'::jsonb"
612
+ },
613
+ "roles": {
614
+ "name": "roles",
615
+ "type": "jsonb",
616
+ "primaryKey": false,
617
+ "notNull": true,
618
+ "default": "'[\"customer\"]'::jsonb"
619
+ },
620
+ "requires_password_reset": {
621
+ "name": "requires_password_reset",
622
+ "type": "boolean",
623
+ "primaryKey": false,
624
+ "notNull": true,
625
+ "default": false
626
+ },
627
+ "created_at": {
628
+ "name": "created_at",
629
+ "type": "timestamp with time zone",
630
+ "primaryKey": false,
631
+ "notNull": true
632
+ },
633
+ "updated_at": {
634
+ "name": "updated_at",
635
+ "type": "timestamp with time zone",
636
+ "primaryKey": false,
637
+ "notNull": true
638
+ }
639
+ },
640
+ "indexes": {
641
+ "customers_email_unique": {
642
+ "name": "customers_email_unique",
643
+ "columns": [
644
+ {
645
+ "expression": "email",
646
+ "isExpression": false,
647
+ "asc": true,
648
+ "nulls": "last"
649
+ }
650
+ ],
651
+ "isUnique": true,
652
+ "concurrently": false,
653
+ "method": "btree",
654
+ "with": {}
655
+ }
656
+ },
657
+ "foreignKeys": {},
658
+ "compositePrimaryKeys": {},
659
+ "uniqueConstraints": {},
660
+ "policies": {},
661
+ "checkConstraints": {},
662
+ "isRLSEnabled": false
663
+ },
664
+ "public.events": {
665
+ "name": "events",
666
+ "schema": "",
667
+ "columns": {
668
+ "seq": {
669
+ "name": "seq",
670
+ "type": "bigserial",
671
+ "primaryKey": true,
672
+ "notNull": true
673
+ },
674
+ "id": {
675
+ "name": "id",
676
+ "type": "text",
677
+ "primaryKey": false,
678
+ "notNull": true
679
+ },
680
+ "type": {
681
+ "name": "type",
682
+ "type": "text",
683
+ "primaryKey": false,
684
+ "notNull": true
685
+ },
686
+ "envelope": {
687
+ "name": "envelope",
688
+ "type": "jsonb",
689
+ "primaryKey": false,
690
+ "notNull": true
691
+ },
692
+ "correlation_id": {
693
+ "name": "correlation_id",
694
+ "type": "text",
695
+ "primaryKey": false,
696
+ "notNull": true
697
+ },
698
+ "created_at": {
699
+ "name": "created_at",
700
+ "type": "timestamp with time zone",
701
+ "primaryKey": false,
702
+ "notNull": true
703
+ },
704
+ "subject_type": {
705
+ "name": "subject_type",
706
+ "type": "text",
707
+ "primaryKey": false,
708
+ "notNull": false
709
+ },
710
+ "subject_id": {
711
+ "name": "subject_id",
712
+ "type": "text",
713
+ "primaryKey": false,
714
+ "notNull": false
715
+ },
716
+ "delivered_at": {
717
+ "name": "delivered_at",
718
+ "type": "timestamp with time zone",
719
+ "primaryKey": false,
720
+ "notNull": false
721
+ },
722
+ "attempts": {
723
+ "name": "attempts",
724
+ "type": "integer",
725
+ "primaryKey": false,
726
+ "notNull": true,
727
+ "default": 0
728
+ },
729
+ "dead_at": {
730
+ "name": "dead_at",
731
+ "type": "timestamp with time zone",
732
+ "primaryKey": false,
733
+ "notNull": false
734
+ }
735
+ },
736
+ "indexes": {
737
+ "events_id_unique": {
738
+ "name": "events_id_unique",
739
+ "columns": [
740
+ {
741
+ "expression": "id",
742
+ "isExpression": false,
743
+ "asc": true,
744
+ "nulls": "last"
745
+ }
746
+ ],
747
+ "isUnique": true,
748
+ "concurrently": false,
749
+ "method": "btree",
750
+ "with": {}
751
+ },
752
+ "events_undelivered_idx": {
753
+ "name": "events_undelivered_idx",
754
+ "columns": [
755
+ {
756
+ "expression": "delivered_at",
757
+ "isExpression": false,
758
+ "asc": true,
759
+ "nulls": "last"
760
+ },
761
+ {
762
+ "expression": "seq",
763
+ "isExpression": false,
764
+ "asc": true,
765
+ "nulls": "last"
766
+ }
767
+ ],
768
+ "isUnique": false,
769
+ "concurrently": false,
770
+ "method": "btree",
771
+ "with": {}
772
+ },
773
+ "events_correlation_idx": {
774
+ "name": "events_correlation_idx",
775
+ "columns": [
776
+ {
777
+ "expression": "correlation_id",
778
+ "isExpression": false,
779
+ "asc": true,
780
+ "nulls": "last"
781
+ },
782
+ {
783
+ "expression": "seq",
784
+ "isExpression": false,
785
+ "asc": true,
786
+ "nulls": "last"
787
+ }
788
+ ],
789
+ "isUnique": false,
790
+ "concurrently": false,
791
+ "method": "btree",
792
+ "with": {}
793
+ },
794
+ "events_catch_up_idx": {
795
+ "name": "events_catch_up_idx",
796
+ "columns": [
797
+ {
798
+ "expression": "dead_at",
799
+ "isExpression": false,
800
+ "asc": true,
801
+ "nulls": "last"
802
+ },
803
+ {
804
+ "expression": "delivered_at",
805
+ "isExpression": false,
806
+ "asc": true,
807
+ "nulls": "last"
808
+ },
809
+ {
810
+ "expression": "seq",
811
+ "isExpression": false,
812
+ "asc": true,
813
+ "nulls": "last"
814
+ }
815
+ ],
816
+ "isUnique": false,
817
+ "concurrently": false,
818
+ "method": "btree",
819
+ "with": {}
820
+ },
821
+ "events_subject_idx": {
822
+ "name": "events_subject_idx",
823
+ "columns": [
824
+ {
825
+ "expression": "subject_type",
826
+ "isExpression": false,
827
+ "asc": true,
828
+ "nulls": "last"
829
+ },
830
+ {
831
+ "expression": "subject_id",
832
+ "isExpression": false,
833
+ "asc": true,
834
+ "nulls": "last"
835
+ },
836
+ {
837
+ "expression": "seq",
838
+ "isExpression": false,
839
+ "asc": true,
840
+ "nulls": "last"
841
+ }
842
+ ],
843
+ "isUnique": false,
844
+ "concurrently": false,
845
+ "method": "btree",
846
+ "with": {}
847
+ }
848
+ },
849
+ "foreignKeys": {},
850
+ "compositePrimaryKeys": {},
851
+ "uniqueConstraints": {},
852
+ "policies": {},
853
+ "checkConstraints": {},
854
+ "isRLSEnabled": false
855
+ },
856
+ "public.inventory_reservations": {
857
+ "name": "inventory_reservations",
858
+ "schema": "",
859
+ "columns": {
860
+ "reservation_id": {
861
+ "name": "reservation_id",
862
+ "type": "text",
863
+ "primaryKey": true,
864
+ "notNull": true
865
+ },
866
+ "variant_id": {
867
+ "name": "variant_id",
868
+ "type": "text",
869
+ "primaryKey": false,
870
+ "notNull": true
871
+ },
872
+ "qty": {
873
+ "name": "qty",
874
+ "type": "integer",
875
+ "primaryKey": false,
876
+ "notNull": true
877
+ },
878
+ "order_ref": {
879
+ "name": "order_ref",
880
+ "type": "text",
881
+ "primaryKey": false,
882
+ "notNull": false
883
+ },
884
+ "expires_at": {
885
+ "name": "expires_at",
886
+ "type": "timestamp with time zone",
887
+ "primaryKey": false,
888
+ "notNull": true
889
+ },
890
+ "created_at": {
891
+ "name": "created_at",
892
+ "type": "timestamp with time zone",
893
+ "primaryKey": false,
894
+ "notNull": true
895
+ }
896
+ },
897
+ "indexes": {
898
+ "inv_reservations_variant_idx": {
899
+ "name": "inv_reservations_variant_idx",
900
+ "columns": [
901
+ {
902
+ "expression": "variant_id",
903
+ "isExpression": false,
904
+ "asc": true,
905
+ "nulls": "last"
906
+ }
907
+ ],
908
+ "isUnique": false,
909
+ "concurrently": false,
910
+ "method": "btree",
911
+ "with": {}
912
+ },
913
+ "inv_reservations_expires_idx": {
914
+ "name": "inv_reservations_expires_idx",
915
+ "columns": [
916
+ {
917
+ "expression": "expires_at",
918
+ "isExpression": false,
919
+ "asc": true,
920
+ "nulls": "last"
921
+ }
922
+ ],
923
+ "isUnique": false,
924
+ "concurrently": false,
925
+ "method": "btree",
926
+ "with": {}
927
+ }
928
+ },
929
+ "foreignKeys": {},
930
+ "compositePrimaryKeys": {},
931
+ "uniqueConstraints": {},
932
+ "policies": {},
933
+ "checkConstraints": {},
934
+ "isRLSEnabled": false
935
+ },
936
+ "public.order_access_keys": {
937
+ "name": "order_access_keys",
938
+ "schema": "",
939
+ "columns": {
940
+ "id": {
941
+ "name": "id",
942
+ "type": "text",
943
+ "primaryKey": true,
944
+ "notNull": true
945
+ },
946
+ "order_id": {
947
+ "name": "order_id",
948
+ "type": "text",
949
+ "primaryKey": false,
950
+ "notNull": true
951
+ },
952
+ "key_hash": {
953
+ "name": "key_hash",
954
+ "type": "text",
955
+ "primaryKey": false,
956
+ "notNull": true
957
+ },
958
+ "purpose": {
959
+ "name": "purpose",
960
+ "type": "text",
961
+ "primaryKey": false,
962
+ "notNull": true
963
+ },
964
+ "created_at": {
965
+ "name": "created_at",
966
+ "type": "timestamp with time zone",
967
+ "primaryKey": false,
968
+ "notNull": true
969
+ }
970
+ },
971
+ "indexes": {
972
+ "order_access_keys_key_hash_idx": {
973
+ "name": "order_access_keys_key_hash_idx",
974
+ "columns": [
975
+ {
976
+ "expression": "key_hash",
977
+ "isExpression": false,
978
+ "asc": true,
979
+ "nulls": "last"
980
+ }
981
+ ],
982
+ "isUnique": true,
983
+ "concurrently": false,
984
+ "method": "btree",
985
+ "with": {}
986
+ },
987
+ "order_access_keys_order_idx": {
988
+ "name": "order_access_keys_order_idx",
989
+ "columns": [
990
+ {
991
+ "expression": "order_id",
992
+ "isExpression": false,
993
+ "asc": true,
994
+ "nulls": "last"
995
+ }
996
+ ],
997
+ "isUnique": false,
998
+ "concurrently": false,
999
+ "method": "btree",
1000
+ "with": {}
1001
+ }
1002
+ },
1003
+ "foreignKeys": {},
1004
+ "compositePrimaryKeys": {},
1005
+ "uniqueConstraints": {},
1006
+ "policies": {},
1007
+ "checkConstraints": {},
1008
+ "isRLSEnabled": false
1009
+ },
1010
+ "public.order_history": {
1011
+ "name": "order_history",
1012
+ "schema": "",
1013
+ "columns": {
1014
+ "id": {
1015
+ "name": "id",
1016
+ "type": "text",
1017
+ "primaryKey": true,
1018
+ "notNull": true
1019
+ },
1020
+ "order_id": {
1021
+ "name": "order_id",
1022
+ "type": "text",
1023
+ "primaryKey": false,
1024
+ "notNull": true
1025
+ },
1026
+ "from_status": {
1027
+ "name": "from_status",
1028
+ "type": "text",
1029
+ "primaryKey": false,
1030
+ "notNull": false
1031
+ },
1032
+ "to_status": {
1033
+ "name": "to_status",
1034
+ "type": "text",
1035
+ "primaryKey": false,
1036
+ "notNull": true
1037
+ },
1038
+ "actor": {
1039
+ "name": "actor",
1040
+ "type": "text",
1041
+ "primaryKey": false,
1042
+ "notNull": true
1043
+ },
1044
+ "note": {
1045
+ "name": "note",
1046
+ "type": "text",
1047
+ "primaryKey": false,
1048
+ "notNull": true,
1049
+ "default": "''"
1050
+ },
1051
+ "timestamp": {
1052
+ "name": "timestamp",
1053
+ "type": "timestamp with time zone",
1054
+ "primaryKey": false,
1055
+ "notNull": true
1056
+ }
1057
+ },
1058
+ "indexes": {
1059
+ "order_history_order_idx": {
1060
+ "name": "order_history_order_idx",
1061
+ "columns": [
1062
+ {
1063
+ "expression": "order_id",
1064
+ "isExpression": false,
1065
+ "asc": true,
1066
+ "nulls": "last"
1067
+ }
1068
+ ],
1069
+ "isUnique": false,
1070
+ "concurrently": false,
1071
+ "method": "btree",
1072
+ "with": {}
1073
+ }
1074
+ },
1075
+ "foreignKeys": {},
1076
+ "compositePrimaryKeys": {},
1077
+ "uniqueConstraints": {},
1078
+ "policies": {},
1079
+ "checkConstraints": {},
1080
+ "isRLSEnabled": false
1081
+ },
1082
+ "public.order_refunds": {
1083
+ "name": "order_refunds",
1084
+ "schema": "",
1085
+ "columns": {
1086
+ "id": {
1087
+ "name": "id",
1088
+ "type": "text",
1089
+ "primaryKey": true,
1090
+ "notNull": true
1091
+ },
1092
+ "order_id": {
1093
+ "name": "order_id",
1094
+ "type": "text",
1095
+ "primaryKey": false,
1096
+ "notNull": true
1097
+ },
1098
+ "amount_minor": {
1099
+ "name": "amount_minor",
1100
+ "type": "integer",
1101
+ "primaryKey": false,
1102
+ "notNull": true
1103
+ },
1104
+ "currency": {
1105
+ "name": "currency",
1106
+ "type": "text",
1107
+ "primaryKey": false,
1108
+ "notNull": true
1109
+ },
1110
+ "provider_refund_id": {
1111
+ "name": "provider_refund_id",
1112
+ "type": "text",
1113
+ "primaryKey": false,
1114
+ "notNull": false
1115
+ },
1116
+ "status": {
1117
+ "name": "status",
1118
+ "type": "text",
1119
+ "primaryKey": false,
1120
+ "notNull": true,
1121
+ "default": "'pending'"
1122
+ },
1123
+ "reason": {
1124
+ "name": "reason",
1125
+ "type": "text",
1126
+ "primaryKey": false,
1127
+ "notNull": false
1128
+ },
1129
+ "actor": {
1130
+ "name": "actor",
1131
+ "type": "text",
1132
+ "primaryKey": false,
1133
+ "notNull": true
1134
+ },
1135
+ "created_at": {
1136
+ "name": "created_at",
1137
+ "type": "timestamp with time zone",
1138
+ "primaryKey": false,
1139
+ "notNull": true
1140
+ },
1141
+ "request_id": {
1142
+ "name": "request_id",
1143
+ "type": "text",
1144
+ "primaryKey": false,
1145
+ "notNull": false
1146
+ }
1147
+ },
1148
+ "indexes": {
1149
+ "order_refunds_order_idx": {
1150
+ "name": "order_refunds_order_idx",
1151
+ "columns": [
1152
+ {
1153
+ "expression": "order_id",
1154
+ "isExpression": false,
1155
+ "asc": true,
1156
+ "nulls": "last"
1157
+ }
1158
+ ],
1159
+ "isUnique": false,
1160
+ "concurrently": false,
1161
+ "method": "btree",
1162
+ "with": {}
1163
+ },
1164
+ "order_refunds_order_request_idx": {
1165
+ "name": "order_refunds_order_request_idx",
1166
+ "columns": [
1167
+ {
1168
+ "expression": "order_id",
1169
+ "isExpression": false,
1170
+ "asc": true,
1171
+ "nulls": "last"
1172
+ },
1173
+ {
1174
+ "expression": "request_id",
1175
+ "isExpression": false,
1176
+ "asc": true,
1177
+ "nulls": "last"
1178
+ }
1179
+ ],
1180
+ "isUnique": true,
1181
+ "concurrently": false,
1182
+ "method": "btree",
1183
+ "with": {}
1184
+ }
1185
+ },
1186
+ "foreignKeys": {},
1187
+ "compositePrimaryKeys": {},
1188
+ "uniqueConstraints": {},
1189
+ "policies": {},
1190
+ "checkConstraints": {},
1191
+ "isRLSEnabled": false
1192
+ },
1193
+ "public.order_sequences": {
1194
+ "name": "order_sequences",
1195
+ "schema": "",
1196
+ "columns": {
1197
+ "id": {
1198
+ "name": "id",
1199
+ "type": "integer",
1200
+ "primaryKey": true,
1201
+ "notNull": true
1202
+ },
1203
+ "next_value": {
1204
+ "name": "next_value",
1205
+ "type": "integer",
1206
+ "primaryKey": false,
1207
+ "notNull": true
1208
+ }
1209
+ },
1210
+ "indexes": {},
1211
+ "foreignKeys": {},
1212
+ "compositePrimaryKeys": {},
1213
+ "uniqueConstraints": {},
1214
+ "policies": {},
1215
+ "checkConstraints": {},
1216
+ "isRLSEnabled": false
1217
+ },
1218
+ "public.orders": {
1219
+ "name": "orders",
1220
+ "schema": "",
1221
+ "columns": {
1222
+ "id": {
1223
+ "name": "id",
1224
+ "type": "text",
1225
+ "primaryKey": true,
1226
+ "notNull": true
1227
+ },
1228
+ "order_number": {
1229
+ "name": "order_number",
1230
+ "type": "text",
1231
+ "primaryKey": false,
1232
+ "notNull": true
1233
+ },
1234
+ "sequence": {
1235
+ "name": "sequence",
1236
+ "type": "integer",
1237
+ "primaryKey": false,
1238
+ "notNull": true
1239
+ },
1240
+ "customer_id": {
1241
+ "name": "customer_id",
1242
+ "type": "text",
1243
+ "primaryKey": false,
1244
+ "notNull": false
1245
+ },
1246
+ "status": {
1247
+ "name": "status",
1248
+ "type": "text",
1249
+ "primaryKey": false,
1250
+ "notNull": true,
1251
+ "default": "'pending'"
1252
+ },
1253
+ "email": {
1254
+ "name": "email",
1255
+ "type": "text",
1256
+ "primaryKey": false,
1257
+ "notNull": true
1258
+ },
1259
+ "billing_address": {
1260
+ "name": "billing_address",
1261
+ "type": "jsonb",
1262
+ "primaryKey": false,
1263
+ "notNull": true
1264
+ },
1265
+ "shipping_address": {
1266
+ "name": "shipping_address",
1267
+ "type": "jsonb",
1268
+ "primaryKey": false,
1269
+ "notNull": true
1270
+ },
1271
+ "line_items": {
1272
+ "name": "line_items",
1273
+ "type": "jsonb",
1274
+ "primaryKey": false,
1275
+ "notNull": true
1276
+ },
1277
+ "subtotal_minor": {
1278
+ "name": "subtotal_minor",
1279
+ "type": "integer",
1280
+ "primaryKey": false,
1281
+ "notNull": true
1282
+ },
1283
+ "tax_total_minor": {
1284
+ "name": "tax_total_minor",
1285
+ "type": "integer",
1286
+ "primaryKey": false,
1287
+ "notNull": true,
1288
+ "default": 0
1289
+ },
1290
+ "shipping_total_minor": {
1291
+ "name": "shipping_total_minor",
1292
+ "type": "integer",
1293
+ "primaryKey": false,
1294
+ "notNull": true,
1295
+ "default": 0
1296
+ },
1297
+ "discount_total_minor": {
1298
+ "name": "discount_total_minor",
1299
+ "type": "integer",
1300
+ "primaryKey": false,
1301
+ "notNull": true,
1302
+ "default": 0
1303
+ },
1304
+ "total_minor": {
1305
+ "name": "total_minor",
1306
+ "type": "integer",
1307
+ "primaryKey": false,
1308
+ "notNull": true
1309
+ },
1310
+ "currency": {
1311
+ "name": "currency",
1312
+ "type": "text",
1313
+ "primaryKey": false,
1314
+ "notNull": true
1315
+ },
1316
+ "notes": {
1317
+ "name": "notes",
1318
+ "type": "text",
1319
+ "primaryKey": false,
1320
+ "notNull": true,
1321
+ "default": "''"
1322
+ },
1323
+ "metadata": {
1324
+ "name": "metadata",
1325
+ "type": "jsonb",
1326
+ "primaryKey": false,
1327
+ "notNull": true,
1328
+ "default": "'{}'::jsonb"
1329
+ },
1330
+ "payment_intent_id": {
1331
+ "name": "payment_intent_id",
1332
+ "type": "text",
1333
+ "primaryKey": false,
1334
+ "notNull": false
1335
+ },
1336
+ "cart_token": {
1337
+ "name": "cart_token",
1338
+ "type": "text",
1339
+ "primaryKey": false,
1340
+ "notNull": false
1341
+ },
1342
+ "captured_minor": {
1343
+ "name": "captured_minor",
1344
+ "type": "integer",
1345
+ "primaryKey": false,
1346
+ "notNull": true,
1347
+ "default": 0
1348
+ },
1349
+ "captured_at": {
1350
+ "name": "captured_at",
1351
+ "type": "timestamp with time zone",
1352
+ "primaryKey": false,
1353
+ "notNull": false
1354
+ },
1355
+ "refunded_minor": {
1356
+ "name": "refunded_minor",
1357
+ "type": "integer",
1358
+ "primaryKey": false,
1359
+ "notNull": true,
1360
+ "default": 0
1361
+ },
1362
+ "capture_method": {
1363
+ "name": "capture_method",
1364
+ "type": "text",
1365
+ "primaryKey": false,
1366
+ "notNull": false
1367
+ },
1368
+ "created_at": {
1369
+ "name": "created_at",
1370
+ "type": "timestamp with time zone",
1371
+ "primaryKey": false,
1372
+ "notNull": true
1373
+ },
1374
+ "updated_at": {
1375
+ "name": "updated_at",
1376
+ "type": "timestamp with time zone",
1377
+ "primaryKey": false,
1378
+ "notNull": true
1379
+ }
1380
+ },
1381
+ "indexes": {
1382
+ "orders_number_unique": {
1383
+ "name": "orders_number_unique",
1384
+ "columns": [
1385
+ {
1386
+ "expression": "order_number",
1387
+ "isExpression": false,
1388
+ "asc": true,
1389
+ "nulls": "last"
1390
+ }
1391
+ ],
1392
+ "isUnique": true,
1393
+ "concurrently": false,
1394
+ "method": "btree",
1395
+ "with": {}
1396
+ },
1397
+ "orders_sequence_unique": {
1398
+ "name": "orders_sequence_unique",
1399
+ "columns": [
1400
+ {
1401
+ "expression": "sequence",
1402
+ "isExpression": false,
1403
+ "asc": true,
1404
+ "nulls": "last"
1405
+ }
1406
+ ],
1407
+ "isUnique": true,
1408
+ "concurrently": false,
1409
+ "method": "btree",
1410
+ "with": {}
1411
+ },
1412
+ "orders_customer_idx": {
1413
+ "name": "orders_customer_idx",
1414
+ "columns": [
1415
+ {
1416
+ "expression": "customer_id",
1417
+ "isExpression": false,
1418
+ "asc": true,
1419
+ "nulls": "last"
1420
+ }
1421
+ ],
1422
+ "isUnique": false,
1423
+ "concurrently": false,
1424
+ "method": "btree",
1425
+ "with": {}
1426
+ },
1427
+ "orders_status_idx": {
1428
+ "name": "orders_status_idx",
1429
+ "columns": [
1430
+ {
1431
+ "expression": "status",
1432
+ "isExpression": false,
1433
+ "asc": true,
1434
+ "nulls": "last"
1435
+ }
1436
+ ],
1437
+ "isUnique": false,
1438
+ "concurrently": false,
1439
+ "method": "btree",
1440
+ "with": {}
1441
+ },
1442
+ "orders_payment_intent_idx": {
1443
+ "name": "orders_payment_intent_idx",
1444
+ "columns": [
1445
+ {
1446
+ "expression": "payment_intent_id",
1447
+ "isExpression": false,
1448
+ "asc": true,
1449
+ "nulls": "last"
1450
+ }
1451
+ ],
1452
+ "isUnique": false,
1453
+ "concurrently": false,
1454
+ "method": "btree",
1455
+ "with": {}
1456
+ },
1457
+ "orders_pending_cart_unique": {
1458
+ "name": "orders_pending_cart_unique",
1459
+ "columns": [
1460
+ {
1461
+ "expression": "cart_token",
1462
+ "isExpression": false,
1463
+ "asc": true,
1464
+ "nulls": "last"
1465
+ }
1466
+ ],
1467
+ "isUnique": true,
1468
+ "where": "status = 'pending'",
1469
+ "concurrently": false,
1470
+ "method": "btree",
1471
+ "with": {}
1472
+ }
1473
+ },
1474
+ "foreignKeys": {},
1475
+ "compositePrimaryKeys": {},
1476
+ "uniqueConstraints": {},
1477
+ "policies": {},
1478
+ "checkConstraints": {},
1479
+ "isRLSEnabled": false
1480
+ },
1481
+ "public.processed_events": {
1482
+ "name": "processed_events",
1483
+ "schema": "",
1484
+ "columns": {
1485
+ "handler_name": {
1486
+ "name": "handler_name",
1487
+ "type": "text",
1488
+ "primaryKey": false,
1489
+ "notNull": true
1490
+ },
1491
+ "event_id": {
1492
+ "name": "event_id",
1493
+ "type": "text",
1494
+ "primaryKey": false,
1495
+ "notNull": true
1496
+ },
1497
+ "processed_at": {
1498
+ "name": "processed_at",
1499
+ "type": "timestamp with time zone",
1500
+ "primaryKey": false,
1501
+ "notNull": true
1502
+ }
1503
+ },
1504
+ "indexes": {},
1505
+ "foreignKeys": {},
1506
+ "compositePrimaryKeys": {
1507
+ "processed_events_handler_name_event_id_pk": {
1508
+ "name": "processed_events_handler_name_event_id_pk",
1509
+ "columns": [
1510
+ "handler_name",
1511
+ "event_id"
1512
+ ]
1513
+ }
1514
+ },
1515
+ "uniqueConstraints": {},
1516
+ "policies": {},
1517
+ "checkConstraints": {},
1518
+ "isRLSEnabled": false
1519
+ },
1520
+ "public.product_categories": {
1521
+ "name": "product_categories",
1522
+ "schema": "",
1523
+ "columns": {
1524
+ "product_id": {
1525
+ "name": "product_id",
1526
+ "type": "text",
1527
+ "primaryKey": false,
1528
+ "notNull": true
1529
+ },
1530
+ "category_id": {
1531
+ "name": "category_id",
1532
+ "type": "text",
1533
+ "primaryKey": false,
1534
+ "notNull": true
1535
+ }
1536
+ },
1537
+ "indexes": {
1538
+ "product_categories_category_idx": {
1539
+ "name": "product_categories_category_idx",
1540
+ "columns": [
1541
+ {
1542
+ "expression": "category_id",
1543
+ "isExpression": false,
1544
+ "asc": true,
1545
+ "nulls": "last"
1546
+ }
1547
+ ],
1548
+ "isUnique": false,
1549
+ "concurrently": false,
1550
+ "method": "btree",
1551
+ "with": {}
1552
+ }
1553
+ },
1554
+ "foreignKeys": {},
1555
+ "compositePrimaryKeys": {
1556
+ "product_categories_product_id_category_id_pk": {
1557
+ "name": "product_categories_product_id_category_id_pk",
1558
+ "columns": [
1559
+ "product_id",
1560
+ "category_id"
1561
+ ]
1562
+ }
1563
+ },
1564
+ "uniqueConstraints": {},
1565
+ "policies": {},
1566
+ "checkConstraints": {},
1567
+ "isRLSEnabled": false
1568
+ },
1569
+ "public.products": {
1570
+ "name": "products",
1571
+ "schema": "",
1572
+ "columns": {
1573
+ "id": {
1574
+ "name": "id",
1575
+ "type": "text",
1576
+ "primaryKey": true,
1577
+ "notNull": true
1578
+ },
1579
+ "slug": {
1580
+ "name": "slug",
1581
+ "type": "text",
1582
+ "primaryKey": false,
1583
+ "notNull": true
1584
+ },
1585
+ "name": {
1586
+ "name": "name",
1587
+ "type": "text",
1588
+ "primaryKey": false,
1589
+ "notNull": true
1590
+ },
1591
+ "description": {
1592
+ "name": "description",
1593
+ "type": "text",
1594
+ "primaryKey": false,
1595
+ "notNull": true,
1596
+ "default": "''"
1597
+ },
1598
+ "short_description": {
1599
+ "name": "short_description",
1600
+ "type": "text",
1601
+ "primaryKey": false,
1602
+ "notNull": true,
1603
+ "default": "''"
1604
+ },
1605
+ "status": {
1606
+ "name": "status",
1607
+ "type": "text",
1608
+ "primaryKey": false,
1609
+ "notNull": true,
1610
+ "default": "'draft'"
1611
+ },
1612
+ "type": {
1613
+ "name": "type",
1614
+ "type": "text",
1615
+ "primaryKey": false,
1616
+ "notNull": true,
1617
+ "default": "'simple'"
1618
+ },
1619
+ "seo_title": {
1620
+ "name": "seo_title",
1621
+ "type": "text",
1622
+ "primaryKey": false,
1623
+ "notNull": true,
1624
+ "default": "''"
1625
+ },
1626
+ "seo_description": {
1627
+ "name": "seo_description",
1628
+ "type": "text",
1629
+ "primaryKey": false,
1630
+ "notNull": true,
1631
+ "default": "''"
1632
+ },
1633
+ "media": {
1634
+ "name": "media",
1635
+ "type": "jsonb",
1636
+ "primaryKey": false,
1637
+ "notNull": true,
1638
+ "default": "'[]'::jsonb"
1639
+ },
1640
+ "metadata": {
1641
+ "name": "metadata",
1642
+ "type": "jsonb",
1643
+ "primaryKey": false,
1644
+ "notNull": true,
1645
+ "default": "'{}'::jsonb"
1646
+ },
1647
+ "created_at": {
1648
+ "name": "created_at",
1649
+ "type": "timestamp with time zone",
1650
+ "primaryKey": false,
1651
+ "notNull": true
1652
+ },
1653
+ "updated_at": {
1654
+ "name": "updated_at",
1655
+ "type": "timestamp with time zone",
1656
+ "primaryKey": false,
1657
+ "notNull": true
1658
+ }
1659
+ },
1660
+ "indexes": {
1661
+ "products_slug_unique": {
1662
+ "name": "products_slug_unique",
1663
+ "columns": [
1664
+ {
1665
+ "expression": "slug",
1666
+ "isExpression": false,
1667
+ "asc": true,
1668
+ "nulls": "last"
1669
+ }
1670
+ ],
1671
+ "isUnique": true,
1672
+ "concurrently": false,
1673
+ "method": "btree",
1674
+ "with": {}
1675
+ },
1676
+ "products_status_idx": {
1677
+ "name": "products_status_idx",
1678
+ "columns": [
1679
+ {
1680
+ "expression": "status",
1681
+ "isExpression": false,
1682
+ "asc": true,
1683
+ "nulls": "last"
1684
+ }
1685
+ ],
1686
+ "isUnique": false,
1687
+ "concurrently": false,
1688
+ "method": "btree",
1689
+ "with": {}
1690
+ }
1691
+ },
1692
+ "foreignKeys": {},
1693
+ "compositePrimaryKeys": {},
1694
+ "uniqueConstraints": {},
1695
+ "policies": {},
1696
+ "checkConstraints": {},
1697
+ "isRLSEnabled": false
1698
+ },
1699
+ "public.refresh_tokens": {
1700
+ "name": "refresh_tokens",
1701
+ "schema": "",
1702
+ "columns": {
1703
+ "id": {
1704
+ "name": "id",
1705
+ "type": "text",
1706
+ "primaryKey": true,
1707
+ "notNull": true
1708
+ },
1709
+ "customer_id": {
1710
+ "name": "customer_id",
1711
+ "type": "text",
1712
+ "primaryKey": false,
1713
+ "notNull": true
1714
+ },
1715
+ "token_hash": {
1716
+ "name": "token_hash",
1717
+ "type": "text",
1718
+ "primaryKey": false,
1719
+ "notNull": true
1720
+ },
1721
+ "revoked_at": {
1722
+ "name": "revoked_at",
1723
+ "type": "timestamp with time zone",
1724
+ "primaryKey": false,
1725
+ "notNull": false
1726
+ },
1727
+ "replaced_by_jti": {
1728
+ "name": "replaced_by_jti",
1729
+ "type": "text",
1730
+ "primaryKey": false,
1731
+ "notNull": false
1732
+ },
1733
+ "expires_at": {
1734
+ "name": "expires_at",
1735
+ "type": "timestamp with time zone",
1736
+ "primaryKey": false,
1737
+ "notNull": true
1738
+ },
1739
+ "created_at": {
1740
+ "name": "created_at",
1741
+ "type": "timestamp with time zone",
1742
+ "primaryKey": false,
1743
+ "notNull": true
1744
+ }
1745
+ },
1746
+ "indexes": {
1747
+ "refresh_tokens_customer_idx": {
1748
+ "name": "refresh_tokens_customer_idx",
1749
+ "columns": [
1750
+ {
1751
+ "expression": "customer_id",
1752
+ "isExpression": false,
1753
+ "asc": true,
1754
+ "nulls": "last"
1755
+ }
1756
+ ],
1757
+ "isUnique": false,
1758
+ "concurrently": false,
1759
+ "method": "btree",
1760
+ "with": {}
1761
+ }
1762
+ },
1763
+ "foreignKeys": {},
1764
+ "compositePrimaryKeys": {},
1765
+ "uniqueConstraints": {},
1766
+ "policies": {},
1767
+ "checkConstraints": {},
1768
+ "isRLSEnabled": false
1769
+ },
1770
+ "public.reviews": {
1771
+ "name": "reviews",
1772
+ "schema": "",
1773
+ "columns": {
1774
+ "id": {
1775
+ "name": "id",
1776
+ "type": "text",
1777
+ "primaryKey": true,
1778
+ "notNull": true
1779
+ },
1780
+ "product_id": {
1781
+ "name": "product_id",
1782
+ "type": "text",
1783
+ "primaryKey": false,
1784
+ "notNull": true
1785
+ },
1786
+ "customer_id": {
1787
+ "name": "customer_id",
1788
+ "type": "text",
1789
+ "primaryKey": false,
1790
+ "notNull": false
1791
+ },
1792
+ "order_id": {
1793
+ "name": "order_id",
1794
+ "type": "text",
1795
+ "primaryKey": false,
1796
+ "notNull": false
1797
+ },
1798
+ "rating": {
1799
+ "name": "rating",
1800
+ "type": "integer",
1801
+ "primaryKey": false,
1802
+ "notNull": true
1803
+ },
1804
+ "title": {
1805
+ "name": "title",
1806
+ "type": "text",
1807
+ "primaryKey": false,
1808
+ "notNull": true,
1809
+ "default": "''"
1810
+ },
1811
+ "body": {
1812
+ "name": "body",
1813
+ "type": "text",
1814
+ "primaryKey": false,
1815
+ "notNull": true,
1816
+ "default": "''"
1817
+ },
1818
+ "moderation_status": {
1819
+ "name": "moderation_status",
1820
+ "type": "text",
1821
+ "primaryKey": false,
1822
+ "notNull": true,
1823
+ "default": "'pending'"
1824
+ },
1825
+ "submitted_at": {
1826
+ "name": "submitted_at",
1827
+ "type": "timestamp with time zone",
1828
+ "primaryKey": false,
1829
+ "notNull": true
1830
+ },
1831
+ "moderated_at": {
1832
+ "name": "moderated_at",
1833
+ "type": "timestamp with time zone",
1834
+ "primaryKey": false,
1835
+ "notNull": false
1836
+ },
1837
+ "moderated_by": {
1838
+ "name": "moderated_by",
1839
+ "type": "text",
1840
+ "primaryKey": false,
1841
+ "notNull": false
1842
+ }
1843
+ },
1844
+ "indexes": {
1845
+ "reviews_product_idx": {
1846
+ "name": "reviews_product_idx",
1847
+ "columns": [
1848
+ {
1849
+ "expression": "product_id",
1850
+ "isExpression": false,
1851
+ "asc": true,
1852
+ "nulls": "last"
1853
+ }
1854
+ ],
1855
+ "isUnique": false,
1856
+ "concurrently": false,
1857
+ "method": "btree",
1858
+ "with": {}
1859
+ },
1860
+ "reviews_status_idx": {
1861
+ "name": "reviews_status_idx",
1862
+ "columns": [
1863
+ {
1864
+ "expression": "moderation_status",
1865
+ "isExpression": false,
1866
+ "asc": true,
1867
+ "nulls": "last"
1868
+ }
1869
+ ],
1870
+ "isUnique": false,
1871
+ "concurrently": false,
1872
+ "method": "btree",
1873
+ "with": {}
1874
+ }
1875
+ },
1876
+ "foreignKeys": {},
1877
+ "compositePrimaryKeys": {},
1878
+ "uniqueConstraints": {},
1879
+ "policies": {},
1880
+ "checkConstraints": {},
1881
+ "isRLSEnabled": false
1882
+ },
1883
+ "public.settings": {
1884
+ "name": "settings",
1885
+ "schema": "",
1886
+ "columns": {
1887
+ "slot": {
1888
+ "name": "slot",
1889
+ "type": "text",
1890
+ "primaryKey": false,
1891
+ "notNull": true
1892
+ },
1893
+ "path": {
1894
+ "name": "path",
1895
+ "type": "text",
1896
+ "primaryKey": false,
1897
+ "notNull": true
1898
+ },
1899
+ "ciphertext": {
1900
+ "name": "ciphertext",
1901
+ "type": "bytea",
1902
+ "primaryKey": false,
1903
+ "notNull": false
1904
+ },
1905
+ "plain": {
1906
+ "name": "plain",
1907
+ "type": "text",
1908
+ "primaryKey": false,
1909
+ "notNull": false
1910
+ },
1911
+ "iv": {
1912
+ "name": "iv",
1913
+ "type": "bytea",
1914
+ "primaryKey": false,
1915
+ "notNull": false
1916
+ },
1917
+ "tag": {
1918
+ "name": "tag",
1919
+ "type": "bytea",
1920
+ "primaryKey": false,
1921
+ "notNull": false
1922
+ },
1923
+ "key_id": {
1924
+ "name": "key_id",
1925
+ "type": "text",
1926
+ "primaryKey": false,
1927
+ "notNull": false
1928
+ },
1929
+ "updated_at": {
1930
+ "name": "updated_at",
1931
+ "type": "timestamp with time zone",
1932
+ "primaryKey": false,
1933
+ "notNull": true
1934
+ },
1935
+ "updated_by": {
1936
+ "name": "updated_by",
1937
+ "type": "text",
1938
+ "primaryKey": false,
1939
+ "notNull": false
1940
+ }
1941
+ },
1942
+ "indexes": {},
1943
+ "foreignKeys": {},
1944
+ "compositePrimaryKeys": {
1945
+ "settings_slot_path_pk": {
1946
+ "name": "settings_slot_path_pk",
1947
+ "columns": [
1948
+ "slot",
1949
+ "path"
1950
+ ]
1951
+ }
1952
+ },
1953
+ "uniqueConstraints": {},
1954
+ "policies": {},
1955
+ "checkConstraints": {
1956
+ "settings_one_value": {
1957
+ "name": "settings_one_value",
1958
+ "value": "(\"settings\".\"ciphertext\" IS NULL) <> (\"settings\".\"plain\" IS NULL) AND (\"settings\".\"ciphertext\" IS NULL OR (\"settings\".\"iv\" IS NOT NULL AND \"settings\".\"tag\" IS NOT NULL AND \"settings\".\"key_id\" IS NOT NULL))"
1959
+ }
1960
+ },
1961
+ "isRLSEnabled": false
1962
+ },
1963
+ "public.stock_adjustments": {
1964
+ "name": "stock_adjustments",
1965
+ "schema": "",
1966
+ "columns": {
1967
+ "id": {
1968
+ "name": "id",
1969
+ "type": "text",
1970
+ "primaryKey": true,
1971
+ "notNull": true
1972
+ },
1973
+ "variant_id": {
1974
+ "name": "variant_id",
1975
+ "type": "text",
1976
+ "primaryKey": false,
1977
+ "notNull": true
1978
+ },
1979
+ "adjustment": {
1980
+ "name": "adjustment",
1981
+ "type": "integer",
1982
+ "primaryKey": false,
1983
+ "notNull": true
1984
+ },
1985
+ "reason": {
1986
+ "name": "reason",
1987
+ "type": "text",
1988
+ "primaryKey": false,
1989
+ "notNull": true
1990
+ },
1991
+ "actor": {
1992
+ "name": "actor",
1993
+ "type": "text",
1994
+ "primaryKey": false,
1995
+ "notNull": true
1996
+ },
1997
+ "previous_qty": {
1998
+ "name": "previous_qty",
1999
+ "type": "integer",
2000
+ "primaryKey": false,
2001
+ "notNull": true
2002
+ },
2003
+ "new_qty": {
2004
+ "name": "new_qty",
2005
+ "type": "integer",
2006
+ "primaryKey": false,
2007
+ "notNull": true
2008
+ },
2009
+ "timestamp": {
2010
+ "name": "timestamp",
2011
+ "type": "timestamp with time zone",
2012
+ "primaryKey": false,
2013
+ "notNull": true
2014
+ }
2015
+ },
2016
+ "indexes": {
2017
+ "stock_adjustments_variant_idx": {
2018
+ "name": "stock_adjustments_variant_idx",
2019
+ "columns": [
2020
+ {
2021
+ "expression": "variant_id",
2022
+ "isExpression": false,
2023
+ "asc": true,
2024
+ "nulls": "last"
2025
+ }
2026
+ ],
2027
+ "isUnique": false,
2028
+ "concurrently": false,
2029
+ "method": "btree",
2030
+ "with": {}
2031
+ }
2032
+ },
2033
+ "foreignKeys": {},
2034
+ "compositePrimaryKeys": {},
2035
+ "uniqueConstraints": {},
2036
+ "policies": {},
2037
+ "checkConstraints": {},
2038
+ "isRLSEnabled": false
2039
+ },
2040
+ "public.variants": {
2041
+ "name": "variants",
2042
+ "schema": "",
2043
+ "columns": {
2044
+ "id": {
2045
+ "name": "id",
2046
+ "type": "text",
2047
+ "primaryKey": true,
2048
+ "notNull": true
2049
+ },
2050
+ "product_id": {
2051
+ "name": "product_id",
2052
+ "type": "text",
2053
+ "primaryKey": false,
2054
+ "notNull": true
2055
+ },
2056
+ "sku": {
2057
+ "name": "sku",
2058
+ "type": "text",
2059
+ "primaryKey": false,
2060
+ "notNull": true
2061
+ },
2062
+ "name": {
2063
+ "name": "name",
2064
+ "type": "text",
2065
+ "primaryKey": false,
2066
+ "notNull": true,
2067
+ "default": "''"
2068
+ },
2069
+ "price_minor": {
2070
+ "name": "price_minor",
2071
+ "type": "integer",
2072
+ "primaryKey": false,
2073
+ "notNull": true
2074
+ },
2075
+ "compare_at_price_minor": {
2076
+ "name": "compare_at_price_minor",
2077
+ "type": "integer",
2078
+ "primaryKey": false,
2079
+ "notNull": false
2080
+ },
2081
+ "weight_grams": {
2082
+ "name": "weight_grams",
2083
+ "type": "integer",
2084
+ "primaryKey": false,
2085
+ "notNull": false
2086
+ },
2087
+ "dimensions": {
2088
+ "name": "dimensions",
2089
+ "type": "jsonb",
2090
+ "primaryKey": false,
2091
+ "notNull": false
2092
+ },
2093
+ "stock": {
2094
+ "name": "stock",
2095
+ "type": "integer",
2096
+ "primaryKey": false,
2097
+ "notNull": true,
2098
+ "default": 0
2099
+ },
2100
+ "low_stock_threshold": {
2101
+ "name": "low_stock_threshold",
2102
+ "type": "integer",
2103
+ "primaryKey": false,
2104
+ "notNull": true,
2105
+ "default": 0
2106
+ },
2107
+ "options": {
2108
+ "name": "options",
2109
+ "type": "jsonb",
2110
+ "primaryKey": false,
2111
+ "notNull": true,
2112
+ "default": "'[]'::jsonb"
2113
+ },
2114
+ "status": {
2115
+ "name": "status",
2116
+ "type": "text",
2117
+ "primaryKey": false,
2118
+ "notNull": true,
2119
+ "default": "'active'"
2120
+ },
2121
+ "created_at": {
2122
+ "name": "created_at",
2123
+ "type": "timestamp with time zone",
2124
+ "primaryKey": false,
2125
+ "notNull": true
2126
+ },
2127
+ "updated_at": {
2128
+ "name": "updated_at",
2129
+ "type": "timestamp with time zone",
2130
+ "primaryKey": false,
2131
+ "notNull": true
2132
+ }
2133
+ },
2134
+ "indexes": {
2135
+ "variants_sku_unique": {
2136
+ "name": "variants_sku_unique",
2137
+ "columns": [
2138
+ {
2139
+ "expression": "sku",
2140
+ "isExpression": false,
2141
+ "asc": true,
2142
+ "nulls": "last"
2143
+ }
2144
+ ],
2145
+ "isUnique": true,
2146
+ "concurrently": false,
2147
+ "method": "btree",
2148
+ "with": {}
2149
+ },
2150
+ "variants_product_idx": {
2151
+ "name": "variants_product_idx",
2152
+ "columns": [
2153
+ {
2154
+ "expression": "product_id",
2155
+ "isExpression": false,
2156
+ "asc": true,
2157
+ "nulls": "last"
2158
+ }
2159
+ ],
2160
+ "isUnique": false,
2161
+ "concurrently": false,
2162
+ "method": "btree",
2163
+ "with": {}
2164
+ }
2165
+ },
2166
+ "foreignKeys": {},
2167
+ "compositePrimaryKeys": {},
2168
+ "uniqueConstraints": {},
2169
+ "policies": {},
2170
+ "checkConstraints": {},
2171
+ "isRLSEnabled": false
2172
+ }
2173
+ },
2174
+ "enums": {},
2175
+ "schemas": {},
2176
+ "sequences": {},
2177
+ "roles": {},
2178
+ "policies": {},
2179
+ "views": {},
2180
+ "_meta": {
2181
+ "columns": {},
2182
+ "schemas": {},
2183
+ "tables": {}
2184
+ }
2185
+ }