@storyshelf/db-sqlite 0.6.2 → 0.8.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.
Files changed (93) hide show
  1. package/README.md +9 -9
  2. package/dist/better-sqlite3.d.mts +0 -2
  3. package/dist/better-sqlite3.mjs +8 -4
  4. package/dist/better-sqlite3.mjs.map +1 -1
  5. package/dist/bun-sqlite.d.mts +0 -2
  6. package/dist/bun-sqlite.mjs +8 -4
  7. package/dist/bun-sqlite.mjs.map +1 -1
  8. package/dist/d1.d.mts +0 -2
  9. package/dist/d1.mjs +6 -5
  10. package/dist/d1.mjs.map +1 -1
  11. package/dist/ddl.d.mts +10 -4
  12. package/dist/ddl.mjs +247 -16
  13. package/dist/ddl.mjs.map +1 -1
  14. package/dist/drizzle-factory.d.mts +0 -2
  15. package/dist/drizzle-factory.mjs +6 -3
  16. package/dist/drizzle-factory.mjs.map +1 -1
  17. package/dist/ensure-db-dir.mjs +2 -4
  18. package/dist/ensure-db-dir.mjs.map +1 -1
  19. package/dist/index.d.mts +4 -3
  20. package/dist/index.mjs +9 -5
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/schema/baseline.d.mts +87 -13
  23. package/dist/schema/baseline.mjs +6 -3
  24. package/dist/schema/baseline.mjs.map +1 -1
  25. package/dist/schema/{status-config.d.mts → build-component.d.mts} +41 -36
  26. package/dist/schema/build-component.mjs +21 -0
  27. package/dist/schema/build-component.mjs.map +1 -0
  28. package/dist/schema/build-review.d.mts +127 -0
  29. package/dist/schema/build-review.mjs +19 -0
  30. package/dist/schema/build-review.mjs.map +1 -0
  31. package/dist/schema/build.d.mts +81 -25
  32. package/dist/schema/build.mjs +5 -2
  33. package/dist/schema/build.mjs.map +1 -1
  34. package/dist/schema/capture-attempt.d.mts +25 -27
  35. package/dist/schema/capture-attempt.mjs +1 -2
  36. package/dist/schema/capture-job.d.mts +357 -0
  37. package/dist/schema/capture-job.mjs +37 -0
  38. package/dist/schema/capture-job.mjs.map +1 -0
  39. package/dist/schema/capture-shard.d.mts +279 -0
  40. package/dist/schema/capture-shard.mjs +27 -0
  41. package/dist/schema/capture-shard.mjs.map +1 -0
  42. package/dist/schema/comment.d.mts +31 -13
  43. package/dist/schema/comment.mjs +4 -4
  44. package/dist/schema/comment.mjs.map +1 -1
  45. package/dist/schema/connection.d.mts +189 -0
  46. package/dist/schema/connection.mjs +25 -0
  47. package/dist/schema/connection.mjs.map +1 -0
  48. package/dist/schema/content-refs.d.mts +0 -2
  49. package/dist/schema/content-refs.mjs +1 -2
  50. package/dist/schema/design.d.mts +647 -0
  51. package/dist/schema/design.mjs +48 -0
  52. package/dist/schema/design.mjs.map +1 -0
  53. package/dist/schema/insight.d.mts +687 -0
  54. package/dist/schema/insight.mjs +52 -0
  55. package/dist/schema/insight.mjs.map +1 -0
  56. package/dist/schema/label.d.mts +15 -17
  57. package/dist/schema/label.mjs +1 -2
  58. package/dist/schema/member.d.mts +7 -9
  59. package/dist/schema/member.mjs +1 -2
  60. package/dist/schema/notification.d.mts +58 -20
  61. package/dist/schema/notification.mjs +3 -2
  62. package/dist/schema/notification.mjs.map +1 -1
  63. package/dist/schema/project-group-mapping.d.mts +6 -8
  64. package/dist/schema/project-group-mapping.mjs +1 -2
  65. package/dist/schema/project.d.mts +132 -2
  66. package/dist/schema/project.mjs +9 -3
  67. package/dist/schema/project.mjs.map +1 -1
  68. package/dist/schema/site-setting.d.mts +107 -0
  69. package/dist/schema/site-setting.mjs +16 -0
  70. package/dist/schema/site-setting.mjs.map +1 -0
  71. package/dist/schema/snapshot.d.mts +203 -27
  72. package/dist/schema/snapshot.mjs +15 -3
  73. package/dist/schema/snapshot.mjs.map +1 -1
  74. package/dist/schema/token.d.mts +8 -10
  75. package/dist/schema/token.mjs +1 -2
  76. package/dist/schema/usage.d.mts +291 -0
  77. package/dist/schema/usage.mjs +29 -0
  78. package/dist/schema/usage.mjs.map +1 -0
  79. package/dist/schema/user-invite.d.mts +7 -9
  80. package/dist/schema/user-invite.mjs +1 -2
  81. package/dist/schema/user.d.mts +0 -2
  82. package/dist/schema/user.mjs +1 -2
  83. package/dist/schema/webhook.d.mts +8 -10
  84. package/dist/schema/webhook.mjs +1 -2
  85. package/dist/schema.d.mts +24 -5
  86. package/dist/schema.mjs +26 -6
  87. package/dist/schema.mjs.map +1 -1
  88. package/dist/turso.d.mts +2 -4
  89. package/dist/turso.mjs +20 -8
  90. package/dist/turso.mjs.map +1 -1
  91. package/package.json +7 -7
  92. package/dist/schema/status-config.mjs +0 -20
  93. package/dist/schema/status-config.mjs.map +0 -1
