@elizaos/plugin-google 2.0.0-beta.1 → 2.0.3-beta.3
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/LICENSE +21 -0
- package/README.md +124 -17
- package/package.json +22 -4
- package/registry-entry.json +82 -0
- package/dist/auth.d.ts +0 -9
- package/dist/auth.d.ts.map +0 -1
- package/dist/auth.js +0 -45
- package/dist/auth.js.map +0 -1
- package/dist/calendar.d.ts +0 -26
- package/dist/calendar.d.ts.map +0 -1
- package/dist/calendar.js +0 -237
- package/dist/calendar.js.map +0 -1
- package/dist/client-factory.d.ts +0 -17
- package/dist/client-factory.d.ts.map +0 -1
- package/dist/client-factory.js +0 -66
- package/dist/client-factory.js.map +0 -1
- package/dist/connector-account-provider.d.ts +0 -23
- package/dist/connector-account-provider.d.ts.map +0 -1
- package/dist/connector-account-provider.js +0 -348
- package/dist/connector-account-provider.js.map +0 -1
- package/dist/connector-credential-refs.d.ts +0 -43
- package/dist/connector-credential-refs.d.ts.map +0 -1
- package/dist/connector-credential-refs.js +0 -252
- package/dist/connector-credential-refs.js.map +0 -1
- package/dist/credential-resolver.d.ts +0 -45
- package/dist/credential-resolver.d.ts.map +0 -1
- package/dist/credential-resolver.js +0 -525
- package/dist/credential-resolver.js.map +0 -1
- package/dist/drive.d.ts +0 -41
- package/dist/drive.d.ts.map +0 -1
- package/dist/drive.js +0 -207
- package/dist/drive.js.map +0 -1
- package/dist/gmail.d.ts +0 -89
- package/dist/gmail.d.ts.map +0 -1
- package/dist/gmail.js +0 -765
- package/dist/gmail.js.map +0 -1
- package/dist/index.d.ts +0 -16
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -46
- package/dist/index.js.map +0 -1
- package/dist/meet.d.ts +0 -61
- package/dist/meet.d.ts.map +0 -1
- package/dist/meet.js +0 -329
- package/dist/meet.js.map +0 -1
- package/dist/scopes.d.ts +0 -59
- package/dist/scopes.d.ts.map +0 -1
- package/dist/scopes.js +0 -142
- package/dist/scopes.js.map +0 -1
- package/dist/service.d.ts +0 -165
- package/dist/service.d.ts.map +0 -1
- package/dist/service.js +0 -170
- package/dist/service.js.map +0 -1
- package/dist/types.d.ts +0 -492
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -9
- package/dist/types.js.map +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Shaw Walters and elizaOS Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,22 +1,129 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @elizaos/plugin-google
|
|
2
2
|
|
|
3
|
-
Workspace
|
|
3
|
+
Google Workspace integration for [elizaOS](https://github.com/elizaOS/eliza) agents — Gmail, Google Calendar, Google Drive, and Google Meet, all under a single per-account OAuth grant.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
services under one selected-scope OAuth grant. It intentionally does not include Google Chat;
|
|
7
|
-
`@elizaos/plugin-google-chat` remains the bot connector for Google Chat spaces.
|
|
5
|
+
## What it does
|
|
8
6
|
|
|
9
|
-
The
|
|
10
|
-
scopes are derived from selected capabilities instead of requesting all Google Workspace scopes.
|
|
11
|
-
Credential persistence is intentionally out of scope. The default
|
|
12
|
-
`DefaultGoogleCredentialResolver` reads from the shared connector account manager/storage and
|
|
13
|
-
credential vault services when the host provides them; consumers can still inject a
|
|
14
|
-
`GoogleCredentialResolver` for tests or custom hosts.
|
|
7
|
+
This plugin adds `GoogleWorkspaceService` to an Eliza agent runtime. The service exposes typed methods for reading and writing to Gmail, Calendar, Drive (including Docs and Sheets), and Meet. Authentication is account-scoped: every method call includes an `accountId` that maps to a stored OAuth token, so one agent can operate across multiple Google accounts simultaneously.
|
|
15
8
|
|
|
16
|
-
|
|
9
|
+
The plugin also registers with the elizaOS `ConnectorAccountManager` so the built-in connector HTTP routes can manage Google accounts (list, create, delete) and run the OAuth flow (PKCE, offline access, incremental consent) without extra integration work.
|
|
17
10
|
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
11
|
+
> **Not included:** Google Chat. Use `@elizaos/plugin-google-chat` for bot connectors to Google Chat spaces.
|
|
12
|
+
|
|
13
|
+
## Capabilities
|
|
14
|
+
|
|
15
|
+
### Gmail
|
|
16
|
+
|
|
17
|
+
- Search messages by query string
|
|
18
|
+
- Fetch message metadata and full body
|
|
19
|
+
- Triage inbox (unread, importance score, reply-needed detection)
|
|
20
|
+
- List unresponded threads
|
|
21
|
+
- Send new messages and replies
|
|
22
|
+
- Bulk modify labels/state (archive, trash, mark read/unread, apply/remove labels)
|
|
23
|
+
- Create sender filters
|
|
24
|
+
- Send mailto unsubscribe emails
|
|
25
|
+
|
|
26
|
+
### Google Calendar
|
|
27
|
+
|
|
28
|
+
- List calendars
|
|
29
|
+
- List, get, create, update, and delete events
|
|
30
|
+
- Create events with Google Meet links attached
|
|
31
|
+
|
|
32
|
+
### Google Drive, Docs, and Sheets
|
|
33
|
+
|
|
34
|
+
- Search and list files and folders
|
|
35
|
+
- Get file metadata
|
|
36
|
+
- Read Google Docs as plain text
|
|
37
|
+
- Read Google Sheets as a 2D array of rows
|
|
38
|
+
- Create Drive files (with optional content and parent folder)
|
|
39
|
+
- Append text to a Google Doc
|
|
40
|
+
- Write cell values to a Sheet range
|
|
41
|
+
|
|
42
|
+
### Google Meet
|
|
43
|
+
|
|
44
|
+
- Create meeting spaces
|
|
45
|
+
- Get space details and active conference records
|
|
46
|
+
- List participants, transcripts, and recordings
|
|
47
|
+
- Fetch full transcript entries
|
|
48
|
+
- End an active conference
|
|
49
|
+
- Generate a structured meeting report (summary, key points, action items, full transcript)
|
|
50
|
+
|
|
51
|
+
## Requirements
|
|
52
|
+
|
|
53
|
+
- Node.js (this plugin uses Node-only APIs; not supported in browser or edge environments)
|
|
54
|
+
- A Google Cloud project with the OAuth 2.0 credentials and relevant APIs enabled
|
|
55
|
+
|
|
56
|
+
### Google Cloud APIs to enable
|
|
57
|
+
|
|
58
|
+
- Gmail API
|
|
59
|
+
- Google Calendar API
|
|
60
|
+
- Google Drive API
|
|
61
|
+
- Google Meet API (REST)
|
|
62
|
+
- Google Docs API
|
|
63
|
+
- Google Sheets API
|
|
64
|
+
|
|
65
|
+
## Configuration
|
|
66
|
+
|
|
67
|
+
Set these environment variables (or provide them via agent `pluginParameters`):
|
|
68
|
+
|
|
69
|
+
| Variable | Required | Description |
|
|
70
|
+
|----------|----------|-------------|
|
|
71
|
+
| `GOOGLE_CLIENT_ID` | No (required for OAuth) | OAuth 2.0 client ID from Google Cloud Console |
|
|
72
|
+
| `GOOGLE_CLIENT_SECRET` | No (required for OAuth) | OAuth 2.0 client secret (keep private) |
|
|
73
|
+
| `GOOGLE_REDIRECT_URI` | No (required for OAuth) | Redirect URI registered in Google Cloud Console |
|
|
74
|
+
|
|
75
|
+
Without all three the OAuth flow throws an error; the service itself still starts (read-only agents that inject pre-issued tokens can skip OAuth).
|
|
76
|
+
|
|
77
|
+
## Enabling the plugin
|
|
78
|
+
|
|
79
|
+
Add the plugin to your elizaOS agent configuration:
|
|
80
|
+
|
|
81
|
+
```ts
|
|
82
|
+
import { googlePlugin } from "@elizaos/plugin-google";
|
|
83
|
+
|
|
84
|
+
const agent = {
|
|
85
|
+
plugins: [googlePlugin],
|
|
86
|
+
// ...
|
|
87
|
+
};
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## OAuth scopes
|
|
91
|
+
|
|
92
|
+
Scopes are derived from the set of capabilities requested at OAuth time, not from a hardcoded list. Requesting only `gmail.read` will ask for `gmail.readonly` only, not all Google Workspace scopes. All grants request `openid`, `userinfo.email`, and `userinfo.profile` as identity scopes.
|
|
93
|
+
|
|
94
|
+
Available capabilities: `gmail.read`, `gmail.send`, `gmail.manage`, `calendar.read`, `calendar.write`, `drive.read`, `drive.write`, `meet.create`, `meet.read`.
|
|
95
|
+
|
|
96
|
+
## Using the service
|
|
97
|
+
|
|
98
|
+
```ts
|
|
99
|
+
import type { IGoogleWorkspaceService } from "@elizaos/plugin-google";
|
|
100
|
+
|
|
101
|
+
const google = runtime.getService("google") as IGoogleWorkspaceService;
|
|
102
|
+
|
|
103
|
+
// List upcoming calendar events
|
|
104
|
+
const events = await google.listEvents({
|
|
105
|
+
accountId: "my-google-account-id",
|
|
106
|
+
timeMin: new Date().toISOString(),
|
|
107
|
+
limit: 10,
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
// Send an email
|
|
111
|
+
const result = await google.sendGmailMessage({
|
|
112
|
+
accountId: "my-google-account-id",
|
|
113
|
+
to: ["recipient@example.com"],
|
|
114
|
+
subject: "Hello",
|
|
115
|
+
bodyText: "Message body.",
|
|
116
|
+
});
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Custom credential resolver
|
|
120
|
+
|
|
121
|
+
For testing or non-standard hosting, inject a `GoogleCredentialResolver`:
|
|
122
|
+
|
|
123
|
+
```ts
|
|
124
|
+
import { GoogleWorkspaceService } from "@elizaos/plugin-google";
|
|
125
|
+
|
|
126
|
+
const service = new GoogleWorkspaceService(runtime, {
|
|
127
|
+
credentialResolver: myCustomResolver,
|
|
128
|
+
});
|
|
129
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elizaos/plugin-google",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3-beta.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -9,11 +9,28 @@
|
|
|
9
9
|
"./package.json": "./package.json",
|
|
10
10
|
".": {
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
|
+
"eliza-source": {
|
|
13
|
+
"types": "./src/index.ts",
|
|
14
|
+
"import": "./src/index.ts",
|
|
15
|
+
"default": "./src/index.ts"
|
|
16
|
+
},
|
|
12
17
|
"import": "./dist/index.js",
|
|
13
18
|
"default": "./dist/index.js"
|
|
19
|
+
},
|
|
20
|
+
"./*.css": "./dist/*.css",
|
|
21
|
+
"./*": {
|
|
22
|
+
"types": "./dist/*.d.ts",
|
|
23
|
+
"eliza-source": {
|
|
24
|
+
"types": "./src/*.ts",
|
|
25
|
+
"import": "./src/*.ts",
|
|
26
|
+
"default": "./src/*.ts"
|
|
27
|
+
},
|
|
28
|
+
"import": "./dist/*.js",
|
|
29
|
+
"default": "./dist/*.js"
|
|
14
30
|
}
|
|
15
31
|
},
|
|
16
32
|
"files": [
|
|
33
|
+
"registry-entry.json",
|
|
17
34
|
"dist"
|
|
18
35
|
],
|
|
19
36
|
"publishConfig": {
|
|
@@ -27,10 +44,10 @@
|
|
|
27
44
|
"lint:check": "bunx @biomejs/biome check .",
|
|
28
45
|
"format": "bunx @biomejs/biome format --write .",
|
|
29
46
|
"format:check": "bunx @biomejs/biome format .",
|
|
30
|
-
"typecheck": "
|
|
47
|
+
"typecheck": "tsgo --noEmit"
|
|
31
48
|
},
|
|
32
49
|
"dependencies": {
|
|
33
|
-
"@elizaos/core": "2.0.
|
|
50
|
+
"@elizaos/core": "2.0.3-beta.3",
|
|
34
51
|
"google-auth-library": "^10.0.0",
|
|
35
52
|
"googleapis": "^169.0.0",
|
|
36
53
|
"zod": "^4.4.3"
|
|
@@ -68,5 +85,6 @@
|
|
|
68
85
|
"sensitive": false
|
|
69
86
|
}
|
|
70
87
|
}
|
|
71
|
-
}
|
|
88
|
+
},
|
|
89
|
+
"gitHead": "f54b0f4eaed317d59fa7dbcdce20f4cdb0734420"
|
|
72
90
|
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "google",
|
|
3
|
+
"name": "Google",
|
|
4
|
+
"description": "Google connector for Gmail, Calendar, Drive, and Meet through one OAuth grant. Uses Eliza Cloud OAuth by default; falls back to local OAuth2 with developer credentials when GOOGLE_CLIENT_ID/SECRET are set on the agent.",
|
|
5
|
+
"npmName": "@elizaos/plugin-google",
|
|
6
|
+
"version": "2.0.0-beta.0",
|
|
7
|
+
"source": "bundled",
|
|
8
|
+
"tags": [
|
|
9
|
+
"connector",
|
|
10
|
+
"productivity",
|
|
11
|
+
"google",
|
|
12
|
+
"gmail",
|
|
13
|
+
"calendar",
|
|
14
|
+
"drive",
|
|
15
|
+
"meet"
|
|
16
|
+
],
|
|
17
|
+
"config": {
|
|
18
|
+
"GOOGLE_CLIENT_ID": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"required": false,
|
|
21
|
+
"sensitive": false,
|
|
22
|
+
"label": "OAuth Client ID",
|
|
23
|
+
"help": "Google OAuth2 client ID for local-OAuth fallback. Not needed when using Eliza Cloud OAuth.",
|
|
24
|
+
"advanced": true
|
|
25
|
+
},
|
|
26
|
+
"GOOGLE_CLIENT_SECRET": {
|
|
27
|
+
"type": "secret",
|
|
28
|
+
"required": false,
|
|
29
|
+
"sensitive": true,
|
|
30
|
+
"label": "OAuth Client Secret",
|
|
31
|
+
"help": "Google OAuth2 client secret for local-OAuth fallback. Not needed when using Eliza Cloud OAuth.",
|
|
32
|
+
"advanced": true
|
|
33
|
+
},
|
|
34
|
+
"GOOGLE_REDIRECT_URI": {
|
|
35
|
+
"type": "url",
|
|
36
|
+
"required": false,
|
|
37
|
+
"sensitive": false,
|
|
38
|
+
"label": "Redirect URI",
|
|
39
|
+
"help": "OAuth2 redirect URI for local-OAuth fallback. A loopback URL is recommended for local auth.",
|
|
40
|
+
"advanced": true
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"render": {
|
|
44
|
+
"visible": true,
|
|
45
|
+
"pinTo": [],
|
|
46
|
+
"style": "setup-panel",
|
|
47
|
+
"icon": "Mail",
|
|
48
|
+
"group": "connector",
|
|
49
|
+
"groupOrder": 1,
|
|
50
|
+
"actions": ["enable", "configure", "setup-guide"]
|
|
51
|
+
},
|
|
52
|
+
"resources": {
|
|
53
|
+
"homepage": "https://github.com/elizaos-plugins/plugin-google#readme",
|
|
54
|
+
"repository": "https://github.com/elizaos-plugins/plugin-google",
|
|
55
|
+
"setupGuideUrl": "https://github.com/elizaos-plugins/plugin-google#readme"
|
|
56
|
+
},
|
|
57
|
+
"dependsOn": [],
|
|
58
|
+
"kind": "connector",
|
|
59
|
+
"subtype": "email",
|
|
60
|
+
"auth": {
|
|
61
|
+
"kind": "oauth",
|
|
62
|
+
"credentialKeys": [
|
|
63
|
+
"GOOGLE_CLIENT_ID",
|
|
64
|
+
"GOOGLE_CLIENT_SECRET",
|
|
65
|
+
"GOOGLE_REDIRECT_URI"
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
"accounts": {
|
|
69
|
+
"owner": {
|
|
70
|
+
"supported": true,
|
|
71
|
+
"authKind": "oauth-cloud",
|
|
72
|
+
"credentialKeys": [],
|
|
73
|
+
"notes": "The user's own Google account, connected via Eliza Cloud OAuth so the agent can read and act on the user's Gmail, Calendar, Drive, and Meet on the user's behalf."
|
|
74
|
+
},
|
|
75
|
+
"agent": {
|
|
76
|
+
"supported": true,
|
|
77
|
+
"authKind": "oauth-cloud",
|
|
78
|
+
"credentialKeys": [],
|
|
79
|
+
"notes": "A separate Google account that represents the agent's own identity. Same OAuth flow, different Google account at the OAuth screen."
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
package/dist/auth.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { type GoogleCapability } from "./scopes.js";
|
|
2
|
-
import { type GoogleAuthResolutionRequest, type GoogleCredentialResolver, type GoogleOAuthProviderConfig, type GoogleOAuthProviderMetadata } from "./types.js";
|
|
3
|
-
export declare const GOOGLE_OAUTH_PROVIDER_METADATA: GoogleOAuthProviderMetadata;
|
|
4
|
-
export declare function getGoogleOAuthProviderMetadata(): GoogleOAuthProviderMetadata;
|
|
5
|
-
export declare function getGoogleOAuthProviderConfig(capabilities: readonly GoogleCapability[]): GoogleOAuthProviderConfig;
|
|
6
|
-
export declare class MissingGoogleCredentialResolver implements GoogleCredentialResolver {
|
|
7
|
-
getAuthClient(request: GoogleAuthResolutionRequest): Promise<never>;
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=auth.d.ts.map
|
package/dist/auth.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,gBAAgB,EAGtB,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,2BAA2B,EACjC,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,8BAA8B,EAAE,2BAe5C,CAAC;AAEF,wBAAgB,8BAA8B,IAAI,2BAA2B,CAE5E;AAED,wBAAgB,4BAA4B,CAC1C,YAAY,EAAE,SAAS,gBAAgB,EAAE,GACxC,yBAAyB,CAe3B;AAED,qBAAa,+BAAgC,YAAW,wBAAwB;IACxE,aAAa,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,KAAK,CAAC;CAQ1E"}
|
package/dist/auth.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { GOOGLE_CAPABILITIES, GOOGLE_IDENTITY_SCOPES, normalizeGoogleCapabilities, scopesForGoogleCapabilities, } from "./scopes.js";
|
|
2
|
-
import { GOOGLE_SERVICE_NAME, } from "./types.js";
|
|
3
|
-
export const GOOGLE_OAUTH_PROVIDER_METADATA = {
|
|
4
|
-
provider: GOOGLE_SERVICE_NAME,
|
|
5
|
-
label: "Google Workspace",
|
|
6
|
-
authorizationEndpoint: "https://accounts.google.com/o/oauth2/v2/auth",
|
|
7
|
-
tokenEndpoint: "https://oauth2.googleapis.com/token",
|
|
8
|
-
revokeEndpoint: "https://oauth2.googleapis.com/revoke",
|
|
9
|
-
clientIdSetting: "GOOGLE_CLIENT_ID",
|
|
10
|
-
clientSecretSetting: "GOOGLE_CLIENT_SECRET",
|
|
11
|
-
redirectUriSetting: "GOOGLE_REDIRECT_URI",
|
|
12
|
-
responseType: "code",
|
|
13
|
-
accessType: "offline",
|
|
14
|
-
prompt: "consent",
|
|
15
|
-
supportsPkce: true,
|
|
16
|
-
identityScopes: GOOGLE_IDENTITY_SCOPES,
|
|
17
|
-
capabilities: GOOGLE_CAPABILITIES,
|
|
18
|
-
};
|
|
19
|
-
export function getGoogleOAuthProviderMetadata() {
|
|
20
|
-
return GOOGLE_OAUTH_PROVIDER_METADATA;
|
|
21
|
-
}
|
|
22
|
-
export function getGoogleOAuthProviderConfig(capabilities) {
|
|
23
|
-
const normalized = normalizeGoogleCapabilities(capabilities);
|
|
24
|
-
return {
|
|
25
|
-
provider: GOOGLE_SERVICE_NAME,
|
|
26
|
-
authUrl: GOOGLE_OAUTH_PROVIDER_METADATA.authorizationEndpoint,
|
|
27
|
-
tokenUrl: GOOGLE_OAUTH_PROVIDER_METADATA.tokenEndpoint,
|
|
28
|
-
capabilities: normalized,
|
|
29
|
-
scopes: scopesForGoogleCapabilities(normalized),
|
|
30
|
-
authorizationParams: {
|
|
31
|
-
access_type: "offline",
|
|
32
|
-
prompt: "consent",
|
|
33
|
-
include_granted_scopes: "true",
|
|
34
|
-
},
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export class MissingGoogleCredentialResolver {
|
|
38
|
-
async getAuthClient(request) {
|
|
39
|
-
throw new Error(`Google auth client for account ${request.accountId} is not available. ` +
|
|
40
|
-
`Requested capabilities: ${request.capabilities.join(", ") || "identity"}; ` +
|
|
41
|
-
`scopes: ${request.scopes.join(" ") || "none"}. ` +
|
|
42
|
-
"Inject a GoogleCredentialResolver backed by the shared connector account OAuth store.");
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=auth.js.map
|
package/dist/auth.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../src/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EAEtB,2BAA2B,EAC3B,2BAA2B,GAC5B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,mBAAmB,GAKpB,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,8BAA8B,GAAgC;IACzE,QAAQ,EAAE,mBAAmB;IAC7B,KAAK,EAAE,kBAAkB;IACzB,qBAAqB,EAAE,8CAA8C;IACrE,aAAa,EAAE,qCAAqC;IACpD,cAAc,EAAE,sCAAsC;IACtD,eAAe,EAAE,kBAAkB;IACnC,mBAAmB,EAAE,sBAAsB;IAC3C,kBAAkB,EAAE,qBAAqB;IACzC,YAAY,EAAE,MAAM;IACpB,UAAU,EAAE,SAAS;IACrB,MAAM,EAAE,SAAS;IACjB,YAAY,EAAE,IAAI;IAClB,cAAc,EAAE,sBAAsB;IACtC,YAAY,EAAE,mBAAmB;CAClC,CAAC;AAEF,MAAM,UAAU,8BAA8B;IAC5C,OAAO,8BAA8B,CAAC;AACxC,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,YAAyC;IAEzC,MAAM,UAAU,GAAG,2BAA2B,CAAC,YAAY,CAAC,CAAC;IAE7D,OAAO;QACL,QAAQ,EAAE,mBAAmB;QAC7B,OAAO,EAAE,8BAA8B,CAAC,qBAAqB;QAC7D,QAAQ,EAAE,8BAA8B,CAAC,aAAa;QACtD,YAAY,EAAE,UAAU;QACxB,MAAM,EAAE,2BAA2B,CAAC,UAAU,CAAC;QAC/C,mBAAmB,EAAE;YACnB,WAAW,EAAE,SAAS;YACtB,MAAM,EAAE,SAAS;YACjB,sBAAsB,EAAE,MAAM;SAC/B;KACF,CAAC;AACJ,CAAC;AAED,MAAM,OAAO,+BAA+B;IAC1C,KAAK,CAAC,aAAa,CAAC,OAAoC;QACtD,MAAM,IAAI,KAAK,CACb,kCAAkC,OAAO,CAAC,SAAS,qBAAqB;YACtE,2BAA2B,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,UAAU,IAAI;YAC5E,WAAW,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,MAAM,IAAI;YACjD,uFAAuF,CAC1F,CAAC;IACJ,CAAC;CACF"}
|
package/dist/calendar.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { GoogleApiClientFactory } from "./client-factory.js";
|
|
2
|
-
import type { GoogleAccountRef, GoogleCalendarEvent, GoogleCalendarEventInput, GoogleCalendarEventPatchInput, GoogleCalendarListEntry } from "./types.js";
|
|
3
|
-
export declare class GoogleCalendarClient {
|
|
4
|
-
private readonly clientFactory;
|
|
5
|
-
constructor(clientFactory: GoogleApiClientFactory);
|
|
6
|
-
listCalendars(params: GoogleAccountRef): Promise<GoogleCalendarListEntry[]>;
|
|
7
|
-
listEvents(params: GoogleAccountRef & {
|
|
8
|
-
calendarId?: string;
|
|
9
|
-
timeMin?: string;
|
|
10
|
-
timeMax?: string;
|
|
11
|
-
limit?: number;
|
|
12
|
-
timeZone?: string;
|
|
13
|
-
}): Promise<GoogleCalendarEvent[]>;
|
|
14
|
-
getEvent(params: GoogleAccountRef & {
|
|
15
|
-
calendarId?: string;
|
|
16
|
-
eventId: string;
|
|
17
|
-
timeZone?: string;
|
|
18
|
-
}): Promise<GoogleCalendarEvent>;
|
|
19
|
-
createEvent(params: GoogleCalendarEventInput): Promise<GoogleCalendarEvent>;
|
|
20
|
-
updateEvent(params: GoogleCalendarEventPatchInput): Promise<GoogleCalendarEvent>;
|
|
21
|
-
deleteEvent(params: GoogleAccountRef & {
|
|
22
|
-
calendarId?: string;
|
|
23
|
-
eventId: string;
|
|
24
|
-
}): Promise<void>;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=calendar.d.ts.map
|
package/dist/calendar.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../src/calendar.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,KAAK,EACV,gBAAgB,EAChB,mBAAmB,EACnB,wBAAwB,EACxB,6BAA6B,EAC7B,uBAAuB,EAExB,MAAM,YAAY,CAAC;AAEpB,qBAAa,oBAAoB;IACnB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,sBAAsB;IAE5D,aAAa,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,uBAAuB,EAAE,CAAC;IAkB3E,UAAU,CACd,MAAM,EAAE,gBAAgB,GAAG;QACzB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,GACA,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAoB3B,QAAQ,CACZ,MAAM,EAAE,gBAAgB,GAAG;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GACrF,OAAO,CAAC,mBAAmB,CAAC;IAczB,WAAW,CAAC,MAAM,EAAE,wBAAwB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IA+B3E,WAAW,CAAC,MAAM,EAAE,6BAA6B,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAsDhF,WAAW,CACf,MAAM,EAAE,gBAAgB,GAAG;QAAE,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAClE,OAAO,CAAC,IAAI,CAAC;CAkBjB"}
|
package/dist/calendar.js
DELETED
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
import { randomUUID } from "node:crypto";
|
|
2
|
-
export class GoogleCalendarClient {
|
|
3
|
-
clientFactory;
|
|
4
|
-
constructor(clientFactory) {
|
|
5
|
-
this.clientFactory = clientFactory;
|
|
6
|
-
}
|
|
7
|
-
async listCalendars(params) {
|
|
8
|
-
const calendar = await this.clientFactory.calendar(params, ["calendar.read"], "calendar.listCalendars");
|
|
9
|
-
const response = await calendar.calendarList.list({
|
|
10
|
-
minAccessRole: "reader",
|
|
11
|
-
showDeleted: false,
|
|
12
|
-
showHidden: false,
|
|
13
|
-
});
|
|
14
|
-
return (response.data.items ?? [])
|
|
15
|
-
.filter((entry) => !entry.deleted && !entry.hidden)
|
|
16
|
-
.map(mapCalendarListEntry)
|
|
17
|
-
.filter((entry) => entry !== null);
|
|
18
|
-
}
|
|
19
|
-
async listEvents(params) {
|
|
20
|
-
const calendar = await this.clientFactory.calendar(params, ["calendar.read"], "calendar.listEvents");
|
|
21
|
-
const calendarId = params.calendarId ?? "primary";
|
|
22
|
-
const response = await calendar.events.list({
|
|
23
|
-
calendarId,
|
|
24
|
-
timeMin: params.timeMin,
|
|
25
|
-
timeMax: params.timeMax,
|
|
26
|
-
maxResults: params.limit ?? 25,
|
|
27
|
-
singleEvents: true,
|
|
28
|
-
orderBy: "startTime",
|
|
29
|
-
timeZone: params.timeZone,
|
|
30
|
-
});
|
|
31
|
-
return (response.data.items ?? []).map((event) => mapEvent(event, calendarId, params.timeZone));
|
|
32
|
-
}
|
|
33
|
-
async getEvent(params) {
|
|
34
|
-
const calendar = await this.clientFactory.calendar(params, ["calendar.read"], "calendar.getEvent");
|
|
35
|
-
const calendarId = params.calendarId ?? "primary";
|
|
36
|
-
const response = await calendar.events.get({
|
|
37
|
-
calendarId,
|
|
38
|
-
eventId: params.eventId,
|
|
39
|
-
});
|
|
40
|
-
return mapEvent(response.data, calendarId, params.timeZone);
|
|
41
|
-
}
|
|
42
|
-
async createEvent(params) {
|
|
43
|
-
const calendar = await this.clientFactory.calendar(params, ["calendar.write"], "calendar.createEvent");
|
|
44
|
-
const calendarId = params.calendarId ?? "primary";
|
|
45
|
-
const response = await calendar.events.insert({
|
|
46
|
-
calendarId,
|
|
47
|
-
conferenceDataVersion: params.createMeetLink ? 1 : undefined,
|
|
48
|
-
requestBody: {
|
|
49
|
-
summary: params.title,
|
|
50
|
-
description: params.description,
|
|
51
|
-
location: params.location,
|
|
52
|
-
start: toEventDateTime(params.start, params.timeZone),
|
|
53
|
-
end: toEventDateTime(params.end, params.timeZone),
|
|
54
|
-
attendees: params.attendees?.map(toCalendarAttendee),
|
|
55
|
-
conferenceData: params.createMeetLink
|
|
56
|
-
? {
|
|
57
|
-
createRequest: {
|
|
58
|
-
requestId: randomUUID(),
|
|
59
|
-
conferenceSolutionKey: { type: "hangoutsMeet" },
|
|
60
|
-
},
|
|
61
|
-
}
|
|
62
|
-
: undefined,
|
|
63
|
-
},
|
|
64
|
-
});
|
|
65
|
-
return mapEvent(response.data, calendarId, params.timeZone);
|
|
66
|
-
}
|
|
67
|
-
async updateEvent(params) {
|
|
68
|
-
const calendar = await this.clientFactory.calendar(params, ["calendar.write"], "calendar.updateEvent");
|
|
69
|
-
const calendarId = params.calendarId ?? "primary";
|
|
70
|
-
const needsExistingEventContext = Boolean(params.start || params.end) && (!params.timeZone || !params.start || !params.end);
|
|
71
|
-
const existing = needsExistingEventContext
|
|
72
|
-
? (await calendar.events.get({
|
|
73
|
-
calendarId,
|
|
74
|
-
eventId: params.eventId,
|
|
75
|
-
})).data
|
|
76
|
-
: null;
|
|
77
|
-
const effectiveTimeZone = params.timeZone ?? existing?.start?.timeZone ?? existing?.end?.timeZone ?? undefined;
|
|
78
|
-
const { start, end } = normalizePatchBounds({
|
|
79
|
-
start: params.start,
|
|
80
|
-
end: params.end,
|
|
81
|
-
existing,
|
|
82
|
-
});
|
|
83
|
-
const requestBody = {};
|
|
84
|
-
if (params.title !== undefined) {
|
|
85
|
-
requestBody.summary = params.title;
|
|
86
|
-
}
|
|
87
|
-
if (params.description !== undefined) {
|
|
88
|
-
requestBody.description = params.description;
|
|
89
|
-
}
|
|
90
|
-
if (params.location !== undefined) {
|
|
91
|
-
requestBody.location = params.location;
|
|
92
|
-
}
|
|
93
|
-
if (start !== undefined) {
|
|
94
|
-
requestBody.start = toEventDateTime(start, effectiveTimeZone);
|
|
95
|
-
}
|
|
96
|
-
if (end !== undefined) {
|
|
97
|
-
requestBody.end = toEventDateTime(end, effectiveTimeZone);
|
|
98
|
-
}
|
|
99
|
-
if (params.attendees !== undefined) {
|
|
100
|
-
requestBody.attendees = params.attendees.map(toCalendarAttendee);
|
|
101
|
-
}
|
|
102
|
-
const response = await calendar.events.patch({
|
|
103
|
-
calendarId,
|
|
104
|
-
eventId: params.eventId,
|
|
105
|
-
requestBody,
|
|
106
|
-
});
|
|
107
|
-
return mapEvent(response.data, calendarId, effectiveTimeZone);
|
|
108
|
-
}
|
|
109
|
-
async deleteEvent(params) {
|
|
110
|
-
const calendar = await this.clientFactory.calendar(params, ["calendar.write"], "calendar.deleteEvent");
|
|
111
|
-
try {
|
|
112
|
-
await calendar.events.delete({
|
|
113
|
-
calendarId: params.calendarId ?? "primary",
|
|
114
|
-
eventId: params.eventId,
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
catch (error) {
|
|
118
|
-
if (googleErrorStatus(error) === 410) {
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
throw error;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
function mapCalendarListEntry(entry) {
|
|
126
|
-
const calendarId = entry.id?.trim();
|
|
127
|
-
if (!calendarId) {
|
|
128
|
-
return null;
|
|
129
|
-
}
|
|
130
|
-
return {
|
|
131
|
-
calendarId,
|
|
132
|
-
summary: entry.summaryOverride?.trim() || entry.summary?.trim() || calendarId,
|
|
133
|
-
description: entry.description?.trim() || null,
|
|
134
|
-
primary: Boolean(entry.primary),
|
|
135
|
-
accessRole: entry.accessRole?.trim() || "reader",
|
|
136
|
-
backgroundColor: entry.backgroundColor?.trim() || null,
|
|
137
|
-
foregroundColor: entry.foregroundColor?.trim() || null,
|
|
138
|
-
timeZone: entry.timeZone?.trim() || null,
|
|
139
|
-
selected: entry.selected !== false,
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
function mapEvent(event, calendarId, fallbackTimeZone) {
|
|
143
|
-
const start = readEventInstant(event.start, fallbackTimeZone);
|
|
144
|
-
const end = readEventInstant(event.end, start?.timeZone ?? fallbackTimeZone);
|
|
145
|
-
return {
|
|
146
|
-
id: event.id ?? "",
|
|
147
|
-
calendarId,
|
|
148
|
-
title: event.summary ?? undefined,
|
|
149
|
-
status: event.status ?? undefined,
|
|
150
|
-
start: start?.iso ?? event.start?.dateTime ?? event.start?.date ?? undefined,
|
|
151
|
-
end: end?.iso ?? event.end?.dateTime ?? event.end?.date ?? undefined,
|
|
152
|
-
isAllDay: start?.isAllDay,
|
|
153
|
-
timeZone: start?.timeZone ?? end?.timeZone ?? null,
|
|
154
|
-
htmlLink: event.htmlLink ?? undefined,
|
|
155
|
-
meetLink: event.hangoutLink ?? event.conferenceData?.entryPoints?.[0]?.uri ?? undefined,
|
|
156
|
-
attendees: event.attendees?.map((attendee) => ({
|
|
157
|
-
email: attendee.email ?? "",
|
|
158
|
-
name: attendee.displayName ?? undefined,
|
|
159
|
-
})),
|
|
160
|
-
location: event.location ?? undefined,
|
|
161
|
-
description: event.description ?? undefined,
|
|
162
|
-
organizer: event.organizer
|
|
163
|
-
? {
|
|
164
|
-
email: event.organizer.email ?? "",
|
|
165
|
-
name: event.organizer.displayName ?? undefined,
|
|
166
|
-
self: Boolean(event.organizer.self),
|
|
167
|
-
}
|
|
168
|
-
: undefined,
|
|
169
|
-
metadata: {
|
|
170
|
-
iCalUID: event.iCalUID ?? null,
|
|
171
|
-
recurringEventId: event.recurringEventId ?? null,
|
|
172
|
-
createdAt: event.created ?? null,
|
|
173
|
-
updatedAt: event.updated ?? null,
|
|
174
|
-
},
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
function eventDateValue(value) {
|
|
178
|
-
return value?.dateTime ?? value?.date ?? undefined;
|
|
179
|
-
}
|
|
180
|
-
function readEventInstant(value, fallbackTimeZone) {
|
|
181
|
-
if (!value) {
|
|
182
|
-
return null;
|
|
183
|
-
}
|
|
184
|
-
if (typeof value.dateTime === "string" && value.dateTime.trim().length > 0) {
|
|
185
|
-
return {
|
|
186
|
-
iso: new Date(value.dateTime).toISOString(),
|
|
187
|
-
isAllDay: false,
|
|
188
|
-
timeZone: value.timeZone?.trim() || null,
|
|
189
|
-
};
|
|
190
|
-
}
|
|
191
|
-
if (typeof value.date === "string" && value.date.trim().length > 0) {
|
|
192
|
-
const iso = new Date(`${value.date}T00:00:00.000Z`).toISOString();
|
|
193
|
-
return {
|
|
194
|
-
iso,
|
|
195
|
-
isAllDay: true,
|
|
196
|
-
timeZone: value.timeZone?.trim() || fallbackTimeZone?.trim() || null,
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
return null;
|
|
200
|
-
}
|
|
201
|
-
function normalizePatchBounds(params) {
|
|
202
|
-
let start = params.start;
|
|
203
|
-
let end = params.end;
|
|
204
|
-
if (!params.existing || Boolean(start) === Boolean(end)) {
|
|
205
|
-
return { start, end };
|
|
206
|
-
}
|
|
207
|
-
const existingStart = eventDateValue(params.existing.start);
|
|
208
|
-
const existingEnd = eventDateValue(params.existing.end);
|
|
209
|
-
const existingDurationMs = existingStart && existingEnd ? Date.parse(existingEnd) - Date.parse(existingStart) : Number.NaN;
|
|
210
|
-
const fallbackDurationMs = Number.isFinite(existingDurationMs) && existingDurationMs > 0
|
|
211
|
-
? existingDurationMs
|
|
212
|
-
: 60 * 60 * 1000;
|
|
213
|
-
if (start && !end) {
|
|
214
|
-
end = new Date(new Date(start).getTime() + fallbackDurationMs).toISOString();
|
|
215
|
-
}
|
|
216
|
-
else if (end && !start) {
|
|
217
|
-
start = new Date(new Date(end).getTime() - fallbackDurationMs).toISOString();
|
|
218
|
-
}
|
|
219
|
-
return { start, end };
|
|
220
|
-
}
|
|
221
|
-
function toEventDateTime(value, timeZone) {
|
|
222
|
-
if (/^\d{4}-\d{2}-\d{2}$/.test(value)) {
|
|
223
|
-
return { date: value, timeZone };
|
|
224
|
-
}
|
|
225
|
-
return { dateTime: value, timeZone };
|
|
226
|
-
}
|
|
227
|
-
function toCalendarAttendee(address) {
|
|
228
|
-
return {
|
|
229
|
-
email: address.email,
|
|
230
|
-
displayName: address.name,
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
function googleErrorStatus(error) {
|
|
234
|
-
const candidate = error;
|
|
235
|
-
return candidate.response?.status ?? candidate.status ?? candidate.code;
|
|
236
|
-
}
|
|
237
|
-
//# sourceMappingURL=calendar.js.map
|
package/dist/calendar.js.map
DELETED
|
@@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