@nymbalhq/platform 0.0.0-stage → 0.2.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 (48) hide show
  1. package/dist/chunk-74KODSYJ.js +2564 -0
  2. package/dist/chunk-74KODSYJ.js.map +1 -0
  3. package/dist/chunk-PW6ILJF7.js +740 -0
  4. package/dist/chunk-PW6ILJF7.js.map +1 -0
  5. package/dist/chunk-PZ5AY32C.js +10 -0
  6. package/dist/chunk-PZ5AY32C.js.map +1 -0
  7. package/dist/db/schema/index.d.ts +10125 -0
  8. package/dist/db/schema/index.js +10 -0
  9. package/dist/db/schema/index.js.map +1 -0
  10. package/dist/index.d.ts +1372 -0
  11. package/dist/index.js +6652 -0
  12. package/dist/index.js.map +1 -0
  13. package/dist/register-IVFYBJSX.js +8 -0
  14. package/dist/register-IVFYBJSX.js.map +1 -0
  15. package/drizzle.config.postgres.ts +10 -0
  16. package/drizzle.config.sqlite.ts +10 -0
  17. package/migrations/postgres/0000_tearful_longshot.sql +166 -0
  18. package/migrations/postgres/0001_neat_zeigeist.sql +1 -0
  19. package/migrations/postgres/0002_sloppy_mad_thinker.sql +20 -0
  20. package/migrations/postgres/0003_violet_violations.sql +15 -0
  21. package/migrations/postgres/0004_white_reavers.sql +15 -0
  22. package/migrations/postgres/0005_natural_nico_minoru.sql +12 -0
  23. package/migrations/postgres/0006_minor_dragon_man.sql +28 -0
  24. package/migrations/postgres/meta/0000_snapshot.json +1172 -0
  25. package/migrations/postgres/meta/0001_snapshot.json +1187 -0
  26. package/migrations/postgres/meta/0002_snapshot.json +1325 -0
  27. package/migrations/postgres/meta/0003_snapshot.json +1432 -0
  28. package/migrations/postgres/meta/0004_snapshot.json +1439 -0
  29. package/migrations/postgres/meta/0005_snapshot.json +1461 -0
  30. package/migrations/postgres/meta/0006_snapshot.json +1598 -0
  31. package/migrations/postgres/meta/_journal.json +55 -0
  32. package/migrations/sqlite/0000_glorious_vision.sql +166 -0
  33. package/migrations/sqlite/0001_tricky_glorian.sql +1 -0
  34. package/migrations/sqlite/0002_puzzling_epoch.sql +19 -0
  35. package/migrations/sqlite/0003_fantastic_captain_stacy.sql +15 -0
  36. package/migrations/sqlite/0004_remarkable_shriek.sql +12 -0
  37. package/migrations/sqlite/0005_conscious_speedball.sql +13 -0
  38. package/migrations/sqlite/0006_flat_psylocke.sql +28 -0
  39. package/migrations/sqlite/meta/0000_snapshot.json +1093 -0
  40. package/migrations/sqlite/meta/0001_snapshot.json +1100 -0
  41. package/migrations/sqlite/meta/0002_snapshot.json +1222 -0
  42. package/migrations/sqlite/meta/0003_snapshot.json +1320 -0
  43. package/migrations/sqlite/meta/0004_snapshot.json +1328 -0
  44. package/migrations/sqlite/meta/0005_snapshot.json +1343 -0
  45. package/migrations/sqlite/meta/0006_snapshot.json +1470 -0
  46. package/migrations/sqlite/meta/_journal.json +55 -0
  47. package/package.json +69 -3
  48. package/README.md +0 -3
