@mshindi-labs/google 1.1.0 → 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.
- package/README.md +7 -4
- package/dist/calendar.cjs +1641 -0
- package/dist/calendar.cjs.map +1 -0
- package/dist/calendar.d.cts +161 -0
- package/dist/calendar.d.ts +161 -0
- package/dist/calendar.js +1641 -0
- package/dist/calendar.js.map +1 -0
- package/dist/{chunk-JVP7HHFU.js → chunk-4V5ZJNPI.js} +2 -2
- package/dist/{chunk-KJPQ3DMR.cjs → chunk-6PMJ6VB6.cjs} +6 -6
- package/dist/{chunk-KJPQ3DMR.cjs.map → chunk-6PMJ6VB6.cjs.map} +1 -1
- package/dist/{chunk-SIDO26T7.js → chunk-6RDWEYXZ.js} +11 -4
- package/dist/chunk-6RDWEYXZ.js.map +1 -0
- package/dist/chunk-AMBBE4TW.js +56 -0
- package/dist/chunk-AMBBE4TW.js.map +1 -0
- package/dist/{chunk-VN5VWVCT.cjs → chunk-DPAPYMB3.cjs} +63 -56
- package/dist/chunk-DPAPYMB3.cjs.map +1 -0
- package/dist/{chunk-RWT25QHA.js → chunk-FCHXM22B.js} +45 -3
- package/dist/{chunk-RWT25QHA.js.map → chunk-FCHXM22B.js.map} +1 -1
- package/dist/{chunk-V22QP2AM.cjs → chunk-JDA3ZRUY.cjs} +3 -3
- package/dist/{chunk-V22QP2AM.cjs.map → chunk-JDA3ZRUY.cjs.map} +1 -1
- package/dist/{chunk-SHDP4A3A.cjs → chunk-JZVDD4DL.cjs} +44 -2
- package/dist/chunk-JZVDD4DL.cjs.map +1 -0
- package/dist/chunk-S357VL5V.cjs +56 -0
- package/dist/chunk-S357VL5V.cjs.map +1 -0
- package/dist/{chunk-Z7O6GO3C.js → chunk-SXD5K23S.js} +2 -2
- package/dist/core.cjs +30 -18
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.cts +23 -4
- package/dist/core.d.ts +23 -4
- package/dist/core.js +16 -4
- package/dist/core.js.map +1 -1
- package/dist/{create-google-CPGcK-3G.d.cts → create-google-Bo8_Nc1C.d.cts} +2 -1
- package/dist/{create-google-nP9f9jd9.d.ts → create-google-snvkHaEk.d.ts} +2 -1
- package/dist/{events-BsWOMtza.d.ts → events-BlC10ISp.d.cts} +31 -0
- package/dist/{events-BsWOMtza.d.cts → events-BlC10ISp.d.ts} +31 -0
- package/dist/gmail.cjs +48 -75
- package/dist/gmail.cjs.map +1 -1
- package/dist/gmail.d.cts +2 -2
- package/dist/gmail.d.ts +2 -2
- package/dist/gmail.js +15 -42
- package/dist/gmail.js.map +1 -1
- package/dist/postgres.cjs +8 -8
- package/dist/postgres.d.cts +1 -1
- package/dist/postgres.d.ts +1 -1
- package/dist/postgres.js +1 -1
- package/dist/testing.cjs +226 -13
- package/dist/testing.cjs.map +1 -1
- package/dist/testing.d.cts +91 -2
- package/dist/testing.d.ts +91 -2
- package/dist/testing.js +216 -3
- package/dist/testing.js.map +1 -1
- package/dist/transport-DHApc5oq.d.cts +103 -0
- package/dist/transport-DHApc5oq.d.ts +103 -0
- package/package.json +19 -4
- package/dist/chunk-SHDP4A3A.cjs.map +0 -1
- package/dist/chunk-SIDO26T7.js.map +0 -1
- package/dist/chunk-VN5VWVCT.cjs.map +0 -1
- /package/dist/{chunk-JVP7HHFU.js.map → chunk-4V5ZJNPI.js.map} +0 -0
- /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;
|
|
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,6 +68,7 @@ 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.
|
|
71
73
|
- [Prisma and TypeORM](docs/guides/orm-integration.md): plugging an ORM into the Postgres store.
|
|
72
74
|
- [Postgres row-level security](docs/guides/postgres-rls.md): optional database-enforced tenant isolation.
|
|
@@ -82,7 +84,8 @@ own error classes and `instanceof` can be false for a genuine library error.
|
|
|
82
84
|
- **Hardened OAuth.** Single-use hashed `state` bound to tenant and actor, PKCE S256, a
|
|
83
85
|
fixed HTTPS redirect URI, and ID token checks (audience, verified email, hosted
|
|
84
86
|
domain, intended account).
|
|
85
|
-
- **Least privilege.** Only `openid email
|
|
87
|
+
- **Least privilege.** Only `openid email`, `gmail.send` and, for Calendar, `calendar.events.owned` and
|
|
88
|
+
`calendar.events.freebusy`. Tokens are revoked at
|
|
86
89
|
Google on a wrong-account or partial-scope consent, and when a tenant disconnects.
|
|
87
90
|
- **No secrets in output.** Errors, events and logs are redacted; events never carry
|
|
88
91
|
bodies, tokens or secrets, and recipients can be hashed (`redactRecipients`).
|