@quicktalog/common 1.49.0 → 1.51.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.
|
@@ -57,6 +57,13 @@ export const themes = [
|
|
|
57
57
|
description: "A vibrant, artistic theme with dark backgrounds, bright accent colors (red, yellow, blue), and playful, bold typography. Great for creative spaces, cafes, or venues wanting a fun, expressive look.",
|
|
58
58
|
type: "dark",
|
|
59
59
|
},
|
|
60
|
+
{
|
|
61
|
+
id: 10,
|
|
62
|
+
key: "theme-coffee",
|
|
63
|
+
label: "Coffee",
|
|
64
|
+
type: "light",
|
|
65
|
+
description: "A warm, inviting theme with rich brown tones, cream accents, and cozy typography. Perfect for coffee shops or cafes seeking a comforting, rustic vibe.",
|
|
66
|
+
},
|
|
60
67
|
];
|
|
61
68
|
export const layouts = [
|
|
62
69
|
{
|
|
@@ -10,18 +10,18 @@ export declare const cataloguesRelations: import("drizzle-orm/relations").Relati
|
|
|
10
10
|
}>;
|
|
11
11
|
export declare const usersRelations: import("drizzle-orm/relations").Relations<"users", {
|
|
12
12
|
prompts: import("drizzle-orm/relations").Many<"prompts">;
|
|
13
|
-
ocrs: import("drizzle-orm/relations").Many<"ocr">;
|
|
14
13
|
newsletters: import("drizzle-orm/relations").Many<"newsletter">;
|
|
14
|
+
ocrs: import("drizzle-orm/relations").Many<"ocr">;
|
|
15
15
|
analytics: import("drizzle-orm/relations").Many<"analytics">;
|
|
16
16
|
catalogues: import("drizzle-orm/relations").Many<"catalogues">;
|
|
17
17
|
}>;
|
|
18
|
+
export declare const newsletterRelations: import("drizzle-orm/relations").Relations<"newsletter", {
|
|
19
|
+
user: import("drizzle-orm/relations").One<"users", true>;
|
|
20
|
+
}>;
|
|
18
21
|
export declare const ocrRelations: import("drizzle-orm/relations").Relations<"ocr", {
|
|
19
22
|
catalogue: import("drizzle-orm/relations").One<"catalogues", true>;
|
|
20
23
|
user: import("drizzle-orm/relations").One<"users", false>;
|
|
21
24
|
}>;
|
|
22
|
-
export declare const newsletterRelations: import("drizzle-orm/relations").Relations<"newsletter", {
|
|
23
|
-
user: import("drizzle-orm/relations").One<"users", true>;
|
|
24
|
-
}>;
|
|
25
25
|
export declare const analyticsRelations: import("drizzle-orm/relations").Relations<"analytics", {
|
|
26
26
|
user: import("drizzle-orm/relations").One<"users", true>;
|
|
27
27
|
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { relations } from "drizzle-orm/relations";
|
|
2
|
-
import { catalogues, prompts, users,
|
|
2
|
+
import { catalogues, prompts, users, newsletter, ocr, analytics, qrConfigs } from "./schema";
|
|
3
3
|
export const promptsRelations = relations(prompts, ({ one }) => ({
|
|
4
4
|
catalogue: one(catalogues, {
|
|
5
5
|
fields: [prompts.catalogue],
|
|
@@ -21,11 +21,17 @@ export const cataloguesRelations = relations(catalogues, ({ one, many }) => ({
|
|
|
21
21
|
}));
|
|
22
22
|
export const usersRelations = relations(users, ({ many }) => ({
|
|
23
23
|
prompts: many(prompts),
|
|
24
|
-
ocrs: many(ocr),
|
|
25
24
|
newsletters: many(newsletter),
|
|
25
|
+
ocrs: many(ocr),
|
|
26
26
|
analytics: many(analytics),
|
|
27
27
|
catalogues: many(catalogues),
|
|
28
28
|
}));
|
|
29
|
+
export const newsletterRelations = relations(newsletter, ({ one }) => ({
|
|
30
|
+
user: one(users, {
|
|
31
|
+
fields: [newsletter.ownerId],
|
|
32
|
+
references: [users.id]
|
|
33
|
+
}),
|
|
34
|
+
}));
|
|
29
35
|
export const ocrRelations = relations(ocr, ({ one }) => ({
|
|
30
36
|
catalogue: one(catalogues, {
|
|
31
37
|
fields: [ocr.catalogue],
|
|
@@ -36,12 +42,6 @@ export const ocrRelations = relations(ocr, ({ one }) => ({
|
|
|
36
42
|
references: [users.id]
|
|
37
43
|
}),
|
|
38
44
|
}));
|
|
39
|
-
export const newsletterRelations = relations(newsletter, ({ one }) => ({
|
|
40
|
-
user: one(users, {
|
|
41
|
-
fields: [newsletter.ownerId],
|
|
42
|
-
references: [users.id]
|
|
43
|
-
}),
|
|
44
|
-
}));
|
|
45
45
|
export const analyticsRelations = relations(analytics, ({ one }) => ({
|
|
46
46
|
user: one(users, {
|
|
47
47
|
fields: [analytics.userId],
|
|
@@ -233,81 +233,6 @@ export declare const users: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
233
233
|
};
|
|
234
234
|
dialect: "pg";
|
|
235
235
|
}>;
|
|
236
|
-
export declare const ocr: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
237
|
-
name: "ocr";
|
|
238
|
-
schema: undefined;
|
|
239
|
-
columns: {
|
|
240
|
-
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
241
|
-
name: "id";
|
|
242
|
-
tableName: "ocr";
|
|
243
|
-
dataType: "string";
|
|
244
|
-
columnType: "PgUUID";
|
|
245
|
-
data: string;
|
|
246
|
-
driverParam: string;
|
|
247
|
-
notNull: true;
|
|
248
|
-
hasDefault: true;
|
|
249
|
-
isPrimaryKey: true;
|
|
250
|
-
isAutoincrement: false;
|
|
251
|
-
hasRuntimeDefault: false;
|
|
252
|
-
enumValues: undefined;
|
|
253
|
-
baseColumn: never;
|
|
254
|
-
identity: undefined;
|
|
255
|
-
generated: undefined;
|
|
256
|
-
}, {}, {}>;
|
|
257
|
-
datetime: import("drizzle-orm/pg-core").PgColumn<{
|
|
258
|
-
name: "datetime";
|
|
259
|
-
tableName: "ocr";
|
|
260
|
-
dataType: "string";
|
|
261
|
-
columnType: "PgTimestampString";
|
|
262
|
-
data: string;
|
|
263
|
-
driverParam: string;
|
|
264
|
-
notNull: true;
|
|
265
|
-
hasDefault: true;
|
|
266
|
-
isPrimaryKey: false;
|
|
267
|
-
isAutoincrement: false;
|
|
268
|
-
hasRuntimeDefault: false;
|
|
269
|
-
enumValues: undefined;
|
|
270
|
-
baseColumn: never;
|
|
271
|
-
identity: undefined;
|
|
272
|
-
generated: undefined;
|
|
273
|
-
}, {}, {}>;
|
|
274
|
-
userId: import("drizzle-orm/pg-core").PgColumn<{
|
|
275
|
-
name: "user_id";
|
|
276
|
-
tableName: "ocr";
|
|
277
|
-
dataType: "string";
|
|
278
|
-
columnType: "PgText";
|
|
279
|
-
data: string;
|
|
280
|
-
driverParam: string;
|
|
281
|
-
notNull: false;
|
|
282
|
-
hasDefault: false;
|
|
283
|
-
isPrimaryKey: false;
|
|
284
|
-
isAutoincrement: false;
|
|
285
|
-
hasRuntimeDefault: false;
|
|
286
|
-
enumValues: [string, ...string[]];
|
|
287
|
-
baseColumn: never;
|
|
288
|
-
identity: undefined;
|
|
289
|
-
generated: undefined;
|
|
290
|
-
}, {}, {}>;
|
|
291
|
-
catalogue: import("drizzle-orm/pg-core").PgColumn<{
|
|
292
|
-
name: "catalogue";
|
|
293
|
-
tableName: "ocr";
|
|
294
|
-
dataType: "string";
|
|
295
|
-
columnType: "PgText";
|
|
296
|
-
data: string;
|
|
297
|
-
driverParam: string;
|
|
298
|
-
notNull: true;
|
|
299
|
-
hasDefault: false;
|
|
300
|
-
isPrimaryKey: false;
|
|
301
|
-
isAutoincrement: false;
|
|
302
|
-
hasRuntimeDefault: false;
|
|
303
|
-
enumValues: [string, ...string[]];
|
|
304
|
-
baseColumn: never;
|
|
305
|
-
identity: undefined;
|
|
306
|
-
generated: undefined;
|
|
307
|
-
}, {}, {}>;
|
|
308
|
-
};
|
|
309
|
-
dialect: "pg";
|
|
310
|
-
}>;
|
|
311
236
|
export declare const subscriptions: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
312
237
|
name: "subscriptions";
|
|
313
238
|
schema: undefined;
|
|
@@ -543,6 +468,81 @@ export declare const newsletter: import("drizzle-orm/pg-core").PgTableWithColumn
|
|
|
543
468
|
};
|
|
544
469
|
dialect: "pg";
|
|
545
470
|
}>;
|
|
471
|
+
export declare const ocr: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
472
|
+
name: "ocr";
|
|
473
|
+
schema: undefined;
|
|
474
|
+
columns: {
|
|
475
|
+
id: import("drizzle-orm/pg-core").PgColumn<{
|
|
476
|
+
name: "id";
|
|
477
|
+
tableName: "ocr";
|
|
478
|
+
dataType: "string";
|
|
479
|
+
columnType: "PgUUID";
|
|
480
|
+
data: string;
|
|
481
|
+
driverParam: string;
|
|
482
|
+
notNull: true;
|
|
483
|
+
hasDefault: true;
|
|
484
|
+
isPrimaryKey: true;
|
|
485
|
+
isAutoincrement: false;
|
|
486
|
+
hasRuntimeDefault: false;
|
|
487
|
+
enumValues: undefined;
|
|
488
|
+
baseColumn: never;
|
|
489
|
+
identity: undefined;
|
|
490
|
+
generated: undefined;
|
|
491
|
+
}, {}, {}>;
|
|
492
|
+
datetime: import("drizzle-orm/pg-core").PgColumn<{
|
|
493
|
+
name: "datetime";
|
|
494
|
+
tableName: "ocr";
|
|
495
|
+
dataType: "string";
|
|
496
|
+
columnType: "PgTimestampString";
|
|
497
|
+
data: string;
|
|
498
|
+
driverParam: string;
|
|
499
|
+
notNull: true;
|
|
500
|
+
hasDefault: true;
|
|
501
|
+
isPrimaryKey: false;
|
|
502
|
+
isAutoincrement: false;
|
|
503
|
+
hasRuntimeDefault: false;
|
|
504
|
+
enumValues: undefined;
|
|
505
|
+
baseColumn: never;
|
|
506
|
+
identity: undefined;
|
|
507
|
+
generated: undefined;
|
|
508
|
+
}, {}, {}>;
|
|
509
|
+
userId: import("drizzle-orm/pg-core").PgColumn<{
|
|
510
|
+
name: "user_id";
|
|
511
|
+
tableName: "ocr";
|
|
512
|
+
dataType: "string";
|
|
513
|
+
columnType: "PgText";
|
|
514
|
+
data: string;
|
|
515
|
+
driverParam: string;
|
|
516
|
+
notNull: false;
|
|
517
|
+
hasDefault: false;
|
|
518
|
+
isPrimaryKey: false;
|
|
519
|
+
isAutoincrement: false;
|
|
520
|
+
hasRuntimeDefault: false;
|
|
521
|
+
enumValues: [string, ...string[]];
|
|
522
|
+
baseColumn: never;
|
|
523
|
+
identity: undefined;
|
|
524
|
+
generated: undefined;
|
|
525
|
+
}, {}, {}>;
|
|
526
|
+
catalogue: import("drizzle-orm/pg-core").PgColumn<{
|
|
527
|
+
name: "catalogue";
|
|
528
|
+
tableName: "ocr";
|
|
529
|
+
dataType: "string";
|
|
530
|
+
columnType: "PgText";
|
|
531
|
+
data: string;
|
|
532
|
+
driverParam: string;
|
|
533
|
+
notNull: true;
|
|
534
|
+
hasDefault: false;
|
|
535
|
+
isPrimaryKey: false;
|
|
536
|
+
isAutoincrement: false;
|
|
537
|
+
hasRuntimeDefault: false;
|
|
538
|
+
enumValues: [string, ...string[]];
|
|
539
|
+
baseColumn: never;
|
|
540
|
+
identity: undefined;
|
|
541
|
+
generated: undefined;
|
|
542
|
+
}, {}, {}>;
|
|
543
|
+
};
|
|
544
|
+
dialect: "pg";
|
|
545
|
+
}>;
|
|
546
546
|
export declare const productNewsletter: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
547
547
|
name: "product_newsletter";
|
|
548
548
|
schema: undefined;
|
|
@@ -30,23 +30,6 @@ export const users = pgTable("users", {
|
|
|
30
30
|
}, (table) => [
|
|
31
31
|
pgPolicy("Enable read access for authenticated users to users", { as: "permissive", for: "select", to: ["authenticated"], using: sql `true` }),
|
|
32
32
|
]);
|
|
33
|
-
export const ocr = pgTable("ocr", {
|
|
34
|
-
id: uuid().defaultRandom().primaryKey().notNull(),
|
|
35
|
-
datetime: timestamp({ withTimezone: true, mode: 'string' }).defaultNow().notNull(),
|
|
36
|
-
userId: text("user_id"),
|
|
37
|
-
catalogue: text().notNull(),
|
|
38
|
-
}, (table) => [
|
|
39
|
-
foreignKey({
|
|
40
|
-
columns: [table.catalogue],
|
|
41
|
-
foreignColumns: [catalogues.name],
|
|
42
|
-
name: "ocr_catalogue_fkey"
|
|
43
|
-
}).onUpdate("cascade").onDelete("cascade"),
|
|
44
|
-
foreignKey({
|
|
45
|
-
columns: [table.userId],
|
|
46
|
-
foreignColumns: [users.id],
|
|
47
|
-
name: "ocr_user_id_fkey"
|
|
48
|
-
}).onUpdate("cascade").onDelete("cascade"),
|
|
49
|
-
]);
|
|
50
33
|
export const subscriptions = pgTable("subscriptions", {
|
|
51
34
|
subscriptionId: text("subscription_id").primaryKey().notNull(),
|
|
52
35
|
subscriptionStatus: text("subscription_status").notNull(),
|
|
@@ -56,9 +39,7 @@ export const subscriptions = pgTable("subscriptions", {
|
|
|
56
39
|
customerId: text("customer_id").notNull(),
|
|
57
40
|
createdAt: timestamp("created_at", { withTimezone: true, mode: 'string' }).defaultNow().notNull(),
|
|
58
41
|
updatedAt: timestamp("updated_at", { withTimezone: true, mode: 'string' }).defaultNow().notNull(),
|
|
59
|
-
}
|
|
60
|
-
pgPolicy("Enable read access for authenticated users to subscriptions", { as: "permissive", for: "select", to: ["authenticated"], using: sql `true` }),
|
|
61
|
-
]);
|
|
42
|
+
});
|
|
62
43
|
export const newsletter = pgTable("newsletter", {
|
|
63
44
|
id: uuid().defaultRandom().primaryKey().notNull(),
|
|
64
45
|
email: text().notNull(),
|
|
@@ -72,6 +53,23 @@ export const newsletter = pgTable("newsletter", {
|
|
|
72
53
|
name: "newsletter_owner_id_fkey"
|
|
73
54
|
}).onUpdate("cascade").onDelete("cascade"),
|
|
74
55
|
]);
|
|
56
|
+
export const ocr = pgTable("ocr", {
|
|
57
|
+
id: uuid().defaultRandom().primaryKey().notNull(),
|
|
58
|
+
datetime: timestamp({ withTimezone: true, mode: 'string' }).defaultNow().notNull(),
|
|
59
|
+
userId: text("user_id"),
|
|
60
|
+
catalogue: text().notNull(),
|
|
61
|
+
}, (table) => [
|
|
62
|
+
foreignKey({
|
|
63
|
+
columns: [table.catalogue],
|
|
64
|
+
foreignColumns: [catalogues.name],
|
|
65
|
+
name: "ocr_catalogue_fkey"
|
|
66
|
+
}).onUpdate("cascade").onDelete("cascade"),
|
|
67
|
+
foreignKey({
|
|
68
|
+
columns: [table.userId],
|
|
69
|
+
foreignColumns: [users.id],
|
|
70
|
+
name: "ocr_user_id_fkey"
|
|
71
|
+
}).onUpdate("cascade").onDelete("cascade"),
|
|
72
|
+
]);
|
|
75
73
|
export const productNewsletter = pgTable("product_newsletter", {
|
|
76
74
|
id: uuid().defaultRandom().notNull(),
|
|
77
75
|
email: text().notNull(),
|