@rstreamlabs/tunnels 1.0.2 → 1.0.4

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 CHANGED
@@ -4654,6 +4654,12 @@ 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
+ protocol: z.ZodOptional<z.ZodString>;
4661
+ curve: z.ZodOptional<z.ZodString>;
4662
+ }, z.core.$strip>>;
4657
4663
  }, z.core.$strip>;
4658
4664
  http: z.ZodOptional<z.ZodObject<{
4659
4665
  protocol: z.ZodOptional<z.ZodEnum<{
@@ -4768,6 +4774,14 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
4768
4774
  authorization: "authorization";
4769
4775
  client: "client";
4770
4776
  }>;
4777
+ }, z.core.$strip>, z.ZodObject<{
4778
+ reason: z.ZodLiteral<"insufficient_scope">;
4779
+ source: z.ZodEnum<{
4780
+ unknown: "unknown";
4781
+ query: "query";
4782
+ authorization: "authorization";
4783
+ client: "client";
4784
+ }>;
4771
4785
  }, z.core.$strip>, z.ZodObject<{
4772
4786
  reason: z.ZodLiteral<"policy_denied">;
4773
4787
  policy: z.ZodEnum<{
@@ -4873,6 +4887,14 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
4873
4887
  authorization: "authorization";
4874
4888
  client: "client";
4875
4889
  }>;
4890
+ }, z.core.$strip>, z.ZodObject<{
4891
+ reason: z.ZodLiteral<"insufficient_scope">;
4892
+ source: z.ZodEnum<{
4893
+ unknown: "unknown";
4894
+ query: "query";
4895
+ authorization: "authorization";
4896
+ client: "client";
4897
+ }>;
4876
4898
  }, z.core.$strip>, z.ZodObject<{
4877
4899
  reason: z.ZodLiteral<"policy_denied">;
4878
4900
  policy: z.ZodEnum<{
@@ -4925,6 +4947,12 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
4925
4947
  country: z.ZodOptional<z.ZodString>;
4926
4948
  region: z.ZodOptional<z.ZodString>;
4927
4949
  }, z.core.$strip>>;
4950
+ tls: z.ZodOptional<z.ZodObject<{
4951
+ version: z.ZodOptional<z.ZodString>;
4952
+ cipher: z.ZodOptional<z.ZodString>;
4953
+ protocol: z.ZodOptional<z.ZodString>;
4954
+ curve: z.ZodOptional<z.ZodString>;
4955
+ }, z.core.$strip>>;
4928
4956
  }, z.core.$strip>>;
4929
4957
  metrics: z.ZodObject<{
4930
4958
  establish_ms: z.ZodNumber;
@@ -5008,6 +5036,14 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
5008
5036
  authorization: "authorization";
5009
5037
  client: "client";
5010
5038
  }>;
5039
+ }, z.core.$strip>, z.ZodObject<{
5040
+ reason: z.ZodLiteral<"insufficient_scope">;
5041
+ source: z.ZodEnum<{
5042
+ unknown: "unknown";
5043
+ query: "query";
5044
+ authorization: "authorization";
5045
+ client: "client";
5046
+ }>;
5011
5047
  }, z.core.$strip>, z.ZodObject<{
5012
5048
  reason: z.ZodLiteral<"policy_denied">;
5013
5049
  policy: z.ZodEnum<{
@@ -5056,6 +5092,12 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
5056
5092
  country: z.ZodOptional<z.ZodString>;
5057
5093
  region: z.ZodOptional<z.ZodString>;
5058
5094
  }, z.core.$strip>>;
5095
+ tls: z.ZodOptional<z.ZodObject<{
5096
+ version: z.ZodOptional<z.ZodString>;
5097
+ cipher: z.ZodOptional<z.ZodString>;
5098
+ protocol: z.ZodOptional<z.ZodString>;
5099
+ curve: z.ZodOptional<z.ZodString>;
5100
+ }, z.core.$strip>>;
5059
5101
  }, z.core.$strip>>;
5060
5102
  metrics: z.ZodOptional<z.ZodObject<{
5061
5103
  time_to_fail_ms: z.ZodOptional<z.ZodNumber>;
@@ -5728,6 +5770,12 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
5728
5770
  country: z.ZodOptional<z.ZodString>;
5729
5771
  region: z.ZodOptional<z.ZodString>;
5730
5772
  }, z.core.$strip>>;
5773
+ tls: z.ZodOptional<z.ZodObject<{
5774
+ version: z.ZodOptional<z.ZodString>;
5775
+ cipher: z.ZodOptional<z.ZodString>;
5776
+ protocol: z.ZodOptional<z.ZodString>;
5777
+ curve: z.ZodOptional<z.ZodString>;
5778
+ }, z.core.$strip>>;
5731
5779
  }, z.core.$strip>;
