@superdurable/connector-zoom 0.0.0-stage → 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/LICENSE +21 -0
- package/README.md +22 -2
- package/dex-connector.json +186 -0
- package/dist/chunk-IOSXDBUC.js +379 -0
- package/dist/connection-4reP5njk.d.ts +414 -0
- package/dist/index.d.ts +328 -0
- package/dist/index.js +980 -0
- package/dist/mock.d.ts +151 -0
- package/dist/mock.js +365 -0
- package/package.json +62 -4
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,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Zoom TypeScript connector
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@superdurable/connector-zoom` implements the five Zoom Meetings operations from the Go connector: `listMeetings`, `getMeeting`, `createMeeting`, `updateMeeting`, and `listPastMeetingParticipants`. 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`.
|
|
4
|
+
|
|
5
|
+
Install the package with `@superdurable/connectors-sdk` 0.6.0 and Dex TypeScript SDK 1.28.0 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
|
+
## Run the example
|
|
8
|
+
|
|
9
|
+
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:
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm ci
|
|
13
|
+
npm run example:meeting-list
|
|
14
|
+
npm run example:meeting-list:start -- examples/meeting-list/input.example.json
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The integration check uses a generated provider stand-in and needs no Zoom credentials:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
DEX_FLOW_SERVICE_ADDRESS=127.0.0.1:<dex-port> npm run example:meeting-list:integration
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Run `npm run check` for package tests, types, and lint. 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 and provider behavior have not been verified.
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
{
|
|
2
|
+
"connectorId": "zoom",
|
|
3
|
+
"releaseTag": "connectors/zoom/go/v0.24.0",
|
|
4
|
+
"package": {
|
|
5
|
+
"ecosystem": "npm",
|
|
6
|
+
"name": "@superdurable/connector-zoom",
|
|
7
|
+
"version": "0.1.0"
|
|
8
|
+
},
|
|
9
|
+
"factories": [
|
|
10
|
+
{
|
|
11
|
+
"name": "newListMeetingsStep",
|
|
12
|
+
"kind": "query",
|
|
13
|
+
"operationId": "listMeetings",
|
|
14
|
+
"fields": {
|
|
15
|
+
"stepType": "stepType",
|
|
16
|
+
"annotations": "annotations",
|
|
17
|
+
"connectionName": "connectionName",
|
|
18
|
+
"resultAttribute": "resultAttribute"
|
|
19
|
+
},
|
|
20
|
+
"branches": [
|
|
21
|
+
{
|
|
22
|
+
"id": "listed",
|
|
23
|
+
"field": "listed",
|
|
24
|
+
"optional": false
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"id": "providerRejected",
|
|
28
|
+
"field": "providerRejected",
|
|
29
|
+
"optional": true
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"id": "invalidResponse",
|
|
33
|
+
"field": "invalidResponse",
|
|
34
|
+
"optional": true
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"id": "defect",
|
|
38
|
+
"field": "defect",
|
|
39
|
+
"optional": true
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"name": "newGetMeetingStep",
|
|
45
|
+
"kind": "query",
|
|
46
|
+
"operationId": "getMeeting",
|
|
47
|
+
"fields": {
|
|
48
|
+
"stepType": "stepType",
|
|
49
|
+
"annotations": "annotations",
|
|
50
|
+
"connectionName": "connectionName",
|
|
51
|
+
"resultAttribute": "resultAttribute"
|
|
52
|
+
},
|
|
53
|
+
"branches": [
|
|
54
|
+
{
|
|
55
|
+
"id": "found",
|
|
56
|
+
"field": "found",
|
|
57
|
+
"optional": false
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "notFound",
|
|
61
|
+
"field": "notFound",
|
|
62
|
+
"optional": true
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"id": "providerRejected",
|
|
66
|
+
"field": "providerRejected",
|
|
67
|
+
"optional": true
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"id": "invalidResponse",
|
|
71
|
+
"field": "invalidResponse",
|
|
72
|
+
"optional": true
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "defect",
|
|
76
|
+
"field": "defect",
|
|
77
|
+
"optional": true
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "newCreateMeetingStep",
|
|
83
|
+
"kind": "mutation",
|
|
84
|
+
"operationId": "createMeeting",
|
|
85
|
+
"fields": {
|
|
86
|
+
"stepType": "stepType",
|
|
87
|
+
"annotations": "annotations",
|
|
88
|
+
"connectionName": "connectionName",
|
|
89
|
+
"resultAttribute": "resultAttribute"
|
|
90
|
+
},
|
|
91
|
+
"branches": [
|
|
92
|
+
{
|
|
93
|
+
"id": "created",
|
|
94
|
+
"field": "created",
|
|
95
|
+
"optional": false
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"id": "providerRejected",
|
|
99
|
+
"field": "providerRejected",
|
|
100
|
+
"optional": true
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "uncertain",
|
|
104
|
+
"field": "uncertain",
|
|
105
|
+
"optional": true
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id": "defect",
|
|
109
|
+
"field": "defect",
|
|
110
|
+
"optional": true
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"name": "newUpdateMeetingStep",
|
|
116
|
+
"kind": "mutation",
|
|
117
|
+
"operationId": "updateMeeting",
|
|
118
|
+
"fields": {
|
|
119
|
+
"stepType": "stepType",
|
|
120
|
+
"annotations": "annotations",
|
|
121
|
+
"connectionName": "connectionName",
|
|
122
|
+
"resultAttribute": "resultAttribute"
|
|
123
|
+
},
|
|
124
|
+
"branches": [
|
|
125
|
+
{
|
|
126
|
+
"id": "updated",
|
|
127
|
+
"field": "updated",
|
|
128
|
+
"optional": false
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"id": "notFound",
|
|
132
|
+
"field": "notFound",
|
|
133
|
+
"optional": true
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"id": "providerRejected",
|
|
137
|
+
"field": "providerRejected",
|
|
138
|
+
"optional": true
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"id": "defect",
|
|
142
|
+
"field": "defect",
|
|
143
|
+
"optional": true
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
"name": "newListPastMeetingParticipantsStep",
|
|
149
|
+
"kind": "query",
|
|
150
|
+
"operationId": "listPastMeetingParticipants",
|
|
151
|
+
"fields": {
|
|
152
|
+
"stepType": "stepType",
|
|
153
|
+
"annotations": "annotations",
|
|
154
|
+
"connectionName": "connectionName",
|
|
155
|
+
"resultAttribute": "resultAttribute"
|
|
156
|
+
},
|
|
157
|
+
"branches": [
|
|
158
|
+
{
|
|
159
|
+
"id": "listed",
|
|
160
|
+
"field": "listed",
|
|
161
|
+
"optional": false
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"id": "notFound",
|
|
165
|
+
"field": "notFound",
|
|
166
|
+
"optional": true
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"id": "providerRejected",
|
|
170
|
+
"field": "providerRejected",
|
|
171
|
+
"optional": true
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"id": "invalidResponse",
|
|
175
|
+
"field": "invalidResponse",
|
|
176
|
+
"optional": true
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"id": "defect",
|
|
180
|
+
"field": "defect",
|
|
181
|
+
"optional": true
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
}
|
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
// src/generated/models.ts
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { SecretString } from "@superdurable/connectors-sdk";
|
|
4
|
+
var goTimeJSONPattern = /^(\d{4})-(\d{2})-(\d{2})T(\d{1,2}):(\d{2}):(\d{2})(?:[.,](\d+))?(Z|([+-])(\d{2}):(\d{2}))$/;
|
|
5
|
+
function isGoTimeJSON(value) {
|
|
6
|
+
const match = goTimeJSONPattern.exec(value);
|
|
7
|
+
if (!match) return false;
|
|
8
|
+
const [, yearText, monthText, dayText, hourText, minuteText, secondText, , zone, , zoneHourText, zoneMinuteText] = match;
|
|
9
|
+
const year = Number(yearText);
|
|
10
|
+
const month = Number(monthText);
|
|
11
|
+
const day = Number(dayText);
|
|
12
|
+
const isLeap = year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
|
|
13
|
+
const monthDays = [31, isLeap ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
14
|
+
return month >= 1 && month <= 12 && day >= 1 && day <= monthDays[month - 1] && Number(hourText) <= 23 && Number(minuteText) <= 59 && Number(secondText) <= 59 && (zone === "Z" || Number(zoneHourText) <= 24 && Number(zoneMinuteText) <= 60);
|
|
15
|
+
}
|
|
16
|
+
function canonicalGoTimeJSON(value) {
|
|
17
|
+
const match = goTimeJSONPattern.exec(value);
|
|
18
|
+
const [, year, month, day, hour, minute, second, fraction, zone, sign, zoneHour, zoneMinute] = match;
|
|
19
|
+
const clock = year + "-" + month + "-" + day + "T" + hour.padStart(2, "0") + ":" + minute + ":" + second;
|
|
20
|
+
const digits = (fraction ?? "").slice(0, 9).replace(/0+$/, "");
|
|
21
|
+
const offsetMinutes = zone === "Z" ? 0 : (Number(zoneHour) * 60 + Number(zoneMinute)) * (sign === "+" ? 1 : -1);
|
|
22
|
+
if (Math.abs(offsetMinutes) >= 1440) return value;
|
|
23
|
+
const offset = offsetMinutes === 0 ? "Z" : (offsetMinutes > 0 ? "+" : "-") + String(Math.floor(Math.abs(offsetMinutes) / 60)).padStart(2, "0") + ":" + String(Math.abs(offsetMinutes) % 60).padStart(2, "0");
|
|
24
|
+
return clock + (digits ? "." + digits : "") + offset;
|
|
25
|
+
}
|
|
26
|
+
var GoTimeJSONSchema = z.string().refine(isGoTimeJSON, "invalid Go time.Time JSON timestamp").transform(canonicalGoTimeJSON);
|
|
27
|
+
var ConfigSchema = z.object({
|
|
28
|
+
"endpoint": z.string().optional(),
|
|
29
|
+
"maxResponseBytes": z.number().int().optional()
|
|
30
|
+
});
|
|
31
|
+
function decodeCredentials(value) {
|
|
32
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new TypeError("credential fields are invalid");
|
|
33
|
+
const fields = value;
|
|
34
|
+
const allowed = /* @__PURE__ */ new Set(["access_token", "oauth_client_id", "oauth_client_secret", "refresh_token"]);
|
|
35
|
+
if (Object.keys(fields).some((key) => !allowed.has(key))) throw new TypeError("stored credential does not match the connector credential fields");
|
|
36
|
+
if (fields["access_token"] != null && !(typeof fields["access_token"] === "string")) throw new TypeError("credential access_token has an invalid type");
|
|
37
|
+
if (fields["oauth_client_id"] != null && !(typeof fields["oauth_client_id"] === "string")) throw new TypeError("credential oauth_client_id has an invalid type");
|
|
38
|
+
if (fields["oauth_client_secret"] != null && !(typeof fields["oauth_client_secret"] === "string")) throw new TypeError("credential oauth_client_secret has an invalid type");
|
|
39
|
+
if (fields["refresh_token"] != null && !(typeof fields["refresh_token"] === "string")) throw new TypeError("credential refresh_token has an invalid type");
|
|
40
|
+
const credentials = {};
|
|
41
|
+
if (!fields["oauth_client_id"]) throw new TypeError("credential oauth_client_id is required");
|
|
42
|
+
credentials.oauthClientId = fields["oauth_client_id"] ?? "";
|
|
43
|
+
if (!fields["oauth_client_secret"]) throw new TypeError("credential oauth_client_secret is required");
|
|
44
|
+
credentials.oauthClientSecret = new SecretString(fields["oauth_client_secret"] ?? "");
|
|
45
|
+
if (!fields["access_token"]) throw new TypeError("credential access_token is required");
|
|
46
|
+
credentials.accessToken = new SecretString(fields["access_token"] ?? "");
|
|
47
|
+
if (!fields["refresh_token"]) throw new TypeError("credential refresh_token is required");
|
|
48
|
+
credentials.refreshToken = new SecretString(fields["refresh_token"] ?? "");
|
|
49
|
+
return credentials;
|
|
50
|
+
}
|
|
51
|
+
function decodeSharedCredentials(value) {
|
|
52
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new TypeError("credential fields are invalid");
|
|
53
|
+
const fields = value;
|
|
54
|
+
const allowed = /* @__PURE__ */ new Set(["access_token", "oauth_client_id", "oauth_client_secret", "refresh_token"]);
|
|
55
|
+
if (Object.keys(fields).some((key) => !allowed.has(key))) throw new TypeError("stored credential does not match the connector credential fields");
|
|
56
|
+
if (fields["access_token"] != null && !(typeof fields["access_token"] === "string")) throw new TypeError("credential access_token has an invalid type");
|
|
57
|
+
if (fields["oauth_client_id"] != null && !(typeof fields["oauth_client_id"] === "string")) throw new TypeError("credential oauth_client_id has an invalid type");
|
|
58
|
+
if (fields["oauth_client_secret"] != null && !(typeof fields["oauth_client_secret"] === "string")) throw new TypeError("credential oauth_client_secret has an invalid type");
|
|
59
|
+
if (fields["refresh_token"] != null && !(typeof fields["refresh_token"] === "string")) throw new TypeError("credential refresh_token has an invalid type");
|
|
60
|
+
const credentials = {};
|
|
61
|
+
if (!fields["oauth_client_id"]) throw new TypeError("credential oauth_client_id is required");
|
|
62
|
+
credentials.oauthClientId = fields["oauth_client_id"] ?? "";
|
|
63
|
+
credentials.oauthClientSecret = new SecretString(fields["oauth_client_secret"] ?? "");
|
|
64
|
+
if (!fields["access_token"]) throw new TypeError("credential access_token is required");
|
|
65
|
+
credentials.accessToken = new SecretString(fields["access_token"] ?? "");
|
|
66
|
+
credentials.refreshToken = new SecretString(fields["refresh_token"] ?? "");
|
|
67
|
+
return credentials;
|
|
68
|
+
}
|
|
69
|
+
var ListMeetingsInputSchema = z.strictObject({
|
|
70
|
+
"type": z.string().optional(),
|
|
71
|
+
"pageSize": z.number().int().optional(),
|
|
72
|
+
"pageToken": z.string().optional()
|
|
73
|
+
});
|
|
74
|
+
var MeetingSummarySchema = z.strictObject({
|
|
75
|
+
"id": z.number().int(),
|
|
76
|
+
"uuid": z.string().optional(),
|
|
77
|
+
"hostId": z.string().optional(),
|
|
78
|
+
"topic": z.string(),
|
|
79
|
+
"type": z.number().int().optional(),
|
|
80
|
+
"startTime": GoTimeJSONSchema.nullable().optional(),
|
|
81
|
+
"durationMinutes": z.number().int().optional(),
|
|
82
|
+
"timeZone": z.string().optional(),
|
|
83
|
+
"agenda": z.string().optional(),
|
|
84
|
+
"joinUrl": z.string().optional(),
|
|
85
|
+
"createdAt": GoTimeJSONSchema.nullable().optional()
|
|
86
|
+
});
|
|
87
|
+
var MeetingPageSchema = z.strictObject({
|
|
88
|
+
"meetings": z.array(MeetingSummarySchema).nullable(),
|
|
89
|
+
"nextPageToken": z.string().optional(),
|
|
90
|
+
"totalRecords": z.number().int()
|
|
91
|
+
});
|
|
92
|
+
var GetMeetingInputSchema = z.strictObject({
|
|
93
|
+
"meetingId": z.number().int()
|
|
94
|
+
});
|
|
95
|
+
var MeetingSettingsSchema = z.strictObject({
|
|
96
|
+
"hostVideo": z.boolean(),
|
|
97
|
+
"participantVideo": z.boolean(),
|
|
98
|
+
"joinBeforeHost": z.boolean(),
|
|
99
|
+
"muteUponEntry": z.boolean(),
|
|
100
|
+
"waitingRoom": z.boolean(),
|
|
101
|
+
"autoRecording": z.string().optional()
|
|
102
|
+
});
|
|
103
|
+
var MeetingSchema = z.strictObject({
|
|
104
|
+
"id": z.number().int(),
|
|
105
|
+
"uuid": z.string().optional(),
|
|
106
|
+
"hostId": z.string().optional(),
|
|
107
|
+
"hostEmail": z.string().optional(),
|
|
108
|
+
"topic": z.string(),
|
|
109
|
+
"type": z.number().int().optional(),
|
|
110
|
+
"status": z.string().optional(),
|
|
111
|
+
"startTime": GoTimeJSONSchema.nullable().optional(),
|
|
112
|
+
"durationMinutes": z.number().int().optional(),
|
|
113
|
+
"timeZone": z.string().optional(),
|
|
114
|
+
"agenda": z.string().optional(),
|
|
115
|
+
"joinUrl": z.string().optional(),
|
|
116
|
+
"createdAt": GoTimeJSONSchema.nullable().optional(),
|
|
117
|
+
"settings": MeetingSettingsSchema
|
|
118
|
+
});
|
|
119
|
+
var MeetingSettingsInputSchema = z.strictObject({
|
|
120
|
+
"hostVideo": z.boolean().optional(),
|
|
121
|
+
"participantVideo": z.boolean().optional(),
|
|
122
|
+
"joinBeforeHost": z.boolean().optional(),
|
|
123
|
+
"muteUponEntry": z.boolean().optional(),
|
|
124
|
+
"waitingRoom": z.boolean().optional(),
|
|
125
|
+
"autoRecording": z.string().optional()
|
|
126
|
+
});
|
|
127
|
+
var CreateMeetingInputSchema = z.strictObject({
|
|
128
|
+
"topic": z.string(),
|
|
129
|
+
"startTime": z.string(),
|
|
130
|
+
"timeZone": z.string(),
|
|
131
|
+
"durationMinutes": z.number().int(),
|
|
132
|
+
"agenda": z.string().optional(),
|
|
133
|
+
"settings": MeetingSettingsInputSchema.optional()
|
|
134
|
+
});
|
|
135
|
+
var UpdateMeetingInputSchema = z.strictObject({
|
|
136
|
+
"meetingId": z.number().int(),
|
|
137
|
+
"topic": z.string().optional(),
|
|
138
|
+
"agenda": z.string().optional(),
|
|
139
|
+
"startTime": z.string().optional(),
|
|
140
|
+
"timeZone": z.string().optional(),
|
|
141
|
+
"durationMinutes": z.number().int().optional(),
|
|
142
|
+
"settings": MeetingSettingsInputSchema.optional()
|
|
143
|
+
});
|
|
144
|
+
var UpdatedMeetingSchema = z.strictObject({
|
|
145
|
+
"meetingId": z.number().int()
|
|
146
|
+
});
|
|
147
|
+
var ListPastMeetingParticipantsInputSchema = z.strictObject({
|
|
148
|
+
"meetingId": z.number().int(),
|
|
149
|
+
"pageSize": z.number().int().optional(),
|
|
150
|
+
"pageToken": z.string().optional()
|
|
151
|
+
});
|
|
152
|
+
var MeetingParticipantSchema = z.strictObject({
|
|
153
|
+
"id": z.string().optional(),
|
|
154
|
+
"name": z.string().optional(),
|
|
155
|
+
"email": z.string().optional(),
|
|
156
|
+
"joinTime": GoTimeJSONSchema.nullable().optional(),
|
|
157
|
+
"leaveTime": GoTimeJSONSchema.nullable().optional(),
|
|
158
|
+
"durationSeconds": z.number().int(),
|
|
159
|
+
"status": z.string().optional(),
|
|
160
|
+
"isInternalUser": z.boolean()
|
|
161
|
+
});
|
|
162
|
+
var ParticipantPageSchema = z.strictObject({
|
|
163
|
+
"meetingId": z.number().int(),
|
|
164
|
+
"participants": z.array(MeetingParticipantSchema).nullable(),
|
|
165
|
+
"nextPageToken": z.string().optional(),
|
|
166
|
+
"totalRecords": z.number().int()
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
// src/generated/definitions.ts
|
|
170
|
+
var ConnectorID = "zoom";
|
|
171
|
+
var ProviderID = "zoom";
|
|
172
|
+
var ListMeetingsBranch = {
|
|
173
|
+
Listed: "listed",
|
|
174
|
+
ProviderRejected: "providerRejected",
|
|
175
|
+
InvalidResponse: "invalidResponse",
|
|
176
|
+
Defect: "defect"
|
|
177
|
+
};
|
|
178
|
+
var ListMeetingsBranchListed = ListMeetingsBranch.Listed;
|
|
179
|
+
var ListMeetingsBranchProviderRejected = ListMeetingsBranch.ProviderRejected;
|
|
180
|
+
var ListMeetingsBranchInvalidResponse = ListMeetingsBranch.InvalidResponse;
|
|
181
|
+
var ListMeetingsBranchDefect = ListMeetingsBranch.Defect;
|
|
182
|
+
var ListMeetingsDefinition = {
|
|
183
|
+
operation: { connectorId: ConnectorID, operationId: "listMeetings" },
|
|
184
|
+
branches: [
|
|
185
|
+
{ id: "listed", description: "One page of the user's meetings was listed." },
|
|
186
|
+
{ id: "providerRejected", description: "Zoom conclusively rejected the listing, including a documented daily-limit 429 or a user without meeting hosting capability.", optional: true },
|
|
187
|
+
{ id: "invalidResponse", description: "Zoom returned an invalid or oversized meeting page.", optional: true },
|
|
188
|
+
{ id: "defect", description: "Local input, connection configuration, or connector definition is invalid.", optional: true }
|
|
189
|
+
],
|
|
190
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
|
|
191
|
+
};
|
|
192
|
+
var ListMeetingsMetadata = { kind: "query", idempotency: "none", authorization: "required" };
|
|
193
|
+
var GetMeetingBranch = {
|
|
194
|
+
Found: "found",
|
|
195
|
+
NotFound: "notFound",
|
|
196
|
+
ProviderRejected: "providerRejected",
|
|
197
|
+
InvalidResponse: "invalidResponse",
|
|
198
|
+
Defect: "defect"
|
|
199
|
+
};
|
|
200
|
+
var GetMeetingBranchFound = GetMeetingBranch.Found;
|
|
201
|
+
var GetMeetingBranchNotFound = GetMeetingBranch.NotFound;
|
|
202
|
+
var GetMeetingBranchProviderRejected = GetMeetingBranch.ProviderRejected;
|
|
203
|
+
var GetMeetingBranchInvalidResponse = GetMeetingBranch.InvalidResponse;
|
|
204
|
+
var GetMeetingBranchDefect = GetMeetingBranch.Defect;
|
|
205
|
+
var GetMeetingDefinition = {
|
|
206
|
+
operation: { connectorId: ConnectorID, operationId: "getMeeting" },
|
|
207
|
+
branches: [
|
|
208
|
+
{ id: "found", description: "The meeting was read." },
|
|
209
|
+
{ id: "notFound", description: "The meeting does not exist or was deleted.", optional: true },
|
|
210
|
+
{ id: "providerRejected", description: "Zoom conclusively rejected the meeting read, including a documented daily-limit 429.", optional: true },
|
|
211
|
+
{ id: "invalidResponse", description: "Zoom returned an invalid or oversized meeting.", optional: true },
|
|
212
|
+
{ id: "defect", description: "Local input, connection configuration, or connector definition is invalid.", optional: true }
|
|
213
|
+
],
|
|
214
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
|
|
215
|
+
};
|
|
216
|
+
var GetMeetingMetadata = { kind: "query", idempotency: "none", authorization: "required" };
|
|
217
|
+
var CreateMeetingBranch = {
|
|
218
|
+
Created: "created",
|
|
219
|
+
ProviderRejected: "providerRejected",
|
|
220
|
+
Uncertain: "uncertain",
|
|
221
|
+
Defect: "defect"
|
|
222
|
+
};
|
|
223
|
+
var CreateMeetingBranchCreated = CreateMeetingBranch.Created;
|
|
224
|
+
var CreateMeetingBranchProviderRejected = CreateMeetingBranch.ProviderRejected;
|
|
225
|
+
var CreateMeetingBranchUncertain = CreateMeetingBranch.Uncertain;
|
|
226
|
+
var CreateMeetingBranchDefect = CreateMeetingBranch.Defect;
|
|
227
|
+
var CreateMeetingDefinition = {
|
|
228
|
+
operation: { connectorId: ConnectorID, operationId: "createMeeting" },
|
|
229
|
+
branches: [
|
|
230
|
+
{ id: "created", description: "Zoom created the meeting and returned its ID and join URL." },
|
|
231
|
+
{ id: "providerRejected", description: "Zoom conclusively rejected the meeting, including a documented daily-limit 429 or a user who cannot host; nothing was created.", optional: true },
|
|
232
|
+
{ id: "uncertain", description: "The request was dispatched but its outcome cannot be confirmed; the meeting may exist and must not be created again automatically.", optional: true },
|
|
233
|
+
{ id: "defect", description: "Local input, connection configuration, or connector definition is invalid.", optional: true }
|
|
234
|
+
],
|
|
235
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "sync", executeRetry: { initialIntervalMs: 1e3, backoffCoefficient: 2, maximumIntervalMs: 3e4, maximumAttempts: 5, totalDurationMs: 12e4 } }
|
|
236
|
+
};
|
|
237
|
+
var CreateMeetingMetadata = { kind: "mutation", idempotency: "required", authorization: "required" };
|
|
238
|
+
var UpdateMeetingBranch = {
|
|
239
|
+
Updated: "updated",
|
|
240
|
+
NotFound: "notFound",
|
|
241
|
+
ProviderRejected: "providerRejected",
|
|
242
|
+
Defect: "defect"
|
|
243
|
+
};
|
|
244
|
+
var UpdateMeetingBranchUpdated = UpdateMeetingBranch.Updated;
|
|
245
|
+
var UpdateMeetingBranchNotFound = UpdateMeetingBranch.NotFound;
|
|
246
|
+
var UpdateMeetingBranchProviderRejected = UpdateMeetingBranch.ProviderRejected;
|
|
247
|
+
var UpdateMeetingBranchDefect = UpdateMeetingBranch.Defect;
|
|
248
|
+
var UpdateMeetingDefinition = {
|
|
249
|
+
operation: { connectorId: ConnectorID, operationId: "updateMeeting" },
|
|
250
|
+
branches: [
|
|
251
|
+
{ id: "updated", description: "Zoom accepted the patch." },
|
|
252
|
+
{ id: "notFound", description: "The meeting does not exist or was deleted.", optional: true },
|
|
253
|
+
{ id: "providerRejected", description: "Zoom conclusively rejected the patch, including a documented daily-limit 429 or an invalid field value.", optional: true },
|
|
254
|
+
{ id: "defect", description: "Local input, connection configuration, or connector definition is invalid.", optional: true }
|
|
255
|
+
],
|
|
256
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
|
|
257
|
+
};
|
|
258
|
+
var UpdateMeetingMetadata = { kind: "mutation", idempotency: "required", authorization: "required" };
|
|
259
|
+
var ListPastMeetingParticipantsBranch = {
|
|
260
|
+
Listed: "listed",
|
|
261
|
+
NotFound: "notFound",
|
|
262
|
+
ProviderRejected: "providerRejected",
|
|
263
|
+
InvalidResponse: "invalidResponse",
|
|
264
|
+
Defect: "defect"
|
|
265
|
+
};
|
|
266
|
+
var ListPastMeetingParticipantsBranchListed = ListPastMeetingParticipantsBranch.Listed;
|
|
267
|
+
var ListPastMeetingParticipantsBranchNotFound = ListPastMeetingParticipantsBranch.NotFound;
|
|
268
|
+
var ListPastMeetingParticipantsBranchProviderRejected = ListPastMeetingParticipantsBranch.ProviderRejected;
|
|
269
|
+
var ListPastMeetingParticipantsBranchInvalidResponse = ListPastMeetingParticipantsBranch.InvalidResponse;
|
|
270
|
+
var ListPastMeetingParticipantsBranchDefect = ListPastMeetingParticipantsBranch.Defect;
|
|
271
|
+
var ListPastMeetingParticipantsDefinition = {
|
|
272
|
+
operation: { connectorId: ConnectorID, operationId: "listPastMeetingParticipants" },
|
|
273
|
+
branches: [
|
|
274
|
+
{ id: "listed", description: "One page of participants was listed." },
|
|
275
|
+
{ id: "notFound", description: "Zoom has no ended instance of the meeting.", optional: true },
|
|
276
|
+
{ id: "providerRejected", description: "Zoom conclusively rejected the listing, including a documented daily-limit 429, a free account, or a meeting older than Zoom keeps.", optional: true },
|
|
277
|
+
{ id: "invalidResponse", description: "Zoom returned an invalid or oversized participant page.", optional: true },
|
|
278
|
+
{ id: "defect", description: "Local input, connection configuration, or connector definition is invalid.", optional: true }
|
|
279
|
+
],
|
|
280
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
|
|
281
|
+
};
|
|
282
|
+
var ListPastMeetingParticipantsMetadata = { kind: "query", idempotency: "none", authorization: "required" };
|
|
283
|
+
|
|
284
|
+
// src/generated/connection.ts
|
|
285
|
+
import { ConnectionRefSchema } from "@superdurable/connectors-sdk";
|
|
286
|
+
import { newRefreshingCredentialProvider } from "@superdurable/connectors-sdk/projectconfig";
|
|
287
|
+
var Connection = class {
|
|
288
|
+
/** Stable provider and connection name. */
|
|
289
|
+
reference;
|
|
290
|
+
/** Bound provider operations. */
|
|
291
|
+
operations;
|
|
292
|
+
/** Validate a reference and bind operations. */
|
|
293
|
+
constructor(reference, operations) {
|
|
294
|
+
this.reference = ConnectionRefSchema.parse(reference);
|
|
295
|
+
if (this.reference.provider !== ProviderID) throw new TypeError("connection provider differs from the manifest");
|
|
296
|
+
if (!operations) throw new TypeError("connector operations are required");
|
|
297
|
+
this.operations = operations;
|
|
298
|
+
}
|
|
299
|
+
};
|
|
300
|
+
function newConnection(client, reference) {
|
|
301
|
+
if (!client) throw new TypeError("connector client is required");
|
|
302
|
+
return new Connection(reference, client);
|
|
303
|
+
}
|
|
304
|
+
function newConnectionWithOperations(operations, reference) {
|
|
305
|
+
return new Connection(reference, operations);
|
|
306
|
+
}
|
|
307
|
+
function newProjectConnection(project, connectionName, createClient) {
|
|
308
|
+
if (!project) throw new TypeError("loaded project is required");
|
|
309
|
+
const reference = ConnectionRefSchema.parse({ provider: ProviderID, name: connectionName });
|
|
310
|
+
const selected = project.configuration.connections.find((entry) => entry.connectorId === ConnectorID && entry.connectionName === connectionName);
|
|
311
|
+
if (!selected || selected.provider !== ProviderID) throw new TypeError("project connection is not configured");
|
|
312
|
+
return newConnection(createClient(project, connectionName), reference);
|
|
313
|
+
}
|
|
314
|
+
function newProjectCredentialProvider(project, connectionName, decode, encode, decodeShared) {
|
|
315
|
+
return newRefreshingCredentialProvider(project.connections, { connectorId: ConnectorID, connectionName }, decode, encode, decodeShared);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export {
|
|
319
|
+
ConfigSchema,
|
|
320
|
+
decodeCredentials,
|
|
321
|
+
decodeSharedCredentials,
|
|
322
|
+
ListMeetingsInputSchema,
|
|
323
|
+
MeetingSummarySchema,
|
|
324
|
+
MeetingPageSchema,
|
|
325
|
+
GetMeetingInputSchema,
|
|
326
|
+
MeetingSettingsSchema,
|
|
327
|
+
MeetingSchema,
|
|
328
|
+
MeetingSettingsInputSchema,
|
|
329
|
+
CreateMeetingInputSchema,
|
|
330
|
+
UpdateMeetingInputSchema,
|
|
331
|
+
UpdatedMeetingSchema,
|
|
332
|
+
ListPastMeetingParticipantsInputSchema,
|
|
333
|
+
MeetingParticipantSchema,
|
|
334
|
+
ParticipantPageSchema,
|
|
335
|
+
ConnectorID,
|
|
336
|
+
ProviderID,
|
|
337
|
+
ListMeetingsBranch,
|
|
338
|
+
ListMeetingsBranchListed,
|
|
339
|
+
ListMeetingsBranchProviderRejected,
|
|
340
|
+
ListMeetingsBranchInvalidResponse,
|
|
341
|
+
ListMeetingsBranchDefect,
|
|
342
|
+
ListMeetingsDefinition,
|
|
343
|
+
ListMeetingsMetadata,
|
|
344
|
+
GetMeetingBranch,
|
|
345
|
+
GetMeetingBranchFound,
|
|
346
|
+
GetMeetingBranchNotFound,
|
|
347
|
+
GetMeetingBranchProviderRejected,
|
|
348
|
+
GetMeetingBranchInvalidResponse,
|
|
349
|
+
GetMeetingBranchDefect,
|
|
350
|
+
GetMeetingDefinition,
|
|
351
|
+
GetMeetingMetadata,
|
|
352
|
+
CreateMeetingBranch,
|
|
353
|
+
CreateMeetingBranchCreated,
|
|
354
|
+
CreateMeetingBranchProviderRejected,
|
|
355
|
+
CreateMeetingBranchUncertain,
|
|
356
|
+
CreateMeetingBranchDefect,
|
|
357
|
+
CreateMeetingDefinition,
|
|
358
|
+
CreateMeetingMetadata,
|
|
359
|
+
UpdateMeetingBranch,
|
|
360
|
+
UpdateMeetingBranchUpdated,
|
|
361
|
+
UpdateMeetingBranchNotFound,
|
|
362
|
+
UpdateMeetingBranchProviderRejected,
|
|
363
|
+
UpdateMeetingBranchDefect,
|
|
364
|
+
UpdateMeetingDefinition,
|
|
365
|
+
UpdateMeetingMetadata,
|
|
366
|
+
ListPastMeetingParticipantsBranch,
|
|
367
|
+
ListPastMeetingParticipantsBranchListed,
|
|
368
|
+
ListPastMeetingParticipantsBranchNotFound,
|
|
369
|
+
ListPastMeetingParticipantsBranchProviderRejected,
|
|
370
|
+
ListPastMeetingParticipantsBranchInvalidResponse,
|
|
371
|
+
ListPastMeetingParticipantsBranchDefect,
|
|
372
|
+
ListPastMeetingParticipantsDefinition,
|
|
373
|
+
ListPastMeetingParticipantsMetadata,
|
|
374
|
+
Connection,
|
|
375
|
+
newConnection,
|
|
376
|
+
newConnectionWithOperations,
|
|
377
|
+
newProjectConnection,
|
|
378
|
+
newProjectCredentialProvider
|
|
379
|
+
};
|