@particle-academy/google-meet-js 0.0.0 → 0.3.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,81 @@
1
+ # Changelog — Google Meet
2
+
3
+ All four packages — `@particle-academy/google-meet-ui`, `@particle-academy/google-meet-js`,
4
+ `particle-academy/google-meet-php` and `fancy-google-meet` — are released together
5
+ under one version. They are generated from one `provider/` definition, so a
6
+ change to it changes all four, and separate version lines would only record
7
+ which of the four somebody remembered to bump.
8
+
9
+ **Write entries HERE**, in the weaver envelope at `providers/google-meet/CHANGELOG.md`,
10
+ then regenerate. This file is the one thing in a release that cannot be
11
+ derived — somebody has to write what changed — but writing it in the
12
+ provider repo would be a hand-edit that `.weaver.json` flags and the next
13
+ sync destroys.
14
+
15
+ ## [0.3.0] — 2026-11-08
16
+
17
+ ### Added
18
+
19
+ - **One Google consent grant, shared by every Google connector** (`oauth.grant:
20
+ "google"`), for an org-level Google connection: one OAuth client, one consent
21
+ and one refresh token per person, with each feature's scopes asked for when it
22
+ is first used. Declared in the manifest, the `-ui` package's OAuth constant,
23
+ the README and the registry index:
24
+ - `authorizeParams`: `access_type=offline` and `include_granted_scopes=true`.
25
+ A refresh token comes back only on the FIRST code exchange, so keep the stored
26
+ one when an exchange returns none.
27
+ - `revoke`: POST `https://oauth2.googleapis.com/revoke` with `token`, and
28
+ `scope: "grant"`. **Revoking removes the person's WHOLE Google grant, every
29
+ Google connector**, so a per-feature disconnect stops using that feature's
30
+ scopes locally and only a full Google disconnect revokes.
31
+ - `identity`: identify the account by the id_token's `sub` (request `openid`;
32
+ issuer `https://accounts.google.com` or `accounts.google.com`; audience is
33
+ the `clientId`), never by email, which Google says is neither unique nor
34
+ permanent.
35
+ `restrictedScopes` is empty: none of this connector's scopes is restricted.
36
+
37
+ Nothing a request sends has changed; this is what a host needs to run the
38
+ connection.
39
+
40
+ ## [0.2.0] — 2026-11-08
41
+
42
+ ### Added
43
+
44
+ - **Laravel integration, in this package** (`src/Laravel/`), auto-discovered
45
+ through composer's `extra.laravel`. Laravel is SUGGESTED, never required:
46
+ outside a Laravel app none of it loads.
47
+ - a service provider that merges `config/google-meet.php` under
48
+ `connectors.google-meet` (credentials from the environment, or per call for a
49
+ multi-account app);
50
+ - the `GoogleMeet` facade: `GoogleMeet::call('<operation>', [...])` runs any action;
51
+ - `GoogleMeet::fake()`, answered from the connector's faker, with
52
+ `assertSent` / `assertNotSent` / `assertNothingSent` / `assertSentCount`;
53
+ - its own Pest test of all of it against a booted Laravel app.
54
+
55
+ ### Changed
56
+
57
+ - **Tests: Pest `^5`**, and `laravel/framework` `^13` as a DEV-ONLY test
58
+ dependency (the framework this package integrates with; nothing ships in
59
+ `require`).
60
+
61
+ ## [0.1.0] — 2026-09-16
62
+
63
+ ### Added
64
+
65
+ - **`space_create`** — create a Meet space and get its join link (`POST /spaces`, scope `meetings.space.created`).
66
+ - **`space_get`** — read a space's current state, including whether a conference is live right now (`GET /spaces/{spaceId}`).
67
+ - **`conference_record_list`** — past conferences, optionally filtered to one space with Google's own filter grammar passed through verbatim (`GET /conferenceRecords`).
68
+ - **`participant_list`** — who attended, as one of signed-in / anonymous / phone-dial-in per row, the whole attendance span rather than a single join/leave pair.
69
+ - **`transcript_list`** / **`transcript_entry_list`** — a finished conference's transcript, one utterance per entry, when transcription was on.
70
+ - OAuth2, standard reusable Google refresh tokens. Sandbox `unverified`: no separate test estate found, but nobody has confirmed there is truly nothing.
71
+
72
+ **This is the CONNECTOR half of Tynn #9 (MOIC's meeting bot).** A LIVE
73
+ transcript and live participant status (waiting room / admitted / left) are
74
+ NOT offered by the stable Meet REST API v2 this connector uses — that needs
75
+ Meet's Media API, developer-preview as of this writing, and the bot RUNTIME
76
+ that would actually join a call and stream media is explicitly the owner's
77
+ architecture decision, not this connector's. What ships here: creating a
78
+ space, and reading what happened after the fact.
79
+
80
+ Verified against the Meet API v2 Discovery Document
81
+ (`https://meet.googleapis.com/$discovery/rest?version=v2`) on 2026-09-16.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Particle Academy
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,3 +1,164 @@
1
- # @particle-academy/google-meet-js
1
+ # Google Meet
2
2
 