5732
5780
  http: z.ZodOptional<z.ZodObject<{
5733
5781
  protocol: z.ZodOptional<z.ZodEnum<{
@@ -5842,6 +5890,14 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
5842
5890
  authorization: "authorization";
5843
5891
  client: "client";
5844
5892
  }>;
5893
+ }, z.core.$strip>, z.ZodObject<{
5894
+ reason: z.ZodLiteral<"insufficient_scope">;
5895
+ source: z.ZodEnum<{
5896
+ unknown: "unknown";
5897
+ query: "query";
5898
+ authorization: "authorization";
5899
+ client: "client";
5900
+ }>;
5845
5901
  }, z.core.$strip>, z.ZodObject<{
5846
5902
  reason: z.ZodLiteral<"policy_denied">;
5847
5903
  policy: z.ZodEnum<{
@@ -5947,6 +6003,14 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
5947
6003
  authorization: "authorization";
5948
6004
  client: "client";
5949
6005
  }>;
6006
+ }, z.core.$strip>, z.ZodObject<{
6007
+ reason: z.ZodLiteral<"insufficient_scope">;
6008
+ source: z.ZodEnum<{
6009
+ unknown: "unknown";
6010
+ query: "query";
6011
+ authorization: "authorization";
6012
+ client: "client";
6013
+ }>;
5950
6014
  }, z.core.$strip>, z.ZodObject<{
5951
6015
  reason: z.ZodLiteral<"policy_denied">;
5952
6016
  policy: z.ZodEnum<{
@@ -5999,6 +6063,12 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
5999
6063
  country: z.ZodOptional<z.ZodString>;
6000
6064
  region: z.ZodOptional<z.ZodString>;
6001
6065
  }, z.core.$strip>>;
6066
+ tls: z.ZodOptional<z.ZodObject<{
6067
+ version: z.ZodOptional<z.ZodString>;
6068
+ cipher: z.ZodOptional<z.ZodString>;
6069
+ protocol: z.ZodOptional<z.ZodString>;
6070
+ curve: z.ZodOptional<z.ZodString>;
6071
+ }, z.core.$strip>>;
6002
6072
  }, z.core.$strip>>;
6003
6073
  metrics: z.ZodObject<{
6004
6074
  establish_ms: z.ZodNumber;
@@ -6082,6 +6152,14 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
6082
6152
  authorization: "authorization";
6083
6153
  client: "client";
6084
6154
  }>;
6155
+ }, z.core.$strip>, z.ZodObject<{
6156
+ reason: z.ZodLiteral<"insufficient_scope">;
6157
+ source: z.ZodEnum<{
6158
+ unknown: "unknown";
6159
+ query: "query";
6160
+ authorization: "authorization";
6161
+ client: "client";
6162
+ }>;
6085
6163
  }, z.core.$strip>, z.ZodObject<{
6086
6164
  reason: z.ZodLiteral<"policy_denied">;
6087
6165
  policy: z.ZodEnum<{
@@ -6130,6 +6208,12 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
6130
6208
  country: z.ZodOptional<z.ZodString>;
6131
6209
  region: z.ZodOptional<z.ZodString>;
6132
6210
  }, z.core.$strip>>;
6211
+ tls: z.ZodOptional<z.ZodObject<{
6212
+ version: z.ZodOptional<z.ZodString>;
6213
+ cipher: z.ZodOptional<z.ZodString>;
6214
+ protocol: z.ZodOptional<z.ZodString>;
6215
+ curve: z.ZodOptional<z.ZodString>;
6216
+ }, z.core.$strip>>;
6133
6217
  }, z.core.$strip>>;
