@remit/drizzle-pg-schema 0.0.23 → 0.0.25

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
@@ -843,6 +843,23 @@ export declare const accounts: import("drizzle-orm/pg-core").PgTableWithColumns<
843
843
  }, {}, {
844
844
  $type: "password" | "oauthMicrosoft";
845
845
  }>;
846
+ syncedServices: import("drizzle-orm/pg-core").PgColumn<{
847
+ name: "synced_services";
848
+ tableName: "account";
849
+ dataType: "json";
850
+ columnType: "PgJsonb";
851
+ data: unknown;
852
+ driverParam: unknown;
853
+ notNull: true;
854
+ hasDefault: false;
855
+ isPrimaryKey: false;
856
+ isAutoincrement: false;
857
+ hasRuntimeDefault: false;
858
+ enumValues: undefined;
859
+ baseColumn: never;
860
+ identity: undefined;
861
+ generated: undefined;
862
+ }, {}, {}>;
846
863
  passwordHash: import("drizzle-orm/pg-core").PgColumn<{
847
864
  name: "password_hash";
848
865
  tableName: "account";
@@ -1616,8 +1633,8 @@ export declare const mailboxes: import("drizzle-orm/pg-core").PgTableWithColumns
1616
1633
  columnType: "PgText";
1617
1634
  data: "deleting" | "synced" | "pending" | "failed";
1618
1635
  driverParam: string;
1619
- notNull: false;
1620
- hasDefault: false;
1636
+ notNull: true;
1637
+ hasDefault: true;
1621
1638
  isPrimaryKey: false;
1622
1639
  isAutoincrement: false;
1623
1640
  hasRuntimeDefault: false;
@@ -1628,43 +1645,43 @@ export declare const mailboxes: import("drizzle-orm/pg-core").PgTableWithColumns
1628
1645
  }, {}, {
1629
1646
  $type: "deleting" | "synced" | "pending" | "failed";
1630
1647
  }>;
