@develemit/commerce-server 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.
@@ -0,0 +1,766 @@
1
+ {
2
+ "id": "6309e650-2537-4209-a62b-ae674edf3f08",
3
+ "prevId": "ad61cd37-9ac1-4d75-a03c-3d2f30ecc625",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.commerce_inventory_holds": {
8
+ "name": "commerce_inventory_holds",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "product_id": {
19
+ "name": "product_id",
20
+ "type": "uuid",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "quantity": {
25
+ "name": "quantity",
26
+ "type": "integer",
27
+ "primaryKey": false,
28
+ "notNull": true
29
+ },
30
+ "reference": {
31
+ "name": "reference",
32
+ "type": "text",
33
+ "primaryKey": false,
34
+ "notNull": true
35
+ },
36
+ "expires_at": {
37
+ "name": "expires_at",
38
+ "type": "timestamp with time zone",
39
+ "primaryKey": false,
40
+ "notNull": true
41
+ },
42
+ "status": {
43
+ "name": "status",
44
+ "type": "commerce_hold_status",
45
+ "typeSchema": "public",
46
+ "primaryKey": false,
47
+ "notNull": true,
48
+ "default": "'active'"
49
+ },
50
+ "created_at": {
51
+ "name": "created_at",
52
+ "type": "timestamp with time zone",
53
+ "primaryKey": false,
54
+ "notNull": true,
55
+ "default": "now()"
56
+ }
57
+ },
58
+ "indexes": {
59
+ "commerce_inventory_holds_reference_idx": {
60
+ "name": "commerce_inventory_holds_reference_idx",
61
+ "columns": [
62
+ {
63
+ "expression": "reference",
64
+ "isExpression": false,
65
+ "asc": true,
66
+ "nulls": "last"
67
+ }
68
+ ],
69
+ "isUnique": false,
70
+ "concurrently": false,
71
+ "method": "btree",
72
+ "with": {}
73
+ },
74
+ "commerce_inventory_holds_product_status_idx": {
75
+ "name": "commerce_inventory_holds_product_status_idx",
76
+ "columns": [
77
+ {
78
+ "expression": "product_id",
79
+ "isExpression": false,
80
+ "asc": true,
81
+ "nulls": "last"
82
+ },
83
+ {
84
+ "expression": "status",
85
+ "isExpression": false,
86
+ "asc": true,
87
+ "nulls": "last"
88
+ }
89
+ ],
90
+ "isUnique": false,
91
+ "concurrently": false,
92
+ "method": "btree",
93
+ "with": {}
94
+ }
95
+ },
96
+ "foreignKeys": {
97
+ "commerce_inventory_holds_product_id_commerce_products_id_fk": {
98
+ "name": "commerce_inventory_holds_product_id_commerce_products_id_fk",
99
+ "tableFrom": "commerce_inventory_holds",
100
+ "tableTo": "commerce_products",
101
+ "columnsFrom": [
102
+ "product_id"
103
+ ],
104
+ "columnsTo": [
105
+ "id"
106
+ ],
107
+ "onDelete": "cascade",
108
+ "onUpdate": "no action"
109
+ }
110
+ },
111
+ "compositePrimaryKeys": {},
112
+ "uniqueConstraints": {},
113
+ "policies": {},
114
+ "checkConstraints": {
115
+ "commerce_inventory_holds_quantity_check": {
116
+ "name": "commerce_inventory_holds_quantity_check",
117
+ "value": "\"commerce_inventory_holds\".\"quantity\" > 0"
118
+ }
119
+ },
120
+ "isRLSEnabled": false
121
+ },
122
+ "public.commerce_order_items": {
123
+ "name": "commerce_order_items",
124
+ "schema": "",
125
+ "columns": {
126
+ "id": {
127
+ "name": "id",
128
+ "type": "uuid",
129
+ "primaryKey": true,
130
+ "notNull": true,
131
+ "default": "gen_random_uuid()"
132
+ },
133
+ "order_id": {
134
+ "name": "order_id",
135
+ "type": "uuid",
136
+ "primaryKey": false,
137
+ "notNull": true
138
+ },
139
+ "product_id": {
140
+ "name": "product_id",
141
+ "type": "uuid",
142
+ "primaryKey": false,
143
+ "notNull": true
144
+ },
145
+ "name": {
146
+ "name": "name",
147
+ "type": "text",
148
+ "primaryKey": false,
149
+ "notNull": true
150
+ },
151
+ "price_cents": {
152
+ "name": "price_cents",
153
+ "type": "integer",
154
+ "primaryKey": false,
155
+ "notNull": true
156
+ },
157
+ "quantity": {
158
+ "name": "quantity",
159
+ "type": "integer",
160
+ "primaryKey": false,
161
+ "notNull": true
162
+ }
163
+ },
164
+ "indexes": {},
165
+ "foreignKeys": {
166
+ "commerce_order_items_order_id_commerce_orders_id_fk": {
167
+ "name": "commerce_order_items_order_id_commerce_orders_id_fk",
168
+ "tableFrom": "commerce_order_items",
169
+ "tableTo": "commerce_orders",
170
+ "columnsFrom": [
171
+ "order_id"
172
+ ],
173
+ "columnsTo": [
174
+ "id"
175
+ ],
176
+ "onDelete": "cascade",
177
+ "onUpdate": "no action"
178
+ }
179
+ },
180
+ "compositePrimaryKeys": {},
181
+ "uniqueConstraints": {},
182
+ "policies": {},
183
+ "checkConstraints": {},
184
+ "isRLSEnabled": false
185
+ },
186
+ "public.commerce_order_refunds": {
187
+ "name": "commerce_order_refunds",
188
+ "schema": "",
189
+ "columns": {
190
+ "id": {
191
+ "name": "id",
192
+ "type": "uuid",
193
+ "primaryKey": true,
194
+ "notNull": true,
195
+ "default": "gen_random_uuid()"
196
+ },
197
+ "order_id": {
198
+ "name": "order_id",
199
+ "type": "uuid",
200
+ "primaryKey": false,
201
+ "notNull": true
202
+ },
203
+ "amount_cents": {
204
+ "name": "amount_cents",
205
+ "type": "integer",
206
+ "primaryKey": false,
207
+ "notNull": true
208
+ },
209
+ "currency": {
210
+ "name": "currency",
211
+ "type": "text",
212
+ "primaryKey": false,
213
+ "notNull": true
214
+ },
215
+ "reason": {
216
+ "name": "reason",
217
+ "type": "text",
218
+ "primaryKey": false,
219
+ "notNull": false
220
+ },
221
+ "restocked": {
222
+ "name": "restocked",
223
+ "type": "boolean",
224
+ "primaryKey": false,
225
+ "notNull": true,
226
+ "default": false
227
+ },
228
+ "source": {
229
+ "name": "source",
230
+ "type": "text",
231
+ "primaryKey": false,
232
+ "notNull": true
233
+ },
234
+ "gateway_refund_id": {
235
+ "name": "gateway_refund_id",
236
+ "type": "text",
237
+ "primaryKey": false,
238
+ "notNull": false
239
+ },
240
+ "idempotency_key": {
241
+ "name": "idempotency_key",
242
+ "type": "text",
243
+ "primaryKey": false,
244
+ "notNull": false
245
+ },
246
+ "created_at": {
247
+ "name": "created_at",
248
+ "type": "timestamp with time zone",
249
+ "primaryKey": false,
250
+ "notNull": true,
251
+ "default": "now()"
252
+ }
253
+ },
254
+ "indexes": {
255
+ "commerce_order_refunds_order_idx": {
256
+ "name": "commerce_order_refunds_order_idx",
257
+ "columns": [
258
+ {
259
+ "expression": "order_id",
260
+ "isExpression": false,
261
+ "asc": true,
262
+ "nulls": "last"
263
+ }
264
+ ],
265
+ "isUnique": false,
266
+ "concurrently": false,
267
+ "method": "btree",
268
+ "with": {}
269
+ }
270
+ },
271
+ "foreignKeys": {
272
+ "commerce_order_refunds_order_id_commerce_orders_id_fk": {
273
+ "name": "commerce_order_refunds_order_id_commerce_orders_id_fk",
274
+ "tableFrom": "commerce_order_refunds",
275
+ "tableTo": "commerce_orders",
276
+ "columnsFrom": [
277
+ "order_id"
278
+ ],
279
+ "columnsTo": [
280
+ "id"
281
+ ],
282
+ "onDelete": "cascade",
283
+ "onUpdate": "no action"
284
+ }
285
+ },
286
+ "compositePrimaryKeys": {},
287
+ "uniqueConstraints": {
288
+ "commerce_order_refunds_gateway_refund_id_unique": {
289
+ "name": "commerce_order_refunds_gateway_refund_id_unique",
290
+ "nullsNotDistinct": false,
291
+ "columns": [
292
+ "gateway_refund_id"
293
+ ]
294
+ },
295
+ "commerce_order_refunds_idempotency_unique": {
296
+ "name": "commerce_order_refunds_idempotency_unique",
297
+ "nullsNotDistinct": false,
298
+ "columns": [
299
+ "order_id",
300
+ "idempotency_key"
301
+ ]
302
+ }
303
+ },
304
+ "policies": {},
305
+ "checkConstraints": {
306
+ "commerce_order_refunds_amount_check": {
307
+ "name": "commerce_order_refunds_amount_check",
308
+ "value": "\"commerce_order_refunds\".\"amount_cents\" > 0"
309
+ }
310
+ },
311
+ "isRLSEnabled": false
312
+ },
313
+ "public.commerce_orders": {
314
+ "name": "commerce_orders",
315
+ "schema": "",
316
+ "columns": {
317
+ "id": {
318
+ "name": "id",
319
+ "type": "uuid",
320
+ "primaryKey": true,
321
+ "notNull": true
322
+ },
323
+ "status": {
324
+ "name": "status",
325
+ "type": "commerce_order_status",
326
+ "typeSchema": "public",
327
+ "primaryKey": false,
328
+ "notNull": true,
329
+ "default": "'pending'"
330
+ },
331
+ "email": {
332
+ "name": "email",
333
+ "type": "text",
334
+ "primaryKey": false,
335
+ "notNull": false
336
+ },
337
+ "subtotal_cents": {
338
+ "name": "subtotal_cents",
339
+ "type": "integer",
340
+ "primaryKey": false,
341
+ "notNull": true
342
+ },
343
+ "shipping_cents": {
344
+ "name": "shipping_cents",
345
+ "type": "integer",
346
+ "primaryKey": false,
347
+ "notNull": true,
348
+ "default": 0
349
+ },
350
+ "shipping_label": {
351
+ "name": "shipping_label",
352
+ "type": "text",
353
+ "primaryKey": false,
354
+ "notNull": false
355
+ },
356
+ "currency": {
357
+ "name": "currency",
358
+ "type": "text",
359
+ "primaryKey": false,
360
+ "notNull": true
361
+ },
362
+ "checkout_session_id": {
363
+ "name": "checkout_session_id",
364
+ "type": "text",
365
+ "primaryKey": false,
366
+ "notNull": false
367
+ },
368
+ "shipping_address": {
369
+ "name": "shipping_address",
370
+ "type": "jsonb",
371
+ "primaryKey": false,
372
+ "notNull": false
373
+ },
374
+ "fulfillment_carrier": {
375
+ "name": "fulfillment_carrier",
376
+ "type": "text",
377
+ "primaryKey": false,
378
+ "notNull": false
379
+ },
380
+ "fulfillment_tracking_number": {
381
+ "name": "fulfillment_tracking_number",
382
+ "type": "text",
383
+ "primaryKey": false,
384
+ "notNull": false
385
+ },
386
+ "fulfillment_tracking_url": {
387
+ "name": "fulfillment_tracking_url",
388
+ "type": "text",
389
+ "primaryKey": false,
390
+ "notNull": false
391
+ },
392
+ "shipped_at": {
393
+ "name": "shipped_at",
394
+ "type": "timestamp with time zone",
395
+ "primaryKey": false,
396
+ "notNull": false
397
+ },
398
+ "created_at": {
399
+ "name": "created_at",
400
+ "type": "timestamp with time zone",
401
+ "primaryKey": false,
402
+ "notNull": true,
403
+ "default": "now()"
404
+ },
405
+ "updated_at": {
406
+ "name": "updated_at",
407
+ "type": "timestamp with time zone",
408
+ "primaryKey": false,
409
+ "notNull": true,
410
+ "default": "now()"
411
+ }
412
+ },
413
+ "indexes": {},
414
+ "foreignKeys": {},
415
+ "compositePrimaryKeys": {},
416
+ "uniqueConstraints": {
417
+ "commerce_orders_checkout_session_id_unique": {
418
+ "name": "commerce_orders_checkout_session_id_unique",
419
+ "nullsNotDistinct": false,
420
+ "columns": [
421
+ "checkout_session_id"
422
+ ]
423
+ }
424
+ },
425
+ "policies": {},
426
+ "checkConstraints": {},
427
+ "isRLSEnabled": false
428
+ },
429
+ "public.commerce_product_images": {
430
+ "name": "commerce_product_images",
431
+ "schema": "",
432
+ "columns": {
433
+ "id": {
434
+ "name": "id",
435
+ "type": "uuid",
436
+ "primaryKey": true,
437
+ "notNull": true,
438
+ "default": "gen_random_uuid()"
439
+ },
440
+ "product_id": {
441
+ "name": "product_id",
442
+ "type": "uuid",
443
+ "primaryKey": false,
444
+ "notNull": true
445
+ },
446
+ "url": {
447
+ "name": "url",
448
+ "type": "text",
449
+ "primaryKey": false,
450
+ "notNull": true
451
+ },
452
+ "alt": {
453
+ "name": "alt",
454
+ "type": "text",
455
+ "primaryKey": false,
456
+ "notNull": true,
457
+ "default": "''"
458
+ },
459
+ "storage_key": {
460
+ "name": "storage_key",
461
+ "type": "text",
462
+ "primaryKey": false,
463
+ "notNull": false
464
+ },
465
+ "position": {
466
+ "name": "position",
467
+ "type": "integer",
468
+ "primaryKey": false,
469
+ "notNull": true,
470
+ "default": 0
471
+ }
472
+ },
473
+ "indexes": {},
474
+ "foreignKeys": {
475
+ "commerce_product_images_product_id_commerce_products_id_fk": {
476
+ "name": "commerce_product_images_product_id_commerce_products_id_fk",
477
+ "tableFrom": "commerce_product_images",
478
+ "tableTo": "commerce_products",
479
+ "columnsFrom": [
480
+ "product_id"
481
+ ],
482
+ "columnsTo": [
483
+ "id"
484
+ ],
485
+ "onDelete": "cascade",
486
+ "onUpdate": "no action"
487
+ }
488
+ },
489
+ "compositePrimaryKeys": {},
490
+ "uniqueConstraints": {},
491
+ "policies": {},
492
+ "checkConstraints": {},
493
+ "isRLSEnabled": false
494
+ },
495
+ "public.commerce_products": {
496
+ "name": "commerce_products",
497
+ "schema": "",
498
+ "columns": {
499
+ "id": {
500
+ "name": "id",
501
+ "type": "uuid",
502
+ "primaryKey": true,
503
+ "notNull": true,
504
+ "default": "gen_random_uuid()"
505
+ },
506
+ "slug": {
507
+ "name": "slug",
508
+ "type": "text",
509
+ "primaryKey": false,
510
+ "notNull": true
511
+ },
512
+ "name": {
513
+ "name": "name",
514
+ "type": "text",
515
+ "primaryKey": false,
516
+ "notNull": true
517
+ },
518
+ "description": {
519
+ "name": "description",
520
+ "type": "text",
521
+ "primaryKey": false,
522
+ "notNull": true,
523
+ "default": "''"
524
+ },
525
+ "materials": {
526
+ "name": "materials",
527
+ "type": "text",
528
+ "primaryKey": false,
529
+ "notNull": false
530
+ },
531
+ "dimensions": {
532
+ "name": "dimensions",
533
+ "type": "text",
534
+ "primaryKey": false,
535
+ "notNull": false
536
+ },
537
+ "price_cents": {
538
+ "name": "price_cents",
539
+ "type": "integer",
540
+ "primaryKey": false,
541
+ "notNull": true
542
+ },
543
+ "currency": {
544
+ "name": "currency",
545
+ "type": "text",
546
+ "primaryKey": false,
547
+ "notNull": true
548
+ },
549
+ "category": {
550
+ "name": "category",
551
+ "type": "text",
552
+ "primaryKey": false,
553
+ "notNull": true
554
+ },
555
+ "quantity": {
556
+ "name": "quantity",
557
+ "type": "integer",
558
+ "primaryKey": false,
559
+ "notNull": true,
560
+ "default": 1
561
+ },
562
+ "status": {
563
+ "name": "status",
564
+ "type": "commerce_product_status",
565
+ "typeSchema": "public",
566
+ "primaryKey": false,
567
+ "notNull": true,
568
+ "default": "'draft'"
569
+ },
570
+ "featured": {
571
+ "name": "featured",
572
+ "type": "boolean",
573
+ "primaryKey": false,
574
+ "notNull": true,
575
+ "default": false
576
+ },
577
+ "created_at": {
578
+ "name": "created_at",
579
+ "type": "timestamp with time zone",
580
+ "primaryKey": false,
581
+ "notNull": true,
582
+ "default": "now()"
583
+ },
584
+ "updated_at": {
585
+ "name": "updated_at",
586
+ "type": "timestamp with time zone",
587
+ "primaryKey": false,
588
+ "notNull": true,
589
+ "default": "now()"
590
+ }
591
+ },
592
+ "indexes": {},
593
+ "foreignKeys": {},
594
+ "compositePrimaryKeys": {},
595
+ "uniqueConstraints": {
596
+ "commerce_products_slug_unique": {
597
+ "name": "commerce_products_slug_unique",
598
+ "nullsNotDistinct": false,
599
+ "columns": [
600
+ "slug"
601
+ ]
602
+ }
603
+ },
604
+ "policies": {},
605
+ "checkConstraints": {
606
+ "commerce_products_quantity_check": {
607
+ "name": "commerce_products_quantity_check",
608
+ "value": "\"commerce_products\".\"quantity\" >= 0"
609
+ }
610
+ },
611
+ "isRLSEnabled": false
612
+ },
613
+ "public.commerce_shipping_rates": {
614
+ "name": "commerce_shipping_rates",
615
+ "schema": "",
616
+ "columns": {
617
+ "id": {
618
+ "name": "id",
619
+ "type": "uuid",
620
+ "primaryKey": true,
621
+ "notNull": true,
622
+ "default": "gen_random_uuid()"
623
+ },
624
+ "label": {
625
+ "name": "label",
626
+ "type": "text",
627
+ "primaryKey": false,
628
+ "notNull": true
629
+ },
630
+ "amount_cents": {
631
+ "name": "amount_cents",
632
+ "type": "integer",
633
+ "primaryKey": false,
634
+ "notNull": true
635
+ },
636
+ "currency": {
637
+ "name": "currency",
638
+ "type": "text",
639
+ "primaryKey": false,
640
+ "notNull": true
641
+ },
642
+ "min_days": {
643
+ "name": "min_days",
644
+ "type": "integer",
645
+ "primaryKey": false,
646
+ "notNull": false
647
+ },
648
+ "max_days": {
649
+ "name": "max_days",
650
+ "type": "integer",
651
+ "primaryKey": false,
652
+ "notNull": false
653
+ },
654
+ "active": {
655
+ "name": "active",
656
+ "type": "boolean",
657
+ "primaryKey": false,
658
+ "notNull": true,
659
+ "default": true
660
+ },
661
+ "sort": {
662
+ "name": "sort",
663
+ "type": "integer",
664
+ "primaryKey": false,
665
+ "notNull": true,
666
+ "default": 0
667
+ }
668
+ },
669
+ "indexes": {},
670
+ "foreignKeys": {},
671
+ "compositePrimaryKeys": {},
672
+ "uniqueConstraints": {
673
+ "commerce_shipping_rates_label_unique": {
674
+ "name": "commerce_shipping_rates_label_unique",
675
+ "nullsNotDistinct": false,
676
+ "columns": [
677
+ "label"
678
+ ]
679
+ }
680
+ },
681
+ "policies": {},
682
+ "checkConstraints": {
683
+ "commerce_shipping_rates_amount_check": {
684
+ "name": "commerce_shipping_rates_amount_check",
685
+ "value": "\"commerce_shipping_rates\".\"amount_cents\" >= 0"
686
+ }
687
+ },
688
+ "isRLSEnabled": false
689
+ },
690
+ "public.commerce_stripe_events": {
691
+ "name": "commerce_stripe_events",
692
+ "schema": "",
693
+ "columns": {
694
+ "id": {
695
+ "name": "id",
696
+ "type": "text",
697
+ "primaryKey": true,
698
+ "notNull": true
699
+ },
700
+ "type": {
701
+ "name": "type",
702
+ "type": "text",
703
+ "primaryKey": false,
704
+ "notNull": true
705
+ },
706
+ "processed_at": {
707
+ "name": "processed_at",
708
+ "type": "timestamp with time zone",
709
+ "primaryKey": false,
710
+ "notNull": true,
711
+ "default": "now()"
712
+ }
713
+ },
714
+ "indexes": {},
715
+ "foreignKeys": {},
716
+ "compositePrimaryKeys": {},
717
+ "uniqueConstraints": {},
718
+ "policies": {},
719
+ "checkConstraints": {},
720
+ "isRLSEnabled": false
721
+ }
722
+ },
723
+ "enums": {
724
+ "public.commerce_hold_status": {
725
+ "name": "commerce_hold_status",
726
+ "schema": "public",
727
+ "values": [
728
+ "active",
729
+ "released",
730
+ "committed"
731
+ ]
732
+ },
733
+ "public.commerce_order_status": {
734
+ "name": "commerce_order_status",
735
+ "schema": "public",
736
+ "values": [
737
+ "pending",
738
+ "paid",
739
+ "shipped",
740
+ "cancelled",
741
+ "expired",
742
+ "needs_attention",
743
+ "refunded"
744
+ ]
745
+ },
746
+ "public.commerce_product_status": {
747
+ "name": "commerce_product_status",
748
+ "schema": "public",
749
+ "values": [
750
+ "draft",
751
+ "active",
752
+ "archived"
753
+ ]
754
+ }
755
+ },
756
+ "schemas": {},
757
+ "sequences": {},
758
+ "roles": {},
759
+ "policies": {},
760
+ "views": {},
761
+ "_meta": {
762
+ "columns": {},
763
+ "schemas": {},
764
+ "tables": {}
765
+ }
766
+ }