@nymbalhq/platform 1.4.0 → 1.5.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 (29) hide show
  1. package/dist/{chunk-SNNK2OX3.js → chunk-NNDIAIT6.js} +73 -5
  2. package/dist/chunk-NNDIAIT6.js.map +1 -0
  3. package/dist/{chunk-GMV3B3SC.js → chunk-TRLERRUI.js} +424 -137
  4. package/dist/chunk-TRLERRUI.js.map +1 -0
  5. package/dist/db/schema/index.d.ts +795 -105
  6. package/dist/db/schema/index.js +1 -1
  7. package/dist/index.d.ts +218 -85
  8. package/dist/index.js +658 -199
  9. package/dist/index.js.map +1 -1
  10. package/dist/register-SBGUI2L5.js +8 -0
  11. package/migrations/postgres/0016_email_suppressions.sql +7 -0
  12. package/migrations/postgres/0017_order_shipments.sql +14 -0
  13. package/migrations/postgres/0018_order_key_expiry.sql +8 -0
  14. package/migrations/postgres/meta/0016_snapshot.json +2233 -0
  15. package/migrations/postgres/meta/0017_snapshot.json +2300 -0
  16. package/migrations/postgres/meta/0018_snapshot.json +2306 -0
  17. package/migrations/postgres/meta/_journal.json +21 -0
  18. package/migrations/sqlite/0016_email_suppressions.sql +7 -0
  19. package/migrations/sqlite/0017_order_shipments.sql +9 -0
  20. package/migrations/sqlite/0018_order_key_expiry.sql +25 -0
  21. package/migrations/sqlite/meta/0016_snapshot.json +1981 -0
  22. package/migrations/sqlite/meta/0017_snapshot.json +2041 -0
  23. package/migrations/sqlite/meta/0018_snapshot.json +2048 -0
  24. package/migrations/sqlite/meta/_journal.json +21 -0
  25. package/package.json +17 -47
  26. package/dist/chunk-GMV3B3SC.js.map +0 -1
  27. package/dist/chunk-SNNK2OX3.js.map +0 -1
  28. package/dist/register-N2XGSFUF.js +0 -8
  29. /package/dist/{register-N2XGSFUF.js.map → register-SBGUI2L5.js.map} +0 -0
