@bobfrankston/rmfmail 1.2.223 → 1.2.224

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.
Files changed (47) hide show
  1. package/client/android-bootstrap.bundle.js +38 -4
  2. package/client/android-bootstrap.bundle.js.map +2 -2
  3. package/client/app.bundle.js +81 -31
  4. package/client/app.bundle.js.map +2 -2
  5. package/client/components/address-book.js +93 -29
  6. package/client/components/address-book.js.map +1 -1
  7. package/client/components/address-book.ts +103 -24
  8. package/client/compose/compose.bundle.js +2 -2
  9. package/client/compose/compose.bundle.js.map +2 -2
  10. package/client/lib/api-client.js +2 -2
  11. package/client/lib/api-client.js.map +1 -1
  12. package/client/lib/api-client.ts +2 -2
  13. package/client/lib/mailxapi.js +2 -2
  14. package/client/styles/components.css +40 -0
  15. package/package.json +5 -5
  16. package/packages/mailx-imap/index.d.ts.map +1 -1
  17. package/packages/mailx-imap/index.js +32 -4
  18. package/packages/mailx-imap/index.js.map +1 -1
  19. package/packages/mailx-imap/index.ts +34 -5
  20. package/packages/mailx-imap/package-lock.json +2 -2
  21. package/packages/mailx-imap/package.json +1 -1
  22. package/packages/mailx-service/index.d.ts +1 -1
  23. package/packages/mailx-service/index.d.ts.map +1 -1
  24. package/packages/mailx-service/index.js +33 -4
  25. package/packages/mailx-service/index.js.map +1 -1
  26. package/packages/mailx-service/index.ts +28 -4
  27. package/packages/mailx-service/jsonrpc.js +1 -1
  28. package/packages/mailx-service/jsonrpc.js.map +1 -1
  29. package/packages/mailx-service/jsonrpc.ts +1 -1
  30. package/packages/mailx-service/package.json +1 -1
  31. package/packages/mailx-store/db.d.ts +30 -10
  32. package/packages/mailx-store/db.d.ts.map +1 -1
  33. package/packages/mailx-store/db.js +108 -10
  34. package/packages/mailx-store/db.js.map +1 -1
  35. package/packages/mailx-store/db.ts +126 -13
  36. package/packages/mailx-store/package.json +1 -1
  37. package/packages/mailx-store-web/android-bootstrap.d.ts.map +1 -1
  38. package/packages/mailx-store-web/android-bootstrap.js +17 -2
  39. package/packages/mailx-store-web/android-bootstrap.js.map +1 -1
  40. package/packages/mailx-store-web/android-bootstrap.ts +17 -2
  41. package/packages/mailx-store-web/db.d.ts +1 -1
  42. package/packages/mailx-store-web/db.d.ts.map +1 -1
  43. package/packages/mailx-store-web/db.js +17 -2
  44. package/packages/mailx-store-web/db.js.map +1 -1
  45. package/packages/mailx-store-web/db.ts +18 -3
  46. package/packages/mailx-store-web/package.json +1 -1
  47. /package/packages/mailx-imap/{node_modules.npmglobalize-stash-65000 → node_modules.npmglobalize-stash-142920}/.package-lock.json +0 -0
