@nymbalhq/platform 1.3.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 (41) hide show
  1. package/dist/{chunk-QN56IB4G.js → chunk-NNDIAIT6.js} +187 -5
  2. package/dist/chunk-NNDIAIT6.js.map +1 -0
  3. package/dist/{chunk-2PLYK5RU.js → chunk-TRLERRUI.js} +3559 -509
  4. package/dist/chunk-TRLERRUI.js.map +1 -0
  5. package/dist/db/schema/index.d.ts +5276 -3224
  6. package/dist/db/schema/index.js +1 -1
  7. package/dist/index.d.ts +428 -81
  8. package/dist/index.js +1200 -2254
  9. package/dist/index.js.map +1 -1
  10. package/dist/register-SBGUI2L5.js +8 -0
  11. package/migrations/postgres/0013_order_access_keys.sql +11 -0
  12. package/migrations/postgres/0014_alert_subscriptions.sql +22 -0
  13. package/migrations/postgres/0015_events_retry_at.sql +1 -0
  14. package/migrations/postgres/0016_email_suppressions.sql +7 -0
  15. package/migrations/postgres/0017_order_shipments.sql +14 -0
  16. package/migrations/postgres/0018_order_key_expiry.sql +8 -0
  17. package/migrations/postgres/meta/0013_snapshot.json +2000 -0
  18. package/migrations/postgres/meta/0014_snapshot.json +2185 -0
  19. package/migrations/postgres/meta/0015_snapshot.json +2191 -0
  20. package/migrations/postgres/meta/0016_snapshot.json +2233 -0
  21. package/migrations/postgres/meta/0017_snapshot.json +2300 -0
  22. package/migrations/postgres/meta/0018_snapshot.json +2306 -0
  23. package/migrations/postgres/meta/_journal.json +42 -0
  24. package/migrations/sqlite/0013_order_access_keys.sql +11 -0
  25. package/migrations/sqlite/0014_alert_subscriptions.sql +22 -0
  26. package/migrations/sqlite/0015_events_retry_at.sql +1 -0
  27. package/migrations/sqlite/0016_email_suppressions.sql +7 -0
  28. package/migrations/sqlite/0017_order_shipments.sql +9 -0
  29. package/migrations/sqlite/0018_order_key_expiry.sql +25 -0
  30. package/migrations/sqlite/meta/0013_snapshot.json +1788 -0
  31. package/migrations/sqlite/meta/0014_snapshot.json +1931 -0
  32. package/migrations/sqlite/meta/0015_snapshot.json +1938 -0
  33. package/migrations/sqlite/meta/0016_snapshot.json +1981 -0
  34. package/migrations/sqlite/meta/0017_snapshot.json +2041 -0
  35. package/migrations/sqlite/meta/0018_snapshot.json +2048 -0
  36. package/migrations/sqlite/meta/_journal.json +42 -0
  37. package/package.json +17 -47
  38. package/dist/chunk-2PLYK5RU.js.map +0 -1
  39. package/dist/chunk-QN56IB4G.js.map +0 -1
  40. package/dist/register-UUQ64HZP.js +0 -8
  41. /package/dist/{register-UUQ64HZP.js.map → register-SBGUI2L5.js.map} +0 -0
