@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,752 @@
1
+ {
2
+ "id": "ad61cd37-9ac1-4d75-a03c-3d2f30ecc625",
3
+ "prevId": "a0ce1da1-cef4-4c0d-b9cf-9fa1a244e0b0",
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
+ "created_at": {
241
+ "name": "created_at",
242
+ "type": "timestamp with time zone",
243
+ "primaryKey": false,
244
+ "notNull": true,
245
+ "default": "now()"
246
+ }
247
+ },
248
+ "indexes": {
249
+ "commerce_order_refunds_order_idx": {
250
+ "name": "commerce_order_refunds_order_idx",
251
+ "columns": [
252
+ {
253
+ "expression": "order_id",
254
+ "isExpression": false,
255
+ "asc": true,
256
+ "nulls": "last"
257
+ }
258
+ ],
259
+ "isUnique": false,
260
+ "concurrently": false,
261
+ "method": "btree",
262
+ "with": {}
263
+ }
264
+ },
265
+ "foreignKeys": {
266
+ "commerce_order_refunds_order_id_commerce_orders_id_fk": {
267
+ "name": "commerce_order_refunds_order_id_commerce_orders_id_fk",
268
+ "tableFrom": "commerce_order_refunds",
269
+ "tableTo": "commerce_orders",
270
+ "columnsFrom": [
271
+ "order_id"
272
+ ],
273
+ "columnsTo": [
274
+ "id"
275
+ ],
276
+ "onDelete": "cascade",
277
+ "onUpdate": "no action"
278
+ }
279
+ },
280
+ "compositePrimaryKeys": {},
281
+ "uniqueConstraints": {
282
+ "commerce_order_refunds_gateway_refund_id_unique": {
283
+ "name": "commerce_order_refunds_gateway_refund_id_unique",
284
+ "nullsNotDistinct": false,
285
+ "columns": [
286
+ "gateway_refund_id"
287
+ ]
288
+ }
289
+ },
290
+ "policies": {},
291
+ "checkConstraints": {
292
+ "commerce_order_refunds_amount_check": {
293
+ "name": "commerce_order_refunds_amount_check",
294
+ "value": "\"commerce_order_refunds\".\"amount_cents\" > 0"
295
+ }
296
+ },
297
+ "isRLSEnabled": false
298
+ },
299
+ "public.commerce_orders": {
300
+ "name": "commerce_orders",
301
+ "schema": "",
302
+ "columns": {
303
+ "id": {
304
+ "name": "id",
305
+ "type": "uuid",
306
+ "primaryKey": true,
307
+ "notNull": true
308
+ },
309
+ "status": {
310
+ "name": "status",
311
+ "type": "commerce_order_status",
312
+ "typeSchema": "public",
313
+ "primaryKey": false,
314
+ "notNull": true,
315
+ "default": "'pending'"
316
+ },
317
+ "email": {
318
+ "name": "email",
319
+ "type": "text",
320
+ "primaryKey": false,
321
+ "notNull": false
322
+ },
323
+ "subtotal_cents": {
324
+ "name": "subtotal_cents",
325
+ "type": "integer",
326
+ "primaryKey": false,
327
+ "notNull": true
328
+ },
329
+ "shipping_cents": {
330
+ "name": "shipping_cents",
331
+ "type": "integer",
332
+ "primaryKey": false,
333
+ "notNull": true,
334
+ "default": 0
335
+ },
336
+ "shipping_label": {
337
+ "name": "shipping_label",
338
+ "type": "text",
339
+ "primaryKey": false,
340
+ "notNull": false
341
+ },
342
+ "currency": {
343
+ "name": "currency",
344
+ "type": "text",
345
+ "primaryKey": false,
346
+ "notNull": true
347
+ },
348
+ "checkout_session_id": {
349
+ "name": "checkout_session_id",
350
+ "type": "text",
351
+ "primaryKey": false,
352
+ "notNull": false
353
+ },
354
+ "shipping_address": {
355
+ "name": "shipping_address",
356
+ "type": "jsonb",
357
+ "primaryKey": false,
358
+ "notNull": false
359
+ },
360
+ "fulfillment_carrier": {
361
+ "name": "fulfillment_carrier",
362
+ "type": "text",
363
+ "primaryKey": false,
364
+ "notNull": false
365
+ },
366
+ "fulfillment_tracking_number": {
367
+ "name": "fulfillment_tracking_number",
368
+ "type": "text",
369
+ "primaryKey": false,
370
+ "notNull": false
371
+ },
372
+ "fulfillment_tracking_url": {
373
+ "name": "fulfillment_tracking_url",
374
+ "type": "text",
375
+ "primaryKey": false,
376
+ "notNull": false
377
+ },
378
+ "shipped_at": {
379
+ "name": "shipped_at",
380
+ "type": "timestamp with time zone",
381
+ "primaryKey": false,
382
+ "notNull": false
383
+ },
384
+ "created_at": {
385
+ "name": "created_at",
386
+ "type": "timestamp with time zone",
387
+ "primaryKey": false,
388
+ "notNull": true,
389
+ "default": "now()"
390
+ },
391
+ "updated_at": {
392
+ "name": "updated_at",
393
+ "type": "timestamp with time zone",
394
+ "primaryKey": false,
395
+ "notNull": true,
396
+ "default": "now()"
397
+ }
398
+ },
399
+ "indexes": {},
400
+ "foreignKeys": {},
401
+ "compositePrimaryKeys": {},
402
+ "uniqueConstraints": {
403
+ "commerce_orders_checkout_session_id_unique": {
404
+ "name": "commerce_orders_checkout_session_id_unique",
405
+ "nullsNotDistinct": false,
406
+ "columns": [
407
+ "checkout_session_id"
408
+ ]
409
+ }
410
+ },
411
+ "policies": {},
412
+ "checkConstraints": {},
413
+ "isRLSEnabled": false
414
+ },
415
+ "public.commerce_product_images": {
416
+ "name": "commerce_product_images",
417
+ "schema": "",
418
+ "columns": {
419
+ "id": {
420
+ "name": "id",
421
+ "type": "uuid",
422
+ "primaryKey": true,
423
+ "notNull": true,
424
+ "default": "gen_random_uuid()"
425
+ },
426
+ "product_id": {
427
+ "name": "product_id",
428
+ "type": "uuid",
429
+ "primaryKey": false,
430
+ "notNull": true
431
+ },
432
+ "url": {
433
+ "name": "url",
434
+ "type": "text",
435
+ "primaryKey": false,
436
+ "notNull": true
437
+ },
438
+ "alt": {
439
+ "name": "alt",
440
+ "type": "text",
441
+ "primaryKey": false,
442
+ "notNull": true,
443
+ "default": "''"
444
+ },
445
+ "storage_key": {
446
+ "name": "storage_key",
447
+ "type": "text",
448
+ "primaryKey": false,
449
+ "notNull": false
450
+ },
451
+ "position": {
452
+ "name": "position",
453
+ "type": "integer",
454
+ "primaryKey": false,
455
+ "notNull": true,
456
+ "default": 0
457
+ }
458
+ },
459
+ "indexes": {},
460
+ "foreignKeys": {
461
+ "commerce_product_images_product_id_commerce_products_id_fk": {
462
+ "name": "commerce_product_images_product_id_commerce_products_id_fk",
463
+ "tableFrom": "commerce_product_images",
464
+ "tableTo": "commerce_products",
465
+ "columnsFrom": [
466
+ "product_id"
467
+ ],
468
+ "columnsTo": [
469
+ "id"
470
+ ],
471
+ "onDelete": "cascade",
472
+ "onUpdate": "no action"
473
+ }
474
+ },
475
+ "compositePrimaryKeys": {},
476
+ "uniqueConstraints": {},
477
+ "policies": {},
478
+ "checkConstraints": {},
479
+ "isRLSEnabled": false
480
+ },
481
+ "public.commerce_products": {
482
+ "name": "commerce_products",
483
+ "schema": "",
484
+ "columns": {
485
+ "id": {
486
+ "name": "id",
487
+ "type": "uuid",
488
+ "primaryKey": true,
489
+ "notNull": true,
490
+ "default": "gen_random_uuid()"
491
+ },
492
+ "slug": {
493
+ "name": "slug",
494
+ "type": "text",
495
+ "primaryKey": false,
496
+ "notNull": true
497
+ },
498
+ "name": {
499
+ "name": "name",
500
+ "type": "text",
501
+ "primaryKey": false,
502
+ "notNull": true
503
+ },
504
+ "description": {
505
+ "name": "description",
506
+ "type": "text",
507
+ "primaryKey": false,
508
+ "notNull": true,
509
+ "default": "''"
510
+ },
511
+ "materials": {
512
+ "name": "materials",
513
+ "type": "text",
514
+ "primaryKey": false,
515
+ "notNull": false
516
+ },
517
+ "dimensions": {
518
+ "name": "dimensions",
519
+ "type": "text",
520
+ "primaryKey": false,
521
+ "notNull": false
522
+ },
523
+ "price_cents": {
524
+ "name": "price_cents",
525
+ "type": "integer",
526
+ "primaryKey": false,
527
+ "notNull": true
528
+ },
529
+ "currency": {
530
+ "name": "currency",
531
+ "type": "text",
532
+ "primaryKey": false,
533
+ "notNull": true
534
+ },
535
+ "category": {
536
+ "name": "category",
537
+ "type": "text",
538
+ "primaryKey": false,
539
+ "notNull": true
540
+ },
541
+ "quantity": {
542
+ "name": "quantity",
543
+ "type": "integer",
544
+ "primaryKey": false,
545
+ "notNull": true,
546
+ "default": 1
547
+ },
548
+ "status": {
549
+ "name": "status",
550
+ "type": "commerce_product_status",
551
+ "typeSchema": "public",
552
+ "primaryKey": false,
553
+ "notNull": true,
554
+ "default": "'draft'"
555
+ },
556
+ "featured": {
557
+ "name": "featured",
558
+ "type": "boolean",
559
+ "primaryKey": false,
560
+ "notNull": true,
561
+ "default": false
562
+ },
563
+ "created_at": {
564
+ "name": "created_at",
565
+ "type": "timestamp with time zone",
566
+ "primaryKey": false,
567
+ "notNull": true,
568
+ "default": "now()"
569
+ },
570
+ "updated_at": {
571
+ "name": "updated_at",
572
+ "type": "timestamp with time zone",
573
+ "primaryKey": false,
574
+ "notNull": true,
575
+ "default": "now()"
576
+ }
577
+ },
578
+ "indexes": {},
579
+ "foreignKeys": {},
580
+ "compositePrimaryKeys": {},
581
+ "uniqueConstraints": {
582
+ "commerce_products_slug_unique": {
583
+ "name": "commerce_products_slug_unique",
584
+ "nullsNotDistinct": false,
585
+ "columns": [
586
+ "slug"
587
+ ]
588
+ }
589
+ },
590
+ "policies": {},
591
+ "checkConstraints": {
592
+ "commerce_products_quantity_check": {
593
+ "name": "commerce_products_quantity_check",
594
+ "value": "\"commerce_products\".\"quantity\" >= 0"
595
+ }
596
+ },
597
+ "isRLSEnabled": false
598
+ },
599
+ "public.commerce_shipping_rates": {
600
+ "name": "commerce_shipping_rates",
601
+ "schema": "",
602
+ "columns": {
603
+ "id": {
604
+ "name": "id",
605
+ "type": "uuid",
606
+ "primaryKey": true,
607
+ "notNull": true,
608
+ "default": "gen_random_uuid()"
609
+ },
610
+ "label": {
611
+ "name": "label",
612
+ "type": "text",
613
+ "primaryKey": false,
614
+ "notNull": true
615
+ },
616
+ "amount_cents": {
617
+ "name": "amount_cents",
618
+ "type": "integer",
619
+ "primaryKey": false,
620
+ "notNull": true
621
+ },
622
+ "currency": {
623
+ "name": "currency",
624
+ "type": "text",
625
+ "primaryKey": false,
626
+ "notNull": true
627
+ },
628
+ "min_days": {
629
+ "name": "min_days",
630
+ "type": "integer",
631
+ "primaryKey": false,
632
+ "notNull": false
633
+ },
634
+ "max_days": {
635
+ "name": "max_days",
636
+ "type": "integer",
637
+ "primaryKey": false,
638
+ "notNull": false
639
+ },
640
+ "active": {
641
+ "name": "active",
642
+ "type": "boolean",
643
+ "primaryKey": false,
644
+ "notNull": true,
645
+ "default": true
646
+ },
647
+ "sort": {
648
+ "name": "sort",
649
+ "type": "integer",
650
+ "primaryKey": false,
651
+ "notNull": true,
652
+ "default": 0
653
+ }
654
+ },
655
+ "indexes": {},
656
+ "foreignKeys": {},
657
+ "compositePrimaryKeys": {},
658
+ "uniqueConstraints": {
659
+ "commerce_shipping_rates_label_unique": {
660
+ "name": "commerce_shipping_rates_label_unique",
661
+ "nullsNotDistinct": false,
662
+ "columns": [
663
+ "label"
664
+ ]
665
+ }
666
+ },
667
+ "policies": {},
668
+ "checkConstraints": {
669
+ "commerce_shipping_rates_amount_check": {
670
+ "name": "commerce_shipping_rates_amount_check",
671
+ "value": "\"commerce_shipping_rates\".\"amount_cents\" >= 0"
672
+ }
673
+ },
674
+ "isRLSEnabled": false
675
+ },
676
+ "public.commerce_stripe_events": {
677
+ "name": "commerce_stripe_events",
678
+ "schema": "",
679
+ "columns": {
680
+ "id": {
681
+ "name": "id",
682
+ "type": "text",
683
+ "primaryKey": true,
684
+ "notNull": true
685
+ },
686
+ "type": {
687
+ "name": "type",
688
+ "type": "text",
689
+ "primaryKey": false,
690
+ "notNull": true
691
+ },
692
+ "processed_at": {
693
+ "name": "processed_at",
694
+ "type": "timestamp with time zone",
695
+ "primaryKey": false,
696
+ "notNull": true,
697
+ "default": "now()"
698
+ }
699
+ },
700
+ "indexes": {},
701
+ "foreignKeys": {},
702
+ "compositePrimaryKeys": {},
703
+ "uniqueConstraints": {},
704
+ "policies": {},
705
+ "checkConstraints": {},
706
+ "isRLSEnabled": false
707
+ }
708
+ },
709
+ "enums": {
710
+ "public.commerce_hold_status": {
711
+ "name": "commerce_hold_status",
712
+ "schema": "public",
713
+ "values": [
714
+ "active",
715
+ "released",
716
+ "committed"
717
+ ]
718
+ },
719
+ "public.commerce_order_status": {
720
+ "name": "commerce_order_status",
721
+ "schema": "public",
722
+ "values": [
723
+ "pending",
724
+ "paid",
725
+ "shipped",
726
+ "cancelled",
727
+ "expired",
728
+ "needs_attention",
729
+ "refunded"
730
+ ]
731
+ },
732
+ "public.commerce_product_status": {
733
+ "name": "commerce_product_status",
734
+ "schema": "public",
735
+ "values": [
736
+ "draft",
737
+ "active",
738
+ "archived"
739
+ ]
740
+ }
741
+ },
742
+ "schemas": {},
743
+ "sequences": {},
744
+ "roles": {},
745
+ "policies": {},
746
+ "views": {},
747
+ "_meta": {
748
+ "columns": {},
749
+ "schemas": {},
750
+ "tables": {}
751
+ }
752
+ }