@nymbalhq/platform 0.0.0-stage → 1.0.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 +1373 -0
  11. package/dist/index.js +6462 -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 +85 -3
  48. package/README.md +0 -3
@@ -0,0 +1,1172 @@
1
+ {
2
+ "id": "bd446f60-e654-46c3-8eda-cc7b7825a9ac",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
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.inventory_reservations": {
211
+ "name": "inventory_reservations",
212
+ "schema": "",
213
+ "columns": {
214
+ "reservation_id": {
215
+ "name": "reservation_id",
216
+ "type": "text",
217
+ "primaryKey": true,
218
+ "notNull": true
219
+ },
220
+ "variant_id": {
221
+ "name": "variant_id",
222
+ "type": "text",
223
+ "primaryKey": false,
224
+ "notNull": true
225
+ },
226
+ "qty": {
227
+ "name": "qty",
228
+ "type": "integer",
229
+ "primaryKey": false,
230
+ "notNull": true
231
+ },
232
+ "order_ref": {
233
+ "name": "order_ref",
234
+ "type": "text",
235
+ "primaryKey": false,
236
+ "notNull": false
237
+ },
238
+ "expires_at": {
239
+ "name": "expires_at",
240
+ "type": "timestamp with time zone",
241
+ "primaryKey": false,
242
+ "notNull": true
243
+ },
244
+ "created_at": {
245
+ "name": "created_at",
246
+ "type": "timestamp with time zone",
247
+ "primaryKey": false,
248
+ "notNull": true
249
+ }
250
+ },
251
+ "indexes": {
252
+ "inv_reservations_variant_idx": {
253
+ "name": "inv_reservations_variant_idx",
254
+ "columns": [
255
+ {
256
+ "expression": "variant_id",
257
+ "isExpression": false,
258
+ "asc": true,
259
+ "nulls": "last"
260
+ }
261
+ ],
262
+ "isUnique": false,
263
+ "concurrently": false,
264
+ "method": "btree",
265
+ "with": {}
266
+ },
267
+ "inv_reservations_expires_idx": {
268
+ "name": "inv_reservations_expires_idx",
269
+ "columns": [
270
+ {
271
+ "expression": "expires_at",
272
+ "isExpression": false,
273
+ "asc": true,
274
+ "nulls": "last"
275
+ }
276
+ ],
277
+ "isUnique": false,
278
+ "concurrently": false,
279
+ "method": "btree",
280
+ "with": {}
281
+ }
282
+ },
283
+ "foreignKeys": {},
284
+ "compositePrimaryKeys": {},
285
+ "uniqueConstraints": {},
286
+ "policies": {},
287
+ "checkConstraints": {},
288
+ "isRLSEnabled": false
289
+ },
290
+ "public.order_history": {
291
+ "name": "order_history",
292
+ "schema": "",
293
+ "columns": {
294
+ "id": {
295
+ "name": "id",
296
+ "type": "text",
297
+ "primaryKey": true,
298
+ "notNull": true
299
+ },
300
+ "order_id": {
301
+ "name": "order_id",
302
+ "type": "text",
303
+ "primaryKey": false,
304
+ "notNull": true
305
+ },
306
+ "from_status": {
307
+ "name": "from_status",
308
+ "type": "text",
309
+ "primaryKey": false,
310
+ "notNull": false
311
+ },
312
+ "to_status": {
313
+ "name": "to_status",
314
+ "type": "text",
315
+ "primaryKey": false,
316
+ "notNull": true
317
+ },
318
+ "actor": {
319
+ "name": "actor",
320
+ "type": "text",
321
+ "primaryKey": false,
322
+ "notNull": true
323
+ },
324
+ "note": {
325
+ "name": "note",
326
+ "type": "text",
327
+ "primaryKey": false,
328
+ "notNull": true,
329
+ "default": "''"
330
+ },
331
+ "timestamp": {
332
+ "name": "timestamp",
333
+ "type": "timestamp with time zone",
334
+ "primaryKey": false,
335
+ "notNull": true
336
+ }
337
+ },
338
+ "indexes": {
339
+ "order_history_order_idx": {
340
+ "name": "order_history_order_idx",
341
+ "columns": [
342
+ {
343
+ "expression": "order_id",
344
+ "isExpression": false,
345
+ "asc": true,
346
+ "nulls": "last"
347
+ }
348
+ ],
349
+ "isUnique": false,
350
+ "concurrently": false,
351
+ "method": "btree",
352
+ "with": {}
353
+ }
354
+ },
355
+ "foreignKeys": {},
356
+ "compositePrimaryKeys": {},
357
+ "uniqueConstraints": {},
358
+ "policies": {},
359
+ "checkConstraints": {},
360
+ "isRLSEnabled": false
361
+ },
362
+ "public.order_sequences": {
363
+ "name": "order_sequences",
364
+ "schema": "",
365
+ "columns": {
366
+ "id": {
367
+ "name": "id",
368
+ "type": "integer",
369
+ "primaryKey": true,
370
+ "notNull": true
371
+ },
372
+ "next_value": {
373
+ "name": "next_value",
374
+ "type": "integer",
375
+ "primaryKey": false,
376
+ "notNull": true
377
+ }
378
+ },
379
+ "indexes": {},
380
+ "foreignKeys": {},
381
+ "compositePrimaryKeys": {},
382
+ "uniqueConstraints": {},
383
+ "policies": {},
384
+ "checkConstraints": {},
385
+ "isRLSEnabled": false
386
+ },
387
+ "public.orders": {
388
+ "name": "orders",
389
+ "schema": "",
390
+ "columns": {
391
+ "id": {
392
+ "name": "id",
393
+ "type": "text",
394
+ "primaryKey": true,
395
+ "notNull": true
396
+ },
397
+ "order_number": {
398
+ "name": "order_number",
399
+ "type": "text",
400
+ "primaryKey": false,
401
+ "notNull": true
402
+ },
403
+ "sequence": {
404
+ "name": "sequence",
405
+ "type": "integer",
406
+ "primaryKey": false,
407
+ "notNull": true
408
+ },
409
+ "customer_id": {
410
+ "name": "customer_id",
411
+ "type": "text",
412
+ "primaryKey": false,
413
+ "notNull": false
414
+ },
415
+ "status": {
416
+ "name": "status",
417
+ "type": "text",
418
+ "primaryKey": false,
419
+ "notNull": true,
420
+ "default": "'pending'"
421
+ },
422
+ "email": {
423
+ "name": "email",
424
+ "type": "text",
425
+ "primaryKey": false,
426
+ "notNull": true
427
+ },
428
+ "billing_address": {
429
+ "name": "billing_address",
430
+ "type": "jsonb",
431
+ "primaryKey": false,
432
+ "notNull": true
433
+ },
434
+ "shipping_address": {
435
+ "name": "shipping_address",
436
+ "type": "jsonb",
437
+ "primaryKey": false,
438
+ "notNull": true
439
+ },
440
+ "line_items": {
441
+ "name": "line_items",
442
+ "type": "jsonb",
443
+ "primaryKey": false,
444
+ "notNull": true
445
+ },
446
+ "subtotal_minor": {
447
+ "name": "subtotal_minor",
448
+ "type": "integer",
449
+ "primaryKey": false,
450
+ "notNull": true
451
+ },
452
+ "tax_total_minor": {
453
+ "name": "tax_total_minor",
454
+ "type": "integer",
455
+ "primaryKey": false,
456
+ "notNull": true,
457
+ "default": 0
458
+ },
459
+ "shipping_total_minor": {
460
+ "name": "shipping_total_minor",
461
+ "type": "integer",
462
+ "primaryKey": false,
463
+ "notNull": true,
464
+ "default": 0
465
+ },
466
+ "discount_total_minor": {
467
+ "name": "discount_total_minor",
468
+ "type": "integer",
469
+ "primaryKey": false,
470
+ "notNull": true,
471
+ "default": 0
472
+ },
473
+ "total_minor": {
474
+ "name": "total_minor",
475
+ "type": "integer",
476
+ "primaryKey": false,
477
+ "notNull": true
478
+ },
479
+ "currency": {
480
+ "name": "currency",
481
+ "type": "text",
482
+ "primaryKey": false,
483
+ "notNull": true
484
+ },
485
+ "notes": {
486
+ "name": "notes",
487
+ "type": "text",
488
+ "primaryKey": false,
489
+ "notNull": true,
490
+ "default": "''"
491
+ },
492
+ "metadata": {
493
+ "name": "metadata",
494
+ "type": "jsonb",
495
+ "primaryKey": false,
496
+ "notNull": true,
497
+ "default": "'{}'::jsonb"
498
+ },
499
+ "payment_intent_id": {
500
+ "name": "payment_intent_id",
501
+ "type": "text",
502
+ "primaryKey": false,
503
+ "notNull": false
504
+ },
505
+ "created_at": {
506
+ "name": "created_at",
507
+ "type": "timestamp with time zone",
508
+ "primaryKey": false,
509
+ "notNull": true
510
+ },
511
+ "updated_at": {
512
+ "name": "updated_at",
513
+ "type": "timestamp with time zone",
514
+ "primaryKey": false,
515
+ "notNull": true
516
+ }
517
+ },
518
+ "indexes": {
519
+ "orders_number_unique": {
520
+ "name": "orders_number_unique",
521
+ "columns": [
522
+ {
523
+ "expression": "order_number",
524
+ "isExpression": false,
525
+ "asc": true,
526
+ "nulls": "last"
527
+ }
528
+ ],
529
+ "isUnique": true,
530
+ "concurrently": false,
531
+ "method": "btree",
532
+ "with": {}
533
+ },
534
+ "orders_sequence_unique": {
535
+ "name": "orders_sequence_unique",
536
+ "columns": [
537
+ {
538
+ "expression": "sequence",
539
+ "isExpression": false,
540
+ "asc": true,
541
+ "nulls": "last"
542
+ }
543
+ ],
544
+ "isUnique": true,
545
+ "concurrently": false,
546
+ "method": "btree",
547
+ "with": {}
548
+ },
549
+ "orders_customer_idx": {
550
+ "name": "orders_customer_idx",
551
+ "columns": [
552
+ {
553
+ "expression": "customer_id",
554
+ "isExpression": false,
555
+ "asc": true,
556
+ "nulls": "last"
557
+ }
558
+ ],
559
+ "isUnique": false,
560
+ "concurrently": false,
561
+ "method": "btree",
562
+ "with": {}
563
+ },
564
+ "orders_status_idx": {
565
+ "name": "orders_status_idx",
566
+ "columns": [
567
+ {
568
+ "expression": "status",
569
+ "isExpression": false,
570
+ "asc": true,
571
+ "nulls": "last"
572
+ }
573
+ ],
574
+ "isUnique": false,
575
+ "concurrently": false,
576
+ "method": "btree",
577
+ "with": {}
578
+ }
579
+ },
580
+ "foreignKeys": {},
581
+ "compositePrimaryKeys": {},
582
+ "uniqueConstraints": {},
583
+ "policies": {},
584
+ "checkConstraints": {},
585
+ "isRLSEnabled": false
586
+ },
587
+ "public.product_categories": {
588
+ "name": "product_categories",
589
+ "schema": "",
590
+ "columns": {
591
+ "product_id": {
592
+ "name": "product_id",
593
+ "type": "text",
594
+ "primaryKey": false,
595
+ "notNull": true
596
+ },
597
+ "category_id": {
598
+ "name": "category_id",
599
+ "type": "text",
600
+ "primaryKey": false,
601
+ "notNull": true
602
+ }
603
+ },
604
+ "indexes": {
605
+ "product_categories_category_idx": {
606
+ "name": "product_categories_category_idx",
607
+ "columns": [
608
+ {
609
+ "expression": "category_id",
610
+ "isExpression": false,
611
+ "asc": true,
612
+ "nulls": "last"
613
+ }
614
+ ],
615
+ "isUnique": false,
616
+ "concurrently": false,
617
+ "method": "btree",
618
+ "with": {}
619
+ }
620
+ },
621
+ "foreignKeys": {},
622
+ "compositePrimaryKeys": {
623
+ "product_categories_product_id_category_id_pk": {
624
+ "name": "product_categories_product_id_category_id_pk",
625
+ "columns": [
626
+ "product_id",
627
+ "category_id"
628
+ ]
629
+ }
630
+ },
631
+ "uniqueConstraints": {},
632
+ "policies": {},
633
+ "checkConstraints": {},
634
+ "isRLSEnabled": false
635
+ },
636
+ "public.products": {
637
+ "name": "products",
638
+ "schema": "",
639
+ "columns": {
640
+ "id": {
641
+ "name": "id",
642
+ "type": "text",
643
+ "primaryKey": true,
644
+ "notNull": true
645
+ },
646
+ "slug": {
647
+ "name": "slug",
648
+ "type": "text",
649
+ "primaryKey": false,
650
+ "notNull": true
651
+ },
652
+ "name": {
653
+ "name": "name",
654
+ "type": "text",
655
+ "primaryKey": false,
656
+ "notNull": true
657
+ },
658
+ "description": {
659
+ "name": "description",
660
+ "type": "text",
661
+ "primaryKey": false,
662
+ "notNull": true,
663
+ "default": "''"
664
+ },
665
+ "short_description": {
666
+ "name": "short_description",
667
+ "type": "text",
668
+ "primaryKey": false,
669
+ "notNull": true,
670
+ "default": "''"
671
+ },
672
+ "status": {
673
+ "name": "status",
674
+ "type": "text",
675
+ "primaryKey": false,
676
+ "notNull": true,
677
+ "default": "'draft'"
678
+ },
679
+ "type": {
680
+ "name": "type",
681
+ "type": "text",
682
+ "primaryKey": false,
683
+ "notNull": true,
684
+ "default": "'simple'"
685
+ },
686
+ "seo_title": {
687
+ "name": "seo_title",
688
+ "type": "text",
689
+ "primaryKey": false,
690
+ "notNull": true,
691
+ "default": "''"
692
+ },
693
+ "seo_description": {
694
+ "name": "seo_description",
695
+ "type": "text",
696
+ "primaryKey": false,
697
+ "notNull": true,
698
+ "default": "''"
699
+ },
700
+ "media": {
701
+ "name": "media",
702
+ "type": "jsonb",
703
+ "primaryKey": false,
704
+ "notNull": true,
705
+ "default": "'[]'::jsonb"
706
+ },
707
+ "metadata": {
708
+ "name": "metadata",
709
+ "type": "jsonb",
710
+ "primaryKey": false,
711
+ "notNull": true,
712
+ "default": "'{}'::jsonb"
713
+ },
714
+ "created_at": {
715
+ "name": "created_at",
716
+ "type": "timestamp with time zone",
717
+ "primaryKey": false,
718
+ "notNull": true
719
+ },
720
+ "updated_at": {
721
+ "name": "updated_at",
722
+ "type": "timestamp with time zone",
723
+ "primaryKey": false,
724
+ "notNull": true
725
+ }
726
+ },
727
+ "indexes": {
728
+ "products_slug_unique": {
729
+ "name": "products_slug_unique",
730
+ "columns": [
731
+ {
732
+ "expression": "slug",
733
+ "isExpression": false,
734
+ "asc": true,
735
+ "nulls": "last"
736
+ }
737
+ ],
738
+ "isUnique": true,
739
+ "concurrently": false,
740
+ "method": "btree",
741
+ "with": {}
742
+ },
743
+ "products_status_idx": {
744
+ "name": "products_status_idx",
745
+ "columns": [
746
+ {
747
+ "expression": "status",
748
+ "isExpression": false,
749
+ "asc": true,
750
+ "nulls": "last"
751
+ }
752
+ ],
753
+ "isUnique": false,
754
+ "concurrently": false,
755
+ "method": "btree",
756
+ "with": {}
757
+ }
758
+ },
759
+ "foreignKeys": {},
760
+ "compositePrimaryKeys": {},
761
+ "uniqueConstraints": {},
762
+ "policies": {},
763
+ "checkConstraints": {},
764
+ "isRLSEnabled": false
765
+ },
766
+ "public.refresh_tokens": {
767
+ "name": "refresh_tokens",
768
+ "schema": "",
769
+ "columns": {
770
+ "id": {
771
+ "name": "id",
772
+ "type": "text",
773
+ "primaryKey": true,
774
+ "notNull": true
775
+ },
776
+ "customer_id": {
777
+ "name": "customer_id",
778
+ "type": "text",
779
+ "primaryKey": false,
780
+ "notNull": true
781
+ },
782
+ "token_hash": {
783
+ "name": "token_hash",
784
+ "type": "text",
785
+ "primaryKey": false,
786
+ "notNull": true
787
+ },
788
+ "revoked_at": {
789
+ "name": "revoked_at",
790
+ "type": "timestamp with time zone",
791
+ "primaryKey": false,
792
+ "notNull": false
793
+ },
794
+ "replaced_by_jti": {
795
+ "name": "replaced_by_jti",
796
+ "type": "text",
797
+ "primaryKey": false,
798
+ "notNull": false
799
+ },
800
+ "expires_at": {
801
+ "name": "expires_at",
802
+ "type": "timestamp with time zone",
803
+ "primaryKey": false,
804
+ "notNull": true
805
+ },
806
+ "created_at": {
807
+ "name": "created_at",
808
+ "type": "timestamp with time zone",
809
+ "primaryKey": false,
810
+ "notNull": true
811
+ }
812
+ },
813
+ "indexes": {
814
+ "refresh_tokens_customer_idx": {
815
+ "name": "refresh_tokens_customer_idx",
816
+ "columns": [
817
+ {
818
+ "expression": "customer_id",
819
+ "isExpression": false,
820
+ "asc": true,
821
+ "nulls": "last"
822
+ }
823
+ ],
824
+ "isUnique": false,
825
+ "concurrently": false,
826
+ "method": "btree",
827
+ "with": {}
828
+ }
829
+ },
830
+ "foreignKeys": {},
831
+ "compositePrimaryKeys": {},
832
+ "uniqueConstraints": {},
833
+ "policies": {},
834
+ "checkConstraints": {},
835
+ "isRLSEnabled": false
836
+ },
837
+ "public.reviews": {
838
+ "name": "reviews",
839
+ "schema": "",
840
+ "columns": {
841
+ "id": {
842
+ "name": "id",
843
+ "type": "text",
844
+ "primaryKey": true,
845
+ "notNull": true
846
+ },
847
+ "product_id": {
848
+ "name": "product_id",
849
+ "type": "text",
850
+ "primaryKey": false,
851
+ "notNull": true
852
+ },
853
+ "customer_id": {
854
+ "name": "customer_id",
855
+ "type": "text",
856
+ "primaryKey": false,
857
+ "notNull": false
858
+ },
859
+ "order_id": {
860
+ "name": "order_id",
861
+ "type": "text",
862
+ "primaryKey": false,
863
+ "notNull": false
864
+ },
865
+ "rating": {
866
+ "name": "rating",
867
+ "type": "integer",
868
+ "primaryKey": false,
869
+ "notNull": true
870
+ },
871
+ "title": {
872
+ "name": "title",
873
+ "type": "text",
874
+ "primaryKey": false,
875
+ "notNull": true,
876
+ "default": "''"
877
+ },
878
+ "body": {
879
+ "name": "body",
880
+ "type": "text",
881
+ "primaryKey": false,
882
+ "notNull": true,
883
+ "default": "''"
884
+ },
885
+ "moderation_status": {
886
+ "name": "moderation_status",
887
+ "type": "text",
888
+ "primaryKey": false,
889
+ "notNull": true,
890
+ "default": "'pending'"
891
+ },
892
+ "submitted_at": {
893
+ "name": "submitted_at",
894
+ "type": "timestamp with time zone",
895
+ "primaryKey": false,
896
+ "notNull": true
897
+ },
898
+ "moderated_at": {
899
+ "name": "moderated_at",
900
+ "type": "timestamp with time zone",
901
+ "primaryKey": false,
902
+ "notNull": false
903
+ },
904
+ "moderated_by": {
905
+ "name": "moderated_by",
906
+ "type": "text",
907
+ "primaryKey": false,
908
+ "notNull": false
909
+ }
910
+ },
911
+ "indexes": {
912
+ "reviews_product_idx": {
913
+ "name": "reviews_product_idx",
914
+ "columns": [
915
+ {
916
+ "expression": "product_id",
917
+ "isExpression": false,
918
+ "asc": true,
919
+ "nulls": "last"
920
+ }
921
+ ],
922
+ "isUnique": false,
923
+ "concurrently": false,
924
+ "method": "btree",
925
+ "with": {}
926
+ },
927
+ "reviews_status_idx": {
928
+ "name": "reviews_status_idx",
929
+ "columns": [
930
+ {
931
+ "expression": "moderation_status",
932
+ "isExpression": false,
933
+ "asc": true,
934
+ "nulls": "last"
935
+ }
936
+ ],
937
+ "isUnique": false,
938
+ "concurrently": false,
939
+ "method": "btree",
940
+ "with": {}
941
+ }
942
+ },
943
+ "foreignKeys": {},
944
+ "compositePrimaryKeys": {},
945
+ "uniqueConstraints": {},
946
+ "policies": {},
947
+ "checkConstraints": {},
948
+ "isRLSEnabled": false
949
+ },
950
+ "public.stock_adjustments": {
951
+ "name": "stock_adjustments",
952
+ "schema": "",
953
+ "columns": {
954
+ "id": {
955
+ "name": "id",
956
+ "type": "text",
957
+ "primaryKey": true,
958
+ "notNull": true
959
+ },
960
+ "variant_id": {
961
+ "name": "variant_id",
962
+ "type": "text",
963
+ "primaryKey": false,
964
+ "notNull": true
965
+ },
966
+ "adjustment": {
967
+ "name": "adjustment",
968
+ "type": "integer",
969
+ "primaryKey": false,
970
+ "notNull": true
971
+ },
972
+ "reason": {
973
+ "name": "reason",
974
+ "type": "text",
975
+ "primaryKey": false,
976
+ "notNull": true
977
+ },
978
+ "actor": {
979
+ "name": "actor",
980
+ "type": "text",
981
+ "primaryKey": false,
982
+ "notNull": true
983
+ },
984
+ "previous_qty": {
985
+ "name": "previous_qty",
986
+ "type": "integer",
987
+ "primaryKey": false,
988
+ "notNull": true
989
+ },
990
+ "new_qty": {
991
+ "name": "new_qty",
992
+ "type": "integer",
993
+ "primaryKey": false,
994
+ "notNull": true
995
+ },
996
+ "timestamp": {
997
+ "name": "timestamp",
998
+ "type": "timestamp with time zone",
999
+ "primaryKey": false,
1000
+ "notNull": true
1001
+ }
1002
+ },
1003
+ "indexes": {
1004
+ "stock_adjustments_variant_idx": {
1005
+ "name": "stock_adjustments_variant_idx",
1006
+ "columns": [
1007
+ {
1008
+ "expression": "variant_id",
1009
+ "isExpression": false,
1010
+ "asc": true,
1011
+ "nulls": "last"
1012
+ }
1013
+ ],
1014
+ "isUnique": false,
1015
+ "concurrently": false,
1016
+ "method": "btree",
1017
+ "with": {}
1018
+ }
1019
+ },
1020
+ "foreignKeys": {},
1021
+ "compositePrimaryKeys": {},
1022
+ "uniqueConstraints": {},
1023
+ "policies": {},
1024
+ "checkConstraints": {},
1025
+ "isRLSEnabled": false
1026
+ },
1027
+ "public.variants": {
1028
+ "name": "variants",
1029
+ "schema": "",
1030
+ "columns": {
1031
+ "id": {
1032
+ "name": "id",
1033
+ "type": "text",
1034
+ "primaryKey": true,
1035
+ "notNull": true
1036
+ },
1037
+ "product_id": {
1038
+ "name": "product_id",
1039
+ "type": "text",
1040
+ "primaryKey": false,
1041
+ "notNull": true
1042
+ },
1043
+ "sku": {
1044
+ "name": "sku",
1045
+ "type": "text",
1046
+ "primaryKey": false,
1047
+ "notNull": true
1048
+ },
1049
+ "name": {
1050
+ "name": "name",
1051
+ "type": "text",
1052
+ "primaryKey": false,
1053
+ "notNull": true,
1054
+ "default": "''"
1055
+ },
1056
+ "price_minor": {
1057
+ "name": "price_minor",
1058
+ "type": "integer",
1059
+ "primaryKey": false,
1060
+ "notNull": true
1061
+ },
1062
+ "compare_at_price_minor": {
1063
+ "name": "compare_at_price_minor",
1064
+ "type": "integer",
1065
+ "primaryKey": false,
1066
+ "notNull": false
1067
+ },
1068
+ "weight_grams": {
1069
+ "name": "weight_grams",
1070
+ "type": "integer",
1071
+ "primaryKey": false,
1072
+ "notNull": false
1073
+ },
1074
+ "dimensions": {
1075
+ "name": "dimensions",
1076
+ "type": "jsonb",
1077
+ "primaryKey": false,
1078
+ "notNull": false
1079
+ },
1080
+ "stock": {
1081
+ "name": "stock",
1082
+ "type": "integer",
1083
+ "primaryKey": false,
1084
+ "notNull": true,
1085
+ "default": 0
1086
+ },
1087
+ "low_stock_threshold": {
1088
+ "name": "low_stock_threshold",
1089
+ "type": "integer",
1090
+ "primaryKey": false,
1091
+ "notNull": true,
1092
+ "default": 0
1093
+ },
1094
+ "options": {
1095
+ "name": "options",
1096
+ "type": "jsonb",
1097
+ "primaryKey": false,
1098
+ "notNull": true,
1099
+ "default": "'[]'::jsonb"
1100
+ },
1101
+ "status": {
1102
+ "name": "status",
1103
+ "type": "text",
1104
+ "primaryKey": false,
1105
+ "notNull": true,
1106
+ "default": "'active'"
1107
+ },
1108
+ "created_at": {
1109
+ "name": "created_at",
1110
+ "type": "timestamp with time zone",
1111
+ "primaryKey": false,
1112
+ "notNull": true
1113
+ },
1114
+ "updated_at": {
1115
+ "name": "updated_at",
1116
+ "type": "timestamp with time zone",
1117
+ "primaryKey": false,
1118
+ "notNull": true
1119
+ }
1120
+ },
1121
+ "indexes": {
1122
+ "variants_sku_unique": {
1123
+ "name": "variants_sku_unique",
1124
+ "columns": [
1125
+ {
1126
+ "expression": "sku",
1127
+ "isExpression": false,
1128
+ "asc": true,
1129
+ "nulls": "last"
1130
+ }
1131
+ ],
1132
+ "isUnique": true,
1133
+ "concurrently": false,
1134
+ "method": "btree",
1135
+ "with": {}
1136
+ },
1137
+ "variants_product_idx": {
1138
+ "name": "variants_product_idx",
1139
+ "columns": [
1140
+ {
1141
+ "expression": "product_id",
1142
+ "isExpression": false,
1143
+ "asc": true,
1144
+ "nulls": "last"
1145
+ }
1146
+ ],
1147
+ "isUnique": false,
1148
+ "concurrently": false,
1149
+ "method": "btree",
1150
+ "with": {}
1151
+ }
1152
+ },
1153
+ "foreignKeys": {},
1154
+ "compositePrimaryKeys": {},
1155
+ "uniqueConstraints": {},
1156
+ "policies": {},
1157
+ "checkConstraints": {},
1158
+ "isRLSEnabled": false
1159
+ }
1160
+ },
1161
+ "enums": {},
1162
+ "schemas": {},
1163
+ "sequences": {},
1164
+ "roles": {},
1165
+ "policies": {},
1166
+ "views": {},
1167
+ "_meta": {
1168
+ "columns": {},
1169
+ "schemas": {},
1170
+ "tables": {}
1171
+ }
1172
+ }