@@ -0,0 +1,1931 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "f766420c-1942-4df8-90e4-039e04002302",
5
+ "prevId": "307ae968-400f-4196-b51d-f0f8507fd779",
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
+ "events": {
575
+ "name": "events",
576
+ "columns": {
577
+ "seq": {
578
+ "name": "seq",
579
+ "type": "integer",
580
+ "primaryKey": true,
581
+ "notNull": true,
582
+ "autoincrement": true
583
+ },
584
+ "id": {
585
+ "name": "id",
586
+ "type": "text",
587
+ "primaryKey": false,
588
+ "notNull": true,
589
+ "autoincrement": false
590
+ },
591
+ "type": {
592
+ "name": "type",
593
+ "type": "text",
594
+ "primaryKey": false,
595
+ "notNull": true,
596
+ "autoincrement": false
597
+ },
598
+ "envelope": {
599
+ "name": "envelope",
600
+ "type": "text",
601
+ "primaryKey": false,
602
+ "notNull": true,
603
+ "autoincrement": false
604
+ },
605
+ "correlation_id": {
606
+ "name": "correlation_id",
607
+ "type": "text",
608
+ "primaryKey": false,
609
+ "notNull": true,
610
+ "autoincrement": false
611
+ },
612
+ "created_at": {
613
+ "name": "created_at",
614
+ "type": "text",
615
+ "primaryKey": false,
616
+ "notNull": true,
617
+ "autoincrement": false
618
+ },
619
+ "subject_type": {
620
+ "name": "subject_type",
621
+ "type": "text",
622
+ "primaryKey": false,
623
+ "notNull": false,
624
+ "autoincrement": false
625
+ },
626
+ "subject_id": {
627
+ "name": "subject_id",
628
+ "type": "text",
629
+ "primaryKey": false,
630
+ "notNull": false,
631
+ "autoincrement": false
632
+ },
633
+ "delivered_at": {
634
+ "name": "delivered_at",
635
+ "type": "text",
636
+ "primaryKey": false,
637
+ "notNull": false,
638
+ "autoincrement": false
639
+ },
640
+ "attempts": {
641
+ "name": "attempts",
642
+ "type": "integer",
643
+ "primaryKey": false,
644
+ "notNull": true,
645
+ "autoincrement": false,
646
+ "default": 0
647
+ },
648
+ "dead_at": {
649
+ "name": "dead_at",
650
+ "type": "text",
651
+ "primaryKey": false,
652
+ "notNull": false,
653
+ "autoincrement": false
654
+ }
655
+ },
656
+ "indexes": {
657
+ "events_id_unique": {
658
+ "name": "events_id_unique",
659
+ "columns": [
660
+ "id"
661
+ ],
662
+ "isUnique": true
663
+ },
664
+ "events_undelivered_idx": {
665
+ "name": "events_undelivered_idx",
666
+ "columns": [
667
+ "delivered_at",
668
+ "seq"
669
+ ],
670
+ "isUnique": false
671
+ },
672
+ "events_correlation_idx": {
673
+ "name": "events_correlation_idx",
674
+ "columns": [
675
+ "correlation_id",
676
+ "seq"
677
+ ],
678
+ "isUnique": false
679
+ },
680
+ "events_catch_up_idx": {
681
+ "name": "events_catch_up_idx",
682
+ "columns": [
683
+ "dead_at",
684
+ "delivered_at",
685
+ "seq"
686
+ ],
687
+ "isUnique": false
688
+ },
689
+ "events_subject_idx": {
690
+ "name": "events_subject_idx",
691
+ "columns": [
692
+ "subject_type",
693
+ "subject_id",
694
+ "seq"
695
+ ],
696
+ "isUnique": false
697
+ }
698
+ },
699
+ "foreignKeys": {},
700
+ "compositePrimaryKeys": {},
701
+ "uniqueConstraints": {},
702
+ "checkConstraints": {}
703
+ },
704
+ "inventory_reservations": {
705
+ "name": "inventory_reservations",
706
+ "columns": {
707
+ "reservation_id": {
708
+ "name": "reservation_id",
709
+ "type": "text",
710
+ "primaryKey": true,
711
+ "notNull": true,
712
+ "autoincrement": false
713
+ },
714
+ "variant_id": {
715
+ "name": "variant_id",
716
+ "type": "text",
717
+ "primaryKey": false,
718
+ "notNull": true,
719
+ "autoincrement": false
720
+ },
721
+ "qty": {
722
+ "name": "qty",
723
+ "type": "integer",
724
+ "primaryKey": false,
725
+ "notNull": true,
726
+ "autoincrement": false
727
+ },
728
+ "order_ref": {
729
+ "name": "order_ref",
730
+ "type": "text",
731
+ "primaryKey": false,
732
+ "notNull": false,
733
+ "autoincrement": false
734
+ },
735
+ "expires_at": {
736
+ "name": "expires_at",
737
+ "type": "text",
738
+ "primaryKey": false,
739
+ "notNull": true,
740
+ "autoincrement": false
741
+ },
742
+ "created_at": {
743
+ "name": "created_at",
744
+ "type": "text",
745
+ "primaryKey": false,
746
+ "notNull": true,
747
+ "autoincrement": false
748
+ }
749
+ },
750
+ "indexes": {
751
+ "inv_reservations_variant_idx": {
752
+ "name": "inv_reservations_variant_idx",
753
+ "columns": [
754
+ "variant_id"
755
+ ],
756
+ "isUnique": false
757
+ },
758
+ "inv_reservations_expires_idx": {
759
+ "name": "inv_reservations_expires_idx",
760
+ "columns": [
761
+ "expires_at"
762
+ ],
763
+ "isUnique": false
764
+ }
765
+ },
766
+ "foreignKeys": {},
767
+ "compositePrimaryKeys": {},
768
+ "uniqueConstraints": {},
769
+ "checkConstraints": {}
770
+ },
771
+ "order_access_keys": {
772
+ "name": "order_access_keys",
773
+ "columns": {
774
+ "id": {
775
+ "name": "id",
776
+ "type": "text",
777
+ "primaryKey": true,
778
+ "notNull": true,
779
+ "autoincrement": false
780
+ },
781
+ "order_id": {
782
+ "name": "order_id",
783
+ "type": "text",
784
+ "primaryKey": false,
785
+ "notNull": true,
786
+ "autoincrement": false
787
+ },
788
+ "key_hash": {
789
+ "name": "key_hash",
790
+ "type": "text",
791
+ "primaryKey": false,
792
+ "notNull": true,
793
+ "autoincrement": false
794
+ },
795
+ "purpose": {
796
+ "name": "purpose",
797
+ "type": "text",
798
+ "primaryKey": false,
799
+ "notNull": true,
800
+ "autoincrement": false
801
+ },
802
+ "created_at": {
803
+ "name": "created_at",
804
+ "type": "text",
805
+ "primaryKey": false,
806
+ "notNull": true,
807
+ "autoincrement": false
808
+ }
809
+ },
810
+ "indexes": {
811
+ "order_access_keys_key_hash_idx": {
812
+ "name": "order_access_keys_key_hash_idx",
813
+ "columns": [
814
+ "key_hash"
815
+ ],
816
+ "isUnique": true
817
+ },
818
+ "order_access_keys_order_idx": {
819
+ "name": "order_access_keys_order_idx",
820
+ "columns": [
821
+ "order_id"
822
+ ],
823
+ "isUnique": false
824
+ }
825
+ },
826
+ "foreignKeys": {},
827
+ "compositePrimaryKeys": {},
828
+ "uniqueConstraints": {},
829
+ "checkConstraints": {}
830
+ },
831
+ "order_history": {
832
+ "name": "order_history",
833
+ "columns": {
834
+ "id": {
835
+ "name": "id",
836
+ "type": "text",
837
+ "primaryKey": true,
838
+ "notNull": true,
839
+ "autoincrement": false
840
+ },
841
+ "order_id": {
842
+ "name": "order_id",
843
+ "type": "text",
844
+ "primaryKey": false,
845
+ "notNull": true,
846
+ "autoincrement": false
847
+ },
848
+ "from_status": {
849
+ "name": "from_status",
850
+ "type": "text",
851
+ "primaryKey": false,
852
+ "notNull": false,
853
+ "autoincrement": false
854
+ },
855
+ "to_status": {
856
+ "name": "to_status",
857
+ "type": "text",
858
+ "primaryKey": false,
859
+ "notNull": true,
860
+ "autoincrement": false
861
+ },
862
+ "actor": {
863
+ "name": "actor",
864
+ "type": "text",
865
+ "primaryKey": false,
866
+ "notNull": true,
867
+ "autoincrement": false
868
+ },
869
+ "note": {
870
+ "name": "note",
871
+ "type": "text",
872
+ "primaryKey": false,
873
+ "notNull": true,
874
+ "autoincrement": false,
875
+ "default": "''"
876
+ },
877
+ "timestamp": {
878
+ "name": "timestamp",
879
+ "type": "text",
880
+ "primaryKey": false,
881
+ "notNull": true,
882
+ "autoincrement": false
883
+ }
884
+ },
885
+ "indexes": {
886
+ "order_history_order_idx": {
887
+ "name": "order_history_order_idx",
888
+ "columns": [
889
+ "order_id"
890
+ ],
891
+ "isUnique": false
892
+ }
893
+ },
894
+ "foreignKeys": {},
895
+ "compositePrimaryKeys": {},
896
+ "uniqueConstraints": {},
897
+ "checkConstraints": {}
898
+ },
899
+ "order_refunds": {
900
+ "name": "order_refunds",
901
+ "columns": {
902
+ "id": {
903
+ "name": "id",
904
+ "type": "text",
905
+ "primaryKey": true,
906
+ "notNull": true,
907
+ "autoincrement": false
908
+ },
909
+ "order_id": {
910
+ "name": "order_id",
911
+ "type": "text",
912
+ "primaryKey": false,
913
+ "notNull": true,
914
+ "autoincrement": false
915
+ },
916
+ "amount_minor": {
917
+ "name": "amount_minor",
918
+ "type": "integer",
919
+ "primaryKey": false,
920
+ "notNull": true,
921
+ "autoincrement": false
922
+ },
923
+ "currency": {
924
+ "name": "currency",
925
+ "type": "text",
926
+ "primaryKey": false,
927
+ "notNull": true,
928
+ "autoincrement": false
929
+ },
930
+ "provider_refund_id": {
931
+ "name": "provider_refund_id",
932
+ "type": "text",
933
+ "primaryKey": false,
934
+ "notNull": false,
935
+ "autoincrement": false
936
+ },
937
+ "status": {
938
+ "name": "status",
939
+ "type": "text",
940
+ "primaryKey": false,
941
+ "notNull": true,
942
+ "autoincrement": false,
943
+ "default": "'pending'"
944
+ },
945
+ "reason": {
946
+ "name": "reason",
947
+ "type": "text",
948
+ "primaryKey": false,
949
+ "notNull": false,
950
+ "autoincrement": false
951
+ },
952
+ "actor": {
953
+ "name": "actor",
954
+ "type": "text",
955
+ "primaryKey": false,
956
+ "notNull": true,
957
+ "autoincrement": false
958
+ },
959
+ "created_at": {
960
+ "name": "created_at",
961
+ "type": "text",
962
+ "primaryKey": false,
963
+ "notNull": true,
964
+ "autoincrement": false
965
+ },
966
+ "request_id": {
967
+ "name": "request_id",
968
+ "type": "text",
969
+ "primaryKey": false,
970
+ "notNull": false,
971
+ "autoincrement": false
972
+ }
973
+ },
974
+ "indexes": {
975
+ "order_refunds_order_idx": {
976
+ "name": "order_refunds_order_idx",
977
+ "columns": [
978
+ "order_id"
979
+ ],
980
+ "isUnique": false
981
+ },
982
+ "order_refunds_order_request_idx": {
983
+ "name": "order_refunds_order_request_idx",
984
+ "columns": [
985
+ "order_id",
986
+ "request_id"
987
+ ],
988
+ "isUnique": true
989
+ }
990
+ },
991
+ "foreignKeys": {},
992
+ "compositePrimaryKeys": {},
993
+ "uniqueConstraints": {},
994
+ "checkConstraints": {}
995
+ },
996
+ "order_sequences": {
997
+ "name": "order_sequences",
998
+ "columns": {
999
+ "id": {
1000
+ "name": "id",
1001
+ "type": "integer",
1002
+ "primaryKey": true,
1003
+ "notNull": true,
1004
+ "autoincrement": false
1005
+ },
1006
+ "next_value": {
1007
+ "name": "next_value",
1008
+ "type": "integer",
1009
+ "primaryKey": false,
1010
+ "notNull": true,
1011
+ "autoincrement": false
1012
+ }
1013
+ },
1014
+ "indexes": {},
1015
+ "foreignKeys": {},
1016
+ "compositePrimaryKeys": {},
1017
+ "uniqueConstraints": {},
1018
+ "checkConstraints": {}
1019
+ },
1020
+ "orders": {
1021
+ "name": "orders",
1022
+ "columns": {
1023
+ "id": {
1024
+ "name": "id",
1025
+ "type": "text",
1026
+ "primaryKey": true,
1027
+ "notNull": true,
1028
+ "autoincrement": false
1029
+ },
1030
+ "order_number": {
1031
+ "name": "order_number",
1032
+ "type": "text",
1033
+ "primaryKey": false,
1034
+ "notNull": true,
1035
+ "autoincrement": false
1036
+ },
1037
+ "sequence": {
1038
+ "name": "sequence",
1039
+ "type": "integer",
1040
+ "primaryKey": false,
1041
+ "notNull": true,
1042
+ "autoincrement": false
1043
+ },
1044
+ "customer_id": {
1045
+ "name": "customer_id",
1046
+ "type": "text",
1047
+ "primaryKey": false,
1048
+ "notNull": false,
1049
+ "autoincrement": false
1050
+ },
1051
+ "status": {
1052
+ "name": "status",
1053
+ "type": "text",
1054
+ "primaryKey": false,
1055
+ "notNull": true,
1056
+ "autoincrement": false,
1057
+ "default": "'pending'"
1058
+ },
1059
+ "email": {
1060
+ "name": "email",
1061
+ "type": "text",
1062
+ "primaryKey": false,
1063
+ "notNull": true,
1064
+ "autoincrement": false
1065
+ },
1066
+ "billing_address": {
1067
+ "name": "billing_address",
1068
+ "type": "text",
1069
+ "primaryKey": false,
1070
+ "notNull": true,
1071
+ "autoincrement": false
1072
+ },
1073
+ "shipping_address": {
1074
+ "name": "shipping_address",
1075
+ "type": "text",
1076
+ "primaryKey": false,
1077
+ "notNull": true,
1078
+ "autoincrement": false
1079
+ },
1080
+ "line_items": {
1081
+ "name": "line_items",
1082
+ "type": "text",
1083
+ "primaryKey": false,
1084
+ "notNull": true,
1085
+ "autoincrement": false
1086
+ },
1087
+ "subtotal_minor": {
1088
+ "name": "subtotal_minor",
1089
+ "type": "integer",
1090
+ "primaryKey": false,
1091
+ "notNull": true,
1092
+ "autoincrement": false
1093
+ },
1094
+ "tax_total_minor": {
1095
+ "name": "tax_total_minor",
1096
+ "type": "integer",
1097
+ "primaryKey": false,
1098
+ "notNull": true,
1099
+ "autoincrement": false,
1100
+ "default": 0
1101
+ },
1102
+ "shipping_total_minor": {
1103
+ "name": "shipping_total_minor",
1104
+ "type": "integer",
1105
+ "primaryKey": false,
1106
+ "notNull": true,
1107
+ "autoincrement": false,
1108
+ "default": 0
1109
+ },
1110
+ "discount_total_minor": {
1111
+ "name": "discount_total_minor",
1112
+ "type": "integer",
1113
+ "primaryKey": false,
1114
+ "notNull": true,
1115
+ "autoincrement": false,
1116
+ "default": 0
1117
+ },
1118
+ "total_minor": {
1119
+ "name": "total_minor",
1120
+ "type": "integer",
1121
+ "primaryKey": false,
1122
+ "notNull": true,
1123
+ "autoincrement": false
1124
+ },
1125
+ "currency": {
1126
+ "name": "currency",
1127
+ "type": "text",
1128
+ "primaryKey": false,
1129
+ "notNull": true,
1130
+ "autoincrement": false
1131
+ },
1132
+ "notes": {
1133
+ "name": "notes",
1134
+ "type": "text",
1135
+ "primaryKey": false,
1136
+ "notNull": true,
1137
+ "autoincrement": false,
1138
+ "default": "''"
1139
+ },
1140
+ "metadata": {
1141
+ "name": "metadata",
1142
+ "type": "text",
1143
+ "primaryKey": false,
1144
+ "notNull": true,
1145
+ "autoincrement": false,
1146
+ "default": "'{}'"
1147
+ },
1148
+ "payment_intent_id": {
1149
+ "name": "payment_intent_id",
1150
+ "type": "text",
1151
+ "primaryKey": false,
1152
+ "notNull": false,
1153
+ "autoincrement": false
1154
+ },
1155
+ "cart_token": {
1156
+ "name": "cart_token",
1157
+ "type": "text",
1158
+ "primaryKey": false,
1159
+ "notNull": false,
1160
+ "autoincrement": false
1161
+ },
1162
+ "captured_minor": {
1163
+ "name": "captured_minor",
1164
+ "type": "integer",
1165
+ "primaryKey": false,
1166
+ "notNull": true,
1167
+ "autoincrement": false,
1168
+ "default": 0
1169
+ },
1170
+ "captured_at": {
1171
+ "name": "captured_at",
1172
+ "type": "text",
1173
+ "primaryKey": false,
1174
+ "notNull": false,
1175
+ "autoincrement": false
1176
+ },
1177
+ "refunded_minor": {
1178
+ "name": "refunded_minor",
1179
+ "type": "integer",
1180
+ "primaryKey": false,
1181
+ "notNull": true,
1182
+ "autoincrement": false,
1183
+ "default": 0
1184
+ },
1185
+ "capture_method": {
1186
+ "name": "capture_method",
1187
+ "type": "text",
1188
+ "primaryKey": false,
1189
+ "notNull": false,
1190
+ "autoincrement": false
1191
+ },
1192
+ "created_at": {
1193
+ "name": "created_at",
1194
+ "type": "text",
1195
+ "primaryKey": false,
1196
+ "notNull": true,
1197
+ "autoincrement": false
1198
+ },
1199
+ "updated_at": {
1200
+ "name": "updated_at",
1201
+ "type": "text",
1202
+ "primaryKey": false,
1203
+ "notNull": true,
1204
+ "autoincrement": false
1205
+ }
1206
+ },
1207
+ "indexes": {
1208
+ "orders_number_unique": {
1209
+ "name": "orders_number_unique",
1210
+ "columns": [
1211
+ "order_number"
1212
+ ],
1213
+ "isUnique": true
1214
+ },
1215
+ "orders_sequence_unique": {
1216
+ "name": "orders_sequence_unique",
1217
+ "columns": [
1218
+ "sequence"
1219
+ ],
1220
+ "isUnique": true
1221
+ },
1222
+ "orders_customer_idx": {
1223
+ "name": "orders_customer_idx",
1224
+ "columns": [
1225
+ "customer_id"
1226
+ ],
1227
+ "isUnique": false
1228
+ },
1229
+ "orders_status_idx": {
1230
+ "name": "orders_status_idx",
1231
+ "columns": [
1232
+ "status"
1233
+ ],
1234
+ "isUnique": false
1235
+ },
1236
+ "orders_payment_intent_idx": {
1237
+ "name": "orders_payment_intent_idx",
1238
+ "columns": [
1239
+ "payment_intent_id"
1240
+ ],
1241
+ "isUnique": false
1242
+ },
1243
+ "orders_pending_cart_unique": {
1244
+ "name": "orders_pending_cart_unique",
1245
+ "columns": [
1246
+ "cart_token"
1247
+ ],
1248
+ "isUnique": true,
1249
+ "where": "status = 'pending'"
1250
+ }
1251
+ },
1252
+ "foreignKeys": {},
1253
+ "compositePrimaryKeys": {},
1254
+ "uniqueConstraints": {},
1255
+ "checkConstraints": {}
1256
+ },
1257
+ "processed_events": {
1258
+ "name": "processed_events",
1259
+ "columns": {
1260
+ "handler_name": {
1261
+ "name": "handler_name",
1262
+ "type": "text",
1263
+ "primaryKey": false,
1264
+ "notNull": true,
1265
+ "autoincrement": false
1266
+ },
1267
+ "event_id": {
1268
+ "name": "event_id",
1269
+ "type": "text",
1270
+ "primaryKey": false,
1271
+ "notNull": true,
1272
+ "autoincrement": false
1273
+ },
1274
+ "processed_at": {
1275
+ "name": "processed_at",
1276
+ "type": "text",
1277
+ "primaryKey": false,
1278
+ "notNull": true,
1279
+ "autoincrement": false
1280
+ }
1281
+ },
1282
+ "indexes": {},
1283
+ "foreignKeys": {},
1284
+ "compositePrimaryKeys": {
1285
+ "processed_events_handler_name_event_id_pk": {
1286
+ "columns": [
1287
+ "handler_name",
1288
+ "event_id"
1289
+ ],
1290
+ "name": "processed_events_handler_name_event_id_pk"
1291
+ }
1292
+ },
1293
+ "uniqueConstraints": {},
1294
+ "checkConstraints": {}
1295
+ },
1296
+ "product_categories": {
1297
+ "name": "product_categories",
1298
+ "columns": {
1299
+ "product_id": {
1300
+ "name": "product_id",
1301
+ "type": "text",
1302
+ "primaryKey": false,
1303
+ "notNull": true,
1304
+ "autoincrement": false
1305
+ },
1306
+ "category_id": {
1307
+ "name": "category_id",
1308
+ "type": "text",
1309
+ "primaryKey": false,
1310
+ "notNull": true,
1311
+ "autoincrement": false
1312
+ }
1313
+ },
1314
+ "indexes": {
1315
+ "product_categories_category_idx": {
1316
+ "name": "product_categories_category_idx",
1317
+ "columns": [
1318
+ "category_id"
1319
+ ],
1320
+ "isUnique": false
1321
+ }
1322
+ },
1323
+ "foreignKeys": {},
1324
+ "compositePrimaryKeys": {
1325
+ "product_categories_product_id_category_id_pk": {
1326
+ "columns": [
1327
+ "product_id",
1328
+ "category_id"
1329
+ ],
1330
+ "name": "product_categories_product_id_category_id_pk"
1331
+ }
1332
+ },
1333
+ "uniqueConstraints": {},
1334
+ "checkConstraints": {}
1335
+ },
1336
+ "products": {
1337
+ "name": "products",
1338
+ "columns": {
1339
+ "id": {
1340
+ "name": "id",
1341
+ "type": "text",
1342
+ "primaryKey": true,
1343
+ "notNull": true,
1344
+ "autoincrement": false
1345
+ },
1346
+ "slug": {
1347
+ "name": "slug",
1348
+ "type": "text",
1349
+ "primaryKey": false,
1350
+ "notNull": true,
1351
+ "autoincrement": false
1352
+ },
1353
+ "name": {
1354
+ "name": "name",
1355
+ "type": "text",
1356
+ "primaryKey": false,
1357
+ "notNull": true,
1358
+ "autoincrement": false
1359
+ },
1360
+ "description": {
1361
+ "name": "description",
1362
+ "type": "text",
1363
+ "primaryKey": false,
1364
+ "notNull": true,
1365
+ "autoincrement": false,
1366
+ "default": "''"
1367
+ },
1368
+ "short_description": {
1369
+ "name": "short_description",
1370
+ "type": "text",
1371
+ "primaryKey": false,
1372
+ "notNull": true,
1373
+ "autoincrement": false,
1374
+ "default": "''"
1375
+ },
1376
+ "status": {
1377
+ "name": "status",
1378
+ "type": "text",
1379
+ "primaryKey": false,
1380
+ "notNull": true,
1381
+ "autoincrement": false,
1382
+ "default": "'draft'"
1383
+ },
1384
+ "type": {
1385
+ "name": "type",
1386
+ "type": "text",
1387
+ "primaryKey": false,
1388
+ "notNull": true,
1389
+ "autoincrement": false,
1390
+ "default": "'simple'"
1391
+ },
1392
+ "seo_title": {
1393
+ "name": "seo_title",
1394
+ "type": "text",
1395
+ "primaryKey": false,
1396
+ "notNull": true,
1397
+ "autoincrement": false,
1398
+ "default": "''"
1399
+ },
1400
+ "seo_description": {
1401
+ "name": "seo_description",
1402
+ "type": "text",
1403
+ "primaryKey": false,
1404
+ "notNull": true,
1405
+ "autoincrement": false,
1406
+ "default": "''"
1407
+ },
1408
+ "media": {
1409
+ "name": "media",
1410
+ "type": "text",
1411
+ "primaryKey": false,
1412
+ "notNull": true,
1413
+ "autoincrement": false,
1414
+ "default": "'[]'"
1415
+ },
1416
+ "metadata": {
1417
+ "name": "metadata",
1418
+ "type": "text",
1419
+ "primaryKey": false,
1420
+ "notNull": true,
1421
+ "autoincrement": false,
1422
+ "default": "'{}'"
1423
+ },
1424
+ "created_at": {
1425
+ "name": "created_at",
1426
+ "type": "text",
1427
+ "primaryKey": false,
1428
+ "notNull": true,
1429
+ "autoincrement": false
1430
+ },
1431
+ "updated_at": {
1432
+ "name": "updated_at",
1433
+ "type": "text",
1434
+ "primaryKey": false,
1435
+ "notNull": true,
1436
+ "autoincrement": false
1437
+ }
1438
+ },
1439
+ "indexes": {
1440
+ "products_slug_unique": {
1441
+ "name": "products_slug_unique",
1442
+ "columns": [
1443
+ "slug"
1444
+ ],
1445
+ "isUnique": true
1446
+ },
1447
+ "products_status_idx": {
1448
+ "name": "products_status_idx",
1449
+ "columns": [
1450
+ "status"
1451
+ ],
1452
+ "isUnique": false
1453
+ }
1454
+ },
1455
+ "foreignKeys": {},
1456
+ "compositePrimaryKeys": {},
1457
+ "uniqueConstraints": {},
1458
+ "checkConstraints": {}
1459
+ },
1460
+ "refresh_tokens": {
1461
+ "name": "refresh_tokens",
1462
+ "columns": {
1463
+ "id": {
1464
+ "name": "id",
1465
+ "type": "text",
1466
+ "primaryKey": true,
1467
+ "notNull": true,
1468
+ "autoincrement": false
1469
+ },
1470
+ "customer_id": {
1471
+ "name": "customer_id",
1472
+ "type": "text",
1473
+ "primaryKey": false,
1474
+ "notNull": true,
1475
+ "autoincrement": false
1476
+ },
1477
+ "token_hash": {
1478
+ "name": "token_hash",
1479
+ "type": "text",
1480
+ "primaryKey": false,
1481
+ "notNull": true,
1482
+ "autoincrement": false
1483
+ },
1484
+ "revoked_at": {
1485
+ "name": "revoked_at",
1486
+ "type": "text",
1487
+ "primaryKey": false,
1488
+ "notNull": false,
1489
+ "autoincrement": false
1490
+ },
1491
+ "replaced_by_jti": {
1492
+ "name": "replaced_by_jti",
1493
+ "type": "text",
1494
+ "primaryKey": false,
1495
+ "notNull": false,
1496
+ "autoincrement": false
1497
+ },
1498
+ "expires_at": {
1499
+ "name": "expires_at",
1500
+ "type": "text",
1501
+ "primaryKey": false,
1502
+ "notNull": true,
1503
+ "autoincrement": false
1504
+ },
1505
+ "created_at": {
1506
+ "name": "created_at",
1507
+ "type": "text",
1508
+ "primaryKey": false,
1509
+ "notNull": true,
1510
+ "autoincrement": false
1511
+ }
1512
+ },
1513
+ "indexes": {
1514
+ "refresh_tokens_customer_idx": {
1515
+ "name": "refresh_tokens_customer_idx",
1516
+ "columns": [
1517
+ "customer_id"
1518
+ ],
1519
+ "isUnique": false
1520
+ }
1521
+ },
1522
+ "foreignKeys": {},
1523
+ "compositePrimaryKeys": {},
1524
+ "uniqueConstraints": {},
1525
+ "checkConstraints": {}
1526
+ },
1527
+ "reviews": {
1528
+ "name": "reviews",
1529
+ "columns": {
1530
+ "id": {
1531
+ "name": "id",
1532
+ "type": "text",
1533
+ "primaryKey": true,
1534
+ "notNull": true,
1535
+ "autoincrement": false
1536
+ },
1537
+ "product_id": {
1538
+ "name": "product_id",
1539
+ "type": "text",
1540
+ "primaryKey": false,
1541
+ "notNull": true,
1542
+ "autoincrement": false
1543
+ },
1544
+ "customer_id": {
1545
+ "name": "customer_id",
1546
+ "type": "text",
1547
+ "primaryKey": false,
1548
+ "notNull": false,
1549
+ "autoincrement": false
1550
+ },
1551
+ "order_id": {
1552
+ "name": "order_id",
1553
+ "type": "text",
1554
+ "primaryKey": false,
1555
+ "notNull": false,
1556
+ "autoincrement": false
1557
+ },
1558
+ "rating": {
1559
+ "name": "rating",
1560
+ "type": "integer",
1561
+ "primaryKey": false,
1562
+ "notNull": true,
1563
+ "autoincrement": false
1564
+ },
1565
+ "title": {
1566
+ "name": "title",
1567
+ "type": "text",
1568
+ "primaryKey": false,
1569
+ "notNull": true,
1570
+ "autoincrement": false,
1571
+ "default": "''"
1572
+ },
1573
+ "body": {
1574
+ "name": "body",
1575
+ "type": "text",
1576
+ "primaryKey": false,
1577
+ "notNull": true,
1578
+ "autoincrement": false,
1579
+ "default": "''"
1580
+ },
1581
+ "moderation_status": {
1582
+ "name": "moderation_status",
1583
+ "type": "text",
1584
+ "primaryKey": false,
1585
+ "notNull": true,
1586
+ "autoincrement": false,
1587
+ "default": "'pending'"
1588
+ },
1589
+ "submitted_at": {
1590
+ "name": "submitted_at",
1591
+ "type": "text",
1592
+ "primaryKey": false,
1593
+ "notNull": true,
1594
+ "autoincrement": false
1595
+ },
1596
+ "moderated_at": {
1597
+ "name": "moderated_at",
1598
+ "type": "text",
1599
+ "primaryKey": false,
1600
+ "notNull": false,
1601
+ "autoincrement": false
1602
+ },
1603
+ "moderated_by": {
1604
+ "name": "moderated_by",
1605
+ "type": "text",
1606
+ "primaryKey": false,
1607
+ "notNull": false,
1608
+ "autoincrement": false
1609
+ }
1610
+ },
1611
+ "indexes": {
1612
+ "reviews_product_idx": {
1613
+ "name": "reviews_product_idx",
1614
+ "columns": [
1615
+ "product_id"
1616
+ ],
1617
+ "isUnique": false
1618
+ },
1619
+ "reviews_status_idx": {
1620
+ "name": "reviews_status_idx",
1621
+ "columns": [
1622
+ "moderation_status"
1623
+ ],
1624
+ "isUnique": false
1625
+ }
1626
+ },
1627
+ "foreignKeys": {},
1628
+ "compositePrimaryKeys": {},
1629
+ "uniqueConstraints": {},
1630
+ "checkConstraints": {}
1631
+ },
1632
+ "settings": {
1633
+ "name": "settings",
1634
+ "columns": {
1635
+ "slot": {
1636
+ "name": "slot",
1637
+ "type": "text",
1638
+ "primaryKey": false,
1639
+ "notNull": true,
1640
+ "autoincrement": false
1641
+ },
1642
+ "path": {
1643
+ "name": "path",
1644
+ "type": "text",
1645
+ "primaryKey": false,
1646
+ "notNull": true,
1647
+ "autoincrement": false
1648
+ },
1649
+ "ciphertext": {
1650
+ "name": "ciphertext",
1651
+ "type": "blob",
1652
+ "primaryKey": false,
1653
+ "notNull": false,
1654
+ "autoincrement": false
1655
+ },
1656
+ "plain": {
1657
+ "name": "plain",
1658
+ "type": "text",
1659
+ "primaryKey": false,
1660
+ "notNull": false,
1661
+ "autoincrement": false
1662
+ },
1663
+ "iv": {
1664
+ "name": "iv",
1665
+ "type": "blob",
1666
+ "primaryKey": false,
1667
+ "notNull": false,
1668
+ "autoincrement": false
1669
+ },
1670
+ "tag": {
1671
+ "name": "tag",
1672
+ "type": "blob",
1673
+ "primaryKey": false,
1674
+ "notNull": false,
1675
+ "autoincrement": false
1676
+ },
1677
+ "key_id": {
1678
+ "name": "key_id",
1679
+ "type": "text",
1680
+ "primaryKey": false,
1681
+ "notNull": false,
1682
+ "autoincrement": false
1683
+ },
1684
+ "updated_at": {
1685
+ "name": "updated_at",
1686
+ "type": "text",
1687
+ "primaryKey": false,
1688
+ "notNull": true,
1689
+ "autoincrement": false
1690
+ },
1691
+ "updated_by": {
1692
+ "name": "updated_by",
1693
+ "type": "text",
1694
+ "primaryKey": false,
1695
+ "notNull": false,
1696
+ "autoincrement": false
1697
+ }
1698
+ },
1699
+ "indexes": {},
1700
+ "foreignKeys": {},
1701
+ "compositePrimaryKeys": {
1702
+ "settings_slot_path_pk": {
1703
+ "columns": [
1704
+ "slot",
1705
+ "path"
1706
+ ],
1707
+ "name": "settings_slot_path_pk"
1708
+ }
1709
+ },
1710
+ "uniqueConstraints": {},
1711
+ "checkConstraints": {
1712
+ "settings_one_value": {
1713
+ "name": "settings_one_value",
1714
+ "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))"
1715
+ }
1716
+ }
1717
+ },
1718
+ "stock_adjustments": {
1719
+ "name": "stock_adjustments",
1720
+ "columns": {
1721
+ "id": {
1722
+ "name": "id",
1723
+ "type": "text",
1724
+ "primaryKey": true,
1725
+ "notNull": true,
1726
+ "autoincrement": false
1727
+ },
1728
+ "variant_id": {
1729
+ "name": "variant_id",
1730
+ "type": "text",
1731
+ "primaryKey": false,
1732
+ "notNull": true,
1733
+ "autoincrement": false
1734
+ },
1735
+ "adjustment": {
1736
+ "name": "adjustment",
1737
+ "type": "integer",
1738
+ "primaryKey": false,
1739
+ "notNull": true,
1740
+ "autoincrement": false
1741
+ },
1742
+ "reason": {
1743
+ "name": "reason",
1744
+ "type": "text",
1745
+ "primaryKey": false,
1746
+ "notNull": true,
1747
+ "autoincrement": false
1748
+ },
1749
+ "actor": {
1750
+ "name": "actor",
1751
+ "type": "text",
1752
+ "primaryKey": false,
1753
+ "notNull": true,
1754
+ "autoincrement": false
1755
+ },
1756
+ "previous_qty": {
1757
+ "name": "previous_qty",
1758
+ "type": "integer",
1759
+ "primaryKey": false,
1760
+ "notNull": true,
1761
+ "autoincrement": false
1762
+ },
1763
+ "new_qty": {
1764
+ "name": "new_qty",
1765
+ "type": "integer",
1766
+ "primaryKey": false,
1767
+ "notNull": true,
1768
+ "autoincrement": false
1769
+ },
1770
+ "timestamp": {
1771
+ "name": "timestamp",
1772
+ "type": "text",
1773
+ "primaryKey": false,
1774
+ "notNull": true,
1775
+ "autoincrement": false
1776
+ }
1777
+ },
1778
+ "indexes": {
1779
+ "stock_adjustments_variant_idx": {
1780
+ "name": "stock_adjustments_variant_idx",
1781
+ "columns": [
1782
+ "variant_id"
1783
+ ],
1784
+ "isUnique": false
1785
+ }
1786
+ },
1787
+ "foreignKeys": {},
1788
+ "compositePrimaryKeys": {},
1789
+ "uniqueConstraints": {},
1790
+ "checkConstraints": {}
1791
+ },
1792
+ "variants": {
1793
+ "name": "variants",
1794
+ "columns": {
1795
+ "id": {
1796
+ "name": "id",
1797
+ "type": "text",
1798
+ "primaryKey": true,
1799
+ "notNull": true,
1800
+ "autoincrement": false
1801
+ },
1802
+ "product_id": {
1803
+ "name": "product_id",
1804
+ "type": "text",
1805
+ "primaryKey": false,
1806
+ "notNull": true,
1807
+ "autoincrement": false
1808
+ },
1809
+ "sku": {
1810
+ "name": "sku",
1811
+ "type": "text",
1812
+ "primaryKey": false,
1813
+ "notNull": true,
1814
+ "autoincrement": false
1815
+ },
1816
+ "name": {
1817
+ "name": "name",
1818
+ "type": "text",
1819
+ "primaryKey": false,
1820
+ "notNull": true,
1821
+ "autoincrement": false,
1822
+ "default": "''"
1823
+ },
1824
+ "price_minor": {
1825
+ "name": "price_minor",
1826
+ "type": "integer",
1827
+ "primaryKey": false,
1828
+ "notNull": true,
1829
+ "autoincrement": false
1830
+ },
1831
+ "compare_at_price_minor": {
1832
+ "name": "compare_at_price_minor",
1833
+ "type": "integer",
1834
+ "primaryKey": false,
1835
+ "notNull": false,
1836
+ "autoincrement": false
1837
+ },
1838
+ "weight_grams": {
1839
+ "name": "weight_grams",
1840
+ "type": "integer",
1841
+ "primaryKey": false,
1842
+ "notNull": false,
1843
+ "autoincrement": false
1844
+ },
1845
+ "dimensions": {
1846
+ "name": "dimensions",
1847
+ "type": "text",
1848
+ "primaryKey": false,
1849
+ "notNull": false,
1850
+ "autoincrement": false
1851
+ },
1852
+ "stock": {
1853
+ "name": "stock",
1854
+ "type": "integer",
1855
+ "primaryKey": false,
1856
+ "notNull": true,
1857
+ "autoincrement": false,
1858
+ "default": 0
1859
+ },
1860
+ "low_stock_threshold": {
1861
+ "name": "low_stock_threshold",
1862
+ "type": "integer",
1863
+ "primaryKey": false,
1864
+ "notNull": true,
1865
+ "autoincrement": false,
1866
+ "default": 0
1867
+ },
1868
+ "options": {
1869
+ "name": "options",
1870
+ "type": "text",
1871
+ "primaryKey": false,
1872
+ "notNull": true,
1873
+ "autoincrement": false,
1874
+ "default": "'[]'"
1875
+ },
1876
+ "status": {
1877
+ "name": "status",
1878
+ "type": "text",
1879
+ "primaryKey": false,
1880
+ "notNull": true,
1881
+ "autoincrement": false,
1882
+ "default": "'active'"
1883
+ },
1884
+ "created_at": {
1885
+ "name": "created_at",
1886
+ "type": "text",
1887
+ "primaryKey": false,
1888
+ "notNull": true,
1889
+ "autoincrement": false
1890
+ },
1891
+ "updated_at": {
1892
+ "name": "updated_at",
1893
+ "type": "text",
1894
+ "primaryKey": false,
1895
+ "notNull": true,
1896
+ "autoincrement": false
1897
+ }
1898
+ },
1899
+ "indexes": {
1900
+ "variants_sku_unique": {
1901
+ "name": "variants_sku_unique",
1902
+ "columns": [
1903
+ "sku"
1904
+ ],
1905
+ "isUnique": true
1906
+ },
1907
+ "variants_product_idx": {
1908
+ "name": "variants_product_idx",
1909
+ "columns": [
1910
+ "product_id"
1911
+ ],
1912
+ "isUnique": false
1913
+ }
1914
+ },
1915
+ "foreignKeys": {},
1916
+ "compositePrimaryKeys": {},
1917
+ "uniqueConstraints": {},
1918
+ "checkConstraints": {}
1919
+ }
1920
+ },
1921
+ "views": {},
1922
+ "enums": {},
1923
+ "_meta": {
1924
+ "schemas": {},
1925
+ "tables": {},
1926
+ "columns": {}
1927
+ },
1928
+ "internal": {
1929
+ "indexes": {}
1930
+ }
1931
+ }