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