@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 +21 -0
- package/README.md +45 -2
- package/dex-connector.json +418 -0
- package/dist/chunk-RBP47TKQ.js +383 -0
- package/dist/connection-Cq-pg7cw.d.ts +417 -0
- package/dist/index.d.ts +481 -0
- package/dist/index.js +1434 -0
- package/dist/mock.d.ts +151 -0
- package/dist/mock.js +365 -0
- package/package.json +64 -4
|
@@ -0,0 +1,383 @@
|
|
|
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
|
+
"pollIntervalMs": z.number().int().optional()
|
|
31
|
+
});
|
|
32
|
+
function decodeCredentials(value) {
|
|
33
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new TypeError("credential fields are invalid");
|
|
34
|
+
const fields = value;
|
|
35
|
+
const allowed = /* @__PURE__ */ new Set(["access_token", "oauth_client_id", "oauth_client_secret", "refresh_token"]);
|
|
36
|
+
if (Object.keys(fields).some((key) => !allowed.has(key))) throw new TypeError("stored credential does not match the connector credential fields");
|
|
37
|
+
if (fields["access_token"] != null && !(typeof fields["access_token"] === "string")) throw new TypeError("credential access_token has an invalid type");
|
|
38
|
+
if (fields["oauth_client_id"] != null && !(typeof fields["oauth_client_id"] === "string")) throw new TypeError("credential oauth_client_id has an invalid type");
|
|
39
|
+
if (fields["oauth_client_secret"] != null && !(typeof fields["oauth_client_secret"] === "string")) throw new TypeError("credential oauth_client_secret has an invalid type");
|
|
40
|
+
if (fields["refresh_token"] != null && !(typeof fields["refresh_token"] === "string")) throw new TypeError("credential refresh_token has an invalid type");
|
|
41
|
+
const credentials = {};
|
|
42
|
+
if (!fields["oauth_client_id"]) throw new TypeError("credential oauth_client_id is required");
|
|
43
|
+
credentials.oauthClientId = fields["oauth_client_id"] ?? "";
|
|
44
|
+
if (!fields["oauth_client_secret"]) throw new TypeError("credential oauth_client_secret is required");
|
|
45
|
+
credentials.oauthClientSecret = new SecretString(fields["oauth_client_secret"] ?? "");
|
|
46
|
+
if (!fields["access_token"]) throw new TypeError("credential access_token is required");
|
|
47
|
+
credentials.accessToken = new SecretString(fields["access_token"] ?? "");
|
|
48
|
+
if (!fields["refresh_token"]) throw new TypeError("credential refresh_token is required");
|
|
49
|
+
credentials.refreshToken = new SecretString(fields["refresh_token"] ?? "");
|
|
50
|
+
return credentials;
|
|
51
|
+
}
|
|
52
|
+
function decodeSharedCredentials(value) {
|
|
53
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new TypeError("credential fields are invalid");
|
|
54
|
+
const fields = value;
|
|
55
|
+
const allowed = /* @__PURE__ */ new Set(["access_token", "oauth_client_id", "oauth_client_secret", "refresh_token"]);
|
|
56
|
+
if (Object.keys(fields).some((key) => !allowed.has(key))) throw new TypeError("stored credential does not match the connector credential fields");
|
|
57
|
+
if (fields["access_token"] != null && !(typeof fields["access_token"] === "string")) throw new TypeError("credential access_token has an invalid type");
|
|
58
|
+
if (fields["oauth_client_id"] != null && !(typeof fields["oauth_client_id"] === "string")) throw new TypeError("credential oauth_client_id has an invalid type");
|
|
59
|
+
if (fields["oauth_client_secret"] != null && !(typeof fields["oauth_client_secret"] === "string")) throw new TypeError("credential oauth_client_secret has an invalid type");
|
|
60
|
+
if (fields["refresh_token"] != null && !(typeof fields["refresh_token"] === "string")) throw new TypeError("credential refresh_token has an invalid type");
|
|
61
|
+
const credentials = {};
|
|
62
|
+
if (!fields["oauth_client_id"]) throw new TypeError("credential oauth_client_id is required");
|
|
63
|
+
credentials.oauthClientId = fields["oauth_client_id"] ?? "";
|
|
64
|
+
credentials.oauthClientSecret = new SecretString(fields["oauth_client_secret"] ?? "");
|
|
65
|
+
if (!fields["access_token"]) throw new TypeError("credential access_token is required");
|
|
66
|
+
credentials.accessToken = new SecretString(fields["access_token"] ?? "");
|
|
67
|
+
credentials.refreshToken = new SecretString(fields["refresh_token"] ?? "");
|
|
68
|
+
return credentials;
|
|
69
|
+
}
|
|
70
|
+
var ListMeetingsInputSchema = z.strictObject({
|
|
71
|
+
"type": z.string().optional(),
|
|
72
|
+
"pageSize": z.number().int().optional(),
|
|
73
|
+
"pageToken": z.string().optional()
|
|
74
|
+
});
|
|
75
|
+
var MeetingSummarySchema = z.strictObject({
|
|
76
|
+
"id": z.number().int(),
|
|
77
|
+
"uuid": z.string().optional(),
|
|
78
|
+
"hostId": z.string().optional(),
|
|
79
|
+
"topic": z.string(),
|
|
80
|
+
"type": z.number().int().optional(),
|
|
81
|
+
"startTime": GoTimeJSONSchema.nullable().optional(),
|
|
82
|
+
"durationMinutes": z.number().int().optional(),
|
|
83
|
+
"timeZone": z.string().optional(),
|
|
84
|
+
"agenda": z.string().optional(),
|
|
85
|
+
"joinUrl": z.string().optional(),
|
|
86
|
+
"createdAt": GoTimeJSONSchema.nullable().optional()
|
|
87
|
+
});
|
|
88
|
+
var MeetingPageSchema = z.strictObject({
|
|
89
|
+
"meetings": z.array(MeetingSummarySchema).nullable(),
|
|
90
|
+
"nextPageToken": z.string().optional(),
|
|
91
|
+
"totalRecords": z.number().int()
|
|
92
|
+
});
|
|
93
|
+
var GetMeetingInputSchema = z.strictObject({
|
|
94
|
+
"meetingId": z.number().int()
|
|
95
|
+
});
|
|
96
|
+
var MeetingSettingsSchema = z.strictObject({
|
|
97
|
+
"hostVideo": z.boolean(),
|
|
98
|
+
"participantVideo": z.boolean(),
|
|
99
|
+
"joinBeforeHost": z.boolean(),
|
|
100
|
+
"muteUponEntry": z.boolean(),
|
|
101
|
+
"waitingRoom": z.boolean(),
|
|
102
|
+
"autoRecording": z.string().optional()
|
|
103
|
+
});
|
|
104
|
+
var MeetingSchema = z.strictObject({
|
|
105
|
+
"id": z.number().int(),
|
|
106
|
+
"uuid": z.string().optional(),
|
|
107
|
+
"hostId": z.string().optional(),
|
|
108
|
+
"hostEmail": z.string().optional(),
|
|
109
|
+
"topic": z.string(),
|
|
110
|
+
"type": z.number().int().optional(),
|
|
111
|
+
"status": z.string().optional(),
|
|
112
|
+
"startTime": GoTimeJSONSchema.nullable().optional(),
|
|
113
|
+
"durationMinutes": z.number().int().optional(),
|
|
114
|
+
"timeZone": z.string().optional(),
|
|
115
|
+
"agenda": z.string().optional(),
|
|
116
|
+
"joinUrl": z.string().optional(),
|
|
117
|
+
"createdAt": GoTimeJSONSchema.nullable().optional(),
|
|
118
|
+
"settings": MeetingSettingsSchema
|
|
119
|
+
});
|
|
120
|
+
var MeetingSettingsInputSchema = z.strictObject({
|
|
121
|
+
"hostVideo": z.boolean().optional(),
|
|
122
|
+
"participantVideo": z.boolean().optional(),
|
|
123
|
+
"joinBeforeHost": z.boolean().optional(),
|
|
124
|
+
"muteUponEntry": z.boolean().optional(),
|
|
125
|
+
"waitingRoom": z.boolean().optional(),
|
|
126
|
+
"autoRecording": z.string().optional()
|
|
127
|
+
});
|
|
128
|
+
var CreateMeetingInputSchema = z.strictObject({
|
|
129
|
+
"topic": z.string(),
|
|
130
|
+
"startTime": z.string(),
|
|
131
|
+
"timeZone": z.string(),
|
|
132
|
+
"durationMinutes": z.number().int(),
|
|
133
|
+
"agenda": z.string().optional(),
|
|
134
|
+
"settings": MeetingSettingsInputSchema.optional()
|
|
135
|
+
});
|
|
136
|
+
var UpdateMeetingInputSchema = z.strictObject({
|
|
137
|
+
"meetingId": z.number().int(),
|
|
138
|
+
"topic": z.string().optional(),
|
|
139
|
+
"agenda": z.string().optional(),
|
|
140
|
+
"startTime": z.string().optional(),
|
|
141
|
+
"timeZone": z.string().optional(),
|
|
142
|
+
"durationMinutes": z.number().int().optional(),
|
|
143
|
+
"settings": MeetingSettingsInputSchema.optional()
|
|
144
|
+
});
|
|
145
|
+
var UpdatedMeetingSchema = z.strictObject({
|
|
146
|
+
"meetingId": z.number().int()
|
|
147
|
+
});
|
|
148
|
+
var ListPastMeetingParticipantsInputSchema = z.strictObject({
|
|
149
|
+
"meetingId": z.number().int(),
|
|
150
|
+
"pageSize": z.number().int().optional(),
|
|
151
|
+
"pageToken": z.string().optional()
|
|
152
|
+
});
|
|
153
|
+
var MeetingParticipantSchema = z.strictObject({
|
|
154
|
+
"id": z.string().optional(),
|
|
155
|
+
"name": z.string().optional(),
|
|
156
|
+
"email": z.string().optional(),
|
|
157
|
+
"joinTime": GoTimeJSONSchema.nullable().optional(),
|
|
158
|
+
"leaveTime": GoTimeJSONSchema.nullable().optional(),
|
|
159
|
+
"durationSeconds": z.number().int(),
|
|
160
|
+
"status": z.string().optional(),
|
|
161
|
+
"isInternalUser": z.boolean()
|
|
162
|
+
});
|
|
163
|
+
var ParticipantPageSchema = z.strictObject({
|
|
164
|
+
"meetingId": z.number().int(),
|
|
165
|
+
"participants": z.array(MeetingParticipantSchema).nullable(),
|
|
166
|
+
"nextPageToken": z.string().optional(),
|
|
167
|
+
"totalRecords": z.number().int()
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
// src/generated/definitions.ts
|
|
171
|
+
var ConnectorID = "zoom";
|
|
172
|
+
var ProviderID = "zoom";
|
|
173
|
+
var ListMeetingsBranch = {
|
|
174
|
+
Listed: "listed",
|
|
175
|
+
ProviderRejected: "providerRejected",
|
|
176
|
+
InvalidResponse: "invalidResponse",
|
|
177
|
+
Defect: "defect"
|
|
178
|
+
};
|
|
179
|
+
var ListMeetingsBranchListed = ListMeetingsBranch.Listed;
|
|
180
|
+
var ListMeetingsBranchProviderRejected = ListMeetingsBranch.ProviderRejected;
|
|
181
|
+
var ListMeetingsBranchInvalidResponse = ListMeetingsBranch.InvalidResponse;
|
|
182
|
+
var ListMeetingsBranchDefect = ListMeetingsBranch.Defect;
|
|
183
|
+
var ListMeetingsDefinition = {
|
|
184
|
+
operation: { connectorId: ConnectorID, operationId: "listMeetings" },
|
|
185
|
+
branches: [
|
|
186
|
+
{ id: "listed", description: "One page of the user's meetings was listed." },
|
|
187
|
+
{ id: "providerRejected", description: "Zoom conclusively rejected the listing, including a documented daily-limit 429 or a user without meeting hosting capability.", optional: true },
|
|
188
|
+
{ id: "invalidResponse", description: "Zoom returned an invalid or oversized meeting page.", optional: true },
|
|
189
|
+
{ id: "defect", description: "Local input, connection configuration, or connector definition is invalid.", optional: true }
|
|
190
|
+
],
|
|
191
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
|
|
192
|
+
};
|
|
193
|
+
var ListMeetingsMetadata = { kind: "query", idempotency: "none", authorization: "required" };
|
|
194
|
+
var GetMeetingBranch = {
|
|
195
|
+
Found: "found",
|
|
196
|
+
NotFound: "notFound",
|
|
197
|
+
ProviderRejected: "providerRejected",
|
|
198
|
+
InvalidResponse: "invalidResponse",
|
|
199
|
+
Defect: "defect"
|
|
200
|
+
};
|
|
201
|
+
var GetMeetingBranchFound = GetMeetingBranch.Found;
|
|
202
|
+
var GetMeetingBranchNotFound = GetMeetingBranch.NotFound;
|
|
203
|
+
var GetMeetingBranchProviderRejected = GetMeetingBranch.ProviderRejected;
|
|
204
|
+
var GetMeetingBranchInvalidResponse = GetMeetingBranch.InvalidResponse;
|
|
205
|
+
var GetMeetingBranchDefect = GetMeetingBranch.Defect;
|
|
206
|
+
var GetMeetingDefinition = {
|
|
207
|
+
operation: { connectorId: ConnectorID, operationId: "getMeeting" },
|
|
208
|
+
branches: [
|
|
209
|
+
{ id: "found", description: "The meeting was read." },
|
|
210
|
+
{ id: "notFound", description: "The meeting does not exist or was deleted.", optional: true },
|
|
211
|
+
{ id: "providerRejected", description: "Zoom conclusively rejected the meeting read, including a documented daily-limit 429.", optional: true },
|
|
212
|
+
{ id: "invalidResponse", description: "Zoom returned an invalid or oversized meeting.", optional: true },
|
|
213
|
+
{ id: "defect", description: "Local input, connection configuration, or connector definition is invalid.", optional: true }
|
|
214
|
+
],
|
|
215
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
|
|
216
|
+
};
|
|
217
|
+
var GetMeetingMetadata = { kind: "query", idempotency: "none", authorization: "required" };
|
|
218
|
+
var CreateMeetingBranch = {
|
|
219
|
+
Created: "created",
|
|
220
|
+
ProviderRejected: "providerRejected",
|
|
221
|
+
Uncertain: "uncertain",
|
|
222
|
+
Defect: "defect"
|
|
223
|
+
};
|
|
224
|
+
var CreateMeetingBranchCreated = CreateMeetingBranch.Created;
|
|
225
|
+
var CreateMeetingBranchProviderRejected = CreateMeetingBranch.ProviderRejected;
|
|
226
|
+
var CreateMeetingBranchUncertain = CreateMeetingBranch.Uncertain;
|
|
227
|
+
var CreateMeetingBranchDefect = CreateMeetingBranch.Defect;
|
|
228
|
+
var CreateMeetingDefinition = {
|
|
229
|
+
operation: { connectorId: ConnectorID, operationId: "createMeeting" },
|
|
230
|
+
branches: [
|
|
231
|
+
{ id: "created", description: "Zoom created the meeting and returned its ID and join URL." },
|
|
232
|
+
{ 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 },
|
|
233
|
+
{ 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 },
|
|
234
|
+
{ id: "defect", description: "Local input, connection configuration, or connector definition is invalid.", optional: true }
|
|
235
|
+
],
|
|
236
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "sync", executeRetry: { initialIntervalMs: 1e3, backoffCoefficient: 2, maximumIntervalMs: 3e4, maximumAttempts: 5, totalDurationMs: 12e4 } },
|
|
237
|
+
repeatOnUnknown: "limited",
|
|
238
|
+
maxSends: 3
|
|
239
|
+
};
|
|
240
|
+
var CreateMeetingMetadata = { kind: "mutation", idempotency: "required", authorization: "required" };
|
|
241
|
+
var UpdateMeetingBranch = {
|
|
242
|
+
Updated: "updated",
|
|
243
|
+
NotFound: "notFound",
|
|
244
|
+
ProviderRejected: "providerRejected",
|
|
245
|
+
Defect: "defect"
|
|
246
|
+
};
|
|
247
|
+
var UpdateMeetingBranchUpdated = UpdateMeetingBranch.Updated;
|
|
248
|
+
var UpdateMeetingBranchNotFound = UpdateMeetingBranch.NotFound;
|
|
249
|
+
var UpdateMeetingBranchProviderRejected = UpdateMeetingBranch.ProviderRejected;
|
|
250
|
+
var UpdateMeetingBranchDefect = UpdateMeetingBranch.Defect;
|
|
251
|
+
var UpdateMeetingDefinition = {
|
|
252
|
+
operation: { connectorId: ConnectorID, operationId: "updateMeeting" },
|
|
253
|
+
branches: [
|
|
254
|
+
{ id: "updated", description: "Zoom accepted the patch." },
|
|
255
|
+
{ id: "notFound", description: "The meeting does not exist or was deleted.", optional: true },
|
|
256
|
+
{ id: "providerRejected", description: "Zoom conclusively rejected the patch, including a documented daily-limit 429 or an invalid field value.", optional: true },
|
|
257
|
+
{ id: "defect", description: "Local input, connection configuration, or connector definition is invalid.", optional: true }
|
|
258
|
+
],
|
|
259
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" },
|
|
260
|
+
repeatOnUnknown: "safe"
|
|
261
|
+
};
|
|
262
|
+
var UpdateMeetingMetadata = { kind: "mutation", idempotency: "required", authorization: "required" };
|
|
263
|
+
var ListPastMeetingParticipantsBranch = {
|
|
264
|
+
Listed: "listed",
|
|
265
|
+
NotFound: "notFound",
|
|
266
|
+
ProviderRejected: "providerRejected",
|
|
267
|
+
InvalidResponse: "invalidResponse",
|
|
268
|
+
Defect: "defect"
|
|
269
|
+
};
|
|
270
|
+
var ListPastMeetingParticipantsBranchListed = ListPastMeetingParticipantsBranch.Listed;
|
|
271
|
+
var ListPastMeetingParticipantsBranchNotFound = ListPastMeetingParticipantsBranch.NotFound;
|
|
272
|
+
var ListPastMeetingParticipantsBranchProviderRejected = ListPastMeetingParticipantsBranch.ProviderRejected;
|
|
273
|
+
var ListPastMeetingParticipantsBranchInvalidResponse = ListPastMeetingParticipantsBranch.InvalidResponse;
|
|
274
|
+
var ListPastMeetingParticipantsBranchDefect = ListPastMeetingParticipantsBranch.Defect;
|
|
275
|
+
var ListPastMeetingParticipantsDefinition = {
|
|
276
|
+
operation: { connectorId: ConnectorID, operationId: "listPastMeetingParticipants" },
|
|
277
|
+
branches: [
|
|
278
|
+
{ id: "listed", description: "One page of participants was listed." },
|
|
279
|
+
{ id: "notFound", description: "Zoom has no ended instance of the meeting.", optional: true },
|
|
280
|
+
{ 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 },
|
|
281
|
+
{ id: "invalidResponse", description: "Zoom returned an invalid or oversized participant page.", optional: true },
|
|
282
|
+
{ id: "defect", description: "Local input, connection configuration, or connector definition is invalid.", optional: true }
|
|
283
|
+
],
|
|
284
|
+
stepDefaults: { executeMethodTimeoutMs: 3e4, executeDurability: "async" }
|
|
285
|
+
};
|
|
286
|
+
var ListPastMeetingParticipantsMetadata = { kind: "query", idempotency: "none", authorization: "required" };
|
|
287
|
+
|
|
288
|
+
// src/generated/connection.ts
|
|
289
|
+
import { ConnectionRefSchema } from "@superdurable/connectors-sdk";
|
|
290
|
+
import { newRefreshingCredentialProvider } from "@superdurable/connectors-sdk/projectconfig";
|
|
291
|
+
var Connection = class {
|
|
292
|
+
/** Stable provider and connection name. */
|
|
293
|
+
reference;
|
|
294
|
+
/** Bound provider operations. */
|
|
295
|
+
operations;
|
|
296
|
+
/** Validate a reference and bind operations. */
|
|
297
|
+
constructor(reference, operations) {
|
|
298
|
+
this.reference = ConnectionRefSchema.parse(reference);
|
|
299
|
+
if (this.reference.provider !== ProviderID) throw new TypeError("connection provider differs from the manifest");
|
|
300
|
+
if (!operations) throw new TypeError("connector operations are required");
|
|
301
|
+
this.operations = operations;
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
function newConnection(client, reference) {
|
|
305
|
+
if (!client) throw new TypeError("connector client is required");
|
|
306
|
+
return new Connection(reference, client);
|
|
307
|
+
}
|
|
308
|
+
function newConnectionWithOperations(operations, reference) {
|
|
309
|
+
return new Connection(reference, operations);
|
|
310
|
+
}
|
|
311
|
+
function newProjectConnection(project, connectionName, createClient) {
|
|
312
|
+
if (!project) throw new TypeError("loaded project is required");
|
|
313
|
+
const reference = ConnectionRefSchema.parse({ provider: ProviderID, name: connectionName });
|
|
314
|
+
const selected = project.configuration.connections.find((entry) => entry.connectorId === ConnectorID && entry.connectionName === connectionName);
|
|
315
|
+
if (!selected || selected.provider !== ProviderID) throw new TypeError("project connection is not configured");
|
|
316
|
+
return newConnection(createClient(project, connectionName), reference);
|
|
317
|
+
}
|
|
318
|
+
function newProjectCredentialProvider(project, connectionName, decode, encode, decodeShared) {
|
|
319
|
+
return newRefreshingCredentialProvider(project.connections, { connectorId: ConnectorID, connectionName }, decode, encode, decodeShared);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
export {
|
|
323
|
+
ConfigSchema,
|
|
324
|
+
decodeCredentials,
|
|
325
|
+
decodeSharedCredentials,
|
|
326
|
+
ListMeetingsInputSchema,
|
|
327
|
+
MeetingSummarySchema,
|
|
328
|
+
MeetingPageSchema,
|
|
329
|
+
GetMeetingInputSchema,
|
|
330
|
+
MeetingSettingsSchema,
|
|
331
|
+
MeetingSchema,
|
|
332
|
+
MeetingSettingsInputSchema,
|
|
333
|
+
CreateMeetingInputSchema,
|
|
334
|
+
UpdateMeetingInputSchema,
|
|
335
|
+
UpdatedMeetingSchema,
|
|
336
|
+
ListPastMeetingParticipantsInputSchema,
|
|
337
|
+
MeetingParticipantSchema,
|
|
338
|
+
ParticipantPageSchema,
|
|
339
|
+
ConnectorID,
|
|
340
|
+
ProviderID,
|
|
341
|
+
ListMeetingsBranch,
|
|
342
|
+
ListMeetingsBranchListed,
|
|
343
|
+
ListMeetingsBranchProviderRejected,
|
|
344
|
+
ListMeetingsBranchInvalidResponse,
|
|
345
|
+
ListMeetingsBranchDefect,
|
|
346
|
+
ListMeetingsDefinition,
|
|
347
|
+
ListMeetingsMetadata,
|
|
348
|
+
GetMeetingBranch,
|
|
349
|
+
GetMeetingBranchFound,
|
|
350
|
+
GetMeetingBranchNotFound,
|
|
351
|
+
GetMeetingBranchProviderRejected,
|
|
352
|
+
GetMeetingBranchInvalidResponse,
|
|
353
|
+
GetMeetingBranchDefect,
|
|
354
|
+
GetMeetingDefinition,
|
|
355
|
+
GetMeetingMetadata,
|
|
356
|
+
CreateMeetingBranch,
|
|
357
|
+
CreateMeetingBranchCreated,
|
|
358
|
+
CreateMeetingBranchProviderRejected,
|
|
359
|
+
CreateMeetingBranchUncertain,
|
|
360
|
+
CreateMeetingBranchDefect,
|
|
361
|
+
CreateMeetingDefinition,
|
|
362
|
+
CreateMeetingMetadata,
|
|
363
|
+
UpdateMeetingBranch,
|
|
364
|
+
UpdateMeetingBranchUpdated,
|
|
365
|
+
UpdateMeetingBranchNotFound,
|
|
366
|
+
UpdateMeetingBranchProviderRejected,
|
|
367
|
+
UpdateMeetingBranchDefect,
|
|
368
|
+
UpdateMeetingDefinition,
|
|
369
|
+
UpdateMeetingMetadata,
|
|
370
|
+
ListPastMeetingParticipantsBranch,
|
|
371
|
+
ListPastMeetingParticipantsBranchListed,
|
|
372
|
+
ListPastMeetingParticipantsBranchNotFound,
|
|
373
|
+
ListPastMeetingParticipantsBranchProviderRejected,
|
|
374
|
+
ListPastMeetingParticipantsBranchInvalidResponse,
|
|
375
|
+
ListPastMeetingParticipantsBranchDefect,
|
|
376
|
+
ListPastMeetingParticipantsDefinition,
|
|
377
|
+
ListPastMeetingParticipantsMetadata,
|
|
378
|
+
Connection,
|
|
379
|
+
newConnection,
|
|
380
|
+
newConnectionWithOperations,
|
|
381
|
+
newProjectConnection,
|
|
382
|
+
newProjectCredentialProvider
|
|
383
|
+
};
|