@mshindi-labs/google 1.0.2 → 1.2.1

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 (61) hide show
  1. package/README.md +8 -4
  2. package/dist/calendar.cjs +1641 -0
  3. package/dist/calendar.cjs.map +1 -0
  4. package/dist/calendar.d.cts +161 -0
  5. package/dist/calendar.d.ts +161 -0
  6. package/dist/calendar.js +1641 -0
  7. package/dist/calendar.js.map +1 -0
  8. package/dist/{chunk-JVP7HHFU.js → chunk-4V5ZJNPI.js} +2 -2
  9. package/dist/{chunk-KJPQ3DMR.cjs → chunk-6PMJ6VB6.cjs} +6 -6
  10. package/dist/{chunk-KJPQ3DMR.cjs.map → chunk-6PMJ6VB6.cjs.map} +1 -1
  11. package/dist/{chunk-SIDO26T7.js → chunk-6RDWEYXZ.js} +11 -4
  12. package/dist/chunk-6RDWEYXZ.js.map +1 -0
  13. package/dist/chunk-AMBBE4TW.js +56 -0
  14. package/dist/chunk-AMBBE4TW.js.map +1 -0
  15. package/dist/{chunk-VN5VWVCT.cjs → chunk-DPAPYMB3.cjs} +63 -56
  16. package/dist/chunk-DPAPYMB3.cjs.map +1 -0
  17. package/dist/{chunk-RWT25QHA.js → chunk-FCHXM22B.js} +45 -3
  18. package/dist/{chunk-RWT25QHA.js.map → chunk-FCHXM22B.js.map} +1 -1
  19. package/dist/{chunk-V22QP2AM.cjs → chunk-JDA3ZRUY.cjs} +3 -3
  20. package/dist/{chunk-V22QP2AM.cjs.map → chunk-JDA3ZRUY.cjs.map} +1 -1
  21. package/dist/{chunk-SHDP4A3A.cjs → chunk-JZVDD4DL.cjs} +44 -2
  22. package/dist/chunk-JZVDD4DL.cjs.map +1 -0
  23. package/dist/chunk-S357VL5V.cjs +56 -0
  24. package/dist/chunk-S357VL5V.cjs.map +1 -0
  25. package/dist/{chunk-Z7O6GO3C.js → chunk-SXD5K23S.js} +2 -2
  26. package/dist/core.cjs +30 -18
  27. package/dist/core.cjs.map +1 -1
  28. package/dist/core.d.cts +23 -4
  29. package/dist/core.d.ts +23 -4
  30. package/dist/core.js +16 -4
  31. package/dist/core.js.map +1 -1
  32. package/dist/{create-google-CPGcK-3G.d.cts → create-google-Bo8_Nc1C.d.cts} +2 -1
  33. package/dist/{create-google-nP9f9jd9.d.ts → create-google-snvkHaEk.d.ts} +2 -1
  34. package/dist/{events-BsWOMtza.d.ts → events-BlC10ISp.d.cts} +31 -0
  35. package/dist/{events-BsWOMtza.d.cts → events-BlC10ISp.d.ts} +31 -0
  36. package/dist/gmail.cjs +48 -75
  37. package/dist/gmail.cjs.map +1 -1
  38. package/dist/gmail.d.cts +2 -2
  39. package/dist/gmail.d.ts +2 -2
  40. package/dist/gmail.js +15 -42
  41. package/dist/gmail.js.map +1 -1
  42. package/dist/postgres.cjs +68 -7
  43. package/dist/postgres.cjs.map +1 -1
  44. package/dist/postgres.d.cts +47 -2
  45. package/dist/postgres.d.ts +47 -2
  46. package/dist/postgres.js +62 -1
  47. package/dist/postgres.js.map +1 -1
  48. package/dist/testing.cjs +226 -13
  49. package/dist/testing.cjs.map +1 -1
  50. package/dist/testing.d.cts +91 -2
  51. package/dist/testing.d.ts +91 -2
  52. package/dist/testing.js +216 -3
  53. package/dist/testing.js.map +1 -1
  54. package/dist/transport-DHApc5oq.d.cts +103 -0
  55. package/dist/transport-DHApc5oq.d.ts +103 -0
  56. package/package.json +27 -5
  57. package/dist/chunk-SHDP4A3A.cjs.map +0 -1
  58. package/dist/chunk-SIDO26T7.js.map +0 -1
  59. package/dist/chunk-VN5VWVCT.cjs.map +0 -1
  60. /package/dist/{chunk-JVP7HHFU.js.map → chunk-4V5ZJNPI.js.map} +0 -0
  61. /package/dist/{chunk-Z7O6GO3C.js.map → chunk-SXD5K23S.js.map} +0 -0
