@nymbalhq/platform 0.0.0-stage → 0.2.0

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