@superdurable/connector-zoom 0.0.0-stage → 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Super Durable
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,46 @@
1
- # Temporary Holding Version
1
+ # Zoom TypeScript connector
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ `@superdurable/connector-zoom` 0.2.0 implements the five Zoom Meetings operations from the Go connector: `listMeetings`, `getMeeting`, `createMeeting`, `updateMeeting`, and `listPastMeetingParticipants`, and the `meetingChanged` poll Trigger. Generated models, operation-specific Step factories, connection bindings, mock cases, and OAuth declarations come from `../connector.yaml`. Provider requests and operation invocation are hand-written in `src/client.ts`, `src/meeting.ts`, and `src/operations.ts`; the Trigger is in `src/trigger.ts`, `src/meeting_list_fetcher.ts`, and `src/meeting_snapshot.ts`.
4
+
5
+ Install the package with `@superdurable/connectors-sdk` 0.12.0, which adds the poll Trigger kit, and Dex TypeScript SDK 1.45.4 or later. Use Node.js 22 or 24. Keep Zoom credentials in Dex Web Connections. `newProjectConnection(project, ConnectionName)` binds generated private and shared credential decoders and durable OAuth refresh. It does not accept tokens in Flow inputs.
6
+
7
+ ## meetingChanged Trigger
8
+
9
+ `meetingChanged` delivers each meeting the authorized user schedules, changes, or that leaves Zoom's scheduled list, as a `MeetingChangedEvent` with `changeKind` `scheduled`, `updated` (with `previousMeeting`), or `removed` (with the last listed state). Each poll reads every page of `GET /users/me/meetings?type=scheduled` and diffs it with a keyed snapshot committed in the binding's poll cursor. Behavior matches the Go connector, which the [connector README](../README.md#meetingchanged-trigger) describes in full: the first poll records a baseline and delivers nothing, event IDs are stable across refetches, a recurring meeting tracks its next listed occurrence, an expired page token restarts the listing once, more than 100 changes commit 100 at a time, a cursor that is undecodable or holds another Zoom user's meetings reseeds with a WARN record, and every 429, including the daily limit, pauses the connection for `Retry-After`. The cursor token and snapshot entries are byte-compatible with Go, and inbox payloads use the Go JSON fields, so Go and TypeScript replicas can share one binding; `test/meeting_changed_go_parity.test.ts` replays a Go recording to prove it.
10
+
11
+ The connection's `pollInterval` setting, `Config.pollIntervalMs` in code, is the delay between polls; `ZoomClient` rejects one under 30 seconds. The Trigger reads with the `meeting:read:list_meetings` scope the connection already requests.
12
+
13
+ | Function | Use |
14
+ | --- | --- |
15
+ | `newProjectMeetingTriggerRunner(project, connection, routes)` | Durable delivery from a `LoadedProject`: each route's saved binding configuration is loaded (an unsaved binding delivers every kind), and each change is recorded in the binding's project Trigger inbox before its snapshot commits. |
16
+ | `newMeetingTriggerRunner(connection, routes)` | One poll `Runner` for `MeetingChangedTriggerRoute` values with your own targets and cursor stores; a route without a cursor keeps it in memory. |
17
+ | `newMeetingChangedTrigger({ connection, bindingName, target })` | One in-memory `TriggerRunner`, like Go's generated `NewMeetingChangedTrigger`; it records a new baseline on every start. |
18
+ | `defineMeetingChangedTriggerBinding({ connectionName, bindingName })` | Declares the binding in a Flow's `getConnectorTriggerBindings`. Dex Web shows no field for it. |
19
+
20
+ `MeetingChangedTriggerConfiguration.changeKinds` narrows deliveries in code; skipped kinds still advance the snapshot. The [meeting-changed example](examples/meeting-changed/README.md) wires a Flow target in [`app.ts`](examples/meeting-changed/app.ts):
21
+
22
+ ```ts
23
+ const runner = newProjectMeetingTriggerRunner(project, connection, [{ bindingName: MeetingChangedTriggerBinding, target: newMeetingChangeFlowTarget(client, flow, options) }], options.logger ? { logger: options.logger } : {});
24
+ ```
25
+
26
+ `runner.run(newTriggerContext(signal))` replays the inboxes, seeds, and polls until the signal aborts, then rejects with `TriggerDeliveryAbortedError`.
27
+
28
+ ## Run the examples
29
+
30
+ The [meeting-list example](examples/meeting-list/) has the static `zoom-scheduler` connection name, a Worker entrypoint, a Client starter, and a real Dex integration check. Create the user-managed Zoom OAuth app and authorize it using the guide in the [connector README](../README.md). Start `dexcli dev`, set `DEX_FLOW_SERVICE_ADDRESS` to its server address, then run these commands from this directory:
31
+
32
+ ```sh
33
+ npm ci
34
+ npm run example:meeting-list
35
+ npm run example:meeting-list:start -- examples/meeting-list/input.example.json
36
+ ```
37
+
38
+ The integration check uses a generated provider stand-in and needs no Zoom credentials:
39
+
40
+ ```sh
41
+ DEX_FLOW_SERVICE_ADDRESS=127.0.0.1:<dex-port> npm run example:meeting-list:integration
42
+ ```
43
+
44
+ The [meeting-changed example](examples/meeting-changed/README.md) starts one Flow per meeting change on `zoom-meeting-watcher`; run it with `npm run example:meeting-changed`.
45
+
46
+ Run `npm run check` for package tests, types, and lint. With `dexcli dev` running, `DEX_FLOW_SERVICE_ADDRESS=127.0.0.1:<dex-port> npm run test:integration` runs both examples' real Dex integration tests. From the repository root, run `make test-connector-conformance CONNECTOR_DIRECTORY=connectors/zoom` to replay the Go-recorded provider scenarios in TypeScript. Live Zoom authorization, polling, and provider behavior have not been verified.
@@ -0,0 +1,418 @@
1
+ {
2
+ "connectorId": "zoom",
3
+ "releaseTag": "connectors/zoom/go/v0.25.0",
4
+ "package": {
5
+ "ecosystem": "npm",
6
+ "name": "@superdurable/connector-zoom",
7
+ "version": "0.2.0"
8
+ },
9
+ "factories": [
10
+ {
11
+ "name": "newListMeetingsStep",
12
+ "kind": "query",
13
+ "operationId": "listMeetings",
14
+ "inputType": "ListMeetingsInput",
15
+ "description": "List one page of the authorized user's scheduled, upcoming, live, or previous meetings, at most 300 per page.",
16
+ "fields": {
17
+ "stepType": "stepType",
18
+ "annotations": "annotations",
19
+ "connectionName": "connectionName",
20
+ "resultAttribute": "resultAttribute"
21
+ },
22
+ "branches": [
23
+ {
24
+ "id": "listed",
25
+ "field": "listed",
26
+ "optional": false
27
+ },
28
+ {
29
+ "id": "providerRejected",
30
+ "field": "providerRejected",
31
+ "optional": true
32
+ },
33
+ {
34
+ "id": "invalidResponse",
35
+ "field": "invalidResponse",
36
+ "optional": true
37
+ },
38
+ {
39
+ "id": "defect",
40
+ "field": "defect",
41
+ "optional": true
42
+ }
43
+ ],
44
+ "inputSchema": {
45
+ "additionalProperties": false,
46
+ "description": "ListMeetingsInput selects one page of the authorized user's meetings.",
47
+ "properties": {
48
+ "pageSize": {
49
+ "description": "PageSize is the number of meetings per page, from 1 to 300; zero uses Zoom's default of 30.",
50
+ "type": "integer"
51
+ },
52
+ "pageToken": {
53
+ "description": "PageToken is the NextPageToken of the previous page; Zoom expires it after 15 minutes.",
54
+ "type": "string"
55
+ },
56
+ "type": {
57
+ "description": "Type selects the meetings to list; blank lists upcoming meetings.",
58
+ "enum": [
59
+ "live",
60
+ "previous_meetings",
61
+ "scheduled",
62
+ "upcoming"
63
+ ],
64
+ "type": "string"
65
+ }
66
+ },
67
+ "type": "object"
68
+ }
69
+ },
70
+ {
71
+ "name": "newGetMeetingStep",
72
+ "kind": "query",
73
+ "operationId": "getMeeting",
74
+ "inputType": "GetMeetingInput",
75
+ "description": "Read one meeting by its numeric meeting ID, including its start instant, time zone, join URL, and settings.",
76
+ "fields": {
77
+ "stepType": "stepType",
78
+ "annotations": "annotations",
79
+ "connectionName": "connectionName",
80
+ "resultAttribute": "resultAttribute"
81
+ },
82
+ "branches": [
83
+ {
84
+ "id": "found",
85
+ "field": "found",
86
+ "optional": false
87
+ },
88
+ {
89
+ "id": "notFound",
90
+ "field": "notFound",
91
+ "optional": true
92
+ },
93
+ {
94
+ "id": "providerRejected",
95
+ "field": "providerRejected",
96
+ "optional": true
97
+ },
98
+ {
99
+ "id": "invalidResponse",
100
+ "field": "invalidResponse",
101
+ "optional": true
102
+ },
103
+ {
104
+ "id": "defect",
105
+ "field": "defect",
106
+ "optional": true
107
+ }
108
+ ],
109
+ "inputSchema": {
110
+ "additionalProperties": false,
111
+ "description": "GetMeetingInput identifies one meeting.",
112
+ "properties": {
113
+ "meetingId": {
114
+ "description": "MeetingID is Zoom's numeric meeting ID, such as the ID createMeeting returned.",
115
+ "type": "integer"
116
+ }
117
+ },
118
+ "required": [
119
+ "meetingId"
120
+ ],
121
+ "type": "object"
122
+ }
123
+ },
124
+ {
125
+ "name": "newCreateMeetingStep",
126
+ "kind": "mutation",
127
+ "operationId": "createMeeting",
128
+ "inputType": "CreateMeetingInput",
129
+ "description": "Schedule one meeting for the authorized user at an explicit start instant and IANA time zone; a synchronous dispatch fence makes the pre-send checkpoint visible across attempts and prevents a second send after an unknown outcome.",
130
+ "fields": {
131
+ "stepType": "stepType",
132
+ "annotations": "annotations",
133
+ "connectionName": "connectionName",
134
+ "resultAttribute": "resultAttribute"
135
+ },
136
+ "branches": [
137
+ {
138
+ "id": "created",
139
+ "field": "created",
140
+ "optional": false
141
+ },
142
+ {
143
+ "id": "providerRejected",
144
+ "field": "providerRejected",
145
+ "optional": true
146
+ },
147
+ {
148
+ "id": "uncertain",
149
+ "field": "uncertain",
150
+ "optional": true
151
+ },
152
+ {
153
+ "id": "defect",
154
+ "field": "defect",
155
+ "optional": true
156
+ }
157
+ ],
158
+ "inputSchema": {
159
+ "$defs": {
160
+ "MeetingSettingsInput": {
161
+ "additionalProperties": false,
162
+ "description": "MeetingSettingsInput changes meeting settings. A nil field, or a blank AutoRecording, leaves Zoom's value, which defaults to the user's settings.",
163
+ "properties": {
164
+ "autoRecording": {
165
+ "description": "AutoRecording is none, local, or cloud.",
166
+ "enum": [
167
+ "cloud",
168
+ "local",
169
+ "none"
170
+ ],
171
+ "type": "string"
172
+ },
173
+ "hostVideo": {
174
+ "description": "HostVideo starts the meeting with the host's video on.",
175
+ "type": "boolean"
176
+ },
177
+ "joinBeforeHost": {
178
+ "description": "JoinBeforeHost lets participants join before the host.",
179
+ "type": "boolean"
180
+ },
181
+ "muteUponEntry": {
182
+ "description": "MuteUponEntry mutes participants when they join.",
183
+ "type": "boolean"
184
+ },
185
+ "participantVideo": {
186
+ "description": "ParticipantVideo starts the meeting with participants' video on.",
187
+ "type": "boolean"
188
+ },
189
+ "waitingRoom": {
190
+ "description": "WaitingRoom holds participants in a waiting room; Zoom then disables JoinBeforeHost.",
191
+ "type": "boolean"
192
+ }
193
+ },
194
+ "type": "object"
195
+ }
196
+ },
197
+ "additionalProperties": false,
198
+ "description": "CreateMeetingInput describes one scheduled meeting for the authorized user.",
199
+ "properties": {
200
+ "agenda": {
201
+ "description": "Agenda is the optional meeting description, at most 2000 characters.",
202
+ "type": "string"
203
+ },
204
+ "durationMinutes": {
205
+ "description": "DurationMinutes is the scheduled duration, from 1 to 1440 minutes.",
206
+ "type": "integer"
207
+ },
208
+ "settings": {
209
+ "$ref": "#/$defs/MeetingSettingsInput",
210
+ "description": "Settings optionally overrides the user's default meeting settings."
211
+ },
212
+ "startTime": {
213
+ "description": "StartTime is the start instant in RFC 3339 with an explicit Z or ±hh:mm offset, such as 2026-02-24T09:00:00-08:00. It must be in the future and a whole second; a value without an offset is rejected rather than guessed.",
214
+ "type": "string"
215
+ },
216
+ "timeZone": {
217
+ "description": "TimeZone is the IANA time zone Zoom uses to display the meeting, such as America/Los_Angeles. It never moves the instant StartTime names.",
218
+ "type": "string"
219
+ },
220
+ "topic": {
221
+ "description": "Topic is the meeting topic, 1 to 200 characters.",
222
+ "type": "string"
223
+ }
224
+ },
225
+ "required": [
226
+ "durationMinutes",
227
+ "startTime",
228
+ "timeZone",
229
+ "topic"
230
+ ],
231
+ "type": "object"
232
+ }
233
+ },
234
+ {
235
+ "name": "newUpdateMeetingStep",
236
+ "kind": "mutation",
237
+ "operationId": "updateMeeting",
238
+ "inputType": "UpdateMeetingInput",
239
+ "description": "Patch the topic, agenda, start instant and time zone, duration, or settings of one meeting; the patch sets absolute values, so repeating it is safe.",
240
+ "fields": {
241
+ "stepType": "stepType",
242
+ "annotations": "annotations",
243
+ "connectionName": "connectionName",
244
+ "resultAttribute": "resultAttribute"
245
+ },
246
+ "branches": [
247
+ {
248
+ "id": "updated",
249
+ "field": "updated",
250
+ "optional": false
251
+ },
252
+ {
253
+ "id": "notFound",
254
+ "field": "notFound",
255
+ "optional": true
256
+ },
257
+ {
258
+ "id": "providerRejected",
259
+ "field": "providerRejected",
260
+ "optional": true
261
+ },
262
+ {
263
+ "id": "defect",
264
+ "field": "defect",
265
+ "optional": true
266
+ }
267
+ ],
268
+ "inputSchema": {
269
+ "$defs": {
270
+ "MeetingSettingsInput": {
271
+ "additionalProperties": false,
272
+ "description": "MeetingSettingsInput changes meeting settings. A nil field, or a blank AutoRecording, leaves Zoom's value, which defaults to the user's settings.",
273
+ "properties": {
274
+ "autoRecording": {
275
+ "description": "AutoRecording is none, local, or cloud.",
276
+ "enum": [
277
+ "cloud",
278
+ "local",
279
+ "none"
280
+ ],
281
+ "type": "string"
282
+ },
283
+ "hostVideo": {
284
+ "description": "HostVideo starts the meeting with the host's video on.",
285
+ "type": "boolean"
286
+ },
287
+ "joinBeforeHost": {
288
+ "description": "JoinBeforeHost lets participants join before the host.",
289
+ "type": "boolean"
290
+ },
291
+ "muteUponEntry": {
292
+ "description": "MuteUponEntry mutes participants when they join.",
293
+ "type": "boolean"
294
+ },
295
+ "participantVideo": {
296
+ "description": "ParticipantVideo starts the meeting with participants' video on.",
297
+ "type": "boolean"
298
+ },
299
+ "waitingRoom": {
300
+ "description": "WaitingRoom holds participants in a waiting room; Zoom then disables JoinBeforeHost.",
301
+ "type": "boolean"
302
+ }
303
+ },
304
+ "type": "object"
305
+ }
306
+ },
307
+ "additionalProperties": false,
308
+ "description": "UpdateMeetingInput patches one meeting. Every field other than MeetingID is optional, at least one must be set, and each set field replaces Zoom's value, so repeating the same patch leaves the same meeting.",
309
+ "properties": {
310
+ "agenda": {
311
+ "description": "Agenda replaces the agenda, at most 2000 characters; nil leaves it and an empty string clears it.",
312
+ "type": "string"
313
+ },
314
+ "durationMinutes": {
315
+ "description": "DurationMinutes replaces the duration, from 1 to 1440 minutes; zero leaves it.",
316
+ "type": "integer"
317
+ },
318
+ "meetingId": {
319
+ "description": "MeetingID is Zoom's numeric meeting ID.",
320
+ "type": "integer"
321
+ },
322
+ "settings": {
323
+ "$ref": "#/$defs/MeetingSettingsInput",
324
+ "description": "Settings changes the listed settings and leaves the others."
325
+ },
326
+ "startTime": {
327
+ "description": "StartTime moves the meeting to a future RFC 3339 instant with an explicit offset; blank leaves it. Zoom silently ignores a past start, so the connector rejects one.",
328
+ "type": "string"
329
+ },
330
+ "timeZone": {
331
+ "description": "TimeZone is the IANA time zone Zoom uses to display the meeting. It is required with StartTime and must be blank without it.",
332
+ "type": "string"
333
+ },
334
+ "topic": {
335
+ "description": "Topic replaces the topic, 1 to 200 characters; blank leaves it.",
336
+ "type": "string"
337
+ }
338
+ },
339
+ "required": [
340
+ "meetingId"
341
+ ],
342
+ "type": "object"
343
+ }
344
+ },
345
+ {
346
+ "name": "newListPastMeetingParticipantsStep",
347
+ "kind": "query",
348
+ "operationId": "listPastMeetingParticipants",
349
+ "inputType": "ListPastMeetingParticipantsInput",
350
+ "description": "List one page of the people who joined the latest ended instance of a meeting, at most 300 per page.",
351
+ "fields": {
352
+ "stepType": "stepType",
353
+ "annotations": "annotations",
354
+ "connectionName": "connectionName",
355
+ "resultAttribute": "resultAttribute"
356
+ },
357
+ "branches": [
358
+ {
359
+ "id": "listed",
360
+ "field": "listed",
361
+ "optional": false
362
+ },
363
+ {
364
+ "id": "notFound",
365
+ "field": "notFound",
366
+ "optional": true
367
+ },
368
+ {
369
+ "id": "providerRejected",
370
+ "field": "providerRejected",
371
+ "optional": true
372
+ },
373
+ {
374
+ "id": "invalidResponse",
375
+ "field": "invalidResponse",
376
+ "optional": true
377
+ },
378
+ {
379
+ "id": "defect",
380
+ "field": "defect",
381
+ "optional": true
382
+ }
383
+ ],
384
+ "inputSchema": {
385
+ "additionalProperties": false,
386
+ "description": "ListPastMeetingParticipantsInput selects one page of a past meeting's participants.",
387
+ "properties": {
388
+ "meetingId": {
389
+ "description": "MeetingID is Zoom's numeric meeting ID; Zoom answers for its latest ended instance.",
390
+ "type": "integer"
391
+ },
392
+ "pageSize": {
393
+ "description": "PageSize is the number of participants per page, from 1 to 300; zero uses Zoom's default of 30.",
394
+ "type": "integer"
395
+ },
396
+ "pageToken": {
397
+ "description": "PageToken is the NextPageToken of the previous page; Zoom expires it after 15 minutes.",
398
+ "type": "string"
399
+ }
400
+ },
401
+ "required": [
402
+ "meetingId"
403
+ ],
404
+ "type": "object"
405
+ }
406
+ },
407
+ {
408
+ "name": "defineMeetingChangedTriggerBinding",
409
+ "kind": "trigger",
410
+ "triggerName": "meetingChanged",
411
+ "fields": {
412
+ "connectionName": "connectionName",
413
+ "bindingName": "bindingName",
414
+ "configurationUI": "configurationUI"
415
+ }
416
+ }
417
+ ]
418
+ }