@@ -0,0 +1,1439 @@
1
+ {
2
+ "id": "bee86752-fcba-4af8-ae42-a8868e06a776",
3
+ "prevId": "13b4f1b7-21fa-462a-80d9-e00d700e5e6d",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.carts": {
8
+ "name": "carts",
9
+ "schema": "",
10
+ "columns": {
11
+ "token": {
12
+ "name": "token",
13
+ "type": "text",
14
+ "primaryKey": true,
15
+ "notNull": true
16
+ },
17
+ "customer_id": {
18
+ "name": "customer_id",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": false
22
+ },
23
+ "currency": {
24
+ "name": "currency",
25
+ "type": "text",
26
+ "primaryKey": false,
27
+ "notNull": true
28
+ },
29
+ "items": {
30
+ "name": "items",
31
+ "type": "jsonb",
32
+ "primaryKey": false,
33
+ "notNull": true,
34
+ "default": "'[]'::jsonb"
35
+ },
36
+ "line_count": {
37
+ "name": "line_count",
38
+ "type": "integer",
39
+ "primaryKey": false,
40
+ "notNull": true,
41
+ "default": 0
42
+ },
43
+ "subtotal_minor": {
44
+ "name": "subtotal_minor",
45
+ "type": "integer",
46
+ "primaryKey": false,
47
+ "notNull": true,
48
+ "default": 0
49
+ },
50
+ "expires_at": {
51
+ "name": "expires_at",
52
+ "type": "timestamp with time zone",
53
+ "primaryKey": false,
54
+ "notNull": true
55
+ },
56
+ "created_at": {
57
+ "name": "created_at",
58
+ "type": "timestamp with time zone",
59
+ "primaryKey": false,
60
+ "notNull": true
61
+ },
62
+ "updated_at": {
63
+ "name": "updated_at",
64
+ "type": "timestamp with time zone",
65
+ "primaryKey": false,
66
+ "notNull": true
67
+ },
68
+ "abandoned_notified_at": {
69
+ "name": "abandoned_notified_at",
70
+ "type": "timestamp with time zone",
71
+ "primaryKey": false,
72
+ "notNull": false
73
+ }
74
+ },
75
+ "indexes": {
76
+ "carts_expires_idx": {
77
+ "name": "carts_expires_idx",
78
+ "columns": [
79
+ {
80
+ "expression": "expires_at",
81
+ "isExpression": false,
82
+ "asc": true,
83
+ "nulls": "last"
84
+ }
85
+ ],
86
+ "isUnique": false,
87
+ "concurrently": false,
88
+ "method": "btree",
89
+ "with": {}
90
+ },
91
+ "carts_updated_idx": {
92
+ "name": "carts_updated_idx",
93
+ "columns": [
94
+ {
95
+ "expression": "updated_at",
96
+ "isExpression": false,
97
+ "asc": true,
98
+ "nulls": "last"
99
+ }
100
+ ],
101
+ "isUnique": false,
102
+ "concurrently": false,
103
+ "method": "btree",
104
+ "with": {}
105
+ }
106
+ },
107
+ "foreignKeys": {},
108
+ "compositePrimaryKeys": {},
109
+ "uniqueConstraints": {},
110
+ "policies": {},
111
+ "checkConstraints": {},
112
+ "isRLSEnabled": false
113
+ },
114
+ "public.categories": {
115
+ "name": "categories",
116
+ "schema": "",
117
+ "columns": {
118
+ "id": {
119
+ "name": "id",
120
+ "type": "text",
121
+ "primaryKey": true,
122
+ "notNull": true
123
+ },
124
+ "parent_id": {
125
+ "name": "parent_id",
126
+ "type": "text",
127
+ "primaryKey": false,
128
+ "notNull": false
129
+ },
130
+ "slug": {
131
+ "name": "slug",
132
+ "type": "text",
133
+ "primaryKey": false,
134
+ "notNull": true
135
+ },
136
+ "name": {
137
+ "name": "name",
138
+ "type": "text",
139
+ "primaryKey": false,
140
+ "notNull": true
141
+ },
142
+ "description": {
143
+ "name": "description",
144
+ "type": "text",
145
+ "primaryKey": false,
146
+ "notNull": true,
147
+ "default": "''"
148
+ },
149
+ "position": {
150
+ "name": "position",
151
+ "type": "integer",
152
+ "primaryKey": false,
153
+ "notNull": true,
154
+ "default": 0
155
+ },
156
+ "created_at": {
157
+ "name": "created_at",
158
+ "type": "timestamp with time zone",
159
+ "primaryKey": false,
160
+ "notNull": true
161
+ }
162
+ },
163
+ "indexes": {
164
+ "categories_slug_unique": {
165
+ "name": "categories_slug_unique",
166
+ "columns": [
167
+ {
168
+ "expression": "slug",
169
+ "isExpression": false,
170
+ "asc": true,
171
+ "nulls": "last"
172
+ }
173
+ ],
174
+ "isUnique": true,
175
+ "concurrently": false,
176
+ "method": "btree",
177
+ "with": {}
178
+ },
179
+ "categories_parent_idx": {
180
+ "name": "categories_parent_idx",
181
+ "columns": [
182
+ {
183
+ "expression": "parent_id",
184
+ "isExpression": false,
185
+ "asc": true,
186
+ "nulls": "last"
187
+ }
188
+ ],
189
+ "isUnique": false,
190
+ "concurrently": false,
191
+ "method": "btree",
192
+ "with": {}
193
+ }
194
+ },
195
+ "foreignKeys": {},
196
+ "compositePrimaryKeys": {},
197
+ "uniqueConstraints": {},
198
+ "policies": {},
199
+ "checkConstraints": {},
200
+ "isRLSEnabled": false
201
+ },
202
+ "public.customers": {
203
+ "name": "customers",
204
+ "schema": "",
205
+ "columns": {
206
+ "id": {
207
+ "name": "id",
208
+ "type": "text",
209
+ "primaryKey": true,
210
+ "notNull": true
211
+ },
212
+ "email": {
213
+ "name": "email",
214
+ "type": "text",
215
+ "primaryKey": false,
216
+ "notNull": true
217
+ },
218
+ "password_hash": {
219
+ "name": "password_hash",
220
+ "type": "text",
221
+ "primaryKey": false,
222
+ "notNull": true
223
+ },
224
+ "first_name": {
225
+ "name": "first_name",
226
+ "type": "text",
227
+ "primaryKey": false,
228
+ "notNull": true,
229
+ "default": "''"
230
+ },
231
+ "last_name": {
232
+ "name": "last_name",
233
+ "type": "text",
234
+ "primaryKey": false,
235
+ "notNull": true,
236
+ "default": "''"
237
+ },
238
+ "phone": {
239
+ "name": "phone",
240
+ "type": "text",
241
+ "primaryKey": false,
242
+ "notNull": true,
243
+ "default": "''"
244
+ },
245
+ "addresses": {
246
+ "name": "addresses",
247
+ "type": "jsonb",
248
+ "primaryKey": false,
249
+ "notNull": true,
250
+ "default": "'[]'::jsonb"
251
+ },
252
+ "order_count": {
253
+ "name": "order_count",
254
+ "type": "integer",
255
+ "primaryKey": false,
256
+ "notNull": true,
257
+ "default": 0
258
+ },
259
+ "total_spent_minor": {
260
+ "name": "total_spent_minor",
261
+ "type": "integer",
262
+ "primaryKey": false,
263
+ "notNull": true,
264
+ "default": 0
265
+ },
266
+ "metadata": {
267
+ "name": "metadata",
268
+ "type": "jsonb",
269
+ "primaryKey": false,
270
+ "notNull": true,
271
+ "default": "'{}'::jsonb"
272
+ },
273
+ "roles": {
274
+ "name": "roles",
275
+ "type": "jsonb",
276
+ "primaryKey": false,
277
+ "notNull": true,
278
+ "default": "'[\"customer\"]'::jsonb"
279
+ },
280
+ "requires_password_reset": {
281
+ "name": "requires_password_reset",
282
+ "type": "boolean",
283
+ "primaryKey": false,
284
+ "notNull": true,
285
+ "default": false
286
+ },
287
+ "created_at": {
288
+ "name": "created_at",
289
+ "type": "timestamp with time zone",
290
+ "primaryKey": false,
291
+ "notNull": true
292
+ },
293
+ "updated_at": {
294
+ "name": "updated_at",
295
+ "type": "timestamp with time zone",
296
+ "primaryKey": false,
297
+ "notNull": true
298
+ }
299
+ },
300
+ "indexes": {
301
+ "customers_email_unique": {
302
+ "name": "customers_email_unique",
303
+ "columns": [
304
+ {
305
+ "expression": "email",
306
+ "isExpression": false,
307
+ "asc": true,
308
+ "nulls": "last"
309
+ }
310
+ ],
311
+ "isUnique": true,
312
+ "concurrently": false,
313
+ "method": "btree",
314
+ "with": {}
315
+ }
316
+ },
317
+ "foreignKeys": {},
318
+ "compositePrimaryKeys": {},
319
+ "uniqueConstraints": {},
320
+ "policies": {},
321
+ "checkConstraints": {},
322
+ "isRLSEnabled": false
323
+ },
324
+ "public.events": {
325
+ "name": "events",
326
+ "schema": "",
327
+ "columns": {
328
+ "seq": {
329
+ "name": "seq",
330
+ "type": "bigserial",
331
+ "primaryKey": true,
332
+ "notNull": true
333
+ },
334
+ "id": {
335
+ "name": "id",
336
+ "type": "text",
337
+ "primaryKey": false,
338
+ "notNull": true
339
+ },
340
+ "type": {
341
+ "name": "type",
342
+ "type": "text",
343
+ "primaryKey": false,
344
+ "notNull": true
345
+ },
346
+ "envelope": {
347
+ "name": "envelope",
348
+ "type": "jsonb",
349
+ "primaryKey": false,
350
+ "notNull": true
351
+ },
352
+ "created_at": {
353
+ "name": "created_at",
354
+ "type": "timestamp with time zone",
355
+ "primaryKey": false,
356
+ "notNull": true
357
+ },
358
+ "delivered_at": {
359
+ "name": "delivered_at",
360
+ "type": "timestamp with time zone",
361
+ "primaryKey": false,
362
+ "notNull": false
363
+ },
364
+ "attempts": {
365
+ "name": "attempts",
366
+ "type": "integer",
367
+ "primaryKey": false,
368
+ "notNull": true,
369
+ "default": 0
370
+ },
371
+ "dead_at": {
372
+ "name": "dead_at",
373
+ "type": "timestamp with time zone",
374
+ "primaryKey": false,
375
+ "notNull": false
376
+ }
377
+ },
378
+ "indexes": {
379
+ "events_id_unique": {
380
+ "name": "events_id_unique",
381
+ "columns": [
382
+ {
383
+ "expression": "id",
384
+ "isExpression": false,
385
+ "asc": true,
386
+ "nulls": "last"
387
+ }
388
+ ],
389
+ "isUnique": true,
390
+ "concurrently": false,
391
+ "method": "btree",
392
+ "with": {}
393
+ },
394
+ "events_undelivered_idx": {
395
+ "name": "events_undelivered_idx",
396
+ "columns": [
397
+ {
398
+ "expression": "delivered_at",
399
+ "isExpression": false,
400
+ "asc": true,
401
+ "nulls": "last"
402
+ },
403
+ {
404
+ "expression": "seq",
405
+ "isExpression": false,
406
+ "asc": true,
407
+ "nulls": "last"
408
+ }
409
+ ],
410
+ "isUnique": false,
411
+ "concurrently": false,
412
+ "method": "btree",
413
+ "with": {}
414
+ }
415
+ },
416
+ "foreignKeys": {},
417
+ "compositePrimaryKeys": {},
418
+ "uniqueConstraints": {},
419
+ "policies": {},
420
+ "checkConstraints": {},
421
+ "isRLSEnabled": false
422
+ },
423
+ "public.inventory_reservations": {
424
+ "name": "inventory_reservations",
425
+ "schema": "",
426
+ "columns": {
427
+ "reservation_id": {
428
+ "name": "reservation_id",
429
+ "type": "text",
430
+ "primaryKey": true,
431
+ "notNull": true
432
+ },
433
+ "variant_id": {
434
+ "name": "variant_id",
435
+ "type": "text",
436
+ "primaryKey": false,
437
+ "notNull": true
438
+ },
439
+ "qty": {
440
+ "name": "qty",
441
+ "type": "integer",
442
+ "primaryKey": false,
443
+ "notNull": true
444
+ },
445
+ "order_ref": {
446
+ "name": "order_ref",
447
+ "type": "text",
448
+ "primaryKey": false,
449
+ "notNull": false
450
+ },
451
+ "expires_at": {
452
+ "name": "expires_at",
453
+ "type": "timestamp with time zone",
454
+ "primaryKey": false,
455
+ "notNull": true
456
+ },
457
+ "created_at": {
458
+ "name": "created_at",
459
+ "type": "timestamp with time zone",
460
+ "primaryKey": false,
461
+ "notNull": true
462
+ }
463
+ },
464
+ "indexes": {
465
+ "inv_reservations_variant_idx": {
466
+ "name": "inv_reservations_variant_idx",
467
+ "columns": [
468
+ {
469
+ "expression": "variant_id",
470
+ "isExpression": false,
471
+ "asc": true,
472
+ "nulls": "last"
473
+ }
474
+ ],
475
+ "isUnique": false,
476
+ "concurrently": false,
477
+ "method": "btree",
478
+ "with": {}
479
+ },
480
+ "inv_reservations_expires_idx": {
481
+ "name": "inv_reservations_expires_idx",
482
+ "columns": [
483
+ {
484
+ "expression": "expires_at",
485
+ "isExpression": false,
486
+ "asc": true,
487
+ "nulls": "last"
488
+ }
489
+ ],
490
+ "isUnique": false,
491
+ "concurrently": false,
492
+ "method": "btree",
493
+ "with": {}
494
+ }
495
+ },
496
+ "foreignKeys": {},
497
+ "compositePrimaryKeys": {},
498
+ "uniqueConstraints": {},
499
+ "policies": {},
500
+ "checkConstraints": {},
501
+ "isRLSEnabled": false
502
+ },
503
+ "public.order_history": {
504
+ "name": "order_history",
505
+ "schema": "",
506
+ "columns": {
507
+ "id": {
508
+ "name": "id",
509
+ "type": "text",
510
+ "primaryKey": true,
511
+ "notNull": true
512
+ },
513
+ "order_id": {
514
+ "name": "order_id",
515
+ "type": "text",
516
+ "primaryKey": false,
517
+ "notNull": true
518
+ },
519
+ "from_status": {
520
+ "name": "from_status",
521
+ "type": "text",
522
+ "primaryKey": false,
523
+ "notNull": false
524
+ },
525
+ "to_status": {
526
+ "name": "to_status",
527
+ "type": "text",
528
+ "primaryKey": false,
529
+ "notNull": true
530
+ },
531
+ "actor": {
532
+ "name": "actor",
533
+ "type": "text",
534
+ "primaryKey": false,
535
+ "notNull": true
536
+ },
537
+ "note": {
538
+ "name": "note",
539
+ "type": "text",
540
+ "primaryKey": false,
541
+ "notNull": true,
542
+ "default": "''"
543
+ },
544
+ "timestamp": {
545
+ "name": "timestamp",
546
+ "type": "timestamp with time zone",
547
+ "primaryKey": false,
548
+ "notNull": true
549
+ }
550
+ },
551
+ "indexes": {
552
+ "order_history_order_idx": {
553
+ "name": "order_history_order_idx",
554
+ "columns": [
555
+ {
556
+ "expression": "order_id",
557
+ "isExpression": false,
558
+ "asc": true,
559
+ "nulls": "last"
560
+ }
561
+ ],
562
+ "isUnique": false,
563
+ "concurrently": false,
564
+ "method": "btree",
565
+ "with": {}
566
+ }
567
+ },
568
+ "foreignKeys": {},
569
+ "compositePrimaryKeys": {},
570
+ "uniqueConstraints": {},
571
+ "policies": {},
572
+ "checkConstraints": {},
573
+ "isRLSEnabled": false
574
+ },
575
+ "public.order_sequences": {
576
+ "name": "order_sequences",
577
+ "schema": "",
578
+ "columns": {
579
+ "id": {
580
+ "name": "id",
581
+ "type": "integer",
582
+ "primaryKey": true,
583
+ "notNull": true
584
+ },
585
+ "next_value": {
586
+ "name": "next_value",
587
+ "type": "integer",
588
+ "primaryKey": false,
589
+ "notNull": true
590
+ }
591
+ },
592
+ "indexes": {},
593
+ "foreignKeys": {},
594
+ "compositePrimaryKeys": {},
595
+ "uniqueConstraints": {},
596
+ "policies": {},
597
+ "checkConstraints": {},
598
+ "isRLSEnabled": false
599
+ },
600
+ "public.orders": {
601
+ "name": "orders",
602
+ "schema": "",
603
+ "columns": {
604
+ "id": {
605
+ "name": "id",
606
+ "type": "text",
607
+ "primaryKey": true,
608
+ "notNull": true
609
+ },
610
+ "order_number": {
611
+ "name": "order_number",
612
+ "type": "text",
613
+ "primaryKey": false,
614
+ "notNull": true
615
+ },
616
+ "sequence": {
617
+ "name": "sequence",
618
+ "type": "integer",
619
+ "primaryKey": false,
620
+ "notNull": true
621
+ },
622
+ "customer_id": {
623
+ "name": "customer_id",
624
+ "type": "text",
625
+ "primaryKey": false,
626
+ "notNull": false
627
+ },
628
+ "status": {
629
+ "name": "status",
630
+ "type": "text",
631
+ "primaryKey": false,
632
+ "notNull": true,
633
+ "default": "'pending'"
634
+ },
635
+ "email": {
636
+ "name": "email",
637
+ "type": "text",
638
+ "primaryKey": false,
639
+ "notNull": true
640
+ },
641
+ "billing_address": {
642
+ "name": "billing_address",
643
+ "type": "jsonb",
644
+ "primaryKey": false,
645
+ "notNull": true
646
+ },
647
+ "shipping_address": {
648
+ "name": "shipping_address",
649
+ "type": "jsonb",
650
+ "primaryKey": false,
651
+ "notNull": true
652
+ },
653
+ "line_items": {
654
+ "name": "line_items",
655
+ "type": "jsonb",
656
+ "primaryKey": false,
657
+ "notNull": true
658
+ },
659
+ "subtotal_minor": {
660
+ "name": "subtotal_minor",
661
+ "type": "integer",
662
+ "primaryKey": false,
663
+ "notNull": true
664
+ },
665
+ "tax_total_minor": {
666
+ "name": "tax_total_minor",
667
+ "type": "integer",
668
+ "primaryKey": false,
669
+ "notNull": true,
670
+ "default": 0
671
+ },
672
+ "shipping_total_minor": {
673
+ "name": "shipping_total_minor",
674
+ "type": "integer",
675
+ "primaryKey": false,
676
+ "notNull": true,
677
+ "default": 0
678
+ },
679
+ "discount_total_minor": {
680
+ "name": "discount_total_minor",
681
+ "type": "integer",
682
+ "primaryKey": false,
683
+ "notNull": true,
684
+ "default": 0
685
+ },
686
+ "total_minor": {
687
+ "name": "total_minor",
688
+ "type": "integer",
689
+ "primaryKey": false,
690
+ "notNull": true
691
+ },
692
+ "currency": {
693
+ "name": "currency",
694
+ "type": "text",
695
+ "primaryKey": false,
696
+ "notNull": true
697
+ },
698
+ "notes": {
699
+ "name": "notes",
700
+ "type": "text",
701
+ "primaryKey": false,
702
+ "notNull": true,
703
+ "default": "''"
704
+ },
705
+ "metadata": {
706
+ "name": "metadata",
707
+ "type": "jsonb",
708
+ "primaryKey": false,
709
+ "notNull": true,
710
+ "default": "'{}'::jsonb"
711
+ },
712
+ "payment_intent_id": {
713
+ "name": "payment_intent_id",
714
+ "type": "text",
715
+ "primaryKey": false,
716
+ "notNull": false
717
+ },
718
+ "created_at": {
719
+ "name": "created_at",
720
+ "type": "timestamp with time zone",
721
+ "primaryKey": false,
722
+ "notNull": true
723
+ },
724
+ "updated_at": {
725
+ "name": "updated_at",
726
+ "type": "timestamp with time zone",
727
+ "primaryKey": false,
728
+ "notNull": true
729
+ }
730
+ },
731
+ "indexes": {
732
+ "orders_number_unique": {
733
+ "name": "orders_number_unique",
734
+ "columns": [
735
+ {
736
+ "expression": "order_number",
737
+ "isExpression": false,
738
+ "asc": true,
739
+ "nulls": "last"
740
+ }
741
+ ],
742
+ "isUnique": true,
743
+ "concurrently": false,
744
+ "method": "btree",
745
+ "with": {}
746
+ },
747
+ "orders_sequence_unique": {
748
+ "name": "orders_sequence_unique",
749
+ "columns": [
750
+ {
751
+ "expression": "sequence",
752
+ "isExpression": false,
753
+ "asc": true,
754
+ "nulls": "last"
755
+ }
756
+ ],
757
+ "isUnique": true,
758
+ "concurrently": false,
759
+ "method": "btree",
760
+ "with": {}
761
+ },
762
+ "orders_customer_idx": {
763
+ "name": "orders_customer_idx",
764
+ "columns": [
765
+ {
766
+ "expression": "customer_id",
767
+ "isExpression": false,
768
+ "asc": true,
769
+ "nulls": "last"
770
+ }
771
+ ],
772
+ "isUnique": false,
773
+ "concurrently": false,
774
+ "method": "btree",
775
+ "with": {}
776
+ },
777
+ "orders_status_idx": {
778
+ "name": "orders_status_idx",
779
+ "columns": [
780
+ {
781
+ "expression": "status",
782
+ "isExpression": false,
783
+ "asc": true,
784
+ "nulls": "last"
785
+ }
786
+ ],
787
+ "isUnique": false,
788
+ "concurrently": false,
789
+ "method": "btree",
790
+ "with": {}
791
+ },
792
+ "orders_payment_intent_idx": {
793
+ "name": "orders_payment_intent_idx",
794
+ "columns": [
795
+ {
796
+ "expression": "payment_intent_id",
797
+ "isExpression": false,
798
+ "asc": true,
799
+ "nulls": "last"
800
+ }
801
+ ],
802
+ "isUnique": false,
803
+ "concurrently": false,
804
+ "method": "btree",
805
+ "with": {}
806
+ }
807
+ },
808
+ "foreignKeys": {},
809
+ "compositePrimaryKeys": {},
810
+ "uniqueConstraints": {},
811
+ "policies": {},
812
+ "checkConstraints": {},
813
+ "isRLSEnabled": false
814
+ },
815
+ "public.processed_events": {
816
+ "name": "processed_events",
817
+ "schema": "",
818
+ "columns": {
819
+ "handler_name": {
820
+ "name": "handler_name",
821
+ "type": "text",
822
+ "primaryKey": false,
823
+ "notNull": true
824
+ },
825
+ "event_id": {
826
+ "name": "event_id",
827
+ "type": "text",
828
+ "primaryKey": false,
829
+ "notNull": true
830
+ },
831
+ "processed_at": {
832
+ "name": "processed_at",
833
+ "type": "timestamp with time zone",
834
+ "primaryKey": false,
835
+ "notNull": true
836
+ }
837
+ },
838
+ "indexes": {},
839
+ "foreignKeys": {},
840
+ "compositePrimaryKeys": {
841
+ "processed_events_handler_name_event_id_pk": {
842
+ "name": "processed_events_handler_name_event_id_pk",
843
+ "columns": [
844
+ "handler_name",
845
+ "event_id"
846
+ ]
847
+ }
848
+ },
849
+ "uniqueConstraints": {},
850
+ "policies": {},
851
+ "checkConstraints": {},
852
+ "isRLSEnabled": false
853
+ },
854
+ "public.product_categories": {
855
+ "name": "product_categories",
856
+ "schema": "",
857
+ "columns": {
858
+ "product_id": {
859
+ "name": "product_id",
860
+ "type": "text",
861
+ "primaryKey": false,
862
+ "notNull": true
863
+ },
864
+ "category_id": {
865
+ "name": "category_id",
866
+ "type": "text",
867
+ "primaryKey": false,
868
+ "notNull": true
869
+ }
870
+ },
871
+ "indexes": {
872
+ "product_categories_category_idx": {
873
+ "name": "product_categories_category_idx",
874
+ "columns": [
875
+ {
876
+ "expression": "category_id",
877
+ "isExpression": false,
878
+ "asc": true,
879
+ "nulls": "last"
880
+ }
881
+ ],
882
+ "isUnique": false,
883
+ "concurrently": false,
884
+ "method": "btree",
885
+ "with": {}
886
+ }
887
+ },
888
+ "foreignKeys": {},
889
+ "compositePrimaryKeys": {
890
+ "product_categories_product_id_category_id_pk": {
891
+ "name": "product_categories_product_id_category_id_pk",
892
+ "columns": [
893
+ "product_id",
894
+ "category_id"
895
+ ]
896
+ }
897
+ },
898
+ "uniqueConstraints": {},
899
+ "policies": {},
900
+ "checkConstraints": {},
901
+ "isRLSEnabled": false
902
+ },
903
+ "public.products": {
904
+ "name": "products",
905
+ "schema": "",
906
+ "columns": {
907
+ "id": {
908
+ "name": "id",
909
+ "type": "text",
910
+ "primaryKey": true,
911
+ "notNull": true
912
+ },
913
+ "slug": {
914
+ "name": "slug",
915
+ "type": "text",
916
+ "primaryKey": false,
917
+ "notNull": true
918
+ },
919
+ "name": {
920
+ "name": "name",
921
+ "type": "text",
922
+ "primaryKey": false,
923
+ "notNull": true
924
+ },
925
+ "description": {
926
+ "name": "description",
927
+ "type": "text",
928
+ "primaryKey": false,
929
+ "notNull": true,
930
+ "default": "''"
931
+ },
932
+ "short_description": {
933
+ "name": "short_description",
934
+ "type": "text",
935
+ "primaryKey": false,
936
+ "notNull": true,
937
+ "default": "''"
938
+ },
939
+ "status": {
940
+ "name": "status",
941
+ "type": "text",
942
+ "primaryKey": false,
943
+ "notNull": true,
944
+ "default": "'draft'"
945
+ },
946
+ "type": {
947
+ "name": "type",
948
+ "type": "text",
949
+ "primaryKey": false,
950
+ "notNull": true,
951
+ "default": "'simple'"
952
+ },
953
+ "seo_title": {
954
+ "name": "seo_title",
955
+ "type": "text",
956
+ "primaryKey": false,
957
+ "notNull": true,
958
+ "default": "''"
959
+ },
960
+ "seo_description": {
961
+ "name": "seo_description",
962
+ "type": "text",
963
+ "primaryKey": false,
964
+ "notNull": true,
965
+ "default": "''"
966
+ },
967
+ "media": {
968
+ "name": "media",
969
+ "type": "jsonb",
970
+ "primaryKey": false,
971
+ "notNull": true,
972
+ "default": "'[]'::jsonb"
973
+ },
974
+ "metadata": {
975
+ "name": "metadata",
976
+ "type": "jsonb",
977
+ "primaryKey": false,
978
+ "notNull": true,
979
+ "default": "'{}'::jsonb"
980
+ },
981
+ "created_at": {
982
+ "name": "created_at",
983
+ "type": "timestamp with time zone",
984
+ "primaryKey": false,
985
+ "notNull": true
986
+ },
987
+ "updated_at": {
988
+ "name": "updated_at",
989
+ "type": "timestamp with time zone",
990
+ "primaryKey": false,
991
+ "notNull": true
992
+ }
993
+ },
994
+ "indexes": {
995
+ "products_slug_unique": {
996
+ "name": "products_slug_unique",
997
+ "columns": [
998
+ {
999
+ "expression": "slug",
1000
+ "isExpression": false,
1001
+ "asc": true,
1002
+ "nulls": "last"
1003
+ }
1004
+ ],
1005
+ "isUnique": true,
1006
+ "concurrently": false,
1007
+ "method": "btree",
1008
+ "with": {}
1009
+ },
1010
+ "products_status_idx": {
1011
+ "name": "products_status_idx",
1012
+ "columns": [
1013
+ {
1014
+ "expression": "status",
1015
+ "isExpression": false,
1016
+ "asc": true,
1017
+ "nulls": "last"
1018
+ }
1019
+ ],
1020
+ "isUnique": false,
1021
+ "concurrently": false,
1022
+ "method": "btree",
1023
+ "with": {}
1024
+ }
1025
+ },
1026
+ "foreignKeys": {},
1027
+ "compositePrimaryKeys": {},
1028
+ "uniqueConstraints": {},
1029
+ "policies": {},
1030
+ "checkConstraints": {},
1031
+ "isRLSEnabled": false
1032
+ },
1033
+ "public.refresh_tokens": {
1034
+ "name": "refresh_tokens",
1035
+ "schema": "",
1036
+ "columns": {
1037
+ "id": {
1038
+ "name": "id",
1039
+ "type": "text",
1040
+ "primaryKey": true,
1041
+ "notNull": true
1042
+ },
1043
+ "customer_id": {
1044
+ "name": "customer_id",
1045
+ "type": "text",
1046
+ "primaryKey": false,
1047
+ "notNull": true
1048
+ },
1049
+ "token_hash": {
1050
+ "name": "token_hash",
1051
+ "type": "text",
1052
+ "primaryKey": false,
1053
+ "notNull": true
1054
+ },
1055
+ "revoked_at": {
1056
+ "name": "revoked_at",
1057
+ "type": "timestamp with time zone",
1058
+ "primaryKey": false,
1059
+ "notNull": false
1060
+ },
1061
+ "replaced_by_jti": {
1062
+ "name": "replaced_by_jti",
1063
+ "type": "text",
1064
+ "primaryKey": false,
1065
+ "notNull": false
1066
+ },
1067
+ "expires_at": {
1068
+ "name": "expires_at",
1069
+ "type": "timestamp with time zone",
1070
+ "primaryKey": false,
1071
+ "notNull": true
1072
+ },
1073
+ "created_at": {
1074
+ "name": "created_at",
1075
+ "type": "timestamp with time zone",
1076
+ "primaryKey": false,
1077
+ "notNull": true
1078
+ }
1079
+ },
1080
+ "indexes": {
1081
+ "refresh_tokens_customer_idx": {
1082
+ "name": "refresh_tokens_customer_idx",
1083
+ "columns": [
1084
+ {
1085
+ "expression": "customer_id",
1086
+ "isExpression": false,
1087
+ "asc": true,
1088
+ "nulls": "last"
1089
+ }
1090
+ ],
1091
+ "isUnique": false,
1092
+ "concurrently": false,
1093
+ "method": "btree",
1094
+ "with": {}
1095
+ }
1096
+ },
1097
+ "foreignKeys": {},
1098
+ "compositePrimaryKeys": {},
1099
+ "uniqueConstraints": {},
1100
+ "policies": {},
1101
+ "checkConstraints": {},
1102
+ "isRLSEnabled": false
1103
+ },
1104
+ "public.reviews": {
1105
+ "name": "reviews",
1106
+ "schema": "",
1107
+ "columns": {
1108
+ "id": {
1109
+ "name": "id",
1110
+ "type": "text",
1111
+ "primaryKey": true,
1112
+ "notNull": true
1113
+ },
1114
+ "product_id": {
1115
+ "name": "product_id",
1116
+ "type": "text",
1117
+ "primaryKey": false,
1118
+ "notNull": true
1119
+ },
1120
+ "customer_id": {
1121
+ "name": "customer_id",
1122
+ "type": "text",
1123
+ "primaryKey": false,
1124
+ "notNull": false
1125
+ },
1126
+ "order_id": {
1127
+ "name": "order_id",
1128
+ "type": "text",
1129
+ "primaryKey": false,
1130
+ "notNull": false
1131
+ },
1132
+ "rating": {
1133
+ "name": "rating",
1134
+ "type": "integer",
1135
+ "primaryKey": false,
1136
+ "notNull": true
1137
+ },
1138
+ "title": {
1139
+ "name": "title",
1140
+ "type": "text",
1141
+ "primaryKey": false,
1142
+ "notNull": true,
1143
+ "default": "''"
1144
+ },
1145
+ "body": {
1146
+ "name": "body",
1147
+ "type": "text",
1148
+ "primaryKey": false,
1149
+ "notNull": true,
1150
+ "default": "''"
1151
+ },
1152
+ "moderation_status": {
1153
+ "name": "moderation_status",
1154
+ "type": "text",
1155
+ "primaryKey": false,
1156
+ "notNull": true,
1157
+ "default": "'pending'"
1158
+ },
1159
+ "submitted_at": {
1160
+ "name": "submitted_at",
1161
+ "type": "timestamp with time zone",
1162
+ "primaryKey": false,
1163
+ "notNull": true
1164
+ },
1165
+ "moderated_at": {
1166
+ "name": "moderated_at",
1167
+ "type": "timestamp with time zone",
1168
+ "primaryKey": false,
1169
+ "notNull": false
1170
+ },
1171
+ "moderated_by": {
1172
+ "name": "moderated_by",
1173
+ "type": "text",
1174
+ "primaryKey": false,
1175
+ "notNull": false
1176
+ }
1177
+ },
1178
+ "indexes": {
1179
+ "reviews_product_idx": {
1180
+ "name": "reviews_product_idx",
1181
+ "columns": [
1182
+ {
1183
+ "expression": "product_id",
1184
+ "isExpression": false,
1185
+ "asc": true,
1186
+ "nulls": "last"
1187
+ }
1188
+ ],
1189
+ "isUnique": false,
1190
+ "concurrently": false,
1191
+ "method": "btree",
1192
+ "with": {}
1193
+ },
1194
+ "reviews_status_idx": {
1195
+ "name": "reviews_status_idx",
1196
+ "columns": [
1197
+ {
1198
+ "expression": "moderation_status",
1199
+ "isExpression": false,
1200
+ "asc": true,
1201
+ "nulls": "last"
1202
+ }
1203
+ ],
1204
+ "isUnique": false,
1205
+ "concurrently": false,
1206
+ "method": "btree",
1207
+ "with": {}
1208
+ }
1209
+ },
1210
+ "foreignKeys": {},
1211
+ "compositePrimaryKeys": {},
1212
+ "uniqueConstraints": {},
1213
+ "policies": {},
1214
+ "checkConstraints": {},
1215
+ "isRLSEnabled": false
1216
+ },
1217
+ "public.stock_adjustments": {
1218
+ "name": "stock_adjustments",
1219
+ "schema": "",
1220
+ "columns": {
1221
+ "id": {
1222
+ "name": "id",
1223
+ "type": "text",
1224
+ "primaryKey": true,
1225
+ "notNull": true
1226
+ },
1227
+ "variant_id": {
1228
+ "name": "variant_id",
1229
+ "type": "text",
1230
+ "primaryKey": false,
1231
+ "notNull": true
1232
+ },
1233
+ "adjustment": {
1234
+ "name": "adjustment",
1235
+ "type": "integer",
1236
+ "primaryKey": false,
1237
+ "notNull": true
1238
+ },
1239
+ "reason": {
1240
+ "name": "reason",
1241
+ "type": "text",
1242
+ "primaryKey": false,
1243
+ "notNull": true
1244
+ },
1245
+ "actor": {
1246
+ "name": "actor",
1247
+ "type": "text",
1248
+ "primaryKey": false,
1249
+ "notNull": true
1250
+ },
1251
+ "previous_qty": {
1252
+ "name": "previous_qty",
1253
+ "type": "integer",
1254
+ "primaryKey": false,
1255
+ "notNull": true
1256
+ },
1257
+ "new_qty": {
1258
+ "name": "new_qty",
1259
+ "type": "integer",
1260
+ "primaryKey": false,
1261
+ "notNull": true
1262
+ },
1263
+ "timestamp": {
1264
+ "name": "timestamp",
1265
+ "type": "timestamp with time zone",
1266
+ "primaryKey": false,
1267
+ "notNull": true
1268
+ }
1269
+ },
1270
+ "indexes": {
1271
+ "stock_adjustments_variant_idx": {
1272
+ "name": "stock_adjustments_variant_idx",
1273
+ "columns": [
1274
+ {
1275
+ "expression": "variant_id",
1276
+ "isExpression": false,
1277
+ "asc": true,
1278
+ "nulls": "last"
1279
+ }
1280
+ ],
1281
+ "isUnique": false,
1282
+ "concurrently": false,
1283
+ "method": "btree",
1284
+ "with": {}
1285
+ }
1286
+ },
1287
+ "foreignKeys": {},
1288
+ "compositePrimaryKeys": {},
1289
+ "uniqueConstraints": {},
1290
+ "policies": {},
1291
+ "checkConstraints": {},
1292
+ "isRLSEnabled": false
1293
+ },
1294
+ "public.variants": {
1295
+ "name": "variants",
1296
+ "schema": "",
1297
+ "columns": {
1298
+ "id": {
1299
+ "name": "id",
1300
+ "type": "text",
1301
+ "primaryKey": true,
1302
+ "notNull": true
1303
+ },
1304
+ "product_id": {
1305
+ "name": "product_id",
1306
+ "type": "text",
1307
+ "primaryKey": false,
1308
+ "notNull": true
1309
+ },
1310
+ "sku": {
1311
+ "name": "sku",
1312
+ "type": "text",
1313
+ "primaryKey": false,
1314
+ "notNull": true
1315
+ },
1316
+ "name": {
1317
+ "name": "name",
1318
+ "type": "text",
1319
+ "primaryKey": false,
1320
+ "notNull": true,
1321
+ "default": "''"
1322
+ },
1323
+ "price_minor": {
1324
+ "name": "price_minor",
1325
+ "type": "integer",
1326
+ "primaryKey": false,
1327
+ "notNull": true
1328
+ },
1329
+ "compare_at_price_minor": {
1330
+ "name": "compare_at_price_minor",
1331
+ "type": "integer",
1332
+ "primaryKey": false,
1333
+ "notNull": false
1334
+ },
1335
+ "weight_grams": {
1336
+ "name": "weight_grams",
1337
+ "type": "integer",
1338
+ "primaryKey": false,
1339
+ "notNull": false
1340
+ },
1341
+ "dimensions": {
1342
+ "name": "dimensions",
1343
+ "type": "jsonb",
1344
+ "primaryKey": false,
1345
+ "notNull": false
1346
+ },
1347
+ "stock": {
1348
+ "name": "stock",
1349
+ "type": "integer",
1350
+ "primaryKey": false,
1351
+ "notNull": true,
1352
+ "default": 0
1353
+ },
1354
+ "low_stock_threshold": {
1355
+ "name": "low_stock_threshold",
1356
+ "type": "integer",
1357
+ "primaryKey": false,
1358
+ "notNull": true,
1359
+ "default": 0
1360
+ },
1361
+ "options": {
1362
+ "name": "options",
1363
+ "type": "jsonb",
1364
+ "primaryKey": false,
1365
+ "notNull": true,
1366
+ "default": "'[]'::jsonb"
1367
+ },
1368
+ "status": {
1369
+ "name": "status",
1370
+ "type": "text",
1371
+ "primaryKey": false,
1372
+ "notNull": true,
1373
+ "default": "'active'"
1374
+ },
1375
+ "created_at": {
1376
+ "name": "created_at",
1377
+ "type": "timestamp with time zone",
1378
+ "primaryKey": false,
1379
+ "notNull": true
1380
+ },
1381
+ "updated_at": {
1382
+ "name": "updated_at",
1383
+ "type": "timestamp with time zone",
1384
+ "primaryKey": false,
1385
+ "notNull": true
1386
+ }
1387
+ },
1388
+ "indexes": {
1389
+ "variants_sku_unique": {
1390
+ "name": "variants_sku_unique",
1391
+ "columns": [
1392
+ {
1393
+ "expression": "sku",
1394
+ "isExpression": false,
1395
+ "asc": true,
1396
+ "nulls": "last"
1397
+ }
1398
+ ],
1399
+ "isUnique": true,
1400
+ "concurrently": false,
1401
+ "method": "btree",
1402
+ "with": {}
1403
+ },
1404
+ "variants_product_idx": {
1405
+ "name": "variants_product_idx",
1406
+ "columns": [
1407
+ {
1408
+ "expression": "product_id",
1409
+ "isExpression": false,
1410
+ "asc": true,
1411
+ "nulls": "last"
1412
+ }
1413
+ ],
1414
+ "isUnique": false,
1415
+ "concurrently": false,
1416
+ "method": "btree",
1417
+ "with": {}
1418
+ }
1419
+ },
1420
+ "foreignKeys": {},
1421
+ "compositePrimaryKeys": {},
1422
+ "uniqueConstraints": {},
1423
+ "policies": {},
1424
+ "checkConstraints": {},
1425
+ "isRLSEnabled": false
1426
+ }
1427
+ },
1428
+ "enums": {},
1429
+ "schemas": {},
1430
+ "sequences": {},
1431
+ "roles": {},
1432
+ "policies": {},
1433
+ "views": {},
1434
+ "_meta": {
1435
+ "columns": {},
1436
+ "schemas": {},
1437
+ "tables": {}
1438
+ }
1439
+ }