package/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # @mshindi-labs/google
2
2
 
3
3
  Multi-tenant Google API utilities for TypeScript. Each tenant brings its own Google
4
- OAuth client; tokens are envelope-encrypted at rest; v1 sends email through Gmail.
4
+ OAuth client; tokens are envelope-encrypted at rest; it sends email through Gmail and books
5
+ interviews on Google Calendar.
5
6
 
6
7
  ```sh
7
8
  npm i @mshindi-labs/google @googleapis/gmail nodemailer html-to-text
@@ -53,8 +54,8 @@ await gmail.send({
53
54
  });
54
55
  ```
55
56
 
56
- Entry points: `/core`, `/gmail`, `/postgres`, `/testing` (there is no root import).
57
- Optional peers (`@googleapis/gmail`, `nodemailer`, `html-to-text`, KMS clients) are
57
+ Entry points: `/core`, `/gmail`, `/calendar`, `/postgres`, `/testing` (there is no root import).
58
+ Optional peers (`@googleapis/gmail`, `@googleapis/calendar`, `nodemailer`, `html-to-text`, KMS clients) are
58
59
  loaded on first use; a missing one throws `MissingPeerDependencyError` with the
59
60
  `npm i` command to run.
60
61
 
@@ -67,7 +68,9 @@ own error classes and `instanceof` can be false for a genuine library error.
67
68
 
68
69
  - [Tenant setup](docs/guides/tenant-setup.md): for a tenant admin creating the Google OAuth client.
69
70
  - [Host integration](docs/guides/host-integration.md): wiring, routes, error messages, key providers.
71
+ - [Calendar scheduling](docs/guides/calendar-scheduling.md): idempotent interview booking, reschedule, cancel, free/busy.
70
72
  - [Bulk sending](docs/guides/bulk-sending.md): a queue pattern that never double-sends.
73
+ - [Prisma and TypeORM](docs/guides/orm-integration.md): plugging an ORM into the Postgres store.
71
74
  - [Postgres row-level security](docs/guides/postgres-rls.md): optional database-enforced tenant isolation.
72
75
  - [Design spec](docs/SPEC.md): invariants, flows, threat model.
73
76
 
@@ -81,7 +84,8 @@ own error classes and `instanceof` can be false for a genuine library error.
81
84
  - **Hardened OAuth.** Single-use hashed `state` bound to tenant and actor, PKCE S256, a
82
85
  fixed HTTPS redirect URI, and ID token checks (audience, verified email, hosted
83
86
  domain, intended account).
84
- - **Least privilege.** Only `openid email` and `gmail.send`. Tokens are revoked at
87
+ - **Least privilege.** Only `openid email`, `gmail.send` and, for Calendar, `calendar.events.owned` and
88
+ `calendar.events.freebusy`. Tokens are revoked at
85
89
  Google on a wrong-account or partial-scope consent, and when a tenant disconnects.
86
90
  - **No secrets in output.** Errors, events and logs are redacted; events never carry
87
91
  bodies, tokens or secrets, and recipients can be hashed (`redactRecipients`).