create-signet-app 0.2.2 → 0.4.1

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.
Files changed (76) hide show
  1. package/README.md +128 -7
  2. package/package.json +4 -3
  3. package/src/index.ts +338 -66
  4. package/template-api/_github/workflows/ci.yml +0 -3
  5. package/template-api/_mcp/test/mcp-off.test.ts +13 -0
  6. package/template-api/_mcp/test/mcp.test.ts +49 -0
  7. package/template-api/_targets/bun/Dockerfile +13 -0
  8. package/template-api/_targets/bun/_dockerignore +10 -0
  9. package/template-api/_targets/bun/src/server.ts +32 -0
  10. package/template-api/_targets/cloudflare/_github/workflows/ci.yml +24 -0
  11. package/template-api/_targets/cloudflare/src/index.ts +17 -0
  12. package/template-api/_targets/node/src/server.ts +55 -0
  13. package/template-api/_targets/vercel/index.ts +16 -0
  14. package/template-api/_targets/vercel/vercel.json +4 -0
  15. package/template-api/src/app.ts +77 -0
  16. package/template-api/src/env.ts +4 -0
  17. package/template-api/tsconfig.json +2 -1
  18. package/template-api/tsconfig.test.json +1 -1
  19. package/template-full/README.md +155 -0
  20. package/template-full/_github/workflows/ci.yml +22 -0
  21. package/template-full/_gitignore +9 -0
  22. package/template-full/_mcp/test/mcp.test.ts +55 -0
  23. package/template-full/api/app.ts +132 -0
  24. package/template-full/api/db/index.ts +10 -0
  25. package/template-full/api/db/kv.ts +54 -0
  26. package/template-full/api/db/open.ts +33 -0
  27. package/template-full/api/db/schema.ts +57 -0
  28. package/template-full/api/env.ts +44 -0
  29. package/template-full/api/plans.ts +23 -0
  30. package/template-full/api/routes/account.ts +63 -0
  31. package/template-full/api/routes/auth.ts +134 -0
  32. package/template-full/api/routes/billing.ts +44 -0
  33. package/template-full/api/routes/notifications.ts +59 -0
  34. package/template-full/api/routes/privacy.ts +52 -0
  35. package/template-full/api/server.ts +44 -0
  36. package/template-full/api/services.ts +185 -0
  37. package/template-full/biome.json +50 -0
  38. package/template-full/drizzle/0000_init.sql +155 -0
  39. package/template-full/drizzle/0001_orgs.sql +47 -0
  40. package/template-full/drizzle/meta/0000_snapshot.json +974 -0
  41. package/template-full/drizzle/meta/0001_snapshot.json +1270 -0
  42. package/template-full/drizzle/meta/_journal.json +20 -0
  43. package/template-full/drizzle.config.ts +9 -0
  44. package/template-full/e2e/smoke.spec.ts +152 -0
  45. package/template-full/index.html +17 -0
  46. package/template-full/playwright.config.ts +10 -0
  47. package/template-full/scripts/dev.ts +17 -0
  48. package/template-full/src/app.css +9 -0
  49. package/template-full/src/components/toaster.tsx +13 -0
  50. package/template-full/src/lib/api.ts +40 -0
  51. package/template-full/src/main.tsx +36 -0
  52. package/template-full/src/routeTree.gen.ts +297 -0
  53. package/template-full/src/router.test.ts +23 -0
  54. package/template-full/src/router.ts +17 -0
  55. package/template-full/src/routes/__root.tsx +9 -0
  56. package/template-full/src/routes/_app/account.tsx +64 -0
  57. package/template-full/src/routes/_app/admin.tsx +38 -0
  58. package/template-full/src/routes/_app/billing.tsx +40 -0
  59. package/template-full/src/routes/_app/index.tsx +33 -0
  60. package/template-full/src/routes/_app/notifications.tsx +72 -0
  61. package/template-full/src/routes/_app/org/index.tsx +38 -0
  62. package/template-full/src/routes/_app/org/members.tsx +86 -0
  63. package/template-full/src/routes/_app/org/new.tsx +45 -0
  64. package/template-full/src/routes/_app/privacy.tsx +48 -0
  65. package/template-full/src/routes/_app.tsx +88 -0
  66. package/template-full/src/routes/invite.$token.tsx +55 -0
  67. package/template-full/src/routes/login.tsx +36 -0
  68. package/template-full/test/api.test.ts +189 -0
  69. package/template-full/tsconfig.api.json +19 -0
  70. package/template-full/tsconfig.app.json +26 -0
  71. package/template-full/tsconfig.json +9 -0
  72. package/template-full/tsconfig.node.json +16 -0
  73. package/template-full/tsconfig.test.json +8 -0
  74. package/template-full/vite.config.ts +24 -0
  75. package/template-api/src/index.ts +0 -55
  76. /package/template-api/{wrangler.jsonc → _targets/cloudflare/wrangler.jsonc} +0 -0
