@remit/drizzle-pg-schema 0.0.58 → 0.0.60

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 CHANGED
@@ -2319,6 +2319,21 @@ export declare const organizeJobRequests: import("drizzle-orm/pg-core").PgTableW
2319
2319
  identity: undefined;
2320
2320
  generated: undefined;
2321
2321
  }>;
2322
+ sourceMailboxId: import("drizzle-orm/pg-core").PgBuildColumn<"organize_job_request", import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>>>, {
2323
+ name: string;
2324
+ tableName: "organize_job_request";
2325
+ dataType: "string";
2326
+ data: string;
2327
+ driverParam: string;
2328
+ notNull: true;
2329
+ hasDefault: true;
2330
+ isPrimaryKey: false;
2331
+ isAutoincrement: false;
2332
+ hasRuntimeDefault: false;
2333
+ enumValues: undefined;
2334
+ identity: undefined;
2335
+ generated: undefined;
2336
+ }>;
2322
2337
  matchedCount: import("drizzle-orm/pg-core").PgBuildColumn<"organize_job_request", import("drizzle-orm/pg-core").SetHasDefault<import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgIntegerBuilder>>, {
2323
2338
  name: string;
2324
2339
  tableName: "organize_job_request";
@@ -7980,3 +7995,101 @@ export declare const messageLabels: import("drizzle-orm/pg-core").PgTableWithCol
7980
7995
  dialect: "pg";
7981
7996
  isAlias: false;
7982
7997
  }>;
