@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,517 @@
1
+ {
2
+ "id": "d16d2b6f-0e24-455f-b264-29e11145b65e",
3
+ "prevId": "4b9673e8-fcd7-4bab-81bd-6e72d70c16b7",
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
+ "currency": {
217
+ "name": "currency",
218
+ "type": "text",
219
+ "primaryKey": false,
220
+ "notNull": true
221
+ },
222
+ "checkout_session_id": {
223
+ "name": "checkout_session_id",
224
+ "type": "text",
225
+ "primaryKey": false,
226
+ "notNull": false
227
+ },
228
+ "shipping_address": {
229
+ "name": "shipping_address",
230
+ "type": "jsonb",
231
+ "primaryKey": false,
232
+ "notNull": false
233
+ },
234
+ "created_at": {
235
+ "name": "created_at",
236
+ "type": "timestamp with time zone",
237
+ "primaryKey": false,
238
+ "notNull": true,
239
+ "default": "now()"
240
+ },
241
+ "updated_at": {
242
+ "name": "updated_at",
243
+ "type": "timestamp with time zone",
244
+ "primaryKey": false,
245
+ "notNull": true,
246
+ "default": "now()"
247
+ }
248
+ },
249
+ "indexes": {},
250
+ "foreignKeys": {},
251
+ "compositePrimaryKeys": {},
252
+ "uniqueConstraints": {
253
+ "commerce_orders_checkout_session_id_unique": {
254
+ "name": "commerce_orders_checkout_session_id_unique",
255
+ "nullsNotDistinct": false,
256
+ "columns": [
257
+ "checkout_session_id"
258
+ ]
259
+ }
260
+ },
261
+ "policies": {},
262
+ "checkConstraints": {},
263
+ "isRLSEnabled": false
264
+ },
265
+ "public.commerce_product_images": {
266
+ "name": "commerce_product_images",
267
+ "schema": "",
268
+ "columns": {
269
+ "id": {
270
+ "name": "id",
271
+ "type": "uuid",
272
+ "primaryKey": true,
273
+ "notNull": true,
274
+ "default": "gen_random_uuid()"
275
+ },
276
+ "product_id": {
277
+ "name": "product_id",
278
+ "type": "uuid",
279
+ "primaryKey": false,
280
+ "notNull": true
281
+ },
282
+ "url": {
283
+ "name": "url",
284
+ "type": "text",
285
+ "primaryKey": false,
286
+ "notNull": true
287
+ },
288
+ "alt": {
289
+ "name": "alt",
290
+ "type": "text",
291
+ "primaryKey": false,
292
+ "notNull": true,
293
+ "default": "''"
294
+ },
295
+ "position": {
296
+ "name": "position",
297
+ "type": "integer",
298
+ "primaryKey": false,
299
+ "notNull": true,
300
+ "default": 0
301
+ }
302
+ },
303
+ "indexes": {},
304
+ "foreignKeys": {
305
+ "commerce_product_images_product_id_commerce_products_id_fk": {
306
+ "name": "commerce_product_images_product_id_commerce_products_id_fk",
307
+ "tableFrom": "commerce_product_images",
308
+ "tableTo": "commerce_products",
309
+ "columnsFrom": [
310
+ "product_id"
311
+ ],
312
+ "columnsTo": [
313
+ "id"
314
+ ],
315
+ "onDelete": "cascade",
316
+ "onUpdate": "no action"
317
+ }
318
+ },
319
+ "compositePrimaryKeys": {},
320
+ "uniqueConstraints": {},
321
+ "policies": {},
322
+ "checkConstraints": {},
323
+ "isRLSEnabled": false
324
+ },
325
+ "public.commerce_products": {
326
+ "name": "commerce_products",
327
+ "schema": "",
328
+ "columns": {
329
+ "id": {
330
+ "name": "id",
331
+ "type": "uuid",
332
+ "primaryKey": true,
333
+ "notNull": true,
334
+ "default": "gen_random_uuid()"
335
+ },
336
+ "slug": {
337
+ "name": "slug",
338
+ "type": "text",
339
+ "primaryKey": false,
340
+ "notNull": true
341
+ },
342
+ "name": {
343
+ "name": "name",
344
+ "type": "text",
345
+ "primaryKey": false,
346
+ "notNull": true
347
+ },
348
+ "description": {
349
+ "name": "description",
350
+ "type": "text",
351
+ "primaryKey": false,
352
+ "notNull": true,
353
+ "default": "''"
354
+ },
355
+ "materials": {
356
+ "name": "materials",
357
+ "type": "text",
358
+ "primaryKey": false,
359
+ "notNull": false
360
+ },
361
+ "dimensions": {
362
+ "name": "dimensions",
363
+ "type": "text",
364
+ "primaryKey": false,
365
+ "notNull": false
366
+ },
367
+ "price_cents": {
368
+ "name": "price_cents",
369
+ "type": "integer",
370
+ "primaryKey": false,
371
+ "notNull": true
372
+ },
373
+ "currency": {
374
+ "name": "currency",
375
+ "type": "text",
376
+ "primaryKey": false,
377
+ "notNull": true
378
+ },
379
+ "category": {
380
+ "name": "category",
381
+ "type": "text",
382
+ "primaryKey": false,
383
+ "notNull": true
384
+ },
385
+ "quantity": {
386
+ "name": "quantity",
387
+ "type": "integer",
388
+ "primaryKey": false,
389
+ "notNull": true,
390
+ "default": 1
391
+ },
392
+ "status": {
393
+ "name": "status",
394
+ "type": "commerce_product_status",
395
+ "typeSchema": "public",
396
+ "primaryKey": false,
397
+ "notNull": true,
398
+ "default": "'draft'"
399
+ },
400
+ "featured": {
401
+ "name": "featured",
402
+ "type": "boolean",
403
+ "primaryKey": false,
404
+ "notNull": true,
405
+ "default": false
406
+ },
407
+ "created_at": {
408
+ "name": "created_at",
409
+ "type": "timestamp with time zone",
410
+ "primaryKey": false,
411
+ "notNull": true,
412
+ "default": "now()"
413
+ },
414
+ "updated_at": {
415
+ "name": "updated_at",
416
+ "type": "timestamp with time zone",
417
+ "primaryKey": false,
418
+ "notNull": true,
419
+ "default": "now()"
420
+ }
421
+ },
422
+ "indexes": {},
423
+ "foreignKeys": {},
424
+ "compositePrimaryKeys": {},
425
+ "uniqueConstraints": {
426
+ "commerce_products_slug_unique": {
427
+ "name": "commerce_products_slug_unique",
428
+ "nullsNotDistinct": false,
429
+ "columns": [
430
+ "slug"
431
+ ]
432
+ }
433
+ },
434
+ "policies": {},
435
+ "checkConstraints": {
436
+ "commerce_products_quantity_check": {
437
+ "name": "commerce_products_quantity_check",
438
+ "value": "\"commerce_products\".\"quantity\" >= 0"
439
+ }
440
+ },
441
+ "isRLSEnabled": false
442
+ },
443
+ "public.commerce_stripe_events": {
444
+ "name": "commerce_stripe_events",
445
+ "schema": "",
446
+ "columns": {
447
+ "id": {
448
+ "name": "id",
449
+ "type": "text",
450
+ "primaryKey": true,
451
+ "notNull": true
452
+ },
453
+ "type": {
454
+ "name": "type",
455
+ "type": "text",
456
+ "primaryKey": false,
457
+ "notNull": true
458
+ },
459
+ "processed_at": {
460
+ "name": "processed_at",
461
+ "type": "timestamp with time zone",
462
+ "primaryKey": false,
463
+ "notNull": true,
464
+ "default": "now()"
465
+ }
466
+ },
467
+ "indexes": {},
468
+ "foreignKeys": {},
469
+ "compositePrimaryKeys": {},
470
+ "uniqueConstraints": {},
471
+ "policies": {},
472
+ "checkConstraints": {},
473
+ "isRLSEnabled": false
474
+ }
475
+ },
476
+ "enums": {
477
+ "public.commerce_hold_status": {
478
+ "name": "commerce_hold_status",
479
+ "schema": "public",
480
+ "values": [
481
+ "active",
482
+ "released",
483
+ "committed"
484
+ ]
485
+ },
486
+ "public.commerce_order_status": {
487
+ "name": "commerce_order_status",
488
+ "schema": "public",
489
+ "values": [
490
+ "pending",
491
+ "paid",
492
+ "shipped",
493
+ "cancelled",
494
+ "expired"
495
+ ]
496
+ },
497
+ "public.commerce_product_status": {
498
+ "name": "commerce_product_status",
499
+ "schema": "public",
500
+ "values": [
501
+ "draft",
502
+ "active",
503
+ "archived"
504
+ ]
505
+ }
506
+ },
507
+ "schemas": {},
508
+ "sequences": {},
509
+ "roles": {},
510
+ "policies": {},
511
+ "views": {},
512
+ "_meta": {
513
+ "columns": {},
514
+ "schemas": {},
515
+ "tables": {}
516
+ }
517
+ }