@@ -0,0 +1,291 @@
1
+ import __tsdown_shims_path from 'node:path';
2
+ import __tsdown_shims_url from 'node:url';
3
+ /** Narrow `project_links` table definition. */
4
+ declare const projectLinks: import("drizzle-orm/sqlite-core/table.js").SQLiteTableWithColumns<{
5
+ name: "project_links";
6
+ schema: undefined;
7
+ columns: {
8
+ id: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
9
+ name: "id";
10
+ tableName: "project_links";
11
+ dataType: "string";
12
+ columnType: "SQLiteText";
13
+ data: string;
14
+ driverParam: string;
15
+ notNull: true;
16
+ hasDefault: false;
17
+ isPrimaryKey: true;
18
+ isAutoincrement: false;
19
+ hasRuntimeDefault: false;
20
+ enumValues: [string, ...string[]];
21
+ baseColumn: never;
22
+ identity: undefined;
23
+ generated: undefined;
24
+ }, {}, {
25
+ length: number | undefined;
26
+ }>;
27
+ downstreamId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
28
+ name: "downstream_id";
29
+ tableName: "project_links";
30
+ dataType: "string";
31
+ columnType: "SQLiteText";
32
+ data: string;
33
+ driverParam: string;
34
+ notNull: true;
35
+ hasDefault: false;
36
+ isPrimaryKey: false;
37
+ isAutoincrement: false;
38
+ hasRuntimeDefault: false;
39
+ enumValues: [string, ...string[]];
40
+ baseColumn: never;
41
+ identity: undefined;
42
+ generated: undefined;
43
+ }, {}, {
44
+ length: number | undefined;
45
+ }>;
46
+ upstreamId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
47
+ name: "upstream_id";
48
+ tableName: "project_links";
49
+ dataType: "string";
50
+ columnType: "SQLiteText";
51
+ data: string;
52
+ driverParam: string;
53
+ notNull: true;
54
+ hasDefault: false;
55
+ isPrimaryKey: false;
56
+ isAutoincrement: false;
57
+ hasRuntimeDefault: false;
58
+ enumValues: [string, ...string[]];
59
+ baseColumn: never;
60
+ identity: undefined;
61
+ generated: undefined;
62
+ }, {}, {
63
+ length: number | undefined;
64
+ }>;
65
+ packageName: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
66
+ name: "package_name";
67
+ tableName: "project_links";
68
+ dataType: "string";
69
+ columnType: "SQLiteText";
70
+ data: string;
71
+ driverParam: string;
72
+ notNull: true;
73
+ hasDefault: false;
74
+ isPrimaryKey: false;
75
+ isAutoincrement: false;
76
+ hasRuntimeDefault: false;
77
+ enumValues: [string, ...string[]];
78
+ baseColumn: never;
79
+ identity: undefined;
80
+ generated: undefined;
81
+ }, {}, {
82
+ length: number | undefined;
83
+ }>;
84
+ createdAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
85
+ name: "created_at";
86
+ tableName: "project_links";
87
+ dataType: "string";
88
+ columnType: "SQLiteText";
89
+ data: string;
90
+ driverParam: string;
91
+ notNull: true;
92
+ hasDefault: false;
93
+ isPrimaryKey: false;
94
+ isAutoincrement: false;
95
+ hasRuntimeDefault: false;
96
+ enumValues: [string, ...string[]];
97
+ baseColumn: never;
98
+ identity: undefined;
99
+ generated: undefined;
100
+ }, {}, {
101
+ length: number | undefined;
102
+ }>;
103
+ };
104
+ dialect: 'sqlite';
105
+ }>;
106
+ /** Narrow `build_package_usage` table definition. */
107
+ declare const buildPackageUsage: import("drizzle-orm/sqlite-core/table.js").SQLiteTableWithColumns<{
108
+ name: "build_package_usage";
109
+ schema: undefined;
110
+ columns: {
111
+ id: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
112
+ name: "id";
113
+ tableName: "build_package_usage";
114
+ dataType: "string";
115
+ columnType: "SQLiteText";
116
+ data: string;
117
+ driverParam: string;
118
+ notNull: true;
119
+ hasDefault: false;
120
+ isPrimaryKey: true;
121
+ isAutoincrement: false;
122
+ hasRuntimeDefault: false;
123
+ enumValues: [string, ...string[]];
124
+ baseColumn: never;
125
+ identity: undefined;
126
+ generated: undefined;
127
+ }, {}, {
128
+ length: number | undefined;
129
+ }>;
130
+ projectId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
131
+ name: "project_id";
132
+ tableName: "build_package_usage";
133
+ dataType: "string";
134
+ columnType: "SQLiteText";
135
+ data: string;
136
+ driverParam: string;
137
+ notNull: true;
138
+ hasDefault: false;
139
+ isPrimaryKey: false;
140
+ isAutoincrement: false;
141
+ hasRuntimeDefault: false;
142
+ enumValues: [string, ...string[]];
143
+ baseColumn: never;
144
+ identity: undefined;
145
+ generated: undefined;
146
+ }, {}, {
147
+ length: number | undefined;
148
+ }>;
149
+ buildId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
150
+ name: "build_id";
151
+ tableName: "build_package_usage";
152
+ dataType: "string";
153
+ columnType: "SQLiteText";
154
+ data: string;
155
+ driverParam: string;
156
+ notNull: true;
157
+ hasDefault: false;
158
+ isPrimaryKey: false;
159
+ isAutoincrement: false;
160
+ hasRuntimeDefault: false;
161
+ enumValues: [string, ...string[]];
162
+ baseColumn: never;
163
+ identity: undefined;
164
+ generated: undefined;
165
+ }, {}, {
166
+ length: number | undefined;
167
+ }>;
168
+ storyImportPath: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
169
+ name: "story_import_path";
170
+ tableName: "build_package_usage";
171
+ dataType: "string";
172
+ columnType: "SQLiteText";
173
+ data: string;
174
+ driverParam: string;
175
+ notNull: true;
176
+ hasDefault: false;
177
+ isPrimaryKey: false;
178
+ isAutoincrement: false;
179
+ hasRuntimeDefault: false;
180
+ enumValues: [string, ...string[]];
181
+ baseColumn: never;
182
+ identity: undefined;
183
+ generated: undefined;
184
+ }, {}, {
185
+ length: number | undefined;
186
+ }>;
187
+ packageName: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
188
+ name: "package_name";
189
+ tableName: "build_package_usage";
190
+ dataType: "string";
191
+ columnType: "SQLiteText";
192
+ data: string;
193
+ driverParam: string;
194
+ notNull: true;
195
+ hasDefault: false;
196
+ isPrimaryKey: false;
197
+ isAutoincrement: false;
198
+ hasRuntimeDefault: false;
199
+ enumValues: [string, ...string[]];
200
+ baseColumn: never;
201
+ identity: undefined;
202
+ generated: undefined;
203
+ }, {}, {
204
+ length: number | undefined;
205
+ }>;
206
+ modulePath: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
207
+ name: "module_path";
208
+ tableName: "build_package_usage";
209
+ dataType: "string";
210
+ columnType: "SQLiteText";
211
+ data: string;
212
+ driverParam: string;
213
+ notNull: true;
214
+ hasDefault: false;
215
+ isPrimaryKey: false;
216
+ isAutoincrement: false;
217
+ hasRuntimeDefault: false;
218
+ enumValues: [string, ...string[]];
219
+ baseColumn: never;
220
+ identity: undefined;
221
+ generated: undefined;
222
+ }, {}, {
223
+ length: number | undefined;
224
+ }>;
225
+ version: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
226
+ name: "version";
227
+ tableName: "build_package_usage";
228
+ dataType: "string";
229
+ columnType: "SQLiteText";
230
+ data: string;
231
+ driverParam: string;
232
+ notNull: false;
233
+ hasDefault: false;
234
+ isPrimaryKey: false;
235
+ isAutoincrement: false;
236
+ hasRuntimeDefault: false;
237
+ enumValues: [string, ...string[]];
238
+ baseColumn: never;
239
+ identity: undefined;
240
+ generated: undefined;
241
+ }, {}, {
242
+ length: number | undefined;
243
+ }>;
244
+ createdAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
245
+ name: "created_at";
246
+ tableName: "build_package_usage";
247
+ dataType: "string";
248
+ columnType: "SQLiteText";
249
+ data: string;
250
+ driverParam: string;
251
+ notNull: true;
252
+ hasDefault: false;
253
+ isPrimaryKey: false;
254
+ isAutoincrement: false;
255
+ hasRuntimeDefault: false;
256
+ enumValues: [string, ...string[]];
257
+ baseColumn: never;
258
+ identity: undefined;
259
+ generated: undefined;
260
+ }, {}, {
261
+ length: number | undefined;
262
+ }>;
263
+ };
264
+ dialect: 'sqlite';
265
+ }>;
266
+ /** A link from a downstream project to the upstream project that publishes a package it consumes. */
267
+ interface ProjectLink {
268
+ id: string;
269
+ /** Project that consumes the package (the app). */
270
+ downstreamId: string;
271
+ /** Project whose Storybook publishes the package's components (the design system). */
272
+ upstreamId: string;
273
+ packageName: string;
274
+ createdAt: string;
275
+ }
276
+ /** A dependency package a story file reaches in a build. */
277
+ interface BuildPackageUsage {
278
+ id: string;
279
+ projectId: string;
280
+ buildId: string;
281
+ /** Story import path, joined to `snapshots.storyImportPath` at read time. */
282
+ storyImportPath: string;
283
+ packageName: string;
284
+ /** First module inside the package the story reaches. */
285
+ modulePath: string;
286
+ /** Installed package version at upload time; null when it could not be resolved. */
287
+ version: string | null;
288
+ createdAt: string;
289
+ }
290
+ export { BuildPackageUsage, ProjectLink, buildPackageUsage, projectLinks };
291
+ //# sourceMappingURL=usage.d.mts.map
@@ -0,0 +1,29 @@
1
+ import "node:path";
2
+ import "node:url";
3
+ import.meta.url;
4
+ import { projects } from "./project.mjs";
5
+ import { builds } from "./build.mjs";
6
+ import { index, sqliteTable, text, uniqueIndex } from "drizzle-orm/sqlite-core";
7
+ // src/schema/usage.ts
8
+ /** Narrow `project_links` table definition. */
9
+ const projectLinks = sqliteTable("project_links", {
10
+ id: text("id").primaryKey(),
11
+ downstreamId: text("downstream_id").notNull().references(() => projects.id, { onDelete: "cascade" }),
12
+ upstreamId: text("upstream_id").notNull().references(() => projects.id, { onDelete: "cascade" }),
13
+ packageName: text("package_name").notNull(),
14
+ createdAt: text("created_at").notNull()
15
+ }, (t) => [uniqueIndex("project_links_downstream_package_idx").on(t.downstreamId, t.packageName)]);
16
+ /** Narrow `build_package_usage` table definition. */
17
+ const buildPackageUsage = sqliteTable("build_package_usage", {
18
+ id: text("id").primaryKey(),
19
+ projectId: text("project_id").notNull().references(() => projects.id, { onDelete: "cascade" }),
20
+ buildId: text("build_id").notNull().references(() => builds.id, { onDelete: "cascade" }),
21
+ storyImportPath: text("story_import_path").notNull(),
22
+ packageName: text("package_name").notNull(),
23
+ modulePath: text("module_path").notNull(),
24
+ version: text("version"),
25
+ createdAt: text("created_at").notNull()
26
+ }, (t) => [index("build_package_usage_build_id_idx").on(t.buildId)]);
27
+ export { buildPackageUsage, projectLinks };
28
+
29
+ //# sourceMappingURL=usage.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usage.mjs","names":[],"sources":["../../src/schema/usage.ts"],"sourcesContent":["import { sqliteTable, text, uniqueIndex, index } from \"drizzle-orm/sqlite-core\";\nimport { builds } from \"./build.ts\";\nimport { projects } from \"./project.ts\";\n\n/** Narrow `project_links` table definition. */\nexport const projectLinks = sqliteTable(\n \"project_links\",\n {\n id: text(\"id\").primaryKey(),\n downstreamId: text(\"downstream_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n upstreamId: text(\"upstream_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n packageName: text(\"package_name\").notNull(),\n createdAt: text(\"created_at\").notNull(),\n },\n (t) => [uniqueIndex(\"project_links_downstream_package_idx\").on(t.downstreamId, t.packageName)],\n);\n\n/** Narrow `build_package_usage` table definition. */\nexport const buildPackageUsage = sqliteTable(\n \"build_package_usage\",\n {\n id: text(\"id\").primaryKey(),\n projectId: text(\"project_id\")\n .notNull()\n .references(() => projects.id, { onDelete: \"cascade\" }),\n buildId: text(\"build_id\")\n .notNull()\n .references(() => builds.id, { onDelete: \"cascade\" }),\n storyImportPath: text(\"story_import_path\").notNull(),\n packageName: text(\"package_name\").notNull(),\n modulePath: text(\"module_path\").notNull(),\n version: text(\"version\"),\n createdAt: text(\"created_at\").notNull(),\n },\n (t) => [index(\"build_package_usage_build_id_idx\").on(t.buildId)],\n);\n\n/** A link from a downstream project to the upstream project that publishes a package it consumes. */\nexport interface ProjectLink {\n id: string;\n /** Project that consumes the package (the app). */\n downstreamId: string;\n /** Project whose Storybook publishes the package's components (the design system). */\n upstreamId: string;\n packageName: string;\n createdAt: string;\n}\n\n/** A dependency package a story file reaches in a build. */\nexport interface BuildPackageUsage {\n id: string;\n projectId: string;\n buildId: string;\n /** Story import path, joined to `snapshots.storyImportPath` at read time. */\n storyImportPath: string;\n packageName: string;\n /** First module inside the package the story reaches. */\n modulePath: string;\n /** Installed package version at upload time; null when it could not be resolved. */\n version: string | null;\n createdAt: string;\n}\n"],"mappings":";;;;;;;;AAKA,MAAa,eAAe,YAC1B,iBACA;CACE,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,cAAc,KAAK,eAAe,CAAC,CAChC,QAAQ,CAAC,CACT,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACxD,YAAY,KAAK,aAAa,CAAC,CAC5B,QAAQ,CAAC,CACT,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACxD,aAAa,KAAK,cAAc,CAAC,CAAC,QAAQ;CAC1C,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;AACxC,IACC,MAAM,CAAC,YAAY,sCAAsC,CAAC,CAAC,GAAG,EAAE,cAAc,EAAE,WAAW,CAAC,CAC/F;;AAGA,MAAa,oBAAoB,YAC/B,uBACA;CACE,IAAI,KAAK,IAAI,CAAC,CAAC,WAAW;CAC1B,WAAW,KAAK,YAAY,CAAC,CAC1B,QAAQ,CAAC,CACT,iBAAiB,SAAS,IAAI,EAAE,UAAU,UAAU,CAAC;CACxD,SAAS,KAAK,UAAU,CAAC,CACtB,QAAQ,CAAC,CACT,iBAAiB,OAAO,IAAI,EAAE,UAAU,UAAU,CAAC;CACtD,iBAAiB,KAAK,mBAAmB,CAAC,CAAC,QAAQ;CACnD,aAAa,KAAK,cAAc,CAAC,CAAC,QAAQ;CAC1C,YAAY,KAAK,aAAa,CAAC,CAAC,QAAQ;CACxC,SAAS,KAAK,SAAS;CACvB,WAAW,KAAK,YAAY,CAAC,CAAC,QAAQ;AACxC,IACC,MAAM,CAAC,MAAM,kCAAkC,CAAC,CAAC,GAAG,EAAE,OAAO,CAAC,CACjE"}
@@ -1,12 +1,11 @@
1
1
  import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
