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