@quicktalog/common 1.27.0 → 1.29.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.
|
@@ -966,23 +966,6 @@ export declare const catalogues: import("drizzle-orm/pg-core").PgTableWithColumn
|
|
|
966
966
|
identity: undefined;
|
|
967
967
|
generated: undefined;
|
|
968
968
|
}, {}, {}>;
|
|
969
|
-
description: import("drizzle-orm/pg-core").PgColumn<{
|
|
970
|
-
name: "description";
|
|
971
|
-
tableName: "catalogues";
|
|
972
|
-
dataType: "string";
|
|
973
|
-
columnType: "PgText";
|
|
974
|
-
data: string;
|
|
975
|
-
driverParam: string;
|
|
976
|
-
notNull: false;
|
|
977
|
-
hasDefault: false;
|
|
978
|
-
isPrimaryKey: false;
|
|
979
|
-
isAutoincrement: false;
|
|
980
|
-
hasRuntimeDefault: false;
|
|
981
|
-
enumValues: [string, ...string[]];
|
|
982
|
-
baseColumn: never;
|
|
983
|
-
identity: undefined;
|
|
984
|
-
generated: undefined;
|
|
985
|
-
}, {}, {}>;
|
|
986
969
|
status: import("drizzle-orm/pg-core").PgColumn<{
|
|
987
970
|
name: "status";
|
|
988
971
|
tableName: "catalogues";
|
|
@@ -1281,6 +1264,23 @@ export declare const catalogues: import("drizzle-orm/pg-core").PgTableWithColumn
|
|
|
1281
1264
|
identity: undefined;
|
|
1282
1265
|
generated: undefined;
|
|
1283
1266
|
}, {}, {}>;
|
|
1267
|
+
metadata: import("drizzle-orm/pg-core").PgColumn<{
|
|
1268
|
+
name: "metadata";
|
|
1269
|
+
tableName: "catalogues";
|
|
1270
|
+
dataType: "json";
|
|
1271
|
+
columnType: "PgJsonb";
|
|
1272
|
+
data: unknown;
|
|
1273
|
+
driverParam: unknown;
|
|
1274
|
+
notNull: false;
|
|
1275
|
+
hasDefault: true;
|
|
1276
|
+
isPrimaryKey: false;
|
|
1277
|
+
isAutoincrement: false;
|
|
1278
|
+
hasRuntimeDefault: false;
|
|
1279
|
+
enumValues: undefined;
|
|
1280
|
+
baseColumn: never;
|
|
1281
|
+
identity: undefined;
|
|
1282
|
+
generated: undefined;
|
|
1283
|
+
}, {}, {}>;
|
|
1284
1284
|
};
|
|
1285
1285
|
dialect: "pg";
|
|
1286
1286
|
}>;
|
|
@@ -118,7 +118,6 @@ export const catalogues = pgTable("catalogues", {
|
|
|
118
118
|
name: text().notNull(),
|
|
119
119
|
logo: text(),
|
|
120
120
|
heading: text(),
|
|
121
|
-
description: text(),
|
|
122
121
|
status: text().default('draft').notNull(),
|
|
123
122
|
source: text().default('builder').notNull(),
|
|
124
123
|
language: text().default('en').notNull(),
|
|
@@ -135,6 +134,7 @@ export const catalogues = pgTable("catalogues", {
|
|
|
135
134
|
createdAt: timestamp("created_at", { withTimezone: true, mode: 'string' }).defaultNow().notNull(),
|
|
136
135
|
updatedAt: timestamp("updated_at", { withTimezone: true, mode: 'string' }).defaultNow().notNull(),
|
|
137
136
|
createdBy: text("created_by").notNull(),
|
|
137
|
+
metadata: jsonb().default({}),
|
|
138
138
|
}, (table) => [
|
|
139
139
|
foreignKey({
|
|
140
140
|
columns: [table.createdBy],
|
|
@@ -13,44 +13,50 @@ export type Catalogue = Update<RawCatalogue, {
|
|
|
13
13
|
header: Header;
|
|
14
14
|
footer: Footer;
|
|
15
15
|
partners: Partner[];
|
|
16
|
+
metadata: Metadata;
|
|
16
17
|
}>;
|
|
17
|
-
export
|
|
18
|
+
export type Metadata = {
|
|
19
|
+
title: string;
|
|
20
|
+
description: string;
|
|
21
|
+
icon: string;
|
|
22
|
+
};
|
|
23
|
+
export type BaseContentBlock = {
|
|
18
24
|
id: string;
|
|
19
25
|
order: number;
|
|
20
|
-
}
|
|
21
|
-
export
|
|
26
|
+
};
|
|
27
|
+
export type CategoryBlock = BaseContentBlock & {
|
|
22
28
|
type: "category";
|
|
23
29
|
name: string;
|
|
24
30
|
layout: ContentLayout;
|
|
25
31
|
items: Item[];
|
|
26
32
|
isExpanded: boolean;
|
|
27
|
-
}
|
|
28
|
-
export
|
|
33
|
+
};
|
|
34
|
+
export type ContainerBlock = BaseContentBlock & {
|
|
29
35
|
type: "container";
|
|
30
36
|
name: string;
|
|
31
37
|
layout: ContentLayout;
|
|
32
38
|
items: Item[];
|
|
33
|
-
}
|
|
34
|
-
export
|
|
39
|
+
};
|
|
40
|
+
export type IframeBlock = BaseContentBlock & {
|
|
35
41
|
type: "iframe";
|
|
36
42
|
heading?: string;
|
|
37
43
|
src: string;
|
|
38
|
-
}
|
|
39
|
-
export
|
|
44
|
+
};
|
|
45
|
+
export type CustomCodeBlock = BaseContentBlock & {
|
|
40
46
|
type: "custom_code";
|
|
41
47
|
code: string;
|
|
42
|
-
}
|
|
43
|
-
export
|
|
48
|
+
};
|
|
49
|
+
export type TextBlock = BaseContentBlock & {
|
|
44
50
|
type: "text";
|
|
45
51
|
content: string;
|
|
46
|
-
}
|
|
52
|
+
};
|
|
47
53
|
export type ContentBlock = CategoryBlock | ContainerBlock | IframeBlock | CustomCodeBlock | TextBlock;
|
|
48
|
-
export
|
|
54
|
+
export type ItemDiscount = {
|
|
49
55
|
isOnDiscount: boolean;
|
|
50
56
|
discountPercentage: number;
|
|
51
57
|
discountedPrice: number;
|
|
52
|
-
}
|
|
53
|
-
export
|
|
58
|
+
};
|
|
59
|
+
export type Item = {
|
|
54
60
|
id: string;
|
|
55
61
|
order: number;
|
|
56
62
|
name: string;
|
|
@@ -60,14 +66,14 @@ export interface Item {
|
|
|
60
66
|
discount?: ItemDiscount;
|
|
61
67
|
price: number;
|
|
62
68
|
denominator?: string;
|
|
63
|
-
}
|
|
64
|
-
export
|
|
69
|
+
};
|
|
70
|
+
export type Legal = {
|
|
65
71
|
legalName: string;
|
|
66
72
|
termsAndConditions: string;
|
|
67
73
|
privacyPolicy: string;
|
|
68
74
|
address: string;
|
|
69
|
-
}
|
|
70
|
-
export
|
|
75
|
+
};
|
|
76
|
+
export type Appearance = {
|
|
71
77
|
theme: {
|
|
72
78
|
type: ThemeType;
|
|
73
79
|
name: string;
|
|
@@ -83,30 +89,30 @@ export interface Appearance {
|
|
|
83
89
|
isEnabled: boolean;
|
|
84
90
|
icon: string;
|
|
85
91
|
};
|
|
86
|
-
}
|
|
87
|
-
export
|
|
92
|
+
};
|
|
93
|
+
export type CTAButton = {
|
|
88
94
|
isEnabled: boolean;
|
|
89
95
|
label: string;
|
|
90
96
|
url: string;
|
|
91
|
-
}
|
|
92
|
-
export
|
|
97
|
+
};
|
|
98
|
+
export type Partner = {
|
|
93
99
|
name: string;
|
|
94
100
|
url: string;
|
|
95
101
|
description: string;
|
|
96
|
-
}
|
|
97
|
-
export
|
|
102
|
+
};
|
|
103
|
+
export type Footer = {
|
|
98
104
|
cta: CTAButton;
|
|
99
105
|
newsletter: boolean;
|
|
100
106
|
showPartners: boolean;
|
|
101
|
-
}
|
|
102
|
-
export
|
|
107
|
+
};
|
|
108
|
+
export type Header = {
|
|
103
109
|
cta: CTAButton;
|
|
104
110
|
emailCta: boolean;
|
|
105
111
|
phoneCta: boolean;
|
|
106
|
-
}
|
|
107
|
-
export
|
|
112
|
+
};
|
|
113
|
+
export type Contact = {
|
|
108
114
|
phone: string;
|
|
109
115
|
email: string;
|
|
110
116
|
socials: string[];
|
|
111
|
-
}
|
|
117
|
+
};
|
|
112
118
|
export {};
|
package/dist/types/general.d.ts
CHANGED
|
@@ -61,17 +61,10 @@ export type Analytics = {
|
|
|
61
61
|
pageview_count: number;
|
|
62
62
|
unique_visitors: number;
|
|
63
63
|
};
|
|
64
|
-
export type CookiePreferences = {
|
|
65
|
-
accepted: boolean;
|
|
66
|
-
essential: boolean;
|
|
67
|
-
analytics: boolean;
|
|
68
|
-
marketing: boolean;
|
|
69
|
-
timestamp: string;
|
|
70
|
-
version: string;
|
|
71
|
-
};
|
|
72
64
|
type RawUser = InferSelectModel<typeof schema.users>;
|
|
73
65
|
export type User = Update<RawUser, {
|
|
74
66
|
cookiePreferences: CookiePreferences;
|
|
67
|
+
consents: Consents;
|
|
75
68
|
}>;
|
|
76
69
|
export type OCRImageData = {
|
|
77
70
|
id: string;
|
|
@@ -102,4 +95,17 @@ export type AreLimitesReached = {
|
|
|
102
95
|
ocr: boolean;
|
|
103
96
|
prompts: boolean;
|
|
104
97
|
};
|
|
98
|
+
export type CookiePreferences = {
|
|
99
|
+
accepted: boolean;
|
|
100
|
+
essential: boolean;
|
|
101
|
+
analytics: boolean;
|
|
102
|
+
marketing: boolean;
|
|
103
|
+
timestamp: string;
|
|
104
|
+
version: string;
|
|
105
|
+
};
|
|
106
|
+
export type Consents = {
|
|
107
|
+
termsAndConditions: string;
|
|
108
|
+
privacyPolicy: string;
|
|
109
|
+
refundPolicy: string;
|
|
110
|
+
};
|
|
105
111
|
export {};
|