- //#region src/schema/user-invite.d.ts
4
3
  /** Invite token for local accounts (one-time, hashed at rest). */
5
- declare const userInviteTokens: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
4
+ declare const userInviteTokens: import("drizzle-orm/sqlite-core/table.js").SQLiteTableWithColumns<{
6
5
  name: "user_invite_tokens";
7
6
  schema: undefined;
8
7
  columns: {
9
- id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
8
+ id: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
10
9
  name: "id";
11
10
  tableName: "user_invite_tokens";
12
11
  dataType: "string";
@@ -25,7 +24,7 @@ declare const userInviteTokens: import("drizzle-orm/sqlite-core").SQLiteTableWit
25
24
  }, {}, {
26
25
  length: number | undefined;
27
26
  }>;
28
- userId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
27
+ userId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
29
28
  name: "user_id";
30
29
  tableName: "user_invite_tokens";
31
30
  dataType: "string";
@@ -44,7 +43,7 @@ declare const userInviteTokens: import("drizzle-orm/sqlite-core").SQLiteTableWit
44
43
  }, {}, {
45
44
  length: number | undefined;
46
45
  }>;
47
- tokenHash: import("drizzle-orm/sqlite-core").SQLiteColumn<{
46
+ tokenHash: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
48
47
  name: "token_hash";
49
48
  tableName: "user_invite_tokens";
50
49
  dataType: "string";
@@ -63,7 +62,7 @@ declare const userInviteTokens: import("drizzle-orm/sqlite-core").SQLiteTableWit
63
62
  }, {}, {
64
63
  length: number | undefined;
65
64
  }>;