@@ -0,0 +1,974 @@
1
+ {
2
+ "version": "6",
3
+ "dialect": "sqlite",
4
+ "id": "9a47dc76-d4a8-4df9-acc3-fc9cf47df999",
5
+ "prevId": "00000000-0000-0000-0000-000000000000",
6
+ "tables": {
7
+ "audit_log": {
8
+ "name": "audit_log",
9
+ "columns": {
10
+ "id": {
11
+ "name": "id",
12
+ "type": "text",
13
+ "primaryKey": true,
14
+ "notNull": true,
15
+ "autoincrement": false
16
+ },
17
+ "at": {
18
+ "name": "at",
19
+ "type": "integer",
20
+ "primaryKey": false,
21
+ "notNull": true,
22
+ "autoincrement": false,
23
+ "default": "(cast((julianday('now') - 2440587.5) * 86400000 as integer))"
24
+ },
25
+ "actor_type": {
26
+ "name": "actor_type",
27
+ "type": "text",
28
+ "primaryKey": false,
29
+ "notNull": true,
30
+ "autoincrement": false
31
+ },
32
+ "actor_id": {
33
+ "name": "actor_id",
34
+ "type": "text",
35
+ "primaryKey": false,
36
+ "notNull": true,
37
+ "autoincrement": false
38
+ },
39
+ "action": {
40
+ "name": "action",
41
+ "type": "text",
42
+ "primaryKey": false,
43
+ "notNull": true,
44
+ "autoincrement": false
45
+ },
46
+ "table_name": {
47
+ "name": "table_name",
48
+ "type": "text",
49
+ "primaryKey": false,
50
+ "notNull": true,
51
+ "autoincrement": false
52
+ },
53
+ "row_id": {
54
+ "name": "row_id",
55
+ "type": "text",
56
+ "primaryKey": false,
57
+ "notNull": false,
58
+ "autoincrement": false
59
+ },
60
+ "before": {
61
+ "name": "before",
62
+ "type": "text",
63
+ "primaryKey": false,
64
+ "notNull": false,
65
+ "autoincrement": false
66
+ },
67
+ "after": {
68
+ "name": "after",
69
+ "type": "text",
70
+ "primaryKey": false,
71
+ "notNull": false,
72
+ "autoincrement": false
73
+ }
74
+ },
75
+ "indexes": {},
76
+ "foreignKeys": {},
77
+ "compositePrimaryKeys": {},
78
+ "uniqueConstraints": {},
79
+ "checkConstraints": {}
80
+ },
81
+ "consents": {
82
+ "name": "consents",
83
+ "columns": {
84
+ "id": {
85
+ "name": "id",
86
+ "type": "text",
87
+ "primaryKey": true,
88
+ "notNull": true,
89
+ "autoincrement": false
90
+ },
91
+ "subject": {
92
+ "name": "subject",
93
+ "type": "text",
94
+ "primaryKey": false,
95
+ "notNull": true,
96
+ "autoincrement": false
97
+ },
98
+ "purpose": {
99
+ "name": "purpose",
100
+ "type": "text",
101
+ "primaryKey": false,
102
+ "notNull": true,
103
+ "autoincrement": false
104
+ },
105
+ "notice_version": {
106
+ "name": "notice_version",
107
+ "type": "text",
108
+ "primaryKey": false,
109
+ "notNull": true,
110
+ "autoincrement": false
111
+ },
112
+ "source": {
113
+ "name": "source",
114
+ "type": "text",
115
+ "primaryKey": false,
116
+ "notNull": false,
117
+ "autoincrement": false
118
+ },
119
+ "given_at": {
120
+ "name": "given_at",
121
+ "type": "integer",
122
+ "primaryKey": false,
123
+ "notNull": true,
124
+ "autoincrement": false
125
+ },
126
+ "withdrawn_at": {
127
+ "name": "withdrawn_at",
128
+ "type": "integer",
129
+ "primaryKey": false,
130
+ "notNull": false,
131
+ "autoincrement": false
132
+ }
133
+ },
134
+ "indexes": {
135
+ "consents_subject": {
136
+ "name": "consents_subject",
137
+ "columns": [
138
+ "subject",
139
+ "purpose"
140
+ ],
141
+ "isUnique": false
142
+ }
143
+ },
144
+ "foreignKeys": {},
145
+ "compositePrimaryKeys": {},
146
+ "uniqueConstraints": {},
147
+ "checkConstraints": {}
148
+ },
149
+ "data_requests": {
150
+ "name": "data_requests",
151
+ "columns": {
152
+ "id": {
153
+ "name": "id",
154
+ "type": "text",
155
+ "primaryKey": true,
156
+ "notNull": true,
157
+ "autoincrement": false
158
+ },
159
+ "subject": {
160
+ "name": "subject",
161
+ "type": "text",
162
+ "primaryKey": false,
163
+ "notNull": true,
164
+ "autoincrement": false
165
+ },
166
+ "kind": {
167
+ "name": "kind",
168
+ "type": "text",
169
+ "primaryKey": false,
170
+ "notNull": true,
171
+ "autoincrement": false
172
+ },
173
+ "status": {
174
+ "name": "status",
175
+ "type": "text",
176
+ "primaryKey": false,
177
+ "notNull": true,
178
+ "autoincrement": false,
179
+ "default": "'pending'"
180
+ },
181
+ "requested_at": {
182
+ "name": "requested_at",
183
+ "type": "integer",
184
+ "primaryKey": false,
185
+ "notNull": true,
186
+ "autoincrement": false
187
+ },
188
+ "due_at": {
189
+ "name": "due_at",
190
+ "type": "integer",
191
+ "primaryKey": false,
192
+ "notNull": false,
193
+ "autoincrement": false
194
+ },
195
+ "closed_at": {
196
+ "name": "closed_at",
197
+ "type": "integer",
198
+ "primaryKey": false,
199
+ "notNull": false,
200
+ "autoincrement": false
201
+ },
202
+ "closed_by": {
203
+ "name": "closed_by",
204
+ "type": "text",
205
+ "primaryKey": false,
206
+ "notNull": false,
207
+ "autoincrement": false
208
+ },
209
+ "note": {
210
+ "name": "note",
211
+ "type": "text",
212
+ "primaryKey": false,
213
+ "notNull": false,
214
+ "autoincrement": false
215
+ },
216
+ "result": {
217
+ "name": "result",
218
+ "type": "text",
219
+ "primaryKey": false,
220
+ "notNull": false,
221
+ "autoincrement": false
222
+ }
223
+ },
224
+ "indexes": {
225
+ "data_requests_subject": {
226
+ "name": "data_requests_subject",
227
+ "columns": [
228
+ "subject"
229
+ ],
230
+ "isUnique": false
231
+ }
232
+ },
233
+ "foreignKeys": {},
234
+ "compositePrimaryKeys": {},
235
+ "uniqueConstraints": {},
236
+ "checkConstraints": {}
237
+ },
238
+ "entitlement_overrides": {
239
+ "name": "entitlement_overrides",
240
+ "columns": {
241
+ "id": {
242
+ "name": "id",
243
+ "type": "text",
244
+ "primaryKey": true,
245
+ "notNull": true,
246
+ "autoincrement": false
247
+ },
248
+ "subject": {
249
+ "name": "subject",
250
+ "type": "text",
251
+ "primaryKey": false,
252
+ "notNull": true,
253
+ "autoincrement": false
254
+ },
255
+ "kind": {
256
+ "name": "kind",
257
+ "type": "text",
258
+ "primaryKey": false,
259
+ "notNull": true,
260
+ "autoincrement": false
261
+ },
262
+ "key": {
263
+ "name": "key",
264
+ "type": "text",
265
+ "primaryKey": false,
266
+ "notNull": true,
267
+ "autoincrement": false
268
+ },
269
+ "value": {
270
+ "name": "value",
271
+ "type": "integer",
272
+ "primaryKey": false,
273
+ "notNull": false,
274
+ "autoincrement": false
275
+ },
276
+ "expires_at": {
277
+ "name": "expires_at",
278
+ "type": "integer",
279
+ "primaryKey": false,
280
+ "notNull": false,
281
+ "autoincrement": false
282
+ },
283
+ "created_at": {
284
+ "name": "created_at",
285
+ "type": "integer",
286
+ "primaryKey": false,
287
+ "notNull": true,
288
+ "autoincrement": false,
289
+ "default": "(cast((julianday('now') - 2440587.5) * 86400000 as integer))"
290
+ }
291
+ },
292
+ "indexes": {
293
+ "entitlement_overrides_subject": {
294
+ "name": "entitlement_overrides_subject",
295
+ "columns": [
296
+ "subject"
297
+ ],
298
+ "isUnique": false
299
+ }
300
+ },
301
+ "foreignKeys": {},
302
+ "compositePrimaryKeys": {},
303
+ "uniqueConstraints": {},
304
+ "checkConstraints": {}
305
+ },
306
+ "feedback": {
307
+ "name": "feedback",
308
+ "columns": {
309
+ "id": {
310
+ "name": "id",
311
+ "type": "text",
312
+ "primaryKey": true,
313
+ "notNull": true,
314
+ "autoincrement": false
315
+ },
316
+ "subject": {
317
+ "name": "subject",
318
+ "type": "text",
319
+ "primaryKey": false,
320
+ "notNull": false,
321
+ "autoincrement": false
322
+ },
323
+ "kind": {
324
+ "name": "kind",
325
+ "type": "text",
326
+ "primaryKey": false,
327
+ "notNull": true,
328
+ "autoincrement": false
329
+ },
330
+ "message": {
331
+ "name": "message",
332
+ "type": "text",
333
+ "primaryKey": false,
334
+ "notNull": true,
335
+ "autoincrement": false
336
+ },
337
+ "rating": {
338
+ "name": "rating",
339
+ "type": "integer",
340
+ "primaryKey": false,
341
+ "notNull": false,
342
+ "autoincrement": false
343
+ },
344
+ "page": {
345
+ "name": "page",
346
+ "type": "text",
347
+ "primaryKey": false,
348
+ "notNull": false,
349
+ "autoincrement": false
350
+ },
351
+ "meta": {
352
+ "name": "meta",
353
+ "type": "text",
354
+ "primaryKey": false,
355
+ "notNull": false,
356
+ "autoincrement": false
357
+ },
358
+ "status": {
359
+ "name": "status",
360
+ "type": "text",
361
+ "primaryKey": false,
362
+ "notNull": true,
363
+ "autoincrement": false,
364
+ "default": "'new'"
365
+ },
366
+ "created_at": {
367
+ "name": "created_at",
368
+ "type": "integer",
369
+ "primaryKey": false,
370
+ "notNull": true,
371
+ "autoincrement": false,
372
+ "default": "(cast((julianday('now') - 2440587.5) * 86400000 as integer))"
373
+ }
374
+ },
375
+ "indexes": {},
376
+ "foreignKeys": {},
377
+ "compositePrimaryKeys": {},
378
+ "uniqueConstraints": {},
379
+ "checkConstraints": {}
380
+ },
381
+ "idempotency_keys": {
382
+ "name": "idempotency_keys",
383
+ "columns": {
384
+ "scope": {
385
+ "name": "scope",
386
+ "type": "text",
387
+ "primaryKey": false,
388
+ "notNull": true,
389
+ "autoincrement": false
390
+ },
391
+ "key": {
392
+ "name": "key",
393
+ "type": "text",
394
+ "primaryKey": false,
395
+ "notNull": true,
396
+ "autoincrement": false
397
+ },
398
+ "status": {
399
+ "name": "status",
400
+ "type": "text",
401
+ "primaryKey": false,
402
+ "notNull": true,
403
+ "autoincrement": false
404
+ },
405
+ "result": {
406
+ "name": "result",
407
+ "type": "text",
408
+ "primaryKey": false,
409
+ "notNull": false,
410
+ "autoincrement": false
411
+ },
412
+ "created_at": {
413
+ "name": "created_at",
414
+ "type": "integer",
415
+ "primaryKey": false,
416
+ "notNull": true,
417
+ "autoincrement": false,
418
+ "default": "(cast((julianday('now') - 2440587.5) * 86400000 as integer))"
419
+ },
420
+ "expires_at": {
421
+ "name": "expires_at",
422
+ "type": "integer",
423
+ "primaryKey": false,
424
+ "notNull": true,
425
+ "autoincrement": false
426
+ }
427
+ },
428
+ "indexes": {},
429
+ "foreignKeys": {},
430
+ "compositePrimaryKeys": {
431
+ "idempotency_keys_scope_key_pk": {
432
+ "columns": [
433
+ "scope",
434
+ "key"
435
+ ],
436
+ "name": "idempotency_keys_scope_key_pk"
437
+ }
438
+ },
439
+ "uniqueConstraints": {},
440
+ "checkConstraints": {}
441
+ },
442
+ "invites": {
443
+ "name": "invites",
444
+ "columns": {
445
+ "id": {
446
+ "name": "id",
447
+ "type": "text",
448
+ "primaryKey": true,
449
+ "notNull": true,
450
+ "autoincrement": false
451
+ },
452
+ "token_hash": {
453
+ "name": "token_hash",
454
+ "type": "text",
455
+ "primaryKey": false,
456
+ "notNull": true,
457
+ "autoincrement": false
458
+ },
459
+ "email": {
460
+ "name": "email",
461
+ "type": "text",
462
+ "primaryKey": false,
463
+ "notNull": false,
464
+ "autoincrement": false
465
+ },
466
+ "invited_by": {
467
+ "name": "invited_by",
468
+ "type": "text",
469
+ "primaryKey": false,
470
+ "notNull": true,
471
+ "autoincrement": false
472
+ },
473
+ "scope": {
474
+ "name": "scope",
475
+ "type": "text",
476
+ "primaryKey": false,
477
+ "notNull": false,
478
+ "autoincrement": false
479
+ },
480
+ "role": {
481
+ "name": "role",
482
+ "type": "text",
483
+ "primaryKey": false,
484
+ "notNull": false,
485
+ "autoincrement": false
486
+ },
487
+ "created_at": {
488
+ "name": "created_at",
489
+ "type": "integer",
490
+ "primaryKey": false,
491
+ "notNull": true,
492
+ "autoincrement": false,
493
+ "default": "(cast((julianday('now') - 2440587.5) * 86400000 as integer))"
494
+ },
495
+ "expires_at": {
496
+ "name": "expires_at",
497
+ "type": "integer",
498
+ "primaryKey": false,
499
+ "notNull": true,
500
+ "autoincrement": false
501
+ },
502
+ "accepted_at": {
503
+ "name": "accepted_at",
504
+ "type": "integer",
505
+ "primaryKey": false,
506
+ "notNull": false,
507
+ "autoincrement": false
508
+ },
509
+ "accepted_by": {
510
+ "name": "accepted_by",
511
+ "type": "text",
512
+ "primaryKey": false,
513
+ "notNull": false,
514
+ "autoincrement": false
515
+ },
516
+ "revoked_at": {
517
+ "name": "revoked_at",
518
+ "type": "integer",
519
+ "primaryKey": false,
520
+ "notNull": false,
521
+ "autoincrement": false
522
+ }
523
+ },
524
+ "indexes": {
525
+ "invites_token": {
526
+ "name": "invites_token",
527
+ "columns": [
528
+ "token_hash"
529
+ ],
530
+ "isUnique": true
531
+ }
532
+ },
533
+ "foreignKeys": {},
534
+ "compositePrimaryKeys": {},
535
+ "uniqueConstraints": {},
536
+ "checkConstraints": {}
537
+ },
538
+ "kv": {
539
+ "name": "kv",
540
+ "columns": {
541
+ "key": {
542
+ "name": "key",
543
+ "type": "text",
544
+ "primaryKey": true,
545
+ "notNull": true,
546
+ "autoincrement": false
547
+ },
548
+ "value": {
549
+ "name": "value",
550
+ "type": "text",
551
+ "primaryKey": false,
552
+ "notNull": true,
553
+ "autoincrement": false
554
+ },
555
+ "expires_at": {
556
+ "name": "expires_at",
557
+ "type": "integer",
558
+ "primaryKey": false,
559
+ "notNull": false,
560
+ "autoincrement": false
561
+ }
562
+ },
563
+ "indexes": {},
564
+ "foreignKeys": {},
565
+ "compositePrimaryKeys": {},
566
+ "uniqueConstraints": {},
567
+ "checkConstraints": {}
568
+ },
569
+ "marks": {
570
+ "name": "marks",
571
+ "columns": {
572
+ "subject": {
573
+ "name": "subject",
574
+ "type": "text",
575
+ "primaryKey": false,
576
+ "notNull": true,
577
+ "autoincrement": false
578
+ },
579
+ "key": {
580
+ "name": "key",
581
+ "type": "text",
582
+ "primaryKey": false,
583
+ "notNull": true,
584
+ "autoincrement": false
585
+ },
586
+ "at": {
587
+ "name": "at",
588
+ "type": "integer",
589
+ "primaryKey": false,
590
+ "notNull": true,
591
+ "autoincrement": false,
592
+ "default": "(cast((julianday('now') - 2440587.5) * 86400000 as integer))"
593
+ }
594
+ },
595
+ "indexes": {},
596
+ "foreignKeys": {},
597
+ "compositePrimaryKeys": {
598
+ "marks_subject_key_pk": {
599
+ "columns": [
600
+ "subject",
601
+ "key"
602
+ ],
603
+ "name": "marks_subject_key_pk"
604
+ }
605
+ },
606
+ "uniqueConstraints": {},
607
+ "checkConstraints": {}
608
+ },
609
+ "referral_codes": {
610
+ "name": "referral_codes",
611
+ "columns": {
612
+ "subject": {
613
+ "name": "subject",
614
+ "type": "text",
615
+ "primaryKey": true,
616
+ "notNull": true,
617
+ "autoincrement": false
618
+ },
619
+ "code": {
620
+ "name": "code",
621
+ "type": "text",
622
+ "primaryKey": false,
623
+ "notNull": true,
624
+ "autoincrement": false
625
+ },
626
+ "created_at": {
627
+ "name": "created_at",
628
+ "type": "integer",
629
+ "primaryKey": false,
630
+ "notNull": true,
631
+ "autoincrement": false,
632
+ "default": "(cast((julianday('now') - 2440587.5) * 86400000 as integer))"
633
+ }
634
+ },
635
+ "indexes": {
636
+ "referral_codes_code": {
637
+ "name": "referral_codes_code",
638
+ "columns": [
639
+ "code"
640
+ ],
641
+ "isUnique": true
642
+ }
643
+ },
644
+ "foreignKeys": {},
645
+ "compositePrimaryKeys": {},
646
+ "uniqueConstraints": {},
647
+ "checkConstraints": {}
648
+ },
649
+ "referrals": {
650
+ "name": "referrals",
651
+ "columns": {
652
+ "referee": {
653
+ "name": "referee",
654
+ "type": "text",
655
+ "primaryKey": true,
656
+ "notNull": true,
657
+ "autoincrement": false
658
+ },
659
+ "referrer": {
660
+ "name": "referrer",
661
+ "type": "text",
662
+ "primaryKey": false,
663
+ "notNull": true,
664
+ "autoincrement": false
665
+ },
666
+ "code": {
667
+ "name": "code",
668
+ "type": "text",
669
+ "primaryKey": false,
670
+ "notNull": true,
671
+ "autoincrement": false
672
+ },
673
+ "created_at": {
674
+ "name": "created_at",
675
+ "type": "integer",
676
+ "primaryKey": false,
677
+ "notNull": true,
678
+ "autoincrement": false,
679
+ "default": "(cast((julianday('now') - 2440587.5) * 86400000 as integer))"
680
+ },
681
+ "converted_at": {
682
+ "name": "converted_at",
683
+ "type": "integer",
684
+ "primaryKey": false,
685
+ "notNull": false,
686
+ "autoincrement": false
687
+ },
688
+ "rewarded_at": {
689
+ "name": "rewarded_at",
690
+ "type": "integer",
691
+ "primaryKey": false,
692
+ "notNull": false,
693
+ "autoincrement": false
694
+ }
695
+ },
696
+ "indexes": {
697
+ "referrals_referrer": {
698
+ "name": "referrals_referrer",
699
+ "columns": [
700
+ "referrer"
701
+ ],
702
+ "isUnique": false
703
+ }
704
+ },
705
+ "foreignKeys": {},
706
+ "compositePrimaryKeys": {},
707
+ "uniqueConstraints": {},
708
+ "checkConstraints": {}
709
+ },
710
+ "subject_plans": {
711
+ "name": "subject_plans",
712
+ "columns": {
713
+ "id": {
714
+ "name": "id",
715
+ "type": "text",
716
+ "primaryKey": true,
717
+ "notNull": true,
718
+ "autoincrement": false
719
+ },
720
+ "subject": {
721
+ "name": "subject",
722
+ "type": "text",
723
+ "primaryKey": false,
724
+ "notNull": true,
725
+ "autoincrement": false
726
+ },
727
+ "plan": {
728
+ "name": "plan",
729
+ "type": "text",
730
+ "primaryKey": false,
731
+ "notNull": true,
732
+ "autoincrement": false
733
+ },
734
+ "status": {
735
+ "name": "status",
736
+ "type": "text",
737
+ "primaryKey": false,
738
+ "notNull": true,
739
+ "autoincrement": false
740
+ },
741
+ "gateway": {
742
+ "name": "gateway",
743
+ "type": "text",
744
+ "primaryKey": false,
745
+ "notNull": true,
746
+ "autoincrement": false
747
+ },
748
+ "subscription_id": {
749
+ "name": "subscription_id",
750
+ "type": "text",
751
+ "primaryKey": false,
752
+ "notNull": true,
753
+ "autoincrement": false
754
+ },
755
+ "current_period_end": {
756
+ "name": "current_period_end",
757
+ "type": "integer",
758
+ "primaryKey": false,
759
+ "notNull": false,
760
+ "autoincrement": false
761
+ },
762
+ "grace_until": {
763
+ "name": "grace_until",
764
+ "type": "integer",
765
+ "primaryKey": false,
766
+ "notNull": false,
767
+ "autoincrement": false
768
+ },
769
+ "event_at": {
770
+ "name": "event_at",
771
+ "type": "integer",
772
+ "primaryKey": false,
773
+ "notNull": true,
774
+ "autoincrement": false
775
+ },
776
+ "updated_at": {
777
+ "name": "updated_at",
778
+ "type": "integer",
779
+ "primaryKey": false,
780
+ "notNull": true,
781
+ "autoincrement": false,
782
+ "default": "(cast((julianday('now') - 2440587.5) * 86400000 as integer))"
783
+ }
784
+ },
785
+ "indexes": {
786
+ "subject_plans_subject": {
787
+ "name": "subject_plans_subject",
788
+ "columns": [
789
+ "subject"
790
+ ],
791
+ "isUnique": false
792
+ }
793
+ },
794
+ "foreignKeys": {},
795
+ "compositePrimaryKeys": {},
796
+ "uniqueConstraints": {},
797
+ "checkConstraints": {}
798
+ },
799
+ "usage_counters": {
800
+ "name": "usage_counters",
801
+ "columns": {
802
+ "subject": {
803
+ "name": "subject",
804
+ "type": "text",
805
+ "primaryKey": false,
806
+ "notNull": true,
807
+ "autoincrement": false
808
+ },
809
+ "key": {
810
+ "name": "key",
811
+ "type": "text",
812
+ "primaryKey": false,
813
+ "notNull": true,
814
+ "autoincrement": false
815
+ },
816
+ "period": {
817
+ "name": "period",
818
+ "type": "text",
819
+ "primaryKey": false,
820
+ "notNull": true,
821
+ "autoincrement": false
822
+ },
823
+ "used": {
824
+ "name": "used",
825
+ "type": "integer",
826
+ "primaryKey": false,
827
+ "notNull": true,
828
+ "autoincrement": false,
829
+ "default": 0
830
+ }
831
+ },
832
+ "indexes": {},
833
+ "foreignKeys": {},
834
+ "compositePrimaryKeys": {
835
+ "usage_counters_subject_key_period_pk": {
836
+ "columns": [
837
+ "subject",
838
+ "key",
839
+ "period"
840
+ ],
841
+ "name": "usage_counters_subject_key_period_pk"
842
+ }
843
+ },
844
+ "uniqueConstraints": {},
845
+ "checkConstraints": {}
846
+ },
847
+ "users": {
848
+ "name": "users",
849
+ "columns": {
850
+ "id": {
851
+ "name": "id",
852
+ "type": "text",
853
+ "primaryKey": true,
854
+ "notNull": true,
855
+ "autoincrement": false
856
+ },
857
+ "phone": {
858
+ "name": "phone",
859
+ "type": "text",
860
+ "primaryKey": false,
861
+ "notNull": true,
862
+ "autoincrement": false
863
+ },
864
+ "name": {
865
+ "name": "name",
866
+ "type": "text",
867
+ "primaryKey": false,
868
+ "notNull": false,
869
+ "autoincrement": false
870
+ },
871
+ "email": {
872
+ "name": "email",
873
+ "type": "text",
874
+ "primaryKey": false,
875
+ "notNull": false,
876
+ "autoincrement": false
877
+ },
878
+ "role": {
879
+ "name": "role",
880
+ "type": "text",
881
+ "primaryKey": false,
882
+ "notNull": true,
883
+ "autoincrement": false,
884
+ "default": "'user'"
885
+ },
886
+ "created_at": {
887
+ "name": "created_at",
888
+ "type": "integer",
889
+ "primaryKey": false,
890
+ "notNull": true,
891
+ "autoincrement": false,
892
+ "default": "(cast((julianday('now') - 2440587.5) * 86400000 as integer))"
893
+ },
894
+ "updated_at": {
895
+ "name": "updated_at",
896
+ "type": "integer",
897
+ "primaryKey": false,
898
+ "notNull": true,
899
+ "autoincrement": false,
900
+ "default": "(cast((julianday('now') - 2440587.5) * 86400000 as integer))"
901
+ }
902
+ },
903
+ "indexes": {
904
+ "users_phone_unique": {
905
+ "name": "users_phone_unique",
906
+ "columns": [
907
+ "phone"
908
+ ],
909
+ "isUnique": true
910
+ }
911
+ },
912
+ "foreignKeys": {},
913
+ "compositePrimaryKeys": {},
914
+ "uniqueConstraints": {},
915
+ "checkConstraints": {}
916
+ },
917
+ "waitlist": {
918
+ "name": "waitlist",
919
+ "columns": {
920
+ "email": {
921
+ "name": "email",
922
+ "type": "text",
923
+ "primaryKey": true,
924
+ "notNull": true,
925
+ "autoincrement": false
926
+ },
927
+ "source": {
928
+ "name": "source",
929
+ "type": "text",
930
+ "primaryKey": false,
931
+ "notNull": false,
932
+ "autoincrement": false
933
+ },
934
+ "referral_code": {
935
+ "name": "referral_code",
936
+ "type": "text",
937
+ "primaryKey": false,
938
+ "notNull": false,
939
+ "autoincrement": false
940
+ },
941
+ "created_at": {
942
+ "name": "created_at",
943
+ "type": "integer",
944
+ "primaryKey": false,
945
+ "notNull": true,
946
+ "autoincrement": false,
947
+ "default": "(cast((julianday('now') - 2440587.5) * 86400000 as integer))"
948
+ },
949
+ "invited_at": {
950
+ "name": "invited_at",
951
+ "type": "integer",
952
+ "primaryKey": false,
953
+ "notNull": false,
954
+ "autoincrement": false
955
+ }
956
+ },
957
+ "indexes": {},
958
+ "foreignKeys": {},
959
+ "compositePrimaryKeys": {},
960
+ "uniqueConstraints": {},
961
+ "checkConstraints": {}
962
+ }
963
+ },
964
+ "views": {},
965
+ "enums": {},
966
+ "_meta": {
967
+ "schemas": {},
968
+ "tables": {},
969
+ "columns": {}
970
+ },
971
+ "internal": {
972
+ "indexes": {}
973
+ }
974
+ }