3
- **0.0.0 claims the name and ships nothing.** It exists so a Trusted Publisher can be attached to the package; the first real release is published from https://github.com/Fancy-Friends/google-meet by its `publish.yml` workflow with provenance, and this version is deprecated the moment it lands.
3
+ [![Fancified](art/fancified.svg)](https://particle.academy)
4
+
5
+ Google Meet for [fancy-flow][flow] — as **four imported, versioned packages**, one
6
+ per runtime. Not vendored source: a copy cannot be upgraded, and third-party APIs
7
+ change.
8
+
9
+ [flow]: https://github.com/Particle-Academy/fancy-flow
10
+
11
+ | Runtime | Package | Install |
12
+ |---|---|---|
13
+ | Authoring surface (every host) | `@particle-academy/google-meet-ui` | `npm install @particle-academy/google-meet-ui` |
14
+ | Node | `@particle-academy/google-meet-js` | `npm install @particle-academy/google-meet-js` |
15
+ | PHP 8.4+ | `particle-academy/google-meet-php` | `composer require particle-academy/google-meet-php` |
16
+ | Python 3.11+ | `fancy-google-meet` | `pip install fancy-google-meet` |
17
+
18
+ The `ui` package is the editor surface and is React on every host — a PHP or
19
+ Python project installs it *and* its own runtime package, and never the `js` one.
20
+
21
+ ## What it costs you
22
+
23
+ One dependency: `@particle-academy/fancy-connector-core` (or
24
+ `particle-academy/fancy-connector-core` on Composer), which the `js` and `php`
25
+ packages pull in themselves. The Python package has **zero** runtime
26
+ dependencies.
27
+
28
+ **No Google Meet SDK.** Plain HTTP, deliberately: a vendor SDK is third-party code
29
+ subject to the kit's full approval bar, and one per provider is hundreds of
30
+ dependencies nobody is tracking.
31
+
32
+ ## Setting it up
33
+
34
+ Everything below is generated from `provider/manifest.json`, so it cannot disagree with what the packages do.
35
+
36
+ ### Credentials
37
+
38
+ A Google Meet connection holds 4 values.
39
+
40
+ **Two kinds of value, and mixing them up matters.** A `provider` credential is ONE value for the whole installation — an OAuth app's client secret serves every connected account. An `account` credential is one per connected account. A host that stores the second where it stores the first lets one account's credentials reach another's.
41
+
42
+ | Field | Scope | Secret | Where it comes from |
43
+ |---|---|---|---|
44
+ | **OAuth client ID** | per installation | not secret | From the Google Cloud project you registered. One value for the whole installation -- the same app serves every connected Google account. |
45
+ | **OAuth client secret** | per installation | **secret** | From the same Google Cloud project. Used to exchange the code and to refresh; never sent with an API request. |
46
+ | **Access token** | per connected account | **secret** | Obtained by the host's OAuth exchange, PER CONNECTED GOOGLE ACCOUNT. Expires after one hour -- a host that does not refresh will work for a while and then fail with no warning. |
47
+ | **Refresh token** *(optional)* | per connected account | **secret** | Also per account. Reusable -- Google does not rotate it on refresh. |
48
+
49
+ ### Authorising
50
+
51
+ Google Meet uses OAuth2 (authorization_code). The package DECLARES the exchange; the HOST performs it — a consent screen needs a browser, a redirect URI and somewhere to persist the result, and all three belong to the host.
52
+
53
+ - **Authorize URL** — https://accounts.google.com/o/oauth2/v2/auth
54
+ - **Token URL** — https://oauth2.googleapis.com/token
55
+ - **Scopes** — `https://www.googleapis.com/auth/meetings.space.created`, `https://www.googleapis.com/auth/meetings.space.readonly`
56
+ - **Access token lifetime** — 3600 seconds (1 hours). A host that never refreshes works all afternoon and is broken by morning.
57
+
58
+ **One consent grant, shared** (`grant: "google"`). Every connector declaring the same grant can run on ONE OAuth client, with one consent and one refresh token per person.
59
+
60
+ - **Authorize with** `access_type=offline`, `include_granted_scopes=true`. Ask for a feature's scopes when it is first used; the new token covers every scope granted before. A refresh token comes back only on the FIRST exchange, so keep the stored one when an exchange returns none.
61
+ - **Revoke** — POST https://oauth2.googleapis.com/revoke with `token`. **It removes the WHOLE grant**: every connector sharing it, not only this one. A per-feature disconnect stops using that feature's scopes locally; only a full disconnect revokes.
62
+ - **Identify the account by `sub`**: request `openid`, then verify the token response's id_token (issuer `https://accounts.google.com` or `accounts.google.com`, keys at https://www.googleapis.com/oauth2/v3/certs, audience = `clientId`). Never key a connection by email.
63
+ - **No restricted scopes** in this connector.
64
+
65
+ The refresh tokens do **not** rotate: the same one is reusable, so a refresh may safely be retried and may run concurrently. Stated rather than assumed, because the opposite — a provider that spends the token and revokes the grant on a replay — looks identical until it happens.
66
+
67
+ ### The estate
68
+
69
+ **Nobody has checked whether Google Meet has a test estate.** Treat every call as real.
70
+
71
+ > Google Meet has no test estate distinct from a real account, as far as this review found (2026-09-16) -- but it is UNVERIFIED, not confirmed. space_create makes a real, joinable meeting space. Use fake mode while building.
72
+
73
+ ## What it can do
74
+
75
+ ### Actions
76
+
77
+ #### `conference_record_list` — List conference records
78
+
79
+ List past conferences, optionally filtered to one space.
80
+
81
+ `GET /conferenceRecords` · reads only — safe to replay
82
+
83
+ | Input | Required | What it is |
84
+ |---|---|---|
85
+ | `filter` | no | Google's filter grammar, e.g. space.name = "spaces/abc123" to see one space's history, or space.meeting_code = "abc-defg-hij". Leave blank for every conference the account can see. |
86
+ | `pageSize` | no | Records per page. Leave blank for Google's default. |
87
+ | `pageToken` | no | From a previous call's data.nextPageToken. |
88
+
89
+ #### `participant_list` — List participants
90
+
91
+ List who attended a conference.
92
+
93
+ `GET /conferenceRecords/{conferenceRecordId}/participants` · reads only — safe to replay
94
+
95
+ | Input | Required | What it is |
96
+ |---|---|---|
97
+ | `conferenceRecordId` | yes | The id from conference_record_list's data.conferenceRecords[].name (conferenceRecords/{id} -- give the id after the slash) or from space_get's data.activeConference.conferenceRecord. |
98
+ | `pageToken` | no | From a previous call's data.nextPageToken. |
99
+
100
+ #### `space_create` — Create meeting space
101
+
102
+ Create a new Google Meet space and get its join link.
103
+
104
+ `POST /spaces` · **unsafe to replay** — a retried durable run does it TWICE
105
+
106
+ | Input | Required | What it is |
107
+ |---|---|---|
108
+ | `accessType` | no | OPEN: anyone with the link, no knock. TRUSTED: anyone in your organization, no knock; others knock. RESTRICTED: only people and groups explicitly invited. Leave blank for Google's account default. |
109
+ | `entryPointAccess` | no | ALL: any Meet client (web, mobile, phone dial-in, the calling API). CREATOR_APP_ONLY: only the app that created the space, and only through the Meet REST API and SIP — no phone dial-in and no other Meet client. Leave blank for Google's default (ALL). |
110
+
111
+ #### `space_get` — Get meeting space
112
+
113
+ Read a Meet space's current state, including whether a conference is active right now.
114
+
115
+ `GET /spaces/{spaceId}` · reads only — safe to replay
116
+
117
+ | Input | Required | What it is |
118
+ |---|---|---|
119
+ | `spaceId` | yes | The id from space_create's data.name (spaces/{id} -- give the id after the slash), or the meeting code shown in Meet's own UI. NOT independently spot-checked that the meeting-code form resolves through this exact endpoint; verify with a live call before relying on it. |
120
+
121
+ #### `transcript_entry_list` — List transcript entries
122
+
123
+ Read a finished conference's transcript, one utterance per entry.
124
+
125
+ `GET /conferenceRecords/{conferenceRecordId}/transcripts/{transcriptId}/entries` · reads only — safe to replay
126
+
127
+ | Input | Required | What it is |
128
+ |---|---|---|
129
+ | `conferenceRecordId` | yes | The id from conference_record_list's data.conferenceRecords[].name (give the id after conferenceRecords/). |
130
+ | `transcriptId` | yes | The id from transcript_list's data.transcripts[].name (give the id after transcripts/). |
131
+ | `pageToken` | no | From a previous call's data.nextPageToken. |
132
+
133
+ #### `transcript_list` — List transcripts
134
+
135
+ List a finished conference's transcripts, when transcription was on.
136
+
137
+ `GET /conferenceRecords/{conferenceRecordId}/transcripts` · reads only — safe to replay
138
+
139
+ | Input | Required | What it is |
140
+ |---|---|---|
141
+ | `conferenceRecordId` | yes | The id from conference_record_list's data.conferenceRecords[].name (conferenceRecords/{id} -- give the id after the slash). |
142
+
143
+ ## Run it before you have credentials
144
+
145
+ Every operation ships a **faker**, whether or not Google Meet has a sandbox. Set a
146
+ node's mode to `fake` and it returns the shape Google Meet actually publishes — the
147
+ same field names, deterministically — so you can wire the downstream nodes before
148
+ touching an account, a key, or a network.
149
+
150
+ ## This repository is generated
151
+
152
+ `provider/` is the source. Everything under `packages/` is emitted from it and
153
+ **must not be hand-edited** — CI regenerates and diffs on every push, and the
154
+ next protocol sync destroys anything it finds. See [`AGENTS.md`](AGENTS.md).
155
+
156
+ ## Two namespaces, which do not match on purpose
157
+
158
+ The repo is `github.com/Fancy-Friends/google-meet`; the packages publish under
159
+ `particle-academy`. Nothing derives one from the other — the names come from
160
+ weaver's `friends.json` and nowhere else.
161
+
162
+ ## Licence
163
+
164
+ MIT.
@@ -0,0 +1,26 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="128" height="28" role="img" aria-label="Fancified — built with Fancy UI">
2
+ <title>Fancified · built with Fancy UI</title>
3
+ <defs>
4
+ <linearGradient id="fcdBg" x1="0" y1="0" x2="1" y2="1">
5
+ <stop offset="0" stop-color="#6d28d9"/>
6
+ <stop offset=".5" stop-color="#9333ea"/>
7
+ <stop offset="1" stop-color="#d946ef"/>
8
+ </linearGradient>
9
+ <linearGradient id="fcdGloss" x1="0" y1="0" x2="0" y2="1">
10
+ <stop offset="0" stop-color="#ffffff" stop-opacity=".30"/>
11
+ <stop offset=".55" stop-color="#ffffff" stop-opacity="0"/>
12
+ </linearGradient>
13
+ <clipPath id="fcdClip"><rect width="128" height="28" rx="7"/></clipPath>
14
+ </defs>
15
+ <g clip-path="url(#fcdClip)">
16
+ <rect width="128" height="28" fill="url(#fcdBg)"/>
17
+ <rect width="34" height="28" fill="#3b0764" fill-opacity=".5"/>
18
+ <rect width="128" height="13" fill="url(#fcdGloss)"/>
19
+ <g fill="#fff">
20
+ <path transform="translate(17 14)" d="M0 -7 C.6 -2.2 2.2 -.6 7 0 C2.2 .6 .6 2.2 0 7 C-.6 2.2 -2.2 .6 -7 0 C-2.2 -.6 -.6 -2.2 0 -7 Z"/>
21
+ <path transform="translate(25.5 7.5) scale(.34)" fill-opacity=".85" d="M0 -7 C.6 -2.2 2.2 -.6 7 0 C2.2 .6 .6 2.2 0 7 C-.6 2.2 -2.2 .6 -7 0 C-2.2 -.6 -.6 -2.2 0 -7 Z"/>
22
+ </g>
23
+ <text x="81" y="18.5" fill="#ffffff" text-anchor="middle" font-family="'Segoe UI',Verdana,'DejaVu Sans',sans-serif" font-size="12" font-weight="700" letter-spacing=".3">Fancified</text>
24
+ </g>
25
+ <rect x=".5" y=".5" width="127" height="27" rx="6.5" fill="none" stroke="#ffffff" stroke-opacity=".22"/>
26
+ </svg>
@@ -0,0 +1,319 @@
1
+ import { callConnector } from '@particle-academy/fancy-connector-core';
2
+
3
+ // src/faker.ts
4
+ function fakeConferenceRecordList({ config, fake }) {
5
+ return {
6
+ "conferenceRecords": [
7
+ {
8
+ "name": fake.id("conferenceRecords"),
9
+ "startTime": "2026-09-15T14:00:00.000Z",
10
+ "endTime": "2026-09-15T14:40:12.000Z",
11
+ "expireTime": "2026-10-15T14:40:12.000Z",
12
+ "space": "spaces/abc123def456"
13
+ }
14
+ ]
15
+ };
16
+ }
17
+ function fakeParticipantList({ config, fake }) {
18
+ return {
19
+ "participants": [
20
+ {
21
+ "name": fake.id("participants"),
22
+ "earliestStartTime": "2026-09-15T14:00:05.000Z",
23
+ "latestEndTime": "2026-09-15T14:40:00.000Z",
24
+ "signedinUser": {
25
+ "user": "users/ada",
26
+ "displayName": "Ada Lovelace"
27
+ }
28
+ },
29
+ {
30
+ "name": fake.id("participants"),
31
+ "earliestStartTime": "2026-09-15T14:01:30.000Z",
32
+ "latestEndTime": "2026-09-15T14:38:00.000Z",
33
+ "anonymousUser": {
34
+ "displayName": "Guest"
35
+ }
36
+ },
37
+ {
38
+ "name": fake.id("participants"),
39
+ "earliestStartTime": "2026-09-15T14:02:00.000Z",
40
+ "latestEndTime": "2026-09-15T14:15:00.000Z",
41
+ "phoneUser": {
42
+ "displayName": "+1 555-***-0100"
43
+ }
44
+ }
45
+ ]
46
+ };
47
+ }
48
+ function fakeSpaceCreate({ config, fake }) {
49
+ return {
50
+ "name": fake.id("spaces"),
51
+ "meetingUri": "https://meet.google.com/abc-defg-hij",
52
+ "meetingCode": "abc-defg-hij",
53
+ "config": {
54
+ "accessType": config.accessType !== void 0 && config.accessType !== null && config.accessType !== "" ? String(config.accessType) : "OPEN",
55
+ "entryPointAccess": config.entryPointAccess !== void 0 && config.entryPointAccess !== null && config.entryPointAccess !== "" ? String(config.entryPointAccess) : "ALL"
56
+ }
57
+ };
58
+ }
59
+ function fakeSpaceGet({ config, fake }) {
60
+ return {
61
+ "name": config.spaceId !== void 0 && config.spaceId !== null && config.spaceId !== "" ? String(config.spaceId) : fake.id("spaces"),
62
+ "meetingUri": "https://meet.google.com/abc-defg-hij",
63
+ "meetingCode": "abc-defg-hij",
64
+ "config": {
65
+ "accessType": "TRUSTED",
66
+ "entryPointAccess": "ALL"
67
+ },
68
+ "activeConference": {
69
+ "conferenceRecord": fake.id("conferenceRecords")
70
+ }
71
+ };
72
+ }
73
+ function fakeTranscriptEntryList({ config, fake }) {
74
+ return {
75
+ "transcriptEntries": [
76
+ {
77
+ "name": fake.id("entries"),
78
+ "participant": "participants/p1",
79
+ "text": "Let's start with the roadmap.",
80
+ "languageCode": "en-US",
81
+ "startTime": "2026-09-15T14:00:12.000Z",
82
+ "endTime": "2026-09-15T14:00:15.000Z"
83
+ },
84
+ {
85
+ "name": fake.id("entries"),
86
+ "participant": "participants/p2",
87
+ "text": "Sounds good, I'll share my screen.",
88
+ "languageCode": "en-US",
89
+ "startTime": "2026-09-15T14:00:16.000Z",
90
+ "endTime": "2026-09-15T14:00:19.000Z"
91
+ }
92
+ ]
93
+ };
94
+ }
95
+ function fakeTranscriptList({ config, fake }) {
96
+ return {
97
+ "transcripts": [
98
+ {
99
+ "name": fake.id("transcripts"),
100
+ "state": "ENDED",
101
+ "startTime": "2026-09-15T14:00:10.000Z",
102
+ "endTime": "2026-09-15T14:40:05.000Z",
103
+ "docsDestination": {
104
+ "document": fake.id("doc"),
105
+ "exportUri": "https://docs.google.com/document/d/abcdef123456"
106
+ }
107
+ }
108
+ ]
109
+ };
110
+ }
111
+ var googleMeetFaker = (operation, request) => {
112
+ switch (operation) {
113
+ case "conference_record_list":
114
+ return fakeConferenceRecordList(request);
115
+ case "participant_list":
116
+ return fakeParticipantList(request);
117
+ case "space_create":
118
+ return fakeSpaceCreate(request);
119
+ case "space_get":
120
+ return fakeSpaceGet(request);
121
+ case "transcript_entry_list":
122
+ return fakeTranscriptEntryList(request);
123
+ case "transcript_list":
124
+ return fakeTranscriptList(request);
125
+ default:
126
+ throw new Error(
127
+ `google_meet: no fake response is defined for "${operation}". Add a fixture under provider/fixtures/ and regenerate \u2014 a connector without a faker cannot be developed against, tested, or demonstrated.`
128
+ );
129
+ }
130
+ };
131
+
132
+ // src/service.ts
133
+ var CONNECTOR_API_VERSION = 1;
134
+ var GOOGLE_MEET_BASE_URLS = {
135
+ "live": "https://meet.googleapis.com/v2"
136
+ };
137
+ var GOOGLE_MEET_REQUIRES = [
138
+ "accessToken"
139
+ ];
140
+ function googleMeetAuthorize(credentials, request, _mode) {
141
+ request.headers.Authorization = `Bearer ${credentials.accessToken ?? ""}`;
142
+ }
143
+ var GOOGLE_MEET = {
144
+ service: "google_meet",
145
+ title: "Google Meet",
146
+ sandbox: "unverified",
147
+ baseUrls: { ...GOOGLE_MEET_BASE_URLS },
148
+ requires: [...GOOGLE_MEET_REQUIRES],
149
+ authorize: googleMeetAuthorize,
150
+ faker: googleMeetFaker
151
+ };
152
+ var CONFERENCE_RECORD_LIST_OPERATION = "conference_record_list";
153
+ async function googleMeetConferenceRecordList(options) {
154
+ const config = options.config ?? {};
155
+ {
156
+ const n = Number(config.pageSize);
157
+ const given = config.pageSize !== void 0 && config.pageSize !== null && config.pageSize !== "";
158
+ if (given && !(Number.isInteger(n) && n >= 1 && n <= 100)) {
159
+ throw new Error(
160
+ `conference_record_list: "pageSize" must be a integer, got ${JSON.stringify(config.pageSize)}.`
161
+ );
162
+ }
163
+ }
164
+ return callConnector(GOOGLE_MEET, {
165
+ operation: CONFERENCE_RECORD_LIST_OPERATION,
166
+ config,
167
+ input: options.input,
168
+ ...options.credentials === void 0 ? {} : { credentials: options.credentials },
169
+ ...options.mode === void 0 ? {} : { mode: options.mode },
170
+ ...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
171
+ ...options.attempts === void 0 ? {} : { attempts: options.attempts },
172
+ ...options.transport === void 0 ? {} : { transport: options.transport },
173
+ request: {
174
+ method: "GET",
175
+ path: "/conferenceRecords",
176
+ query: {
177
+ ...config.filter !== void 0 && config.filter !== null && config.filter !== "" ? { "filter": String(config.filter) } : {},
178
+ ...config.pageSize !== void 0 && config.pageSize !== null && config.pageSize !== "" ? { "pageSize": Math.trunc(Number(config.pageSize)) } : {},
179
+ ...config.pageToken !== void 0 && config.pageToken !== null && config.pageToken !== "" ? { "pageToken": String(config.pageToken) } : {}
180
+ }
181
+ }
182
+ });
183
+ }
184
+ var PARTICIPANT_LIST_OPERATION = "participant_list";
185
+ async function googleMeetParticipantList(options) {
186
+ const config = options.config ?? {};
187
+ if (config.conferenceRecordId === void 0 || config.conferenceRecordId === null || config.conferenceRecordId === "") {
188
+ throw new Error(`participant_list: "conferenceRecordId" is required (Conference record ID).`);
189
+ }
190
+ return callConnector(GOOGLE_MEET, {
191
+ operation: PARTICIPANT_LIST_OPERATION,
192
+ config,
193
+ input: options.input,
194
+ ...options.credentials === void 0 ? {} : { credentials: options.credentials },
195
+ ...options.mode === void 0 ? {} : { mode: options.mode },
196
+ ...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
197
+ ...options.attempts === void 0 ? {} : { attempts: options.attempts },
198
+ ...options.transport === void 0 ? {} : { transport: options.transport },
199
+ request: {
200
+ method: "GET",
201
+ path: `/conferenceRecords/${encodeURIComponent(String(config.conferenceRecordId))}/participants`,
202
+ query: {
203
+ ...config.pageToken !== void 0 && config.pageToken !== null && config.pageToken !== "" ? { "pageToken": String(config.pageToken) } : {}
204
+ }
205
+ }
206
+ });
207
+ }
208
+ var SPACE_CREATE_OPERATION = "space_create";
209
+ async function googleMeetSpaceCreate(options) {
210
+ const config = options.config ?? {};
211
+ return callConnector(GOOGLE_MEET, {
212
+ operation: SPACE_CREATE_OPERATION,
213
+ config,
214
+ input: options.input,
215
+ ...options.credentials === void 0 ? {} : { credentials: options.credentials },
216
+ ...options.mode === void 0 ? {} : { mode: options.mode },
217
+ ...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
218
+ ...options.attempts === void 0 ? {} : { attempts: options.attempts },
219
+ ...options.transport === void 0 ? {} : { transport: options.transport },
220
+ request: {
221
+ method: "POST",
222
+ path: "/spaces",
223
+ json: nestFields({
224
+ ...config.accessType !== void 0 && config.accessType !== null && config.accessType !== "" ? { "config.accessType": String(config.accessType) } : {},
225
+ ...config.entryPointAccess !== void 0 && config.entryPointAccess !== null && config.entryPointAccess !== "" ? { "config.entryPointAccess": String(config.entryPointAccess) } : {}
226
+ })
227
+ }
228
+ });
229
+ }
230
+ function nestFields(flat) {
231
+ const out = {};
232
+ for (const [path, value] of Object.entries(flat)) {
233
+ const parts = path.split(".");
234
+ let node = out;
235
+ while (parts.length > 1) {
236
+ const key = parts.shift();
237
+ const wantsArray = /^\d+$/.test(parts[0] ?? "");
238
+ if (typeof node[key] !== "object" || node[key] === null) node[key] = wantsArray ? [] : {};
239
+ node = node[key];
240
+ }
241
+ node[parts[0]] = value;
242
+ }
243
+ return out;
244
+ }
245
+ var SPACE_GET_OPERATION = "space_get";
246
+ async function googleMeetSpaceGet(options) {
247
+ const config = options.config ?? {};
248
+ if (config.spaceId === void 0 || config.spaceId === null || config.spaceId === "") {
249
+ throw new Error(`space_get: "spaceId" is required (Space ID).`);
250
+ }
251
+ return callConnector(GOOGLE_MEET, {
252
+ operation: SPACE_GET_OPERATION,
253
+ config,
254
+ input: options.input,
255
+ ...options.credentials === void 0 ? {} : { credentials: options.credentials },
256
+ ...options.mode === void 0 ? {} : { mode: options.mode },
257
+ ...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
258
+ ...options.attempts === void 0 ? {} : { attempts: options.attempts },
259
+ ...options.transport === void 0 ? {} : { transport: options.transport },
260
+ request: {
261
+ method: "GET",
262
+ path: `/spaces/${encodeURIComponent(String(config.spaceId))}`,
263
+ query: {}
264
+ }
265
+ });
266
+ }
267
+ var TRANSCRIPT_ENTRY_LIST_OPERATION = "transcript_entry_list";
268
+ async function googleMeetTranscriptEntryList(options) {
269
+ const config = options.config ?? {};
270
+ if (config.conferenceRecordId === void 0 || config.conferenceRecordId === null || config.conferenceRecordId === "") {
271
+ throw new Error(`transcript_entry_list: "conferenceRecordId" is required (Conference record ID).`);
272
+ }
273
+ if (config.transcriptId === void 0 || config.transcriptId === null || config.transcriptId === "") {
274
+ throw new Error(`transcript_entry_list: "transcriptId" is required (Transcript ID).`);
275
+ }
276
+ return callConnector(GOOGLE_MEET, {
277
+ operation: TRANSCRIPT_ENTRY_LIST_OPERATION,
278
+ config,
279
+ input: options.input,
280
+ ...options.credentials === void 0 ? {} : { credentials: options.credentials },
281
+ ...options.mode === void 0 ? {} : { mode: options.mode },
282
+ ...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
283
+ ...options.attempts === void 0 ? {} : { attempts: options.attempts },
284
+ ...options.transport === void 0 ? {} : { transport: options.transport },
285
+ request: {
286
+ method: "GET",
287
+ path: `/conferenceRecords/${encodeURIComponent(String(config.conferenceRecordId))}/transcripts/${encodeURIComponent(String(config.transcriptId))}/entries`,
288
+ query: {
289
+ ...config.pageToken !== void 0 && config.pageToken !== null && config.pageToken !== "" ? { "pageToken": String(config.pageToken) } : {}
290
+ }
291
+ }
292
+ });
293
+ }
294
+ var TRANSCRIPT_LIST_OPERATION = "transcript_list";
295
+ async function googleMeetTranscriptList(options) {
296
+ const config = options.config ?? {};
297
+ if (config.conferenceRecordId === void 0 || config.conferenceRecordId === null || config.conferenceRecordId === "") {
298
+ throw new Error(`transcript_list: "conferenceRecordId" is required (Conference record ID).`);
299
+ }
300
+ return callConnector(GOOGLE_MEET, {
301
+ operation: TRANSCRIPT_LIST_OPERATION,
302
+ config,
303
+ input: options.input,
304
+ ...options.credentials === void 0 ? {} : { credentials: options.credentials },
305
+ ...options.mode === void 0 ? {} : { mode: options.mode },
306
+ ...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
307
+ ...options.attempts === void 0 ? {} : { attempts: options.attempts },
308
+ ...options.transport === void 0 ? {} : { transport: options.transport },
309
+ request: {
310
+ method: "GET",
311
+ path: `/conferenceRecords/${encodeURIComponent(String(config.conferenceRecordId))}/transcripts`,
312
+ query: {}
313
+ }
314
+ });
315
+ }
316
+
317
+ export { CONFERENCE_RECORD_LIST_OPERATION, CONNECTOR_API_VERSION, GOOGLE_MEET, GOOGLE_MEET_BASE_URLS, GOOGLE_MEET_REQUIRES, PARTICIPANT_LIST_OPERATION, SPACE_CREATE_OPERATION, SPACE_GET_OPERATION, TRANSCRIPT_ENTRY_LIST_OPERATION, TRANSCRIPT_LIST_OPERATION, googleMeetAuthorize, googleMeetConferenceRecordList, googleMeetFaker, googleMeetParticipantList, googleMeetSpaceCreate, googleMeetSpaceGet, googleMeetTranscriptEntryList, googleMeetTranscriptList };
318
+ //# sourceMappingURL=chunk-FZZBTOL7.js.map
319
+ //# sourceMappingURL=chunk-FZZBTOL7.js.map