66
- expiresAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
65
+ expiresAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
67
66
  name: "expires_at";
68
67
  tableName: "user_invite_tokens";
69
68
  dataType: "string";
@@ -82,7 +81,7 @@ declare const userInviteTokens: import("drizzle-orm/sqlite-core").SQLiteTableWit
82
81
  }, {}, {
83
82
  length: number | undefined;
84
83
  }>;
85
- usedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
84
+ usedAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
86
85
  name: "used_at";
87
86
  tableName: "user_invite_tokens";
88
87
  dataType: "string";
@@ -101,7 +100,7 @@ declare const userInviteTokens: import("drizzle-orm/sqlite-core").SQLiteTableWit
101
100
  }, {}, {
102
101
  length: number | undefined;
103
102
  }>;
104
- createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
103
+ createdAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
105
104
  name: "created_at";
106
105
  tableName: "user_invite_tokens";
107
106
  dataType: "string";
@@ -132,6 +131,5 @@ interface UserInviteToken {
132
131
  usedAt: string | null;
133
132
  createdAt: string;
134
133
  }
135
- //#endregion
136
134
  export { UserInviteToken, userInviteTokens };
137
135
  //# sourceMappingURL=user-invite.d.mts.map
@@ -3,7 +3,7 @@ import "node:url";
3
3
  import.meta.url;
