@particle-academy/zoom-js 0.0.0 → 0.1.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 +23 -0
- package/LICENSE +21 -0
- package/README.md +117 -2
- package/art/fancified.svg +26 -0
- package/dist/chunk-2A3B3B5A.js +113 -0
- package/dist/chunk-2A3B3B5A.js.map +1 -0
- package/dist/flow.cjs +153 -0
- package/dist/flow.cjs.map +1 -0
- package/dist/flow.d.cts +27 -0
- package/dist/flow.d.ts +27 -0
- package/dist/flow.js +40 -0
- package/dist/flow.js.map +1 -0
- package/dist/index.cjs +124 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +153 -0
- package/dist/index.d.ts +153 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/package.json +78 -6
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Changelog — Zoom
|
|
2
|
+
|
|
3
|
+
All four packages — `@particle-academy/zoom-ui`, `@particle-academy/zoom-js`,
|
|
4
|
+
`particle-academy/zoom-php` and `fancy-zoom` — are released together under one
|
|
5
|
+
version. They are generated from one `provider/` definition, so a change to it
|
|
6
|
+
changes all four, and separate version lines would only record which of the
|
|
7
|
+
four somebody remembered to bump.
|
|
8
|
+
|
|
9
|
+
**Write entries HERE**, in the weaver envelope at `providers/zoom/CHANGELOG.md`,
|
|
10
|
+
then regenerate. This file is the one thing in a release that cannot be derived
|
|
11
|
+
— somebody has to write what changed — but writing it in the provider repo
|
|
12
|
+
would be a hand-edit that `.weaver.json` flags and the next sync destroys.
|
|
13
|
+
|
|
14
|
+
## [0.1.0] — 2026-09-16
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- **`meeting_get`** — read a meeting's join link and settings (`GET /meetings/{meetingId}`, scope `meeting:read:meeting`).
|
|
19
|
+
- **`obf_token_create`** — mint the on-behalf-of token a Meeting SDK bot needs to join a meeting it did not create (`GET /users/me/token?type=onbehalf`, scope `user:read:token`), required since Zoom's own 2026-02-23 enforcement date. Meeting-scoped and single-use, so it is minted fresh before every join rather than cached.
|
|
20
|
+
- OAuth2 authorization-code, with `refreshTokenRotates: true` — Zoom issues a new refresh token on every refresh and treats reuse of an old one as an error, the same shape this vocabulary already refuses to retry or run concurrently.
|
|
21
|
+
- Sandbox is `unverified`: Zoom documents no test estate distinct from a real account, but nobody has confirmed there is truly nothing rather than simply not having found it.
|
|
22
|
+
|
|
23
|
+
Tynn #10 (MOIC U15) — the OAuth flow, both endpoints and the sandbox note were checked against Zoom's own docs, its developer forum and its migration blog on 2026-09-15; `meeting_get`'s field list is the long-stable v2 shape rather than a page transcription (Zoom's detail page did not render for review) and is flagged for a live spot-check before an account depends on it.
|
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,118 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Zoom
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://particle.academy)
|
|
4
|
+
|
|
5
|
+
Zoom 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/zoom-ui` | `npm install @particle-academy/zoom-ui` |
|
|
14
|
+
| Node | `@particle-academy/zoom-js` | `npm install @particle-academy/zoom-js` |
|
|
15
|
+
| PHP 8.4+ | `particle-academy/zoom-php` | `composer require particle-academy/zoom-php` |
|
|
16
|
+
| Python 3.11+ | `fancy-zoom` | `pip install fancy-zoom` |
|
|
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 Zoom 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 Zoom 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 Zoom app you registered at marketplace.zoom.us. One value for the whole installation -- the same app serves every connected Zoom account. |
|
|
45
|
+
| **OAuth client secret** | per installation | **secret** | From the same app. 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 ZOOM 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** | per connected account | **secret** | Also per account. A NEW one is issued on every refresh -- persist the replacement atomically, and never retry a refresh that may have already succeeded: replaying an old refresh token is Zoom's own reported failure mode for a rotating grant. |
|
|
48
|
+
|
|
49
|
+
### Authorising
|
|
50
|
+
|
|
51
|
+
Zoom 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://zoom.us/oauth/authorize
|
|
54
|
+
- **Token URL** — https://zoom.us/oauth/token
|
|
55
|
+
- **Scopes** — `meeting:read:meeting`, `user:read:token`
|
|
56
|
+
- **Access token lifetime** — 3600 seconds (1 hours). A host that never refreshes works all afternoon and is broken by morning.
|
|
57
|
+
|
|
58
|
+
**The refresh tokens ROTATE, and they are single use.** Every refresh returns a new one and spends the one submitted, so replaying a spent token revokes the ENTIRE grant — the user is signed out, with nothing in the failure that says why.
|
|
59
|
+
|
|
60
|
+
Two consequences, both of which a host gets wrong by default:
|
|
61
|
+
|
|
62
|
+
1. **Do not RETRY a failed refresh with the same token.** A response that arrived but was not persisted — a crash between the reply and the write — turns the reflexive retry into a replay.
|
|
63
|
+
2. **Do not refresh CONCURRENTLY.** Two workers refreshing at once means one of them replays.
|
|
64
|
+
|
|
65
|
+
Persist the returned token before using the access token it came with.
|
|
66
|
+
|
|
67
|
+
### The estate
|
|
68
|
+
|
|
69
|
+
**Nobody has checked whether Zoom has a test estate.** Treat every call as real.
|
|
70
|
+
|
|
71
|
+
> Zoom has no test estate distinct from a real account, as far as this review found (2026-09-15) -- but it is UNVERIFIED, not confirmed. Every call authorizes against the caller's own Zoom account and can read real meeting data. Use fake mode while building.
|
|
72
|
+
|
|
73
|
+
## What it can do
|
|
74
|
+
|
|
75
|
+
### Actions
|
|
76
|
+
|
|
77
|
+
#### `meeting_get` — Get meeting
|
|
78
|
+
|
|
79
|
+
Read a Zoom meeting's join details and settings.
|
|
80
|
+
|
|
81
|
+
`GET /meetings/{meetingId}` · reads only — safe to replay
|
|
82
|
+
|
|
83
|
+
| Input | Required | What it is |
|
|
84
|
+
|---|---|---|
|
|
85
|
+
| `meetingId` | yes | The meeting's numeric id, from its join URL or from Zoom's own meeting list. |
|
|
86
|
+
|
|
87
|
+
#### `obf_token_create` — Mint on-behalf-of token
|
|
88
|
+
|
|
89
|
+
Mint a short-lived token so a bot can join a Zoom meeting on the authorising user's behalf.
|
|
90
|
+
|
|
91
|
+
`GET /users/me/token` · **unsafe to replay** — a retried durable run does it TWICE
|
|
92
|
+
|
|
93
|
+
| Input | Required | What it is |
|
|
94
|
+
|---|---|---|
|
|
95
|
+
| `meetingId` | yes | The meeting the bot is about to join. The minted token works for this meeting only. |
|
|
96
|
+
|
|
97
|
+
## Run it before you have credentials
|
|
98
|
+
|
|
99
|
+
Every operation ships a **faker**, whether or not Zoom has a sandbox. Set a
|
|
100
|
+
node's mode to `fake` and it returns the shape Zoom actually publishes — the
|
|
101
|
+
same field names, deterministically — so you can wire the downstream nodes before
|
|
102
|
+
touching an account, a key, or a network.
|
|
103
|
+
|
|
104
|
+
## This repository is generated
|
|
105
|
+
|
|
106
|
+
`provider/` is the source. Everything under `packages/` is emitted from it and
|
|
107
|
+
**must not be hand-edited** — CI regenerates and diffs on every push, and the
|
|
108
|
+
next protocol sync destroys anything it finds. See [`AGENTS.md`](AGENTS.md).
|
|
109
|
+
|
|
110
|
+
## Two namespaces, which do not match on purpose
|
|
111
|
+
|
|
112
|
+
The repo is `github.com/Fancy-Friends/zoom`; the packages publish under
|
|
113
|
+
`particle-academy`. Nothing derives one from the other — the names come from
|
|
114
|
+
weaver's `friends.json` and nowhere else.
|
|
115
|
+
|
|
116
|
+
## Licence
|
|
117
|
+
|
|
118
|
+
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,113 @@
|
|
|
1
|
+
import { callConnector } from '@particle-academy/fancy-connector-core';
|
|
2
|
+
|
|
3
|
+
// src/faker.ts
|
|
4
|
+
function fakeMeetingGet({ config, fake }) {
|
|
5
|
+
return {
|
|
6
|
+
"id": config.meetingId !== void 0 && config.meetingId !== null && config.meetingId !== "" ? Number.isFinite(Number(config.meetingId)) ? Math.trunc(Number(config.meetingId)) : null : Array.from({ length: 10 }, () => fake.int(0, 9)).join(""),
|
|
7
|
+
"uuid": `${fake.hex(8)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(12)}`,
|
|
8
|
+
"host_id": fake.id("u"),
|
|
9
|
+
"topic": "Weekly sync",
|
|
10
|
+
"type": 2,
|
|
11
|
+
"status": "waiting",
|
|
12
|
+
"start_time": "2026-09-22T14:00:00Z",
|
|
13
|
+
"duration": 30,
|
|
14
|
+
"timezone": "America/New_York",
|
|
15
|
+
"agenda": "",
|
|
16
|
+
"join_url": "https://zoom.us/j/1234567890?pwd=fake",
|
|
17
|
+
"password": Array.from({ length: 6 }, () => fake.int(0, 9)).join(""),
|
|
18
|
+
"settings": {
|
|
19
|
+
"waiting_room": true,
|
|
20
|
+
"join_before_host": false,
|
|
21
|
+
"approval_type": 2
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
function fakeObfTokenCreate({ config, fake }) {
|
|
26
|
+
return {
|
|
27
|
+
"token": fake.id("obf")
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
var zoomFaker = (operation, request) => {
|
|
31
|
+
switch (operation) {
|
|
32
|
+
case "meeting_get":
|
|
33
|
+
return fakeMeetingGet(request);
|
|
34
|
+
case "obf_token_create":
|
|
35
|
+
return fakeObfTokenCreate(request);
|
|
36
|
+
default:
|
|
37
|
+
throw new Error(
|
|
38
|
+
`zoom: 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.`
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
// src/service.ts
|
|
44
|
+
var CONNECTOR_API_VERSION = 1;
|
|
45
|
+
var ZOOM_BASE_URLS = {
|
|
46
|
+
"live": "https://api.zoom.us/v2"
|
|
47
|
+
};
|
|
48
|
+
var ZOOM_REQUIRES = [
|
|
49
|
+
"accessToken"
|
|
50
|
+
];
|
|
51
|
+
function zoomAuthorize(credentials, request, _mode) {
|
|
52
|
+
request.headers.Authorization = `Bearer ${credentials.accessToken ?? ""}`;
|
|
53
|
+
}
|
|
54
|
+
var ZOOM = {
|
|
55
|
+
service: "zoom",
|
|
56
|
+
title: "Zoom",
|
|
57
|
+
sandbox: "unverified",
|
|
58
|
+
baseUrls: { ...ZOOM_BASE_URLS },
|
|
59
|
+
requires: [...ZOOM_REQUIRES],
|
|
60
|
+
authorize: zoomAuthorize,
|
|
61
|
+
faker: zoomFaker
|
|
62
|
+
};
|
|
63
|
+
var MEETING_GET_OPERATION = "meeting_get";
|
|
64
|
+
async function zoomMeetingGet(options) {
|
|
65
|
+
const config = options.config ?? {};
|
|
66
|
+
if (config.meetingId === void 0 || config.meetingId === null || config.meetingId === "") {
|
|
67
|
+
throw new Error(`meeting_get: "meetingId" is required (Meeting ID).`);
|
|
68
|
+
}
|
|
69
|
+
return callConnector(ZOOM, {
|
|
70
|
+
operation: MEETING_GET_OPERATION,
|
|
71
|
+
config,
|
|
72
|
+
input: options.input,
|
|
73
|
+
...options.credentials === void 0 ? {} : { credentials: options.credentials },
|
|
74
|
+
...options.mode === void 0 ? {} : { mode: options.mode },
|
|
75
|
+
...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
|
|
76
|
+
...options.attempts === void 0 ? {} : { attempts: options.attempts },
|
|
77
|
+
...options.transport === void 0 ? {} : { transport: options.transport },
|
|
78
|
+
request: {
|
|
79
|
+
method: "GET",
|
|
80
|
+
path: `/meetings/${encodeURIComponent(String(config.meetingId))}`,
|
|
81
|
+
query: {}
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
var OBF_TOKEN_CREATE_OPERATION = "obf_token_create";
|
|
86
|
+
async function zoomObfTokenCreate(options) {
|
|
87
|
+
const config = options.config ?? {};
|
|
88
|
+
if (config.meetingId === void 0 || config.meetingId === null || config.meetingId === "") {
|
|
89
|
+
throw new Error(`obf_token_create: "meetingId" is required (Meeting ID).`);
|
|
90
|
+
}
|
|
91
|
+
return callConnector(ZOOM, {
|
|
92
|
+
operation: OBF_TOKEN_CREATE_OPERATION,
|
|
93
|
+
config,
|
|
94
|
+
input: options.input,
|
|
95
|
+
...options.credentials === void 0 ? {} : { credentials: options.credentials },
|
|
96
|
+
...options.mode === void 0 ? {} : { mode: options.mode },
|
|
97
|
+
...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
|
|
98
|
+
...options.attempts === void 0 ? {} : { attempts: options.attempts },
|
|
99
|
+
...options.transport === void 0 ? {} : { transport: options.transport },
|
|
100
|
+
request: {
|
|
101
|
+
method: "GET",
|
|
102
|
+
path: "/users/me/token",
|
|
103
|
+
query: {
|
|
104
|
+
"meeting_id": String(config.meetingId),
|
|
105
|
+
"type": "onbehalf"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export { CONNECTOR_API_VERSION, MEETING_GET_OPERATION, OBF_TOKEN_CREATE_OPERATION, ZOOM, ZOOM_BASE_URLS, ZOOM_REQUIRES, zoomAuthorize, zoomFaker, zoomMeetingGet, zoomObfTokenCreate };
|
|
112
|
+
//# sourceMappingURL=chunk-2A3B3B5A.js.map
|
|
113
|
+
//# sourceMappingURL=chunk-2A3B3B5A.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/faker.ts","../src/service.ts","../src/actions/meeting-get.ts","../src/actions/obf-token-create.ts"],"names":["callConnector"],"mappings":";;;AAyBA,SAAS,cAAA,CAAe,EAAE,MAAA,EAAQ,IAAA,EAAK,EAAyB;AAC9D,EAAA,OAAO;AAAA,IACL,MAAO,MAAA,CAAO,SAAA,KAAc,MAAA,IAAa,MAAA,CAAO,cAAc,IAAA,IAAQ,MAAA,CAAO,SAAA,KAAc,EAAA,GAAM,OAAO,QAAA,CAAS,MAAA,CAAO,OAAO,SAAS,CAAC,IAAI,IAAA,CAAK,KAAA,CAAM,MAAA,CAAO,MAAA,CAAO,SAAS,CAAC,CAAA,GAAI,OAAQ,KAAA,CAAM,IAAA,CAAK,EAAE,MAAA,EAAQ,EAAA,EAAG,EAAG,MAAM,KAAK,GAAA,CAAI,CAAA,EAAG,CAAC,CAAC,CAAA,CAAE,KAAK,EAAE,CAAA;AAAA,IACpP,MAAA,EAAQ,CAAA,EAAG,IAAA,CAAK,GAAA,CAAI,CAAC,CAAC,CAAA,CAAA,EAAI,IAAA,CAAK,GAAA,CA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,IACnF,GAAI,QAAQ,QAAA,KAAa,MAAA,GAAY,EAAC,GAAI,EAAE,QAAA,EAAU,OAAA,CAAQ,QAAA,EAAS;AAAA,IACvE,GAAI,QAAQ,SAAA,KAAc,MAAA,GAAY,EAAC,GAAI,EAAE,SAAA,EAAW,OAAA,CAAQ,SAAA,EAAU;AAAA,IAC1E,OAAA,EAAS;AAAA,MACP,MAAA,EAAQ,KAAA;AAAA,MACR,IAAA,EAAM,iBAAA;AAAA,MACN,KAAA,EAAO;AAAA,QACL,YAAA,EAAc,MAAA,CAAO,MAAA,CAAO,SAAS,CAAA;AAAA,QACrC,MAAA,EAAQ;AAAA;AACV;AACF,GACD,CAAA;AACH","file":"chunk-2A3B3B5A.js","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/fixtures/ by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/fixtures/ (or weaver's template/) and regenerate:\n *\n * npm run provider -- zoom\n */\n\n/**\n * The Zoom faker.\n *\n * Shapes, not behaviour: the goal is that a downstream node sees the field\n * NAMES Zoom actually publishes, so an author can wire {{ $json.data.id }}\n * against a fake and have it keep working against the real thing.\n *\n * Deterministic — same inputs, same output. A faker returning a fresh uuid\n * every call cannot be asserted on, so its fixtures degrade to \"it did not\n * throw\", which is the assertion that catches nothing.\n */\n\nimport type { ConnectorFaker, FakeRequest } from \"@particle-academy/fancy-connector-core\";\n\nfunction fakeMeetingGet({ config, fake }: FakeRequest): unknown {\n return {\n \"id\": (config.meetingId !== undefined && config.meetingId !== null && config.meetingId !== \"\" ? (Number.isFinite(Number(config.meetingId)) ? Math.trunc(Number(config.meetingId)) : null) : Array.from({ length: 10 }, () => fake.int(0, 9)).join(\"\")),\n \"uuid\": `${fake.hex(8)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(12)}`,\n \"host_id\": fake.id(\"u\"),\n \"topic\": \"Weekly sync\",\n \"type\": 2,\n \"status\": \"waiting\",\n \"start_time\": \"2026-09-22T14:00:00Z\",\n \"duration\": 30,\n \"timezone\": \"America/New_York\",\n \"agenda\": \"\",\n \"join_url\": \"https://zoom.us/j/1234567890?pwd=fake\",\n \"password\": Array.from({ length: 6 }, () => fake.int(0, 9)).join(\"\"),\n \"settings\": {\n \"waiting_room\": true,\n \"join_before_host\": false,\n \"approval_type\": 2,\n },\n };\n}\n\nfunction fakeObfTokenCreate({ config, fake }: FakeRequest): unknown {\n return {\n \"token\": fake.id(\"obf\"),\n };\n}\n\nexport const zoomFaker: ConnectorFaker = (operation, request) => {\n switch (operation) {\n case \"meeting_get\":\n return fakeMeetingGet(request);\n\n case \"obf_token_create\":\n return fakeObfTokenCreate(request);\n\n default:\n // A faker asked for an operation it has no shape for must SAY so. Making\n // something up would produce a green run whose output silently has none\n // of the fields the author is about to reference.\n throw new Error(\n `zoom: no fake response is defined for \"${operation}\". ` +\n \"Add a fixture under provider/fixtures/ and regenerate — a connector without a faker \" +\n \"cannot be developed against, tested, or demonstrated.\",\n );\n }\n};\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- zoom\n */\n\n/**\n * Zoom, as one service descriptor shared by every Zoom operation.\n *\n * @particle-academy/fancy-connector-core carries what is true of ALL\n * connectors. This carries what is true of Zoom: its base URL, its auth\n * scheme, its idempotency header, and its faker.\n *\n * ## The sandbox trap, written down where it is used\n *\n * Zoom has no test estate distinct from a real account, as far as this review\n * found (2026-09-15) -- but it is UNVERIFIED, not confirmed. Every call\n * authorizes against the caller's own Zoom account and can read real meeting\n * data. Use fake mode while building.\n */\n\nimport type { ConnectorMode, PreparedRequest, ServiceDescriptor } from \"@particle-academy/fancy-connector-core\";\n\nimport { zoomFaker } from \"./faker.js\";\n\n/**\n * The connector API version this package was GENERATED against.\n *\n * A literal, never imported. An imported constant lets an upgrade rewrite the\n * very claim it exists to detect, after which the copy agrees with itself\n * forever.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\nexport const ZOOM_BASE_URLS = {\n \"live\": \"https://api.zoom.us/v2\"\n} as const;\n\n/** Credential keys a remote call cannot proceed without. */\nexport const ZOOM_REQUIRES = [\n \"accessToken\"\n] as const;\n\n/**\n * Apply Zoom's auth scheme to an outgoing request.\n *\n * Every Zoom REST call is a Bearer token on the Authorization header, OAuth or\n * Server-to-Server alike; this provider declares the user OAuth shape so a\n * host can connect a rep's own Zoom account rather than one shared app-wide\n * identity.\n *\n * The mode is passed in because for some providers auth and estate are the\n * same decision expressed in the URL; here it is unused, and saying so is\n * cheaper than wondering later whether it was forgotten.\n */\nexport function zoomAuthorize(\n credentials: Record<string, string | undefined>,\n request: PreparedRequest,\n _mode: ConnectorMode,\n): void {\n request.headers.Authorization = `Bearer ${credentials.accessToken ?? \"\"}`;\n}\n\n/** The Zoom service, for the TypeScript runtime. */\nexport const ZOOM: ServiceDescriptor = {\n service: \"zoom\",\n title: \"Zoom\",\n sandbox: \"unverified\",\n baseUrls: { ...ZOOM_BASE_URLS },\n requires: [...ZOOM_REQUIRES],\n authorize: zoomAuthorize,\n faker: zoomFaker,\n};\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/meeting-get.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/meeting-get.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- zoom\n */\n\n/**\n * Read a Zoom meeting's join details and settings.\n *\n * GET /meetings/{meetingId} — https://developers.zoom.us/docs/api/meetings/\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Zoom or calls the faker.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { ZOOM } from \"../service.js\";\n\nexport const MEETING_GET_OPERATION = \"meeting_get\";\n\nexport type MeetingGetOptions = {\n /** The node's resolved config. Keys: meetingId. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function zoomMeetingGet(options: MeetingGetOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.meetingId === undefined || config.meetingId === null || config.meetingId === \"\") {\n throw new Error(`meeting_get: \"meetingId\" is required (Meeting ID).`);\n }\n\n return callConnector(ZOOM, {\n operation: MEETING_GET_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"GET\",\n path: `/meetings/${encodeURIComponent(String(config.meetingId))}`,\n query: {},\n },\n });\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/obf-token-create.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/obf-token-create.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- zoom\n */\n\n/**\n * Mint a short-lived token so a bot can join a Zoom meeting on the authorising\n * user's behalf.\n *\n * GET /users/me/token —\n * https://developers.zoom.us/blog/transition-to-obf-token-meetingsdk-apps/\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Zoom or calls the faker.\n *\n * sideEffects: unsafe-to-replay.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { ZOOM } from \"../service.js\";\n\nexport const OBF_TOKEN_CREATE_OPERATION = \"obf_token_create\";\n\nexport type ObfTokenCreateOptions = {\n /** The node's resolved config. Keys: meetingId. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function zoomObfTokenCreate(options: ObfTokenCreateOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.meetingId === undefined || config.meetingId === null || config.meetingId === \"\") {\n throw new Error(`obf_token_create: \"meetingId\" is required (Meeting ID).`);\n }\n\n return callConnector(ZOOM, {\n operation: OBF_TOKEN_CREATE_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"GET\",\n path: \"/users/me/token\",\n query: {\n \"meeting_id\": String(config.meetingId),\n \"type\": \"onbehalf\",\n },\n },\n });\n}\n"]}
|
package/dist/flow.cjs
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var fancyConnectorCore = require('@particle-academy/fancy-connector-core');
|
|
4
|
+
var zoomUi = require('@particle-academy/zoom-ui');
|
|
5
|
+
|
|
6
|
+
// src/flow.ts
|
|
7
|
+
|
|
8
|
+
// src/faker.ts
|
|
9
|
+
function fakeMeetingGet({ config, fake }) {
|
|
10
|
+
return {
|
|
11
|
+
"id": config.meetingId !== void 0 && config.meetingId !== null && config.meetingId !== "" ? Number.isFinite(Number(config.meetingId)) ? Math.trunc(Number(config.meetingId)) : null : Array.from({ length: 10 }, () => fake.int(0, 9)).join(""),
|
|
12
|
+
"uuid": `${fake.hex(8)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(12)}`,
|
|
13
|
+
"host_id": fake.id("u"),
|
|
14
|
+
"topic": "Weekly sync",
|
|
15
|
+
"type": 2,
|
|
16
|
+
"status": "waiting",
|
|
17
|
+
"start_time": "2026-09-22T14:00:00Z",
|
|
18
|
+
"duration": 30,
|
|
19
|
+
"timezone": "America/New_York",
|
|
20
|
+
"agenda": "",
|
|
21
|
+
"join_url": "https://zoom.us/j/1234567890?pwd=fake",
|
|
22
|
+
"password": Array.from({ length: 6 }, () => fake.int(0, 9)).join(""),
|
|
23
|
+
"settings": {
|
|
24
|
+
"waiting_room": true,
|
|
25
|
+
"join_before_host": false,
|
|
26
|
+
"approval_type": 2
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function fakeObfTokenCreate({ config, fake }) {
|
|
31
|
+
return {
|
|
32
|
+
"token": fake.id("obf")
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
var zoomFaker = (operation, request) => {
|
|
36
|
+
switch (operation) {
|
|
37
|
+
case "meeting_get":
|
|
38
|
+
return fakeMeetingGet(request);
|
|
39
|
+
case "obf_token_create":
|
|
40
|
+
return fakeObfTokenCreate(request);
|
|
41
|
+
default:
|
|
42
|
+
throw new Error(
|
|
43
|
+
`zoom: 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.`
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// src/service.ts
|
|
49
|
+
var ZOOM_BASE_URLS = {
|
|
50
|
+
"live": "https://api.zoom.us/v2"
|
|
51
|
+
};
|
|
52
|
+
var ZOOM_REQUIRES = [
|
|
53
|
+
"accessToken"
|
|
54
|
+
];
|
|
55
|
+
function zoomAuthorize(credentials, request, _mode) {
|
|
56
|
+
request.headers.Authorization = `Bearer ${credentials.accessToken ?? ""}`;
|
|
57
|
+
}
|
|
58
|
+
var ZOOM = {
|
|
59
|
+
service: "zoom",
|
|
60
|
+
title: "Zoom",
|
|
61
|
+
sandbox: "unverified",
|
|
62
|
+
baseUrls: { ...ZOOM_BASE_URLS },
|
|
63
|
+
requires: [...ZOOM_REQUIRES],
|
|
64
|
+
authorize: zoomAuthorize,
|
|
65
|
+
faker: zoomFaker
|
|
66
|
+
};
|
|
67
|
+
var MEETING_GET_OPERATION = "meeting_get";
|
|
68
|
+
async function zoomMeetingGet(options) {
|
|
69
|
+
const config = options.config ?? {};
|
|
70
|
+
if (config.meetingId === void 0 || config.meetingId === null || config.meetingId === "") {
|
|
71
|
+
throw new Error(`meeting_get: "meetingId" is required (Meeting ID).`);
|
|
72
|
+
}
|
|
73
|
+
return fancyConnectorCore.callConnector(ZOOM, {
|
|
74
|
+
operation: MEETING_GET_OPERATION,
|
|
75
|
+
config,
|
|
76
|
+
input: options.input,
|
|
77
|
+
...options.credentials === void 0 ? {} : { credentials: options.credentials },
|
|
78
|
+
...options.mode === void 0 ? {} : { mode: options.mode },
|
|
79
|
+
...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
|
|
80
|
+
...options.attempts === void 0 ? {} : { attempts: options.attempts },
|
|
81
|
+
...options.transport === void 0 ? {} : { transport: options.transport },
|
|
82
|
+
request: {
|
|
83
|
+
method: "GET",
|
|
84
|
+
path: `/meetings/${encodeURIComponent(String(config.meetingId))}`,
|
|
85
|
+
query: {}
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
var OBF_TOKEN_CREATE_OPERATION = "obf_token_create";
|
|
90
|
+
async function zoomObfTokenCreate(options) {
|
|
91
|
+
const config = options.config ?? {};
|
|
92
|
+
if (config.meetingId === void 0 || config.meetingId === null || config.meetingId === "") {
|
|
93
|
+
throw new Error(`obf_token_create: "meetingId" is required (Meeting ID).`);
|
|
94
|
+
}
|
|
95
|
+
return fancyConnectorCore.callConnector(ZOOM, {
|
|
96
|
+
operation: OBF_TOKEN_CREATE_OPERATION,
|
|
97
|
+
config,
|
|
98
|
+
input: options.input,
|
|
99
|
+
...options.credentials === void 0 ? {} : { credentials: options.credentials },
|
|
100
|
+
...options.mode === void 0 ? {} : { mode: options.mode },
|
|
101
|
+
...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
|
|
102
|
+
...options.attempts === void 0 ? {} : { attempts: options.attempts },
|
|
103
|
+
...options.transport === void 0 ? {} : { transport: options.transport },
|
|
104
|
+
request: {
|
|
105
|
+
method: "GET",
|
|
106
|
+
path: "/users/me/token",
|
|
107
|
+
query: {
|
|
108
|
+
"meeting_id": String(config.meetingId),
|
|
109
|
+
"type": "onbehalf"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
// src/flow.ts
|
|
116
|
+
var zoomMeetingGetExecutor = async (ctx) => {
|
|
117
|
+
const config = ctx.node.data?.config ?? {};
|
|
118
|
+
const result = await zoomMeetingGet({
|
|
119
|
+
config,
|
|
120
|
+
input: ctx.inputs?.in
|
|
121
|
+
});
|
|
122
|
+
ctx.emit({
|
|
123
|
+
type: "log",
|
|
124
|
+
level: "info",
|
|
125
|
+
nodeId: ctx.node.id,
|
|
126
|
+
message: `zoom meeting_get ${result.data?.id} (${result.mode})`
|
|
127
|
+
});
|
|
128
|
+
return { __port: "out", value: result };
|
|
129
|
+
};
|
|
130
|
+
var zoomObfTokenCreateExecutor = async (ctx) => {
|
|
131
|
+
const config = ctx.node.data?.config ?? {};
|
|
132
|
+
const result = await zoomObfTokenCreate({
|
|
133
|
+
config,
|
|
134
|
+
input: ctx.inputs?.in
|
|
135
|
+
});
|
|
136
|
+
ctx.emit({
|
|
137
|
+
type: "log",
|
|
138
|
+
level: "info",
|
|
139
|
+
nodeId: ctx.node.id,
|
|
140
|
+
message: `zoom obf_token_create ${result.data?.id} (${result.mode})`
|
|
141
|
+
});
|
|
142
|
+
return { __port: "out", value: result };
|
|
143
|
+
};
|
|
144
|
+
var ZOOM_RUNNABLE_KINDS = [
|
|
145
|
+
{ ...zoomUi.zoomMeetingGetKind, executor: zoomMeetingGetExecutor },
|
|
146
|
+
{ ...zoomUi.zoomObfTokenCreateKind, executor: zoomObfTokenCreateExecutor }
|
|
147
|
+
];
|
|
148
|
+
|
|
149
|
+
exports.ZOOM_RUNNABLE_KINDS = ZOOM_RUNNABLE_KINDS;
|
|
150
|
+
exports.zoomMeetingGetExecutor = zoomMeetingGetExecutor;
|
|
151
|
+
exports.zoomObfTokenCreateExecutor = zoomObfTokenCreateExecutor;
|
|
152
|
+
//# sourceMappingURL=flow.cjs.map
|
|
153
|
+
//# sourceMappingURL=flow.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/faker.ts","../src/service.ts","../src/actions/meeting-get.ts","../src/actions/obf-token-create.ts","../src/flow.ts"],"names":["callConnector","zoomMeetingGetKind","zoomObfTokenCreateKind"],"mappings":";;;;;;;;AAyBA,SAAS,cAAA,CAAe,EAAE,MAAA,EAAQ,IAAA,EAAK,EAAyB;AAC9D,EAAA,OAAO;AAAA,IACL,MAAO,MAAA,CAAO,SAAA,KAAc,MAAA,IAAa,MAAA,CAAO,cAAc,IAAA,IAAQ,MAAA,CAAO,SAAA,KAAc,EAAA,GAAM,OAAO,QAAA,CAAS,MAAA,CAAO,OAAO,SAAS,CAAC,IAAI,IAAA,CAAK,KAAA,CAAM,MAAA,CAAO,MAAA,CAAO,SAAS,CAAC,CAAA,GAAI,OAAQ,KAAA,CAAM,IAAA,CAAK,EAAE,MAAA,EAAQ,EAAA,EAAG,EAAG,MAAM,KAAK,GAAA,CAAI,CAAA,EAAG,CAAC,CAAC,CAAA,CAAE,KAAK,EAAE,CAAA;AAAA,IACpP,MAAA,EAAQ,CAAA,EAAG,IAAA,CAAK,GAAA,CAAI,CAAC,CAAC,CAAA,CAAA,EAAI,IAAA,CAAK,GAAA,CAAI,C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AA,IACA,KAAA,EAAO,IAAI,MAAA,EAAQ;AAAA,GACpB,CAAA;AAED,EAAA,GAAA,CAAI,IAAA,CAAK;AAAA,IACP,IAAA,EAAM,KAAA;AAAA,IACN,KAAA,EAAO,MAAA;AAAA,IACP,MAAA,EAAQ,IAAI,IAAA,CAAK,EAAA;AAAA,IACjB,SAAS,CAAA,sBAAA,EAA0B,MAAA,CAAO,MAA0B,EAAE,CAAA,EAAA,EAAK,OAAO,IAAI,CAAA,CAAA;AAAA,GACvF,CAAA;AAED,EAAA,OAAO,EAAE,MAAA,EAAQ,KAAA,EAAO,KAAA,EAAO,MAAA,EAAO;AACxC;AAGO,IAAM,mBAAA,GAA4C;AAAA,EACvD,EAAE,GAAGC,yBAAA,EAAoB,QAAA,EAAU,sBAAA,EAAuB;AAAA,EAC1D,EAAE,GAAGC,6BAAA,EAAwB,QAAA,EAAU,0BAAA;AACzC","file":"flow.cjs","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/fixtures/ by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/fixtures/ (or weaver's template/) and regenerate:\n *\n * npm run provider -- zoom\n */\n\n/**\n * The Zoom faker.\n *\n * Shapes, not behaviour: the goal is that a downstream node sees the field\n * NAMES Zoom actually publishes, so an author can wire {{ $json.data.id }}\n * against a fake and have it keep working against the real thing.\n *\n * Deterministic — same inputs, same output. A faker returning a fresh uuid\n * every call cannot be asserted on, so its fixtures degrade to \"it did not\n * throw\", which is the assertion that catches nothing.\n */\n\nimport type { ConnectorFaker, FakeRequest } from \"@particle-academy/fancy-connector-core\";\n\nfunction fakeMeetingGet({ config, fake }: FakeRequest): unknown {\n return {\n \"id\": (config.meetingId !== undefined && config.meetingId !== null && config.meetingId !== \"\" ? (Number.isFinite(Number(config.meetingId)) ? Math.trunc(Number(config.meetingId)) : null) : Array.from({ length: 10 }, () => fake.int(0, 9)).join(\"\")),\n \"uuid\": `${fake.hex(8)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(12)}`,\n \"host_id\": fake.id(\"u\"),\n \"topic\": \"Weekly sync\",\n \"type\": 2,\n \"status\": \"waiting\",\n \"start_time\": \"2026-09-22T14:00:00Z\",\n \"duration\": 30,\n \"timezone\": \"America/New_York\",\n \"agenda\": \"\",\n \"join_url\": \"https://zoom.us/j/1234567890?pwd=fake\",\n \"password\": Array.from({ length: 6 }, () => fake.int(0, 9)).join(\"\"),\n \"settings\": {\n \"waiting_room\": true,\n \"join_before_host\": false,\n \"approval_type\": 2,\n },\n };\n}\n\nfunction fakeObfTokenCreate({ config, fake }: FakeRequest): unknown {\n return {\n \"token\": fake.id(\"obf\"),\n };\n}\n\nexport const zoomFaker: ConnectorFaker = (operation, request) => {\n switch (operation) {\n case \"meeting_get\":\n return fakeMeetingGet(request);\n\n case \"obf_token_create\":\n return fakeObfTokenCreate(request);\n\n default:\n // A faker asked for an operation it has no shape for must SAY so. Making\n // something up would produce a green run whose output silently has none\n // of the fields the author is about to reference.\n throw new Error(\n `zoom: no fake response is defined for \"${operation}\". ` +\n \"Add a fixture under provider/fixtures/ and regenerate — a connector without a faker \" +\n \"cannot be developed against, tested, or demonstrated.\",\n );\n }\n};\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- zoom\n */\n\n/**\n * Zoom, as one service descriptor shared by every Zoom operation.\n *\n * @particle-academy/fancy-connector-core carries what is true of ALL\n * connectors. This carries what is true of Zoom: its base URL, its auth\n * scheme, its idempotency header, and its faker.\n *\n * ## The sandbox trap, written down where it is used\n *\n * Zoom has no test estate distinct from a real account, as far as this review\n * found (2026-09-15) -- but it is UNVERIFIED, not confirmed. Every call\n * authorizes against the caller's own Zoom account and can read real meeting\n * data. Use fake mode while building.\n */\n\nimport type { ConnectorMode, PreparedRequest, ServiceDescriptor } from \"@particle-academy/fancy-connector-core\";\n\nimport { zoomFaker } from \"./faker.js\";\n\n/**\n * The connector API version this package was GENERATED against.\n *\n * A literal, never imported. An imported constant lets an upgrade rewrite the\n * very claim it exists to detect, after which the copy agrees with itself\n * forever.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\nexport const ZOOM_BASE_URLS = {\n \"live\": \"https://api.zoom.us/v2\"\n} as const;\n\n/** Credential keys a remote call cannot proceed without. */\nexport const ZOOM_REQUIRES = [\n \"accessToken\"\n] as const;\n\n/**\n * Apply Zoom's auth scheme to an outgoing request.\n *\n * Every Zoom REST call is a Bearer token on the Authorization header, OAuth or\n * Server-to-Server alike; this provider declares the user OAuth shape so a\n * host can connect a rep's own Zoom account rather than one shared app-wide\n * identity.\n *\n * The mode is passed in because for some providers auth and estate are the\n * same decision expressed in the URL; here it is unused, and saying so is\n * cheaper than wondering later whether it was forgotten.\n */\nexport function zoomAuthorize(\n credentials: Record<string, string | undefined>,\n request: PreparedRequest,\n _mode: ConnectorMode,\n): void {\n request.headers.Authorization = `Bearer ${credentials.accessToken ?? \"\"}`;\n}\n\n/** The Zoom service, for the TypeScript runtime. */\nexport const ZOOM: ServiceDescriptor = {\n service: \"zoom\",\n title: \"Zoom\",\n sandbox: \"unverified\",\n baseUrls: { ...ZOOM_BASE_URLS },\n requires: [...ZOOM_REQUIRES],\n authorize: zoomAuthorize,\n faker: zoomFaker,\n};\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/meeting-get.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/meeting-get.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- zoom\n */\n\n/**\n * Read a Zoom meeting's join details and settings.\n *\n * GET /meetings/{meetingId} — https://developers.zoom.us/docs/api/meetings/\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Zoom or calls the faker.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { ZOOM } from \"../service.js\";\n\nexport const MEETING_GET_OPERATION = \"meeting_get\";\n\nexport type MeetingGetOptions = {\n /** The node's resolved config. Keys: meetingId. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function zoomMeetingGet(options: MeetingGetOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.meetingId === undefined || config.meetingId === null || config.meetingId === \"\") {\n throw new Error(`meeting_get: \"meetingId\" is required (Meeting ID).`);\n }\n\n return callConnector(ZOOM, {\n operation: MEETING_GET_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"GET\",\n path: `/meetings/${encodeURIComponent(String(config.meetingId))}`,\n query: {},\n },\n });\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/obf-token-create.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/obf-token-create.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- zoom\n */\n\n/**\n * Mint a short-lived token so a bot can join a Zoom meeting on the authorising\n * user's behalf.\n *\n * GET /users/me/token —\n * https://developers.zoom.us/blog/transition-to-obf-token-meetingsdk-apps/\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Zoom or calls the faker.\n *\n * sideEffects: unsafe-to-replay.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { ZOOM } from \"../service.js\";\n\nexport const OBF_TOKEN_CREATE_OPERATION = \"obf_token_create\";\n\nexport type ObfTokenCreateOptions = {\n /** The node's resolved config. Keys: meetingId. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function zoomObfTokenCreate(options: ObfTokenCreateOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.meetingId === undefined || config.meetingId === null || config.meetingId === \"\") {\n throw new Error(`obf_token_create: \"meetingId\" is required (Meeting ID).`);\n }\n\n return callConnector(ZOOM, {\n operation: OBF_TOKEN_CREATE_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"GET\",\n path: \"/users/me/token\",\n query: {\n \"meeting_id\": String(config.meetingId),\n \"type\": \"onbehalf\",\n },\n },\n });\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/ + triggers/ by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/ + triggers/ (or weaver's template/) and regenerate:\n *\n * npm run provider -- zoom\n */\n\n/**\n * Zoom's node kinds with their TypeScript executors attached — for hosts that\n * EXECUTE on TS.\n *\n * The authoring surface in @particle-academy/zoom-ui carries no executor: the\n * editor is React on every host, so a PHP or Python project installs the ui\n * package and never this one.\n */\n\nimport type { NodeExecutor, NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport {\n idempotencyKeyFor,\n NO_IDEMPOTENCY_KEY_WARNING,\n resolveConnection,\n triggerEvent,\n type RequestedMode,\n} from \"@particle-academy/fancy-connector-core\";\nimport { ZOOM } from \"./service.js\";\n\nimport {\n zoomMeetingGetKind,\n zoomObfTokenCreateKind,\n} from \"@particle-academy/zoom-ui\";\n\nimport { zoomMeetingGet } from \"./actions/meeting-get.js\";\nimport { zoomObfTokenCreate } from \"./actions/obf-token-create.js\";\n\nexport const zoomMeetingGetExecutor: NodeExecutor = async (ctx) => {\n const config = ((ctx.node.data as { config?: Record<string, unknown> })?.config ?? {});\n\n const result = await zoomMeetingGet({\n config,\n input: ctx.inputs?.in,\n });\n\n ctx.emit({\n type: \"log\",\n level: \"info\",\n nodeId: ctx.node.id,\n message: `zoom meeting_get ${(result.data as { id?: string })?.id} (${result.mode})`,\n });\n\n return { __port: \"out\", value: result };\n};\n\nexport const zoomObfTokenCreateExecutor: NodeExecutor = async (ctx) => {\n const config = ((ctx.node.data as { config?: Record<string, unknown> })?.config ?? {});\n\n const result = await zoomObfTokenCreate({\n config,\n input: ctx.inputs?.in,\n });\n\n ctx.emit({\n type: \"log\",\n level: \"info\",\n nodeId: ctx.node.id,\n message: `zoom obf_token_create ${(result.data as { id?: string })?.id} (${result.mode})`,\n });\n\n return { __port: \"out\", value: result };\n};\n\n/** The kinds a TypeScript host registers. */\nexport const ZOOM_RUNNABLE_KINDS: NodeKindDefinition[] = [\n { ...zoomMeetingGetKind, executor: zoomMeetingGetExecutor },\n { ...zoomObfTokenCreateKind, executor: zoomObfTokenCreateExecutor },\n];\n"]}
|
package/dist/flow.d.cts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { NodeKindDefinition, NodeExecutor } from '@particle-academy/fancy-flow/engine';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* GENERATED FILE — do not edit.
|
|
5
|
+
*
|
|
6
|
+
* Emitted from provider/actions/ + triggers/ by weaver's generator.
|
|
7
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
8
|
+
* being rejected, because it works until it silently does not. Fix
|
|
9
|
+
* provider/actions/ + triggers/ (or weaver's template/) and regenerate:
|
|
10
|
+
*
|
|
11
|
+
* npm run provider -- zoom
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Zoom's node kinds with their TypeScript executors attached — for hosts that
|
|
15
|
+
* EXECUTE on TS.
|
|
16
|
+
*
|
|
17
|
+
* The authoring surface in @particle-academy/zoom-ui carries no executor: the
|
|
18
|
+
* editor is React on every host, so a PHP or Python project installs the ui
|
|
19
|
+
* package and never this one.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
declare const zoomMeetingGetExecutor: NodeExecutor;
|
|
23
|
+
declare const zoomObfTokenCreateExecutor: NodeExecutor;
|
|
24
|
+
/** The kinds a TypeScript host registers. */
|
|
25
|
+
declare const ZOOM_RUNNABLE_KINDS: NodeKindDefinition[];
|
|
26
|
+
|
|
27
|
+
export { ZOOM_RUNNABLE_KINDS, zoomMeetingGetExecutor, zoomObfTokenCreateExecutor };
|
package/dist/flow.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { NodeKindDefinition, NodeExecutor } from '@particle-academy/fancy-flow/engine';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* GENERATED FILE — do not edit.
|
|
5
|
+
*
|
|
6
|
+
* Emitted from provider/actions/ + triggers/ by weaver's generator.
|
|
7
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
8
|
+
* being rejected, because it works until it silently does not. Fix
|
|
9
|
+
* provider/actions/ + triggers/ (or weaver's template/) and regenerate:
|
|
10
|
+
*
|
|
11
|
+
* npm run provider -- zoom
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Zoom's node kinds with their TypeScript executors attached — for hosts that
|
|
15
|
+
* EXECUTE on TS.
|
|
16
|
+
*
|
|
17
|
+
* The authoring surface in @particle-academy/zoom-ui carries no executor: the
|
|
18
|
+
* editor is React on every host, so a PHP or Python project installs the ui
|
|
19
|
+
* package and never this one.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
declare const zoomMeetingGetExecutor: NodeExecutor;
|
|
23
|
+
declare const zoomObfTokenCreateExecutor: NodeExecutor;
|
|
24
|
+
/** The kinds a TypeScript host registers. */
|
|
25
|
+
declare const ZOOM_RUNNABLE_KINDS: NodeKindDefinition[];
|
|
26
|
+
|
|
27
|
+
export { ZOOM_RUNNABLE_KINDS, zoomMeetingGetExecutor, zoomObfTokenCreateExecutor };
|
package/dist/flow.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { zoomMeetingGet, zoomObfTokenCreate } from './chunk-2A3B3B5A.js';
|
|
2
|
+
import '@particle-academy/fancy-connector-core';
|
|
3
|
+
import { zoomMeetingGetKind, zoomObfTokenCreateKind } from '@particle-academy/zoom-ui';
|
|
4
|
+
|
|
5
|
+
var zoomMeetingGetExecutor = async (ctx) => {
|
|
6
|
+
const config = ctx.node.data?.config ?? {};
|
|
7
|
+
const result = await zoomMeetingGet({
|
|
8
|
+
config,
|
|
9
|
+
input: ctx.inputs?.in
|
|
10
|
+
});
|
|
11
|
+
ctx.emit({
|
|
12
|
+
type: "log",
|
|
13
|
+
level: "info",
|
|
14
|
+
nodeId: ctx.node.id,
|
|
15
|
+
message: `zoom meeting_get ${result.data?.id} (${result.mode})`
|
|
16
|
+
});
|
|
17
|
+
return { __port: "out", value: result };
|
|
18
|
+
};
|
|
19
|
+
var zoomObfTokenCreateExecutor = async (ctx) => {
|
|
20
|
+
const config = ctx.node.data?.config ?? {};
|
|
21
|
+
const result = await zoomObfTokenCreate({
|
|
22
|
+
config,
|
|
23
|
+
input: ctx.inputs?.in
|
|
24
|
+
});
|
|
25
|
+
ctx.emit({
|
|
26
|
+
type: "log",
|
|
27
|
+
level: "info",
|
|
28
|
+
nodeId: ctx.node.id,
|
|
29
|
+
message: `zoom obf_token_create ${result.data?.id} (${result.mode})`
|
|
30
|
+
});
|
|
31
|
+
return { __port: "out", value: result };
|
|
32
|
+
};
|
|
33
|
+
var ZOOM_RUNNABLE_KINDS = [
|
|
34
|
+
{ ...zoomMeetingGetKind, executor: zoomMeetingGetExecutor },
|
|
35
|
+
{ ...zoomObfTokenCreateKind, executor: zoomObfTokenCreateExecutor }
|
|
36
|
+
];
|
|
37
|
+
|
|
38
|
+
export { ZOOM_RUNNABLE_KINDS, zoomMeetingGetExecutor, zoomObfTokenCreateExecutor };
|
|
39
|
+
//# sourceMappingURL=flow.js.map
|
|
40
|
+
//# sourceMappingURL=flow.js.map
|
package/dist/flow.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/flow.ts"],"names":[],"mappings":";;;;AAsCO,IAAM,sBAAA,GAAuC,OAAO,GAAA,KAAQ;AACjE,EAAA,MAAM,MAAA,GAAW,GAAA,CAAI,IAAA,CAAK,IAAA,EAA+C,UAAU,EAAC;AAEpF,EAAA,MAAM,MAAA,GAAS,MAAM,cAAA,CAAe;AAAA,IAClC,MAAA;AAAA,IACA,KAAA,EAAO,IAAI,MAAA,EAAQ;AAAA,GACpB,CAAA;AAED,EAAA,GAAA,CAAI,IAAA,CAAK;AAAA,IACP,IAAA,EAAM,KAAA;AAAA,IACN,KAAA,EAAO,MAAA;AAAA,IACP,MAAA,EAAQ,IAAI,IAAA,CAAK,EAAA;AAAA,IACjB,SAAS,CAAA,iBAAA,EAAqB,MAAA,CAAO,MAA0B,EAAE,CAAA,EAAA,EAAK,OAAO,IAAI,CAAA,CAAA;AAAA,GAClF,CAAA;AAED,EAAA,OAAO,EAAE,MAAA,EAAQ,KAAA,EAAO,KAAA,EAAO,MAAA,EAAO;AACxC;AAEO,IAAM,0BAAA,GAA2C,OAAO,GAAA,KAAQ;AACrE,EAAA,MAAM,MAAA,GAAW,GAAA,CAAI,IAAA,CAAK,IAAA,EAA+C,UAAU,EAAC;AAEpF,EAAA,MAAM,MAAA,GAAS,MAAM,kBAAA,CAAmB;AAAA,IACtC,MAAA;AAAA,IACA,KAAA,EAAO,IAAI,MAAA,EAAQ;AAAA,GACpB,CAAA;AAED,EAAA,GAAA,CAAI,IAAA,CAAK;AAAA,IACP,IAAA,EAAM,KAAA;AAAA,IACN,KAAA,EAAO,MAAA;AAAA,IACP,MAAA,EAAQ,IAAI,IAAA,CAAK,EAAA;AAAA,IACjB,SAAS,CAAA,sBAAA,EAA0B,MAAA,CAAO,MAA0B,EAAE,CAAA,EAAA,EAAK,OAAO,IAAI,CAAA,CAAA;AAAA,GACvF,CAAA;AAED,EAAA,OAAO,EAAE,MAAA,EAAQ,KAAA,EAAO,KAAA,EAAO,MAAA,EAAO;AACxC;AAGO,IAAM,mBAAA,GAA4C;AAAA,EACvD,EAAE,GAAG,kBAAA,EAAoB,QAAA,EAAU,sBAAA,EAAuB;AAAA,EAC1D,EAAE,GAAG,sBAAA,EAAwB,QAAA,EAAU,0BAAA;AACzC","file":"flow.js","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/ + triggers/ by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/ + triggers/ (or weaver's template/) and regenerate:\n *\n * npm run provider -- zoom\n */\n\n/**\n * Zoom's node kinds with their TypeScript executors attached — for hosts that\n * EXECUTE on TS.\n *\n * The authoring surface in @particle-academy/zoom-ui carries no executor: the\n * editor is React on every host, so a PHP or Python project installs the ui\n * package and never this one.\n */\n\nimport type { NodeExecutor, NodeKindDefinition } from \"@particle-academy/fancy-flow/engine\";\nimport {\n idempotencyKeyFor,\n NO_IDEMPOTENCY_KEY_WARNING,\n resolveConnection,\n triggerEvent,\n type RequestedMode,\n} from \"@particle-academy/fancy-connector-core\";\nimport { ZOOM } from \"./service.js\";\n\nimport {\n zoomMeetingGetKind,\n zoomObfTokenCreateKind,\n} from \"@particle-academy/zoom-ui\";\n\nimport { zoomMeetingGet } from \"./actions/meeting-get.js\";\nimport { zoomObfTokenCreate } from \"./actions/obf-token-create.js\";\n\nexport const zoomMeetingGetExecutor: NodeExecutor = async (ctx) => {\n const config = ((ctx.node.data as { config?: Record<string, unknown> })?.config ?? {});\n\n const result = await zoomMeetingGet({\n config,\n input: ctx.inputs?.in,\n });\n\n ctx.emit({\n type: \"log\",\n level: \"info\",\n nodeId: ctx.node.id,\n message: `zoom meeting_get ${(result.data as { id?: string })?.id} (${result.mode})`,\n });\n\n return { __port: \"out\", value: result };\n};\n\nexport const zoomObfTokenCreateExecutor: NodeExecutor = async (ctx) => {\n const config = ((ctx.node.data as { config?: Record<string, unknown> })?.config ?? {});\n\n const result = await zoomObfTokenCreate({\n config,\n input: ctx.inputs?.in,\n });\n\n ctx.emit({\n type: \"log\",\n level: \"info\",\n nodeId: ctx.node.id,\n message: `zoom obf_token_create ${(result.data as { id?: string })?.id} (${result.mode})`,\n });\n\n return { __port: \"out\", value: result };\n};\n\n/** The kinds a TypeScript host registers. */\nexport const ZOOM_RUNNABLE_KINDS: NodeKindDefinition[] = [\n { ...zoomMeetingGetKind, executor: zoomMeetingGetExecutor },\n { ...zoomObfTokenCreateKind, executor: zoomObfTokenCreateExecutor },\n];\n"]}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var fancyConnectorCore = require('@particle-academy/fancy-connector-core');
|
|
4
|
+
|
|
5
|
+
// src/faker.ts
|
|
6
|
+
function fakeMeetingGet({ config, fake }) {
|
|
7
|
+
return {
|
|
8
|
+
"id": config.meetingId !== void 0 && config.meetingId !== null && config.meetingId !== "" ? Number.isFinite(Number(config.meetingId)) ? Math.trunc(Number(config.meetingId)) : null : Array.from({ length: 10 }, () => fake.int(0, 9)).join(""),
|
|
9
|
+
"uuid": `${fake.hex(8)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(12)}`,
|
|
10
|
+
"host_id": fake.id("u"),
|
|
11
|
+
"topic": "Weekly sync",
|
|
12
|
+
"type": 2,
|
|
13
|
+
"status": "waiting",
|
|
14
|
+
"start_time": "2026-09-22T14:00:00Z",
|
|
15
|
+
"duration": 30,
|
|
16
|
+
"timezone": "America/New_York",
|
|
17
|
+
"agenda": "",
|
|
18
|
+
"join_url": "https://zoom.us/j/1234567890?pwd=fake",
|
|
19
|
+
"password": Array.from({ length: 6 }, () => fake.int(0, 9)).join(""),
|
|
20
|
+
"settings": {
|
|
21
|
+
"waiting_room": true,
|
|
22
|
+
"join_before_host": false,
|
|
23
|
+
"approval_type": 2
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
function fakeObfTokenCreate({ config, fake }) {
|
|
28
|
+
return {
|
|
29
|
+
"token": fake.id("obf")
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
var zoomFaker = (operation, request) => {
|
|
33
|
+
switch (operation) {
|
|
34
|
+
case "meeting_get":
|
|
35
|
+
return fakeMeetingGet(request);
|
|
36
|
+
case "obf_token_create":
|
|
37
|
+
return fakeObfTokenCreate(request);
|
|
38
|
+
default:
|
|
39
|
+
throw new Error(
|
|
40
|
+
`zoom: 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.`
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
// src/service.ts
|
|
46
|
+
var CONNECTOR_API_VERSION = 1;
|
|
47
|
+
var ZOOM_BASE_URLS = {
|
|
48
|
+
"live": "https://api.zoom.us/v2"
|
|
49
|
+
};
|
|
50
|
+
var ZOOM_REQUIRES = [
|
|
51
|
+
"accessToken"
|
|
52
|
+
];
|
|
53
|
+
function zoomAuthorize(credentials, request, _mode) {
|
|
54
|
+
request.headers.Authorization = `Bearer ${credentials.accessToken ?? ""}`;
|
|
55
|
+
}
|
|
56
|
+
var ZOOM = {
|
|
57
|
+
service: "zoom",
|
|
58
|
+
title: "Zoom",
|
|
59
|
+
sandbox: "unverified",
|
|
60
|
+
baseUrls: { ...ZOOM_BASE_URLS },
|
|
61
|
+
requires: [...ZOOM_REQUIRES],
|
|
62
|
+
authorize: zoomAuthorize,
|
|
63
|
+
faker: zoomFaker
|
|
64
|
+
};
|
|
65
|
+
var MEETING_GET_OPERATION = "meeting_get";
|
|
66
|
+
async function zoomMeetingGet(options) {
|
|
67
|
+
const config = options.config ?? {};
|
|
68
|
+
if (config.meetingId === void 0 || config.meetingId === null || config.meetingId === "") {
|
|
69
|
+
throw new Error(`meeting_get: "meetingId" is required (Meeting ID).`);
|
|
70
|
+
}
|
|
71
|
+
return fancyConnectorCore.callConnector(ZOOM, {
|
|
72
|
+
operation: MEETING_GET_OPERATION,
|
|
73
|
+
config,
|
|
74
|
+
input: options.input,
|
|
75
|
+
...options.credentials === void 0 ? {} : { credentials: options.credentials },
|
|
76
|
+
...options.mode === void 0 ? {} : { mode: options.mode },
|
|
77
|
+
...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
|
|
78
|
+
...options.attempts === void 0 ? {} : { attempts: options.attempts },
|
|
79
|
+
...options.transport === void 0 ? {} : { transport: options.transport },
|
|
80
|
+
request: {
|
|
81
|
+
method: "GET",
|
|
82
|
+
path: `/meetings/${encodeURIComponent(String(config.meetingId))}`,
|
|
83
|
+
query: {}
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
var OBF_TOKEN_CREATE_OPERATION = "obf_token_create";
|
|
88
|
+
async function zoomObfTokenCreate(options) {
|
|
89
|
+
const config = options.config ?? {};
|
|
90
|
+
if (config.meetingId === void 0 || config.meetingId === null || config.meetingId === "") {
|
|
91
|
+
throw new Error(`obf_token_create: "meetingId" is required (Meeting ID).`);
|
|
92
|
+
}
|
|
93
|
+
return fancyConnectorCore.callConnector(ZOOM, {
|
|
94
|
+
operation: OBF_TOKEN_CREATE_OPERATION,
|
|
95
|
+
config,
|
|
96
|
+
input: options.input,
|
|
97
|
+
...options.credentials === void 0 ? {} : { credentials: options.credentials },
|
|
98
|
+
...options.mode === void 0 ? {} : { mode: options.mode },
|
|
99
|
+
...options.connectionId === void 0 ? {} : { connectionId: options.connectionId },
|
|
100
|
+
...options.attempts === void 0 ? {} : { attempts: options.attempts },
|
|
101
|
+
...options.transport === void 0 ? {} : { transport: options.transport },
|
|
102
|
+
request: {
|
|
103
|
+
method: "GET",
|
|
104
|
+
path: "/users/me/token",
|
|
105
|
+
query: {
|
|
106
|
+
"meeting_id": String(config.meetingId),
|
|
107
|
+
"type": "onbehalf"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
exports.CONNECTOR_API_VERSION = CONNECTOR_API_VERSION;
|
|
114
|
+
exports.MEETING_GET_OPERATION = MEETING_GET_OPERATION;
|
|
115
|
+
exports.OBF_TOKEN_CREATE_OPERATION = OBF_TOKEN_CREATE_OPERATION;
|
|
116
|
+
exports.ZOOM = ZOOM;
|
|
117
|
+
exports.ZOOM_BASE_URLS = ZOOM_BASE_URLS;
|
|
118
|
+
exports.ZOOM_REQUIRES = ZOOM_REQUIRES;
|
|
119
|
+
exports.zoomAuthorize = zoomAuthorize;
|
|
120
|
+
exports.zoomFaker = zoomFaker;
|
|
121
|
+
exports.zoomMeetingGet = zoomMeetingGet;
|
|
122
|
+
exports.zoomObfTokenCreate = zoomObfTokenCreate;
|
|
123
|
+
//# sourceMappingURL=index.cjs.map
|
|
124
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/faker.ts","../src/service.ts","../src/actions/meeting-get.ts","../src/actions/obf-token-create.ts"],"names":["callConnector"],"mappings":";;;;;AAyBA,SAAS,cAAA,CAAe,EAAE,MAAA,EAAQ,IAAA,EAAK,EAAyB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c,EAAA,EAAI;AAC1F,IAAA,MAAM,IAAI,MAAM,CAAA,uDAAA,CAAyD,CAAA;AAAA,EAC3E;AAEA,EAAA,OAAOA,iCAAc,IAAA,EAAM;AAAA,IACzB,SAAA,EAAW,0BAAA;AAAA,IACX,MAAA;AAAA,IACA,OAAO,OAAA,CAAQ,KAAA;AAAA,IACf,GAAI,QAAQ,WAAA,KAAgB,MAAA,GAAY,EAAC,GAAI,EAAE,WAAA,EAAa,OAAA,CAAQ,WAAA,EAAY;AAAA,IAChF,GAAI,QAAQ,IAAA,KAAS,MAAA,GAAY,EAAC,GAAI,EAAE,IAAA,EAAM,OAAA,CAAQ,IAAA,EAAK;AAAA,IAC3D,GAAI,QAAQ,YAAA,KAAiB,MAAA,GAAY,EAAC,GAAI,EAAE,YAAA,EAAc,OAAA,CAAQ,YAAA,EAAa;AAAA,IACnF,GAAI,QAAQ,QAAA,KAAa,MAAA,GAAY,EAAC,GAAI,EAAE,QAAA,EAAU,OAAA,CAAQ,QAAA,EAAS;AAAA,IACvE,GAAI,QAAQ,SAAA,KAAc,MAAA,GAAY,EAAC,GAAI,EAAE,SAAA,EAAW,OAAA,CAAQ,SAAA,EAAU;AAAA,IAC1E,OAAA,EAAS;AAAA,MACP,MAAA,EAAQ,KAAA;AAAA,MACR,IAAA,EAAM,iBAAA;AAAA,MACN,KAAA,EAAO;AAAA,QACL,YAAA,EAAc,MAAA,CAAO,MAAA,CAAO,SAAS,CAAA;AAAA,QACrC,MAAA,EAAQ;AAAA;AACV;AACF,GACD,CAAA;AACH","file":"index.cjs","sourcesContent":["/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/fixtures/ by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/fixtures/ (or weaver's template/) and regenerate:\n *\n * npm run provider -- zoom\n */\n\n/**\n * The Zoom faker.\n *\n * Shapes, not behaviour: the goal is that a downstream node sees the field\n * NAMES Zoom actually publishes, so an author can wire {{ $json.data.id }}\n * against a fake and have it keep working against the real thing.\n *\n * Deterministic — same inputs, same output. A faker returning a fresh uuid\n * every call cannot be asserted on, so its fixtures degrade to \"it did not\n * throw\", which is the assertion that catches nothing.\n */\n\nimport type { ConnectorFaker, FakeRequest } from \"@particle-academy/fancy-connector-core\";\n\nfunction fakeMeetingGet({ config, fake }: FakeRequest): unknown {\n return {\n \"id\": (config.meetingId !== undefined && config.meetingId !== null && config.meetingId !== \"\" ? (Number.isFinite(Number(config.meetingId)) ? Math.trunc(Number(config.meetingId)) : null) : Array.from({ length: 10 }, () => fake.int(0, 9)).join(\"\")),\n \"uuid\": `${fake.hex(8)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(4)}-${fake.hex(12)}`,\n \"host_id\": fake.id(\"u\"),\n \"topic\": \"Weekly sync\",\n \"type\": 2,\n \"status\": \"waiting\",\n \"start_time\": \"2026-09-22T14:00:00Z\",\n \"duration\": 30,\n \"timezone\": \"America/New_York\",\n \"agenda\": \"\",\n \"join_url\": \"https://zoom.us/j/1234567890?pwd=fake\",\n \"password\": Array.from({ length: 6 }, () => fake.int(0, 9)).join(\"\"),\n \"settings\": {\n \"waiting_room\": true,\n \"join_before_host\": false,\n \"approval_type\": 2,\n },\n };\n}\n\nfunction fakeObfTokenCreate({ config, fake }: FakeRequest): unknown {\n return {\n \"token\": fake.id(\"obf\"),\n };\n}\n\nexport const zoomFaker: ConnectorFaker = (operation, request) => {\n switch (operation) {\n case \"meeting_get\":\n return fakeMeetingGet(request);\n\n case \"obf_token_create\":\n return fakeObfTokenCreate(request);\n\n default:\n // A faker asked for an operation it has no shape for must SAY so. Making\n // something up would produce a green run whose output silently has none\n // of the fields the author is about to reference.\n throw new Error(\n `zoom: no fake response is defined for \"${operation}\". ` +\n \"Add a fixture under provider/fixtures/ and regenerate — a connector without a faker \" +\n \"cannot be developed against, tested, or demonstrated.\",\n );\n }\n};\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/manifest.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/manifest.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- zoom\n */\n\n/**\n * Zoom, as one service descriptor shared by every Zoom operation.\n *\n * @particle-academy/fancy-connector-core carries what is true of ALL\n * connectors. This carries what is true of Zoom: its base URL, its auth\n * scheme, its idempotency header, and its faker.\n *\n * ## The sandbox trap, written down where it is used\n *\n * Zoom has no test estate distinct from a real account, as far as this review\n * found (2026-09-15) -- but it is UNVERIFIED, not confirmed. Every call\n * authorizes against the caller's own Zoom account and can read real meeting\n * data. Use fake mode while building.\n */\n\nimport type { ConnectorMode, PreparedRequest, ServiceDescriptor } from \"@particle-academy/fancy-connector-core\";\n\nimport { zoomFaker } from \"./faker.js\";\n\n/**\n * The connector API version this package was GENERATED against.\n *\n * A literal, never imported. An imported constant lets an upgrade rewrite the\n * very claim it exists to detect, after which the copy agrees with itself\n * forever.\n */\nexport const CONNECTOR_API_VERSION = 1;\n\nexport const ZOOM_BASE_URLS = {\n \"live\": \"https://api.zoom.us/v2\"\n} as const;\n\n/** Credential keys a remote call cannot proceed without. */\nexport const ZOOM_REQUIRES = [\n \"accessToken\"\n] as const;\n\n/**\n * Apply Zoom's auth scheme to an outgoing request.\n *\n * Every Zoom REST call is a Bearer token on the Authorization header, OAuth or\n * Server-to-Server alike; this provider declares the user OAuth shape so a\n * host can connect a rep's own Zoom account rather than one shared app-wide\n * identity.\n *\n * The mode is passed in because for some providers auth and estate are the\n * same decision expressed in the URL; here it is unused, and saying so is\n * cheaper than wondering later whether it was forgotten.\n */\nexport function zoomAuthorize(\n credentials: Record<string, string | undefined>,\n request: PreparedRequest,\n _mode: ConnectorMode,\n): void {\n request.headers.Authorization = `Bearer ${credentials.accessToken ?? \"\"}`;\n}\n\n/** The Zoom service, for the TypeScript runtime. */\nexport const ZOOM: ServiceDescriptor = {\n service: \"zoom\",\n title: \"Zoom\",\n sandbox: \"unverified\",\n baseUrls: { ...ZOOM_BASE_URLS },\n requires: [...ZOOM_REQUIRES],\n authorize: zoomAuthorize,\n faker: zoomFaker,\n};\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/meeting-get.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/meeting-get.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- zoom\n */\n\n/**\n * Read a Zoom meeting's join details and settings.\n *\n * GET /meetings/{meetingId} — https://developers.zoom.us/docs/api/meetings/\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Zoom or calls the faker.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { ZOOM } from \"../service.js\";\n\nexport const MEETING_GET_OPERATION = \"meeting_get\";\n\nexport type MeetingGetOptions = {\n /** The node's resolved config. Keys: meetingId. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function zoomMeetingGet(options: MeetingGetOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.meetingId === undefined || config.meetingId === null || config.meetingId === \"\") {\n throw new Error(`meeting_get: \"meetingId\" is required (Meeting ID).`);\n }\n\n return callConnector(ZOOM, {\n operation: MEETING_GET_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"GET\",\n path: `/meetings/${encodeURIComponent(String(config.meetingId))}`,\n query: {},\n },\n });\n}\n","/**\n * GENERATED FILE — do not edit.\n *\n * Emitted from provider/actions/obf-token-create.json by weaver's generator.\n * A hand-edit here is destroyed by the next protocol sync, which is worse than\n * being rejected, because it works until it silently does not. Fix\n * provider/actions/obf-token-create.json (or weaver's template/) and regenerate:\n *\n * npm run provider -- zoom\n */\n\n/**\n * Mint a short-lived token so a bot can join a Zoom meeting on the authorising\n * user's behalf.\n *\n * GET /users/me/token —\n * https://developers.zoom.us/blog/transition-to-obf-token-meetingsdk-apps/\n *\n * Notice what is NOT here: no key, no base URL, no mode check, no retry loop,\n * no fake/real branch. This describes the request; callConnector resolves the\n * connection, picks the estate, and either calls Zoom or calls the faker.\n *\n * sideEffects: unsafe-to-replay.\n */\n\nimport {\n callConnector,\n type ConnectorResult,\n type RequestedMode,\n type Transport,\n} from \"@particle-academy/fancy-connector-core\";\nimport { ZOOM } from \"../service.js\";\n\nexport const OBF_TOKEN_CREATE_OPERATION = \"obf_token_create\";\n\nexport type ObfTokenCreateOptions = {\n /** The node's resolved config. Keys: meetingId. */\n config: Record<string, unknown>;\n credentials?: Record<string, string | undefined>;\n mode?: RequestedMode;\n connectionId?: string | null;\n input?: unknown;\n attempts?: number;\n /** Override the transport. The only way to exercise this without a network. */\n transport?: Transport;\n};\n\nexport async function zoomObfTokenCreate(options: ObfTokenCreateOptions): Promise<ConnectorResult> {\n const config = options.config ?? {};\n\n if (config.meetingId === undefined || config.meetingId === null || config.meetingId === \"\") {\n throw new Error(`obf_token_create: \"meetingId\" is required (Meeting ID).`);\n }\n\n return callConnector(ZOOM, {\n operation: OBF_TOKEN_CREATE_OPERATION,\n config,\n input: options.input,\n ...(options.credentials === undefined ? {} : { credentials: options.credentials }),\n ...(options.mode === undefined ? {} : { mode: options.mode }),\n ...(options.connectionId === undefined ? {} : { connectionId: options.connectionId }),\n ...(options.attempts === undefined ? {} : { attempts: options.attempts }),\n ...(options.transport === undefined ? {} : { transport: options.transport }),\n request: {\n method: \"GET\",\n path: \"/users/me/token\",\n query: {\n \"meeting_id\": String(config.meetingId),\n \"type\": \"onbehalf\",\n },\n },\n });\n}\n"]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { ServiceDescriptor, PreparedRequest, ConnectorMode, ConnectorFaker, RequestedMode, Transport, ConnectorResult } from '@particle-academy/fancy-connector-core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* GENERATED FILE — do not edit.
|
|
5
|
+
*
|
|
6
|
+
* Emitted from provider/manifest.json by weaver's generator.
|
|
7
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
8
|
+
* being rejected, because it works until it silently does not. Fix
|
|
9
|
+
* provider/manifest.json (or weaver's template/) and regenerate:
|
|
10
|
+
*
|
|
11
|
+
* npm run provider -- zoom
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Zoom, as one service descriptor shared by every Zoom operation.
|
|
15
|
+
*
|
|
16
|
+
* @particle-academy/fancy-connector-core carries what is true of ALL
|
|
17
|
+
* connectors. This carries what is true of Zoom: its base URL, its auth
|
|
18
|
+
* scheme, its idempotency header, and its faker.
|
|
19
|
+
*
|
|
20
|
+
* ## The sandbox trap, written down where it is used
|
|
21
|
+
*
|
|
22
|
+
* Zoom has no test estate distinct from a real account, as far as this review
|
|
23
|
+
* found (2026-09-15) -- but it is UNVERIFIED, not confirmed. Every call
|
|
24
|
+
* authorizes against the caller's own Zoom account and can read real meeting
|
|
25
|
+
* data. Use fake mode while building.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The connector API version this package was GENERATED against.
|
|
30
|
+
*
|
|
31
|
+
* A literal, never imported. An imported constant lets an upgrade rewrite the
|
|
32
|
+
* very claim it exists to detect, after which the copy agrees with itself
|
|
33
|
+
* forever.
|
|
34
|
+
*/
|
|
35
|
+
declare const CONNECTOR_API_VERSION = 1;
|
|
36
|
+
declare const ZOOM_BASE_URLS: {
|
|
37
|
+
readonly live: "https://api.zoom.us/v2";
|
|
38
|
+
};
|
|
39
|
+
/** Credential keys a remote call cannot proceed without. */
|
|
40
|
+
declare const ZOOM_REQUIRES: readonly ["accessToken"];
|
|
41
|
+
/**
|
|
42
|
+
* Apply Zoom's auth scheme to an outgoing request.
|
|
43
|
+
*
|
|
44
|
+
* Every Zoom REST call is a Bearer token on the Authorization header, OAuth or
|
|
45
|
+
* Server-to-Server alike; this provider declares the user OAuth shape so a
|
|
46
|
+
* host can connect a rep's own Zoom account rather than one shared app-wide
|
|
47
|
+
* identity.
|
|
48
|
+
*
|
|
49
|
+
* The mode is passed in because for some providers auth and estate are the
|
|
50
|
+
* same decision expressed in the URL; here it is unused, and saying so is
|
|
51
|
+
* cheaper than wondering later whether it was forgotten.
|
|
52
|
+
*/
|
|
53
|
+
declare function zoomAuthorize(credentials: Record<string, string | undefined>, request: PreparedRequest, _mode: ConnectorMode): void;
|
|
54
|
+
/** The Zoom service, for the TypeScript runtime. */
|
|
55
|
+
declare const ZOOM: ServiceDescriptor;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* GENERATED FILE — do not edit.
|
|
59
|
+
*
|
|
60
|
+
* Emitted from provider/fixtures/ by weaver's generator.
|
|
61
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
62
|
+
* being rejected, because it works until it silently does not. Fix
|
|
63
|
+
* provider/fixtures/ (or weaver's template/) and regenerate:
|
|
64
|
+
*
|
|
65
|
+
* npm run provider -- zoom
|
|
66
|
+
*/
|
|
67
|
+
/**
|
|
68
|
+
* The Zoom faker.
|
|
69
|
+
*
|
|
70
|
+
* Shapes, not behaviour: the goal is that a downstream node sees the field
|
|
71
|
+
* NAMES Zoom actually publishes, so an author can wire {{ $json.data.id }}
|
|
72
|
+
* against a fake and have it keep working against the real thing.
|
|
73
|
+
*
|
|
74
|
+
* Deterministic — same inputs, same output. A faker returning a fresh uuid
|
|
75
|
+
* every call cannot be asserted on, so its fixtures degrade to "it did not
|
|
76
|
+
* throw", which is the assertion that catches nothing.
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
declare const zoomFaker: ConnectorFaker;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* GENERATED FILE — do not edit.
|
|
83
|
+
*
|
|
84
|
+
* Emitted from provider/actions/meeting-get.json by weaver's generator.
|
|
85
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
86
|
+
* being rejected, because it works until it silently does not. Fix
|
|
87
|
+
* provider/actions/meeting-get.json (or weaver's template/) and regenerate:
|
|
88
|
+
*
|
|
89
|
+
* npm run provider -- zoom
|
|
90
|
+
*/
|
|
91
|
+
/**
|
|
92
|
+
* Read a Zoom meeting's join details and settings.
|
|
93
|
+
*
|
|
94
|
+
* GET /meetings/{meetingId} — https://developers.zoom.us/docs/api/meetings/
|
|
95
|
+
*
|
|
96
|
+
* Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
|
|
97
|
+
* no fake/real branch. This describes the request; callConnector resolves the
|
|
98
|
+
* connection, picks the estate, and either calls Zoom or calls the faker.
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
declare const MEETING_GET_OPERATION = "meeting_get";
|
|
102
|
+
type MeetingGetOptions = {
|
|
103
|
+
/** The node's resolved config. Keys: meetingId. */
|
|
104
|
+
config: Record<string, unknown>;
|
|
105
|
+
credentials?: Record<string, string | undefined>;
|
|
106
|
+
mode?: RequestedMode;
|
|
107
|
+
connectionId?: string | null;
|
|
108
|
+
input?: unknown;
|
|
109
|
+
attempts?: number;
|
|
110
|
+
/** Override the transport. The only way to exercise this without a network. */
|
|
111
|
+
transport?: Transport;
|
|
112
|
+
};
|
|
113
|
+
declare function zoomMeetingGet(options: MeetingGetOptions): Promise<ConnectorResult>;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* GENERATED FILE — do not edit.
|
|
117
|
+
*
|
|
118
|
+
* Emitted from provider/actions/obf-token-create.json by weaver's generator.
|
|
119
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
120
|
+
* being rejected, because it works until it silently does not. Fix
|
|
121
|
+
* provider/actions/obf-token-create.json (or weaver's template/) and regenerate:
|
|
122
|
+
*
|
|
123
|
+
* npm run provider -- zoom
|
|
124
|
+
*/
|
|
125
|
+
/**
|
|
126
|
+
* Mint a short-lived token so a bot can join a Zoom meeting on the authorising
|
|
127
|
+
* user's behalf.
|
|
128
|
+
*
|
|
129
|
+
* GET /users/me/token —
|
|
130
|
+
* https://developers.zoom.us/blog/transition-to-obf-token-meetingsdk-apps/
|
|
131
|
+
*
|
|
132
|
+
* Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
|
|
133
|
+
* no fake/real branch. This describes the request; callConnector resolves the
|
|
134
|
+
* connection, picks the estate, and either calls Zoom or calls the faker.
|
|
135
|
+
*
|
|
136
|
+
* sideEffects: unsafe-to-replay.
|
|
137
|
+
*/
|
|
138
|
+
|
|
139
|
+
declare const OBF_TOKEN_CREATE_OPERATION = "obf_token_create";
|
|
140
|
+
type ObfTokenCreateOptions = {
|
|
141
|
+
/** The node's resolved config. Keys: meetingId. */
|
|
142
|
+
config: Record<string, unknown>;
|
|
143
|
+
credentials?: Record<string, string | undefined>;
|
|
144
|
+
mode?: RequestedMode;
|
|
145
|
+
connectionId?: string | null;
|
|
146
|
+
input?: unknown;
|
|
147
|
+
attempts?: number;
|
|
148
|
+
/** Override the transport. The only way to exercise this without a network. */
|
|
149
|
+
transport?: Transport;
|
|
150
|
+
};
|
|
151
|
+
declare function zoomObfTokenCreate(options: ObfTokenCreateOptions): Promise<ConnectorResult>;
|
|
152
|
+
|
|
153
|
+
export { CONNECTOR_API_VERSION, MEETING_GET_OPERATION, type MeetingGetOptions, OBF_TOKEN_CREATE_OPERATION, type ObfTokenCreateOptions, ZOOM, ZOOM_BASE_URLS, ZOOM_REQUIRES, zoomAuthorize, zoomFaker, zoomMeetingGet, zoomObfTokenCreate };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { ServiceDescriptor, PreparedRequest, ConnectorMode, ConnectorFaker, RequestedMode, Transport, ConnectorResult } from '@particle-academy/fancy-connector-core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* GENERATED FILE — do not edit.
|
|
5
|
+
*
|
|
6
|
+
* Emitted from provider/manifest.json by weaver's generator.
|
|
7
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
8
|
+
* being rejected, because it works until it silently does not. Fix
|
|
9
|
+
* provider/manifest.json (or weaver's template/) and regenerate:
|
|
10
|
+
*
|
|
11
|
+
* npm run provider -- zoom
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Zoom, as one service descriptor shared by every Zoom operation.
|
|
15
|
+
*
|
|
16
|
+
* @particle-academy/fancy-connector-core carries what is true of ALL
|
|
17
|
+
* connectors. This carries what is true of Zoom: its base URL, its auth
|
|
18
|
+
* scheme, its idempotency header, and its faker.
|
|
19
|
+
*
|
|
20
|
+
* ## The sandbox trap, written down where it is used
|
|
21
|
+
*
|
|
22
|
+
* Zoom has no test estate distinct from a real account, as far as this review
|
|
23
|
+
* found (2026-09-15) -- but it is UNVERIFIED, not confirmed. Every call
|
|
24
|
+
* authorizes against the caller's own Zoom account and can read real meeting
|
|
25
|
+
* data. Use fake mode while building.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The connector API version this package was GENERATED against.
|
|
30
|
+
*
|
|
31
|
+
* A literal, never imported. An imported constant lets an upgrade rewrite the
|
|
32
|
+
* very claim it exists to detect, after which the copy agrees with itself
|
|
33
|
+
* forever.
|
|
34
|
+
*/
|
|
35
|
+
declare const CONNECTOR_API_VERSION = 1;
|
|
36
|
+
declare const ZOOM_BASE_URLS: {
|
|
37
|
+
readonly live: "https://api.zoom.us/v2";
|
|
38
|
+
};
|
|
39
|
+
/** Credential keys a remote call cannot proceed without. */
|
|
40
|
+
declare const ZOOM_REQUIRES: readonly ["accessToken"];
|
|
41
|
+
/**
|
|
42
|
+
* Apply Zoom's auth scheme to an outgoing request.
|
|
43
|
+
*
|
|
44
|
+
* Every Zoom REST call is a Bearer token on the Authorization header, OAuth or
|
|
45
|
+
* Server-to-Server alike; this provider declares the user OAuth shape so a
|
|
46
|
+
* host can connect a rep's own Zoom account rather than one shared app-wide
|
|
47
|
+
* identity.
|
|
48
|
+
*
|
|
49
|
+
* The mode is passed in because for some providers auth and estate are the
|
|
50
|
+
* same decision expressed in the URL; here it is unused, and saying so is
|
|
51
|
+
* cheaper than wondering later whether it was forgotten.
|
|
52
|
+
*/
|
|
53
|
+
declare function zoomAuthorize(credentials: Record<string, string | undefined>, request: PreparedRequest, _mode: ConnectorMode): void;
|
|
54
|
+
/** The Zoom service, for the TypeScript runtime. */
|
|
55
|
+
declare const ZOOM: ServiceDescriptor;
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* GENERATED FILE — do not edit.
|
|
59
|
+
*
|
|
60
|
+
* Emitted from provider/fixtures/ by weaver's generator.
|
|
61
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
62
|
+
* being rejected, because it works until it silently does not. Fix
|
|
63
|
+
* provider/fixtures/ (or weaver's template/) and regenerate:
|
|
64
|
+
*
|
|
65
|
+
* npm run provider -- zoom
|
|
66
|
+
*/
|
|
67
|
+
/**
|
|
68
|
+
* The Zoom faker.
|
|
69
|
+
*
|
|
70
|
+
* Shapes, not behaviour: the goal is that a downstream node sees the field
|
|
71
|
+
* NAMES Zoom actually publishes, so an author can wire {{ $json.data.id }}
|
|
72
|
+
* against a fake and have it keep working against the real thing.
|
|
73
|
+
*
|
|
74
|
+
* Deterministic — same inputs, same output. A faker returning a fresh uuid
|
|
75
|
+
* every call cannot be asserted on, so its fixtures degrade to "it did not
|
|
76
|
+
* throw", which is the assertion that catches nothing.
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
declare const zoomFaker: ConnectorFaker;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* GENERATED FILE — do not edit.
|
|
83
|
+
*
|
|
84
|
+
* Emitted from provider/actions/meeting-get.json by weaver's generator.
|
|
85
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
86
|
+
* being rejected, because it works until it silently does not. Fix
|
|
87
|
+
* provider/actions/meeting-get.json (or weaver's template/) and regenerate:
|
|
88
|
+
*
|
|
89
|
+
* npm run provider -- zoom
|
|
90
|
+
*/
|
|
91
|
+
/**
|
|
92
|
+
* Read a Zoom meeting's join details and settings.
|
|
93
|
+
*
|
|
94
|
+
* GET /meetings/{meetingId} — https://developers.zoom.us/docs/api/meetings/
|
|
95
|
+
*
|
|
96
|
+
* Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
|
|
97
|
+
* no fake/real branch. This describes the request; callConnector resolves the
|
|
98
|
+
* connection, picks the estate, and either calls Zoom or calls the faker.
|
|
99
|
+
*/
|
|
100
|
+
|
|
101
|
+
declare const MEETING_GET_OPERATION = "meeting_get";
|
|
102
|
+
type MeetingGetOptions = {
|
|
103
|
+
/** The node's resolved config. Keys: meetingId. */
|
|
104
|
+
config: Record<string, unknown>;
|
|
105
|
+
credentials?: Record<string, string | undefined>;
|
|
106
|
+
mode?: RequestedMode;
|
|
107
|
+
connectionId?: string | null;
|
|
108
|
+
input?: unknown;
|
|
109
|
+
attempts?: number;
|
|
110
|
+
/** Override the transport. The only way to exercise this without a network. */
|
|
111
|
+
transport?: Transport;
|
|
112
|
+
};
|
|
113
|
+
declare function zoomMeetingGet(options: MeetingGetOptions): Promise<ConnectorResult>;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* GENERATED FILE — do not edit.
|
|
117
|
+
*
|
|
118
|
+
* Emitted from provider/actions/obf-token-create.json by weaver's generator.
|
|
119
|
+
* A hand-edit here is destroyed by the next protocol sync, which is worse than
|
|
120
|
+
* being rejected, because it works until it silently does not. Fix
|
|
121
|
+
* provider/actions/obf-token-create.json (or weaver's template/) and regenerate:
|
|
122
|
+
*
|
|
123
|
+
* npm run provider -- zoom
|
|
124
|
+
*/
|
|
125
|
+
/**
|
|
126
|
+
* Mint a short-lived token so a bot can join a Zoom meeting on the authorising
|
|
127
|
+
* user's behalf.
|
|
128
|
+
*
|
|
129
|
+
* GET /users/me/token —
|
|
130
|
+
* https://developers.zoom.us/blog/transition-to-obf-token-meetingsdk-apps/
|
|
131
|
+
*
|
|
132
|
+
* Notice what is NOT here: no key, no base URL, no mode check, no retry loop,
|
|
133
|
+
* no fake/real branch. This describes the request; callConnector resolves the
|
|
134
|
+
* connection, picks the estate, and either calls Zoom or calls the faker.
|
|
135
|
+
*
|
|
136
|
+
* sideEffects: unsafe-to-replay.
|
|
137
|
+
*/
|
|
138
|
+
|
|
139
|
+
declare const OBF_TOKEN_CREATE_OPERATION = "obf_token_create";
|
|
140
|
+
type ObfTokenCreateOptions = {
|
|
141
|
+
/** The node's resolved config. Keys: meetingId. */
|
|
142
|
+
config: Record<string, unknown>;
|
|
143
|
+
credentials?: Record<string, string | undefined>;
|
|
144
|
+
mode?: RequestedMode;
|
|
145
|
+
connectionId?: string | null;
|
|
146
|
+
input?: unknown;
|
|
147
|
+
attempts?: number;
|
|
148
|
+
/** Override the transport. The only way to exercise this without a network. */
|
|
149
|
+
transport?: Transport;
|
|
150
|
+
};
|
|
151
|
+
declare function zoomObfTokenCreate(options: ObfTokenCreateOptions): Promise<ConnectorResult>;
|
|
152
|
+
|
|
153
|
+
export { CONNECTOR_API_VERSION, MEETING_GET_OPERATION, type MeetingGetOptions, OBF_TOKEN_CREATE_OPERATION, type ObfTokenCreateOptions, ZOOM, ZOOM_BASE_URLS, ZOOM_REQUIRES, zoomAuthorize, zoomFaker, zoomMeetingGet, zoomObfTokenCreate };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { CONNECTOR_API_VERSION, MEETING_GET_OPERATION, OBF_TOKEN_CREATE_OPERATION, ZOOM, ZOOM_BASE_URLS, ZOOM_REQUIRES, zoomAuthorize, zoomFaker, zoomMeetingGet, zoomObfTokenCreate } from './chunk-2A3B3B5A.js';
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,90 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@particle-academy/zoom-js",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
5
|
-
"license": "MIT",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Zoom for Node — the service descriptor, its faker, its webhook verification, and one function per operation. Plain HTTP on @particle-academy/fancy-connector-core; no vendor SDK.",
|
|
6
5
|
"repository": {
|
|
7
6
|
"type": "git",
|
|
8
7
|
"url": "git+https://github.com/Fancy-Friends/zoom.git",
|
|
9
8
|
"directory": "packages/js"
|
|
10
9
|
},
|
|
11
10
|
"homepage": "https://github.com/Fancy-Friends/zoom#readme",
|
|
11
|
+
"bugs": "https://github.com/Fancy-Friends/zoom/issues",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"main": "./dist/index.cjs",
|
|
14
|
+
"module": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"import": {
|
|
19
|
+
"types": "./dist/index.d.ts",
|
|
20
|
+
"default": "./dist/index.js"
|
|
21
|
+
},
|
|
22
|
+
"require": {
|
|
23
|
+
"types": "./dist/index.d.cts",
|
|
24
|
+
"default": "./dist/index.cjs"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"./flow": {
|
|
28
|
+
"import": {
|
|
29
|
+
"types": "./dist/flow.d.ts",
|
|
30
|
+
"default": "./dist/flow.js"
|
|
31
|
+
},
|
|
32
|
+
"require": {
|
|
33
|
+
"types": "./dist/flow.d.cts",
|
|
34
|
+
"default": "./dist/flow.cjs"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"./package.json": "./package.json"
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"dist",
|
|
41
|
+
"art",
|
|
42
|
+
"README.md",
|
|
43
|
+
"CHANGELOG.md",
|
|
44
|
+
"LICENSE"
|
|
45
|
+
],
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "tsup",
|
|
48
|
+
"lint": "tsc --noEmit",
|
|
49
|
+
"test": "node --import tsx --test tests/*.test.ts",
|
|
50
|
+
"prepublishOnly": "tsup"
|
|
51
|
+
},
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@particle-academy/fancy-connector-core": ">=0.4.0 <2.0"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"@particle-academy/fancy-flow": ">=0.47.1 <2.0",
|
|
57
|
+
"@particle-academy/zoom-ui": ">=0.1.0 <0.2.0"
|
|
58
|
+
},
|
|
59
|
+
"peerDependenciesMeta": {
|
|
60
|
+
"@particle-academy/fancy-flow": {
|
|
61
|
+
"optional": true
|
|
62
|
+
},
|
|
63
|
+
"@particle-academy/zoom-ui": {
|
|
64
|
+
"optional": true
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"devDependencies": {
|
|
68
|
+
"@particle-academy/fancy-flow": ">=0.47.1 <2.0",
|
|
69
|
+
"@types/node": "^26.2.0",
|
|
70
|
+
"tsup": "^8.5.0",
|
|
71
|
+
"tsx": "^4.19.0",
|
|
72
|
+
"typescript": "^5.8.0"
|
|
73
|
+
},
|
|
12
74
|
"publishConfig": {
|
|
13
75
|
"access": "public"
|
|
14
76
|
},
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
77
|
+
"keywords": [
|
|
78
|
+
"zoom",
|
|
79
|
+
"messaging",
|
|
80
|
+
"connector",
|
|
81
|
+
"api",
|
|
82
|
+
"fancy-ui",
|
|
83
|
+
"particle-academy"
|
|
84
|
+
],
|
|
85
|
+
"license": "MIT",
|
|
86
|
+
"sideEffects": false,
|
|
87
|
+
"engines": {
|
|
88
|
+
"node": ">=22"
|
|
89
|
+
}
|
|
18
90
|
}
|