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