4
4
  import { users } from "./user.mjs";
5
5
  import { sqliteTable, text } from "drizzle-orm/sqlite-core";
6
- //#region src/schema/user-invite.ts
6
+ // src/schema/user-invite.ts
7
7
  /** Invite token for local accounts (one-time, hashed at rest). */
8
8
  const userInviteTokens = sqliteTable("user_invite_tokens", {
9
9
  id: text("id").primaryKey(),
@@ -13,7 +13,6 @@ const userInviteTokens = sqliteTable("user_invite_tokens", {
13
13
  usedAt: text("used_at"),
14
14
  createdAt: text("created_at").notNull()
15
15
  });
16
- //#endregion
17
16
  export { userInviteTokens };
18
17
 
19
18
  //# sourceMappingURL=user-invite.mjs.map
@@ -1,7 +1,6 @@
1
1
  import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
3
  import { SiteRole } from "@storyshelf/core/types";
4
- //#region src/schema/user.d.ts
5
4
  /** Narrow `users` table definition. */
6
5
  declare const users: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
7
6
  name: "users";
@@ -233,6 +232,5 @@ interface User {
233
232
  authProvider: "local" | "oidc" | "shared";
234
233
  disabled: boolean;
235
234
  }
236
- //#endregion
237
235
  export { User, users };
238
236
  //# sourceMappingURL=user.d.mts.map
@@ -2,7 +2,7 @@ import "node:path";
2
2
  import "node:url";
3
3
  import.meta.url;
4
4
  import { integer, sqliteTable, text } from "drizzle-orm/sqlite-core";
5
- //#region src/schema/user.ts
5
+ // src/schema/user.ts
6
6
  /** Narrow `users` table definition. */
7
7
  const users = sqliteTable("users", {
8
8
  id: text("id").primaryKey(),
@@ -17,7 +17,6 @@ const users = sqliteTable("users", {
17
17
  authProvider: text("auth_provider").$type().notNull().default("oidc"),
18
18
  disabled: integer("disabled", { mode: "boolean" }).notNull().default(false)
19
19
  });
20
- //#endregion
21
20
  export { users };
22
21
 
23
22
  //# sourceMappingURL=user.mjs.map
@@ -1,12 +1,11 @@
1
1
  import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
- //#region src/schema/webhook.d.ts
4
3
  /** Narrow `webhooks` table definition. */
5
- declare const webhooks: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns<{
4
+ declare const webhooks: import("drizzle-orm/sqlite-core/table.js").SQLiteTableWithColumns<{
6
5
  name: "webhooks";
7
6
  schema: undefined;
8
7
  columns: {
9
- id: import("drizzle-orm/sqlite-core").SQLiteColumn<{
8
+ id: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
10
9
  name: "id";
11
10
  tableName: "webhooks";
12
11
  dataType: "string";
@@ -25,7 +24,7 @@ declare const webhooks: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns
25
24
  }, {}, {
26
25
  length: number | undefined;
27
26
  }>;
28
- projectId: import("drizzle-orm/sqlite-core").SQLiteColumn<{
27
+ projectId: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
29
28
  name: "project_id";
30
29
  tableName: "webhooks";
31
30
  dataType: "string";
@@ -44,7 +43,7 @@ declare const webhooks: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns
44
43
  }, {}, {
45
44
  length: number | undefined;
46
45
  }>;
47
- url: import("drizzle-orm/sqlite-core").SQLiteColumn<{
46
+ url: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
48
47
  name: "url";
49
48
  tableName: "webhooks";
50
49
  dataType: "string";
@@ -63,7 +62,7 @@ declare const webhooks: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns
63
62
  }, {}, {
64
63
  length: number | undefined;
65
64
  }>;
66
- secretEncrypted: import("drizzle-orm/sqlite-core").SQLiteColumn<{
65
+ secretEncrypted: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
67
66
  name: "secret_encrypted";
68
67
  tableName: "webhooks";
69
68
  dataType: "string";
@@ -82,7 +81,7 @@ declare const webhooks: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns
82
81
  }, {}, {
83
82
  length: number | undefined;
84
83
  }>;
85
- events: import("drizzle-orm/sqlite-core").SQLiteColumn<{
84
+ events: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
86
85
  name: "events";
87
86
  tableName: "webhooks";
88
87
  dataType: "string";
@@ -101,7 +100,7 @@ declare const webhooks: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns
101
100
  }, {}, {
102
101
  length: number | undefined;
103
102
  }>;
104
- createdAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
103
+ createdAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
105
104
  name: "created_at";
106
105
  tableName: "webhooks";
107
106
  dataType: "string";
@@ -120,7 +119,7 @@ declare const webhooks: import("drizzle-orm/sqlite-core").SQLiteTableWithColumns
120
119
  }, {}, {
121
120
  length: number | undefined;
122
121
  }>;
123
- updatedAt: import("drizzle-orm/sqlite-core").SQLiteColumn<{
122
+ updatedAt: import("drizzle-orm/sqlite-core/index.js").SQLiteColumn<{
124
123
  name: "updated_at";
125
124
  tableName: "webhooks";
126
125
  dataType: "string";
@@ -152,6 +151,5 @@ interface Webhook {
152
151
  createdAt: string;
153
152
  updatedAt: string;
154
153
  }
155
- //#endregion
156
154
  export { Webhook, webhooks };
157
155
  //# sourceMappingURL=webhook.d.mts.map
@@ -3,7 +3,7 @@ import "node:url";
3
3
  import.meta.url;
4
4
  import { projects } from "./project.mjs";
5
5
  import { sqliteTable, text } from "drizzle-orm/sqlite-core";
6
- //#region src/schema/webhook.ts
6
+ // src/schema/webhook.ts
7
7
  /** Narrow `webhooks` table definition. */
8
8
  const webhooks = sqliteTable("webhooks", {
9
9
  id: text("id").primaryKey(),
@@ -14,7 +14,6 @@ const webhooks = sqliteTable("webhooks", {
14
14
  createdAt: text("created_at").notNull(),
15
15
  updatedAt: text("updated_at").notNull()
16
16
  });
17
- //#endregion
18
17
  export { webhooks };
19
18
 
20
19
  //# sourceMappingURL=webhook.mjs.map
package/dist/schema.d.mts CHANGED
@@ -2,36 +2,56 @@ import __tsdown_shims_path from 'node:path';
2
2
  import __tsdown_shims_url from 'node:url';
3
3
  import { Build, builds } from "./schema/build.mjs";
4
4
  import { CaptureAttempt, CaptureLog, captureAttempts, captureLogs } from "./schema/capture-attempt.mjs";
5
+ import { captureJobs } from "./schema/capture-job.mjs";
6
+ import { buildComponents } from "./schema/build-component.mjs";
7
+ import { buildReviews } from "./schema/build-review.mjs";
8
+ import { siteSettings } from "./schema/site-setting.mjs";
9
+ import { captureShards } from "./schema/capture-shard.mjs";
5
10
  import { baselines } from "./schema/baseline.mjs";
6
11
  import { Comment, comments } from "./schema/comment.mjs";
7
12
  import { BuildLabel, LabelType, buildLabels, labelTypes } from "./schema/label.mjs";
8
13
  import { ProjectMember, projectMembers } from "./schema/member.mjs";
14
+ import { BuildPackageUsage, ProjectLink, buildPackageUsage, projectLinks } from "./schema/usage.mjs";
15
+ import { UserConnection, userConnections } from "./schema/connection.mjs";
16
+ import { DesignCredential, DesignLink, DesignNode, designCredentials, designLinks, designNodes } from "./schema/design.mjs";
17
+ import { AiBudgetAlert, AiUsage, Insight, aiBudgetAlerts, aiUsage, insights } from "./schema/insight.mjs";
9
18
  import { NotificationChannel, NotificationSubscription, notificationChannels, notificationSubscriptions } from "./schema/notification.mjs";
10
19
  import { ProjectGroupMapping, projectGroupMappings } from "./schema/project-group-mapping.mjs";
11
20
  import { Project, StorybookMeta, projects } from "./schema/project.mjs";
12
21
  import { Snapshot, snapshots } from "./schema/snapshot.mjs";
13
- import { ProjectStatusConfig, projectStatusConfigs } from "./schema/status-config.mjs";
14
22
  import { Token, tokens } from "./schema/token.mjs";
15
23
  import { User, users } from "./schema/user.mjs";
16
24
  import { UserInviteToken, userInviteTokens } from "./schema/user-invite.mjs";
17
25
  import { Webhook, webhooks } from "./schema/webhook.mjs";
18
26
  import { ContentRef, contentRefs } from "./schema/content-refs.mjs";
19
27
  import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
20
- //#region src/schema/index.d.ts
21
28
  /** Full Drizzle schema object passed to the database client. */
22
29
  declare const schema: {
23
30
  projects: AnySQLiteTable;
24
- projectStatusConfigs: AnySQLiteTable;
25
31
  builds: AnySQLiteTable;
26
32
  captureAttempts: AnySQLiteTable;
27
33
  captureLogs: AnySQLiteTable;
34
+ captureShards: AnySQLiteTable;
35
+ captureJobs: AnySQLiteTable;
36
+ buildComponents: AnySQLiteTable;
37
+ buildReviews: AnySQLiteTable;
38
+ siteSettings: AnySQLiteTable;
28
39
  snapshots: AnySQLiteTable;
29
40
  baselines: AnySQLiteTable;
30
41
  comments: AnySQLiteTable;
31
42
  labelTypes: AnySQLiteTable;
32
43
  buildLabels: AnySQLiteTable;
44
+ projectLinks: AnySQLiteTable;
45
+ designLinks: AnySQLiteTable;
46
+ designCredentials: AnySQLiteTable;
47
+ userConnections: AnySQLiteTable;
48
+ designNodes: AnySQLiteTable;
49
+ buildPackageUsage: AnySQLiteTable;
33
50
  tokens: AnySQLiteTable;
34
51
  webhooks: AnySQLiteTable;
52
+ insights: AnySQLiteTable;
53
+ aiUsage: AnySQLiteTable;
54
+ aiBudgetAlerts: AnySQLiteTable;
35
55
  notificationChannels: AnySQLiteTable;
36
56
  notificationSubscriptions: AnySQLiteTable;
37
57
  users: AnySQLiteTable;
@@ -42,6 +62,5 @@ declare const schema: {
42
62
  };
43
63
  /** The full database schema type. */
44
64
  type Schema = typeof schema;
45
- //#endregion
46
- export { type Build, type BuildLabel, type CaptureAttempt, type CaptureLog, type Comment, type ContentRef, type LabelType, type NotificationChannel, type NotificationSubscription, type Project, type ProjectGroupMapping, type ProjectMember, type ProjectStatusConfig, Schema, type Snapshot, type StorybookMeta, type Token, type User, type UserInviteToken, type Webhook, baselines, buildLabels, builds, captureAttempts, captureLogs, comments, contentRefs, labelTypes, notificationChannels, notificationSubscriptions, projectGroupMappings, projectMembers, projectStatusConfigs, projects, schema, snapshots, tokens, userInviteTokens, users, webhooks };
65
+ export { type AiBudgetAlert, type AiUsage, type Build, type BuildLabel, type BuildPackageUsage, type CaptureAttempt, type CaptureLog, type Comment, type ContentRef, type DesignCredential, type DesignLink, type DesignNode, type Insight, type LabelType, type NotificationChannel, type NotificationSubscription, type Project, type ProjectGroupMapping, type ProjectLink, type ProjectMember, Schema, type Snapshot, type StorybookMeta, type Token, type User, type UserConnection, type UserInviteToken, type Webhook, aiBudgetAlerts, aiUsage, baselines, buildComponents, buildLabels, buildPackageUsage, buildReviews, builds, captureAttempts, captureJobs, captureLogs, captureShards, comments, contentRefs, designCredentials, designLinks, designNodes, insights, labelTypes, notificationChannels, notificationSubscriptions, projectGroupMappings, projectLinks, projectMembers, projects, schema, siteSettings, snapshots, tokens, userConnections, userInviteTokens, users, webhooks };
47
66
  //# sourceMappingURL=schema.d.mts.map
package/dist/schema.mjs CHANGED
@@ -4,34 +4,55 @@ import.meta.url;
4
4
  import { projects } from "./schema/project.mjs";
5
5
  import { baselines } from "./schema/baseline.mjs";
6
6
  import { builds } from "./schema/build.mjs";
7
+ import { buildComponents } from "./schema/build-component.mjs";
8
+ import { users } from "./schema/user.mjs";
9
+ import { buildReviews } from "./schema/build-review.mjs";
7
10
  import { captureAttempts, captureLogs } from "./schema/capture-attempt.mjs";
11
+ import { captureJobs } from "./schema/capture-job.mjs";
12
+ import { captureShards } from "./schema/capture-shard.mjs";
8
13
  import { snapshots } from "./schema/snapshot.mjs";
9
- import { users } from "./schema/user.mjs";
10
14
  import { comments } from "./schema/comment.mjs";
15
+ import { userConnections } from "./schema/connection.mjs";
11
16
  import { contentRefs } from "./schema/content-refs.mjs";
17
+ import { designCredentials, designLinks, designNodes } from "./schema/design.mjs";
18
+ import { aiBudgetAlerts, aiUsage, insights } from "./schema/insight.mjs";
12
19
  import { buildLabels, labelTypes } from "./schema/label.mjs";
13
20
  import { projectMembers } from "./schema/member.mjs";
14
21
  import { notificationChannels, notificationSubscriptions } from "./schema/notification.mjs";
15
22
  import { projectGroupMappings } from "./schema/project-group-mapping.mjs";
16
- import { projectStatusConfigs } from "./schema/status-config.mjs";
23
+ import { siteSettings } from "./schema/site-setting.mjs";
17
24
  import { tokens } from "./schema/token.mjs";
25
+ import { buildPackageUsage, projectLinks } from "./schema/usage.mjs";
18
26
  import { userInviteTokens } from "./schema/user-invite.mjs";
19
27
  import { webhooks } from "./schema/webhook.mjs";
20
- //#region src/schema/index.ts
28
+ // src/schema/index.ts
21
29
  /** Full Drizzle schema object passed to the database client. */
22
30
  const schema = {
23
31
  projects,
24
- projectStatusConfigs,
25
32
  builds,
26
33
  captureAttempts,
27
34
  captureLogs,
35
+ captureShards,
36
+ captureJobs,
37
+ buildComponents,
38
+ buildReviews,
39
+ siteSettings,
28
40
  snapshots,
29
41
  baselines,
30
42
  comments,
31
43
  labelTypes,
32
44
  buildLabels,
45
+ projectLinks,
46
+ designLinks,
47
+ designCredentials,
48
+ userConnections,
49
+ designNodes,
50
+ buildPackageUsage,
33
51
  tokens,
34
52
  webhooks,
53
+ insights,
54
+ aiUsage,
55
+ aiBudgetAlerts,
35
56
  notificationChannels,
36
57
  notificationSubscriptions,
37
58
  users,
@@ -40,7 +61,6 @@ const schema = {
40
61
  projectGroupMappings,
41
62
  contentRefs
42
63
  };
43
- //#endregion
44
- export { baselines, buildLabels, builds, captureAttempts, captureLogs, comments, contentRefs, labelTypes, notificationChannels, notificationSubscriptions, projectGroupMappings, projectMembers, projectStatusConfigs, projects, schema, snapshots, tokens, userInviteTokens, users, webhooks };
64
+ export { aiBudgetAlerts, aiUsage, baselines, buildComponents, buildLabels, buildPackageUsage, buildReviews, builds, captureAttempts, captureJobs, captureLogs, captureShards, comments, contentRefs, designCredentials, designLinks, designNodes, insights, labelTypes, notificationChannels, notificationSubscriptions, projectGroupMappings, projectLinks, projectMembers, projects, schema, siteSettings, snapshots, tokens, userConnections, userInviteTokens, users, webhooks };
45
65
 
46
66
  //# sourceMappingURL=schema.mjs.map