@rstreamlabs/tunnels 3.2.1 → 3.5.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/README.md +17 -1
- package/dist/chunk-6OUCIT5G.mjs +1330 -0
- package/dist/index.d.mts +2918 -83
- package/dist/index.d.ts +2918 -83
- package/dist/index.js +862 -165
- package/dist/index.mjs +109 -3
- package/dist/openapi.d.mts +4 -1
- package/dist/openapi.d.ts +4 -1
- package/dist/openapi.js +479 -58
- package/dist/openapi.mjs +1 -1
- package/package.json +5 -5
- package/dist/chunk-VUAM3LRU.mjs +0 -710
package/dist/index.mjs
CHANGED
|
@@ -1,23 +1,54 @@
|
|
|
1
1
|
import {
|
|
2
|
+
RstreamWebTTYResource,
|
|
3
|
+
attachWebTTYParticipantParamsSchema,
|
|
2
4
|
clientFilterSchema,
|
|
3
5
|
clientSchema,
|
|
6
|
+
createWebTTYControlRequestParamsSchema,
|
|
7
|
+
detachWebTTYParticipantParamsSchema,
|
|
4
8
|
engineOpenApiDocument,
|
|
5
9
|
engineOpenApiJson,
|
|
6
10
|
eventSchema,
|
|
11
|
+
formatStreamAccessPath,
|
|
7
12
|
formatTunnelHost,
|
|
8
13
|
listClientsParamsSchema,
|
|
9
14
|
listClientsResponseSchema,
|
|
10
15
|
listTunnelsParamsSchema,
|
|
11
16
|
listTunnelsResponseSchema,
|
|
17
|
+
listWebTTYControlRequestsParamsSchema,
|
|
18
|
+
listWebTTYKeyGrantDecryptMaterialParamsSchema,
|
|
19
|
+
listWebTTYSessionGroupsParamsSchema,
|
|
20
|
+
listWebTTYSessionsParamsSchema,
|
|
12
21
|
projectLogEventsSchema,
|
|
22
|
+
readWebTTYSessionEventsParamsSchema,
|
|
23
|
+
resolveWebTTYControlRequestParamsSchema,
|
|
13
24
|
streamEndpointSchema,
|
|
25
|
+
streamEntrySchema,
|
|
14
26
|
streamSummaryEventSchema,
|
|
15
27
|
streamSummarySchema,
|
|
16
28
|
streamTLSInfoSchema,
|
|
29
|
+
streamWebTTYMetadataSchema,
|
|
17
30
|
tunnelFilterSchema,
|
|
31
|
+
webTTYCapabilitiesSchema,
|
|
32
|
+
webTTYContextMetadataSchema,
|
|
33
|
+
webTTYControlRequestSchema,
|
|
34
|
+
webTTYCryptoMetadataSchema,
|
|
35
|
+
webTTYEncryptionModeSchema,
|
|
36
|
+
webTTYKeyGrantDecryptMaterialSchema,
|
|
37
|
+
webTTYKeyGrantSchema,
|
|
38
|
+
webTTYOriginSchema,
|
|
39
|
+
webTTYParticipantLiveSchema,
|
|
40
|
+
webTTYParticipantRoleSchema,
|
|
41
|
+
webTTYParticipantSchema,
|
|
42
|
+
webTTYRecordingModeSchema,
|
|
43
|
+
webTTYSessionEventSchema,
|
|
44
|
+
webTTYSessionGroupSchema,
|
|
45
|
+
webTTYSessionLiveSchema,
|
|
46
|
+
webTTYSessionModeSchema,
|
|
47
|
+
webTTYSessionSchema,
|
|
48
|
+
webTTYTransportSchema,
|
|
18
49
|
webhookEventsSchema,
|
|
19
50
|
wsEventsSchema
|
|
20
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-6OUCIT5G.mjs";
|
|
21
52
|
|
|
22
53
|
// src/auth-resource.ts
|
|
23
54
|
import { createAuthTokenParamsSchema } from "@rstreamlabs/rstream/auth-token";
|
|
@@ -985,6 +1016,9 @@ var RstreamTunnelsClient = class {
|
|
|
985
1016
|
get webhooks() {
|
|
986
1017
|
return new RstreamWebhookResource();
|
|
987
1018
|
}
|
|
1019
|
+
get webtty() {
|
|
1020
|
+
return new RstreamWebTTYResource(this);
|
|
1021
|
+
}
|
|
988
1022
|
get turn() {
|
|
989
1023
|
return new RstreamTURNResource(this);
|
|
990
1024
|
}
|
|
@@ -1210,10 +1244,30 @@ var osFamilySchema = z2.enum([
|
|
|
1210
1244
|
]);
|
|
1211
1245
|
var webttyCapabilitySchema = z2.enum(["exec", "fs"]);
|
|
1212
1246
|
var webttyFSModeSchema = z2.enum(["read-write", "read-only"]);
|
|
1247
|
+
var webttyEncryptionPolicySchema = z2.enum([
|
|
1248
|
+
"disabled",
|
|
1249
|
+
"explicit_key",
|
|
1250
|
+
"workspace_managed"
|
|
1251
|
+
]);
|
|
1213
1252
|
var webttyServerSchema = z2.object({
|
|
1214
1253
|
tunnel_id: z2.string(),
|
|
1254
|
+
tunnel_name: z2.string().optional(),
|
|
1255
|
+
target: z2.string().optional(),
|
|
1256
|
+
rstream_url: z2.string().optional(),
|
|
1257
|
+
status: z2.string().optional(),
|
|
1258
|
+
publish: z2.boolean().optional(),
|
|
1259
|
+
workspace_id: z2.string().optional(),
|
|
1260
|
+
project_id: z2.string().optional(),
|
|
1261
|
+
tunnel_protocol: z2.enum(["http", "webtty"]),
|
|
1262
|
+
managed: z2.boolean(),
|
|
1215
1263
|
host: z2.string(),
|
|
1216
1264
|
token_auth: z2.boolean(),
|
|
1265
|
+
server_id: z2.string().optional(),
|
|
1266
|
+
server_name: z2.string().optional(),
|
|
1267
|
+
host_key_id: z2.string().optional(),
|
|
1268
|
+
e2e: z2.enum(["disabled", "required"]).optional(),
|
|
1269
|
+
client_proof: z2.enum(["none", "required"]).optional(),
|
|
1270
|
+
encryption_policy: webttyEncryptionPolicySchema.optional(),
|
|
1217
1271
|
capabilities: z2.array(webttyCapabilitySchema).optional(),
|
|
1218
1272
|
exec_path: z2.string().optional(),
|
|
1219
1273
|
fs_path: z2.string().optional(),
|
|
@@ -1247,9 +1301,10 @@ function webTTYHasCapability(capabilities, capability) {
|
|
|
1247
1301
|
function parser(tunnel) {
|
|
1248
1302
|
if (tunnel.status !== "online") return null;
|
|
1249
1303
|
if (tunnel.publish !== true) return null;
|
|
1250
|
-
|
|
1304
|
+
const managedProtocol = tunnel.protocol === "webtty";
|
|
1305
|
+
if (tunnel.protocol !== "http" && !managedProtocol) return null;
|
|
1251
1306
|
const tunnelLabels = tunnel.labels ?? {};
|
|
1252
|
-
if (tunnelLabels["application-protocol"] !== "rstream.webtty") {
|
|
1307
|
+
if (!managedProtocol && tunnelLabels["application-protocol"] !== "rstream.webtty") {
|
|
1253
1308
|
return null;
|
|
1254
1309
|
}
|
|
1255
1310
|
const capabilities = webTTYCapabilitiesForLabels(tunnelLabels);
|
|
@@ -1260,10 +1315,30 @@ function parser(tunnel) {
|
|
|
1260
1315
|
if (labelKey.length === 0) continue;
|
|
1261
1316
|
labels[labelKey] = value;
|
|
1262
1317
|
}
|
|
1318
|
+
const name = (tunnel.name ?? "").trim();
|
|
1319
|
+
const serverId = (tunnelLabels["rstream.webtty.server_id"] ?? "").trim();
|
|
1320
|
+
const serverName = (tunnelLabels["rstream.webtty.server_name"] ?? "").trim();
|
|
1321
|
+
const target = serverName || name || tunnel.id;
|
|
1322
|
+
const rstreamTarget = serverId || name || tunnel.id;
|
|
1263
1323
|
const candidate = {
|
|
1264
1324
|
tunnel_id: tunnel.id,
|
|
1325
|
+
tunnel_name: name || void 0,
|
|
1326
|
+
target,
|
|
1327
|
+
rstream_url: `rstrm://${rstreamTarget}`,
|
|
1328
|
+
status: tunnel.status,
|
|
1329
|
+
publish: tunnel.publish === true,
|
|
1330
|
+
workspace_id: tunnel.workspace_id,
|
|
1331
|
+
project_id: tunnel.project_id,
|
|
1332
|
+
tunnel_protocol: tunnel.protocol,
|
|
1333
|
+
managed: managedProtocol,
|
|
1265
1334
|
host: formatTunnelHost(tunnel),
|
|
1266
1335
|
token_auth: tunnel.token_auth === true,
|
|
1336
|
+
server_id: serverId || void 0,
|
|
1337
|
+
server_name: serverName || void 0,
|
|
1338
|
+
host_key_id: tunnelLabels["rstream.webtty.host_key_id"],
|
|
1339
|
+
e2e: tunnelLabels["rstream.webtty.e2e"],
|
|
1340
|
+
client_proof: tunnelLabels["rstream.webtty.client_proof"],
|
|
1341
|
+
encryption_policy: tunnelLabels["rstream.webtty.encryption_policy"],
|
|
1267
1342
|
capabilities,
|
|
1268
1343
|
exec_path: webTTYHasCapability(capabilities, "exec") ? tunnelLabels["rstream.webtty.exec.path"] ?? "/" : void 0,
|
|
1269
1344
|
fs_path: webTTYHasCapability(capabilities, "fs") ? tunnelLabels["rstream.webtty.fs.path"] ?? "/fs" : void 0,
|
|
@@ -1295,6 +1370,7 @@ export {
|
|
|
1295
1370
|
RstreamTunnelsClient,
|
|
1296
1371
|
RstreamTunnelsResource,
|
|
1297
1372
|
RstreamTunnelsResource as RstreamTunnelsRessource,
|
|
1373
|
+
RstreamWebTTYResource,
|
|
1298
1374
|
RstreamWebhookResource,
|
|
1299
1375
|
RstreamWebhookResource as RstreamWebhookRessource,
|
|
1300
1376
|
RstreamTunnelsClient as Tunnels,
|
|
@@ -1304,6 +1380,7 @@ export {
|
|
|
1304
1380
|
WEBHOOK_ID_HEADER,
|
|
1305
1381
|
WEBHOOK_SIGNATURE_HEADER,
|
|
1306
1382
|
Watch,
|
|
1383
|
+
attachWebTTYParticipantParamsSchema,
|
|
1307
1384
|
buildWebhookHeaders,
|
|
1308
1385
|
clientFilterSchema,
|
|
1309
1386
|
clientSchema,
|
|
@@ -1312,30 +1389,59 @@ export {
|
|
|
1312
1389
|
createAuthTokenFromClientCredentials,
|
|
1313
1390
|
createPATTURNCredentials,
|
|
1314
1391
|
createTURNCredentials,
|
|
1392
|
+
createWebTTYControlRequestParamsSchema,
|
|
1393
|
+
detachWebTTYParticipantParamsSchema,
|
|
1315
1394
|
engineOpenApiDocument,
|
|
1316
1395
|
engineOpenApiJson,
|
|
1317
1396
|
eventSchema,
|
|
1397
|
+
formatStreamAccessPath,
|
|
1318
1398
|
formatTunnelHost,
|
|
1319
1399
|
generateWebhookSigningSecret,
|
|
1320
1400
|
listClientsParamsSchema,
|
|
1321
1401
|
listClientsResponseSchema,
|
|
1322
1402
|
listTunnelsParamsSchema,
|
|
1323
1403
|
listTunnelsResponseSchema,
|
|
1404
|
+
listWebTTYControlRequestsParamsSchema,
|
|
1405
|
+
listWebTTYKeyGrantDecryptMaterialParamsSchema,
|
|
1406
|
+
listWebTTYSessionGroupsParamsSchema,
|
|
1407
|
+
listWebTTYSessionsParamsSchema,
|
|
1324
1408
|
normalizeEngineAddress,
|
|
1325
1409
|
parseWebTTYServers,
|
|
1326
1410
|
projectLogEventsSchema,
|
|
1411
|
+
readWebTTYSessionEventsParamsSchema,
|
|
1327
1412
|
resolveControlPlaneCredentials,
|
|
1328
1413
|
resolveManagedTunnelsProject,
|
|
1329
1414
|
resolveTunnelsAPIURL,
|
|
1330
1415
|
resolveTunnelsCredentials,
|
|
1331
1416
|
resolveTunnelsEngine,
|
|
1417
|
+
resolveWebTTYControlRequestParamsSchema,
|
|
1332
1418
|
signWebhookPayload,
|
|
1333
1419
|
streamEndpointSchema,
|
|
1420
|
+
streamEntrySchema,
|
|
1334
1421
|
streamSummaryEventSchema,
|
|
1335
1422
|
streamSummarySchema,
|
|
1336
1423
|
streamTLSInfoSchema,
|
|
1424
|
+
streamWebTTYMetadataSchema,
|
|
1337
1425
|
tunnelFilterSchema,
|
|
1338
1426
|
turnCredentialModeSchema,
|
|
1427
|
+
webTTYCapabilitiesSchema,
|
|
1428
|
+
webTTYContextMetadataSchema,
|
|
1429
|
+
webTTYControlRequestSchema,
|
|
1430
|
+
webTTYCryptoMetadataSchema,
|
|
1431
|
+
webTTYEncryptionModeSchema,
|
|
1432
|
+
webTTYKeyGrantDecryptMaterialSchema,
|
|
1433
|
+
webTTYKeyGrantSchema,
|
|
1434
|
+
webTTYOriginSchema,
|
|
1435
|
+
webTTYParticipantLiveSchema,
|
|
1436
|
+
webTTYParticipantRoleSchema,
|
|
1437
|
+
webTTYParticipantSchema,
|
|
1438
|
+
webTTYRecordingModeSchema,
|
|
1439
|
+
webTTYSessionEventSchema,
|
|
1440
|
+
webTTYSessionGroupSchema,
|
|
1441
|
+
webTTYSessionLiveSchema,
|
|
1442
|
+
webTTYSessionModeSchema,
|
|
1443
|
+
webTTYSessionSchema,
|
|
1444
|
+
webTTYTransportSchema,
|
|
1339
1445
|
webhookEventsSchema,
|
|
1340
1446
|
webttyServerSchema,
|
|
1341
1447
|
wsEventsSchema
|
package/dist/openapi.d.mts
CHANGED
|
@@ -116,7 +116,10 @@ declare const engineOpenApiDocument: {
|
|
|
116
116
|
"inspect-engine-state": string[];
|
|
117
117
|
"expose-service-from-cli": string[];
|
|
118
118
|
"connect-private-tunnel": string[];
|
|
119
|
-
"
|
|
119
|
+
"run-tunnel-webtty": string[];
|
|
120
|
+
"join-managed-webtty": string[];
|
|
121
|
+
"control-managed-webtty": string[];
|
|
122
|
+
"read-managed-webtty-recordings": string[];
|
|
120
123
|
};
|
|
121
124
|
paths: {
|
|
122
125
|
"/api/openapi.json": {
|
package/dist/openapi.d.ts
CHANGED
|
@@ -116,7 +116,10 @@ declare const engineOpenApiDocument: {
|
|
|
116
116
|
"inspect-engine-state": string[];
|
|
117
117
|
"expose-service-from-cli": string[];
|
|
118
118
|
"connect-private-tunnel": string[];
|
|
119
|
-
"
|
|
119
|
+
"run-tunnel-webtty": string[];
|
|
120
|
+
"join-managed-webtty": string[];
|
|
121
|
+
"control-managed-webtty": string[];
|
|
122
|
+
"read-managed-webtty-recordings": string[];
|
|
120
123
|
};
|
|
121
124
|
paths: {
|
|
122
125
|
"/api/openapi.json": {
|