@rstreamlabs/rstream 1.2.0 → 1.3.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/dist/index.d.mts +2171 -948
- package/dist/index.d.ts +2171 -948
- package/dist/index.js +35 -19
- package/dist/index.mjs +35 -19
- package/package.json +8 -7
package/dist/index.js
CHANGED
|
@@ -140,20 +140,35 @@ function select(base) {
|
|
|
140
140
|
// src/tunnel.ts
|
|
141
141
|
var z2 = __toESM(require("zod"));
|
|
142
142
|
var tunnelSchema = z2.object({
|
|
143
|
-
|
|
144
|
-
client_id: z2.string(),
|
|
145
|
-
user_id: z2.string(),
|
|
146
|
-
status: z2.enum(["online", "offline"]),
|
|
143
|
+
// common properties
|
|
144
|
+
client_id: z2.string().optional(),
|
|
145
|
+
user_id: z2.string().optional(),
|
|
146
|
+
status: z2.enum(["online", "offline"]).optional(),
|
|
147
|
+
// tunnel properties
|
|
148
|
+
id: z2.string().optional(),
|
|
147
149
|
name: z2.string().optional(),
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
150
|
+
creation_date: z2.date().optional(),
|
|
151
|
+
type: z2.enum(["bytestream", "datagram"]).optional(),
|
|
152
|
+
publish: z2.boolean().optional(),
|
|
153
|
+
protocol: z2.enum(["tls", "dtls", "quic", "http"]).optional(),
|
|
154
|
+
labels: z2.record(z2.string(), z2.string().optional()).optional(),
|
|
155
|
+
geo_ip: z2.array(z2.string()).optional(),
|
|
156
|
+
trusted_ips: z2.array(z2.string()).optional(),
|
|
151
157
|
host: z2.string().optional(),
|
|
152
|
-
tls_mode: z2.
|
|
158
|
+
tls_mode: z2.enum(["passthrough", "terminated"]).optional(),
|
|
159
|
+
tls_alpns: z2.array(z2.string()).optional(),
|
|
153
160
|
tls_min_version: z2.string().optional(),
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
161
|
+
tls_ciphers: z2.array(z2.string()).optional(),
|
|
162
|
+
mtls: z2.boolean().optional(),
|
|
163
|
+
mtls_ca_cert_pem: z2.string().optional(),
|
|
164
|
+
http_version: z2.enum(["http/1.1", "h2c", "h3"]).optional(),
|
|
165
|
+
http_use_tls: z2.boolean().optional(),
|
|
166
|
+
token_auth: z2.boolean().optional(),
|
|
167
|
+
sso: z2.boolean().optional(),
|
|
168
|
+
sso_providers: z2.array(z2.string()).optional(),
|
|
169
|
+
email_whitelist: z2.array(z2.string()).optional(),
|
|
170
|
+
email_blacklist: z2.array(z2.string()).optional(),
|
|
171
|
+
challenge: z2.boolean().optional()
|
|
157
172
|
});
|
|
158
173
|
var listTunnelsParamsSchema = z2.object({
|
|
159
174
|
limit: z2.number().optional(),
|
|
@@ -165,9 +180,7 @@ var listTunnelsParamsSchema = z2.object({
|
|
|
165
180
|
labels: true
|
|
166
181
|
}).partial().optional()
|
|
167
182
|
});
|
|
168
|
-
var listTunnelsResponseSchema = z2.
|
|
169
|
-
tunnels: z2.array(tunnelSchema)
|
|
170
|
-
});
|
|
183
|
+
var listTunnelsResponseSchema = z2.array(tunnelSchema);
|
|
171
184
|
|
|
172
185
|
// src/auth.ts
|
|
173
186
|
var z3 = __toESM(require("zod"));
|
|
@@ -186,7 +199,12 @@ var createShortTermTokenParamsSchema = z3.object({
|
|
|
186
199
|
connect: z3.union([
|
|
187
200
|
z3.boolean(),
|
|
188
201
|
z3.object({
|
|
189
|
-
filters: filters(tunnelSchema).optional()
|
|
202
|
+
filters: filters(tunnelSchema).optional(),
|
|
203
|
+
params: filters(
|
|
204
|
+
z3.object({
|
|
205
|
+
path: z3.string().optional()
|
|
206
|
+
})
|
|
207
|
+
).optional()
|
|
190
208
|
})
|
|
191
209
|
]).optional(),
|
|
192
210
|
// Permissions for listing tunnels
|
|
@@ -233,7 +251,7 @@ var clientSchema = z4.object({
|
|
|
233
251
|
version: z4.string().optional(),
|
|
234
252
|
protocol_version: z4.string().optional()
|
|
235
253
|
}).optional(),
|
|
236
|
-
labels: z4.record(z4.string().optional()).optional()
|
|
254
|
+
labels: z4.record(z4.string(), z4.string().optional()).optional()
|
|
237
255
|
});
|
|
238
256
|
var listClientsParamsSchema = z4.object({
|
|
239
257
|
limit: z4.number().optional(),
|
|
@@ -241,9 +259,7 @@ var listClientsParamsSchema = z4.object({
|
|
|
241
259
|
labels: true
|
|
242
260
|
}).partial().optional()
|
|
243
261
|
});
|
|
244
|
-
var listClientsResponseSchema = z4.
|
|
245
|
-
clients: z4.array(clientSchema)
|
|
246
|
-
});
|
|
262
|
+
var listClientsResponseSchema = z4.array(clientSchema);
|
|
247
263
|
|
|
248
264
|
// src/clients-ressource.ts
|
|
249
265
|
var RstreamClientsRessource = class {
|
package/dist/index.mjs
CHANGED
|
@@ -88,20 +88,35 @@ function select(base) {
|
|
|
88
88
|
// src/tunnel.ts
|
|
89
89
|
import * as z2 from "zod";
|
|
90
90
|
var tunnelSchema = z2.object({
|
|
91
|
-
|
|
92
|
-
client_id: z2.string(),
|
|
93
|
-
user_id: z2.string(),
|
|
94
|
-
status: z2.enum(["online", "offline"]),
|
|
91
|
+
// common properties
|
|
92
|
+
client_id: z2.string().optional(),
|
|
93
|
+
user_id: z2.string().optional(),
|
|
94
|
+
status: z2.enum(["online", "offline"]).optional(),
|
|
95
|
+
// tunnel properties
|
|
96
|
+
id: z2.string().optional(),
|
|
95
97
|
name: z2.string().optional(),
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
98
|
+
creation_date: z2.date().optional(),
|
|
99
|
+
type: z2.enum(["bytestream", "datagram"]).optional(),
|
|
100
|
+
publish: z2.boolean().optional(),
|
|
101
|
+
protocol: z2.enum(["tls", "dtls", "quic", "http"]).optional(),
|
|
102
|
+
labels: z2.record(z2.string(), z2.string().optional()).optional(),
|
|
103
|
+
geo_ip: z2.array(z2.string()).optional(),
|
|
104
|
+
trusted_ips: z2.array(z2.string()).optional(),
|
|
99
105
|
host: z2.string().optional(),
|
|
100
|
-
tls_mode: z2.
|
|
106
|
+
tls_mode: z2.enum(["passthrough", "terminated"]).optional(),
|
|
107
|
+
tls_alpns: z2.array(z2.string()).optional(),
|
|
101
108
|
tls_min_version: z2.string().optional(),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
109
|
+
tls_ciphers: z2.array(z2.string()).optional(),
|
|
110
|
+
mtls: z2.boolean().optional(),
|
|
111
|
+
mtls_ca_cert_pem: z2.string().optional(),
|
|
112
|
+
http_version: z2.enum(["http/1.1", "h2c", "h3"]).optional(),
|
|
113
|
+
http_use_tls: z2.boolean().optional(),
|
|
114
|
+
token_auth: z2.boolean().optional(),
|
|
115
|
+
sso: z2.boolean().optional(),
|
|
116
|
+
sso_providers: z2.array(z2.string()).optional(),
|
|
117
|
+
email_whitelist: z2.array(z2.string()).optional(),
|
|
118
|
+
email_blacklist: z2.array(z2.string()).optional(),
|
|
119
|
+
challenge: z2.boolean().optional()
|
|
105
120
|
});
|
|
106
121
|
var listTunnelsParamsSchema = z2.object({
|
|
107
122
|
limit: z2.number().optional(),
|
|
@@ -113,9 +128,7 @@ var listTunnelsParamsSchema = z2.object({
|
|
|
113
128
|
labels: true
|
|
114
129
|
}).partial().optional()
|
|
115
130
|
});
|
|
116
|
-
var listTunnelsResponseSchema = z2.
|
|
117
|
-
tunnels: z2.array(tunnelSchema)
|
|
118
|
-
});
|
|
131
|
+
var listTunnelsResponseSchema = z2.array(tunnelSchema);
|
|
119
132
|
|
|
120
133
|
// src/auth.ts
|
|
121
134
|
import * as z3 from "zod";
|
|
@@ -134,7 +147,12 @@ var createShortTermTokenParamsSchema = z3.object({
|
|
|
134
147
|
connect: z3.union([
|
|
135
148
|
z3.boolean(),
|
|
136
149
|
z3.object({
|
|
137
|
-
filters: filters(tunnelSchema).optional()
|
|
150
|
+
filters: filters(tunnelSchema).optional(),
|
|
151
|
+
params: filters(
|
|
152
|
+
z3.object({
|
|
153
|
+
path: z3.string().optional()
|
|
154
|
+
})
|
|
155
|
+
).optional()
|
|
138
156
|
})
|
|
139
157
|
]).optional(),
|
|
140
158
|
// Permissions for listing tunnels
|
|
@@ -181,7 +199,7 @@ var clientSchema = z4.object({
|
|
|
181
199
|
version: z4.string().optional(),
|
|
182
200
|
protocol_version: z4.string().optional()
|
|
183
201
|
}).optional(),
|
|
184
|
-
labels: z4.record(z4.string().optional()).optional()
|
|
202
|
+
labels: z4.record(z4.string(), z4.string().optional()).optional()
|
|
185
203
|
});
|
|
186
204
|
var listClientsParamsSchema = z4.object({
|
|
187
205
|
limit: z4.number().optional(),
|
|
@@ -189,9 +207,7 @@ var listClientsParamsSchema = z4.object({
|
|
|
189
207
|
labels: true
|
|
190
208
|
}).partial().optional()
|
|
191
209
|
});
|
|
192
|
-
var listClientsResponseSchema = z4.
|
|
193
|
-
clients: z4.array(clientSchema)
|
|
194
|
-
});
|
|
210
|
+
var listClientsResponseSchema = z4.array(clientSchema);
|
|
195
211
|
|
|
196
212
|
// src/clients-ressource.ts
|
|
197
213
|
var RstreamClientsRessource = class {
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rstreamlabs/rstream",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "JS SDK for rstream.",
|
|
5
|
+
"author": "@uartnet <hello@rstream.io>",
|
|
5
6
|
"license": "Apache-2.0",
|
|
6
7
|
"main": "./dist/index.js",
|
|
7
8
|
"module": "./dist/index.mjs",
|
|
@@ -18,18 +19,18 @@
|
|
|
18
19
|
"type-check": "tsc --noEmit"
|
|
19
20
|
},
|
|
20
21
|
"devDependencies": {
|
|
21
|
-
"@turbo/gen": "^2.5.
|
|
22
|
-
"@types/jsonwebtoken": "^9.0.
|
|
23
|
-
"@types/node": "^
|
|
22
|
+
"@turbo/gen": "^2.5.6",
|
|
23
|
+
"@types/jsonwebtoken": "^9.0.10",
|
|
24
|
+
"@types/node": "^24",
|
|
24
25
|
"eslint-config": "*",
|
|
25
|
-
"eslint": "9.
|
|
26
|
+
"eslint": "9.35.0",
|
|
26
27
|
"tsup": "^8.5.0",
|
|
27
28
|
"typescript-config": "*",
|
|
28
|
-
"typescript": "5.
|
|
29
|
+
"typescript": "5.9.2"
|
|
29
30
|
},
|
|
30
31
|
"dependencies": {
|
|
31
32
|
"jsonwebtoken": "^9.0.2",
|
|
32
|
-
"zod": "^3.25.
|
|
33
|
+
"zod": "^3.25.76"
|
|
33
34
|
},
|
|
34
35
|
"publishConfig": {
|
|
35
36
|
"access": "public"
|