@nymbalhq/platform 1.3.0 → 1.5.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 (41) hide show
  1. package/dist/{chunk-QN56IB4G.js → chunk-NNDIAIT6.js} +187 -5
  2. package/dist/chunk-NNDIAIT6.js.map +1 -0
  3. package/dist/{chunk-2PLYK5RU.js → chunk-TRLERRUI.js} +3559 -509
  4. package/dist/chunk-TRLERRUI.js.map +1 -0
  5. package/dist/db/schema/index.d.ts +5276 -3224
  6. package/dist/db/schema/index.js +1 -1
  7. package/dist/index.d.ts +428 -81
  8. package/dist/index.js +1200 -2254
  9. package/dist/index.js.map +1 -1
  10. package/dist/register-SBGUI2L5.js +8 -0
  11. package/migrations/postgres/0013_order_access_keys.sql +11 -0
  12. package/migrations/postgres/0014_alert_subscriptions.sql +22 -0
  13. package/migrations/postgres/0015_events_retry_at.sql +1 -0
  14. package/migrations/postgres/0016_email_suppressions.sql +7 -0
  15. package/migrations/postgres/0017_order_shipments.sql +14 -0
  16. package/migrations/postgres/0018_order_key_expiry.sql +8 -0
  17. package/migrations/postgres/meta/0013_snapshot.json +2000 -0
  18. package/migrations/postgres/meta/0014_snapshot.json +2185 -0
  19. package/migrations/postgres/meta/0015_snapshot.json +2191 -0
  20. package/migrations/postgres/meta/0016_snapshot.json +2233 -0
  21. package/migrations/postgres/meta/0017_snapshot.json +2300 -0
  22. package/migrations/postgres/meta/0018_snapshot.json +2306 -0
  23. package/migrations/postgres/meta/_journal.json +42 -0
  24. package/migrations/sqlite/0013_order_access_keys.sql +11 -0
  25. package/migrations/sqlite/0014_alert_subscriptions.sql +22 -0
  26. package/migrations/sqlite/0015_events_retry_at.sql +1 -0
  27. package/migrations/sqlite/0016_email_suppressions.sql +7 -0
  28. package/migrations/sqlite/0017_order_shipments.sql +9 -0
  29. package/migrations/sqlite/0018_order_key_expiry.sql +25 -0
  30. package/migrations/sqlite/meta/0013_snapshot.json +1788 -0
  31. package/migrations/sqlite/meta/0014_snapshot.json +1931 -0
  32. package/migrations/sqlite/meta/0015_snapshot.json +1938 -0
  33. package/migrations/sqlite/meta/0016_snapshot.json +1981 -0
  34. package/migrations/sqlite/meta/0017_snapshot.json +2041 -0
  35. package/migrations/sqlite/meta/0018_snapshot.json +2048 -0
  36. package/migrations/sqlite/meta/_journal.json +42 -0
  37. package/package.json +17 -47
  38. package/dist/chunk-2PLYK5RU.js.map +0 -1
  39. package/dist/chunk-QN56IB4G.js.map +0 -1
  40. package/dist/register-UUQ64HZP.js +0 -8
  41. /package/dist/{register-UUQ64HZP.js.map → register-SBGUI2L5.js.map} +0 -0
