@remit/drizzle-pg-schema 0.0.5 → 0.0.7
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.
- package/dist/schema.d.ts +147 -128
- package/dist/schema.js +13 -12
- package/package.json +1 -1
- package/schema.ts +18 -17
package/dist/schema.d.ts
CHANGED
|
@@ -1992,6 +1992,134 @@ export declare const filters: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
|
1992
1992
|
};
|
|
1993
1993
|
dialect: "pg";
|
|
1994
1994
|
}>;
|
|
1995
|
+
export declare const labels: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1996
|
+
name: "label";
|
|
1997
|
+
schema: undefined;
|
|
1998
|
+
columns: {
|
|
1999
|
+
labelId: import("drizzle-orm/pg-core").PgColumn<{
|
|
2000
|
+
name: "label_id";
|
|
2001
|
+
tableName: "label";
|
|
2002
|
+
dataType: "string";
|
|
2003
|
+
columnType: "PgText";
|
|
2004
|
+
data: string;
|
|
2005
|
+
driverParam: string;
|
|
2006
|
+
notNull: true;
|
|
2007
|
+
hasDefault: true;
|
|
2008
|
+
isPrimaryKey: true;
|
|
2009
|
+
isAutoincrement: false;
|
|
2010
|
+
hasRuntimeDefault: true;
|
|
2011
|
+
enumValues: [string, ...string[]];
|
|
2012
|
+
baseColumn: never;
|
|
2013
|
+
identity: undefined;
|
|
2014
|
+
generated: undefined;
|
|
2015
|
+
}, {}, {}>;
|
|
2016
|
+
accountConfigId: import("drizzle-orm/pg-core").PgColumn<{
|
|
2017
|
+
name: "account_config_id";
|
|
2018
|
+
tableName: "label";
|
|
2019
|
+
dataType: "string";
|
|
2020
|
+
columnType: "PgText";
|
|
2021
|
+
data: string;
|
|
2022
|
+
driverParam: string;
|
|
2023
|
+
notNull: true;
|
|
2024
|
+
hasDefault: false;
|
|
2025
|
+
isPrimaryKey: false;
|
|
2026
|
+
isAutoincrement: false;
|
|
2027
|
+
hasRuntimeDefault: false;
|
|
2028
|
+
enumValues: [string, ...string[]];
|
|
2029
|
+
baseColumn: never;
|
|
2030
|
+
identity: undefined;
|
|
2031
|
+
generated: undefined;
|
|
2032
|
+
}, {}, {}>;
|
|
2033
|
+
name: import("drizzle-orm/pg-core").PgColumn<{
|
|
2034
|
+
name: "name";
|
|
2035
|
+
tableName: "label";
|
|
2036
|
+
dataType: "string";
|
|
2037
|
+
columnType: "PgText";
|
|
2038
|
+
data: string;
|
|
2039
|
+
driverParam: string;
|
|
2040
|
+
notNull: true;
|
|
2041
|
+
hasDefault: false;
|
|
2042
|
+
isPrimaryKey: false;
|
|
2043
|
+
isAutoincrement: false;
|
|
2044
|
+
hasRuntimeDefault: false;
|
|
2045
|
+
enumValues: [string, ...string[]];
|
|
2046
|
+
baseColumn: never;
|
|
2047
|
+
identity: undefined;
|
|
2048
|
+
generated: undefined;
|
|
2049
|
+
}, {}, {}>;
|
|
2050
|
+
normalizedName: import("drizzle-orm/pg-core").PgColumn<{
|
|
2051
|
+
name: "normalized_name";
|
|
2052
|
+
tableName: "label";
|
|
2053
|
+
dataType: "string";
|
|
2054
|
+
columnType: "PgText";
|
|
2055
|
+
data: string;
|
|
2056
|
+
driverParam: string;
|
|
2057
|
+
notNull: true;
|
|
2058
|
+
hasDefault: false;
|
|
2059
|
+
isPrimaryKey: false;
|
|
2060
|
+
isAutoincrement: false;
|
|
2061
|
+
hasRuntimeDefault: false;
|
|
2062
|
+
enumValues: [string, ...string[]];
|
|
2063
|
+
baseColumn: never;
|
|
2064
|
+
identity: undefined;
|
|
2065
|
+
generated: undefined;
|
|
2066
|
+
}, {}, {}>;
|
|
2067
|
+
color: import("drizzle-orm/pg-core").PgColumn<{
|
|
2068
|
+
name: "color";
|
|
2069
|
+
tableName: "label";
|
|
2070
|
+
dataType: "string";
|
|
2071
|
+
columnType: "PgText";
|
|
2072
|
+
data: "Default" | "Red" | "Orange" | "Yellow" | "Green" | "Teal" | "Blue" | "Purple" | "Gray";
|
|
2073
|
+
driverParam: string;
|
|
2074
|
+
notNull: true;
|
|
2075
|
+
hasDefault: true;
|
|
2076
|
+
isPrimaryKey: false;
|
|
2077
|
+
isAutoincrement: false;
|
|
2078
|
+
hasRuntimeDefault: false;
|
|
2079
|
+
enumValues: [string, ...string[]];
|
|
2080
|
+
baseColumn: never;
|
|
2081
|
+
identity: undefined;
|
|
2082
|
+
generated: undefined;
|
|
2083
|
+
}, {}, {
|
|
2084
|
+
$type: "Default" | "Red" | "Orange" | "Yellow" | "Green" | "Teal" | "Blue" | "Purple" | "Gray";
|
|
2085
|
+
}>;
|
|
2086
|
+
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
2087
|
+
name: "created_at";
|
|
2088
|
+
tableName: "label";
|
|
2089
|
+
dataType: "number";
|
|
2090
|
+
columnType: "PgBigInt53";
|
|
2091
|
+
data: number;
|
|
2092
|
+
driverParam: string | number;
|
|
2093
|
+
notNull: true;
|
|
2094
|
+
hasDefault: false;
|
|
2095
|
+
isPrimaryKey: false;
|
|
2096
|
+
isAutoincrement: false;
|
|
2097
|
+
hasRuntimeDefault: false;
|
|
2098
|
+
enumValues: undefined;
|
|
2099
|
+
baseColumn: never;
|
|
2100
|
+
identity: undefined;
|
|
2101
|
+
generated: undefined;
|
|
2102
|
+
}, {}, {}>;
|
|
2103
|
+
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
2104
|
+
name: "updated_at";
|
|
2105
|
+
tableName: "label";
|
|
2106
|
+
dataType: "number";
|
|
2107
|
+
columnType: "PgBigInt53";
|
|
2108
|
+
data: number;
|
|
2109
|
+
driverParam: string | number;
|
|
2110
|
+
notNull: true;
|
|
2111
|
+
hasDefault: false;
|
|
2112
|
+
isPrimaryKey: false;
|
|
2113
|
+
isAutoincrement: false;
|
|
2114
|
+
hasRuntimeDefault: false;
|
|
2115
|
+
enumValues: undefined;
|
|
2116
|
+
baseColumn: never;
|
|
2117
|
+
identity: undefined;
|
|
2118
|
+
generated: undefined;
|
|
2119
|
+
}, {}, {}>;
|
|
2120
|
+
};
|
|
2121
|
+
dialect: "pg";
|
|
2122
|
+
}>;
|
|
1995
2123
|
export declare const organizeJobRequests: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
1996
2124
|
name: "organize_job_request";
|
|
1997
2125
|
schema: undefined;
|
|
@@ -2510,6 +2638,25 @@ export declare const threadMessages: import("drizzle-orm/pg-core").PgTableWithCo
|
|
|
2510
2638
|
}, {}, {
|
|
2511
2639
|
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
2512
2640
|
}>;
|
|
2641
|
+
listId: import("drizzle-orm/pg-core").PgColumn<{
|
|
2642
|
+
name: "list_id";
|
|
2643
|
+
tableName: "thread_message";
|
|
2644
|
+
dataType: "custom";
|
|
2645
|
+
columnType: "PgCustomColumn";
|
|
2646
|
+
data: string;
|
|
2647
|
+
driverParam: string;
|
|
2648
|
+
notNull: false;
|
|
2649
|
+
hasDefault: false;
|
|
2650
|
+
isPrimaryKey: false;
|
|
2651
|
+
isAutoincrement: false;
|
|
2652
|
+
hasRuntimeDefault: false;
|
|
2653
|
+
enumValues: undefined;
|
|
2654
|
+
baseColumn: never;
|
|
2655
|
+
identity: undefined;
|
|
2656
|
+
generated: undefined;
|
|
2657
|
+
}, {}, {
|
|
2658
|
+
pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
|
|
2659
|
+
}>;
|
|
2513
2660
|
internalDate: import("drizzle-orm/pg-core").PgColumn<{
|
|
2514
2661
|
name: "internal_date";
|
|
2515
2662
|
tableName: "thread_message";
|
|
@@ -6216,134 +6363,6 @@ export declare const bodyPartContents: import("drizzle-orm/pg-core").PgTableWith
|
|
|
6216
6363
|
};
|
|
6217
6364
|
dialect: "pg";
|
|
6218
6365
|
}>;
|
|
6219
|
-
export declare const labels: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
6220
|
-
name: "label";
|
|
6221
|
-
schema: undefined;
|
|
6222
|
-
columns: {
|
|
6223
|
-
labelId: import("drizzle-orm/pg-core").PgColumn<{
|
|
6224
|
-
name: "label_id";
|
|
6225
|
-
tableName: "label";
|
|
6226
|
-
dataType: "string";
|
|
6227
|
-
columnType: "PgText";
|
|
6228
|
-
data: string;
|
|
6229
|
-
driverParam: string;
|
|
6230
|
-
notNull: true;
|
|
6231
|
-
hasDefault: true;
|
|
6232
|
-
isPrimaryKey: true;
|
|
6233
|
-
isAutoincrement: false;
|
|
6234
|
-
hasRuntimeDefault: true;
|
|
6235
|
-
enumValues: [string, ...string[]];
|
|
6236
|
-
baseColumn: never;
|
|
6237
|
-
identity: undefined;
|
|
6238
|
-
generated: undefined;
|
|
6239
|
-
}, {}, {}>;
|
|
6240
|
-
accountConfigId: import("drizzle-orm/pg-core").PgColumn<{
|
|
6241
|
-
name: "account_config_id";
|
|
6242
|
-
tableName: "label";
|
|
6243
|
-
dataType: "string";
|
|
6244
|
-
columnType: "PgText";
|
|
6245
|
-
data: string;
|
|
6246
|
-
driverParam: string;
|
|
6247
|
-
notNull: true;
|
|
6248
|
-
hasDefault: false;
|
|
6249
|
-
isPrimaryKey: false;
|
|
6250
|
-
isAutoincrement: false;
|
|
6251
|
-
hasRuntimeDefault: false;
|
|
6252
|
-
enumValues: [string, ...string[]];
|
|
6253
|
-
baseColumn: never;
|
|
6254
|
-
identity: undefined;
|
|
6255
|
-
generated: undefined;
|
|
6256
|
-
}, {}, {}>;
|
|
6257
|
-
name: import("drizzle-orm/pg-core").PgColumn<{
|
|
6258
|
-
name: "name";
|
|
6259
|
-
tableName: "label";
|
|
6260
|
-
dataType: "string";
|
|
6261
|
-
columnType: "PgText";
|
|
6262
|
-
data: string;
|
|
6263
|
-
driverParam: string;
|
|
6264
|
-
notNull: true;
|
|
6265
|
-
hasDefault: false;
|
|
6266
|
-
isPrimaryKey: false;
|
|
6267
|
-
isAutoincrement: false;
|
|
6268
|
-
hasRuntimeDefault: false;
|
|
6269
|
-
enumValues: [string, ...string[]];
|
|
6270
|
-
baseColumn: never;
|
|
6271
|
-
identity: undefined;
|
|
6272
|
-
generated: undefined;
|
|
6273
|
-
}, {}, {}>;
|
|
6274
|
-
normalizedName: import("drizzle-orm/pg-core").PgColumn<{
|
|
6275
|
-
name: "normalized_name";
|
|
6276
|
-
tableName: "label";
|
|
6277
|
-
dataType: "string";
|
|
6278
|
-
columnType: "PgText";
|
|
6279
|
-
data: string;
|
|
6280
|
-
driverParam: string;
|
|
6281
|
-
notNull: true;
|
|
6282
|
-
hasDefault: false;
|
|
6283
|
-
isPrimaryKey: false;
|
|
6284
|
-
isAutoincrement: false;
|
|
6285
|
-
hasRuntimeDefault: false;
|
|
6286
|
-
enumValues: [string, ...string[]];
|
|
6287
|
-
baseColumn: never;
|
|
6288
|
-
identity: undefined;
|
|
6289
|
-
generated: undefined;
|
|
6290
|
-
}, {}, {}>;
|
|
6291
|
-
color: import("drizzle-orm/pg-core").PgColumn<{
|
|
6292
|
-
name: "color";
|
|
6293
|
-
tableName: "label";
|
|
6294
|
-
dataType: "string";
|
|
6295
|
-
columnType: "PgText";
|
|
6296
|
-
data: "Default" | "Red" | "Orange" | "Yellow" | "Green" | "Teal" | "Blue" | "Purple" | "Gray";
|
|
6297
|
-
driverParam: string;
|
|
6298
|
-
notNull: true;
|
|
6299
|
-
hasDefault: true;
|
|
6300
|
-
isPrimaryKey: false;
|
|
6301
|
-
isAutoincrement: false;
|
|
6302
|
-
hasRuntimeDefault: false;
|
|
6303
|
-
enumValues: [string, ...string[]];
|
|
6304
|
-
baseColumn: never;
|
|
6305
|
-
identity: undefined;
|
|
6306
|
-
generated: undefined;
|
|
6307
|
-
}, {}, {
|
|
6308
|
-
$type: "Default" | "Red" | "Orange" | "Yellow" | "Green" | "Teal" | "Blue" | "Purple" | "Gray";
|
|
6309
|
-
}>;
|
|
6310
|
-
createdAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
6311
|
-
name: "created_at";
|
|
6312
|
-
tableName: "label";
|
|
6313
|
-
dataType: "number";
|
|
6314
|
-
columnType: "PgBigInt53";
|
|
6315
|
-
data: number;
|
|
6316
|
-
driverParam: string | number;
|
|
6317
|
-
notNull: true;
|
|
6318
|
-
hasDefault: false;
|
|
6319
|
-
isPrimaryKey: false;
|
|
6320
|
-
isAutoincrement: false;
|
|
6321
|
-
hasRuntimeDefault: false;
|
|
6322
|
-
enumValues: undefined;
|
|
6323
|
-
baseColumn: never;
|
|
6324
|
-
identity: undefined;
|
|
6325
|
-
generated: undefined;
|
|
6326
|
-
}, {}, {}>;
|
|
6327
|
-
updatedAt: import("drizzle-orm/pg-core").PgColumn<{
|
|
6328
|
-
name: "updated_at";
|
|
6329
|
-
tableName: "label";
|
|
6330
|
-
dataType: "number";
|
|
6331
|
-
columnType: "PgBigInt53";
|
|
6332
|
-
data: number;
|
|
6333
|
-
driverParam: string | number;
|
|
6334
|
-
notNull: true;
|
|
6335
|
-
hasDefault: false;
|
|
6336
|
-
isPrimaryKey: false;
|
|
6337
|
-
isAutoincrement: false;
|
|
6338
|
-
hasRuntimeDefault: false;
|
|
6339
|
-
enumValues: undefined;
|
|
6340
|
-
baseColumn: never;
|
|
6341
|
-
identity: undefined;
|
|
6342
|
-
generated: undefined;
|
|
6343
|
-
}, {}, {}>;
|
|
6344
|
-
};
|
|
6345
|
-
dialect: "pg";
|
|
6346
|
-
}>;
|
|
6347
6366
|
export declare const messageLabels: import("drizzle-orm/pg-core").PgTableWithColumns<{
|
|
6348
6367
|
name: "message_label";
|
|
6349
6368
|
schema: undefined;
|
package/dist/schema.js
CHANGED
|
@@ -135,6 +135,18 @@ export const filters = pgTable("filter", {
|
|
|
135
135
|
index("filter_by_account_and_state").on(table.accountConfigId, table.state, table.filterId),
|
|
136
136
|
index("filter_primary").on(table.accountConfigId, table.filterId),
|
|
137
137
|
]);
|
|
138
|
+
export const labels = pgTable("label", {
|
|
139
|
+
labelId: text("label_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
140
|
+
accountConfigId: text("account_config_id").notNull(),
|
|
141
|
+
name: text("name").notNull(),
|
|
142
|
+
normalizedName: text("normalized_name").notNull(),
|
|
143
|
+
color: text("color").$type().notNull().default("Default"),
|
|
144
|
+
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
145
|
+
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
146
|
+
}, (table) => [
|
|
147
|
+
index("label_by_normalized_name").on(table.accountConfigId, table.normalizedName),
|
|
148
|
+
index("label_primary").on(table.accountConfigId, table.labelId),
|
|
149
|
+
]);
|
|
138
150
|
export const organizeJobRequests = pgTable("organize_job_request", {
|
|
139
151
|
organizeJobId: text("organize_job_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
140
152
|
accountConfigId: text("account_config_id").notNull(),
|
|
@@ -169,6 +181,7 @@ export const threadMessages = pgTable("thread_message", {
|
|
|
169
181
|
fromEmail: nullableText("from_email"),
|
|
170
182
|
fromName: nullableText("from_name"),
|
|
171
183
|
subject: nullableText("subject"),
|
|
184
|
+
listId: nullableText("list_id"),
|
|
172
185
|
internalDate: bigint("internal_date", { mode: "number" }).notNull(),
|
|
173
186
|
sentDate: bigint("sent_date", { mode: "number" }).notNull(),
|
|
174
187
|
isRead: boolean("is_read").notNull(),
|
|
@@ -464,18 +477,6 @@ export const bodyPartContents = pgTable("body_part_content", {
|
|
|
464
477
|
}, (table) => [
|
|
465
478
|
index("body_part_content_by_message_id").on(table.messageId, table.bodyPartContentId),
|
|
466
479
|
]);
|
|
467
|
-
export const labels = pgTable("label", {
|
|
468
|
-
labelId: text("label_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
469
|
-
accountConfigId: text("account_config_id").notNull(),
|
|
470
|
-
name: text("name").notNull(),
|
|
471
|
-
normalizedName: text("normalized_name").notNull(),
|
|
472
|
-
color: text("color").$type().notNull().default("Default"),
|
|
473
|
-
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
474
|
-
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
475
|
-
}, (table) => [
|
|
476
|
-
index("label_by_normalized_name").on(table.accountConfigId, table.normalizedName),
|
|
477
|
-
index("label_primary").on(table.accountConfigId, table.labelId),
|
|
478
|
-
]);
|
|
479
480
|
export const messageLabels = pgTable("message_label", {
|
|
480
481
|
messageLabelId: text("message_label_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
481
482
|
messageId: text("message_id").notNull(),
|
package/package.json
CHANGED
package/schema.ts
CHANGED
|
@@ -166,6 +166,23 @@ export const filters = pgTable(
|
|
|
166
166
|
],
|
|
167
167
|
);
|
|
168
168
|
|
|
169
|
+
export const labels = pgTable(
|
|
170
|
+
"label",
|
|
171
|
+
{
|
|
172
|
+
labelId: text("label_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
173
|
+
accountConfigId: text("account_config_id").notNull(),
|
|
174
|
+
name: text("name").notNull(),
|
|
175
|
+
normalizedName: text("normalized_name").notNull(),
|
|
176
|
+
color: text("color").$type<"Default" | "Red" | "Orange" | "Yellow" | "Green" | "Teal" | "Blue" | "Purple" | "Gray">().notNull().default("Default"),
|
|
177
|
+
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
178
|
+
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
179
|
+
},
|
|
180
|
+
(table) => [
|
|
181
|
+
index("label_by_normalized_name").on(table.accountConfigId, table.normalizedName),
|
|
182
|
+
index("label_primary").on(table.accountConfigId, table.labelId),
|
|
183
|
+
],
|
|
184
|
+
);
|
|
185
|
+
|
|
169
186
|
export const organizeJobRequests = pgTable(
|
|
170
187
|
"organize_job_request",
|
|
171
188
|
{
|
|
@@ -207,6 +224,7 @@ export const threadMessages = pgTable(
|
|
|
207
224
|
fromEmail: nullableText("from_email"),
|
|
208
225
|
fromName: nullableText("from_name"),
|
|
209
226
|
subject: nullableText("subject"),
|
|
227
|
+
listId: nullableText("list_id"),
|
|
210
228
|
internalDate: bigint("internal_date", { mode: "number" }).notNull(),
|
|
211
229
|
sentDate: bigint("sent_date", { mode: "number" }).notNull(),
|
|
212
230
|
isRead: boolean("is_read").notNull(),
|
|
@@ -600,23 +618,6 @@ export const bodyPartContents = pgTable(
|
|
|
600
618
|
],
|
|
601
619
|
);
|
|
602
620
|
|
|
603
|
-
export const labels = pgTable(
|
|
604
|
-
"label",
|
|
605
|
-
{
|
|
606
|
-
labelId: text("label_id").primaryKey().$defaultFn(() => generateBase36Id()),
|
|
607
|
-
accountConfigId: text("account_config_id").notNull(),
|
|
608
|
-
name: text("name").notNull(),
|
|
609
|
-
normalizedName: text("normalized_name").notNull(),
|
|
610
|
-
color: text("color").$type<"Default" | "Red" | "Orange" | "Yellow" | "Green" | "Teal" | "Blue" | "Purple" | "Gray">().notNull().default("Default"),
|
|
611
|
-
createdAt: bigint("created_at", { mode: "number" }).notNull(),
|
|
612
|
-
updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
|
|
613
|
-
},
|
|
614
|
-
(table) => [
|
|
615
|
-
index("label_by_normalized_name").on(table.accountConfigId, table.normalizedName),
|
|
616
|
-
index("label_primary").on(table.accountConfigId, table.labelId),
|
|
617
|
-
],
|
|
618
|
-
);
|
|
619
|
-
|
|
620
621
|
export const messageLabels = pgTable(
|
|
621
622
|
"message_label",
|
|
622
623
|
{
|