@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,1580 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "2327646a-a596-4c20-8e22-9d06a0e7a47a",
5
+ "prevId": "e6b5bba1-22e6-4893-832e-cf34966d7ca6",
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
+ "events_catch_up_idx": {
399
+ "name": "events_catch_up_idx",
400
+ "columns": [
401
+ "dead_at",
402
+ "delivered_at",
403
+ "seq"
404
+ ],
405
+ "isUnique": false
406
+ }
407
+ },
408
+ "foreignKeys": {},
409
+ "compositePrimaryKeys": {},
410
+ "uniqueConstraints": {},
411
+ "checkConstraints": {}
412
+ },
413
+ "inventory_reservations": {
414
+ "name": "inventory_reservations",
415
+ "columns": {
416
+ "reservation_id": {
417
+ "name": "reservation_id",
418
+ "type": "text",
419
+ "primaryKey": true,
420
+ "notNull": true,
421
+ "autoincrement": false
422
+ },
423
+ "variant_id": {
424
+ "name": "variant_id",
425
+ "type": "text",
426
+ "primaryKey": false,
427
+ "notNull": true,
428
+ "autoincrement": false
429
+ },
430
+ "qty": {
431
+ "name": "qty",
432
+ "type": "integer",
433
+ "primaryKey": false,
434
+ "notNull": true,
435
+ "autoincrement": false
436
+ },
437
+ "order_ref": {
438
+ "name": "order_ref",
439
+ "type": "text",
440
+ "primaryKey": false,
441
+ "notNull": false,
442
+ "autoincrement": false
443
+ },
444
+ "expires_at": {
445
+ "name": "expires_at",
446
+ "type": "text",
447
+ "primaryKey": false,
448
+ "notNull": true,
449
+ "autoincrement": false
450
+ },
451
+ "created_at": {
452
+ "name": "created_at",
453
+ "type": "text",
454
+ "primaryKey": false,
455
+ "notNull": true,
456
+ "autoincrement": false
457
+ }
458
+ },
459
+ "indexes": {
460
+ "inv_reservations_variant_idx": {
461
+ "name": "inv_reservations_variant_idx",
462
+ "columns": [
463
+ "variant_id"
464
+ ],
465
+ "isUnique": false
466
+ },
467
+ "inv_reservations_expires_idx": {
468
+ "name": "inv_reservations_expires_idx",
469
+ "columns": [
470
+ "expires_at"
471
+ ],
472
+ "isUnique": false
473
+ }
474
+ },
475
+ "foreignKeys": {},
476
+ "compositePrimaryKeys": {},
477
+ "uniqueConstraints": {},
478
+ "checkConstraints": {}
479
+ },
480
+ "order_history": {
481
+ "name": "order_history",
482
+ "columns": {
483
+ "id": {
484
+ "name": "id",
485
+ "type": "text",
486
+ "primaryKey": true,
487
+ "notNull": true,
488
+ "autoincrement": false
489
+ },
490
+ "order_id": {
491
+ "name": "order_id",
492
+ "type": "text",
493
+ "primaryKey": false,
494
+ "notNull": true,
495
+ "autoincrement": false
496
+ },
497
+ "from_status": {
498
+ "name": "from_status",
499
+ "type": "text",
500
+ "primaryKey": false,
501
+ "notNull": false,
502
+ "autoincrement": false
503
+ },
504
+ "to_status": {
505
+ "name": "to_status",
506
+ "type": "text",
507
+ "primaryKey": false,
508
+ "notNull": true,
509
+ "autoincrement": false
510
+ },
511
+ "actor": {
512
+ "name": "actor",
513
+ "type": "text",
514
+ "primaryKey": false,
515
+ "notNull": true,
516
+ "autoincrement": false
517
+ },
518
+ "note": {
519
+ "name": "note",
520
+ "type": "text",
521
+ "primaryKey": false,
522
+ "notNull": true,
523
+ "autoincrement": false,
524
+ "default": "''"
525
+ },
526
+ "timestamp": {
527
+ "name": "timestamp",
528
+ "type": "text",
529
+ "primaryKey": false,
530
+ "notNull": true,
531
+ "autoincrement": false
532
+ }
533
+ },
534
+ "indexes": {
535
+ "order_history_order_idx": {
536
+ "name": "order_history_order_idx",
537
+ "columns": [
538
+ "order_id"
539
+ ],
540
+ "isUnique": false
541
+ }
542
+ },
543
+ "foreignKeys": {},
544
+ "compositePrimaryKeys": {},
545
+ "uniqueConstraints": {},
546
+ "checkConstraints": {}
547
+ },
548
+ "order_refunds": {
549
+ "name": "order_refunds",
550
+ "columns": {
551
+ "id": {
552
+ "name": "id",
553
+ "type": "text",
554
+ "primaryKey": true,
555
+ "notNull": true,
556
+ "autoincrement": false
557
+ },
558
+ "order_id": {
559
+ "name": "order_id",
560
+ "type": "text",
561
+ "primaryKey": false,
562
+ "notNull": true,
563
+ "autoincrement": false
564
+ },
565
+ "amount_minor": {
566
+ "name": "amount_minor",
567
+ "type": "integer",
568
+ "primaryKey": false,
569
+ "notNull": true,
570
+ "autoincrement": false
571
+ },
572
+ "currency": {
573
+ "name": "currency",
574
+ "type": "text",
575
+ "primaryKey": false,
576
+ "notNull": true,
577
+ "autoincrement": false
578
+ },
579
+ "provider_refund_id": {
580
+ "name": "provider_refund_id",
581
+ "type": "text",
582
+ "primaryKey": false,
583
+ "notNull": false,
584
+ "autoincrement": false
585
+ },
586
+ "status": {
587
+ "name": "status",
588
+ "type": "text",
589
+ "primaryKey": false,
590
+ "notNull": true,
591
+ "autoincrement": false,
592
+ "default": "'pending'"
593
+ },
594
+ "reason": {
595
+ "name": "reason",
596
+ "type": "text",
597
+ "primaryKey": false,
598
+ "notNull": false,
599
+ "autoincrement": false
600
+ },
601
+ "actor": {
602
+ "name": "actor",
603
+ "type": "text",
604
+ "primaryKey": false,
605
+ "notNull": true,
606
+ "autoincrement": false
607
+ },
608
+ "created_at": {
609
+ "name": "created_at",
610
+ "type": "text",
611
+ "primaryKey": false,
612
+ "notNull": true,
613
+ "autoincrement": false
614
+ },
615
+ "request_id": {
616
+ "name": "request_id",
617
+ "type": "text",
618
+ "primaryKey": false,
619
+ "notNull": false,
620
+ "autoincrement": false
621
+ }
622
+ },
623
+ "indexes": {
624
+ "order_refunds_order_idx": {
625
+ "name": "order_refunds_order_idx",
626
+ "columns": [
627
+ "order_id"
628
+ ],
629
+ "isUnique": false
630
+ },
631
+ "order_refunds_order_request_idx": {
632
+ "name": "order_refunds_order_request_idx",
633
+ "columns": [
634
+ "order_id",
635
+ "request_id"
636
+ ],
637
+ "isUnique": true
638
+ }
639
+ },
640
+ "foreignKeys": {},
641
+ "compositePrimaryKeys": {},
642
+ "uniqueConstraints": {},
643
+ "checkConstraints": {}
644
+ },
645
+ "order_sequences": {
646
+ "name": "order_sequences",
647
+ "columns": {
648
+ "id": {
649
+ "name": "id",
650
+ "type": "integer",
651
+ "primaryKey": true,
652
+ "notNull": true,
653
+ "autoincrement": false
654
+ },
655
+ "next_value": {
656
+ "name": "next_value",
657
+ "type": "integer",
658
+ "primaryKey": false,
659
+ "notNull": true,
660
+ "autoincrement": false
661
+ }
662
+ },
663
+ "indexes": {},
664
+ "foreignKeys": {},
665
+ "compositePrimaryKeys": {},
666
+ "uniqueConstraints": {},
667
+ "checkConstraints": {}
668
+ },
669
+ "orders": {
670
+ "name": "orders",
671
+ "columns": {
672
+ "id": {
673
+ "name": "id",
674
+ "type": "text",
675
+ "primaryKey": true,
676
+ "notNull": true,
677
+ "autoincrement": false
678
+ },
679
+ "order_number": {
680
+ "name": "order_number",
681
+ "type": "text",
682
+ "primaryKey": false,
683
+ "notNull": true,
684
+ "autoincrement": false
685
+ },
686
+ "sequence": {
687
+ "name": "sequence",
688
+ "type": "integer",
689
+ "primaryKey": false,
690
+ "notNull": true,
691
+ "autoincrement": false
692
+ },
693
+ "customer_id": {
694
+ "name": "customer_id",
695
+ "type": "text",
696
+ "primaryKey": false,
697
+ "notNull": false,
698
+ "autoincrement": false
699
+ },
700
+ "status": {
701
+ "name": "status",
702
+ "type": "text",
703
+ "primaryKey": false,
704
+ "notNull": true,
705
+ "autoincrement": false,
706
+ "default": "'pending'"
707
+ },
708
+ "email": {
709
+ "name": "email",
710
+ "type": "text",
711
+ "primaryKey": false,
712
+ "notNull": true,
713
+ "autoincrement": false
714
+ },
715
+ "billing_address": {
716
+ "name": "billing_address",
717
+ "type": "text",
718
+ "primaryKey": false,
719
+ "notNull": true,
720
+ "autoincrement": false
721
+ },
722
+ "shipping_address": {
723
+ "name": "shipping_address",
724
+ "type": "text",
725
+ "primaryKey": false,
726
+ "notNull": true,
727
+ "autoincrement": false
728
+ },
729
+ "line_items": {
730
+ "name": "line_items",
731
+ "type": "text",
732
+ "primaryKey": false,
733
+ "notNull": true,
734
+ "autoincrement": false
735
+ },
736
+ "subtotal_minor": {
737
+ "name": "subtotal_minor",
738
+ "type": "integer",
739
+ "primaryKey": false,
740
+ "notNull": true,
741
+ "autoincrement": false
742
+ },
743
+ "tax_total_minor": {
744
+ "name": "tax_total_minor",
745
+ "type": "integer",
746
+ "primaryKey": false,
747
+ "notNull": true,
748
+ "autoincrement": false,
749
+ "default": 0
750
+ },
751
+ "shipping_total_minor": {
752
+ "name": "shipping_total_minor",
753
+ "type": "integer",
754
+ "primaryKey": false,
755
+ "notNull": true,
756
+ "autoincrement": false,
757
+ "default": 0
758
+ },
759
+ "discount_total_minor": {
760
+ "name": "discount_total_minor",
761
+ "type": "integer",
762
+ "primaryKey": false,
763
+ "notNull": true,
764
+ "autoincrement": false,
765
+ "default": 0
766
+ },
767
+ "total_minor": {
768
+ "name": "total_minor",
769
+ "type": "integer",
770
+ "primaryKey": false,
771
+ "notNull": true,
772
+ "autoincrement": false
773
+ },
774
+ "currency": {
775
+ "name": "currency",
776
+ "type": "text",
777
+ "primaryKey": false,
778
+ "notNull": true,
779
+ "autoincrement": false
780
+ },
781
+ "notes": {
782
+ "name": "notes",
783
+ "type": "text",
784
+ "primaryKey": false,
785
+ "notNull": true,
786
+ "autoincrement": false,
787
+ "default": "''"
788
+ },
789
+ "metadata": {
790
+ "name": "metadata",
791
+ "type": "text",
792
+ "primaryKey": false,
793
+ "notNull": true,
794
+ "autoincrement": false,
795
+ "default": "'{}'"
796
+ },
797
+ "payment_intent_id": {
798
+ "name": "payment_intent_id",
799
+ "type": "text",
800
+ "primaryKey": false,
801
+ "notNull": false,
802
+ "autoincrement": false
803
+ },
804
+ "cart_token": {
805
+ "name": "cart_token",
806
+ "type": "text",
807
+ "primaryKey": false,
808
+ "notNull": false,
809
+ "autoincrement": false
810
+ },
811
+ "captured_minor": {
812
+ "name": "captured_minor",
813
+ "type": "integer",
814
+ "primaryKey": false,
815
+ "notNull": true,
816
+ "autoincrement": false,
817
+ "default": 0
818
+ },
819
+ "captured_at": {
820
+ "name": "captured_at",
821
+ "type": "text",
822
+ "primaryKey": false,
823
+ "notNull": false,
824
+ "autoincrement": false
825
+ },
826
+ "refunded_minor": {
827
+ "name": "refunded_minor",
828
+ "type": "integer",
829
+ "primaryKey": false,
830
+ "notNull": true,
831
+ "autoincrement": false,
832
+ "default": 0
833
+ },
834
+ "capture_method": {
835
+ "name": "capture_method",
836
+ "type": "text",
837
+ "primaryKey": false,
838
+ "notNull": false,
839
+ "autoincrement": false
840
+ },
841
+ "created_at": {
842
+ "name": "created_at",
843
+ "type": "text",
844
+ "primaryKey": false,
845
+ "notNull": true,
846
+ "autoincrement": false
847
+ },
848
+ "updated_at": {
849
+ "name": "updated_at",
850
+ "type": "text",
851
+ "primaryKey": false,
852
+ "notNull": true,
853
+ "autoincrement": false
854
+ }
855
+ },
856
+ "indexes": {
857
+ "orders_number_unique": {
858
+ "name": "orders_number_unique",
859
+ "columns": [
860
+ "order_number"
861
+ ],
862
+ "isUnique": true
863
+ },
864
+ "orders_sequence_unique": {
865
+ "name": "orders_sequence_unique",
866
+ "columns": [
867
+ "sequence"
868
+ ],
869
+ "isUnique": true
870
+ },
871
+ "orders_customer_idx": {
872
+ "name": "orders_customer_idx",
873
+ "columns": [
874
+ "customer_id"
875
+ ],
876
+ "isUnique": false
877
+ },
878
+ "orders_status_idx": {
879
+ "name": "orders_status_idx",
880
+ "columns": [
881
+ "status"
882
+ ],
883
+ "isUnique": false
884
+ },
885
+ "orders_payment_intent_idx": {
886
+ "name": "orders_payment_intent_idx",
887
+ "columns": [
888
+ "payment_intent_id"
889
+ ],
890
+ "isUnique": false
891
+ },
892
+ "orders_pending_cart_unique": {
893
+ "name": "orders_pending_cart_unique",
894
+ "columns": [
895
+ "cart_token"
896
+ ],
897
+ "isUnique": true,
898
+ "where": "status = 'pending'"
899
+ }
900
+ },
901
+ "foreignKeys": {},
902
+ "compositePrimaryKeys": {},
903
+ "uniqueConstraints": {},
904
+ "checkConstraints": {}
905
+ },
906
+ "processed_events": {
907
+ "name": "processed_events",
908
+ "columns": {
909
+ "handler_name": {
910
+ "name": "handler_name",
911
+ "type": "text",
912
+ "primaryKey": false,
913
+ "notNull": true,
914
+ "autoincrement": false
915
+ },
916
+ "event_id": {
917
+ "name": "event_id",
918
+ "type": "text",
919
+ "primaryKey": false,
920
+ "notNull": true,
921
+ "autoincrement": false
922
+ },
923
+ "processed_at": {
924
+ "name": "processed_at",
925
+ "type": "text",
926
+ "primaryKey": false,
927
+ "notNull": true,
928
+ "autoincrement": false
929
+ }
930
+ },
931
+ "indexes": {},
932
+ "foreignKeys": {},
933
+ "compositePrimaryKeys": {
934
+ "processed_events_handler_name_event_id_pk": {
935
+ "columns": [
936
+ "handler_name",
937
+ "event_id"
938
+ ],
939
+ "name": "processed_events_handler_name_event_id_pk"
940
+ }
941
+ },
942
+ "uniqueConstraints": {},
943
+ "checkConstraints": {}
944
+ },
945
+ "product_categories": {
946
+ "name": "product_categories",
947
+ "columns": {
948
+ "product_id": {
949
+ "name": "product_id",
950
+ "type": "text",
951
+ "primaryKey": false,
952
+ "notNull": true,
953
+ "autoincrement": false
954
+ },
955
+ "category_id": {
956
+ "name": "category_id",
957
+ "type": "text",
958
+ "primaryKey": false,
959
+ "notNull": true,
960
+ "autoincrement": false
961
+ }
962
+ },
963
+ "indexes": {
964
+ "product_categories_category_idx": {
965
+ "name": "product_categories_category_idx",
966
+ "columns": [
967
+ "category_id"
968
+ ],
969
+ "isUnique": false
970
+ }
971
+ },
972
+ "foreignKeys": {},
973
+ "compositePrimaryKeys": {
974
+ "product_categories_product_id_category_id_pk": {
975
+ "columns": [
976
+ "product_id",
977
+ "category_id"
978
+ ],
979
+ "name": "product_categories_product_id_category_id_pk"
980
+ }
981
+ },
982
+ "uniqueConstraints": {},
983
+ "checkConstraints": {}
984
+ },
985
+ "products": {
986
+ "name": "products",
987
+ "columns": {
988
+ "id": {
989
+ "name": "id",
990
+ "type": "text",
991
+ "primaryKey": true,
992
+ "notNull": true,
993
+ "autoincrement": false
994
+ },
995
+ "slug": {
996
+ "name": "slug",
997
+ "type": "text",
998
+ "primaryKey": false,
999
+ "notNull": true,
1000
+ "autoincrement": false
1001
+ },
1002
+ "name": {
1003
+ "name": "name",
1004
+ "type": "text",
1005
+ "primaryKey": false,
1006
+ "notNull": true,
1007
+ "autoincrement": false
1008
+ },
1009
+ "description": {
1010
+ "name": "description",
1011
+ "type": "text",
1012
+ "primaryKey": false,
1013
+ "notNull": true,
1014
+ "autoincrement": false,
1015
+ "default": "''"
1016
+ },
1017
+ "short_description": {
1018
+ "name": "short_description",
1019
+ "type": "text",
1020
+ "primaryKey": false,
1021
+ "notNull": true,
1022
+ "autoincrement": false,
1023
+ "default": "''"
1024
+ },
1025
+ "status": {
1026
+ "name": "status",
1027
+ "type": "text",
1028
+ "primaryKey": false,
1029
+ "notNull": true,
1030
+ "autoincrement": false,
1031
+ "default": "'draft'"
1032
+ },
1033
+ "type": {
1034
+ "name": "type",
1035
+ "type": "text",
1036
+ "primaryKey": false,
1037
+ "notNull": true,
1038
+ "autoincrement": false,
1039
+ "default": "'simple'"
1040
+ },
1041
+ "seo_title": {
1042
+ "name": "seo_title",
1043
+ "type": "text",
1044
+ "primaryKey": false,
1045
+ "notNull": true,
1046
+ "autoincrement": false,
1047
+ "default": "''"
1048
+ },
1049
+ "seo_description": {
1050
+ "name": "seo_description",
1051
+ "type": "text",
1052
+ "primaryKey": false,
1053
+ "notNull": true,
1054
+ "autoincrement": false,
1055
+ "default": "''"
1056
+ },
1057
+ "media": {
1058
+ "name": "media",
1059
+ "type": "text",
1060
+ "primaryKey": false,
1061
+ "notNull": true,
1062
+ "autoincrement": false,
1063
+ "default": "'[]'"
1064
+ },
1065
+ "metadata": {
1066
+ "name": "metadata",
1067
+ "type": "text",
1068
+ "primaryKey": false,
1069
+ "notNull": true,
1070
+ "autoincrement": false,
1071
+ "default": "'{}'"
1072
+ },
1073
+ "created_at": {
1074
+ "name": "created_at",
1075
+ "type": "text",
1076
+ "primaryKey": false,
1077
+ "notNull": true,
1078
+ "autoincrement": false
1079
+ },
1080
+ "updated_at": {
1081
+ "name": "updated_at",
1082
+ "type": "text",
1083
+ "primaryKey": false,
1084
+ "notNull": true,
1085
+ "autoincrement": false
1086
+ }
1087
+ },
1088
+ "indexes": {
1089
+ "products_slug_unique": {
1090
+ "name": "products_slug_unique",
1091
+ "columns": [
1092
+ "slug"
1093
+ ],
1094
+ "isUnique": true
1095
+ },
1096
+ "products_status_idx": {
1097
+ "name": "products_status_idx",
1098
+ "columns": [
1099
+ "status"
1100
+ ],
1101
+ "isUnique": false
1102
+ }
1103
+ },
1104
+ "foreignKeys": {},
1105
+ "compositePrimaryKeys": {},
1106
+ "uniqueConstraints": {},
1107
+ "checkConstraints": {}
1108
+ },
1109
+ "refresh_tokens": {
1110
+ "name": "refresh_tokens",
1111
+ "columns": {
1112
+ "id": {
1113
+ "name": "id",
1114
+ "type": "text",
1115
+ "primaryKey": true,
1116
+ "notNull": true,
1117
+ "autoincrement": false
1118
+ },
1119
+ "customer_id": {
1120
+ "name": "customer_id",
1121
+ "type": "text",
1122
+ "primaryKey": false,
1123
+ "notNull": true,
1124
+ "autoincrement": false
1125
+ },
1126
+ "token_hash": {
1127
+ "name": "token_hash",
1128
+ "type": "text",
1129
+ "primaryKey": false,
1130
+ "notNull": true,
1131
+ "autoincrement": false
1132
+ },
1133
+ "revoked_at": {
1134
+ "name": "revoked_at",
1135
+ "type": "text",
1136
+ "primaryKey": false,
1137
+ "notNull": false,
1138
+ "autoincrement": false
1139
+ },
1140
+ "replaced_by_jti": {
1141
+ "name": "replaced_by_jti",
1142
+ "type": "text",
1143
+ "primaryKey": false,
1144
+ "notNull": false,
1145
+ "autoincrement": false
1146
+ },
1147
+ "expires_at": {
1148
+ "name": "expires_at",
1149
+ "type": "text",
1150
+ "primaryKey": false,
1151
+ "notNull": true,
1152
+ "autoincrement": false
1153
+ },
1154
+ "created_at": {
1155
+ "name": "created_at",
1156
+ "type": "text",
1157
+ "primaryKey": false,
1158
+ "notNull": true,
1159
+ "autoincrement": false
1160
+ }
1161
+ },
1162
+ "indexes": {
1163
+ "refresh_tokens_customer_idx": {
1164
+ "name": "refresh_tokens_customer_idx",
1165
+ "columns": [
1166
+ "customer_id"
1167
+ ],
1168
+ "isUnique": false
1169
+ }
1170
+ },
1171
+ "foreignKeys": {},
1172
+ "compositePrimaryKeys": {},
1173
+ "uniqueConstraints": {},
1174
+ "checkConstraints": {}
1175
+ },
1176
+ "reviews": {
1177
+ "name": "reviews",
1178
+ "columns": {
1179
+ "id": {
1180
+ "name": "id",
1181
+ "type": "text",
1182
+ "primaryKey": true,
1183
+ "notNull": true,
1184
+ "autoincrement": false
1185
+ },
1186
+ "product_id": {
1187
+ "name": "product_id",
1188
+ "type": "text",
1189
+ "primaryKey": false,
1190
+ "notNull": true,
1191
+ "autoincrement": false
1192
+ },
1193
+ "customer_id": {
1194
+ "name": "customer_id",
1195
+ "type": "text",
1196
+ "primaryKey": false,
1197
+ "notNull": false,
1198
+ "autoincrement": false
1199
+ },
1200
+ "order_id": {
1201
+ "name": "order_id",
1202
+ "type": "text",
1203
+ "primaryKey": false,
1204
+ "notNull": false,
1205
+ "autoincrement": false
1206
+ },
1207
+ "rating": {
1208
+ "name": "rating",
1209
+ "type": "integer",
1210
+ "primaryKey": false,
1211
+ "notNull": true,
1212
+ "autoincrement": false
1213
+ },
1214
+ "title": {
1215
+ "name": "title",
1216
+ "type": "text",
1217
+ "primaryKey": false,
1218
+ "notNull": true,
1219
+ "autoincrement": false,
1220
+ "default": "''"
1221
+ },
1222
+ "body": {
1223
+ "name": "body",
1224
+ "type": "text",
1225
+ "primaryKey": false,
1226
+ "notNull": true,
1227
+ "autoincrement": false,
1228
+ "default": "''"
1229
+ },
1230
+ "moderation_status": {
1231
+ "name": "moderation_status",
1232
+ "type": "text",
1233
+ "primaryKey": false,
1234
+ "notNull": true,
1235
+ "autoincrement": false,
1236
+ "default": "'pending'"
1237
+ },
1238
+ "submitted_at": {
1239
+ "name": "submitted_at",
1240
+ "type": "text",
1241
+ "primaryKey": false,
1242
+ "notNull": true,
1243
+ "autoincrement": false
1244
+ },
1245
+ "moderated_at": {
1246
+ "name": "moderated_at",
1247
+ "type": "text",
1248
+ "primaryKey": false,
1249
+ "notNull": false,
1250
+ "autoincrement": false
1251
+ },
1252
+ "moderated_by": {
1253
+ "name": "moderated_by",
1254
+ "type": "text",
1255
+ "primaryKey": false,
1256
+ "notNull": false,
1257
+ "autoincrement": false
1258
+ }
1259
+ },
1260
+ "indexes": {
1261
+ "reviews_product_idx": {
1262
+ "name": "reviews_product_idx",
1263
+ "columns": [
1264
+ "product_id"
1265
+ ],
1266
+ "isUnique": false
1267
+ },
1268
+ "reviews_status_idx": {
1269
+ "name": "reviews_status_idx",
1270
+ "columns": [
1271
+ "moderation_status"
1272
+ ],
1273
+ "isUnique": false
1274
+ }
1275
+ },
1276
+ "foreignKeys": {},
1277
+ "compositePrimaryKeys": {},
1278
+ "uniqueConstraints": {},
1279
+ "checkConstraints": {}
1280
+ },
1281
+ "settings": {
1282
+ "name": "settings",
1283
+ "columns": {
1284
+ "slot": {
1285
+ "name": "slot",
1286
+ "type": "text",
1287
+ "primaryKey": false,
1288
+ "notNull": true,
1289
+ "autoincrement": false
1290
+ },
1291
+ "path": {
1292
+ "name": "path",
1293
+ "type": "text",
1294
+ "primaryKey": false,
1295
+ "notNull": true,
1296
+ "autoincrement": false
1297
+ },
1298
+ "ciphertext": {
1299
+ "name": "ciphertext",
1300
+ "type": "blob",
1301
+ "primaryKey": false,
1302
+ "notNull": false,
1303
+ "autoincrement": false
1304
+ },
1305
+ "plain": {
1306
+ "name": "plain",
1307
+ "type": "text",
1308
+ "primaryKey": false,
1309
+ "notNull": false,
1310
+ "autoincrement": false
1311
+ },
1312
+ "iv": {
1313
+ "name": "iv",
1314
+ "type": "blob",
1315
+ "primaryKey": false,
1316
+ "notNull": false,
1317
+ "autoincrement": false
1318
+ },
1319
+ "tag": {
1320
+ "name": "tag",
1321
+ "type": "blob",
1322
+ "primaryKey": false,
1323
+ "notNull": false,
1324
+ "autoincrement": false
1325
+ },
1326
+ "key_id": {
1327
+ "name": "key_id",
1328
+ "type": "text",
1329
+ "primaryKey": false,
1330
+ "notNull": false,
1331
+ "autoincrement": false
1332
+ },
1333
+ "updated_at": {
1334
+ "name": "updated_at",
1335
+ "type": "text",
1336
+ "primaryKey": false,
1337
+ "notNull": true,
1338
+ "autoincrement": false
1339
+ },
1340
+ "updated_by": {
1341
+ "name": "updated_by",
1342
+ "type": "text",
1343
+ "primaryKey": false,
1344
+ "notNull": false,
1345
+ "autoincrement": false
1346
+ }
1347
+ },
1348
+ "indexes": {},
1349
+ "foreignKeys": {},
1350
+ "compositePrimaryKeys": {
1351
+ "settings_slot_path_pk": {
1352
+ "columns": [
1353
+ "slot",
1354
+ "path"
1355
+ ],
1356
+ "name": "settings_slot_path_pk"
1357
+ }
1358
+ },
1359
+ "uniqueConstraints": {},
1360
+ "checkConstraints": {
1361
+ "settings_one_value": {
1362
+ "name": "settings_one_value",
1363
+ "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))"
1364
+ }
1365
+ }
1366
+ },
1367
+ "stock_adjustments": {
1368
+ "name": "stock_adjustments",
1369
+ "columns": {
1370
+ "id": {
1371
+ "name": "id",
1372
+ "type": "text",
1373
+ "primaryKey": true,
1374
+ "notNull": true,
1375
+ "autoincrement": false
1376
+ },
1377
+ "variant_id": {
1378
+ "name": "variant_id",
1379
+ "type": "text",
1380
+ "primaryKey": false,
1381
+ "notNull": true,
1382
+ "autoincrement": false
1383
+ },
1384
+ "adjustment": {
1385
+ "name": "adjustment",
1386
+ "type": "integer",
1387
+ "primaryKey": false,
1388
+ "notNull": true,
1389
+ "autoincrement": false
1390
+ },
1391
+ "reason": {
1392
+ "name": "reason",
1393
+ "type": "text",
1394
+ "primaryKey": false,
1395
+ "notNull": true,
1396
+ "autoincrement": false
1397
+ },
1398
+ "actor": {
1399
+ "name": "actor",
1400
+ "type": "text",
1401
+ "primaryKey": false,
1402
+ "notNull": true,
1403
+ "autoincrement": false
1404
+ },
1405
+ "previous_qty": {
1406
+ "name": "previous_qty",
1407
+ "type": "integer",
1408
+ "primaryKey": false,
1409
+ "notNull": true,
1410
+ "autoincrement": false
1411
+ },
1412
+ "new_qty": {
1413
+ "name": "new_qty",
1414
+ "type": "integer",
1415
+ "primaryKey": false,
1416
+ "notNull": true,
1417
+ "autoincrement": false
1418
+ },
1419
+ "timestamp": {
1420
+ "name": "timestamp",
1421
+ "type": "text",
1422
+ "primaryKey": false,
1423
+ "notNull": true,
1424
+ "autoincrement": false
1425
+ }
1426
+ },
1427
+ "indexes": {
1428
+ "stock_adjustments_variant_idx": {
1429
+ "name": "stock_adjustments_variant_idx",
1430
+ "columns": [
1431
+ "variant_id"
1432
+ ],
1433
+ "isUnique": false
1434
+ }
1435
+ },
1436
+ "foreignKeys": {},
1437
+ "compositePrimaryKeys": {},
1438
+ "uniqueConstraints": {},
1439
+ "checkConstraints": {}
1440
+ },
1441
+ "variants": {
1442
+ "name": "variants",
1443
+ "columns": {
1444
+ "id": {
1445
+ "name": "id",
1446
+ "type": "text",
1447
+ "primaryKey": true,
1448
+ "notNull": true,
1449
+ "autoincrement": false
1450
+ },
1451
+ "product_id": {
1452
+ "name": "product_id",
1453
+ "type": "text",
1454
+ "primaryKey": false,
1455
+ "notNull": true,
1456
+ "autoincrement": false
1457
+ },
1458
+ "sku": {
1459
+ "name": "sku",
1460
+ "type": "text",
1461
+ "primaryKey": false,
1462
+ "notNull": true,
1463
+ "autoincrement": false
1464
+ },
1465
+ "name": {
1466
+ "name": "name",
1467
+ "type": "text",
1468
+ "primaryKey": false,
1469
+ "notNull": true,
1470
+ "autoincrement": false,
1471
+ "default": "''"
1472
+ },
1473
+ "price_minor": {
1474
+ "name": "price_minor",
1475
+ "type": "integer",
1476
+ "primaryKey": false,
1477
+ "notNull": true,
1478
+ "autoincrement": false
1479
+ },
1480
+ "compare_at_price_minor": {
1481
+ "name": "compare_at_price_minor",
1482
+ "type": "integer",
1483
+ "primaryKey": false,
1484
+ "notNull": false,
1485
+ "autoincrement": false
1486
+ },
1487
+ "weight_grams": {
1488
+ "name": "weight_grams",
1489
+ "type": "integer",
1490
+ "primaryKey": false,
1491
+ "notNull": false,
1492
+ "autoincrement": false
1493
+ },
1494
+ "dimensions": {
1495
+ "name": "dimensions",
1496
+ "type": "text",
1497
+ "primaryKey": false,
1498
+ "notNull": false,
1499
+ "autoincrement": false
1500
+ },
1501
+ "stock": {
1502
+ "name": "stock",
1503
+ "type": "integer",
1504
+ "primaryKey": false,
1505
+ "notNull": true,
1506
+ "autoincrement": false,
1507
+ "default": 0
1508
+ },
1509
+ "low_stock_threshold": {
1510
+ "name": "low_stock_threshold",
1511
+ "type": "integer",
1512
+ "primaryKey": false,
1513
+ "notNull": true,
1514
+ "autoincrement": false,
1515
+ "default": 0
1516
+ },
1517
+ "options": {
1518
+ "name": "options",
1519
+ "type": "text",
1520
+ "primaryKey": false,
1521
+ "notNull": true,
1522
+ "autoincrement": false,
1523
+ "default": "'[]'"
1524
+ },
1525
+ "status": {
1526
+ "name": "status",
1527
+ "type": "text",
1528
+ "primaryKey": false,
1529
+ "notNull": true,
1530
+ "autoincrement": false,
1531
+ "default": "'active'"
1532
+ },
1533
+ "created_at": {
1534
+ "name": "created_at",
1535
+ "type": "text",
1536
+ "primaryKey": false,
1537
+ "notNull": true,
1538
+ "autoincrement": false
1539
+ },
1540
+ "updated_at": {
1541
+ "name": "updated_at",
1542
+ "type": "text",
1543
+ "primaryKey": false,
1544
+ "notNull": true,
1545
+ "autoincrement": false
1546
+ }
1547
+ },
1548
+ "indexes": {
1549
+ "variants_sku_unique": {
1550
+ "name": "variants_sku_unique",
1551
+ "columns": [
1552
+ "sku"
1553
+ ],
1554
+ "isUnique": true
1555
+ },
1556
+ "variants_product_idx": {
1557
+ "name": "variants_product_idx",
1558
+ "columns": [
1559
+ "product_id"
1560
+ ],
1561
+ "isUnique": false
1562
+ }
1563
+ },
1564
+ "foreignKeys": {},
1565
+ "compositePrimaryKeys": {},
1566
+ "uniqueConstraints": {},
1567
+ "checkConstraints": {}
1568
+ }
1569
+ },
1570
+ "views": {},
1571
+ "enums": {},
1572
+ "_meta": {
1573
+ "schemas": {},
1574
+ "tables": {},
1575
+ "columns": {}
1576
+ },
1577
+ "internal": {
1578
+ "indexes": {}
1579
+ }
1580
+ }