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