@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,607 @@
1
+ {
2
+ "id": "553340af-814a-4deb-831a-d96389353e3a",
3
+ "prevId": "d16d2b6f-0e24-455f-b264-29e11145b65e",
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
+ "position": {
309
+ "name": "position",
310
+ "type": "integer",
311
+ "primaryKey": false,
312
+ "notNull": true,
313
+ "default": 0
314
+ }
315
+ },
316
+ "indexes": {},
317
+ "foreignKeys": {
318
+ "commerce_product_images_product_id_commerce_products_id_fk": {
319
+ "name": "commerce_product_images_product_id_commerce_products_id_fk",
320
+ "tableFrom": "commerce_product_images",
321
+ "tableTo": "commerce_products",
322
+ "columnsFrom": [
323
+ "product_id"
324
+ ],
325
+ "columnsTo": [
326
+ "id"
327
+ ],
328
+ "onDelete": "cascade",
329
+ "onUpdate": "no action"
330
+ }
331
+ },
332
+ "compositePrimaryKeys": {},
333
+ "uniqueConstraints": {},
334
+ "policies": {},
335
+ "checkConstraints": {},
336
+ "isRLSEnabled": false
337
+ },
338
+ "public.commerce_products": {
339
+ "name": "commerce_products",
340
+ "schema": "",
341
+ "columns": {
342
+ "id": {
343
+ "name": "id",
344
+ "type": "uuid",
345
+ "primaryKey": true,
346
+ "notNull": true,
347
+ "default": "gen_random_uuid()"
348
+ },
349
+ "slug": {
350
+ "name": "slug",
351
+ "type": "text",
352
+ "primaryKey": false,
353
+ "notNull": true
354
+ },
355
+ "name": {
356
+ "name": "name",
357
+ "type": "text",
358
+ "primaryKey": false,
359
+ "notNull": true
360
+ },
361
+ "description": {
362
+ "name": "description",
363
+ "type": "text",
364
+ "primaryKey": false,
365
+ "notNull": true,
366
+ "default": "''"
367
+ },
368
+ "materials": {
369
+ "name": "materials",
370
+ "type": "text",
371
+ "primaryKey": false,
372
+ "notNull": false
373
+ },
374
+ "dimensions": {
375
+ "name": "dimensions",
376
+ "type": "text",
377
+ "primaryKey": false,
378
+ "notNull": false
379
+ },
380
+ "price_cents": {
381
+ "name": "price_cents",
382
+ "type": "integer",
383
+ "primaryKey": false,
384
+ "notNull": true
385
+ },
386
+ "currency": {
387
+ "name": "currency",
388
+ "type": "text",
389
+ "primaryKey": false,
390
+ "notNull": true
391
+ },
392
+ "category": {
393
+ "name": "category",
394
+ "type": "text",
395
+ "primaryKey": false,
396
+ "notNull": true
397
+ },
398
+ "quantity": {
399
+ "name": "quantity",
400
+ "type": "integer",
401
+ "primaryKey": false,
402
+ "notNull": true,
403
+ "default": 1
404
+ },
405
+ "status": {
406
+ "name": "status",
407
+ "type": "commerce_product_status",
408
+ "typeSchema": "public",
409
+ "primaryKey": false,
410
+ "notNull": true,
411
+ "default": "'draft'"
412
+ },
413
+ "featured": {
414
+ "name": "featured",
415
+ "type": "boolean",
416
+ "primaryKey": false,
417
+ "notNull": true,
418
+ "default": false
419
+ },
420
+ "created_at": {
421
+ "name": "created_at",
422
+ "type": "timestamp with time zone",
423
+ "primaryKey": false,
424
+ "notNull": true,
425
+ "default": "now()"
426
+ },
427
+ "updated_at": {
428
+ "name": "updated_at",
429
+ "type": "timestamp with time zone",
430
+ "primaryKey": false,
431
+ "notNull": true,
432
+ "default": "now()"
433
+ }
434
+ },
435
+ "indexes": {},
436
+ "foreignKeys": {},
437
+ "compositePrimaryKeys": {},
438
+ "uniqueConstraints": {
439
+ "commerce_products_slug_unique": {
440
+ "name": "commerce_products_slug_unique",
441
+ "nullsNotDistinct": false,
442
+ "columns": [
443
+ "slug"
444
+ ]
445
+ }
446
+ },
447
+ "policies": {},
448
+ "checkConstraints": {
449
+ "commerce_products_quantity_check": {
450
+ "name": "commerce_products_quantity_check",
451
+ "value": "\"commerce_products\".\"quantity\" >= 0"
452
+ }
453
+ },
454
+ "isRLSEnabled": false
455
+ },
456
+ "public.commerce_shipping_rates": {
457
+ "name": "commerce_shipping_rates",
458
+ "schema": "",
459
+ "columns": {
460
+ "id": {
461
+ "name": "id",
462
+ "type": "uuid",
463
+ "primaryKey": true,
464
+ "notNull": true,
465
+ "default": "gen_random_uuid()"
466
+ },
467
+ "label": {
468
+ "name": "label",
469
+ "type": "text",
470
+ "primaryKey": false,
471
+ "notNull": true
472
+ },
473
+ "amount_cents": {
474
+ "name": "amount_cents",
475
+ "type": "integer",
476
+ "primaryKey": false,
477
+ "notNull": true
478
+ },
479
+ "currency": {
480
+ "name": "currency",
481
+ "type": "text",
482
+ "primaryKey": false,
483
+ "notNull": true
484
+ },
485
+ "min_days": {
486
+ "name": "min_days",
487
+ "type": "integer",
488
+ "primaryKey": false,
489
+ "notNull": false
490
+ },
491
+ "max_days": {
492
+ "name": "max_days",
493
+ "type": "integer",
494
+ "primaryKey": false,
495
+ "notNull": false
496
+ },
497
+ "active": {
498
+ "name": "active",
499
+ "type": "boolean",
500
+ "primaryKey": false,
501
+ "notNull": true,
502
+ "default": true
503
+ },
504
+ "sort": {
505
+ "name": "sort",
506
+ "type": "integer",
507
+ "primaryKey": false,
508
+ "notNull": true,
509
+ "default": 0
510
+ }
511
+ },
512
+ "indexes": {},
513
+ "foreignKeys": {},
514
+ "compositePrimaryKeys": {},
515
+ "uniqueConstraints": {
516
+ "commerce_shipping_rates_label_unique": {
517
+ "name": "commerce_shipping_rates_label_unique",
518
+ "nullsNotDistinct": false,
519
+ "columns": [
520
+ "label"
521
+ ]
522
+ }
523
+ },
524
+ "policies": {},
525
+ "checkConstraints": {
526
+ "commerce_shipping_rates_amount_check": {
527
+ "name": "commerce_shipping_rates_amount_check",
528
+ "value": "\"commerce_shipping_rates\".\"amount_cents\" >= 0"
529
+ }
530
+ },
531
+ "isRLSEnabled": false
532
+ },
533
+ "public.commerce_stripe_events": {
534
+ "name": "commerce_stripe_events",
535
+ "schema": "",
536
+ "columns": {
537
+ "id": {
538
+ "name": "id",
539
+ "type": "text",
540
+ "primaryKey": true,
541
+ "notNull": true
542
+ },
543
+ "type": {
544
+ "name": "type",
545
+ "type": "text",
546
+ "primaryKey": false,
547
+ "notNull": true
548
+ },
549
+ "processed_at": {
550
+ "name": "processed_at",
551
+ "type": "timestamp with time zone",
552
+ "primaryKey": false,
553
+ "notNull": true,
554
+ "default": "now()"
555
+ }
556
+ },
557
+ "indexes": {},
558
+ "foreignKeys": {},
559
+ "compositePrimaryKeys": {},
560
+ "uniqueConstraints": {},
561
+ "policies": {},
562
+ "checkConstraints": {},
563
+ "isRLSEnabled": false
564
+ }
565
+ },
566
+ "enums": {
567
+ "public.commerce_hold_status": {
568
+ "name": "commerce_hold_status",
569
+ "schema": "public",
570
+ "values": [
571
+ "active",
572
+ "released",
573
+ "committed"
574
+ ]
575
+ },
576
+ "public.commerce_order_status": {
577
+ "name": "commerce_order_status",
578
+ "schema": "public",
579
+ "values": [
580
+ "pending",
581
+ "paid",
582
+ "shipped",
583
+ "cancelled",
584
+ "expired"
585
+ ]
586
+ },
587
+ "public.commerce_product_status": {
588
+ "name": "commerce_product_status",
589
+ "schema": "public",
590
+ "values": [
591
+ "draft",
592
+ "active",
593
+ "archived"
594
+ ]
595
+ }
596
+ },
597
+ "schemas": {},
598
+ "sequences": {},
599
+ "roles": {},
600
+ "policies": {},
601
+ "views": {},
602
+ "_meta": {
603
+ "columns": {},
604
+ "schemas": {},
605
+ "tables": {}
606
+ }
607
+ }