1631
- cursorState: import("drizzle-orm/pg-core").PgColumn<{
1632
- name: "cursor_state";
1648
+ pendingPath: import("drizzle-orm/pg-core").PgColumn<{
1649
+ name: "pending_path";
1633
1650
  tableName: "mailbox";
1634
- dataType: "string";
1635
- columnType: "PgText";
1636
- data: "normal" | "cursor_invalid" | "rebuilding";
1651
+ dataType: "custom";
1652
+ columnType: "PgCustomColumn";
1653
+ data: string;
1637
1654
  driverParam: string;
1638
- notNull: true;
1639
- hasDefault: true;
1655
+ notNull: false;
1656
+ hasDefault: false;
1640
1657
  isPrimaryKey: false;
1641
1658
  isAutoincrement: false;
1642
1659
  hasRuntimeDefault: false;
1643
- enumValues: [string, ...string[]];
1660
+ enumValues: undefined;
1644
1661
  baseColumn: never;
1645
1662
  identity: undefined;
1646
1663
  generated: undefined;
1647
1664
  }, {}, {
1648
- $type: "normal" | "cursor_invalid" | "rebuilding";
1665
+ pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
1649
1666
  }>;
1650
- oldPath: import("drizzle-orm/pg-core").PgColumn<{
1651
- name: "old_path";
1667
+ cursorState: import("drizzle-orm/pg-core").PgColumn<{
1668
+ name: "cursor_state";
1652
1669
  tableName: "mailbox";
1653
- dataType: "custom";
1654
- columnType: "PgCustomColumn";
1655
- data: string;
1670
+ dataType: "string";
1671
+ columnType: "PgText";
1672
+ data: "normal" | "cursor_invalid" | "rebuilding";
1656
1673
  driverParam: string;
1657
- notNull: false;
1658
- hasDefault: false;
1674
+ notNull: true;
1675
+ hasDefault: true;
1659
1676
  isPrimaryKey: false;
1660
1677
  isAutoincrement: false;
1661
1678
  hasRuntimeDefault: false;
1662
- enumValues: undefined;
1679
+ enumValues: [string, ...string[]];
1663
1680
  baseColumn: never;
1664
1681
  identity: undefined;
1665
1682
  generated: undefined;
1666
1683
  }, {}, {
1667
- pgColumnBuilderBrand: "PgCustomColumnBuilderBrand";
1684
+ $type: "normal" | "cursor_invalid" | "rebuilding";
1668
1685
  }>;
1669
1686
  specialUse: import("drizzle-orm/pg-core").PgColumn<{
1670
1687
  name: "special_use";
package/dist/schema.js CHANGED
@@ -59,6 +59,7 @@ export const accounts = pgTable("account", {
59
59
  username: text("username").notNull(),
60
60
  email: text("email").notNull(),
61
61
  authType: text("auth_type").$type().notNull().default("password"),
62
+ syncedServices: jsonb("synced_services").notNull(),
62
63
  passwordHash: nullableText("password_hash"),
63
64
  oauthRefreshTokenHash: nullableText("oauth_refresh_token_hash"),
64
65
  oauthTokenUpdatedAt: nullableBigint("oauth_token_updated_at"),
@@ -106,9 +107,9 @@ export const mailboxes = pgTable("mailbox", {
106
107
  lastMessageSyncAt: bigint("last_message_sync_at", { mode: "number" }).notNull(),
107
108
  initialSyncCompletedAt: nullableBigint("initial_sync_completed_at"),
108
109
  parentMailboxId: text("parent_mailbox_id").notNull().default("None"),
109
- syncStatus: text("sync_status").$type(),
110
+ syncStatus: text("sync_status").$type().notNull().default("synced"),
111
+ pendingPath: nullableText("pending_path"),
110
112
  cursorState: text("cursor_state").$type().notNull().default("normal"),
111
- oldPath: nullableText("old_path"),
112
113
  specialUse: jsonb("special_use"),
113
114
  createdAt: bigint("created_at", { mode: "number" }).notNull(),
114
115
  updatedAt: bigint("updated_at", { mode: "number" }).notNull(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/drizzle-pg-schema",
3
- "version": "0.0.23",
3
+ "version": "0.0.25",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/schema.ts CHANGED
@@ -77,6 +77,7 @@ export const accounts = pgTable(
77
77
  username: text("username").notNull(),
78
78
  email: text("email").notNull(),
79
79
  authType: text("auth_type").$type<"password" | "oauthMicrosoft">().notNull().default("password"),
80
+ syncedServices: jsonb("synced_services").notNull(),
80
81
  passwordHash: nullableText("password_hash"),
81
82
  oauthRefreshTokenHash: nullableText("oauth_refresh_token_hash"),
82
83
  oauthTokenUpdatedAt: nullableBigint("oauth_token_updated_at"),
@@ -129,9 +130,9 @@ export const mailboxes = pgTable(
129
130
  lastMessageSyncAt: bigint("last_message_sync_at", { mode: "number" }).notNull(),
130
131
  initialSyncCompletedAt: nullableBigint("initial_sync_completed_at"),
131
132
  parentMailboxId: text("parent_mailbox_id").notNull().default("None"),
132
- syncStatus: text("sync_status").$type<"synced" | "pending" | "failed" | "deleting">(),
133
+ syncStatus: text("sync_status").$type<"synced" | "pending" | "failed" | "deleting">().notNull().default("synced"),
134
+ pendingPath: nullableText("pending_path"),
133
135
  cursorState: text("cursor_state").$type<"normal" | "cursor_invalid" | "rebuilding">().notNull().default("normal"),
134
- oldPath: nullableText("old_path"),
135
136
  specialUse: jsonb("special_use"),
136
137
  createdAt: bigint("created_at", { mode: "number" }).notNull(),
137
138
  updatedAt: bigint("updated_at", { mode: "number" }).notNull(),