@rstreamlabs/tunnels 1.0.2 → 1.0.3
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 +126 -1
- package/dist/index.d.ts +126 -1
- package/dist/index.js +19 -7
- package/dist/index.mjs +17 -7
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -4654,6 +4654,10 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4654
4654
|
country: z.ZodOptional<z.ZodString>;
|
|
4655
4655
|
region: z.ZodOptional<z.ZodString>;
|
|
4656
4656
|
}, z.core.$strip>>;
|
|
4657
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
4658
|
+
version: z.ZodOptional<z.ZodString>;
|
|
4659
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
4660
|
+
}, z.core.$strip>>;
|
|
4657
4661
|
}, z.core.$strip>;
|
|
4658
4662
|
http: z.ZodOptional<z.ZodObject<{
|
|
4659
4663
|
protocol: z.ZodOptional<z.ZodEnum<{
|
|
@@ -4768,6 +4772,14 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4768
4772
|
authorization: "authorization";
|
|
4769
4773
|
client: "client";
|
|
4770
4774
|
}>;
|
|
4775
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4776
|
+
reason: z.ZodLiteral<"insufficient_scope">;
|
|
4777
|
+
source: z.ZodEnum<{
|
|
4778
|
+
unknown: "unknown";
|
|
4779
|
+
query: "query";
|
|
4780
|
+
authorization: "authorization";
|
|
4781
|
+
client: "client";
|
|
4782
|
+
}>;
|
|
4771
4783
|
}, z.core.$strip>, z.ZodObject<{
|
|
4772
4784
|
reason: z.ZodLiteral<"policy_denied">;
|
|
4773
4785
|
policy: z.ZodEnum<{
|
|
@@ -4873,6 +4885,14 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4873
4885
|
authorization: "authorization";
|
|
4874
4886
|
client: "client";
|
|
4875
4887
|
}>;
|
|
4888
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4889
|
+
reason: z.ZodLiteral<"insufficient_scope">;
|
|
4890
|
+
source: z.ZodEnum<{
|
|
4891
|
+
unknown: "unknown";
|
|
4892
|
+
query: "query";
|
|
4893
|
+
authorization: "authorization";
|
|
4894
|
+
client: "client";
|
|
4895
|
+
}>;
|
|
4876
4896
|
}, z.core.$strip>, z.ZodObject<{
|
|
4877
4897
|
reason: z.ZodLiteral<"policy_denied">;
|
|
4878
4898
|
policy: z.ZodEnum<{
|
|
@@ -4925,6 +4945,10 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4925
4945
|
country: z.ZodOptional<z.ZodString>;
|
|
4926
4946
|
region: z.ZodOptional<z.ZodString>;
|
|
4927
4947
|
}, z.core.$strip>>;
|
|
4948
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
4949
|
+
version: z.ZodOptional<z.ZodString>;
|
|
4950
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
4951
|
+
}, z.core.$strip>>;
|
|
4928
4952
|
}, z.core.$strip>>;
|
|
4929
4953
|
metrics: z.ZodObject<{
|
|
4930
4954
|
establish_ms: z.ZodNumber;
|
|
@@ -5008,6 +5032,14 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
5008
5032
|
authorization: "authorization";
|
|
5009
5033
|
client: "client";
|
|
5010
5034
|
}>;
|
|
5035
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5036
|
+
reason: z.ZodLiteral<"insufficient_scope">;
|
|
5037
|
+
source: z.ZodEnum<{
|
|
5038
|
+
unknown: "unknown";
|
|
5039
|
+
query: "query";
|
|
5040
|
+
authorization: "authorization";
|
|
5041
|
+
client: "client";
|
|
5042
|
+
}>;
|
|
5011
5043
|
}, z.core.$strip>, z.ZodObject<{
|
|
5012
5044
|
reason: z.ZodLiteral<"policy_denied">;
|
|
5013
5045
|
policy: z.ZodEnum<{
|
|
@@ -5056,6 +5088,10 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
5056
5088
|
country: z.ZodOptional<z.ZodString>;
|
|
5057
5089
|
region: z.ZodOptional<z.ZodString>;
|
|
5058
5090
|
}, z.core.$strip>>;
|
|
5091
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
5092
|
+
version: z.ZodOptional<z.ZodString>;
|
|
5093
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
5094
|
+
}, z.core.$strip>>;
|
|
5059
5095
|
}, z.core.$strip>>;
|
|
5060
5096
|
metrics: z.ZodOptional<z.ZodObject<{
|
|
5061
5097
|
time_to_fail_ms: z.ZodOptional<z.ZodNumber>;
|
|
@@ -5728,6 +5764,10 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
|
|
|
5728
5764
|
country: z.ZodOptional<z.ZodString>;
|
|
5729
5765
|
region: z.ZodOptional<z.ZodString>;
|
|
5730
5766
|
}, z.core.$strip>>;
|
|
5767
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
5768
|
+
version: z.ZodOptional<z.ZodString>;
|
|
5769
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
5770
|
+
}, z.core.$strip>>;
|
|
5731
5771
|
}, z.core.$strip>;
|
|
5732
5772
|
http: z.ZodOptional<z.ZodObject<{
|
|
5733
5773
|
protocol: z.ZodOptional<z.ZodEnum<{
|
|
@@ -5842,6 +5882,14 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
|
|
|
5842
5882
|
authorization: "authorization";
|
|
5843
5883
|
client: "client";
|
|
5844
5884
|
}>;
|
|
5885
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5886
|
+
reason: z.ZodLiteral<"insufficient_scope">;
|
|
5887
|
+
source: z.ZodEnum<{
|
|
5888
|
+
unknown: "unknown";
|
|
5889
|
+
query: "query";
|
|
5890
|
+
authorization: "authorization";
|
|
5891
|
+
client: "client";
|
|
5892
|
+
}>;
|
|
5845
5893
|
}, z.core.$strip>, z.ZodObject<{
|
|
5846
5894
|
reason: z.ZodLiteral<"policy_denied">;
|
|
5847
5895
|
policy: z.ZodEnum<{
|
|
@@ -5947,6 +5995,14 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
|
|
|
5947
5995
|
authorization: "authorization";
|
|
5948
5996
|
client: "client";
|
|
5949
5997
|
}>;
|
|
5998
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5999
|
+
reason: z.ZodLiteral<"insufficient_scope">;
|
|
6000
|
+
source: z.ZodEnum<{
|
|
6001
|
+
unknown: "unknown";
|
|
6002
|
+
query: "query";
|
|
6003
|
+
authorization: "authorization";
|
|
6004
|
+
client: "client";
|
|
6005
|
+
}>;
|
|
5950
6006
|
}, z.core.$strip>, z.ZodObject<{
|
|
5951
6007
|
reason: z.ZodLiteral<"policy_denied">;
|
|
5952
6008
|
policy: z.ZodEnum<{
|
|
@@ -5999,6 +6055,10 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
|
|
|
5999
6055
|
country: z.ZodOptional<z.ZodString>;
|
|
6000
6056
|
region: z.ZodOptional<z.ZodString>;
|
|
6001
6057
|
}, z.core.$strip>>;
|
|
6058
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
6059
|
+
version: z.ZodOptional<z.ZodString>;
|
|
6060
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
6061
|
+
}, z.core.$strip>>;
|
|
6002
6062
|
}, z.core.$strip>>;
|
|
6003
6063
|
metrics: z.ZodObject<{
|
|
6004
6064
|
establish_ms: z.ZodNumber;
|
|
@@ -6082,6 +6142,14 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
|
|
|
6082
6142
|
authorization: "authorization";
|
|
6083
6143
|
client: "client";
|
|
6084
6144
|
}>;
|
|
6145
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6146
|
+
reason: z.ZodLiteral<"insufficient_scope">;
|
|
6147
|
+
source: z.ZodEnum<{
|
|
6148
|
+
unknown: "unknown";
|
|
6149
|
+
query: "query";
|
|
6150
|
+
authorization: "authorization";
|
|
6151
|
+
client: "client";
|
|
6152
|
+
}>;
|
|
6085
6153
|
}, z.core.$strip>, z.ZodObject<{
|
|
6086
6154
|
reason: z.ZodLiteral<"policy_denied">;
|
|
6087
6155
|
policy: z.ZodEnum<{
|
|
@@ -6130,6 +6198,10 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
|
|
|
6130
6198
|
country: z.ZodOptional<z.ZodString>;
|
|
6131
6199
|
region: z.ZodOptional<z.ZodString>;
|
|
6132
6200
|
}, z.core.$strip>>;
|
|
6201
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
6202
|
+
version: z.ZodOptional<z.ZodString>;
|
|
6203
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
6204
|
+
}, z.core.$strip>>;
|
|
6133
6205
|
}, z.core.$strip>>;
|
|
6134
6206
|
metrics: z.ZodOptional<z.ZodObject<{
|
|
6135
6207
|
time_to_fail_ms: z.ZodOptional<z.ZodNumber>;
|
|
@@ -6248,6 +6320,21 @@ declare function resolveTunnelsCredentials(credentials?: RstreamCredentials): Rs
|
|
|
6248
6320
|
declare function resolveControlPlaneCredentials(controlPlaneCredentials?: RstreamCredentials, credentials?: RstreamCredentials, authToken?: string): RstreamCredentials | undefined;
|
|
6249
6321
|
declare function resolveTunnelsEngine(config: TunnelsResolutionConfig): Promise<string>;
|
|
6250
6322
|
|
|
6323
|
+
declare const streamTLSInfoSchema: z.ZodObject<{
|
|
6324
|
+
version: z.ZodOptional<z.ZodString>;
|
|
6325
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
6326
|
+
}, z.core.$strip>;
|
|
6327
|
+
declare const streamEndpointSchema: z.ZodObject<{
|
|
6328
|
+
ip: z.ZodOptional<z.ZodString>;
|
|
6329
|
+
geolocation: z.ZodOptional<z.ZodObject<{
|
|
6330
|
+
country: z.ZodOptional<z.ZodString>;
|
|
6331
|
+
region: z.ZodOptional<z.ZodString>;
|
|
6332
|
+
}, z.core.$strip>>;
|
|
6333
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
6334
|
+
version: z.ZodOptional<z.ZodString>;
|
|
6335
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
6336
|
+
}, z.core.$strip>>;
|
|
6337
|
+
}, z.core.$strip>;
|
|
6251
6338
|
declare const streamSummarySchema: z.ZodObject<{
|
|
6252
6339
|
workspace_id: z.ZodOptional<z.ZodString>;
|
|
6253
6340
|
project_id: z.ZodOptional<z.ZodString>;
|
|
@@ -6265,6 +6352,10 @@ declare const streamSummarySchema: z.ZodObject<{
|
|
|
6265
6352
|
country: z.ZodOptional<z.ZodString>;
|
|
6266
6353
|
region: z.ZodOptional<z.ZodString>;
|
|
6267
6354
|
}, z.core.$strip>>;
|
|
6355
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
6356
|
+
version: z.ZodOptional<z.ZodString>;
|
|
6357
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
6358
|
+
}, z.core.$strip>>;
|
|
6268
6359
|
}, z.core.$strip>;
|
|
6269
6360
|
http: z.ZodOptional<z.ZodObject<{
|
|
6270
6361
|
protocol: z.ZodOptional<z.ZodEnum<{
|
|
@@ -6379,6 +6470,14 @@ declare const streamSummarySchema: z.ZodObject<{
|
|
|
6379
6470
|
authorization: "authorization";
|
|
6380
6471
|
client: "client";
|
|
6381
6472
|
}>;
|
|
6473
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6474
|
+
reason: z.ZodLiteral<"insufficient_scope">;
|
|
6475
|
+
source: z.ZodEnum<{
|
|
6476
|
+
unknown: "unknown";
|
|
6477
|
+
query: "query";
|
|
6478
|
+
authorization: "authorization";
|
|
6479
|
+
client: "client";
|
|
6480
|
+
}>;
|
|
6382
6481
|
}, z.core.$strip>, z.ZodObject<{
|
|
6383
6482
|
reason: z.ZodLiteral<"policy_denied">;
|
|
6384
6483
|
policy: z.ZodEnum<{
|
|
@@ -6484,6 +6583,14 @@ declare const streamSummarySchema: z.ZodObject<{
|
|
|
6484
6583
|
authorization: "authorization";
|
|
6485
6584
|
client: "client";
|
|
6486
6585
|
}>;
|
|
6586
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6587
|
+
reason: z.ZodLiteral<"insufficient_scope">;
|
|
6588
|
+
source: z.ZodEnum<{
|
|
6589
|
+
unknown: "unknown";
|
|
6590
|
+
query: "query";
|
|
6591
|
+
authorization: "authorization";
|
|
6592
|
+
client: "client";
|
|
6593
|
+
}>;
|
|
6487
6594
|
}, z.core.$strip>, z.ZodObject<{
|
|
6488
6595
|
reason: z.ZodLiteral<"policy_denied">;
|
|
6489
6596
|
policy: z.ZodEnum<{
|
|
@@ -6536,6 +6643,10 @@ declare const streamSummarySchema: z.ZodObject<{
|
|
|
6536
6643
|
country: z.ZodOptional<z.ZodString>;
|
|
6537
6644
|
region: z.ZodOptional<z.ZodString>;
|
|
6538
6645
|
}, z.core.$strip>>;
|
|
6646
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
6647
|
+
version: z.ZodOptional<z.ZodString>;
|
|
6648
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
6649
|
+
}, z.core.$strip>>;
|
|
6539
6650
|
}, z.core.$strip>>;
|
|
6540
6651
|
metrics: z.ZodObject<{
|
|
6541
6652
|
establish_ms: z.ZodNumber;
|
|
@@ -6619,6 +6730,14 @@ declare const streamSummarySchema: z.ZodObject<{
|
|
|
6619
6730
|
authorization: "authorization";
|
|
6620
6731
|
client: "client";
|
|
6621
6732
|
}>;
|
|
6733
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6734
|
+
reason: z.ZodLiteral<"insufficient_scope">;
|
|
6735
|
+
source: z.ZodEnum<{
|
|
6736
|
+
unknown: "unknown";
|
|
6737
|
+
query: "query";
|
|
6738
|
+
authorization: "authorization";
|
|
6739
|
+
client: "client";
|
|
6740
|
+
}>;
|
|
6622
6741
|
}, z.core.$strip>, z.ZodObject<{
|
|
6623
6742
|
reason: z.ZodLiteral<"policy_denied">;
|
|
6624
6743
|
policy: z.ZodEnum<{
|
|
@@ -6667,6 +6786,10 @@ declare const streamSummarySchema: z.ZodObject<{
|
|
|
6667
6786
|
country: z.ZodOptional<z.ZodString>;
|
|
6668
6787
|
region: z.ZodOptional<z.ZodString>;
|
|
6669
6788
|
}, z.core.$strip>>;
|
|
6789
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
6790
|
+
version: z.ZodOptional<z.ZodString>;
|
|
6791
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
6792
|
+
}, z.core.$strip>>;
|
|
6670
6793
|
}, z.core.$strip>>;
|
|
6671
6794
|
metrics: z.ZodOptional<z.ZodObject<{
|
|
6672
6795
|
time_to_fail_ms: z.ZodOptional<z.ZodNumber>;
|
|
@@ -6703,6 +6826,8 @@ declare const streamSummarySchema: z.ZodObject<{
|
|
|
6703
6826
|
}, z.core.$strip>], "outcome">;
|
|
6704
6827
|
}, z.core.$strip>;
|
|
6705
6828
|
type StreamSummary = z.infer<typeof streamSummarySchema>;
|
|
6829
|
+
type StreamTLSInfo = z.infer<typeof streamTLSInfoSchema>;
|
|
6830
|
+
type StreamEndpoint = z.infer<typeof streamEndpointSchema>;
|
|
6706
6831
|
|
|
6707
6832
|
/**
|
|
6708
6833
|
* Configuration for the Watch connection.
|
|
@@ -6788,4 +6913,4 @@ declare const webttyServerSchema: z.ZodObject<{
|
|
|
6788
6913
|
type WebTTYServer = z.infer<typeof webttyServerSchema>;
|
|
6789
6914
|
declare function parseWebTTYServers(tunnels: Tunnel[]): WebTTYServer[];
|
|
6790
6915
|
|
|
6791
|
-
export { type Client, type CreateAPITURNCredentialsOptions, type CreateAPPTURNCredentialsOptions, type CreateAuthTokenParams, type CreateAuthTokenResponse, type CreatePATTURNCredentialsOptions, type CreateTURNCredentialsOptions, type Event, type InitialState, type ListClientsParams, type ListClientsResponse, type ListTunnelsParams, type ListTunnelsResponse, type RstreamAuth, type RstreamAuthJwtPayload, RstreamAuthResource, RstreamAuthResource as RstreamAuthRessource, type RstreamAuthToken, type RstreamAuthTokenPermissions, type RstreamAuthTokenScopes, type RstreamAuthTokenTunnelGrant, RstreamTunnelsClient as RstreamClient, RstreamClientsResource, RstreamClientsResource as RstreamClientsRessource, RstreamTURNResource, RstreamTunnelsClient, type RstreamTunnelsConfig, RstreamTunnelsResource, RstreamTunnelsResource as RstreamTunnelsRessource, RstreamWebhookResource, RstreamWebhookResource as RstreamWebhookRessource, type StreamSummary, type TURNCredentialMode, type Token, type Tunnel, RstreamTunnelsClient as Tunnels, type TunnelsResolutionConfig, Watch, type WatchConfig, type WatchWsEvents, type WebTTYServer, type WebhookEvent, type WsEvent, authTokenPermissionsSchema, authTokenSchema, authTokenScopesSchema, authTokenTunnelGrantSchema, authTokenTunnelsScopesSchema, clientSchema, createAPITURNCredentials, createAPPTURNCredentials, createAuthTokenFromClientCredentials, createAuthTokenParamsSchema, createAuthTokenResponseSchema, createPATTURNCredentials, createTURNCredentials, eventSchema, listClientsParamsSchema, listClientsResponseSchema, listTunnelsParamsSchema, listTunnelsResponseSchema, parseWebTTYServers, resolveControlPlaneCredentials, resolveTunnelsAPIURL, resolveTunnelsCredentials, resolveTunnelsEngine, streamSummarySchema, tokenSchema, tunnelSchema, turnCredentialModeSchema, webhookEventsSchema, webttyServerSchema, wsEventsSchema };
|
|
6916
|
+
export { type Client, type CreateAPITURNCredentialsOptions, type CreateAPPTURNCredentialsOptions, type CreateAuthTokenParams, type CreateAuthTokenResponse, type CreatePATTURNCredentialsOptions, type CreateTURNCredentialsOptions, type Event, type InitialState, type ListClientsParams, type ListClientsResponse, type ListTunnelsParams, type ListTunnelsResponse, type RstreamAuth, type RstreamAuthJwtPayload, RstreamAuthResource, RstreamAuthResource as RstreamAuthRessource, type RstreamAuthToken, type RstreamAuthTokenPermissions, type RstreamAuthTokenScopes, type RstreamAuthTokenTunnelGrant, RstreamTunnelsClient as RstreamClient, RstreamClientsResource, RstreamClientsResource as RstreamClientsRessource, RstreamTURNResource, RstreamTunnelsClient, type RstreamTunnelsConfig, RstreamTunnelsResource, RstreamTunnelsResource as RstreamTunnelsRessource, RstreamWebhookResource, RstreamWebhookResource as RstreamWebhookRessource, type StreamEndpoint, type StreamSummary, type StreamTLSInfo, type TURNCredentialMode, type Token, type Tunnel, RstreamTunnelsClient as Tunnels, type TunnelsResolutionConfig, Watch, type WatchConfig, type WatchWsEvents, type WebTTYServer, type WebhookEvent, type WsEvent, authTokenPermissionsSchema, authTokenSchema, authTokenScopesSchema, authTokenTunnelGrantSchema, authTokenTunnelsScopesSchema, clientSchema, createAPITURNCredentials, createAPPTURNCredentials, createAuthTokenFromClientCredentials, createAuthTokenParamsSchema, createAuthTokenResponseSchema, createPATTURNCredentials, createTURNCredentials, eventSchema, listClientsParamsSchema, listClientsResponseSchema, listTunnelsParamsSchema, listTunnelsResponseSchema, parseWebTTYServers, resolveControlPlaneCredentials, resolveTunnelsAPIURL, resolveTunnelsCredentials, resolveTunnelsEngine, streamEndpointSchema, streamSummarySchema, streamTLSInfoSchema, tokenSchema, tunnelSchema, turnCredentialModeSchema, webhookEventsSchema, webttyServerSchema, wsEventsSchema };
|
package/dist/index.d.ts
CHANGED
|
@@ -4654,6 +4654,10 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4654
4654
|
country: z.ZodOptional<z.ZodString>;
|
|
4655
4655
|
region: z.ZodOptional<z.ZodString>;
|
|
4656
4656
|
}, z.core.$strip>>;
|
|
4657
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
4658
|
+
version: z.ZodOptional<z.ZodString>;
|
|
4659
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
4660
|
+
}, z.core.$strip>>;
|
|
4657
4661
|
}, z.core.$strip>;
|
|
4658
4662
|
http: z.ZodOptional<z.ZodObject<{
|
|
4659
4663
|
protocol: z.ZodOptional<z.ZodEnum<{
|
|
@@ -4768,6 +4772,14 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4768
4772
|
authorization: "authorization";
|
|
4769
4773
|
client: "client";
|
|
4770
4774
|
}>;
|
|
4775
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4776
|
+
reason: z.ZodLiteral<"insufficient_scope">;
|
|
4777
|
+
source: z.ZodEnum<{
|
|
4778
|
+
unknown: "unknown";
|
|
4779
|
+
query: "query";
|
|
4780
|
+
authorization: "authorization";
|
|
4781
|
+
client: "client";
|
|
4782
|
+
}>;
|
|
4771
4783
|
}, z.core.$strip>, z.ZodObject<{
|
|
4772
4784
|
reason: z.ZodLiteral<"policy_denied">;
|
|
4773
4785
|
policy: z.ZodEnum<{
|
|
@@ -4873,6 +4885,14 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4873
4885
|
authorization: "authorization";
|
|
4874
4886
|
client: "client";
|
|
4875
4887
|
}>;
|
|
4888
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
4889
|
+
reason: z.ZodLiteral<"insufficient_scope">;
|
|
4890
|
+
source: z.ZodEnum<{
|
|
4891
|
+
unknown: "unknown";
|
|
4892
|
+
query: "query";
|
|
4893
|
+
authorization: "authorization";
|
|
4894
|
+
client: "client";
|
|
4895
|
+
}>;
|
|
4876
4896
|
}, z.core.$strip>, z.ZodObject<{
|
|
4877
4897
|
reason: z.ZodLiteral<"policy_denied">;
|
|
4878
4898
|
policy: z.ZodEnum<{
|
|
@@ -4925,6 +4945,10 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
4925
4945
|
country: z.ZodOptional<z.ZodString>;
|
|
4926
4946
|
region: z.ZodOptional<z.ZodString>;
|
|
4927
4947
|
}, z.core.$strip>>;
|
|
4948
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
4949
|
+
version: z.ZodOptional<z.ZodString>;
|
|
4950
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
4951
|
+
}, z.core.$strip>>;
|
|
4928
4952
|
}, z.core.$strip>>;
|
|
4929
4953
|
metrics: z.ZodObject<{
|
|
4930
4954
|
establish_ms: z.ZodNumber;
|
|
@@ -5008,6 +5032,14 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
5008
5032
|
authorization: "authorization";
|
|
5009
5033
|
client: "client";
|
|
5010
5034
|
}>;
|
|
5035
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5036
|
+
reason: z.ZodLiteral<"insufficient_scope">;
|
|
5037
|
+
source: z.ZodEnum<{
|
|
5038
|
+
unknown: "unknown";
|
|
5039
|
+
query: "query";
|
|
5040
|
+
authorization: "authorization";
|
|
5041
|
+
client: "client";
|
|
5042
|
+
}>;
|
|
5011
5043
|
}, z.core.$strip>, z.ZodObject<{
|
|
5012
5044
|
reason: z.ZodLiteral<"policy_denied">;
|
|
5013
5045
|
policy: z.ZodEnum<{
|
|
@@ -5056,6 +5088,10 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
5056
5088
|
country: z.ZodOptional<z.ZodString>;
|
|
5057
5089
|
region: z.ZodOptional<z.ZodString>;
|
|
5058
5090
|
}, z.core.$strip>>;
|
|
5091
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
5092
|
+
version: z.ZodOptional<z.ZodString>;
|
|
5093
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
5094
|
+
}, z.core.$strip>>;
|
|
5059
5095
|
}, z.core.$strip>>;
|
|
5060
5096
|
metrics: z.ZodOptional<z.ZodObject<{
|
|
5061
5097
|
time_to_fail_ms: z.ZodOptional<z.ZodNumber>;
|
|
@@ -5728,6 +5764,10 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
|
|
|
5728
5764
|
country: z.ZodOptional<z.ZodString>;
|
|
5729
5765
|
region: z.ZodOptional<z.ZodString>;
|
|
5730
5766
|
}, z.core.$strip>>;
|
|
5767
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
5768
|
+
version: z.ZodOptional<z.ZodString>;
|
|
5769
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
5770
|
+
}, z.core.$strip>>;
|
|
5731
5771
|
}, z.core.$strip>;
|
|
5732
5772
|
http: z.ZodOptional<z.ZodObject<{
|
|
5733
5773
|
protocol: z.ZodOptional<z.ZodEnum<{
|
|
@@ -5842,6 +5882,14 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
|
|
|
5842
5882
|
authorization: "authorization";
|
|
5843
5883
|
client: "client";
|
|
5844
5884
|
}>;
|
|
5885
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5886
|
+
reason: z.ZodLiteral<"insufficient_scope">;
|
|
5887
|
+
source: z.ZodEnum<{
|
|
5888
|
+
unknown: "unknown";
|
|
5889
|
+
query: "query";
|
|
5890
|
+
authorization: "authorization";
|
|
5891
|
+
client: "client";
|
|
5892
|
+
}>;
|
|
5845
5893
|
}, z.core.$strip>, z.ZodObject<{
|
|
5846
5894
|
reason: z.ZodLiteral<"policy_denied">;
|
|
5847
5895
|
policy: z.ZodEnum<{
|
|
@@ -5947,6 +5995,14 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
|
|
|
5947
5995
|
authorization: "authorization";
|
|
5948
5996
|
client: "client";
|
|
5949
5997
|
}>;
|
|
5998
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
5999
|
+
reason: z.ZodLiteral<"insufficient_scope">;
|
|
6000
|
+
source: z.ZodEnum<{
|
|
6001
|
+
unknown: "unknown";
|
|
6002
|
+
query: "query";
|
|
6003
|
+
authorization: "authorization";
|
|
6004
|
+
client: "client";
|
|
6005
|
+
}>;
|
|
5950
6006
|
}, z.core.$strip>, z.ZodObject<{
|
|
5951
6007
|
reason: z.ZodLiteral<"policy_denied">;
|
|
5952
6008
|
policy: z.ZodEnum<{
|
|
@@ -5999,6 +6055,10 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
|
|
|
5999
6055
|
country: z.ZodOptional<z.ZodString>;
|
|
6000
6056
|
region: z.ZodOptional<z.ZodString>;
|
|
6001
6057
|
}, z.core.$strip>>;
|
|
6058
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
6059
|
+
version: z.ZodOptional<z.ZodString>;
|
|
6060
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
6061
|
+
}, z.core.$strip>>;
|
|
6002
6062
|
}, z.core.$strip>>;
|
|
6003
6063
|
metrics: z.ZodObject<{
|
|
6004
6064
|
establish_ms: z.ZodNumber;
|
|
@@ -6082,6 +6142,14 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
|
|
|
6082
6142
|
authorization: "authorization";
|
|
6083
6143
|
client: "client";
|
|
6084
6144
|
}>;
|
|
6145
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6146
|
+
reason: z.ZodLiteral<"insufficient_scope">;
|
|
6147
|
+
source: z.ZodEnum<{
|
|
6148
|
+
unknown: "unknown";
|
|
6149
|
+
query: "query";
|
|
6150
|
+
authorization: "authorization";
|
|
6151
|
+
client: "client";
|
|
6152
|
+
}>;
|
|
6085
6153
|
}, z.core.$strip>, z.ZodObject<{
|
|
6086
6154
|
reason: z.ZodLiteral<"policy_denied">;
|
|
6087
6155
|
policy: z.ZodEnum<{
|
|
@@ -6130,6 +6198,10 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
|
|
|
6130
6198
|
country: z.ZodOptional<z.ZodString>;
|
|
6131
6199
|
region: z.ZodOptional<z.ZodString>;
|
|
6132
6200
|
}, z.core.$strip>>;
|
|
6201
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
6202
|
+
version: z.ZodOptional<z.ZodString>;
|
|
6203
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
6204
|
+
}, z.core.$strip>>;
|
|
6133
6205
|
}, z.core.$strip>>;
|
|
6134
6206
|
metrics: z.ZodOptional<z.ZodObject<{
|
|
6135
6207
|
time_to_fail_ms: z.ZodOptional<z.ZodNumber>;
|
|
@@ -6248,6 +6320,21 @@ declare function resolveTunnelsCredentials(credentials?: RstreamCredentials): Rs
|
|
|
6248
6320
|
declare function resolveControlPlaneCredentials(controlPlaneCredentials?: RstreamCredentials, credentials?: RstreamCredentials, authToken?: string): RstreamCredentials | undefined;
|
|
6249
6321
|
declare function resolveTunnelsEngine(config: TunnelsResolutionConfig): Promise<string>;
|
|
6250
6322
|
|
|
6323
|
+
declare const streamTLSInfoSchema: z.ZodObject<{
|
|
6324
|
+
version: z.ZodOptional<z.ZodString>;
|
|
6325
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
6326
|
+
}, z.core.$strip>;
|
|
6327
|
+
declare const streamEndpointSchema: z.ZodObject<{
|
|
6328
|
+
ip: z.ZodOptional<z.ZodString>;
|
|
6329
|
+
geolocation: z.ZodOptional<z.ZodObject<{
|
|
6330
|
+
country: z.ZodOptional<z.ZodString>;
|
|
6331
|
+
region: z.ZodOptional<z.ZodString>;
|
|
6332
|
+
}, z.core.$strip>>;
|
|
6333
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
6334
|
+
version: z.ZodOptional<z.ZodString>;
|
|
6335
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
6336
|
+
}, z.core.$strip>>;
|
|
6337
|
+
}, z.core.$strip>;
|
|
6251
6338
|
declare const streamSummarySchema: z.ZodObject<{
|
|
6252
6339
|
workspace_id: z.ZodOptional<z.ZodString>;
|
|
6253
6340
|
project_id: z.ZodOptional<z.ZodString>;
|
|
@@ -6265,6 +6352,10 @@ declare const streamSummarySchema: z.ZodObject<{
|
|
|
6265
6352
|
country: z.ZodOptional<z.ZodString>;
|
|
6266
6353
|
region: z.ZodOptional<z.ZodString>;
|
|
6267
6354
|
}, z.core.$strip>>;
|
|
6355
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
6356
|
+
version: z.ZodOptional<z.ZodString>;
|
|
6357
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
6358
|
+
}, z.core.$strip>>;
|
|
6268
6359
|
}, z.core.$strip>;
|
|
6269
6360
|
http: z.ZodOptional<z.ZodObject<{
|
|
6270
6361
|
protocol: z.ZodOptional<z.ZodEnum<{
|
|
@@ -6379,6 +6470,14 @@ declare const streamSummarySchema: z.ZodObject<{
|
|
|
6379
6470
|
authorization: "authorization";
|
|
6380
6471
|
client: "client";
|
|
6381
6472
|
}>;
|
|
6473
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6474
|
+
reason: z.ZodLiteral<"insufficient_scope">;
|
|
6475
|
+
source: z.ZodEnum<{
|
|
6476
|
+
unknown: "unknown";
|
|
6477
|
+
query: "query";
|
|
6478
|
+
authorization: "authorization";
|
|
6479
|
+
client: "client";
|
|
6480
|
+
}>;
|
|
6382
6481
|
}, z.core.$strip>, z.ZodObject<{
|
|
6383
6482
|
reason: z.ZodLiteral<"policy_denied">;
|
|
6384
6483
|
policy: z.ZodEnum<{
|
|
@@ -6484,6 +6583,14 @@ declare const streamSummarySchema: z.ZodObject<{
|
|
|
6484
6583
|
authorization: "authorization";
|
|
6485
6584
|
client: "client";
|
|
6486
6585
|
}>;
|
|
6586
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6587
|
+
reason: z.ZodLiteral<"insufficient_scope">;
|
|
6588
|
+
source: z.ZodEnum<{
|
|
6589
|
+
unknown: "unknown";
|
|
6590
|
+
query: "query";
|
|
6591
|
+
authorization: "authorization";
|
|
6592
|
+
client: "client";
|
|
6593
|
+
}>;
|
|
6487
6594
|
}, z.core.$strip>, z.ZodObject<{
|
|
6488
6595
|
reason: z.ZodLiteral<"policy_denied">;
|
|
6489
6596
|
policy: z.ZodEnum<{
|
|
@@ -6536,6 +6643,10 @@ declare const streamSummarySchema: z.ZodObject<{
|
|
|
6536
6643
|
country: z.ZodOptional<z.ZodString>;
|
|
6537
6644
|
region: z.ZodOptional<z.ZodString>;
|
|
6538
6645
|
}, z.core.$strip>>;
|
|
6646
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
6647
|
+
version: z.ZodOptional<z.ZodString>;
|
|
6648
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
6649
|
+
}, z.core.$strip>>;
|
|
6539
6650
|
}, z.core.$strip>>;
|
|
6540
6651
|
metrics: z.ZodObject<{
|
|
6541
6652
|
establish_ms: z.ZodNumber;
|
|
@@ -6619,6 +6730,14 @@ declare const streamSummarySchema: z.ZodObject<{
|
|
|
6619
6730
|
authorization: "authorization";
|
|
6620
6731
|
client: "client";
|
|
6621
6732
|
}>;
|
|
6733
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
6734
|
+
reason: z.ZodLiteral<"insufficient_scope">;
|
|
6735
|
+
source: z.ZodEnum<{
|
|
6736
|
+
unknown: "unknown";
|
|
6737
|
+
query: "query";
|
|
6738
|
+
authorization: "authorization";
|
|
6739
|
+
client: "client";
|
|
6740
|
+
}>;
|
|
6622
6741
|
}, z.core.$strip>, z.ZodObject<{
|
|
6623
6742
|
reason: z.ZodLiteral<"policy_denied">;
|
|
6624
6743
|
policy: z.ZodEnum<{
|
|
@@ -6667,6 +6786,10 @@ declare const streamSummarySchema: z.ZodObject<{
|
|
|
6667
6786
|
country: z.ZodOptional<z.ZodString>;
|
|
6668
6787
|
region: z.ZodOptional<z.ZodString>;
|
|
6669
6788
|
}, z.core.$strip>>;
|
|
6789
|
+
tls: z.ZodOptional<z.ZodObject<{
|
|
6790
|
+
version: z.ZodOptional<z.ZodString>;
|
|
6791
|
+
cipher: z.ZodOptional<z.ZodString>;
|
|
6792
|
+
}, z.core.$strip>>;
|
|
6670
6793
|
}, z.core.$strip>>;
|
|
6671
6794
|
metrics: z.ZodOptional<z.ZodObject<{
|
|
6672
6795
|
time_to_fail_ms: z.ZodOptional<z.ZodNumber>;
|
|
@@ -6703,6 +6826,8 @@ declare const streamSummarySchema: z.ZodObject<{
|
|
|
6703
6826
|
}, z.core.$strip>], "outcome">;
|
|
6704
6827
|
}, z.core.$strip>;
|
|
6705
6828
|
type StreamSummary = z.infer<typeof streamSummarySchema>;
|
|
6829
|
+
type StreamTLSInfo = z.infer<typeof streamTLSInfoSchema>;
|
|
6830
|
+
type StreamEndpoint = z.infer<typeof streamEndpointSchema>;
|
|
6706
6831
|
|
|
6707
6832
|
/**
|
|
6708
6833
|
* Configuration for the Watch connection.
|
|
@@ -6788,4 +6913,4 @@ declare const webttyServerSchema: z.ZodObject<{
|
|
|
6788
6913
|
type WebTTYServer = z.infer<typeof webttyServerSchema>;
|
|
6789
6914
|
declare function parseWebTTYServers(tunnels: Tunnel[]): WebTTYServer[];
|
|
6790
6915
|
|
|
6791
|
-
export { type Client, type CreateAPITURNCredentialsOptions, type CreateAPPTURNCredentialsOptions, type CreateAuthTokenParams, type CreateAuthTokenResponse, type CreatePATTURNCredentialsOptions, type CreateTURNCredentialsOptions, type Event, type InitialState, type ListClientsParams, type ListClientsResponse, type ListTunnelsParams, type ListTunnelsResponse, type RstreamAuth, type RstreamAuthJwtPayload, RstreamAuthResource, RstreamAuthResource as RstreamAuthRessource, type RstreamAuthToken, type RstreamAuthTokenPermissions, type RstreamAuthTokenScopes, type RstreamAuthTokenTunnelGrant, RstreamTunnelsClient as RstreamClient, RstreamClientsResource, RstreamClientsResource as RstreamClientsRessource, RstreamTURNResource, RstreamTunnelsClient, type RstreamTunnelsConfig, RstreamTunnelsResource, RstreamTunnelsResource as RstreamTunnelsRessource, RstreamWebhookResource, RstreamWebhookResource as RstreamWebhookRessource, type StreamSummary, type TURNCredentialMode, type Token, type Tunnel, RstreamTunnelsClient as Tunnels, type TunnelsResolutionConfig, Watch, type WatchConfig, type WatchWsEvents, type WebTTYServer, type WebhookEvent, type WsEvent, authTokenPermissionsSchema, authTokenSchema, authTokenScopesSchema, authTokenTunnelGrantSchema, authTokenTunnelsScopesSchema, clientSchema, createAPITURNCredentials, createAPPTURNCredentials, createAuthTokenFromClientCredentials, createAuthTokenParamsSchema, createAuthTokenResponseSchema, createPATTURNCredentials, createTURNCredentials, eventSchema, listClientsParamsSchema, listClientsResponseSchema, listTunnelsParamsSchema, listTunnelsResponseSchema, parseWebTTYServers, resolveControlPlaneCredentials, resolveTunnelsAPIURL, resolveTunnelsCredentials, resolveTunnelsEngine, streamSummarySchema, tokenSchema, tunnelSchema, turnCredentialModeSchema, webhookEventsSchema, webttyServerSchema, wsEventsSchema };
|
|
6916
|
+
export { type Client, type CreateAPITURNCredentialsOptions, type CreateAPPTURNCredentialsOptions, type CreateAuthTokenParams, type CreateAuthTokenResponse, type CreatePATTURNCredentialsOptions, type CreateTURNCredentialsOptions, type Event, type InitialState, type ListClientsParams, type ListClientsResponse, type ListTunnelsParams, type ListTunnelsResponse, type RstreamAuth, type RstreamAuthJwtPayload, RstreamAuthResource, RstreamAuthResource as RstreamAuthRessource, type RstreamAuthToken, type RstreamAuthTokenPermissions, type RstreamAuthTokenScopes, type RstreamAuthTokenTunnelGrant, RstreamTunnelsClient as RstreamClient, RstreamClientsResource, RstreamClientsResource as RstreamClientsRessource, RstreamTURNResource, RstreamTunnelsClient, type RstreamTunnelsConfig, RstreamTunnelsResource, RstreamTunnelsResource as RstreamTunnelsRessource, RstreamWebhookResource, RstreamWebhookResource as RstreamWebhookRessource, type StreamEndpoint, type StreamSummary, type StreamTLSInfo, type TURNCredentialMode, type Token, type Tunnel, RstreamTunnelsClient as Tunnels, type TunnelsResolutionConfig, Watch, type WatchConfig, type WatchWsEvents, type WebTTYServer, type WebhookEvent, type WsEvent, authTokenPermissionsSchema, authTokenSchema, authTokenScopesSchema, authTokenTunnelGrantSchema, authTokenTunnelsScopesSchema, clientSchema, createAPITURNCredentials, createAPPTURNCredentials, createAuthTokenFromClientCredentials, createAuthTokenParamsSchema, createAuthTokenResponseSchema, createPATTURNCredentials, createTURNCredentials, eventSchema, listClientsParamsSchema, listClientsResponseSchema, listTunnelsParamsSchema, listTunnelsResponseSchema, parseWebTTYServers, resolveControlPlaneCredentials, resolveTunnelsAPIURL, resolveTunnelsCredentials, resolveTunnelsEngine, streamEndpointSchema, streamSummarySchema, streamTLSInfoSchema, tokenSchema, tunnelSchema, turnCredentialModeSchema, webhookEventsSchema, webttyServerSchema, wsEventsSchema };
|
package/dist/index.js
CHANGED
|
@@ -66,7 +66,9 @@ __export(index_exports, {
|
|
|
66
66
|
resolveTunnelsAPIURL: () => resolveTunnelsAPIURL,
|
|
67
67
|
resolveTunnelsCredentials: () => resolveTunnelsCredentials,
|
|
68
68
|
resolveTunnelsEngine: () => resolveTunnelsEngine,
|
|
69
|
+
streamEndpointSchema: () => streamEndpointSchema,
|
|
69
70
|
streamSummarySchema: () => streamSummarySchema,
|
|
71
|
+
streamTLSInfoSchema: () => streamTLSInfoSchema,
|
|
70
72
|
tokenSchema: () => tokenSchema,
|
|
71
73
|
tunnelSchema: () => tunnelSchema,
|
|
72
74
|
turnCredentialModeSchema: () => turnCredentialModeSchema,
|
|
@@ -388,7 +390,7 @@ var RstreamClientsResource = class {
|
|
|
388
390
|
// src/stream.ts
|
|
389
391
|
var z5 = __toESM(require("zod"));
|
|
390
392
|
var nonEmptyStringSchema2 = z5.string().min(1);
|
|
391
|
-
var isoDateTimeSchema = z5.string().datetime();
|
|
393
|
+
var isoDateTimeSchema = z5.string().datetime({ offset: true });
|
|
392
394
|
var ipAddressSchema = z5.string();
|
|
393
395
|
var intNonNegSchema = z5.number().int().nonnegative();
|
|
394
396
|
var numNonNegSchema = z5.number().nonnegative();
|
|
@@ -396,9 +398,14 @@ var geolocationSchema = z5.object({
|
|
|
396
398
|
country: z5.string().optional(),
|
|
397
399
|
region: z5.string().optional()
|
|
398
400
|
});
|
|
399
|
-
var
|
|
401
|
+
var streamTLSInfoSchema = z5.object({
|
|
402
|
+
version: z5.string().min(1).optional(),
|
|
403
|
+
cipher: z5.string().min(1).optional()
|
|
404
|
+
});
|
|
405
|
+
var streamEndpointSchema = z5.object({
|
|
400
406
|
ip: ipAddressSchema.optional(),
|
|
401
|
-
geolocation: geolocationSchema.optional()
|
|
407
|
+
geolocation: geolocationSchema.optional(),
|
|
408
|
+
tls: streamTLSInfoSchema.optional()
|
|
402
409
|
});
|
|
403
410
|
var httpHeadersSchema = z5.record(
|
|
404
411
|
z5.string(),
|
|
@@ -467,6 +474,9 @@ var unauthorizedSchema = z5.discriminatedUnion("reason", [
|
|
|
467
474
|
unauthorizedReasonSchema({
|
|
468
475
|
reason: z5.literal("user_mismatch")
|
|
469
476
|
}),
|
|
477
|
+
unauthorizedReasonSchema({
|
|
478
|
+
reason: z5.literal("insufficient_scope")
|
|
479
|
+
}),
|
|
470
480
|
unauthorizedReasonSchema({
|
|
471
481
|
reason: z5.literal("policy_denied"),
|
|
472
482
|
policy: z5.enum(["ip", "geo", "mtls", "challenge", "other"]),
|
|
@@ -539,7 +549,7 @@ var terminationSchema = z5.object({
|
|
|
539
549
|
var responseConnectedSchema = z5.object({
|
|
540
550
|
outcome: z5.literal("connected"),
|
|
541
551
|
established_at: isoDateTimeSchema,
|
|
542
|
-
upstream:
|
|
552
|
+
upstream: streamEndpointSchema.optional(),
|
|
543
553
|
metrics: streamConnectedMetricsSchema,
|
|
544
554
|
termination: terminationSchema.optional(),
|
|
545
555
|
http: httpResponseStageSchema.optional()
|
|
@@ -547,7 +557,7 @@ var responseConnectedSchema = z5.object({
|
|
|
547
557
|
var responseFailedSchema = z5.object({
|
|
548
558
|
outcome: z5.literal("failed"),
|
|
549
559
|
failure: failureSchema,
|
|
550
|
-
upstream:
|
|
560
|
+
upstream: streamEndpointSchema.optional(),
|
|
551
561
|
metrics: streamFailedMetricsSchema.optional(),
|
|
552
562
|
termination: terminationSchema.optional(),
|
|
553
563
|
http: httpResponseStageSchema.optional()
|
|
@@ -567,7 +577,7 @@ var streamSummarySchema = z5.object({
|
|
|
567
577
|
created_at: isoDateTimeSchema,
|
|
568
578
|
terminated_at: isoDateTimeSchema,
|
|
569
579
|
request: z5.object({
|
|
570
|
-
downstream:
|
|
580
|
+
downstream: streamEndpointSchema,
|
|
571
581
|
http: httpRequestStageSchema.optional()
|
|
572
582
|
}),
|
|
573
583
|
firewall: firewallSchema,
|
|
@@ -577,7 +587,7 @@ var streamSummarySchema = z5.object({
|
|
|
577
587
|
|
|
578
588
|
// src/event.ts
|
|
579
589
|
var z6 = __toESM(require("zod"));
|
|
580
|
-
var isoDateTimeSchema2 = z6.string().datetime();
|
|
590
|
+
var isoDateTimeSchema2 = z6.string().datetime({ offset: true });
|
|
581
591
|
var initialStateSchema = z6.object({
|
|
582
592
|
snapshot_at: isoDateTimeSchema2,
|
|
583
593
|
clients: z6.array(clientSchema),
|
|
@@ -1399,7 +1409,9 @@ function parseWebTTYServers(tunnels) {
|
|
|
1399
1409
|
resolveTunnelsAPIURL,
|
|
1400
1410
|
resolveTunnelsCredentials,
|
|
1401
1411
|
resolveTunnelsEngine,
|
|
1412
|
+
streamEndpointSchema,
|
|
1402
1413
|
streamSummarySchema,
|
|
1414
|
+
streamTLSInfoSchema,
|
|
1403
1415
|
tokenSchema,
|
|
1404
1416
|
tunnelSchema,
|
|
1405
1417
|
turnCredentialModeSchema,
|
package/dist/index.mjs
CHANGED
|
@@ -310,7 +310,7 @@ var RstreamClientsResource = class {
|
|
|
310
310
|
// src/stream.ts
|
|
311
311
|
import * as z5 from "zod";
|
|
312
312
|
var nonEmptyStringSchema2 = z5.string().min(1);
|
|
313
|
-
var isoDateTimeSchema = z5.string().datetime();
|
|
313
|
+
var isoDateTimeSchema = z5.string().datetime({ offset: true });
|
|
314
314
|
var ipAddressSchema = z5.string();
|
|
315
315
|
var intNonNegSchema = z5.number().int().nonnegative();
|
|
316
316
|
var numNonNegSchema = z5.number().nonnegative();
|
|
@@ -318,9 +318,14 @@ var geolocationSchema = z5.object({
|
|
|
318
318
|
country: z5.string().optional(),
|
|
319
319
|
region: z5.string().optional()
|
|
320
320
|
});
|
|
321
|
-
var
|
|
321
|
+
var streamTLSInfoSchema = z5.object({
|
|
322
|
+
version: z5.string().min(1).optional(),
|
|
323
|
+
cipher: z5.string().min(1).optional()
|
|
324
|
+
});
|
|
325
|
+
var streamEndpointSchema = z5.object({
|
|
322
326
|
ip: ipAddressSchema.optional(),
|
|
323
|
-
geolocation: geolocationSchema.optional()
|
|
327
|
+
geolocation: geolocationSchema.optional(),
|
|
328
|
+
tls: streamTLSInfoSchema.optional()
|
|
324
329
|
});
|
|
325
330
|
var httpHeadersSchema = z5.record(
|
|
326
331
|
z5.string(),
|
|
@@ -389,6 +394,9 @@ var unauthorizedSchema = z5.discriminatedUnion("reason", [
|
|
|
389
394
|
unauthorizedReasonSchema({
|
|
390
395
|
reason: z5.literal("user_mismatch")
|
|
391
396
|
}),
|
|
397
|
+
unauthorizedReasonSchema({
|
|
398
|
+
reason: z5.literal("insufficient_scope")
|
|
399
|
+
}),
|
|
392
400
|
unauthorizedReasonSchema({
|
|
393
401
|
reason: z5.literal("policy_denied"),
|
|
394
402
|
policy: z5.enum(["ip", "geo", "mtls", "challenge", "other"]),
|
|
@@ -461,7 +469,7 @@ var terminationSchema = z5.object({
|
|
|
461
469
|
var responseConnectedSchema = z5.object({
|
|
462
470
|
outcome: z5.literal("connected"),
|
|
463
471
|
established_at: isoDateTimeSchema,
|
|
464
|
-
upstream:
|
|
472
|
+
upstream: streamEndpointSchema.optional(),
|
|
465
473
|
metrics: streamConnectedMetricsSchema,
|
|
466
474
|
termination: terminationSchema.optional(),
|
|
467
475
|
http: httpResponseStageSchema.optional()
|
|
@@ -469,7 +477,7 @@ var responseConnectedSchema = z5.object({
|
|
|
469
477
|
var responseFailedSchema = z5.object({
|
|
470
478
|
outcome: z5.literal("failed"),
|
|
471
479
|
failure: failureSchema,
|
|
472
|
-
upstream:
|
|
480
|
+
upstream: streamEndpointSchema.optional(),
|
|
473
481
|
metrics: streamFailedMetricsSchema.optional(),
|
|
474
482
|
termination: terminationSchema.optional(),
|
|
475
483
|
http: httpResponseStageSchema.optional()
|
|
@@ -489,7 +497,7 @@ var streamSummarySchema = z5.object({
|
|
|
489
497
|
created_at: isoDateTimeSchema,
|
|
490
498
|
terminated_at: isoDateTimeSchema,
|
|
491
499
|
request: z5.object({
|
|
492
|
-
downstream:
|
|
500
|
+
downstream: streamEndpointSchema,
|
|
493
501
|
http: httpRequestStageSchema.optional()
|
|
494
502
|
}),
|
|
495
503
|
firewall: firewallSchema,
|
|
@@ -499,7 +507,7 @@ var streamSummarySchema = z5.object({
|
|
|
499
507
|
|
|
500
508
|
// src/event.ts
|
|
501
509
|
import * as z6 from "zod";
|
|
502
|
-
var isoDateTimeSchema2 = z6.string().datetime();
|
|
510
|
+
var isoDateTimeSchema2 = z6.string().datetime({ offset: true });
|
|
503
511
|
var initialStateSchema = z6.object({
|
|
504
512
|
snapshot_at: isoDateTimeSchema2,
|
|
505
513
|
clients: z6.array(clientSchema),
|
|
@@ -1320,7 +1328,9 @@ export {
|
|
|
1320
1328
|
resolveTunnelsAPIURL,
|
|
1321
1329
|
resolveTunnelsCredentials,
|
|
1322
1330
|
resolveTunnelsEngine,
|
|
1331
|
+
streamEndpointSchema,
|
|
1323
1332
|
streamSummarySchema,
|
|
1333
|
+
streamTLSInfoSchema,
|
|
1324
1334
|
tokenSchema,
|
|
1325
1335
|
tunnelSchema,
|
|
1326
1336
|
turnCredentialModeSchema,
|