6134
6218
  metrics: z.ZodOptional<z.ZodObject<{
6135
6219
  time_to_fail_ms: z.ZodOptional<z.ZodNumber>;
@@ -6248,6 +6332,25 @@ declare function resolveTunnelsCredentials(credentials?: RstreamCredentials): Rs
6248
6332
  declare function resolveControlPlaneCredentials(controlPlaneCredentials?: RstreamCredentials, credentials?: RstreamCredentials, authToken?: string): RstreamCredentials | undefined;
6249
6333
  declare function resolveTunnelsEngine(config: TunnelsResolutionConfig): Promise<string>;
6250
6334
 
6335
+ declare const streamTLSInfoSchema: z.ZodObject<{
6336
+ version: z.ZodOptional<z.ZodString>;
6337
+ cipher: z.ZodOptional<z.ZodString>;
6338
+ protocol: z.ZodOptional<z.ZodString>;
6339
+ curve: z.ZodOptional<z.ZodString>;
6340
+ }, z.core.$strip>;
6341
+ declare const streamEndpointSchema: z.ZodObject<{
6342
+ ip: z.ZodOptional<z.ZodString>;
6343
+ geolocation: z.ZodOptional<z.ZodObject<{
6344
+ country: z.ZodOptional<z.ZodString>;
6345
+ region: z.ZodOptional<z.ZodString>;
6346
+ }, z.core.$strip>>;
6347
+ tls: z.ZodOptional<z.ZodObject<{
6348
+ version: z.ZodOptional<z.ZodString>;
6349
+ cipher: z.ZodOptional<z.ZodString>;
6350
+ protocol: z.ZodOptional<z.ZodString>;
6351
+ curve: z.ZodOptional<z.ZodString>;
6352
+ }, z.core.$strip>>;
6353
+ }, z.core.$strip>;
6251
6354
  declare const streamSummarySchema: z.ZodObject<{
6252
6355
  workspace_id: z.ZodOptional<z.ZodString>;
6253
6356
  project_id: z.ZodOptional<z.ZodString>;
@@ -6265,6 +6368,12 @@ declare const streamSummarySchema: z.ZodObject<{
6265
6368
  country: z.ZodOptional<z.ZodString>;
6266
6369
  region: z.ZodOptional<z.ZodString>;
6267
6370
  }, z.core.$strip>>;
6371
+ tls: z.ZodOptional<z.ZodObject<{
6372
+ version: z.ZodOptional<z.ZodString>;
6373
+ cipher: z.ZodOptional<z.ZodString>;
6374
+ protocol: z.ZodOptional<z.ZodString>;
6375
+ curve: z.ZodOptional<z.ZodString>;
6376
+ }, z.core.$strip>>;
6268
6377
  }, z.core.$strip>;
6269
6378
  http: z.ZodOptional<z.ZodObject<{
6270
6379
  protocol: z.ZodOptional<z.ZodEnum<{
@@ -6379,6 +6488,14 @@ declare const streamSummarySchema: z.ZodObject<{
6379
6488
  authorization: "authorization";
6380
6489
  client: "client";
6381
6490
  }>;
6491
+ }, z.core.$strip>, z.ZodObject<{
6492
+ reason: z.ZodLiteral<"insufficient_scope">;
6493
+ source: z.ZodEnum<{
6494
+ unknown: "unknown";
6495
+ query: "query";
6496
+ authorization: "authorization";
6497
+ client: "client";
6498
+ }>;
6382
6499
  }, z.core.$strip>, z.ZodObject<{
6383
6500
  reason: z.ZodLiteral<"policy_denied">;
6384
6501
  policy: z.ZodEnum<{
@@ -6484,6 +6601,14 @@ declare const streamSummarySchema: z.ZodObject<{
6484
6601
  authorization: "authorization";
6485
6602
  client: "client";
6486
6603
  }>;
6604
+ }, z.core.$strip>, z.ZodObject<{
6605
+ reason: z.ZodLiteral<"insufficient_scope">;
6606
+ source: z.ZodEnum<{
6607
+ unknown: "unknown";
6608
+ query: "query";
6609
+ authorization: "authorization";
6610
+ client: "client";
6611
+ }>;
6487
6612
  }, z.core.$strip>, z.ZodObject<{
6488
6613
  reason: z.ZodLiteral<"policy_denied">;
6489
6614
  policy: z.ZodEnum<{
@@ -6536,6 +6661,12 @@ declare const streamSummarySchema: z.ZodObject<{
6536
6661
  country: z.ZodOptional<z.ZodString>;
6537
6662
  region: z.ZodOptional<z.ZodString>;
6538
6663
  }, z.core.$strip>>;
6664
+ tls: z.ZodOptional<z.ZodObject<{
6665
+ version: z.ZodOptional<z.ZodString>;
6666
+ cipher: z.ZodOptional<z.ZodString>;
6667
+ protocol: z.ZodOptional<z.ZodString>;
6668
+ curve: z.ZodOptional<z.ZodString>;
6669
+ }, z.core.$strip>>;
6539
6670
  }, z.core.$strip>>;
6540
6671
  metrics: z.ZodObject<{
6541
6672
  establish_ms: z.ZodNumber;
@@ -6619,6 +6750,14 @@ declare const streamSummarySchema: z.ZodObject<{
6619
6750
  authorization: "authorization";
6620
6751
  client: "client";
6621
6752
  }>;
6753
+ }, z.core.$strip>, z.ZodObject<{
6754
+ reason: z.ZodLiteral<"insufficient_scope">;
6755
+ source: z.ZodEnum<{
6756
+ unknown: "unknown";
6757
+ query: "query";
6758
+ authorization: "authorization";
6759
+ client: "client";
6760
+ }>;
6622
6761
  }, z.core.$strip>, z.ZodObject<{
6623
6762
  reason: z.ZodLiteral<"policy_denied">;
6624
6763
  policy: z.ZodEnum<{
@@ -6667,6 +6806,12 @@ declare const streamSummarySchema: z.ZodObject<{
6667
6806
  country: z.ZodOptional<z.ZodString>;
6668
6807
  region: z.ZodOptional<z.ZodString>;
6669
6808
  }, z.core.$strip>>;
6809
+ tls: z.ZodOptional<z.ZodObject<{
6810
+ version: z.ZodOptional<z.ZodString>;
6811
+ cipher: z.ZodOptional<z.ZodString>;
6812
+ protocol: z.ZodOptional<z.ZodString>;
6813
+ curve: z.ZodOptional<z.ZodString>;
6814
+ }, z.core.$strip>>;
6670
6815
  }, z.core.$strip>>;
6671
6816
  metrics: z.ZodOptional<z.ZodObject<{
6672
6817
  time_to_fail_ms: z.ZodOptional<z.ZodNumber>;
@@ -6703,6 +6848,8 @@ declare const streamSummarySchema: z.ZodObject<{
6703
6848
  }, z.core.$strip>], "outcome">;
6704
6849
  }, z.core.$strip>;
6705
6850
  type StreamSummary = z.infer<typeof streamSummarySchema>;
6851
+ type StreamTLSInfo = z.infer<typeof streamTLSInfoSchema>;
6852
+ type StreamEndpoint = z.infer<typeof streamEndpointSchema>;
6706
6853
 
6707
6854
  /**
6708
6855
  * Configuration for the Watch connection.
@@ -6788,4 +6935,4 @@ declare const webttyServerSchema: z.ZodObject<{
6788
6935
  type WebTTYServer = z.infer<typeof webttyServerSchema>;
6789
6936
  declare function parseWebTTYServers(tunnels: Tunnel[]): WebTTYServer[];
6790
6937
 
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 };
6938
+ 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,12 @@ 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
+ protocol: z.ZodOptional<z.ZodString>;
4661
+ curve: z.ZodOptional<z.ZodString>;
4662
+ }, z.core.$strip>>;
4657
4663
  }, z.core.$strip>;
4658
4664
  http: z.ZodOptional<z.ZodObject<{
4659
4665
  protocol: z.ZodOptional<z.ZodEnum<{
@@ -4768,6 +4774,14 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
4768
4774
  authorization: "authorization";
4769
4775
  client: "client";
4770
4776
  }>;
4777
+ }, z.core.$strip>, z.ZodObject<{
4778
+ reason: z.ZodLiteral<"insufficient_scope">;
4779
+ source: z.ZodEnum<{
4780
+ unknown: "unknown";
4781
+ query: "query";
4782
+ authorization: "authorization";
4783
+ client: "client";
4784
+ }>;
4771
4785
  }, z.core.$strip>, z.ZodObject<{
4772
4786
  reason: z.ZodLiteral<"policy_denied">;
4773
4787
  policy: z.ZodEnum<{
@@ -4873,6 +4887,14 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
4873
4887
  authorization: "authorization";
4874
4888
  client: "client";
4875
4889
  }>;
4890
+ }, z.core.$strip>, z.ZodObject<{
4891
+ reason: z.ZodLiteral<"insufficient_scope">;
4892
+ source: z.ZodEnum<{
4893
+ unknown: "unknown";
4894
+ query: "query";
4895
+ authorization: "authorization";
4896
+ client: "client";
4897
+ }>;
4876
4898
  }, z.core.$strip>, z.ZodObject<{
4877
4899
  reason: z.ZodLiteral<"policy_denied">;
4878
4900
  policy: z.ZodEnum<{
@@ -4925,6 +4947,12 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
4925
4947
  country: z.ZodOptional<z.ZodString>;
4926
4948
  region: z.ZodOptional<z.ZodString>;
4927
4949
  }, z.core.$strip>>;
4950
+ tls: z.ZodOptional<z.ZodObject<{
4951
+ version: z.ZodOptional<z.ZodString>;
4952
+ cipher: z.ZodOptional<z.ZodString>;
4953
+ protocol: z.ZodOptional<z.ZodString>;
4954
+ curve: z.ZodOptional<z.ZodString>;
4955
+ }, z.core.$strip>>;
4928
4956
  }, z.core.$strip>>;
4929
4957
  metrics: z.ZodObject<{
4930
4958
  establish_ms: z.ZodNumber;
@@ -5008,6 +5036,14 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
5008
5036
  authorization: "authorization";
5009
5037
  client: "client";
5010
5038
  }>;
5039
+ }, z.core.$strip>, z.ZodObject<{
5040
+ reason: z.ZodLiteral<"insufficient_scope">;
5041
+ source: z.ZodEnum<{
5042
+ unknown: "unknown";
5043
+ query: "query";
5044
+ authorization: "authorization";
5045
+ client: "client";
5046
+ }>;
5011
5047
  }, z.core.$strip>, z.ZodObject<{
5012
5048
  reason: z.ZodLiteral<"policy_denied">;
5013
5049
  policy: z.ZodEnum<{
@@ -5056,6 +5092,12 @@ declare const webhookEventsSchema: z.ZodUnion<readonly [z.ZodObject<{
5056
5092
  country: z.ZodOptional<z.ZodString>;
5057
5093
  region: z.ZodOptional<z.ZodString>;
5058
5094
  }, z.core.$strip>>;
5095
+ tls: z.ZodOptional<z.ZodObject<{
5096
+ version: z.ZodOptional<z.ZodString>;
5097
+ cipher: z.ZodOptional<z.ZodString>;
5098
+ protocol: z.ZodOptional<z.ZodString>;
5099
+ curve: z.ZodOptional<z.ZodString>;
5100
+ }, z.core.$strip>>;
5059
5101
  }, z.core.$strip>>;
5060
5102
  metrics: z.ZodOptional<z.ZodObject<{
5061
5103
  time_to_fail_ms: z.ZodOptional<z.ZodNumber>;
@@ -5728,6 +5770,12 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
5728
5770
  country: z.ZodOptional<z.ZodString>;
5729
5771
  region: z.ZodOptional<z.ZodString>;
5730
5772
  }, z.core.$strip>>;
5773
+ tls: z.ZodOptional<z.ZodObject<{
5774
+ version: z.ZodOptional<z.ZodString>;
5775
+ cipher: z.ZodOptional<z.ZodString>;
5776
+ protocol: z.ZodOptional<z.ZodString>;
5777
+ curve: z.ZodOptional<z.ZodString>;
5778
+ }, z.core.$strip>>;
5731
5779
  }, z.core.$strip>;
5732
5780
  http: z.ZodOptional<z.ZodObject<{
5733
5781
  protocol: z.ZodOptional<z.ZodEnum<{
@@ -5842,6 +5890,14 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
5842
5890
  authorization: "authorization";
5843
5891
  client: "client";
5844
5892
  }>;
5893
+ }, z.core.$strip>, z.ZodObject<{
5894
+ reason: z.ZodLiteral<"insufficient_scope">;
5895
+ source: z.ZodEnum<{
5896
+ unknown: "unknown";
5897
+ query: "query";
5898
+ authorization: "authorization";
5899
+ client: "client";
5900
+ }>;
5845
5901
  }, z.core.$strip>, z.ZodObject<{
5846
5902
  reason: z.ZodLiteral<"policy_denied">;
5847
5903
  policy: z.ZodEnum<{
@@ -5947,6 +6003,14 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
5947
6003
  authorization: "authorization";
5948
6004
  client: "client";
5949
6005
  }>;
6006
+ }, z.core.$strip>, z.ZodObject<{
6007
+ reason: z.ZodLiteral<"insufficient_scope">;
6008
+ source: z.ZodEnum<{
6009
+ unknown: "unknown";
6010
+ query: "query";
6011
+ authorization: "authorization";
6012
+ client: "client";
6013
+ }>;
5950
6014
  }, z.core.$strip>, z.ZodObject<{
5951
6015
  reason: z.ZodLiteral<"policy_denied">;
5952
6016
  policy: z.ZodEnum<{
@@ -5999,6 +6063,12 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
5999
6063
  country: z.ZodOptional<z.ZodString>;
6000
6064
  region: z.ZodOptional<z.ZodString>;
6001
6065
  }, z.core.$strip>>;
6066
+ tls: z.ZodOptional<z.ZodObject<{
6067
+ version: z.ZodOptional<z.ZodString>;
6068
+ cipher: z.ZodOptional<z.ZodString>;
6069
+ protocol: z.ZodOptional<z.ZodString>;
6070
+ curve: z.ZodOptional<z.ZodString>;
6071
+ }, z.core.$strip>>;
6002
6072
  }, z.core.$strip>>;
6003
6073
  metrics: z.ZodObject<{
6004
6074
  establish_ms: z.ZodNumber;
@@ -6082,6 +6152,14 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
6082
6152
  authorization: "authorization";
6083
6153
  client: "client";
6084
6154
  }>;
6155
+ }, z.core.$strip>, z.ZodObject<{
6156
+ reason: z.ZodLiteral<"insufficient_scope">;
6157
+ source: z.ZodEnum<{
6158
+ unknown: "unknown";
6159
+ query: "query";
6160
+ authorization: "authorization";
6161
+ client: "client";
6162
+ }>;
6085
6163
  }, z.core.$strip>, z.ZodObject<{
6086
6164
  reason: z.ZodLiteral<"policy_denied">;
6087
6165
  policy: z.ZodEnum<{
@@ -6130,6 +6208,12 @@ declare const eventSchema: z.ZodUnion<readonly [z.ZodUnion<readonly [z.ZodObject
6130
6208
  country: z.ZodOptional<z.ZodString>;
6131
6209
  region: z.ZodOptional<z.ZodString>;
6132
6210
  }, z.core.$strip>>;
6211
+ tls: z.ZodOptional<z.ZodObject<{
6212
+ version: z.ZodOptional<z.ZodString>;
6213
+ cipher: z.ZodOptional<z.ZodString>;
6214
+ protocol: z.ZodOptional<z.ZodString>;
6215
+ curve: z.ZodOptional<z.ZodString>;
6216
+ }, z.core.$strip>>;
6133
6217
  }, z.core.$strip>>;
6134
6218
  metrics: z.ZodOptional<z.ZodObject<{
6135
6219
  time_to_fail_ms: z.ZodOptional<z.ZodNumber>;
@@ -6248,6 +6332,25 @@ declare function resolveTunnelsCredentials(credentials?: RstreamCredentials): Rs
6248
6332
  declare function resolveControlPlaneCredentials(controlPlaneCredentials?: RstreamCredentials, credentials?: RstreamCredentials, authToken?: string): RstreamCredentials | undefined;
6249
6333
  declare function resolveTunnelsEngine(config: TunnelsResolutionConfig): Promise<string>;
6250
6334
 
6335
+ declare const streamTLSInfoSchema: z.ZodObject<{
6336
+ version: z.ZodOptional<z.ZodString>;
6337
+ cipher: z.ZodOptional<z.ZodString>;
6338
+ protocol: z.ZodOptional<z.ZodString>;
6339
+ curve: z.ZodOptional<z.ZodString>;
6340
+ }, z.core.$strip>;
6341
+ declare const streamEndpointSchema: z.ZodObject<{
6342
+ ip: z.ZodOptional<z.ZodString>;
6343
+ geolocation: z.ZodOptional<z.ZodObject<{
6344
+ country: z.ZodOptional<z.ZodString>;
6345
+ region: z.ZodOptional<z.ZodString>;
6346
+ }, z.core.$strip>>;
6347
+ tls: z.ZodOptional<z.ZodObject<{
6348
+ version: z.ZodOptional<z.ZodString>;
6349
+ cipher: z.ZodOptional<z.ZodString>;
6350
+ protocol: z.ZodOptional<z.ZodString>;
6351
+ curve: z.ZodOptional<z.ZodString>;
6352
+ }, z.core.$strip>>;
6353
+ }, z.core.$strip>;
6251
6354
  declare const streamSummarySchema: z.ZodObject<{
6252
6355
  workspace_id: z.ZodOptional<z.ZodString>;
6253
6356
  project_id: z.ZodOptional<z.ZodString>;
@@ -6265,6 +6368,12 @@ declare const streamSummarySchema: z.ZodObject<{
6265
6368
  country: z.ZodOptional<z.ZodString>;
6266
6369
  region: z.ZodOptional<z.ZodString>;
6267
6370
  }, z.core.$strip>>;
6371
+ tls: z.ZodOptional<z.ZodObject<{
6372
+ version: z.ZodOptional<z.ZodString>;
6373
+ cipher: z.ZodOptional<z.ZodString>;
6374
+ protocol: z.ZodOptional<z.ZodString>;
6375
+ curve: z.ZodOptional<z.ZodString>;
6376
+ }, z.core.$strip>>;
6268
6377
  }, z.core.$strip>;
6269
6378
  http: z.ZodOptional<z.ZodObject<{
6270
6379
  protocol: z.ZodOptional<z.ZodEnum<{
@@ -6379,6 +6488,14 @@ declare const streamSummarySchema: z.ZodObject<{
6379
6488
  authorization: "authorization";
6380
6489
  client: "client";
6381
6490
  }>;
6491
+ }, z.core.$strip>, z.ZodObject<{
6492
+ reason: z.ZodLiteral<"insufficient_scope">;
6493
+ source: z.ZodEnum<{
6494
+ unknown: "unknown";
6495
+ query: "query";
6496
+ authorization: "authorization";
6497
+ client: "client";
6498
+ }>;
6382
6499
  }, z.core.$strip>, z.ZodObject<{
6383
6500
  reason: z.ZodLiteral<"policy_denied">;
6384
6501
  policy: z.ZodEnum<{
@@ -6484,6 +6601,14 @@ declare const streamSummarySchema: z.ZodObject<{
6484
6601
  authorization: "authorization";
6485
6602
  client: "client";
6486
6603
  }>;
6604
+ }, z.core.$strip>, z.ZodObject<{
6605
+ reason: z.ZodLiteral<"insufficient_scope">;
6606
+ source: z.ZodEnum<{
6607
+ unknown: "unknown";
6608
+ query: "query";
6609
+ authorization: "authorization";
6610
+ client: "client";
6611
+ }>;
6487
6612
  }, z.core.$strip>, z.ZodObject<{
6488
6613
  reason: z.ZodLiteral<"policy_denied">;
6489
6614
  policy: z.ZodEnum<{
@@ -6536,6 +6661,12 @@ declare const streamSummarySchema: z.ZodObject<{
6536
6661
  country: z.ZodOptional<z.ZodString>;
6537
6662
  region: z.ZodOptional<z.ZodString>;
6538
6663
  }, z.core.$strip>>;
6664
+ tls: z.ZodOptional<z.ZodObject<{
6665
+ version: z.ZodOptional<z.ZodString>;
6666
+ cipher: z.ZodOptional<z.ZodString>;
6667
+ protocol: z.ZodOptional<z.ZodString>;
6668
+ curve: z.ZodOptional<z.ZodString>;
6669
+ }, z.core.$strip>>;
6539
6670
  }, z.core.$strip>>;
6540
6671
  metrics: z.ZodObject<{
6541
6672
  establish_ms: z.ZodNumber;
@@ -6619,6 +6750,14 @@ declare const streamSummarySchema: z.ZodObject<{
6619
6750
  authorization: "authorization";
6620
6751
  client: "client";
6621
6752
  }>;
6753
+ }, z.core.$strip>, z.ZodObject<{
6754
+ reason: z.ZodLiteral<"insufficient_scope">;
6755
+ source: z.ZodEnum<{
6756
+ unknown: "unknown";
6757
+ query: "query";
6758
+ authorization: "authorization";
6759
+ client: "client";
6760
+ }>;
6622
6761
  }, z.core.$strip>, z.ZodObject<{
6623
6762
  reason: z.ZodLiteral<"policy_denied">;
6624
6763
  policy: z.ZodEnum<{
@@ -6667,6 +6806,12 @@ declare const streamSummarySchema: z.ZodObject<{
6667
6806
  country: z.ZodOptional<z.ZodString>;
6668
6807
  region: z.ZodOptional<z.ZodString>;
6669
6808
  }, z.core.$strip>>;
6809
+ tls: z.ZodOptional<z.ZodObject<{
6810
+ version: z.ZodOptional<z.ZodString>;
6811
+ cipher: z.ZodOptional<z.ZodString>;
6812
+ protocol: z.ZodOptional<z.ZodString>;
6813
+ curve: z.ZodOptional<z.ZodString>;
6814
+ }, z.core.$strip>>;
6670
6815
  }, z.core.$strip>>;
6671
6816
  metrics: z.ZodOptional<z.ZodObject<{
6672
6817
  time_to_fail_ms: z.ZodOptional<z.ZodNumber>;
@@ -6703,6 +6848,8 @@ declare const streamSummarySchema: z.ZodObject<{
6703
6848
  }, z.core.$strip>], "outcome">;
6704
6849
  }, z.core.$strip>;
6705
6850
  type StreamSummary = z.infer<typeof streamSummarySchema>;
6851
+ type StreamTLSInfo = z.infer<typeof streamTLSInfoSchema>;
6852
+ type StreamEndpoint = z.infer<typeof streamEndpointSchema>;
6706
6853
 
6707
6854
  /**
6708
6855
  * Configuration for the Watch connection.
@@ -6788,4 +6935,4 @@ declare const webttyServerSchema: z.ZodObject<{
6788
6935
  type WebTTYServer = z.infer<typeof webttyServerSchema>;
6789
6936
  declare function parseWebTTYServers(tunnels: Tunnel[]): WebTTYServer[];
6790
6937
 
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 };
6938
+ 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,16 @@ var geolocationSchema = z5.object({
396
398
  country: z5.string().optional(),
397
399
  region: z5.string().optional()
398
400
  });
399
- var endpointSchema = z5.object({
401
+ var streamTLSInfoSchema = z5.object({
402
+ version: z5.string().min(1).optional(),
403
+ cipher: z5.string().min(1).optional(),
404
+ protocol: z5.string().min(1).optional(),
405
+ curve: z5.string().min(1).optional()
406
+ });
407
+ var streamEndpointSchema = z5.object({
400
408
  ip: ipAddressSchema.optional(),
401
- geolocation: geolocationSchema.optional()
409
+ geolocation: geolocationSchema.optional(),
410
+ tls: streamTLSInfoSchema.optional()
402
411
  });
403
412
  var httpHeadersSchema = z5.record(
404
413
  z5.string(),
@@ -467,6 +476,9 @@ var unauthorizedSchema = z5.discriminatedUnion("reason", [
467
476
  unauthorizedReasonSchema({
468
477
  reason: z5.literal("user_mismatch")
469
478
  }),
479
+ unauthorizedReasonSchema({
480
+ reason: z5.literal("insufficient_scope")
481
+ }),
470
482
  unauthorizedReasonSchema({
471
483
  reason: z5.literal("policy_denied"),
472
484
  policy: z5.enum(["ip", "geo", "mtls", "challenge", "other"]),
@@ -539,7 +551,7 @@ var terminationSchema = z5.object({
539
551
  var responseConnectedSchema = z5.object({
540
552
  outcome: z5.literal("connected"),
541
553
  established_at: isoDateTimeSchema,
542
- upstream: endpointSchema.optional(),
554
+ upstream: streamEndpointSchema.optional(),
543
555
  metrics: streamConnectedMetricsSchema,
544
556
  termination: terminationSchema.optional(),
545
557
  http: httpResponseStageSchema.optional()
@@ -547,7 +559,7 @@ var responseConnectedSchema = z5.object({
547
559
  var responseFailedSchema = z5.object({
548
560
  outcome: z5.literal("failed"),
549
561
  failure: failureSchema,
550
- upstream: endpointSchema.optional(),
562
+ upstream: streamEndpointSchema.optional(),
551
563
  metrics: streamFailedMetricsSchema.optional(),
552
564
  termination: terminationSchema.optional(),
553
565
  http: httpResponseStageSchema.optional()
@@ -567,7 +579,7 @@ var streamSummarySchema = z5.object({
567
579
  created_at: isoDateTimeSchema,
568
580
  terminated_at: isoDateTimeSchema,
569
581
  request: z5.object({
570
- downstream: endpointSchema,
582
+ downstream: streamEndpointSchema,
571
583
  http: httpRequestStageSchema.optional()
572
584
  }),
573
585
  firewall: firewallSchema,
@@ -577,7 +589,7 @@ var streamSummarySchema = z5.object({
577
589
 
578
590
  // src/event.ts
579
591
  var z6 = __toESM(require("zod"));
580
- var isoDateTimeSchema2 = z6.string().datetime();
592
+ var isoDateTimeSchema2 = z6.string().datetime({ offset: true });
581
593
  var initialStateSchema = z6.object({
582
594
  snapshot_at: isoDateTimeSchema2,
583
595
  clients: z6.array(clientSchema),
@@ -1399,7 +1411,9 @@ function parseWebTTYServers(tunnels) {
1399
1411
  resolveTunnelsAPIURL,
1400
1412
  resolveTunnelsCredentials,
1401
1413
  resolveTunnelsEngine,
1414
+ streamEndpointSchema,
1402
1415
  streamSummarySchema,
1416
+ streamTLSInfoSchema,
1403
1417
  tokenSchema,
1404
1418
  tunnelSchema,
1405
1419
  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,16 @@ var geolocationSchema = z5.object({
318
318
  country: z5.string().optional(),
319
319
  region: z5.string().optional()
320
320
  });
321
- var endpointSchema = z5.object({
321
+ var streamTLSInfoSchema = z5.object({
322
+ version: z5.string().min(1).optional(),
323
+ cipher: z5.string().min(1).optional(),
324
+ protocol: z5.string().min(1).optional(),
325
+ curve: z5.string().min(1).optional()
326
+ });
327
+ var streamEndpointSchema = z5.object({
322
328
  ip: ipAddressSchema.optional(),
323
- geolocation: geolocationSchema.optional()
329
+ geolocation: geolocationSchema.optional(),
330
+ tls: streamTLSInfoSchema.optional()
324
331
  });
325
332
  var httpHeadersSchema = z5.record(
326
333
  z5.string(),
@@ -389,6 +396,9 @@ var unauthorizedSchema = z5.discriminatedUnion("reason", [
389
396
  unauthorizedReasonSchema({
390
397
  reason: z5.literal("user_mismatch")
391
398
  }),
399
+ unauthorizedReasonSchema({
400
+ reason: z5.literal("insufficient_scope")
401
+ }),
392
402
  unauthorizedReasonSchema({
393
403
  reason: z5.literal("policy_denied"),
394
404
  policy: z5.enum(["ip", "geo", "mtls", "challenge", "other"]),
@@ -461,7 +471,7 @@ var terminationSchema = z5.object({
461
471
  var responseConnectedSchema = z5.object({
462
472
  outcome: z5.literal("connected"),
463
473
  established_at: isoDateTimeSchema,
464
- upstream: endpointSchema.optional(),
474
+ upstream: streamEndpointSchema.optional(),
465
475
  metrics: streamConnectedMetricsSchema,
466
476
  termination: terminationSchema.optional(),
467
477
  http: httpResponseStageSchema.optional()
@@ -469,7 +479,7 @@ var responseConnectedSchema = z5.object({
469
479
  var responseFailedSchema = z5.object({
470
480
  outcome: z5.literal("failed"),
471
481
  failure: failureSchema,
472
- upstream: endpointSchema.optional(),
482
+ upstream: streamEndpointSchema.optional(),
473
483
  metrics: streamFailedMetricsSchema.optional(),
474
484
  termination: terminationSchema.optional(),
475
485
  http: httpResponseStageSchema.optional()
@@ -489,7 +499,7 @@ var streamSummarySchema = z5.object({
489
499
  created_at: isoDateTimeSchema,
490
500
  terminated_at: isoDateTimeSchema,
491
501
  request: z5.object({
492
- downstream: endpointSchema,
502
+ downstream: streamEndpointSchema,
493
503
  http: httpRequestStageSchema.optional()
494
504
  }),
495
505
  firewall: firewallSchema,
@@ -499,7 +509,7 @@ var streamSummarySchema = z5.object({
499
509
 
500
510
  // src/event.ts
501
511
  import * as z6 from "zod";
502
- var isoDateTimeSchema2 = z6.string().datetime();
512
+ var isoDateTimeSchema2 = z6.string().datetime({ offset: true });
503
513
  var initialStateSchema = z6.object({
504
514
  snapshot_at: isoDateTimeSchema2,
505
515
  clients: z6.array(clientSchema),
@@ -1320,7 +1330,9 @@ export {
1320
1330
  resolveTunnelsAPIURL,
1321
1331
  resolveTunnelsCredentials,
1322
1332
  resolveTunnelsEngine,
1333
+ streamEndpointSchema,
1323
1334
  streamSummarySchema,
1335
+ streamTLSInfoSchema,
1324
1336
  tokenSchema,
1325
1337
  tunnelSchema,
1326
1338
  turnCredentialModeSchema,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rstreamlabs/tunnels",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "JS/TS SDK for the rstream tunnels data plane and engine APIs.",
5
5
  "author": "@uartnet <hello@rstream.io>",
6
6
  "license": "Apache-2.0",