@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,1432 @@
1
+ {
2
+ "id": "13b4f1b7-21fa-462a-80d9-e00d700e5e6d",
3
+ "prevId": "2490f2f4-dc77-462b-b878-fd6bee6b774a",
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
+ "requires_password_reset": {
274
+ "name": "requires_password_reset",
275
+ "type": "boolean",
276
+ "primaryKey": false,
277
+ "notNull": true,
278
+ "default": false
279
+ },
280
+ "created_at": {
281
+ "name": "created_at",
282
+ "type": "timestamp with time zone",
283
+ "primaryKey": false,
284
+ "notNull": true
285
+ },
286
+ "updated_at": {
287
+ "name": "updated_at",
288
+ "type": "timestamp with time zone",
289
+ "primaryKey": false,
290
+ "notNull": true
291
+ }
292
+ },
293
+ "indexes": {
294
+ "customers_email_unique": {
295
+ "name": "customers_email_unique",
296
+ "columns": [
297
+ {
298
+ "expression": "email",
299
+ "isExpression": false,
300
+ "asc": true,
301
+ "nulls": "last"
302
+ }
303
+ ],
304
+ "isUnique": true,
305
+ "concurrently": false,
306
+ "method": "btree",
307
+ "with": {}
308
+ }
309
+ },
310
+ "foreignKeys": {},
311
+ "compositePrimaryKeys": {},
312
+ "uniqueConstraints": {},
313
+ "policies": {},
314
+ "checkConstraints": {},
315
+ "isRLSEnabled": false
316
+ },
317
+ "public.events": {
318
+ "name": "events",
319
+ "schema": "",
320
+ "columns": {
321
+ "seq": {
322
+ "name": "seq",
323
+ "type": "bigserial",
324
+ "primaryKey": true,
325
+ "notNull": true
326
+ },
327
+ "id": {
328
+ "name": "id",
329
+ "type": "text",
330
+ "primaryKey": false,
331
+ "notNull": true
332
+ },
333
+ "type": {
334
+ "name": "type",
335
+ "type": "text",
336
+ "primaryKey": false,
337
+ "notNull": true
338
+ },
339
+ "envelope": {
340
+ "name": "envelope",
341
+ "type": "jsonb",
342
+ "primaryKey": false,
343
+ "notNull": true
344
+ },
345
+ "created_at": {
346
+ "name": "created_at",
347
+ "type": "timestamp with time zone",
348
+ "primaryKey": false,
349
+ "notNull": true
350
+ },
351
+ "delivered_at": {
352
+ "name": "delivered_at",
353
+ "type": "timestamp with time zone",
354
+ "primaryKey": false,
355
+ "notNull": false
356
+ },
357
+ "attempts": {
358
+ "name": "attempts",
359
+ "type": "integer",
360
+ "primaryKey": false,
361
+ "notNull": true,
362
+ "default": 0
363
+ },
364
+ "dead_at": {
365
+ "name": "dead_at",
366
+ "type": "timestamp with time zone",
367
+ "primaryKey": false,
368
+ "notNull": false
369
+ }
370
+ },
371
+ "indexes": {
372
+ "events_id_unique": {
373
+ "name": "events_id_unique",
374
+ "columns": [
375
+ {
376
+ "expression": "id",
377
+ "isExpression": false,
378
+ "asc": true,
379
+ "nulls": "last"
380
+ }
381
+ ],
382
+ "isUnique": true,
383
+ "concurrently": false,
384
+ "method": "btree",
385
+ "with": {}
386
+ },
387
+ "events_undelivered_idx": {
388
+ "name": "events_undelivered_idx",
389
+ "columns": [
390
+ {
391
+ "expression": "delivered_at",
392
+ "isExpression": false,
393
+ "asc": true,
394
+ "nulls": "last"
395
+ },
396
+ {
397
+ "expression": "seq",
398
+ "isExpression": false,
399
+ "asc": true,
400
+ "nulls": "last"
401
+ }
402
+ ],
403
+ "isUnique": false,
404
+ "concurrently": false,
405
+ "method": "btree",
406
+ "with": {}
407
+ }
408
+ },
409
+ "foreignKeys": {},
410
+ "compositePrimaryKeys": {},
411
+ "uniqueConstraints": {},
412
+ "policies": {},
413
+ "checkConstraints": {},
414
+ "isRLSEnabled": false
415
+ },
416
+ "public.inventory_reservations": {
417
+ "name": "inventory_reservations",
418
+ "schema": "",
419
+ "columns": {
420
+ "reservation_id": {
421
+ "name": "reservation_id",
422
+ "type": "text",
423
+ "primaryKey": true,
424
+ "notNull": true
425
+ },
426
+ "variant_id": {
427
+ "name": "variant_id",
428
+ "type": "text",
429
+ "primaryKey": false,
430
+ "notNull": true
431
+ },
432
+ "qty": {
433
+ "name": "qty",
434
+ "type": "integer",
435
+ "primaryKey": false,
436
+ "notNull": true
437
+ },
438
+ "order_ref": {
439
+ "name": "order_ref",
440
+ "type": "text",
441
+ "primaryKey": false,
442
+ "notNull": false
443
+ },
444
+ "expires_at": {
445
+ "name": "expires_at",
446
+ "type": "timestamp with time zone",
447
+ "primaryKey": false,
448
+ "notNull": true
449
+ },
450
+ "created_at": {
451
+ "name": "created_at",
452
+ "type": "timestamp with time zone",
453
+ "primaryKey": false,
454
+ "notNull": true
455
+ }
456
+ },
457
+ "indexes": {
458
+ "inv_reservations_variant_idx": {
459
+ "name": "inv_reservations_variant_idx",
460
+ "columns": [
461
+ {
462
+ "expression": "variant_id",
463
+ "isExpression": false,
464
+ "asc": true,
465
+ "nulls": "last"
466
+ }
467
+ ],
468
+ "isUnique": false,
469
+ "concurrently": false,
470
+ "method": "btree",
471
+ "with": {}
472
+ },
473
+ "inv_reservations_expires_idx": {
474
+ "name": "inv_reservations_expires_idx",
475
+ "columns": [
476
+ {
477
+ "expression": "expires_at",
478
+ "isExpression": false,
479
+ "asc": true,
480
+ "nulls": "last"
481
+ }
482
+ ],
483
+ "isUnique": false,
484
+ "concurrently": false,
485
+ "method": "btree",
486
+ "with": {}
487
+ }
488
+ },
489
+ "foreignKeys": {},
490
+ "compositePrimaryKeys": {},
491
+ "uniqueConstraints": {},
492
+ "policies": {},
493
+ "checkConstraints": {},
494
+ "isRLSEnabled": false
495
+ },
496
+ "public.order_history": {
497
+ "name": "order_history",
498
+ "schema": "",
499
+ "columns": {
500
+ "id": {
501
+ "name": "id",
502
+ "type": "text",
503
+ "primaryKey": true,
504
+ "notNull": true
505
+ },
506
+ "order_id": {
507
+ "name": "order_id",
508
+ "type": "text",
509
+ "primaryKey": false,
510
+ "notNull": true
511
+ },
512
+ "from_status": {
513
+ "name": "from_status",
514
+ "type": "text",
515
+ "primaryKey": false,
516
+ "notNull": false
517
+ },
518
+ "to_status": {
519
+ "name": "to_status",
520
+ "type": "text",
521
+ "primaryKey": false,
522
+ "notNull": true
523
+ },
524
+ "actor": {
525
+ "name": "actor",
526
+ "type": "text",
527
+ "primaryKey": false,
528
+ "notNull": true
529
+ },
530
+ "note": {
531
+ "name": "note",
532
+ "type": "text",
533
+ "primaryKey": false,
534
+ "notNull": true,
535
+ "default": "''"
536
+ },
537
+ "timestamp": {
538
+ "name": "timestamp",
539
+ "type": "timestamp with time zone",
540
+ "primaryKey": false,
541
+ "notNull": true
542
+ }
543
+ },
544
+ "indexes": {
545
+ "order_history_order_idx": {
546
+ "name": "order_history_order_idx",
547
+ "columns": [
548
+ {
549
+ "expression": "order_id",
550
+ "isExpression": false,
551
+ "asc": true,
552
+ "nulls": "last"
553
+ }
554
+ ],
555
+ "isUnique": false,
556
+ "concurrently": false,
557
+ "method": "btree",
558
+ "with": {}
559
+ }
560
+ },
561
+ "foreignKeys": {},
562
+ "compositePrimaryKeys": {},
563
+ "uniqueConstraints": {},
564
+ "policies": {},
565
+ "checkConstraints": {},
566
+ "isRLSEnabled": false
567
+ },
568
+ "public.order_sequences": {
569
+ "name": "order_sequences",
570
+ "schema": "",
571
+ "columns": {
572
+ "id": {
573
+ "name": "id",
574
+ "type": "integer",
575
+ "primaryKey": true,
576
+ "notNull": true
577
+ },
578
+ "next_value": {
579
+ "name": "next_value",
580
+ "type": "integer",
581
+ "primaryKey": false,
582
+ "notNull": true
583
+ }
584
+ },
585
+ "indexes": {},
586
+ "foreignKeys": {},
587
+ "compositePrimaryKeys": {},
588
+ "uniqueConstraints": {},
589
+ "policies": {},
590
+ "checkConstraints": {},
591
+ "isRLSEnabled": false
592
+ },
593
+ "public.orders": {
594
+ "name": "orders",
595
+ "schema": "",
596
+ "columns": {
597
+ "id": {
598
+ "name": "id",
599
+ "type": "text",
600
+ "primaryKey": true,
601
+ "notNull": true
602
+ },
603
+ "order_number": {
604
+ "name": "order_number",
605
+ "type": "text",
606
+ "primaryKey": false,
607
+ "notNull": true
608
+ },
609
+ "sequence": {
610
+ "name": "sequence",
611
+ "type": "integer",
612
+ "primaryKey": false,
613
+ "notNull": true
614
+ },
615
+ "customer_id": {
616
+ "name": "customer_id",
617
+ "type": "text",
618
+ "primaryKey": false,
619
+ "notNull": false
620
+ },
621
+ "status": {
622
+ "name": "status",
623
+ "type": "text",
624
+ "primaryKey": false,
625
+ "notNull": true,
626
+ "default": "'pending'"
627
+ },
628
+ "email": {
629
+ "name": "email",
630
+ "type": "text",
631
+ "primaryKey": false,
632
+ "notNull": true
633
+ },
634
+ "billing_address": {
635
+ "name": "billing_address",
636
+ "type": "jsonb",
637
+ "primaryKey": false,
638
+ "notNull": true
639
+ },
640
+ "shipping_address": {
641
+ "name": "shipping_address",
642
+ "type": "jsonb",
643
+ "primaryKey": false,
644
+ "notNull": true
645
+ },
646
+ "line_items": {
647
+ "name": "line_items",
648
+ "type": "jsonb",
649
+ "primaryKey": false,
650
+ "notNull": true
651
+ },
652
+ "subtotal_minor": {
653
+ "name": "subtotal_minor",
654
+ "type": "integer",
655
+ "primaryKey": false,
656
+ "notNull": true
657
+ },
658
+ "tax_total_minor": {
659
+ "name": "tax_total_minor",
660
+ "type": "integer",
661
+ "primaryKey": false,
662
+ "notNull": true,
663
+ "default": 0
664
+ },
665
+ "shipping_total_minor": {
666
+ "name": "shipping_total_minor",
667
+ "type": "integer",
668
+ "primaryKey": false,
669
+ "notNull": true,
670
+ "default": 0
671
+ },
672
+ "discount_total_minor": {
673
+ "name": "discount_total_minor",
674
+ "type": "integer",
675
+ "primaryKey": false,
676
+ "notNull": true,
677
+ "default": 0
678
+ },
679
+ "total_minor": {
680
+ "name": "total_minor",
681
+ "type": "integer",
682
+ "primaryKey": false,
683
+ "notNull": true
684
+ },
685
+ "currency": {
686
+ "name": "currency",
687
+ "type": "text",
688
+ "primaryKey": false,
689
+ "notNull": true
690
+ },
691
+ "notes": {
692
+ "name": "notes",
693
+ "type": "text",
694
+ "primaryKey": false,
695
+ "notNull": true,
696
+ "default": "''"
697
+ },
698
+ "metadata": {
699
+ "name": "metadata",
700
+ "type": "jsonb",
701
+ "primaryKey": false,
702
+ "notNull": true,
703
+ "default": "'{}'::jsonb"
704
+ },
705
+ "payment_intent_id": {
706
+ "name": "payment_intent_id",
707
+ "type": "text",
708
+ "primaryKey": false,
709
+ "notNull": false
710
+ },
711
+ "created_at": {
712
+ "name": "created_at",
713
+ "type": "timestamp with time zone",
714
+ "primaryKey": false,
715
+ "notNull": true
716
+ },
717
+ "updated_at": {
718
+ "name": "updated_at",
719
+ "type": "timestamp with time zone",
720
+ "primaryKey": false,
721
+ "notNull": true
722
+ }
723
+ },
724
+ "indexes": {
725
+ "orders_number_unique": {
726
+ "name": "orders_number_unique",
727
+ "columns": [
728
+ {
729
+ "expression": "order_number",
730
+ "isExpression": false,
731
+ "asc": true,
732
+ "nulls": "last"
733
+ }
734
+ ],
735
+ "isUnique": true,
736
+ "concurrently": false,
737
+ "method": "btree",
738
+ "with": {}
739
+ },
740
+ "orders_sequence_unique": {
741
+ "name": "orders_sequence_unique",
742
+ "columns": [
743
+ {
744
+ "expression": "sequence",
745
+ "isExpression": false,
746
+ "asc": true,
747
+ "nulls": "last"
748
+ }
749
+ ],
750
+ "isUnique": true,
751
+ "concurrently": false,
752
+ "method": "btree",
753
+ "with": {}
754
+ },
755
+ "orders_customer_idx": {
756
+ "name": "orders_customer_idx",
757
+ "columns": [
758
+ {
759
+ "expression": "customer_id",
760
+ "isExpression": false,
761
+ "asc": true,
762
+ "nulls": "last"
763
+ }
764
+ ],
765
+ "isUnique": false,
766
+ "concurrently": false,
767
+ "method": "btree",
768
+ "with": {}
769
+ },
770
+ "orders_status_idx": {
771
+ "name": "orders_status_idx",
772
+ "columns": [
773
+ {
774
+ "expression": "status",
775
+ "isExpression": false,
776
+ "asc": true,
777
+ "nulls": "last"
778
+ }
779
+ ],
780
+ "isUnique": false,
781
+ "concurrently": false,
782
+ "method": "btree",
783
+ "with": {}
784
+ },
785
+ "orders_payment_intent_idx": {
786
+ "name": "orders_payment_intent_idx",
787
+ "columns": [
788
+ {
789
+ "expression": "payment_intent_id",
790
+ "isExpression": false,
791
+ "asc": true,
792
+ "nulls": "last"
793
+ }
794
+ ],
795
+ "isUnique": false,
796
+ "concurrently": false,
797
+ "method": "btree",
798
+ "with": {}
799
+ }
800
+ },
801
+ "foreignKeys": {},
802
+ "compositePrimaryKeys": {},
803
+ "uniqueConstraints": {},
804
+ "policies": {},
805
+ "checkConstraints": {},
806
+ "isRLSEnabled": false
807
+ },
808
+ "public.processed_events": {
809
+ "name": "processed_events",
810
+ "schema": "",
811
+ "columns": {
812
+ "handler_name": {
813
+ "name": "handler_name",
814
+ "type": "text",
815
+ "primaryKey": false,
816
+ "notNull": true
817
+ },
818
+ "event_id": {
819
+ "name": "event_id",
820
+ "type": "text",
821
+ "primaryKey": false,
822
+ "notNull": true
823
+ },
824
+ "processed_at": {
825
+ "name": "processed_at",
826
+ "type": "timestamp with time zone",
827
+ "primaryKey": false,
828
+ "notNull": true
829
+ }
830
+ },
831
+ "indexes": {},
832
+ "foreignKeys": {},
833
+ "compositePrimaryKeys": {
834
+ "processed_events_handler_name_event_id_pk": {
835
+ "name": "processed_events_handler_name_event_id_pk",
836
+ "columns": [
837
+ "handler_name",
838
+ "event_id"
839
+ ]
840
+ }
841
+ },
842
+ "uniqueConstraints": {},
843
+ "policies": {},
844
+ "checkConstraints": {},
845
+ "isRLSEnabled": false
846
+ },
847
+ "public.product_categories": {
848
+ "name": "product_categories",
849
+ "schema": "",
850
+ "columns": {
851
+ "product_id": {
852
+ "name": "product_id",
853
+ "type": "text",
854
+ "primaryKey": false,
855
+ "notNull": true
856
+ },
857
+ "category_id": {
858
+ "name": "category_id",
859
+ "type": "text",
860
+ "primaryKey": false,
861
+ "notNull": true
862
+ }
863
+ },
864
+ "indexes": {
865
+ "product_categories_category_idx": {
866
+ "name": "product_categories_category_idx",
867
+ "columns": [
868
+ {
869
+ "expression": "category_id",
870
+ "isExpression": false,
871
+ "asc": true,
872
+ "nulls": "last"
873
+ }
874
+ ],
875
+ "isUnique": false,
876
+ "concurrently": false,
877
+ "method": "btree",
878
+ "with": {}
879
+ }
880
+ },
881
+ "foreignKeys": {},
882
+ "compositePrimaryKeys": {
883
+ "product_categories_product_id_category_id_pk": {
884
+ "name": "product_categories_product_id_category_id_pk",
885
+ "columns": [
886
+ "product_id",
887
+ "category_id"
888
+ ]
889
+ }
890
+ },
891
+ "uniqueConstraints": {},
892
+ "policies": {},
893
+ "checkConstraints": {},
894
+ "isRLSEnabled": false
895
+ },
896
+ "public.products": {
897
+ "name": "products",
898
+ "schema": "",
899
+ "columns": {
900
+ "id": {
901
+ "name": "id",
902
+ "type": "text",
903
+ "primaryKey": true,
904
+ "notNull": true
905
+ },
906
+ "slug": {
907
+ "name": "slug",
908
+ "type": "text",
909
+ "primaryKey": false,
910
+ "notNull": true
911
+ },
912
+ "name": {
913
+ "name": "name",
914
+ "type": "text",
915
+ "primaryKey": false,
916
+ "notNull": true
917
+ },
918
+ "description": {
919
+ "name": "description",
920
+ "type": "text",
921
+ "primaryKey": false,
922
+ "notNull": true,
923
+ "default": "''"
924
+ },
925
+ "short_description": {
926
+ "name": "short_description",
927
+ "type": "text",
928
+ "primaryKey": false,
929
+ "notNull": true,
930
+ "default": "''"
931
+ },
932
+ "status": {
933
+ "name": "status",
934
+ "type": "text",
935
+ "primaryKey": false,
936
+ "notNull": true,
937
+ "default": "'draft'"
938
+ },
939
+ "type": {
940
+ "name": "type",
941
+ "type": "text",
942
+ "primaryKey": false,
943
+ "notNull": true,
944
+ "default": "'simple'"
945
+ },
946
+ "seo_title": {
947
+ "name": "seo_title",
948
+ "type": "text",
949
+ "primaryKey": false,
950
+ "notNull": true,
951
+ "default": "''"
952
+ },
953
+ "seo_description": {
954
+ "name": "seo_description",
955
+ "type": "text",
956
+ "primaryKey": false,
957
+ "notNull": true,
958
+ "default": "''"
959
+ },
960
+ "media": {
961
+ "name": "media",
962
+ "type": "jsonb",
963
+ "primaryKey": false,
964
+ "notNull": true,
965
+ "default": "'[]'::jsonb"
966
+ },
967
+ "metadata": {
968
+ "name": "metadata",
969
+ "type": "jsonb",
970
+ "primaryKey": false,
971
+ "notNull": true,
972
+ "default": "'{}'::jsonb"
973
+ },
974
+ "created_at": {
975
+ "name": "created_at",
976
+ "type": "timestamp with time zone",
977
+ "primaryKey": false,
978
+ "notNull": true
979
+ },
980
+ "updated_at": {
981
+ "name": "updated_at",
982
+ "type": "timestamp with time zone",
983
+ "primaryKey": false,
984
+ "notNull": true
985
+ }
986
+ },
987
+ "indexes": {
988
+ "products_slug_unique": {
989
+ "name": "products_slug_unique",
990
+ "columns": [
991
+ {
992
+ "expression": "slug",
993
+ "isExpression": false,
994
+ "asc": true,
995
+ "nulls": "last"
996
+ }
997
+ ],
998
+ "isUnique": true,
999
+ "concurrently": false,
1000
+ "method": "btree",
1001
+ "with": {}
1002
+ },
1003
+ "products_status_idx": {
1004
+ "name": "products_status_idx",
1005
+ "columns": [
1006
+ {
1007
+ "expression": "status",
1008
+ "isExpression": false,
1009
+ "asc": true,
1010
+ "nulls": "last"
1011
+ }
1012
+ ],
1013
+ "isUnique": false,
1014
+ "concurrently": false,
1015
+ "method": "btree",
1016
+ "with": {}
1017
+ }
1018
+ },
1019
+ "foreignKeys": {},
1020
+ "compositePrimaryKeys": {},
1021
+ "uniqueConstraints": {},
1022
+ "policies": {},
1023
+ "checkConstraints": {},
1024
+ "isRLSEnabled": false
1025
+ },
1026
+ "public.refresh_tokens": {
1027
+ "name": "refresh_tokens",
1028
+ "schema": "",
1029
+ "columns": {
1030
+ "id": {
1031
+ "name": "id",
1032
+ "type": "text",
1033
+ "primaryKey": true,
1034
+ "notNull": true
1035
+ },
1036
+ "customer_id": {
1037
+ "name": "customer_id",
1038
+ "type": "text",
1039
+ "primaryKey": false,
1040
+ "notNull": true
1041
+ },
1042
+ "token_hash": {
1043
+ "name": "token_hash",
1044
+ "type": "text",
1045
+ "primaryKey": false,
1046
+ "notNull": true
1047
+ },
1048
+ "revoked_at": {
1049
+ "name": "revoked_at",
1050
+ "type": "timestamp with time zone",
1051
+ "primaryKey": false,
1052
+ "notNull": false
1053
+ },
1054
+ "replaced_by_jti": {
1055
+ "name": "replaced_by_jti",
1056
+ "type": "text",
1057
+ "primaryKey": false,
1058
+ "notNull": false
1059
+ },
1060
+ "expires_at": {
1061
+ "name": "expires_at",
1062
+ "type": "timestamp with time zone",
1063
+ "primaryKey": false,
1064
+ "notNull": true
1065
+ },
1066
+ "created_at": {
1067
+ "name": "created_at",
1068
+ "type": "timestamp with time zone",
1069
+ "primaryKey": false,
1070
+ "notNull": true
1071
+ }
1072
+ },
1073
+ "indexes": {
1074
+ "refresh_tokens_customer_idx": {
1075
+ "name": "refresh_tokens_customer_idx",
1076
+ "columns": [
1077
+ {
1078
+ "expression": "customer_id",
1079
+ "isExpression": false,
1080
+ "asc": true,
1081
+ "nulls": "last"
1082
+ }
1083
+ ],
1084
+ "isUnique": false,
1085
+ "concurrently": false,
1086
+ "method": "btree",
1087
+ "with": {}
1088
+ }
1089
+ },
1090
+ "foreignKeys": {},
1091
+ "compositePrimaryKeys": {},
1092
+ "uniqueConstraints": {},
1093
+ "policies": {},
1094
+ "checkConstraints": {},
1095
+ "isRLSEnabled": false
1096
+ },
1097
+ "public.reviews": {
1098
+ "name": "reviews",
1099
+ "schema": "",
1100
+ "columns": {
1101
+ "id": {
1102
+ "name": "id",
1103
+ "type": "text",
1104
+ "primaryKey": true,
1105
+ "notNull": true
1106
+ },
1107
+ "product_id": {
1108
+ "name": "product_id",
1109
+ "type": "text",
1110
+ "primaryKey": false,
1111
+ "notNull": true
1112
+ },
1113
+ "customer_id": {
1114
+ "name": "customer_id",
1115
+ "type": "text",
1116
+ "primaryKey": false,
1117
+ "notNull": false
1118
+ },
1119
+ "order_id": {
1120
+ "name": "order_id",
1121
+ "type": "text",
1122
+ "primaryKey": false,
1123
+ "notNull": false
1124
+ },
1125
+ "rating": {
1126
+ "name": "rating",
1127
+ "type": "integer",
1128
+ "primaryKey": false,
1129
+ "notNull": true
1130
+ },
1131
+ "title": {
1132
+ "name": "title",
1133
+ "type": "text",
1134
+ "primaryKey": false,
1135
+ "notNull": true,
1136
+ "default": "''"
1137
+ },
1138
+ "body": {
1139
+ "name": "body",
1140
+ "type": "text",
1141
+ "primaryKey": false,
1142
+ "notNull": true,
1143
+ "default": "''"
1144
+ },
1145
+ "moderation_status": {
1146
+ "name": "moderation_status",
1147
+ "type": "text",
1148
+ "primaryKey": false,
1149
+ "notNull": true,
1150
+ "default": "'pending'"
1151
+ },
1152
+ "submitted_at": {
1153
+ "name": "submitted_at",
1154
+ "type": "timestamp with time zone",
1155
+ "primaryKey": false,
1156
+ "notNull": true
1157
+ },
1158
+ "moderated_at": {
1159
+ "name": "moderated_at",
1160
+ "type": "timestamp with time zone",
1161
+ "primaryKey": false,
1162
+ "notNull": false
1163
+ },
1164
+ "moderated_by": {
1165
+ "name": "moderated_by",
1166
+ "type": "text",
1167
+ "primaryKey": false,
1168
+ "notNull": false
1169
+ }
1170
+ },
1171
+ "indexes": {
1172
+ "reviews_product_idx": {
1173
+ "name": "reviews_product_idx",
1174
+ "columns": [
1175
+ {
1176
+ "expression": "product_id",
1177
+ "isExpression": false,
1178
+ "asc": true,
1179
+ "nulls": "last"
1180
+ }
1181
+ ],
1182
+ "isUnique": false,
1183
+ "concurrently": false,
1184
+ "method": "btree",
1185
+ "with": {}
1186
+ },
1187
+ "reviews_status_idx": {
1188
+ "name": "reviews_status_idx",
1189
+ "columns": [
1190
+ {
1191
+ "expression": "moderation_status",
1192
+ "isExpression": false,
1193
+ "asc": true,
1194
+ "nulls": "last"
1195
+ }
1196
+ ],
1197
+ "isUnique": false,
1198
+ "concurrently": false,
1199
+ "method": "btree",
1200
+ "with": {}
1201
+ }
1202
+ },
1203
+ "foreignKeys": {},
1204
+ "compositePrimaryKeys": {},
1205
+ "uniqueConstraints": {},
1206
+ "policies": {},
1207
+ "checkConstraints": {},
1208
+ "isRLSEnabled": false
1209
+ },
1210
+ "public.stock_adjustments": {
1211
+ "name": "stock_adjustments",
1212
+ "schema": "",
1213
+ "columns": {
1214
+ "id": {
1215
+ "name": "id",
1216
+ "type": "text",
1217
+ "primaryKey": true,
1218
+ "notNull": true
1219
+ },
1220
+ "variant_id": {
1221
+ "name": "variant_id",
1222
+ "type": "text",
1223
+ "primaryKey": false,
1224
+ "notNull": true
1225
+ },
1226
+ "adjustment": {
1227
+ "name": "adjustment",
1228
+ "type": "integer",
1229
+ "primaryKey": false,
1230
+ "notNull": true
1231
+ },
1232
+ "reason": {
1233
+ "name": "reason",
1234
+ "type": "text",
1235
+ "primaryKey": false,
1236
+ "notNull": true
1237
+ },
1238
+ "actor": {
1239
+ "name": "actor",
1240
+ "type": "text",
1241
+ "primaryKey": false,
1242
+ "notNull": true
1243
+ },
1244
+ "previous_qty": {
1245
+ "name": "previous_qty",
1246
+ "type": "integer",
1247
+ "primaryKey": false,
1248
+ "notNull": true
1249
+ },
1250
+ "new_qty": {
1251
+ "name": "new_qty",
1252
+ "type": "integer",
1253
+ "primaryKey": false,
1254
+ "notNull": true
1255
+ },
1256
+ "timestamp": {
1257
+ "name": "timestamp",
1258
+ "type": "timestamp with time zone",
1259
+ "primaryKey": false,
1260
+ "notNull": true
1261
+ }
1262
+ },
1263
+ "indexes": {
1264
+ "stock_adjustments_variant_idx": {
1265
+ "name": "stock_adjustments_variant_idx",
1266
+ "columns": [
1267
+ {
1268
+ "expression": "variant_id",
1269
+ "isExpression": false,
1270
+ "asc": true,
1271
+ "nulls": "last"
1272
+ }
1273
+ ],
1274
+ "isUnique": false,
1275
+ "concurrently": false,
1276
+ "method": "btree",
1277
+ "with": {}
1278
+ }
1279
+ },
1280
+ "foreignKeys": {},
1281
+ "compositePrimaryKeys": {},
1282
+ "uniqueConstraints": {},
1283
+ "policies": {},
1284
+ "checkConstraints": {},
1285
+ "isRLSEnabled": false
1286
+ },
1287
+ "public.variants": {
1288
+ "name": "variants",
1289
+ "schema": "",
1290
+ "columns": {
1291
+ "id": {
1292
+ "name": "id",
1293
+ "type": "text",
1294
+ "primaryKey": true,
1295
+ "notNull": true
1296
+ },
1297
+ "product_id": {
1298
+ "name": "product_id",
1299
+ "type": "text",
1300
+ "primaryKey": false,
1301
+ "notNull": true
1302
+ },
1303
+ "sku": {
1304
+ "name": "sku",
1305
+ "type": "text",
1306
+ "primaryKey": false,
1307
+ "notNull": true
1308
+ },
1309
+ "name": {
1310
+ "name": "name",
1311
+ "type": "text",
1312
+ "primaryKey": false,
1313
+ "notNull": true,
1314
+ "default": "''"
1315
+ },
1316
+ "price_minor": {
1317
+ "name": "price_minor",
1318
+ "type": "integer",
1319
+ "primaryKey": false,
1320
+ "notNull": true
1321
+ },
1322
+ "compare_at_price_minor": {
1323
+ "name": "compare_at_price_minor",
1324
+ "type": "integer",
1325
+ "primaryKey": false,
1326
+ "notNull": false
1327
+ },
1328
+ "weight_grams": {
1329
+ "name": "weight_grams",
1330
+ "type": "integer",
1331
+ "primaryKey": false,
1332
+ "notNull": false
1333
+ },
1334
+ "dimensions": {
1335
+ "name": "dimensions",
1336
+ "type": "jsonb",
1337
+ "primaryKey": false,
1338
+ "notNull": false
1339
+ },
1340
+ "stock": {
1341
+ "name": "stock",
1342
+ "type": "integer",
1343
+ "primaryKey": false,
1344
+ "notNull": true,
1345
+ "default": 0
1346
+ },
1347
+ "low_stock_threshold": {
1348
+ "name": "low_stock_threshold",
1349
+ "type": "integer",
1350
+ "primaryKey": false,
1351
+ "notNull": true,
1352
+ "default": 0
1353
+ },
1354
+ "options": {
1355
+ "name": "options",
1356
+ "type": "jsonb",
1357
+ "primaryKey": false,
1358
+ "notNull": true,
1359
+ "default": "'[]'::jsonb"
1360
+ },
1361
+ "status": {
1362
+ "name": "status",
1363
+ "type": "text",
1364
+ "primaryKey": false,
1365
+ "notNull": true,
1366
+ "default": "'active'"
1367
+ },
1368
+ "created_at": {
1369
+ "name": "created_at",
1370
+ "type": "timestamp with time zone",
1371
+ "primaryKey": false,
1372
+ "notNull": true
1373
+ },
1374
+ "updated_at": {
1375
+ "name": "updated_at",
1376
+ "type": "timestamp with time zone",
1377
+ "primaryKey": false,
1378
+ "notNull": true
1379
+ }
1380
+ },
1381
+ "indexes": {
1382
+ "variants_sku_unique": {
1383
+ "name": "variants_sku_unique",
1384
+ "columns": [
1385
+ {
1386
+ "expression": "sku",
1387
+ "isExpression": false,
1388
+ "asc": true,
1389
+ "nulls": "last"
1390
+ }
1391
+ ],
1392
+ "isUnique": true,
1393
+ "concurrently": false,
1394
+ "method": "btree",
1395
+ "with": {}
1396
+ },
1397
+ "variants_product_idx": {
1398
+ "name": "variants_product_idx",
1399
+ "columns": [
1400
+ {
1401
+ "expression": "product_id",
1402
+ "isExpression": false,
1403
+ "asc": true,
1404
+ "nulls": "last"
1405
+ }
1406
+ ],
1407
+ "isUnique": false,
1408
+ "concurrently": false,
1409
+ "method": "btree",
1410
+ "with": {}
1411
+ }
1412
+ },
1413
+ "foreignKeys": {},
1414
+ "compositePrimaryKeys": {},
1415
+ "uniqueConstraints": {},
1416
+ "policies": {},
1417
+ "checkConstraints": {},
1418
+ "isRLSEnabled": false
1419
+ }
1420
+ },
1421
+ "enums": {},
1422
+ "schemas": {},
1423
+ "sequences": {},
1424
+ "roles": {},
1425
+ "policies": {},
1426
+ "views": {},
1427
+ "_meta": {
1428
+ "columns": {},
1429
+ "schemas": {},
1430
+ "tables": {}
1431
+ }
1432
+ }