@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,613 @@
1
+ {
2
+ "id": "2cd5dae3-1645-470b-9559-49c66f29c7d1",
3
+ "prevId": "553340af-814a-4deb-831a-d96389353e3a",
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_orders": {
187
+ "name": "commerce_orders",
188
+ "schema": "",
189
+ "columns": {
190
+ "id": {
191
+ "name": "id",
192
+ "type": "uuid",
193
+ "primaryKey": true,
194
+ "notNull": true
195
+ },
196
+ "status": {
197
+ "name": "status",
198
+ "type": "commerce_order_status",
199
+ "typeSchema": "public",
200
+ "primaryKey": false,
201
+ "notNull": true,
202
+ "default": "'pending'"
203
+ },
204
+ "email": {
205
+ "name": "email",
206
+ "type": "text",
207
+ "primaryKey": false,
208
+ "notNull": false
209
+ },
210
+ "subtotal_cents": {
211
+ "name": "subtotal_cents",
212
+ "type": "integer",
213
+ "primaryKey": false,
214
+ "notNull": true
215
+ },
216
+ "shipping_cents": {
217
+ "name": "shipping_cents",
218
+ "type": "integer",
219
+ "primaryKey": false,
220
+ "notNull": true,
221
+ "default": 0
222
+ },
223
+ "shipping_label": {
224
+ "name": "shipping_label",
225
+ "type": "text",
226
+ "primaryKey": false,
227
+ "notNull": false
228
+ },
229
+ "currency": {
230
+ "name": "currency",
231
+ "type": "text",
232
+ "primaryKey": false,
233
+ "notNull": true
234
+ },
235
+ "checkout_session_id": {
236
+ "name": "checkout_session_id",
237
+ "type": "text",
238
+ "primaryKey": false,
239
+ "notNull": false
240
+ },
241
+ "shipping_address": {
242
+ "name": "shipping_address",
243
+ "type": "jsonb",
244
+ "primaryKey": false,
245
+ "notNull": false
246
+ },
247
+ "created_at": {
248
+ "name": "created_at",
249
+ "type": "timestamp with time zone",
250
+ "primaryKey": false,
251
+ "notNull": true,
252
+ "default": "now()"
253
+ },
254
+ "updated_at": {
255
+ "name": "updated_at",
256
+ "type": "timestamp with time zone",
257
+ "primaryKey": false,
258
+ "notNull": true,
259
+ "default": "now()"
260
+ }
261
+ },
262
+ "indexes": {},
263
+ "foreignKeys": {},
264
+ "compositePrimaryKeys": {},
265
+ "uniqueConstraints": {
266
+ "commerce_orders_checkout_session_id_unique": {
267
+ "name": "commerce_orders_checkout_session_id_unique",
268
+ "nullsNotDistinct": false,
269
+ "columns": [
270
+ "checkout_session_id"
271
+ ]
272
+ }
273
+ },
274
+ "policies": {},
275
+ "checkConstraints": {},
276
+ "isRLSEnabled": false
277
+ },
278
+ "public.commerce_product_images": {
279
+ "name": "commerce_product_images",
280
+ "schema": "",
281
+ "columns": {
282
+ "id": {
283
+ "name": "id",
284
+ "type": "uuid",
285
+ "primaryKey": true,
286
+ "notNull": true,
287
+ "default": "gen_random_uuid()"
288
+ },
289
+ "product_id": {
290
+ "name": "product_id",
291
+ "type": "uuid",
292
+ "primaryKey": false,
293
+ "notNull": true
294
+ },
295
+ "url": {
296
+ "name": "url",
297
+ "type": "text",
298
+ "primaryKey": false,
299
+ "notNull": true
300
+ },
301
+ "alt": {
302
+ "name": "alt",
303
+ "type": "text",
304
+ "primaryKey": false,
305
+ "notNull": true,
306
+ "default": "''"
307
+ },
308
+ "storage_key": {
309
+ "name": "storage_key",
310
+ "type": "text",
311
+ "primaryKey": false,
312
+ "notNull": false
313
+ },
314
+ "position": {
315
+ "name": "position",
316
+ "type": "integer",
317
+ "primaryKey": false,
318
+ "notNull": true,
319
+ "default": 0
320
+ }
321
+ },
322
+ "indexes": {},
323
+ "foreignKeys": {
324
+ "commerce_product_images_product_id_commerce_products_id_fk": {
325
+ "name": "commerce_product_images_product_id_commerce_products_id_fk",
326
+ "tableFrom": "commerce_product_images",
327
+ "tableTo": "commerce_products",
328
+ "columnsFrom": [
329
+ "product_id"
330
+ ],
331
+ "columnsTo": [
332
+ "id"
333
+ ],
334
+ "onDelete": "cascade",
335
+ "onUpdate": "no action"
336
+ }
337
+ },
338
+ "compositePrimaryKeys": {},
339
+ "uniqueConstraints": {},
340
+ "policies": {},
341
+ "checkConstraints": {},
342
+ "isRLSEnabled": false
343
+ },
344
+ "public.commerce_products": {
345
+ "name": "commerce_products",
346
+ "schema": "",
347
+ "columns": {
348
+ "id": {
349
+ "name": "id",
350
+ "type": "uuid",
351
+ "primaryKey": true,
352
+ "notNull": true,
353
+ "default": "gen_random_uuid()"
354
+ },
355
+ "slug": {
356
+ "name": "slug",
357
+ "type": "text",
358
+ "primaryKey": false,
359
+ "notNull": true
360
+ },
361
+ "name": {
362
+ "name": "name",
363
+ "type": "text",
364
+ "primaryKey": false,
365
+ "notNull": true
366
+ },
367
+ "description": {
368
+ "name": "description",
369
+ "type": "text",
370
+ "primaryKey": false,
371
+ "notNull": true,
372
+ "default": "''"
373
+ },
374
+ "materials": {
375
+ "name": "materials",
376
+ "type": "text",
377
+ "primaryKey": false,
378
+ "notNull": false
379
+ },
380
+ "dimensions": {
381
+ "name": "dimensions",
382
+ "type": "text",
383
+ "primaryKey": false,
384
+ "notNull": false
385
+ },
386
+ "price_cents": {
387
+ "name": "price_cents",
388
+ "type": "integer",
389
+ "primaryKey": false,
390
+ "notNull": true
391
+ },
392
+ "currency": {
393
+ "name": "currency",
394
+ "type": "text",
395
+ "primaryKey": false,
396
+ "notNull": true
397
+ },
398
+ "category": {
399
+ "name": "category",
400
+ "type": "text",
401
+ "primaryKey": false,
402
+ "notNull": true
403
+ },
404
+ "quantity": {
405
+ "name": "quantity",
406
+ "type": "integer",
407
+ "primaryKey": false,
408
+ "notNull": true,
409
+ "default": 1
410
+ },
411
+ "status": {
412
+ "name": "status",
413
+ "type": "commerce_product_status",
414
+ "typeSchema": "public",
415
+ "primaryKey": false,
416
+ "notNull": true,
417
+ "default": "'draft'"
418
+ },
419
+ "featured": {
420
+ "name": "featured",
421
+ "type": "boolean",
422
+ "primaryKey": false,
423
+ "notNull": true,
424
+ "default": false
425
+ },
426
+ "created_at": {
427
+ "name": "created_at",
428
+ "type": "timestamp with time zone",
429
+ "primaryKey": false,
430
+ "notNull": true,
431
+ "default": "now()"
432
+ },
433
+ "updated_at": {
434
+ "name": "updated_at",
435
+ "type": "timestamp with time zone",
436
+ "primaryKey": false,
437
+ "notNull": true,
438
+ "default": "now()"
439
+ }
440
+ },
441
+ "indexes": {},
442
+ "foreignKeys": {},
443
+ "compositePrimaryKeys": {},
444
+ "uniqueConstraints": {
445
+ "commerce_products_slug_unique": {
446
+ "name": "commerce_products_slug_unique",
447
+ "nullsNotDistinct": false,
448
+ "columns": [
449
+ "slug"
450
+ ]
451
+ }
452
+ },
453
+ "policies": {},
454
+ "checkConstraints": {
455
+ "commerce_products_quantity_check": {
456
+ "name": "commerce_products_quantity_check",
457
+ "value": "\"commerce_products\".\"quantity\" >= 0"
458
+ }
459
+ },
460
+ "isRLSEnabled": false
461
+ },
462
+ "public.commerce_shipping_rates": {
463
+ "name": "commerce_shipping_rates",
464
+ "schema": "",
465
+ "columns": {
466
+ "id": {
467
+ "name": "id",
468
+ "type": "uuid",
469
+ "primaryKey": true,
470
+ "notNull": true,
471
+ "default": "gen_random_uuid()"
472
+ },
473
+ "label": {
474
+ "name": "label",
475
+ "type": "text",
476
+ "primaryKey": false,
477
+ "notNull": true
478
+ },
479
+ "amount_cents": {
480
+ "name": "amount_cents",
481
+ "type": "integer",
482
+ "primaryKey": false,
483
+ "notNull": true
484
+ },
485
+ "currency": {
486
+ "name": "currency",
487
+ "type": "text",
488
+ "primaryKey": false,
489
+ "notNull": true
490
+ },
491
+ "min_days": {
492
+ "name": "min_days",
493
+ "type": "integer",
494
+ "primaryKey": false,
495
+ "notNull": false
496
+ },
497
+ "max_days": {
498
+ "name": "max_days",
499
+ "type": "integer",
500
+ "primaryKey": false,
501
+ "notNull": false
502
+ },
503
+ "active": {
504
+ "name": "active",
505
+ "type": "boolean",
506
+ "primaryKey": false,
507
+ "notNull": true,
508
+ "default": true
509
+ },
510
+ "sort": {
511
+ "name": "sort",
512
+ "type": "integer",
513
+ "primaryKey": false,
514
+ "notNull": true,
515
+ "default": 0
516
+ }
517
+ },
518
+ "indexes": {},
519
+ "foreignKeys": {},
520
+ "compositePrimaryKeys": {},
521
+ "uniqueConstraints": {
522
+ "commerce_shipping_rates_label_unique": {
523
+ "name": "commerce_shipping_rates_label_unique",
524
+ "nullsNotDistinct": false,
525
+ "columns": [
526
+ "label"
527
+ ]
528
+ }
529
+ },
530
+ "policies": {},
531
+ "checkConstraints": {
532
+ "commerce_shipping_rates_amount_check": {
533
+ "name": "commerce_shipping_rates_amount_check",
534
+ "value": "\"commerce_shipping_rates\".\"amount_cents\" >= 0"
535
+ }
536
+ },
537
+ "isRLSEnabled": false
538
+ },
539
+ "public.commerce_stripe_events": {
540
+ "name": "commerce_stripe_events",
541
+ "schema": "",
542
+ "columns": {
543
+ "id": {
544
+ "name": "id",
545
+ "type": "text",
546
+ "primaryKey": true,
547
+ "notNull": true
548
+ },
549
+ "type": {
550
+ "name": "type",
551
+ "type": "text",
552
+ "primaryKey": false,
553
+ "notNull": true
554
+ },
555
+ "processed_at": {
556
+ "name": "processed_at",
557
+ "type": "timestamp with time zone",
558
+ "primaryKey": false,
559
+ "notNull": true,
560
+ "default": "now()"
561
+ }
562
+ },
563
+ "indexes": {},
564
+ "foreignKeys": {},
565
+ "compositePrimaryKeys": {},
566
+ "uniqueConstraints": {},
567
+ "policies": {},
568
+ "checkConstraints": {},
569
+ "isRLSEnabled": false
570
+ }
571
+ },
572
+ "enums": {
573
+ "public.commerce_hold_status": {
574
+ "name": "commerce_hold_status",
575
+ "schema": "public",
576
+ "values": [
577
+ "active",
578
+ "released",
579
+ "committed"
580
+ ]
581
+ },
582
+ "public.commerce_order_status": {
583
+ "name": "commerce_order_status",
584
+ "schema": "public",
585
+ "values": [
586
+ "pending",
587
+ "paid",
588
+ "shipped",
589
+ "cancelled",
590
+ "expired"
591
+ ]
592
+ },
593
+ "public.commerce_product_status": {
594
+ "name": "commerce_product_status",
595
+ "schema": "public",
596
+ "values": [
597
+ "draft",
598
+ "active",
599
+ "archived"
600
+ ]
601
+ }
602
+ },
603
+ "schemas": {},
604
+ "sequences": {},
605
+ "roles": {},
606
+ "policies": {},
607
+ "views": {},
608
+ "_meta": {
609
+ "columns": {},
610
+ "schemas": {},
611
+ "tables": {}
612
+ }
613
+ }