7998
+ export declare const labelMailboxes: import("drizzle-orm/pg-core").PgTableWithColumns<{
7999
+ name: "label_mailbox";
8000
+ schema: undefined;
8001
+ columns: {
8002
+ labelMailboxId: import("drizzle-orm/pg-core").PgBuildColumn<"label_mailbox", import("drizzle-orm/pg-core").SetHasRuntimeDefault<import("drizzle-orm/pg-core").SetIsPrimaryKey<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>>>, {
8003
+ name: string;
8004
+ tableName: "label_mailbox";
8005
+ dataType: "string";
8006
+ data: string;
8007
+ driverParam: string;
8008
+ notNull: true;
8009
+ hasDefault: true;
8010
+ isPrimaryKey: false;
8011
+ isAutoincrement: false;
8012
+ hasRuntimeDefault: false;
8013
+ enumValues: undefined;
8014
+ identity: undefined;
8015
+ generated: undefined;
8016
+ }>;
8017
+ labelId: import("drizzle-orm/pg-core").PgBuildColumn<"label_mailbox", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>>, {
8018
+ name: string;
8019
+ tableName: "label_mailbox";
8020
+ dataType: "string";
8021
+ data: string;
8022
+ driverParam: string;
8023
+ notNull: true;
8024
+ hasDefault: false;
8025
+ isPrimaryKey: false;
8026
+ isAutoincrement: false;
8027
+ hasRuntimeDefault: false;
8028
+ enumValues: undefined;
8029
+ identity: undefined;
8030
+ generated: undefined;
8031
+ }>;
8032
+ accountId: import("drizzle-orm/pg-core").PgBuildColumn<"label_mailbox", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>>, {
8033
+ name: string;
8034
+ tableName: "label_mailbox";
8035
+ dataType: "string";
8036
+ data: string;
8037
+ driverParam: string;
8038
+ notNull: true;
8039
+ hasDefault: false;
8040
+ isPrimaryKey: false;
8041
+ isAutoincrement: false;
8042
+ hasRuntimeDefault: false;
8043
+ enumValues: undefined;
8044
+ identity: undefined;
8045
+ generated: undefined;
8046
+ }>;
8047
+ mailboxId: import("drizzle-orm/pg-core").PgBuildColumn<"label_mailbox", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgTextBuilder<[string, ...string[]]>>, {
8048
+ name: string;
8049
+ tableName: "label_mailbox";
8050
+ dataType: "string";
8051
+ data: string;
8052
+ driverParam: string;
8053
+ notNull: true;
8054
+ hasDefault: false;
8055
+ isPrimaryKey: false;
8056
+ isAutoincrement: false;
8057
+ hasRuntimeDefault: false;
8058
+ enumValues: undefined;
8059
+ identity: undefined;
8060
+ generated: undefined;
8061
+ }>;
8062
+ createdAt: import("drizzle-orm/pg-core").PgBuildColumn<"label_mailbox", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgBigInt53Builder>, {
8063
+ name: string;
8064
+ tableName: "label_mailbox";
8065
+ dataType: "number int53";
8066
+ data: number;
8067
+ driverParam: string | number;
8068
+ notNull: true;
8069
+ hasDefault: false;
8070
+ isPrimaryKey: false;
8071
+ isAutoincrement: false;
8072
+ hasRuntimeDefault: false;
8073
+ enumValues: undefined;
8074
+ identity: undefined;
8075
+ generated: undefined;
8076
+ }>;
8077
+ updatedAt: import("drizzle-orm/pg-core").PgBuildColumn<"label_mailbox", import("drizzle-orm/pg-core").SetNotNull<import("drizzle-orm/pg-core").PgBigInt53Builder>, {
8078
+ name: string;
8079
+ tableName: "label_mailbox";
8080
+ dataType: "number int53";
8081
+ data: number;
8082
+ driverParam: string | number;
8083
+ notNull: true;
8084
+ hasDefault: false;
8085
+ isPrimaryKey: false;
8086
+ isAutoincrement: false;
8087
+ hasRuntimeDefault: false;
8088
+ enumValues: undefined;
8089
+ identity: undefined;
8090
+ generated: undefined;
8091
+ }>;
8092
+ };
8093
+ dialect: "pg";
8094
+ isAlias: false;
8095
+ }>;
package/dist/schema.js CHANGED
@@ -180,6 +180,7 @@ export const organizeJobRequests = pgTable("organize_job_request", {
180
180
  rule: jsonb("rule").notNull().default({ "version": 0 }),
181
181
  actionLabelId: text("action_label_id").notNull().default("None"),
182
182
  actionMailboxId: text("action_mailbox_id").notNull().default("None"),
183
+ sourceMailboxId: text("source_mailbox_id").notNull().default("None"),
183
184
  matchedCount: integer("matched_count").notNull().default(0),
184
185
  appliedCount: integer("applied_count").notNull().default(0),
185
186
  failedCount: integer("failed_count").notNull().default(0),
@@ -680,3 +681,14 @@ export const messageLabels = pgTable("message_label", {
680
681
  index("message_label_by_label_id").on(table.accountConfigId, table.labelId, table.createdAt),
681
682
  index("message_label_by_message_id").on(table.messageId, table.labelId),
682
683
  ]);
684
+ export const labelMailboxes = pgTable("label_mailbox", {
685
+ labelMailboxId: text("label_mailbox_id").primaryKey().$defaultFn(() => generateBase36Id()),
686
+ labelId: text("label_id").notNull(),
687
+ accountId: text("account_id").notNull(),
688
+ mailboxId: text("mailbox_id").notNull(),
689
+ createdAt: bigint("created_at", { mode: "number" }).notNull(),
690
+ updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
691
+ }, (table) => [
692
+ index("label_mailbox_by_label_id").on(table.labelId, table.accountId),
693
+ index("label_mailbox_by_account_id").on(table.accountId, table.labelId),
694
+ ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/drizzle-pg-schema",
3
- "version": "0.0.58",
3
+ "version": "0.0.60",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -16,7 +16,7 @@
16
16
  "prepare": "tsc"
17
17
  },
18
18
  "peerDependencies": {
19
- "drizzle-orm": ">=0.30.0",
19
+ "drizzle-orm": ">=0.30.0 || >=1.0.0-rc.1",
20
20
  "typescript": ">=5.0.0"
21
21
  },
22
22
  "license": "MIT",
package/schema.ts CHANGED
@@ -223,6 +223,7 @@ export const organizeJobRequests = pgTable(
223
223
  rule: jsonb("rule").notNull().default({"version":0}),
224
224
  actionLabelId: text("action_label_id").notNull().default("None"),
225
225
  actionMailboxId: text("action_mailbox_id").notNull().default("None"),
226
+ sourceMailboxId: text("source_mailbox_id").notNull().default("None"),
226
227
  matchedCount: integer("matched_count").notNull().default(0),
227
228
  appliedCount: integer("applied_count").notNull().default(0),
228
229
  failedCount: integer("failed_count").notNull().default(0),
@@ -872,3 +873,19 @@ export const messageLabels = pgTable(
872
873
  index("message_label_by_message_id").on(table.messageId, table.labelId),
873
874
  ],
874
875
  );
876
+
877
+ export const labelMailboxes = pgTable(
878
+ "label_mailbox",
879
+ {
880
+ labelMailboxId: text("label_mailbox_id").primaryKey().$defaultFn(() => generateBase36Id()),
881
+ labelId: text("label_id").notNull(),
882
+ accountId: text("account_id").notNull(),
883
+ mailboxId: text("mailbox_id").notNull(),
884
+ createdAt: bigint("created_at", { mode: "number" }).notNull(),
885
+ updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
886
+ },
887
+ (table) => [
888
+ index("label_mailbox_by_label_id").on(table.labelId, table.accountId),
889
+ index("label_mailbox_by_account_id").on(table.accountId, table.labelId),
890
+ ],
891
+ );