@@ -0,0 +1,2233 @@
1
+ {
2
+ "id": "17bd36ef-f02f-4d5a-a97c-c439c1a8ebb4",
3
+ "prevId": "e2adb087-8b57-4d47-9ccf-8d5f98127836",
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.email_suppressions": {
665
+ "name": "email_suppressions",
666
+ "schema": "",
667
+ "columns": {
668
+ "email": {
669
+ "name": "email",
670
+ "type": "text",
671
+ "primaryKey": true,
672
+ "notNull": true
673
+ },
674
+ "reason": {
675
+ "name": "reason",
676
+ "type": "text",
677
+ "primaryKey": false,
678
+ "notNull": true
679
+ },
680
+ "event_id": {
681
+ "name": "event_id",
682
+ "type": "text",
683
+ "primaryKey": false,
684
+ "notNull": true
685
+ },
686
+ "created_at": {
687
+ "name": "created_at",
688
+ "type": "timestamp with time zone",
689
+ "primaryKey": false,
690
+ "notNull": true
691
+ }
692
+ },
693
+ "indexes": {},
694
+ "foreignKeys": {},
695
+ "compositePrimaryKeys": {},
696
+ "uniqueConstraints": {},
697
+ "policies": {},
698
+ "checkConstraints": {
699
+ "email_suppressions_reason": {
700
+ "name": "email_suppressions_reason",
701
+ "value": "\"email_suppressions\".\"reason\" IN ('hard_bounce', 'complaint')"
702
+ }
703
+ },
704
+ "isRLSEnabled": false
705
+ },
706
+ "public.events": {
707
+ "name": "events",
708
+ "schema": "",
709
+ "columns": {
710
+ "seq": {
711
+ "name": "seq",
712
+ "type": "bigserial",
713
+ "primaryKey": true,
714
+ "notNull": true
715
+ },
716
+ "id": {
717
+ "name": "id",
718
+ "type": "text",
719
+ "primaryKey": false,
720
+ "notNull": true
721
+ },
722
+ "type": {
723
+ "name": "type",
724
+ "type": "text",
725
+ "primaryKey": false,
726
+ "notNull": true
727
+ },
728
+ "envelope": {
729
+ "name": "envelope",
730
+ "type": "jsonb",
731
+ "primaryKey": false,
732
+ "notNull": true
733
+ },
734
+ "correlation_id": {
735
+ "name": "correlation_id",
736
+ "type": "text",
737
+ "primaryKey": false,
738
+ "notNull": true
739
+ },
740
+ "created_at": {
741
+ "name": "created_at",
742
+ "type": "timestamp with time zone",
743
+ "primaryKey": false,
744
+ "notNull": true
745
+ },
746
+ "subject_type": {
747
+ "name": "subject_type",
748
+ "type": "text",
749
+ "primaryKey": false,
750
+ "notNull": false
751
+ },
752
+ "subject_id": {
753
+ "name": "subject_id",
754
+ "type": "text",
755
+ "primaryKey": false,
756
+ "notNull": false
757
+ },
758
+ "delivered_at": {
759
+ "name": "delivered_at",
760
+ "type": "timestamp with time zone",
761
+ "primaryKey": false,
762
+ "notNull": false
763
+ },
764
+ "attempts": {
765
+ "name": "attempts",
766
+ "type": "integer",
767
+ "primaryKey": false,
768
+ "notNull": true,
769
+ "default": 0
770
+ },
771
+ "dead_at": {
772
+ "name": "dead_at",
773
+ "type": "timestamp with time zone",
774
+ "primaryKey": false,
775
+ "notNull": false
776
+ },
777
+ "retry_at": {
778
+ "name": "retry_at",
779
+ "type": "timestamp with time zone",
780
+ "primaryKey": false,
781
+ "notNull": false
782
+ }
783
+ },
784
+ "indexes": {
785
+ "events_id_unique": {
786
+ "name": "events_id_unique",
787
+ "columns": [
788
+ {
789
+ "expression": "id",
790
+ "isExpression": false,
791
+ "asc": true,
792
+ "nulls": "last"
793
+ }
794
+ ],
795
+ "isUnique": true,
796
+ "concurrently": false,
797
+ "method": "btree",
798
+ "with": {}
799
+ },
800
+ "events_undelivered_idx": {
801
+ "name": "events_undelivered_idx",
802
+ "columns": [
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_correlation_idx": {
822
+ "name": "events_correlation_idx",
823
+ "columns": [
824
+ {
825
+ "expression": "correlation_id",
826
+ "isExpression": false,
827
+ "asc": true,
828
+ "nulls": "last"
829
+ },
830
+ {
831
+ "expression": "seq",
832
+ "isExpression": false,
833
+ "asc": true,
834
+ "nulls": "last"
835
+ }
836
+ ],
837
+ "isUnique": false,
838
+ "concurrently": false,
839
+ "method": "btree",
840
+ "with": {}
841
+ },
842
+ "events_catch_up_idx": {
843
+ "name": "events_catch_up_idx",
844
+ "columns": [
845
+ {
846
+ "expression": "dead_at",
847
+ "isExpression": false,
848
+ "asc": true,
849
+ "nulls": "last"
850
+ },
851
+ {
852
+ "expression": "delivered_at",
853
+ "isExpression": false,
854
+ "asc": true,
855
+ "nulls": "last"
856
+ },
857
+ {
858
+ "expression": "seq",
859
+ "isExpression": false,
860
+ "asc": true,
861
+ "nulls": "last"
862
+ }
863
+ ],
864
+ "isUnique": false,
865
+ "concurrently": false,
866
+ "method": "btree",
867
+ "with": {}
868
+ },
869
+ "events_subject_idx": {
870
+ "name": "events_subject_idx",
871
+ "columns": [
872
+ {
873
+ "expression": "subject_type",
874
+ "isExpression": false,
875
+ "asc": true,
876
+ "nulls": "last"
877
+ },
878
+ {
879
+ "expression": "subject_id",
880
+ "isExpression": false,
881
+ "asc": true,
882
+ "nulls": "last"
883
+ },
884
+ {
885
+ "expression": "seq",
886
+ "isExpression": false,
887
+ "asc": true,
888
+ "nulls": "last"
889
+ }
890
+ ],
891
+ "isUnique": false,
892
+ "concurrently": false,
893
+ "method": "btree",
894
+ "with": {}
895
+ }
896
+ },
897
+ "foreignKeys": {},
898
+ "compositePrimaryKeys": {},
899
+ "uniqueConstraints": {},
900
+ "policies": {},
901
+ "checkConstraints": {},
902
+ "isRLSEnabled": false
903
+ },
904
+ "public.inventory_reservations": {
905
+ "name": "inventory_reservations",
906
+ "schema": "",
907
+ "columns": {
908
+ "reservation_id": {
909
+ "name": "reservation_id",
910
+ "type": "text",
911
+ "primaryKey": true,
912
+ "notNull": true
913
+ },
914
+ "variant_id": {
915
+ "name": "variant_id",
916
+ "type": "text",
917
+ "primaryKey": false,
918
+ "notNull": true
919
+ },
920
+ "qty": {
921
+ "name": "qty",
922
+ "type": "integer",
923
+ "primaryKey": false,
924
+ "notNull": true
925
+ },
926
+ "order_ref": {
927
+ "name": "order_ref",
928
+ "type": "text",
929
+ "primaryKey": false,
930
+ "notNull": false
931
+ },
932
+ "expires_at": {
933
+ "name": "expires_at",
934
+ "type": "timestamp with time zone",
935
+ "primaryKey": false,
936
+ "notNull": true
937
+ },
938
+ "created_at": {
939
+ "name": "created_at",
940
+ "type": "timestamp with time zone",
941
+ "primaryKey": false,
942
+ "notNull": true
943
+ }
944
+ },
945
+ "indexes": {
946
+ "inv_reservations_variant_idx": {
947
+ "name": "inv_reservations_variant_idx",
948
+ "columns": [
949
+ {
950
+ "expression": "variant_id",
951
+ "isExpression": false,
952
+ "asc": true,
953
+ "nulls": "last"
954
+ }
955
+ ],
956
+ "isUnique": false,
957
+ "concurrently": false,
958
+ "method": "btree",
959
+ "with": {}
960
+ },
961
+ "inv_reservations_expires_idx": {
962
+ "name": "inv_reservations_expires_idx",
963
+ "columns": [
964
+ {
965
+ "expression": "expires_at",
966
+ "isExpression": false,
967
+ "asc": true,
968
+ "nulls": "last"
969
+ }
970
+ ],
971
+ "isUnique": false,
972
+ "concurrently": false,
973
+ "method": "btree",
974
+ "with": {}
975
+ }
976
+ },
977
+ "foreignKeys": {},
978
+ "compositePrimaryKeys": {},
979
+ "uniqueConstraints": {},
980
+ "policies": {},
981
+ "checkConstraints": {},
982
+ "isRLSEnabled": false
983
+ },
984
+ "public.order_access_keys": {
985
+ "name": "order_access_keys",
986
+ "schema": "",
987
+ "columns": {
988
+ "id": {
989
+ "name": "id",
990
+ "type": "text",
991
+ "primaryKey": true,
992
+ "notNull": true
993
+ },
994
+ "order_id": {
995
+ "name": "order_id",
996
+ "type": "text",
997
+ "primaryKey": false,
998
+ "notNull": true
999
+ },
1000
+ "key_hash": {
1001
+ "name": "key_hash",
1002
+ "type": "text",
1003
+ "primaryKey": false,
1004
+ "notNull": true
1005
+ },
1006
+ "purpose": {
1007
+ "name": "purpose",
1008
+ "type": "text",
1009
+ "primaryKey": false,
1010
+ "notNull": true
1011
+ },
1012
+ "created_at": {
1013
+ "name": "created_at",
1014
+ "type": "timestamp with time zone",
1015
+ "primaryKey": false,
1016
+ "notNull": true
1017
+ }
1018
+ },
1019
+ "indexes": {
1020
+ "order_access_keys_key_hash_idx": {
1021
+ "name": "order_access_keys_key_hash_idx",
1022
+ "columns": [
1023
+ {
1024
+ "expression": "key_hash",
1025
+ "isExpression": false,
1026
+ "asc": true,
1027
+ "nulls": "last"
1028
+ }
1029
+ ],
1030
+ "isUnique": true,
1031
+ "concurrently": false,
1032
+ "method": "btree",
1033
+ "with": {}
1034
+ },
1035
+ "order_access_keys_order_idx": {
1036
+ "name": "order_access_keys_order_idx",
1037
+ "columns": [
1038
+ {
1039
+ "expression": "order_id",
1040
+ "isExpression": false,
1041
+ "asc": true,
1042
+ "nulls": "last"
1043
+ }
1044
+ ],
1045
+ "isUnique": false,
1046
+ "concurrently": false,
1047
+ "method": "btree",
1048
+ "with": {}
1049
+ }
1050
+ },
1051
+ "foreignKeys": {},
1052
+ "compositePrimaryKeys": {},
1053
+ "uniqueConstraints": {},
1054
+ "policies": {},
1055
+ "checkConstraints": {},
1056
+ "isRLSEnabled": false
1057
+ },
1058
+ "public.order_history": {
1059
+ "name": "order_history",
1060
+ "schema": "",
1061
+ "columns": {
1062
+ "id": {
1063
+ "name": "id",
1064
+ "type": "text",
1065
+ "primaryKey": true,
1066
+ "notNull": true
1067
+ },
1068
+ "order_id": {
1069
+ "name": "order_id",
1070
+ "type": "text",
1071
+ "primaryKey": false,
1072
+ "notNull": true
1073
+ },
1074
+ "from_status": {
1075
+ "name": "from_status",
1076
+ "type": "text",
1077
+ "primaryKey": false,
1078
+ "notNull": false
1079
+ },
1080
+ "to_status": {
1081
+ "name": "to_status",
1082
+ "type": "text",
1083
+ "primaryKey": false,
1084
+ "notNull": true
1085
+ },
1086
+ "actor": {
1087
+ "name": "actor",
1088
+ "type": "text",
1089
+ "primaryKey": false,
1090
+ "notNull": true
1091
+ },
1092
+ "note": {
1093
+ "name": "note",
1094
+ "type": "text",
1095
+ "primaryKey": false,
1096
+ "notNull": true,
1097
+ "default": "''"
1098
+ },
1099
+ "timestamp": {
1100
+ "name": "timestamp",
1101
+ "type": "timestamp with time zone",
1102
+ "primaryKey": false,
1103
+ "notNull": true
1104
+ }
1105
+ },
1106
+ "indexes": {
1107
+ "order_history_order_idx": {
1108
+ "name": "order_history_order_idx",
1109
+ "columns": [
1110
+ {
1111
+ "expression": "order_id",
1112
+ "isExpression": false,
1113
+ "asc": true,
1114
+ "nulls": "last"
1115
+ }
1116
+ ],
1117
+ "isUnique": false,
1118
+ "concurrently": false,
1119
+ "method": "btree",
1120
+ "with": {}
1121
+ }
1122
+ },
1123
+ "foreignKeys": {},
1124
+ "compositePrimaryKeys": {},
1125
+ "uniqueConstraints": {},
1126
+ "policies": {},
1127
+ "checkConstraints": {},
1128
+ "isRLSEnabled": false
1129
+ },
1130
+ "public.order_refunds": {
1131
+ "name": "order_refunds",
1132
+ "schema": "",
1133
+ "columns": {
1134
+ "id": {
1135
+ "name": "id",
1136
+ "type": "text",
1137
+ "primaryKey": true,
1138
+ "notNull": true
1139
+ },
1140
+ "order_id": {
1141
+ "name": "order_id",
1142
+ "type": "text",
1143
+ "primaryKey": false,
1144
+ "notNull": true
1145
+ },
1146
+ "amount_minor": {
1147
+ "name": "amount_minor",
1148
+ "type": "integer",
1149
+ "primaryKey": false,
1150
+ "notNull": true
1151
+ },
1152
+ "currency": {
1153
+ "name": "currency",
1154
+ "type": "text",
1155
+ "primaryKey": false,
1156
+ "notNull": true
1157
+ },
1158
+ "provider_refund_id": {
1159
+ "name": "provider_refund_id",
1160
+ "type": "text",
1161
+ "primaryKey": false,
1162
+ "notNull": false
1163
+ },
1164
+ "status": {
1165
+ "name": "status",
1166
+ "type": "text",
1167
+ "primaryKey": false,
1168
+ "notNull": true,
1169
+ "default": "'pending'"
1170
+ },
1171
+ "reason": {
1172
+ "name": "reason",
1173
+ "type": "text",
1174
+ "primaryKey": false,
1175
+ "notNull": false
1176
+ },
1177
+ "actor": {
1178
+ "name": "actor",
1179
+ "type": "text",
1180
+ "primaryKey": false,
1181
+ "notNull": true
1182
+ },
1183
+ "created_at": {
1184
+ "name": "created_at",
1185
+ "type": "timestamp with time zone",
1186
+ "primaryKey": false,
1187
+ "notNull": true
1188
+ },
1189
+ "request_id": {
1190
+ "name": "request_id",
1191
+ "type": "text",
1192
+ "primaryKey": false,
1193
+ "notNull": false
1194
+ }
1195
+ },
1196
+ "indexes": {
1197
+ "order_refunds_order_idx": {
1198
+ "name": "order_refunds_order_idx",
1199
+ "columns": [
1200
+ {
1201
+ "expression": "order_id",
1202
+ "isExpression": false,
1203
+ "asc": true,
1204
+ "nulls": "last"
1205
+ }
1206
+ ],
1207
+ "isUnique": false,
1208
+ "concurrently": false,
1209
+ "method": "btree",
1210
+ "with": {}
1211
+ },
1212
+ "order_refunds_order_request_idx": {
1213
+ "name": "order_refunds_order_request_idx",
1214
+ "columns": [
1215
+ {
1216
+ "expression": "order_id",
1217
+ "isExpression": false,
1218
+ "asc": true,
1219
+ "nulls": "last"
1220
+ },
1221
+ {
1222
+ "expression": "request_id",
1223
+ "isExpression": false,
1224
+ "asc": true,
1225
+ "nulls": "last"
1226
+ }
1227
+ ],
1228
+ "isUnique": true,
1229
+ "concurrently": false,
1230
+ "method": "btree",
1231
+ "with": {}
1232
+ }
1233
+ },
1234
+ "foreignKeys": {},
1235
+ "compositePrimaryKeys": {},
1236
+ "uniqueConstraints": {},
1237
+ "policies": {},
1238
+ "checkConstraints": {},
1239
+ "isRLSEnabled": false
1240
+ },
1241
+ "public.order_sequences": {
1242
+ "name": "order_sequences",
1243
+ "schema": "",
1244
+ "columns": {
1245
+ "id": {
1246
+ "name": "id",
1247
+ "type": "integer",
1248
+ "primaryKey": true,
1249
+ "notNull": true
1250
+ },
1251
+ "next_value": {
1252
+ "name": "next_value",
1253
+ "type": "integer",
1254
+ "primaryKey": false,
1255
+ "notNull": true
1256
+ }
1257
+ },
1258
+ "indexes": {},
1259
+ "foreignKeys": {},
1260
+ "compositePrimaryKeys": {},
1261
+ "uniqueConstraints": {},
1262
+ "policies": {},
1263
+ "checkConstraints": {},
1264
+ "isRLSEnabled": false
1265
+ },
1266
+ "public.orders": {
1267
+ "name": "orders",
1268
+ "schema": "",
1269
+ "columns": {
1270
+ "id": {
1271
+ "name": "id",
1272
+ "type": "text",
1273
+ "primaryKey": true,
1274
+ "notNull": true
1275
+ },
1276
+ "order_number": {
1277
+ "name": "order_number",
1278
+ "type": "text",
1279
+ "primaryKey": false,
1280
+ "notNull": true
1281
+ },
1282
+ "sequence": {
1283
+ "name": "sequence",
1284
+ "type": "integer",
1285
+ "primaryKey": false,
1286
+ "notNull": true
1287
+ },
1288
+ "customer_id": {
1289
+ "name": "customer_id",
1290
+ "type": "text",
1291
+ "primaryKey": false,
1292
+ "notNull": false
1293
+ },
1294
+ "status": {
1295
+ "name": "status",
1296
+ "type": "text",
1297
+ "primaryKey": false,
1298
+ "notNull": true,
1299
+ "default": "'pending'"
1300
+ },
1301
+ "email": {
1302
+ "name": "email",
1303
+ "type": "text",
1304
+ "primaryKey": false,
1305
+ "notNull": true
1306
+ },
1307
+ "billing_address": {
1308
+ "name": "billing_address",
1309
+ "type": "jsonb",
1310
+ "primaryKey": false,
1311
+ "notNull": true
1312
+ },
1313
+ "shipping_address": {
1314
+ "name": "shipping_address",
1315
+ "type": "jsonb",
1316
+ "primaryKey": false,
1317
+ "notNull": true
1318
+ },
1319
+ "line_items": {
1320
+ "name": "line_items",
1321
+ "type": "jsonb",
1322
+ "primaryKey": false,
1323
+ "notNull": true
1324
+ },
1325
+ "subtotal_minor": {
1326
+ "name": "subtotal_minor",
1327
+ "type": "integer",
1328
+ "primaryKey": false,
1329
+ "notNull": true
1330
+ },
1331
+ "tax_total_minor": {
1332
+ "name": "tax_total_minor",
1333
+ "type": "integer",
1334
+ "primaryKey": false,
1335
+ "notNull": true,
1336
+ "default": 0
1337
+ },
1338
+ "shipping_total_minor": {
1339
+ "name": "shipping_total_minor",
1340
+ "type": "integer",
1341
+ "primaryKey": false,
1342
+ "notNull": true,
1343
+ "default": 0
1344
+ },
1345
+ "discount_total_minor": {
1346
+ "name": "discount_total_minor",
1347
+ "type": "integer",
1348
+ "primaryKey": false,
1349
+ "notNull": true,
1350
+ "default": 0
1351
+ },
1352
+ "total_minor": {
1353
+ "name": "total_minor",
1354
+ "type": "integer",
1355
+ "primaryKey": false,
1356
+ "notNull": true
1357
+ },
1358
+ "currency": {
1359
+ "name": "currency",
1360
+ "type": "text",
1361
+ "primaryKey": false,
1362
+ "notNull": true
1363
+ },
1364
+ "notes": {
1365
+ "name": "notes",
1366
+ "type": "text",
1367
+ "primaryKey": false,
1368
+ "notNull": true,
1369
+ "default": "''"
1370
+ },
1371
+ "metadata": {
1372
+ "name": "metadata",
1373
+ "type": "jsonb",
1374
+ "primaryKey": false,
1375
+ "notNull": true,
1376
+ "default": "'{}'::jsonb"
1377
+ },
1378
+ "payment_intent_id": {
1379
+ "name": "payment_intent_id",
1380
+ "type": "text",
1381
+ "primaryKey": false,
1382
+ "notNull": false
1383
+ },
1384
+ "cart_token": {
1385
+ "name": "cart_token",
1386
+ "type": "text",
1387
+ "primaryKey": false,
1388
+ "notNull": false
1389
+ },
1390
+ "captured_minor": {
1391
+ "name": "captured_minor",
1392
+ "type": "integer",
1393
+ "primaryKey": false,
1394
+ "notNull": true,
1395
+ "default": 0
1396
+ },
1397
+ "captured_at": {
1398
+ "name": "captured_at",
1399
+ "type": "timestamp with time zone",
1400
+ "primaryKey": false,
1401
+ "notNull": false
1402
+ },
1403
+ "refunded_minor": {
1404
+ "name": "refunded_minor",
1405
+ "type": "integer",
1406
+ "primaryKey": false,
1407
+ "notNull": true,
1408
+ "default": 0
1409
+ },
1410
+ "capture_method": {
1411
+ "name": "capture_method",
1412
+ "type": "text",
1413
+ "primaryKey": false,
1414
+ "notNull": false
1415
+ },
1416
+ "created_at": {
1417
+ "name": "created_at",
1418
+ "type": "timestamp with time zone",
1419
+ "primaryKey": false,
1420
+ "notNull": true
1421
+ },
1422
+ "updated_at": {
1423
+ "name": "updated_at",
1424
+ "type": "timestamp with time zone",
1425
+ "primaryKey": false,
1426
+ "notNull": true
1427
+ }
1428
+ },
1429
+ "indexes": {
1430
+ "orders_number_unique": {
1431
+ "name": "orders_number_unique",
1432
+ "columns": [
1433
+ {
1434
+ "expression": "order_number",
1435
+ "isExpression": false,
1436
+ "asc": true,
1437
+ "nulls": "last"
1438
+ }
1439
+ ],
1440
+ "isUnique": true,
1441
+ "concurrently": false,
1442
+ "method": "btree",
1443
+ "with": {}
1444
+ },
1445
+ "orders_sequence_unique": {
1446
+ "name": "orders_sequence_unique",
1447
+ "columns": [
1448
+ {
1449
+ "expression": "sequence",
1450
+ "isExpression": false,
1451
+ "asc": true,
1452
+ "nulls": "last"
1453
+ }
1454
+ ],
1455
+ "isUnique": true,
1456
+ "concurrently": false,
1457
+ "method": "btree",
1458
+ "with": {}
1459
+ },
1460
+ "orders_customer_idx": {
1461
+ "name": "orders_customer_idx",
1462
+ "columns": [
1463
+ {
1464
+ "expression": "customer_id",
1465
+ "isExpression": false,
1466
+ "asc": true,
1467
+ "nulls": "last"
1468
+ }
1469
+ ],
1470
+ "isUnique": false,
1471
+ "concurrently": false,
1472
+ "method": "btree",
1473
+ "with": {}
1474
+ },
1475
+ "orders_status_idx": {
1476
+ "name": "orders_status_idx",
1477
+ "columns": [
1478
+ {
1479
+ "expression": "status",
1480
+ "isExpression": false,
1481
+ "asc": true,
1482
+ "nulls": "last"
1483
+ }
1484
+ ],
1485
+ "isUnique": false,
1486
+ "concurrently": false,
1487
+ "method": "btree",
1488
+ "with": {}
1489
+ },
1490
+ "orders_payment_intent_idx": {
1491
+ "name": "orders_payment_intent_idx",
1492
+ "columns": [
1493
+ {
1494
+ "expression": "payment_intent_id",
1495
+ "isExpression": false,
1496
+ "asc": true,
1497
+ "nulls": "last"
1498
+ }
1499
+ ],
1500
+ "isUnique": false,
1501
+ "concurrently": false,
1502
+ "method": "btree",
1503
+ "with": {}
1504
+ },
1505
+ "orders_pending_cart_unique": {
1506
+ "name": "orders_pending_cart_unique",
1507
+ "columns": [
1508
+ {
1509
+ "expression": "cart_token",
1510
+ "isExpression": false,
1511
+ "asc": true,
1512
+ "nulls": "last"
1513
+ }
1514
+ ],
1515
+ "isUnique": true,
1516
+ "where": "status = 'pending'",
1517
+ "concurrently": false,
1518
+ "method": "btree",
1519
+ "with": {}
1520
+ }
1521
+ },
1522
+ "foreignKeys": {},
1523
+ "compositePrimaryKeys": {},
1524
+ "uniqueConstraints": {},
1525
+ "policies": {},
1526
+ "checkConstraints": {},
1527
+ "isRLSEnabled": false
1528
+ },
1529
+ "public.processed_events": {
1530
+ "name": "processed_events",
1531
+ "schema": "",
1532
+ "columns": {
1533
+ "handler_name": {
1534
+ "name": "handler_name",
1535
+ "type": "text",
1536
+ "primaryKey": false,
1537
+ "notNull": true
1538
+ },
1539
+ "event_id": {
1540
+ "name": "event_id",
1541
+ "type": "text",
1542
+ "primaryKey": false,
1543
+ "notNull": true
1544
+ },
1545
+ "processed_at": {
1546
+ "name": "processed_at",
1547
+ "type": "timestamp with time zone",
1548
+ "primaryKey": false,
1549
+ "notNull": true
1550
+ }
1551
+ },
1552
+ "indexes": {},
1553
+ "foreignKeys": {},
1554
+ "compositePrimaryKeys": {
1555
+ "processed_events_handler_name_event_id_pk": {
1556
+ "name": "processed_events_handler_name_event_id_pk",
1557
+ "columns": [
1558
+ "handler_name",
1559
+ "event_id"
1560
+ ]
1561
+ }
1562
+ },
1563
+ "uniqueConstraints": {},
1564
+ "policies": {},
1565
+ "checkConstraints": {},
1566
+ "isRLSEnabled": false
1567
+ },
1568
+ "public.product_categories": {
1569
+ "name": "product_categories",
1570
+ "schema": "",
1571
+ "columns": {
1572
+ "product_id": {
1573
+ "name": "product_id",
1574
+ "type": "text",
1575
+ "primaryKey": false,
1576
+ "notNull": true
1577
+ },
1578
+ "category_id": {
1579
+ "name": "category_id",
1580
+ "type": "text",
1581
+ "primaryKey": false,
1582
+ "notNull": true
1583
+ }
1584
+ },
1585
+ "indexes": {
1586
+ "product_categories_category_idx": {
1587
+ "name": "product_categories_category_idx",
1588
+ "columns": [
1589
+ {
1590
+ "expression": "category_id",
1591
+ "isExpression": false,
1592
+ "asc": true,
1593
+ "nulls": "last"
1594
+ }
1595
+ ],
1596
+ "isUnique": false,
1597
+ "concurrently": false,
1598
+ "method": "btree",
1599
+ "with": {}
1600
+ }
1601
+ },
1602
+ "foreignKeys": {},
1603
+ "compositePrimaryKeys": {
1604
+ "product_categories_product_id_category_id_pk": {
1605
+ "name": "product_categories_product_id_category_id_pk",
1606
+ "columns": [
1607
+ "product_id",
1608
+ "category_id"
1609
+ ]
1610
+ }
1611
+ },
1612
+ "uniqueConstraints": {},
1613
+ "policies": {},
1614
+ "checkConstraints": {},
1615
+ "isRLSEnabled": false
1616
+ },
1617
+ "public.products": {
1618
+ "name": "products",
1619
+ "schema": "",
1620
+ "columns": {
1621
+ "id": {
1622
+ "name": "id",
1623
+ "type": "text",
1624
+ "primaryKey": true,
1625
+ "notNull": true
1626
+ },
1627
+ "slug": {
1628
+ "name": "slug",
1629
+ "type": "text",
1630
+ "primaryKey": false,
1631
+ "notNull": true
1632
+ },
1633
+ "name": {
1634
+ "name": "name",
1635
+ "type": "text",
1636
+ "primaryKey": false,
1637
+ "notNull": true
1638
+ },
1639
+ "description": {
1640
+ "name": "description",
1641
+ "type": "text",
1642
+ "primaryKey": false,
1643
+ "notNull": true,
1644
+ "default": "''"
1645
+ },
1646
+ "short_description": {
1647
+ "name": "short_description",
1648
+ "type": "text",
1649
+ "primaryKey": false,
1650
+ "notNull": true,
1651
+ "default": "''"
1652
+ },
1653
+ "status": {
1654
+ "name": "status",
1655
+ "type": "text",
1656
+ "primaryKey": false,
1657
+ "notNull": true,
1658
+ "default": "'draft'"
1659
+ },
1660
+ "type": {
1661
+ "name": "type",
1662
+ "type": "text",
1663
+ "primaryKey": false,
1664
+ "notNull": true,
1665
+ "default": "'simple'"
1666
+ },
1667
+ "seo_title": {
1668
+ "name": "seo_title",
1669
+ "type": "text",
1670
+ "primaryKey": false,
1671
+ "notNull": true,
1672
+ "default": "''"
1673
+ },
1674
+ "seo_description": {
1675
+ "name": "seo_description",
1676
+ "type": "text",
1677
+ "primaryKey": false,
1678
+ "notNull": true,
1679
+ "default": "''"
1680
+ },
1681
+ "media": {
1682
+ "name": "media",
1683
+ "type": "jsonb",
1684
+ "primaryKey": false,
1685
+ "notNull": true,
1686
+ "default": "'[]'::jsonb"
1687
+ },
1688
+ "metadata": {
1689
+ "name": "metadata",
1690
+ "type": "jsonb",
1691
+ "primaryKey": false,
1692
+ "notNull": true,
1693
+ "default": "'{}'::jsonb"
1694
+ },
1695
+ "created_at": {
1696
+ "name": "created_at",
1697
+ "type": "timestamp with time zone",
1698
+ "primaryKey": false,
1699
+ "notNull": true
1700
+ },
1701
+ "updated_at": {
1702
+ "name": "updated_at",
1703
+ "type": "timestamp with time zone",
1704
+ "primaryKey": false,
1705
+ "notNull": true
1706
+ }
1707
+ },
1708
+ "indexes": {
1709
+ "products_slug_unique": {
1710
+ "name": "products_slug_unique",
1711
+ "columns": [
1712
+ {
1713
+ "expression": "slug",
1714
+ "isExpression": false,
1715
+ "asc": true,
1716
+ "nulls": "last"
1717
+ }
1718
+ ],
1719
+ "isUnique": true,
1720
+ "concurrently": false,
1721
+ "method": "btree",
1722
+ "with": {}
1723
+ },
1724
+ "products_status_idx": {
1725
+ "name": "products_status_idx",
1726
+ "columns": [
1727
+ {
1728
+ "expression": "status",
1729
+ "isExpression": false,
1730
+ "asc": true,
1731
+ "nulls": "last"
1732
+ }
1733
+ ],
1734
+ "isUnique": false,
1735
+ "concurrently": false,
1736
+ "method": "btree",
1737
+ "with": {}
1738
+ }
1739
+ },
1740
+ "foreignKeys": {},
1741
+ "compositePrimaryKeys": {},
1742
+ "uniqueConstraints": {},
1743
+ "policies": {},
1744
+ "checkConstraints": {},
1745
+ "isRLSEnabled": false
1746
+ },
1747
+ "public.refresh_tokens": {
1748
+ "name": "refresh_tokens",
1749
+ "schema": "",
1750
+ "columns": {
1751
+ "id": {
1752
+ "name": "id",
1753
+ "type": "text",
1754
+ "primaryKey": true,
1755
+ "notNull": true
1756
+ },
1757
+ "customer_id": {
1758
+ "name": "customer_id",
1759
+ "type": "text",
1760
+ "primaryKey": false,
1761
+ "notNull": true
1762
+ },
1763
+ "token_hash": {
1764
+ "name": "token_hash",
1765
+ "type": "text",
1766
+ "primaryKey": false,
1767
+ "notNull": true
1768
+ },
1769
+ "revoked_at": {
1770
+ "name": "revoked_at",
1771
+ "type": "timestamp with time zone",
1772
+ "primaryKey": false,
1773
+ "notNull": false
1774
+ },
1775
+ "replaced_by_jti": {
1776
+ "name": "replaced_by_jti",
1777
+ "type": "text",
1778
+ "primaryKey": false,
1779
+ "notNull": false
1780
+ },
1781
+ "expires_at": {
1782
+ "name": "expires_at",
1783
+ "type": "timestamp with time zone",
1784
+ "primaryKey": false,
1785
+ "notNull": true
1786
+ },
1787
+ "created_at": {
1788
+ "name": "created_at",
1789
+ "type": "timestamp with time zone",
1790
+ "primaryKey": false,
1791
+ "notNull": true
1792
+ }
1793
+ },
1794
+ "indexes": {
1795
+ "refresh_tokens_customer_idx": {
1796
+ "name": "refresh_tokens_customer_idx",
1797
+ "columns": [
1798
+ {
1799
+ "expression": "customer_id",
1800
+ "isExpression": false,
1801
+ "asc": true,
1802
+ "nulls": "last"
1803
+ }
1804
+ ],
1805
+ "isUnique": false,
1806
+ "concurrently": false,
1807
+ "method": "btree",
1808
+ "with": {}
1809
+ }
1810
+ },
1811
+ "foreignKeys": {},
1812
+ "compositePrimaryKeys": {},
1813
+ "uniqueConstraints": {},
1814
+ "policies": {},
1815
+ "checkConstraints": {},
1816
+ "isRLSEnabled": false
1817
+ },
1818
+ "public.reviews": {
1819
+ "name": "reviews",
1820
+ "schema": "",
1821
+ "columns": {
1822
+ "id": {
1823
+ "name": "id",
1824
+ "type": "text",
1825
+ "primaryKey": true,
1826
+ "notNull": true
1827
+ },
1828
+ "product_id": {
1829
+ "name": "product_id",
1830
+ "type": "text",
1831
+ "primaryKey": false,
1832
+ "notNull": true
1833
+ },
1834
+ "customer_id": {
1835
+ "name": "customer_id",
1836
+ "type": "text",
1837
+ "primaryKey": false,
1838
+ "notNull": false
1839
+ },
1840
+ "order_id": {
1841
+ "name": "order_id",
1842
+ "type": "text",
1843
+ "primaryKey": false,
1844
+ "notNull": false
1845
+ },
1846
+ "rating": {
1847
+ "name": "rating",
1848
+ "type": "integer",
1849
+ "primaryKey": false,
1850
+ "notNull": true
1851
+ },
1852
+ "title": {
1853
+ "name": "title",
1854
+ "type": "text",
1855
+ "primaryKey": false,
1856
+ "notNull": true,
1857
+ "default": "''"
1858
+ },
1859
+ "body": {
1860
+ "name": "body",
1861
+ "type": "text",
1862
+ "primaryKey": false,
1863
+ "notNull": true,
1864
+ "default": "''"
1865
+ },
1866
+ "moderation_status": {
1867
+ "name": "moderation_status",
1868
+ "type": "text",
1869
+ "primaryKey": false,
1870
+ "notNull": true,
1871
+ "default": "'pending'"
1872
+ },
1873
+ "submitted_at": {
1874
+ "name": "submitted_at",
1875
+ "type": "timestamp with time zone",
1876
+ "primaryKey": false,
1877
+ "notNull": true
1878
+ },
1879
+ "moderated_at": {
1880
+ "name": "moderated_at",
1881
+ "type": "timestamp with time zone",
1882
+ "primaryKey": false,
1883
+ "notNull": false
1884
+ },
1885
+ "moderated_by": {
1886
+ "name": "moderated_by",
1887
+ "type": "text",
1888
+ "primaryKey": false,
1889
+ "notNull": false
1890
+ }
1891
+ },
1892
+ "indexes": {
1893
+ "reviews_product_idx": {
1894
+ "name": "reviews_product_idx",
1895
+ "columns": [
1896
+ {
1897
+ "expression": "product_id",
1898
+ "isExpression": false,
1899
+ "asc": true,
1900
+ "nulls": "last"
1901
+ }
1902
+ ],
1903
+ "isUnique": false,
1904
+ "concurrently": false,
1905
+ "method": "btree",
1906
+ "with": {}
1907
+ },
1908
+ "reviews_status_idx": {
1909
+ "name": "reviews_status_idx",
1910
+ "columns": [
1911
+ {
1912
+ "expression": "moderation_status",
1913
+ "isExpression": false,
1914
+ "asc": true,
1915
+ "nulls": "last"
1916
+ }
1917
+ ],
1918
+ "isUnique": false,
1919
+ "concurrently": false,
1920
+ "method": "btree",
1921
+ "with": {}
1922
+ }
1923
+ },
1924
+ "foreignKeys": {},
1925
+ "compositePrimaryKeys": {},
1926
+ "uniqueConstraints": {},
1927
+ "policies": {},
1928
+ "checkConstraints": {},
1929
+ "isRLSEnabled": false
1930
+ },
1931
+ "public.settings": {
1932
+ "name": "settings",
1933
+ "schema": "",
1934
+ "columns": {
1935
+ "slot": {
1936
+ "name": "slot",
1937
+ "type": "text",
1938
+ "primaryKey": false,
1939
+ "notNull": true
1940
+ },
1941
+ "path": {
1942
+ "name": "path",
1943
+ "type": "text",
1944
+ "primaryKey": false,
1945
+ "notNull": true
1946
+ },
1947
+ "ciphertext": {
1948
+ "name": "ciphertext",
1949
+ "type": "bytea",
1950
+ "primaryKey": false,
1951
+ "notNull": false
1952
+ },
1953
+ "plain": {
1954
+ "name": "plain",
1955
+ "type": "text",
1956
+ "primaryKey": false,
1957
+ "notNull": false
1958
+ },
1959
+ "iv": {
1960
+ "name": "iv",
1961
+ "type": "bytea",
1962
+ "primaryKey": false,
1963
+ "notNull": false
1964
+ },
1965
+ "tag": {
1966
+ "name": "tag",
1967
+ "type": "bytea",
1968
+ "primaryKey": false,
1969
+ "notNull": false
1970
+ },
1971
+ "key_id": {
1972
+ "name": "key_id",
1973
+ "type": "text",
1974
+ "primaryKey": false,
1975
+ "notNull": false
1976
+ },
1977
+ "updated_at": {
1978
+ "name": "updated_at",
1979
+ "type": "timestamp with time zone",
1980
+ "primaryKey": false,
1981
+ "notNull": true
1982
+ },
1983
+ "updated_by": {
1984
+ "name": "updated_by",
1985
+ "type": "text",
1986
+ "primaryKey": false,
1987
+ "notNull": false
1988
+ }
1989
+ },
1990
+ "indexes": {},
1991
+ "foreignKeys": {},
1992
+ "compositePrimaryKeys": {
1993
+ "settings_slot_path_pk": {
1994
+ "name": "settings_slot_path_pk",
1995
+ "columns": [
1996
+ "slot",
1997
+ "path"
1998
+ ]
1999
+ }
2000
+ },
2001
+ "uniqueConstraints": {},
2002
+ "policies": {},
2003
+ "checkConstraints": {
2004
+ "settings_one_value": {
2005
+ "name": "settings_one_value",
2006
+ "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))"
2007
+ }
2008
+ },
2009
+ "isRLSEnabled": false
2010
+ },
2011
+ "public.stock_adjustments": {
2012
+ "name": "stock_adjustments",
2013
+ "schema": "",
2014
+ "columns": {
2015
+ "id": {
2016
+ "name": "id",
2017
+ "type": "text",
2018
+ "primaryKey": true,
2019
+ "notNull": true
2020
+ },
2021
+ "variant_id": {
2022
+ "name": "variant_id",
2023
+ "type": "text",
2024
+ "primaryKey": false,
2025
+ "notNull": true
2026
+ },
2027
+ "adjustment": {
2028
+ "name": "adjustment",
2029
+ "type": "integer",
2030
+ "primaryKey": false,
2031
+ "notNull": true
2032
+ },
2033
+ "reason": {
2034
+ "name": "reason",
2035
+ "type": "text",
2036
+ "primaryKey": false,
2037
+ "notNull": true
2038
+ },
2039
+ "actor": {
2040
+ "name": "actor",
2041
+ "type": "text",
2042
+ "primaryKey": false,
2043
+ "notNull": true
2044
+ },
2045
+ "previous_qty": {
2046
+ "name": "previous_qty",
2047
+ "type": "integer",
2048
+ "primaryKey": false,
2049
+ "notNull": true
2050
+ },
2051
+ "new_qty": {
2052
+ "name": "new_qty",
2053
+ "type": "integer",
2054
+ "primaryKey": false,
2055
+ "notNull": true
2056
+ },
2057
+ "timestamp": {
2058
+ "name": "timestamp",
2059
+ "type": "timestamp with time zone",
2060
+ "primaryKey": false,
2061
+ "notNull": true
2062
+ }
2063
+ },
2064
+ "indexes": {
2065
+ "stock_adjustments_variant_idx": {
2066
+ "name": "stock_adjustments_variant_idx",
2067
+ "columns": [
2068
+ {
2069
+ "expression": "variant_id",
2070
+ "isExpression": false,
2071
+ "asc": true,
2072
+ "nulls": "last"
2073
+ }
2074
+ ],
2075
+ "isUnique": false,
2076
+ "concurrently": false,
2077
+ "method": "btree",
2078
+ "with": {}
2079
+ }
2080
+ },
2081
+ "foreignKeys": {},
2082
+ "compositePrimaryKeys": {},
2083
+ "uniqueConstraints": {},
2084
+ "policies": {},
2085
+ "checkConstraints": {},
2086
+ "isRLSEnabled": false
2087
+ },
2088
+ "public.variants": {
2089
+ "name": "variants",
2090
+ "schema": "",
2091
+ "columns": {
2092
+ "id": {
2093
+ "name": "id",
2094
+ "type": "text",
2095
+ "primaryKey": true,
2096
+ "notNull": true
2097
+ },
2098
+ "product_id": {
2099
+ "name": "product_id",
2100
+ "type": "text",
2101
+ "primaryKey": false,
2102
+ "notNull": true
2103
+ },
2104
+ "sku": {
2105
+ "name": "sku",
2106
+ "type": "text",
2107
+ "primaryKey": false,
2108
+ "notNull": true
2109
+ },
2110
+ "name": {
2111
+ "name": "name",
2112
+ "type": "text",
2113
+ "primaryKey": false,
2114
+ "notNull": true,
2115
+ "default": "''"
2116
+ },
2117
+ "price_minor": {
2118
+ "name": "price_minor",
2119
+ "type": "integer",
2120
+ "primaryKey": false,
2121
+ "notNull": true
2122
+ },
2123
+ "compare_at_price_minor": {
2124
+ "name": "compare_at_price_minor",
2125
+ "type": "integer",
2126
+ "primaryKey": false,
2127
+ "notNull": false
2128
+ },
2129
+ "weight_grams": {
2130
+ "name": "weight_grams",
2131
+ "type": "integer",
2132
+ "primaryKey": false,
2133
+ "notNull": false
2134
+ },
2135
+ "dimensions": {
2136
+ "name": "dimensions",
2137
+ "type": "jsonb",
2138
+ "primaryKey": false,
2139
+ "notNull": false
2140
+ },
2141
+ "stock": {
2142
+ "name": "stock",
2143
+ "type": "integer",
2144
+ "primaryKey": false,
2145
+ "notNull": true,
2146
+ "default": 0
2147
+ },
2148
+ "low_stock_threshold": {
2149
+ "name": "low_stock_threshold",
2150
+ "type": "integer",
2151
+ "primaryKey": false,
2152
+ "notNull": true,
2153
+ "default": 0
2154
+ },
2155
+ "options": {
2156
+ "name": "options",
2157
+ "type": "jsonb",
2158
+ "primaryKey": false,
2159
+ "notNull": true,
2160
+ "default": "'[]'::jsonb"
2161
+ },
2162
+ "status": {
2163
+ "name": "status",
2164
+ "type": "text",
2165
+ "primaryKey": false,
2166
+ "notNull": true,
2167
+ "default": "'active'"
2168
+ },
2169
+ "created_at": {
2170
+ "name": "created_at",
2171
+ "type": "timestamp with time zone",
2172
+ "primaryKey": false,
2173
+ "notNull": true
2174
+ },
2175
+ "updated_at": {
2176
+ "name": "updated_at",
2177
+ "type": "timestamp with time zone",
2178
+ "primaryKey": false,
2179
+ "notNull": true
2180
+ }
2181
+ },
2182
+ "indexes": {
2183
+ "variants_sku_unique": {
2184
+ "name": "variants_sku_unique",
2185
+ "columns": [
2186
+ {
2187
+ "expression": "sku",
2188
+ "isExpression": false,
2189
+ "asc": true,
2190
+ "nulls": "last"
2191
+ }
2192
+ ],
2193
+ "isUnique": true,
2194
+ "concurrently": false,
2195
+ "method": "btree",
2196
+ "with": {}
2197
+ },
2198
+ "variants_product_idx": {
2199
+ "name": "variants_product_idx",
2200
+ "columns": [
2201
+ {
2202
+ "expression": "product_id",
2203
+ "isExpression": false,
2204
+ "asc": true,
2205
+ "nulls": "last"
2206
+ }
2207
+ ],
2208
+ "isUnique": false,
2209
+ "concurrently": false,
2210
+ "method": "btree",
2211
+ "with": {}
2212
+ }
2213
+ },
2214
+ "foreignKeys": {},
2215
+ "compositePrimaryKeys": {},
2216
+ "uniqueConstraints": {},
2217
+ "policies": {},
2218
+ "checkConstraints": {},
2219
+ "isRLSEnabled": false
2220
+ }
2221
+ },
2222
+ "enums": {},
2223
+ "schemas": {},
2224
+ "sequences": {},
2225
+ "roles": {},
2226
+ "policies": {},
2227
+ "views": {},
2228
+ "_meta": {
2229
+ "columns": {},
2230
+ "schemas": {},
2231
+ "tables": {}
2232
+ }
2233
+ }