@@ -0,0 +1,2048 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "e02051c3-ac10-4ede-be8a-c63b20791136",
5
+ "prevId": "eb2785eb-5930-4b3e-a64a-278a224b3be5",
6
+ "tables": {
7
+ "alert_subscriptions": {
8
+ "name": "alert_subscriptions",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "email": {
18
+ "name": "email",
19
+ "type": "text",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false
23
+ },
24
+ "kind": {
25
+ "name": "kind",
26
+ "type": "text",
27
+ "primaryKey": false,
28
+ "notNull": true,
29
+ "autoincrement": false
30
+ },
31
+ "variant_id": {
32
+ "name": "variant_id",
33
+ "type": "text",
34
+ "primaryKey": false,
35
+ "notNull": true,
36
+ "autoincrement": false
37
+ },
38
+ "product_id": {
39
+ "name": "product_id",
40
+ "type": "text",
41
+ "primaryKey": false,
42
+ "notNull": true,
43
+ "autoincrement": false
44
+ },
45
+ "status": {
46
+ "name": "status",
47
+ "type": "text",
48
+ "primaryKey": false,
49
+ "notNull": true,
50
+ "autoincrement": false
51
+ },
52
+ "confirm_token": {
53
+ "name": "confirm_token",
54
+ "type": "text",
55
+ "primaryKey": false,
56
+ "notNull": true,
57
+ "autoincrement": false
58
+ },
59
+ "unsubscribe_token": {
60
+ "name": "unsubscribe_token",
61
+ "type": "text",
62
+ "primaryKey": false,
63
+ "notNull": true,
64
+ "autoincrement": false
65
+ },
66
+ "origin": {
67
+ "name": "origin",
68
+ "type": "text",
69
+ "primaryKey": false,
70
+ "notNull": true,
71
+ "autoincrement": false
72
+ },
73
+ "baseline_price_minor": {
74
+ "name": "baseline_price_minor",
75
+ "type": "integer",
76
+ "primaryKey": false,
77
+ "notNull": false,
78
+ "autoincrement": false
79
+ },
80
+ "created_at": {
81
+ "name": "created_at",
82
+ "type": "text",
83
+ "primaryKey": false,
84
+ "notNull": true,
85
+ "autoincrement": false
86
+ },
87
+ "updated_at": {
88
+ "name": "updated_at",
89
+ "type": "text",
90
+ "primaryKey": false,
91
+ "notNull": true,
92
+ "autoincrement": false
93
+ },
94
+ "confirmed_at": {
95
+ "name": "confirmed_at",
96
+ "type": "text",
97
+ "primaryKey": false,
98
+ "notNull": false,
99
+ "autoincrement": false
100
+ }
101
+ },
102
+ "indexes": {
103
+ "alert_subscriptions_address_unique": {
104
+ "name": "alert_subscriptions_address_unique",
105
+ "columns": [
106
+ "email",
107
+ "variant_id",
108
+ "kind"
109
+ ],
110
+ "isUnique": true
111
+ },
112
+ "alert_subscriptions_confirm_token_unique": {
113
+ "name": "alert_subscriptions_confirm_token_unique",
114
+ "columns": [
115
+ "confirm_token"
116
+ ],
117
+ "isUnique": true
118
+ },
119
+ "alert_subscriptions_unsubscribe_token_unique": {
120
+ "name": "alert_subscriptions_unsubscribe_token_unique",
121
+ "columns": [
122
+ "unsubscribe_token"
123
+ ],
124
+ "isUnique": true
125
+ },
126
+ "alert_subscriptions_fan_out_idx": {
127
+ "name": "alert_subscriptions_fan_out_idx",
128
+ "columns": [
129
+ "variant_id",
130
+ "kind",
131
+ "status"
132
+ ],
133
+ "isUnique": false
134
+ }
135
+ },
136
+ "foreignKeys": {},
137
+ "compositePrimaryKeys": {},
138
+ "uniqueConstraints": {},
139
+ "checkConstraints": {
140
+ "alert_subscriptions_kind": {
141
+ "name": "alert_subscriptions_kind",
142
+ "value": "\"alert_subscriptions\".\"kind\" IN ('back_in_stock', 'price_drop')"
143
+ },
144
+ "alert_subscriptions_status": {
145
+ "name": "alert_subscriptions_status",
146
+ "value": "\"alert_subscriptions\".\"status\" IN ('pending', 'active', 'fired', 'unsubscribed')"
147
+ }
148
+ }
149
+ },
150
+ "audit_entries": {
151
+ "name": "audit_entries",
152
+ "columns": {
153
+ "id": {
154
+ "name": "id",
155
+ "type": "text",
156
+ "primaryKey": true,
157
+ "notNull": true,
158
+ "autoincrement": false
159
+ },
160
+ "at": {
161
+ "name": "at",
162
+ "type": "text",
163
+ "primaryKey": false,
164
+ "notNull": true,
165
+ "autoincrement": false
166
+ },
167
+ "actor_kind": {
168
+ "name": "actor_kind",
169
+ "type": "text",
170
+ "primaryKey": false,
171
+ "notNull": true,
172
+ "autoincrement": false
173
+ },
174
+ "actor_id": {
175
+ "name": "actor_id",
176
+ "type": "text",
177
+ "primaryKey": false,
178
+ "notNull": true,
179
+ "autoincrement": false
180
+ },
181
+ "command": {
182
+ "name": "command",
183
+ "type": "text",
184
+ "primaryKey": false,
185
+ "notNull": true,
186
+ "autoincrement": false
187
+ },
188
+ "subjects": {
189
+ "name": "subjects",
190
+ "type": "text",
191
+ "primaryKey": false,
192
+ "notNull": true,
193
+ "autoincrement": false
194
+ },
195
+ "correlation_id": {
196
+ "name": "correlation_id",
197
+ "type": "text",
198
+ "primaryKey": false,
199
+ "notNull": false,
200
+ "autoincrement": false
201
+ },
202
+ "idempotency_key": {
203
+ "name": "idempotency_key",
204
+ "type": "text",
205
+ "primaryKey": false,
206
+ "notNull": false,
207
+ "autoincrement": false
208
+ },
209
+ "request_hash": {
210
+ "name": "request_hash",
211
+ "type": "text",
212
+ "primaryKey": false,
213
+ "notNull": false,
214
+ "autoincrement": false
215
+ },
216
+ "outcome": {
217
+ "name": "outcome",
218
+ "type": "text",
219
+ "primaryKey": false,
220
+ "notNull": true,
221
+ "autoincrement": false
222
+ },
223
+ "response_status": {
224
+ "name": "response_status",
225
+ "type": "integer",
226
+ "primaryKey": false,
227
+ "notNull": false,
228
+ "autoincrement": false
229
+ },
230
+ "response_body": {
231
+ "name": "response_body",
232
+ "type": "text",
233
+ "primaryKey": false,
234
+ "notNull": false,
235
+ "autoincrement": false
236
+ }
237
+ },
238
+ "indexes": {
239
+ "audit_entries_applied_key_unique": {
240
+ "name": "audit_entries_applied_key_unique",
241
+ "columns": [
242
+ "actor_id",
243
+ "command",
244
+ "idempotency_key"
245
+ ],
246
+ "isUnique": true,
247
+ "where": "\"audit_entries\".\"outcome\" = 'applied' AND \"audit_entries\".\"idempotency_key\" IS NOT NULL"
248
+ },
249
+ "audit_entries_at_idx": {
250
+ "name": "audit_entries_at_idx",
251
+ "columns": [
252
+ "at",
253
+ "id"
254
+ ],
255
+ "isUnique": false
256
+ },
257
+ "audit_entries_correlation_idx": {
258
+ "name": "audit_entries_correlation_idx",
259
+ "columns": [
260
+ "correlation_id"
261
+ ],
262
+ "isUnique": false
263
+ }
264
+ },
265
+ "foreignKeys": {},
266
+ "compositePrimaryKeys": {},
267
+ "uniqueConstraints": {},
268
+ "checkConstraints": {
269
+ "audit_entries_outcome": {
270
+ "name": "audit_entries_outcome",
271
+ "value": "\"audit_entries\".\"outcome\" IN ('applied', 'refused', 'replayed')"
272
+ }
273
+ }
274
+ },
275
+ "carts": {
276
+ "name": "carts",
277
+ "columns": {
278
+ "token": {
279
+ "name": "token",
280
+ "type": "text",
281
+ "primaryKey": true,
282
+ "notNull": true,
283
+ "autoincrement": false
284
+ },
285
+ "customer_id": {
286
+ "name": "customer_id",
287
+ "type": "text",
288
+ "primaryKey": false,
289
+ "notNull": false,
290
+ "autoincrement": false
291
+ },
292
+ "currency": {
293
+ "name": "currency",
294
+ "type": "text",
295
+ "primaryKey": false,
296
+ "notNull": true,
297
+ "autoincrement": false
298
+ },
299
+ "items": {
300
+ "name": "items",
301
+ "type": "text",
302
+ "primaryKey": false,
303
+ "notNull": true,
304
+ "autoincrement": false,
305
+ "default": "'[]'"
306
+ },
307
+ "line_count": {
308
+ "name": "line_count",
309
+ "type": "integer",
310
+ "primaryKey": false,
311
+ "notNull": true,
312
+ "autoincrement": false,
313
+ "default": 0
314
+ },
315
+ "subtotal_minor": {
316
+ "name": "subtotal_minor",
317
+ "type": "integer",
318
+ "primaryKey": false,
319
+ "notNull": true,
320
+ "autoincrement": false,
321
+ "default": 0
322
+ },
323
+ "expires_at": {
324
+ "name": "expires_at",
325
+ "type": "text",
326
+ "primaryKey": false,
327
+ "notNull": true,
328
+ "autoincrement": false
329
+ },
330
+ "created_at": {
331
+ "name": "created_at",
332
+ "type": "text",
333
+ "primaryKey": false,
334
+ "notNull": true,
335
+ "autoincrement": false
336
+ },
337
+ "updated_at": {
338
+ "name": "updated_at",
339
+ "type": "text",
340
+ "primaryKey": false,
341
+ "notNull": true,
342
+ "autoincrement": false
343
+ },
344
+ "abandoned_notified_at": {
345
+ "name": "abandoned_notified_at",
346
+ "type": "text",
347
+ "primaryKey": false,
348
+ "notNull": false,
349
+ "autoincrement": false
350
+ }
351
+ },
352
+ "indexes": {
353
+ "carts_expires_idx": {
354
+ "name": "carts_expires_idx",
355
+ "columns": [
356
+ "expires_at"
357
+ ],
358
+ "isUnique": false
359
+ },
360
+ "carts_updated_idx": {
361
+ "name": "carts_updated_idx",
362
+ "columns": [
363
+ "updated_at"
364
+ ],
365
+ "isUnique": false
366
+ }
367
+ },
368
+ "foreignKeys": {},
369
+ "compositePrimaryKeys": {},
370
+ "uniqueConstraints": {},
371
+ "checkConstraints": {}
372
+ },
373
+ "categories": {
374
+ "name": "categories",
375
+ "columns": {
376
+ "id": {
377
+ "name": "id",
378
+ "type": "text",
379
+ "primaryKey": true,
380
+ "notNull": true,
381
+ "autoincrement": false
382
+ },
383
+ "parent_id": {
384
+ "name": "parent_id",
385
+ "type": "text",
386
+ "primaryKey": false,
387
+ "notNull": false,
388
+ "autoincrement": false
389
+ },
390
+ "slug": {
391
+ "name": "slug",
392
+ "type": "text",
393
+ "primaryKey": false,
394
+ "notNull": true,
395
+ "autoincrement": false
396
+ },
397
+ "name": {
398
+ "name": "name",
399
+ "type": "text",
400
+ "primaryKey": false,
401
+ "notNull": true,
402
+ "autoincrement": false
403
+ },
404
+ "description": {
405
+ "name": "description",
406
+ "type": "text",
407
+ "primaryKey": false,
408
+ "notNull": true,
409
+ "autoincrement": false,
410
+ "default": "''"
411
+ },
412
+ "position": {
413
+ "name": "position",
414
+ "type": "integer",
415
+ "primaryKey": false,
416
+ "notNull": true,
417
+ "autoincrement": false,
418
+ "default": 0
419
+ },
420
+ "created_at": {
421
+ "name": "created_at",
422
+ "type": "text",
423
+ "primaryKey": false,
424
+ "notNull": true,
425
+ "autoincrement": false
426
+ }
427
+ },
428
+ "indexes": {
429
+ "categories_slug_unique": {
430
+ "name": "categories_slug_unique",
431
+ "columns": [
432
+ "slug"
433
+ ],
434
+ "isUnique": true
435
+ },
436
+ "categories_parent_idx": {
437
+ "name": "categories_parent_idx",
438
+ "columns": [
439
+ "parent_id"
440
+ ],
441
+ "isUnique": false
442
+ }
443
+ },
444
+ "foreignKeys": {},
445
+ "compositePrimaryKeys": {},
446
+ "uniqueConstraints": {},
447
+ "checkConstraints": {}
448
+ },
449
+ "customers": {
450
+ "name": "customers",
451
+ "columns": {
452
+ "id": {
453
+ "name": "id",
454
+ "type": "text",
455
+ "primaryKey": true,
456
+ "notNull": true,
457
+ "autoincrement": false
458
+ },
459
+ "email": {
460
+ "name": "email",
461
+ "type": "text",
462
+ "primaryKey": false,
463
+ "notNull": true,
464
+ "autoincrement": false
465
+ },
466
+ "password_hash": {
467
+ "name": "password_hash",
468
+ "type": "text",
469
+ "primaryKey": false,
470
+ "notNull": true,
471
+ "autoincrement": false
472
+ },
473
+ "first_name": {
474
+ "name": "first_name",
475
+ "type": "text",
476
+ "primaryKey": false,
477
+ "notNull": true,
478
+ "autoincrement": false,
479
+ "default": "''"
480
+ },
481
+ "last_name": {
482
+ "name": "last_name",
483
+ "type": "text",
484
+ "primaryKey": false,
485
+ "notNull": true,
486
+ "autoincrement": false,
487
+ "default": "''"
488
+ },
489
+ "phone": {
490
+ "name": "phone",
491
+ "type": "text",
492
+ "primaryKey": false,
493
+ "notNull": true,
494
+ "autoincrement": false,
495
+ "default": "''"
496
+ },
497
+ "addresses": {
498
+ "name": "addresses",
499
+ "type": "text",
500
+ "primaryKey": false,
501
+ "notNull": true,
502
+ "autoincrement": false,
503
+ "default": "'[]'"
504
+ },
505
+ "order_count": {
506
+ "name": "order_count",
507
+ "type": "integer",
508
+ "primaryKey": false,
509
+ "notNull": true,
510
+ "autoincrement": false,
511
+ "default": 0
512
+ },
513
+ "total_spent_minor": {
514
+ "name": "total_spent_minor",
515
+ "type": "integer",
516
+ "primaryKey": false,
517
+ "notNull": true,
518
+ "autoincrement": false,
519
+ "default": 0
520
+ },
521
+ "metadata": {
522
+ "name": "metadata",
523
+ "type": "text",
524
+ "primaryKey": false,
525
+ "notNull": true,
526
+ "autoincrement": false,
527
+ "default": "'{}'"
528
+ },
529
+ "roles": {
530
+ "name": "roles",
531
+ "type": "text",
532
+ "primaryKey": false,
533
+ "notNull": true,
534
+ "autoincrement": false,
535
+ "default": "'[\"customer\"]'"
536
+ },
537
+ "requires_password_reset": {
538
+ "name": "requires_password_reset",
539
+ "type": "integer",
540
+ "primaryKey": false,
541
+ "notNull": true,
542
+ "autoincrement": false,
543
+ "default": false
544
+ },
545
+ "created_at": {
546
+ "name": "created_at",
547
+ "type": "text",
548
+ "primaryKey": false,
549
+ "notNull": true,
550
+ "autoincrement": false
551
+ },
552
+ "updated_at": {
553
+ "name": "updated_at",
554
+ "type": "text",
555
+ "primaryKey": false,
556
+ "notNull": true,
557
+ "autoincrement": false
558
+ }
559
+ },
560
+ "indexes": {
561
+ "customers_email_unique": {
562
+ "name": "customers_email_unique",
563
+ "columns": [
564
+ "email"
565
+ ],
566
+ "isUnique": true
567
+ }
568
+ },
569
+ "foreignKeys": {},
570
+ "compositePrimaryKeys": {},
571
+ "uniqueConstraints": {},
572
+ "checkConstraints": {}
573
+ },
574
+ "email_suppressions": {
575
+ "name": "email_suppressions",
576
+ "columns": {
577
+ "email": {
578
+ "name": "email",
579
+ "type": "text",
580
+ "primaryKey": true,
581
+ "notNull": true,
582
+ "autoincrement": false
583
+ },
584
+ "reason": {
585
+ "name": "reason",
586
+ "type": "text",
587
+ "primaryKey": false,
588
+ "notNull": true,
589
+ "autoincrement": false
590
+ },
591
+ "event_id": {
592
+ "name": "event_id",
593
+ "type": "text",
594
+ "primaryKey": false,
595
+ "notNull": true,
596
+ "autoincrement": false
597
+ },
598
+ "created_at": {
599
+ "name": "created_at",
600
+ "type": "text",
601
+ "primaryKey": false,
602
+ "notNull": true,
603
+ "autoincrement": false
604
+ }
605
+ },
606
+ "indexes": {},
607
+ "foreignKeys": {},
608
+ "compositePrimaryKeys": {},
609
+ "uniqueConstraints": {},
610
+ "checkConstraints": {
611
+ "email_suppressions_reason": {
612
+ "name": "email_suppressions_reason",
613
+ "value": "\"email_suppressions\".\"reason\" IN ('hard_bounce', 'complaint')"
614
+ }
615
+ }
616
+ },
617
+ "events": {
618
+ "name": "events",
619
+ "columns": {
620
+ "seq": {
621
+ "name": "seq",
622
+ "type": "integer",
623
+ "primaryKey": true,
624
+ "notNull": true,
625
+ "autoincrement": true
626
+ },
627
+ "id": {
628
+ "name": "id",
629
+ "type": "text",
630
+ "primaryKey": false,
631
+ "notNull": true,
632
+ "autoincrement": false
633
+ },
634
+ "type": {
635
+ "name": "type",
636
+ "type": "text",
637
+ "primaryKey": false,
638
+ "notNull": true,
639
+ "autoincrement": false
640
+ },
641
+ "envelope": {
642
+ "name": "envelope",
643
+ "type": "text",
644
+ "primaryKey": false,
645
+ "notNull": true,
646
+ "autoincrement": false
647
+ },
648
+ "correlation_id": {
649
+ "name": "correlation_id",
650
+ "type": "text",
651
+ "primaryKey": false,
652
+ "notNull": true,
653
+ "autoincrement": false
654
+ },
655
+ "created_at": {
656
+ "name": "created_at",
657
+ "type": "text",
658
+ "primaryKey": false,
659
+ "notNull": true,
660
+ "autoincrement": false
661
+ },
662
+ "subject_type": {
663
+ "name": "subject_type",
664
+ "type": "text",
665
+ "primaryKey": false,
666
+ "notNull": false,
667
+ "autoincrement": false
668
+ },
669
+ "subject_id": {
670
+ "name": "subject_id",
671
+ "type": "text",
672
+ "primaryKey": false,
673
+ "notNull": false,
674
+ "autoincrement": false
675
+ },
676
+ "delivered_at": {
677
+ "name": "delivered_at",
678
+ "type": "text",
679
+ "primaryKey": false,
680
+ "notNull": false,
681
+ "autoincrement": false
682
+ },
683
+ "attempts": {
684
+ "name": "attempts",
685
+ "type": "integer",
686
+ "primaryKey": false,
687
+ "notNull": true,
688
+ "autoincrement": false,
689
+ "default": 0
690
+ },
691
+ "dead_at": {
692
+ "name": "dead_at",
693
+ "type": "text",
694
+ "primaryKey": false,
695
+ "notNull": false,
696
+ "autoincrement": false
697
+ },
698
+ "retry_at": {
699
+ "name": "retry_at",
700
+ "type": "text",
701
+ "primaryKey": false,
702
+ "notNull": false,
703
+ "autoincrement": false
704
+ }
705
+ },
706
+ "indexes": {
707
+ "events_id_unique": {
708
+ "name": "events_id_unique",
709
+ "columns": [
710
+ "id"
711
+ ],
712
+ "isUnique": true
713
+ },
714
+ "events_undelivered_idx": {
715
+ "name": "events_undelivered_idx",
716
+ "columns": [
717
+ "delivered_at",
718
+ "seq"
719
+ ],
720
+ "isUnique": false
721
+ },
722
+ "events_correlation_idx": {
723
+ "name": "events_correlation_idx",
724
+ "columns": [
725
+ "correlation_id",
726
+ "seq"
727
+ ],
728
+ "isUnique": false
729
+ },
730
+ "events_catch_up_idx": {
731
+ "name": "events_catch_up_idx",
732
+ "columns": [
733
+ "dead_at",
734
+ "delivered_at",
735
+ "seq"
736
+ ],
737
+ "isUnique": false
738
+ },
739
+ "events_subject_idx": {
740
+ "name": "events_subject_idx",
741
+ "columns": [
742
+ "subject_type",
743
+ "subject_id",
744
+ "seq"
745
+ ],
746
+ "isUnique": false
747
+ }
748
+ },
749
+ "foreignKeys": {},
750
+ "compositePrimaryKeys": {},
751
+ "uniqueConstraints": {},
752
+ "checkConstraints": {}
753
+ },
754
+ "inventory_reservations": {
755
+ "name": "inventory_reservations",
756
+ "columns": {
757
+ "reservation_id": {
758
+ "name": "reservation_id",
759
+ "type": "text",
760
+ "primaryKey": true,
761
+ "notNull": true,
762
+ "autoincrement": false
763
+ },
764
+ "variant_id": {
765
+ "name": "variant_id",
766
+ "type": "text",
767
+ "primaryKey": false,
768
+ "notNull": true,
769
+ "autoincrement": false
770
+ },
771
+ "qty": {
772
+ "name": "qty",
773
+ "type": "integer",
774
+ "primaryKey": false,
775
+ "notNull": true,
776
+ "autoincrement": false
777
+ },
778
+ "order_ref": {
779
+ "name": "order_ref",
780
+ "type": "text",
781
+ "primaryKey": false,
782
+ "notNull": false,
783
+ "autoincrement": false
784
+ },
785
+ "expires_at": {
786
+ "name": "expires_at",
787
+ "type": "text",
788
+ "primaryKey": false,
789
+ "notNull": true,
790
+ "autoincrement": false
791
+ },
792
+ "created_at": {
793
+ "name": "created_at",
794
+ "type": "text",
795
+ "primaryKey": false,
796
+ "notNull": true,
797
+ "autoincrement": false
798
+ }
799
+ },
800
+ "indexes": {
801
+ "inv_reservations_variant_idx": {
802
+ "name": "inv_reservations_variant_idx",
803
+ "columns": [
804
+ "variant_id"
805
+ ],
806
+ "isUnique": false
807
+ },
808
+ "inv_reservations_expires_idx": {
809
+ "name": "inv_reservations_expires_idx",
810
+ "columns": [
811
+ "expires_at"
812
+ ],
813
+ "isUnique": false
814
+ }
815
+ },
816
+ "foreignKeys": {},
817
+ "compositePrimaryKeys": {},
818
+ "uniqueConstraints": {},
819
+ "checkConstraints": {}
820
+ },
821
+ "order_access_keys": {
822
+ "name": "order_access_keys",
823
+ "columns": {
824
+ "id": {
825
+ "name": "id",
826
+ "type": "text",
827
+ "primaryKey": true,
828
+ "notNull": true,
829
+ "autoincrement": false
830
+ },
831
+ "order_id": {
832
+ "name": "order_id",
833
+ "type": "text",
834
+ "primaryKey": false,
835
+ "notNull": true,
836
+ "autoincrement": false
837
+ },
838
+ "key_hash": {
839
+ "name": "key_hash",
840
+ "type": "text",
841
+ "primaryKey": false,
842
+ "notNull": true,
843
+ "autoincrement": false
844
+ },
845
+ "purpose": {
846
+ "name": "purpose",
847
+ "type": "text",
848
+ "primaryKey": false,
849
+ "notNull": true,
850
+ "autoincrement": false
851
+ },
852
+ "created_at": {
853
+ "name": "created_at",
854
+ "type": "text",
855
+ "primaryKey": false,
856
+ "notNull": true,
857
+ "autoincrement": false
858
+ },
859
+ "expires_at": {
860
+ "name": "expires_at",
861
+ "type": "text",
862
+ "primaryKey": false,
863
+ "notNull": true,
864
+ "autoincrement": false
865
+ }
866
+ },
867
+ "indexes": {
868
+ "order_access_keys_key_hash_idx": {
869
+ "name": "order_access_keys_key_hash_idx",
870
+ "columns": [
871
+ "key_hash"
872
+ ],
873
+ "isUnique": true
874
+ },
875
+ "order_access_keys_order_idx": {
876
+ "name": "order_access_keys_order_idx",
877
+ "columns": [
878
+ "order_id"
879
+ ],
880
+ "isUnique": false
881
+ }
882
+ },
883
+ "foreignKeys": {},
884
+ "compositePrimaryKeys": {},
885
+ "uniqueConstraints": {},
886
+ "checkConstraints": {}
887
+ },
888
+ "order_history": {
889
+ "name": "order_history",
890
+ "columns": {
891
+ "id": {
892
+ "name": "id",
893
+ "type": "text",
894
+ "primaryKey": true,
895
+ "notNull": true,
896
+ "autoincrement": false
897
+ },
898
+ "order_id": {
899
+ "name": "order_id",
900
+ "type": "text",
901
+ "primaryKey": false,
902
+ "notNull": true,
903
+ "autoincrement": false
904
+ },
905
+ "from_status": {
906
+ "name": "from_status",
907
+ "type": "text",
908
+ "primaryKey": false,
909
+ "notNull": false,
910
+ "autoincrement": false
911
+ },
912
+ "to_status": {
913
+ "name": "to_status",
914
+ "type": "text",
915
+ "primaryKey": false,
916
+ "notNull": true,
917
+ "autoincrement": false
918
+ },
919
+ "actor": {
920
+ "name": "actor",
921
+ "type": "text",
922
+ "primaryKey": false,
923
+ "notNull": true,
924
+ "autoincrement": false
925
+ },
926
+ "note": {
927
+ "name": "note",
928
+ "type": "text",
929
+ "primaryKey": false,
930
+ "notNull": true,
931
+ "autoincrement": false,
932
+ "default": "''"
933
+ },
934
+ "timestamp": {
935
+ "name": "timestamp",
936
+ "type": "text",
937
+ "primaryKey": false,
938
+ "notNull": true,
939
+ "autoincrement": false
940
+ }
941
+ },
942
+ "indexes": {
943
+ "order_history_order_idx": {
944
+ "name": "order_history_order_idx",
945
+ "columns": [
946
+ "order_id"
947
+ ],
948
+ "isUnique": false
949
+ }
950
+ },
951
+ "foreignKeys": {},
952
+ "compositePrimaryKeys": {},
953
+ "uniqueConstraints": {},
954
+ "checkConstraints": {}
955
+ },
956
+ "order_refunds": {
957
+ "name": "order_refunds",
958
+ "columns": {
959
+ "id": {
960
+ "name": "id",
961
+ "type": "text",
962
+ "primaryKey": true,
963
+ "notNull": true,
964
+ "autoincrement": false
965
+ },
966
+ "order_id": {
967
+ "name": "order_id",
968
+ "type": "text",
969
+ "primaryKey": false,
970
+ "notNull": true,
971
+ "autoincrement": false
972
+ },
973
+ "amount_minor": {
974
+ "name": "amount_minor",
975
+ "type": "integer",
976
+ "primaryKey": false,
977
+ "notNull": true,
978
+ "autoincrement": false
979
+ },
980
+ "currency": {
981
+ "name": "currency",
982
+ "type": "text",
983
+ "primaryKey": false,
984
+ "notNull": true,
985
+ "autoincrement": false
986
+ },
987
+ "provider_refund_id": {
988
+ "name": "provider_refund_id",
989
+ "type": "text",
990
+ "primaryKey": false,
991
+ "notNull": false,
992
+ "autoincrement": false
993
+ },
994
+ "status": {
995
+ "name": "status",
996
+ "type": "text",
997
+ "primaryKey": false,
998
+ "notNull": true,
999
+ "autoincrement": false,
1000
+ "default": "'pending'"
1001
+ },
1002
+ "reason": {
1003
+ "name": "reason",
1004
+ "type": "text",
1005
+ "primaryKey": false,
1006
+ "notNull": false,
1007
+ "autoincrement": false
1008
+ },
1009
+ "actor": {
1010
+ "name": "actor",
1011
+ "type": "text",
1012
+ "primaryKey": false,
1013
+ "notNull": true,
1014
+ "autoincrement": false
1015
+ },
1016
+ "created_at": {
1017
+ "name": "created_at",
1018
+ "type": "text",
1019
+ "primaryKey": false,
1020
+ "notNull": true,
1021
+ "autoincrement": false
1022
+ },
1023
+ "request_id": {
1024
+ "name": "request_id",
1025
+ "type": "text",
1026
+ "primaryKey": false,
1027
+ "notNull": false,
1028
+ "autoincrement": false
1029
+ }
1030
+ },
1031
+ "indexes": {
1032
+ "order_refunds_order_idx": {
1033
+ "name": "order_refunds_order_idx",
1034
+ "columns": [
1035
+ "order_id"
1036
+ ],
1037
+ "isUnique": false
1038
+ },
1039
+ "order_refunds_order_request_idx": {
1040
+ "name": "order_refunds_order_request_idx",
1041
+ "columns": [
1042
+ "order_id",
1043
+ "request_id"
1044
+ ],
1045
+ "isUnique": true
1046
+ }
1047
+ },
1048
+ "foreignKeys": {},
1049
+ "compositePrimaryKeys": {},
1050
+ "uniqueConstraints": {},
1051
+ "checkConstraints": {}
1052
+ },
1053
+ "order_sequences": {
1054
+ "name": "order_sequences",
1055
+ "columns": {
1056
+ "id": {
1057
+ "name": "id",
1058
+ "type": "integer",
1059
+ "primaryKey": true,
1060
+ "notNull": true,
1061
+ "autoincrement": false
1062
+ },
1063
+ "next_value": {
1064
+ "name": "next_value",
1065
+ "type": "integer",
1066
+ "primaryKey": false,
1067
+ "notNull": true,
1068
+ "autoincrement": false
1069
+ }
1070
+ },
1071
+ "indexes": {},
1072
+ "foreignKeys": {},
1073
+ "compositePrimaryKeys": {},
1074
+ "uniqueConstraints": {},
1075
+ "checkConstraints": {}
1076
+ },
1077
+ "order_shipments": {
1078
+ "name": "order_shipments",
1079
+ "columns": {
1080
+ "order_id": {
1081
+ "name": "order_id",
1082
+ "type": "text",
1083
+ "primaryKey": true,
1084
+ "notNull": true,
1085
+ "autoincrement": false
1086
+ },
1087
+ "carrier": {
1088
+ "name": "carrier",
1089
+ "type": "text",
1090
+ "primaryKey": false,
1091
+ "notNull": true,
1092
+ "autoincrement": false
1093
+ },
1094
+ "tracking_number": {
1095
+ "name": "tracking_number",
1096
+ "type": "text",
1097
+ "primaryKey": false,
1098
+ "notNull": true,
1099
+ "autoincrement": false
1100
+ },
1101
+ "created_at": {
1102
+ "name": "created_at",
1103
+ "type": "text",
1104
+ "primaryKey": false,
1105
+ "notNull": true,
1106
+ "autoincrement": false
1107
+ }
1108
+ },
1109
+ "indexes": {
1110
+ "order_shipments_tracking_number_idx": {
1111
+ "name": "order_shipments_tracking_number_idx",
1112
+ "columns": [
1113
+ "tracking_number"
1114
+ ],
1115
+ "isUnique": false
1116
+ }
1117
+ },
1118
+ "foreignKeys": {
1119
+ "order_shipments_order_id_orders_id_fk": {
1120
+ "name": "order_shipments_order_id_orders_id_fk",
1121
+ "tableFrom": "order_shipments",
1122
+ "tableTo": "orders",
1123
+ "columnsFrom": [
1124
+ "order_id"
1125
+ ],
1126
+ "columnsTo": [
1127
+ "id"
1128
+ ],
1129
+ "onDelete": "no action",
1130
+ "onUpdate": "no action"
1131
+ }
1132
+ },
1133
+ "compositePrimaryKeys": {},
1134
+ "uniqueConstraints": {},
1135
+ "checkConstraints": {}
1136
+ },
1137
+ "orders": {
1138
+ "name": "orders",
1139
+ "columns": {
1140
+ "id": {
1141
+ "name": "id",
1142
+ "type": "text",
1143
+ "primaryKey": true,
1144
+ "notNull": true,
1145
+ "autoincrement": false
1146
+ },
1147
+ "order_number": {
1148
+ "name": "order_number",
1149
+ "type": "text",
1150
+ "primaryKey": false,
1151
+ "notNull": true,
1152
+ "autoincrement": false
1153
+ },
1154
+ "sequence": {
1155
+ "name": "sequence",
1156
+ "type": "integer",
1157
+ "primaryKey": false,
1158
+ "notNull": true,
1159
+ "autoincrement": false
1160
+ },
1161
+ "customer_id": {
1162
+ "name": "customer_id",
1163
+ "type": "text",
1164
+ "primaryKey": false,
1165
+ "notNull": false,
1166
+ "autoincrement": false
1167
+ },
1168
+ "status": {
1169
+ "name": "status",
1170
+ "type": "text",
1171
+ "primaryKey": false,
1172
+ "notNull": true,
1173
+ "autoincrement": false,
1174
+ "default": "'pending'"
1175
+ },
1176
+ "email": {
1177
+ "name": "email",
1178
+ "type": "text",
1179
+ "primaryKey": false,
1180
+ "notNull": true,
1181
+ "autoincrement": false
1182
+ },
1183
+ "billing_address": {
1184
+ "name": "billing_address",
1185
+ "type": "text",
1186
+ "primaryKey": false,
1187
+ "notNull": true,
1188
+ "autoincrement": false
1189
+ },
1190
+ "shipping_address": {
1191
+ "name": "shipping_address",
1192
+ "type": "text",
1193
+ "primaryKey": false,
1194
+ "notNull": true,
1195
+ "autoincrement": false
1196
+ },
1197
+ "line_items": {
1198
+ "name": "line_items",
1199
+ "type": "text",
1200
+ "primaryKey": false,
1201
+ "notNull": true,
1202
+ "autoincrement": false
1203
+ },
1204
+ "subtotal_minor": {
1205
+ "name": "subtotal_minor",
1206
+ "type": "integer",
1207
+ "primaryKey": false,
1208
+ "notNull": true,
1209
+ "autoincrement": false
1210
+ },
1211
+ "tax_total_minor": {
1212
+ "name": "tax_total_minor",
1213
+ "type": "integer",
1214
+ "primaryKey": false,
1215
+ "notNull": true,
1216
+ "autoincrement": false,
1217
+ "default": 0
1218
+ },
1219
+ "shipping_total_minor": {
1220
+ "name": "shipping_total_minor",
1221
+ "type": "integer",
1222
+ "primaryKey": false,
1223
+ "notNull": true,
1224
+ "autoincrement": false,
1225
+ "default": 0
1226
+ },
1227
+ "discount_total_minor": {
1228
+ "name": "discount_total_minor",
1229
+ "type": "integer",
1230
+ "primaryKey": false,
1231
+ "notNull": true,
1232
+ "autoincrement": false,
1233
+ "default": 0
1234
+ },
1235
+ "total_minor": {
1236
+ "name": "total_minor",
1237
+ "type": "integer",
1238
+ "primaryKey": false,
1239
+ "notNull": true,
1240
+ "autoincrement": false
1241
+ },
1242
+ "currency": {
1243
+ "name": "currency",
1244
+ "type": "text",
1245
+ "primaryKey": false,
1246
+ "notNull": true,
1247
+ "autoincrement": false
1248
+ },
1249
+ "notes": {
1250
+ "name": "notes",
1251
+ "type": "text",
1252
+ "primaryKey": false,
1253
+ "notNull": true,
1254
+ "autoincrement": false,
1255
+ "default": "''"
1256
+ },
1257
+ "metadata": {
1258
+ "name": "metadata",
1259
+ "type": "text",
1260
+ "primaryKey": false,
1261
+ "notNull": true,
1262
+ "autoincrement": false,
1263
+ "default": "'{}'"
1264
+ },
1265
+ "payment_intent_id": {
1266
+ "name": "payment_intent_id",
1267
+ "type": "text",
1268
+ "primaryKey": false,
1269
+ "notNull": false,
1270
+ "autoincrement": false
1271
+ },
1272
+ "cart_token": {
1273
+ "name": "cart_token",
1274
+ "type": "text",
1275
+ "primaryKey": false,
1276
+ "notNull": false,
1277
+ "autoincrement": false
1278
+ },
1279
+ "captured_minor": {
1280
+ "name": "captured_minor",
1281
+ "type": "integer",
1282
+ "primaryKey": false,
1283
+ "notNull": true,
1284
+ "autoincrement": false,
1285
+ "default": 0
1286
+ },
1287
+ "captured_at": {
1288
+ "name": "captured_at",
1289
+ "type": "text",
1290
+ "primaryKey": false,
1291
+ "notNull": false,
1292
+ "autoincrement": false
1293
+ },
1294
+ "refunded_minor": {
1295
+ "name": "refunded_minor",
1296
+ "type": "integer",
1297
+ "primaryKey": false,
1298
+ "notNull": true,
1299
+ "autoincrement": false,
1300
+ "default": 0
1301
+ },
1302
+ "capture_method": {
1303
+ "name": "capture_method",
1304
+ "type": "text",
1305
+ "primaryKey": false,
1306
+ "notNull": false,
1307
+ "autoincrement": false
1308
+ },
1309
+ "created_at": {
1310
+ "name": "created_at",
1311
+ "type": "text",
1312
+ "primaryKey": false,
1313
+ "notNull": true,
1314
+ "autoincrement": false
1315
+ },
1316
+ "updated_at": {
1317
+ "name": "updated_at",
1318
+ "type": "text",
1319
+ "primaryKey": false,
1320
+ "notNull": true,
1321
+ "autoincrement": false
1322
+ }
1323
+ },
1324
+ "indexes": {
1325
+ "orders_number_unique": {
1326
+ "name": "orders_number_unique",
1327
+ "columns": [
1328
+ "order_number"
1329
+ ],
1330
+ "isUnique": true
1331
+ },
1332
+ "orders_sequence_unique": {
1333
+ "name": "orders_sequence_unique",
1334
+ "columns": [
1335
+ "sequence"
1336
+ ],
1337
+ "isUnique": true
1338
+ },
1339
+ "orders_customer_idx": {
1340
+ "name": "orders_customer_idx",
1341
+ "columns": [
1342
+ "customer_id"
1343
+ ],
1344
+ "isUnique": false
1345
+ },
1346
+ "orders_status_idx": {
1347
+ "name": "orders_status_idx",
1348
+ "columns": [
1349
+ "status"
1350
+ ],
1351
+ "isUnique": false
1352
+ },
1353
+ "orders_payment_intent_idx": {
1354
+ "name": "orders_payment_intent_idx",
1355
+ "columns": [
1356
+ "payment_intent_id"
1357
+ ],
1358
+ "isUnique": false
1359
+ },
1360
+ "orders_pending_cart_unique": {
1361
+ "name": "orders_pending_cart_unique",
1362
+ "columns": [
1363
+ "cart_token"
1364
+ ],
1365
+ "isUnique": true,
1366
+ "where": "status = 'pending'"
1367
+ }
1368
+ },
1369
+ "foreignKeys": {},
1370
+ "compositePrimaryKeys": {},
1371
+ "uniqueConstraints": {},
1372
+ "checkConstraints": {}
1373
+ },
1374
+ "processed_events": {
1375
+ "name": "processed_events",
1376
+ "columns": {
1377
+ "handler_name": {
1378
+ "name": "handler_name",
1379
+ "type": "text",
1380
+ "primaryKey": false,
1381
+ "notNull": true,
1382
+ "autoincrement": false
1383
+ },
1384
+ "event_id": {
1385
+ "name": "event_id",
1386
+ "type": "text",
1387
+ "primaryKey": false,
1388
+ "notNull": true,
1389
+ "autoincrement": false
1390
+ },
1391
+ "processed_at": {
1392
+ "name": "processed_at",
1393
+ "type": "text",
1394
+ "primaryKey": false,
1395
+ "notNull": true,
1396
+ "autoincrement": false
1397
+ }
1398
+ },
1399
+ "indexes": {},
1400
+ "foreignKeys": {},
1401
+ "compositePrimaryKeys": {
1402
+ "processed_events_handler_name_event_id_pk": {
1403
+ "columns": [
1404
+ "handler_name",
1405
+ "event_id"
1406
+ ],
1407
+ "name": "processed_events_handler_name_event_id_pk"
1408
+ }
1409
+ },
1410
+ "uniqueConstraints": {},
1411
+ "checkConstraints": {}
1412
+ },
1413
+ "product_categories": {
1414
+ "name": "product_categories",
1415
+ "columns": {
1416
+ "product_id": {
1417
+ "name": "product_id",
1418
+ "type": "text",
1419
+ "primaryKey": false,
1420
+ "notNull": true,
1421
+ "autoincrement": false
1422
+ },
1423
+ "category_id": {
1424
+ "name": "category_id",
1425
+ "type": "text",
1426
+ "primaryKey": false,
1427
+ "notNull": true,
1428
+ "autoincrement": false
1429
+ }
1430
+ },
1431
+ "indexes": {
1432
+ "product_categories_category_idx": {
1433
+ "name": "product_categories_category_idx",
1434
+ "columns": [
1435
+ "category_id"
1436
+ ],
1437
+ "isUnique": false
1438
+ }
1439
+ },
1440
+ "foreignKeys": {},
1441
+ "compositePrimaryKeys": {
1442
+ "product_categories_product_id_category_id_pk": {
1443
+ "columns": [
1444
+ "product_id",
1445
+ "category_id"
1446
+ ],
1447
+ "name": "product_categories_product_id_category_id_pk"
1448
+ }
1449
+ },
1450
+ "uniqueConstraints": {},
1451
+ "checkConstraints": {}
1452
+ },
1453
+ "products": {
1454
+ "name": "products",
1455
+ "columns": {
1456
+ "id": {
1457
+ "name": "id",
1458
+ "type": "text",
1459
+ "primaryKey": true,
1460
+ "notNull": true,
1461
+ "autoincrement": false
1462
+ },
1463
+ "slug": {
1464
+ "name": "slug",
1465
+ "type": "text",
1466
+ "primaryKey": false,
1467
+ "notNull": true,
1468
+ "autoincrement": false
1469
+ },
1470
+ "name": {
1471
+ "name": "name",
1472
+ "type": "text",
1473
+ "primaryKey": false,
1474
+ "notNull": true,
1475
+ "autoincrement": false
1476
+ },
1477
+ "description": {
1478
+ "name": "description",
1479
+ "type": "text",
1480
+ "primaryKey": false,
1481
+ "notNull": true,
1482
+ "autoincrement": false,
1483
+ "default": "''"
1484
+ },
1485
+ "short_description": {
1486
+ "name": "short_description",
1487
+ "type": "text",
1488
+ "primaryKey": false,
1489
+ "notNull": true,
1490
+ "autoincrement": false,
1491
+ "default": "''"
1492
+ },
1493
+ "status": {
1494
+ "name": "status",
1495
+ "type": "text",
1496
+ "primaryKey": false,
1497
+ "notNull": true,
1498
+ "autoincrement": false,
1499
+ "default": "'draft'"
1500
+ },
1501
+ "type": {
1502
+ "name": "type",
1503
+ "type": "text",
1504
+ "primaryKey": false,
1505
+ "notNull": true,
1506
+ "autoincrement": false,
1507
+ "default": "'simple'"
1508
+ },
1509
+ "seo_title": {
1510
+ "name": "seo_title",
1511
+ "type": "text",
1512
+ "primaryKey": false,
1513
+ "notNull": true,
1514
+ "autoincrement": false,
1515
+ "default": "''"
1516
+ },
1517
+ "seo_description": {
1518
+ "name": "seo_description",
1519
+ "type": "text",
1520
+ "primaryKey": false,
1521
+ "notNull": true,
1522
+ "autoincrement": false,
1523
+ "default": "''"
1524
+ },
1525
+ "media": {
1526
+ "name": "media",
1527
+ "type": "text",
1528
+ "primaryKey": false,
1529
+ "notNull": true,
1530
+ "autoincrement": false,
1531
+ "default": "'[]'"
1532
+ },
1533
+ "metadata": {
1534
+ "name": "metadata",
1535
+ "type": "text",
1536
+ "primaryKey": false,
1537
+ "notNull": true,
1538
+ "autoincrement": false,
1539
+ "default": "'{}'"
1540
+ },
1541
+ "created_at": {
1542
+ "name": "created_at",
1543
+ "type": "text",
1544
+ "primaryKey": false,
1545
+ "notNull": true,
1546
+ "autoincrement": false
1547
+ },
1548
+ "updated_at": {
1549
+ "name": "updated_at",
1550
+ "type": "text",
1551
+ "primaryKey": false,
1552
+ "notNull": true,
1553
+ "autoincrement": false
1554
+ }
1555
+ },
1556
+ "indexes": {
1557
+ "products_slug_unique": {
1558
+ "name": "products_slug_unique",
1559
+ "columns": [
1560
+ "slug"
1561
+ ],
1562
+ "isUnique": true
1563
+ },
1564
+ "products_status_idx": {
1565
+ "name": "products_status_idx",
1566
+ "columns": [
1567
+ "status"
1568
+ ],
1569
+ "isUnique": false
1570
+ }
1571
+ },
1572
+ "foreignKeys": {},
1573
+ "compositePrimaryKeys": {},
1574
+ "uniqueConstraints": {},
1575
+ "checkConstraints": {}
1576
+ },
1577
+ "refresh_tokens": {
1578
+ "name": "refresh_tokens",
1579
+ "columns": {
1580
+ "id": {
1581
+ "name": "id",
1582
+ "type": "text",
1583
+ "primaryKey": true,
1584
+ "notNull": true,
1585
+ "autoincrement": false
1586
+ },
1587
+ "customer_id": {
1588
+ "name": "customer_id",
1589
+ "type": "text",
1590
+ "primaryKey": false,
1591
+ "notNull": true,
1592
+ "autoincrement": false
1593
+ },
1594
+ "token_hash": {
1595
+ "name": "token_hash",
1596
+ "type": "text",
1597
+ "primaryKey": false,
1598
+ "notNull": true,
1599
+ "autoincrement": false
1600
+ },
1601
+ "revoked_at": {
1602
+ "name": "revoked_at",
1603
+ "type": "text",
1604
+ "primaryKey": false,
1605
+ "notNull": false,
1606
+ "autoincrement": false
1607
+ },
1608
+ "replaced_by_jti": {
1609
+ "name": "replaced_by_jti",
1610
+ "type": "text",
1611
+ "primaryKey": false,
1612
+ "notNull": false,
1613
+ "autoincrement": false
1614
+ },
1615
+ "expires_at": {
1616
+ "name": "expires_at",
1617
+ "type": "text",
1618
+ "primaryKey": false,
1619
+ "notNull": true,
1620
+ "autoincrement": false
1621
+ },
1622
+ "created_at": {
1623
+ "name": "created_at",
1624
+ "type": "text",
1625
+ "primaryKey": false,
1626
+ "notNull": true,
1627
+ "autoincrement": false
1628
+ }
1629
+ },
1630
+ "indexes": {
1631
+ "refresh_tokens_customer_idx": {
1632
+ "name": "refresh_tokens_customer_idx",
1633
+ "columns": [
1634
+ "customer_id"
1635
+ ],
1636
+ "isUnique": false
1637
+ }
1638
+ },
1639
+ "foreignKeys": {},
1640
+ "compositePrimaryKeys": {},
1641
+ "uniqueConstraints": {},
1642
+ "checkConstraints": {}
1643
+ },
1644
+ "reviews": {
1645
+ "name": "reviews",
1646
+ "columns": {
1647
+ "id": {
1648
+ "name": "id",
1649
+ "type": "text",
1650
+ "primaryKey": true,
1651
+ "notNull": true,
1652
+ "autoincrement": false
1653
+ },
1654
+ "product_id": {
1655
+ "name": "product_id",
1656
+ "type": "text",
1657
+ "primaryKey": false,
1658
+ "notNull": true,
1659
+ "autoincrement": false
1660
+ },
1661
+ "customer_id": {
1662
+ "name": "customer_id",
1663
+ "type": "text",
1664
+ "primaryKey": false,
1665
+ "notNull": false,
1666
+ "autoincrement": false
1667
+ },
1668
+ "order_id": {
1669
+ "name": "order_id",
1670
+ "type": "text",
1671
+ "primaryKey": false,
1672
+ "notNull": false,
1673
+ "autoincrement": false
1674
+ },
1675
+ "rating": {
1676
+ "name": "rating",
1677
+ "type": "integer",
1678
+ "primaryKey": false,
1679
+ "notNull": true,
1680
+ "autoincrement": false
1681
+ },
1682
+ "title": {
1683
+ "name": "title",
1684
+ "type": "text",
1685
+ "primaryKey": false,
1686
+ "notNull": true,
1687
+ "autoincrement": false,
1688
+ "default": "''"
1689
+ },
1690
+ "body": {
1691
+ "name": "body",
1692
+ "type": "text",
1693
+ "primaryKey": false,
1694
+ "notNull": true,
1695
+ "autoincrement": false,
1696
+ "default": "''"
1697
+ },
1698
+ "moderation_status": {
1699
+ "name": "moderation_status",
1700
+ "type": "text",
1701
+ "primaryKey": false,
1702
+ "notNull": true,
1703
+ "autoincrement": false,
1704
+ "default": "'pending'"
1705
+ },
1706
+ "submitted_at": {
1707
+ "name": "submitted_at",
1708
+ "type": "text",
1709
+ "primaryKey": false,
1710
+ "notNull": true,
1711
+ "autoincrement": false
1712
+ },
1713
+ "moderated_at": {
1714
+ "name": "moderated_at",
1715
+ "type": "text",
1716
+ "primaryKey": false,
1717
+ "notNull": false,
1718
+ "autoincrement": false
1719
+ },
1720
+ "moderated_by": {
1721
+ "name": "moderated_by",
1722
+ "type": "text",
1723
+ "primaryKey": false,
1724
+ "notNull": false,
1725
+ "autoincrement": false
1726
+ }
1727
+ },
1728
+ "indexes": {
1729
+ "reviews_product_idx": {
1730
+ "name": "reviews_product_idx",
1731
+ "columns": [
1732
+ "product_id"
1733
+ ],
1734
+ "isUnique": false
1735
+ },
1736
+ "reviews_status_idx": {
1737
+ "name": "reviews_status_idx",
1738
+ "columns": [
1739
+ "moderation_status"
1740
+ ],
1741
+ "isUnique": false
1742
+ }
1743
+ },
1744
+ "foreignKeys": {},
1745
+ "compositePrimaryKeys": {},
1746
+ "uniqueConstraints": {},
1747
+ "checkConstraints": {}
1748
+ },
1749
+ "settings": {
1750
+ "name": "settings",
1751
+ "columns": {
1752
+ "slot": {
1753
+ "name": "slot",
1754
+ "type": "text",
1755
+ "primaryKey": false,
1756
+ "notNull": true,
1757
+ "autoincrement": false
1758
+ },
1759
+ "path": {
1760
+ "name": "path",
1761
+ "type": "text",
1762
+ "primaryKey": false,
1763
+ "notNull": true,
1764
+ "autoincrement": false
1765
+ },
1766
+ "ciphertext": {
1767
+ "name": "ciphertext",
1768
+ "type": "blob",
1769
+ "primaryKey": false,
1770
+ "notNull": false,
1771
+ "autoincrement": false
1772
+ },
1773
+ "plain": {
1774
+ "name": "plain",
1775
+ "type": "text",
1776
+ "primaryKey": false,
1777
+ "notNull": false,
1778
+ "autoincrement": false
1779
+ },
1780
+ "iv": {
1781
+ "name": "iv",
1782
+ "type": "blob",
1783
+ "primaryKey": false,
1784
+ "notNull": false,
1785
+ "autoincrement": false
1786
+ },
1787
+ "tag": {
1788
+ "name": "tag",
1789
+ "type": "blob",
1790
+ "primaryKey": false,
1791
+ "notNull": false,
1792
+ "autoincrement": false
1793
+ },
1794
+ "key_id": {
1795
+ "name": "key_id",
1796
+ "type": "text",
1797
+ "primaryKey": false,
1798
+ "notNull": false,
1799
+ "autoincrement": false
1800
+ },
1801
+ "updated_at": {
1802
+ "name": "updated_at",
1803
+ "type": "text",
1804
+ "primaryKey": false,
1805
+ "notNull": true,
1806
+ "autoincrement": false
1807
+ },
1808
+ "updated_by": {
1809
+ "name": "updated_by",
1810
+ "type": "text",
1811
+ "primaryKey": false,
1812
+ "notNull": false,
1813
+ "autoincrement": false
1814
+ }
1815
+ },
1816
+ "indexes": {},
1817
+ "foreignKeys": {},
1818
+ "compositePrimaryKeys": {
1819
+ "settings_slot_path_pk": {
1820
+ "columns": [
1821
+ "slot",
1822
+ "path"
1823
+ ],
1824
+ "name": "settings_slot_path_pk"
1825
+ }
1826
+ },
1827
+ "uniqueConstraints": {},
1828
+ "checkConstraints": {
1829
+ "settings_one_value": {
1830
+ "name": "settings_one_value",
1831
+ "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))"
1832
+ }
1833
+ }
1834
+ },
1835
+ "stock_adjustments": {
1836
+ "name": "stock_adjustments",
1837
+ "columns": {
1838
+ "id": {
1839
+ "name": "id",
1840
+ "type": "text",
1841
+ "primaryKey": true,
1842
+ "notNull": true,
1843
+ "autoincrement": false
1844
+ },
1845
+ "variant_id": {
1846
+ "name": "variant_id",
1847
+ "type": "text",
1848
+ "primaryKey": false,
1849
+ "notNull": true,
1850
+ "autoincrement": false
1851
+ },
1852
+ "adjustment": {
1853
+ "name": "adjustment",
1854
+ "type": "integer",
1855
+ "primaryKey": false,
1856
+ "notNull": true,
1857
+ "autoincrement": false
1858
+ },
1859
+ "reason": {
1860
+ "name": "reason",
1861
+ "type": "text",
1862
+ "primaryKey": false,
1863
+ "notNull": true,
1864
+ "autoincrement": false
1865
+ },
1866
+ "actor": {
1867
+ "name": "actor",
1868
+ "type": "text",
1869
+ "primaryKey": false,
1870
+ "notNull": true,
1871
+ "autoincrement": false
1872
+ },
1873
+ "previous_qty": {
1874
+ "name": "previous_qty",
1875
+ "type": "integer",
1876
+ "primaryKey": false,
1877
+ "notNull": true,
1878
+ "autoincrement": false
1879
+ },
1880
+ "new_qty": {
1881
+ "name": "new_qty",
1882
+ "type": "integer",
1883
+ "primaryKey": false,
1884
+ "notNull": true,
1885
+ "autoincrement": false
1886
+ },
1887
+ "timestamp": {
1888
+ "name": "timestamp",
1889
+ "type": "text",
1890
+ "primaryKey": false,
1891
+ "notNull": true,
1892
+ "autoincrement": false
1893
+ }
1894
+ },
1895
+ "indexes": {
1896
+ "stock_adjustments_variant_idx": {
1897
+ "name": "stock_adjustments_variant_idx",
1898
+ "columns": [
1899
+ "variant_id"
1900
+ ],
1901
+ "isUnique": false
1902
+ }
1903
+ },
1904
+ "foreignKeys": {},
1905
+ "compositePrimaryKeys": {},
1906
+ "uniqueConstraints": {},
1907
+ "checkConstraints": {}
1908
+ },
1909
+ "variants": {
1910
+ "name": "variants",
1911
+ "columns": {
1912
+ "id": {
1913
+ "name": "id",
1914
+ "type": "text",
1915
+ "primaryKey": true,
1916
+ "notNull": true,
1917
+ "autoincrement": false
1918
+ },
1919
+ "product_id": {
1920
+ "name": "product_id",
1921
+ "type": "text",
1922
+ "primaryKey": false,
1923
+ "notNull": true,
1924
+ "autoincrement": false
1925
+ },
1926
+ "sku": {
1927
+ "name": "sku",
1928
+ "type": "text",
1929
+ "primaryKey": false,
1930
+ "notNull": true,
1931
+ "autoincrement": false
1932
+ },
1933
+ "name": {
1934
+ "name": "name",
1935
+ "type": "text",
1936
+ "primaryKey": false,
1937
+ "notNull": true,
1938
+ "autoincrement": false,
1939
+ "default": "''"
1940
+ },
1941
+ "price_minor": {
1942
+ "name": "price_minor",
1943
+ "type": "integer",
1944
+ "primaryKey": false,
1945
+ "notNull": true,
1946
+ "autoincrement": false
1947
+ },
1948
+ "compare_at_price_minor": {
1949
+ "name": "compare_at_price_minor",
1950
+ "type": "integer",
1951
+ "primaryKey": false,
1952
+ "notNull": false,
1953
+ "autoincrement": false
1954
+ },
1955
+ "weight_grams": {
1956
+ "name": "weight_grams",
1957
+ "type": "integer",
1958
+ "primaryKey": false,
1959
+ "notNull": false,
1960
+ "autoincrement": false
1961
+ },
1962
+ "dimensions": {
1963
+ "name": "dimensions",
1964
+ "type": "text",
1965
+ "primaryKey": false,
1966
+ "notNull": false,
1967
+ "autoincrement": false
1968
+ },
1969
+ "stock": {
1970
+ "name": "stock",
1971
+ "type": "integer",
1972
+ "primaryKey": false,
1973
+ "notNull": true,
1974
+ "autoincrement": false,
1975
+ "default": 0
1976
+ },
1977
+ "low_stock_threshold": {
1978
+ "name": "low_stock_threshold",
1979
+ "type": "integer",
1980
+ "primaryKey": false,
1981
+ "notNull": true,
1982
+ "autoincrement": false,
1983
+ "default": 0
1984
+ },
1985
+ "options": {
1986
+ "name": "options",
1987
+ "type": "text",
1988
+ "primaryKey": false,
1989
+ "notNull": true,
1990
+ "autoincrement": false,
1991
+ "default": "'[]'"
1992
+ },
1993
+ "status": {
1994
+ "name": "status",
1995
+ "type": "text",
1996
+ "primaryKey": false,
1997
+ "notNull": true,
1998
+ "autoincrement": false,
1999
+ "default": "'active'"
2000
+ },
2001
+ "created_at": {
2002
+ "name": "created_at",
2003
+ "type": "text",
2004
+ "primaryKey": false,
2005
+ "notNull": true,
2006
+ "autoincrement": false
2007
+ },
2008
+ "updated_at": {
2009
+ "name": "updated_at",
2010
+ "type": "text",
2011
+ "primaryKey": false,
2012
+ "notNull": true,
2013
+ "autoincrement": false
2014
+ }
2015
+ },
2016
+ "indexes": {
2017
+ "variants_sku_unique": {
2018
+ "name": "variants_sku_unique",
2019
+ "columns": [
2020
+ "sku"
2021
+ ],
2022
+ "isUnique": true
2023
+ },
2024
+ "variants_product_idx": {
2025
+ "name": "variants_product_idx",
2026
+ "columns": [
2027
+ "product_id"
2028
+ ],
2029
+ "isUnique": false
2030
+ }
2031
+ },
2032
+ "foreignKeys": {},
2033
+ "compositePrimaryKeys": {},
2034
+ "uniqueConstraints": {},
2035
+ "checkConstraints": {}
2036
+ }
2037
+ },
2038
+ "views": {},
2039
+ "enums": {},
2040
+ "_meta": {
2041
+ "schemas": {},
2042
+ "tables": {},
2043
+ "columns": {}
2044
+ },
2045
+ "internal": {
2046
+ "indexes": {}
2047
+ }
2048
+ }