@@ -5061,6 +5061,15 @@ var SCHEMA = `
5061
5061
  name TEXT DEFAULT '',
5062
5062
  email TEXT NOT NULL,
5063
5063
  organization TEXT DEFAULT '',
5064
+ -- Full contact card, mirroring mailx-store v3. Android keeps its own
5065
+ -- IndexedDB-backed store, so the columns have to be declared here too
5066
+ -- or the same Google People fields get dropped on mobile.
5067
+ phone TEXT DEFAULT '',
5068
+ title TEXT DEFAULT '',
5069
+ address TEXT DEFAULT '',
5070
+ website TEXT DEFAULT '',
5071
+ notes TEXT DEFAULT '',
5072
+ birthday TEXT DEFAULT '',
5064
5073
  last_used INTEGER DEFAULT 0,
5065
5074
  use_count INTEGER DEFAULT 0,
5066
5075
  updated_at INTEGER NOT NULL,
@@ -5508,10 +5517,23 @@ var WebMailxDB = class {
5508
5517
  * Web side mirrors mailx-store/db.ts — the Google sync calls
5509
5518
  * `recordSentAddress` first to upsert, then this to attach the
5510
5519
  * Google identity for incremental delete tracking. */
5511
- setContactGoogleId(email, googleId, organization) {
5520
+ setContactGoogleId(email, googleId, organization, card) {
5512
5521
  if (!email)
5513
5522
  return;
5514
- this.run("UPDATE contacts SET source = 'google', google_id = ?, organization = ?, updated_at = ? WHERE email = ?", [googleId, organization || "", Date.now(), email]);
5523
+ this.run(`UPDATE contacts SET source = 'google', google_id = ?, organization = ?, title = ?,
5524
+ phone = ?, address = ?, website = ?, notes = ?, birthday = ?, updated_at = ?
5525
+ WHERE email = ?`, [
5526
+ googleId,
5527
+ organization || "",
5528
+ card?.title || "",
5529
+ card?.phone || "",
5530
+ card?.address || "",
5531
+ card?.website || "",
5532
+ card?.notes || "",
5533
+ card?.birthday || "",
5534
+ Date.now(),
5535
+ email
5536
+ ]);
5515
5537
  }
5516
5538
  recordSentAddress(name, email) {
5517
5539
  if (isJunkContact(email, name))
@@ -11241,7 +11263,9 @@ async function syncGoogleContactsForAccount(db2, accountId, tokenProvider2) {
11241
11263
  try {
11242
11264
  do {
11243
11265
  const params = new URLSearchParams({
11244
- personFields: "names,emailAddresses,organizations,photos",
11266
+ // Full contact card — matches the desktop sync in
11267
+ // mailx-imap so mobile doesn't silently hold less.
11268
+ personFields: "names,emailAddresses,organizations,photos,phoneNumbers,addresses,urls,biographies,birthdays",
11245
11269
  pageSize: "100"
11246
11270
  });
11247
11271
  if (nextPageToken) params.set("pageToken", nextPageToken);
@@ -11273,13 +11297,23 @@ async function syncGoogleContactsForAccount(db2, accountId, tokenProvider2) {
11273
11297
  }
11274
11298
  const name = person.names?.[0]?.displayName || "";
11275
11299
  const org = person.organizations?.[0]?.name || "";
11300
+ const bd = person.birthdays?.[0]?.date;
11301
+ const pad = (n) => String(n).padStart(2, "0");
11302
+ const card = {
11303
+ title: person.organizations?.[0]?.title || "",
11304
+ phone: person.phoneNumbers?.[0]?.value || "",
11305
+ address: person.addresses?.[0]?.formattedValue || "",
11306
+ website: person.urls?.[0]?.value || "",
11307
+ notes: person.biographies?.[0]?.value || "",
11308
+ birthday: bd?.month && bd?.day ? `${bd.year ? bd.year : "-"}-${pad(bd.month)}-${pad(bd.day)}` : ""
11309
+ };
11276
11310
  for (const e of person.emailAddresses || []) {
11277
11311
  const email = e.value?.toLowerCase();
11278
11312
  if (!email) continue;
11279
11313
  const existing = db2.searchContacts(email, 1);
11280
11314
  const wasNew = !(existing.length > 0 && existing[0].email === email);
11281
11315
  db2.recordSentAddress(name, email);
11282
- db2.setContactGoogleId(email, googleId, org);
11316
+ db2.setContactGoogleId(email, googleId, org, card);
11283
11317
  if (wasNew) changed++;
11284
11318
  }
11285
11319
  }